index.wxml 1.1 KB

12345678910111213141516171819202122
  1. <view class="l-class card-container {{'card-container-' + type}} {{'card-container-' + type + '-' + position}} {{full?'card-container-full':'card-container-unfull'}}">
  2. <block wx:if="{{type ==='primary' || type ==='cover'}}">
  3. <image wx:if="{{!plaintext}}" class="l-img-class {{full?'cover-img-full':'cover-img-unfull'}} {{ 'card-img-' + type }} {{ 'card-img-' + type + '-' + position }}" mode="{{imageMode}}" lazy-load src="{{image}}"></image>
  4. <view class="card-content">
  5. <text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
  6. <slot/>
  7. </view>
  8. </block>
  9. <block wx:if="{{type ==='avatar'}}">
  10. <view class="card-avatar-top">
  11. <view class="card-avatar-left">
  12. <image mode="aspectFill" class="l-img-class {{ 'card-img-' + type }}" src="{{image}}" mode="{{imageMode}}" lazy-load></image>
  13. <view class="card-avatar">
  14. <text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
  15. <text class="describe">{{describe}}</text>
  16. </view>
  17. </view>
  18. <slot name="more"/>
  19. </view>
  20. <slot/>
  21. </block>
  22. </view>