47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
<wxs src="./swipe-cell.wxs" module="swipe"></wxs>
|
|
<view
|
|
class="{{prefix}}-class {{classPrefix}}"
|
|
data-key="cell"
|
|
capture-bind:tap="onTap"
|
|
bindtouchstart="{{disabled || swipe.startDrag}}"
|
|
capture-bind:touchmove="{{disabled || swipe.onDrag}}"
|
|
bindtouchend="{{disabled || swipe.endDrag}}"
|
|
bindtouchcancel="{{disabled || swipe.endDrag}}"
|
|
opened="{{opened}}"
|
|
change:opened="{{swipe.onOpenedChange}}"
|
|
leftWidth="{{leftWidth}}"
|
|
rightWidth="{{rightWidth}}"
|
|
change:leftWidth="{{swipe.initLeftWidth}}"
|
|
change:rightWidth="{{swipe.initRightWidth}}"
|
|
>
|
|
<view id="wrapper">
|
|
<view class="{{classPrefix}}__left" data-key="left">
|
|
<slot name="left" />
|
|
<view
|
|
wx:for="{{left}}"
|
|
class="{{item.className}}"
|
|
style="{{item.style}}"
|
|
wx:key="index"
|
|
data-action="{{item}}"
|
|
bind:tap="onActionTap"
|
|
>
|
|
{{item.text}}
|
|
</view>
|
|
</view>
|
|
<slot />
|
|
<view class="{{classPrefix}}__right" data-key="right">
|
|
<slot name="right" />
|
|
<view
|
|
wx:for="{{right}}"
|
|
class="{{item.className}}"
|
|
style="{{item.style}}"
|
|
wx:key="index"
|
|
data-action="{{item}}"
|
|
bind:tap="onActionTap"
|
|
>
|
|
{{item.text}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|