vant-weapp/packages/card/index.wxml
wny 7441e8c39b [refactor] 重构layout和card组件为自定义组件 (#185)
* layout重构

* [refactor] 重构卡片
2018-04-10 20:40:12 +08:00

32 lines
1000 B
Plaintext

<view class="zan-card card-class">
<!-- 左侧图片 -->
<slot wx:if="{{ useThumbSlot }}" name="thumb-slot"></slot>
<view wx:else class="zan-card__thumb">
<image class="zan-card__img"
src="{{ thumb }}"
mode="aspectFit"
></image>
</view>
<!-- 右侧详情 -->
<slot wx:if="{{ useDetailSlot }}" name="detail-slot"></slot>
<view wx:else class="zan-card__detail">
<view class="zan-card__detail-row">
<view class="zan-card__right-col">¥ {{ price }}</view>
<view class="zan-card__left-col zan-ellipsis--l2">
{{ title }}
</view>
</view>
<view class="zan-card__detail-row zan-c-gray-darker">
<view wx:if="{{ num }}" class="zan-card__right-col">x {{ num }}</view>
<view wx:if="{{ desc }}" class="zan-card__left-col">
{{ desc }}
</view>
</view>
<view wx:if="{{ status }}" class="zan-card__detail-row">
<view class="zan-card__left-col zan-c-red">{{ status }}</view>
</view>
</view>
</view>