管灌系统农户端微信小程序(嘉峪关应用)
zuoxiao
2024-02-26 3f7ec892d68f71e996489d14d9918dc332281b1e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<import src="../common/template/icon.wxml" />
<wxs src="./swipe-cell.wxs" module="swipe"></wxs>
<wxs src="../common/utils.wxs" module="_" />
 
<view
  class="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 {{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 {{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>