vant-weapp/packages/cell/index.wxml
lethe 8816e421e8 [improvement]cell:优化默认slot展示效果,添加title区域自定义class (#360)
* [improvement]cell:优化默认slot展示效果,添加title区域自定义class

* cell-group添加titleWidth实现整体控制title区域宽度
2018-07-16 20:29:13 +08:00

25 lines
683 B
Plaintext

<view
catchtap="cellTap"
class="cell-class zan-cell {{ isLastCell ? 'last-cell' : '' }} {{ isLink ? 'zan-cell--access' : '' }}"
>
<view class="zan-cell__icon">
<slot name="icon"></slot>
</view>
<view class="title-class zan-cell__title" style="width: {{ titleWidth }}">
<view wx:if="{{ title }}" class="zan-cell__text">{{ title }}</view>
<view wx:if="{{ label }}" class="zan-cell__desc">{{ label }}</view>
</view>
<view class="zan-cell__bd">
<slot></slot>
</view>
<view bindtap="footerTap" class="zan-cell__ft">
<block wx:if="{{value}}">{{ value }}</block>
<block wx:else>
<slot name="footer"></slot>
</block>
</view>
</view>