vant-weapp/packages/card/index.wxml
2018-09-29 14:40:13 +08:00

23 lines
1021 B
Plaintext

<view class="custom-class van-card {{ centered ? 'van-card--center' : '' }}">
<view class="van-card__thumb">
<image wx:if="{{ thumb }}" src="{{ thumb }}" class="van-card__img thumb-class" />
<slot wx:else name="thumb" />
</view>
<view class="van-card__content">
<view wx:if="{{ title || price || price === 0 }}" class="van-card__row">
<view wx:if="{{ title }}" class="van-card__title van-multi-ellipsis--l2 title-class">{{ title }}</view>
<view wx:if="{{ price || price === 0 }}" class="van-card__price price-class">{{ currency }} {{ price }}</view>
</view>
<slot wx:else name="title" />
<view wx:if="{{ desc || num }}" class="van-card__row">
<view wx:if="{{ desc }}" class="van-card__desc van-ellipsis desc-class">{{ desc }}</view>
<view wx:if="{{ num }}" class="van-card__num num-class">x {{ num }}</view>
</view>
<slot wx:else name="desc" />
<slot name="tags" />
</view>
<view class="van-card__footer">
<slot name="footer" />
</view>
</view>