project init
This commit is contained in:
46
components/swipe-cell/swipe-cell.wxml
Normal file
46
components/swipe-cell/swipe-cell.wxml
Normal file
@@ -0,0 +1,46 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user