2021-01-12 18:04:14 +08:00

30 lines
1.4 KiB
Plaintext

<!---------- wxs start ----------->
<wxs module="utils" src="../wxs/utils.wxs"></wxs>
<!---------- wxs end ----------->
<view class="custom-class {{ utils.bem('cell', [size, { center, required, borderless: !border, clickable: isLink || clickable }]) }}" hover-class="van-cell--hover hover-class" hover-stay-time="70" style="{{ customStyle }}" bind:tap="onClick">
<van-icon wx:if="{{ icon }}" name="{{ icon }}" class="van-cell__left-icon-wrap" custom-class="van-cell__left-icon"></van-icon>
<slot wx:else="" name="icon"></slot>
<view style="{{ (titleWidth ? 'max-width:' + titleWidth + ';min-width:' + titleWidth + ';' : '') + titleStyle }}" class="van-cell__title title-class">
<block wx:if="{{ title }}">{{ title }}</block>
<slot wx:else="" name="title"></slot>
<view wx:if="{{ label || useLabelSlot }}" class="van-cell__label label-class">
<slot wx:if="{{ useLabelSlot }}" name="label"></slot>
<block wx:elif="{{ label }}">{{ label }}</block>
</view>
</view>
<view class="van-cell__value value-class">
<block wx:if="{{ value || value === 0 }}">{{ value }}</block>
<slot wx:else=""></slot>
</view>
<van-icon wx:if="{{ isLink }}" name="{{ arrowDirection ? 'arrow' + '-' + arrowDirection : 'arrow' }}" class="van-cell__right-icon-wrap right-icon-class" custom-class="van-cell__right-icon"></van-icon>
<slot wx:else="" name="right-icon"></slot>
<slot name="extra"></slot>
</view>