mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
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" />
|
|
<van-tag
|
|
wx:if="{{ tag }}"
|
|
mark
|
|
type="danger"
|
|
custom-class="van-card__tag"
|
|
>
|
|
{{ tag }}
|
|
</van-tag>
|
|
</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>
|