123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <import src="../common/template/icon.wxml" />
- <wxs src="./swipe-cell.wxs" module="swipe"></wxs>
- <wxs src="../common/utils.wxs" module="_" />
- <view
- class="{{prefix}}-class {{classPrefix}}"
- style="{{_._style([style, customStyle])}}"
- 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="{{classPrefix}}__content {{language[item.className]||item.className}}"
- style="{{item.style}}"
- wx:key="index"
- data-action="{{item}}"
- bind:tap="onActionTap"
- >
- <template
- wx:if="{{item.icon}}"
- is="icon"
- data="{{class: classPrefix + '__icon', name: item.icon, ...item.icon}}"
- ></template>
- <text wx:if="{{item.text}}" class="{{classPrefix}}__text">{{item.text}}</text>
- </view>
- </view>
- <slot />
- <view class="{{classPrefix}}__right" data-key="right">
- <slot name="right" />
- <view
- wx:for="{{right}}"
- class="{{classPrefix}}__content {{language[item.className]||item.className}}"
- style="{{item.style}}"
- wx:key="index"
- data-action="{{item}}"
- bind:tap="onActionTap"
- >
- <template
- wx:if="{{item.icon}}"
- is="icon"
- data="{{class: classPrefix + '__icon', name: item.icon, ...item.icon}}"
- ></template>
- <text wx:if="{{item.text}}" class="{{classPrefix}}__text">{{item.text}}</text>
- </view>
- </view>
- </view>
- </view>
|