管灌系统农户端微信小程序(嘉峪关应用)
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
61
62
<import src="../common/template/icon.wxml" />
<wxs src="../common/utils.wxs" module="_" />
 
<view
  wx:if="{{visible}}"
  id="{{classPrefix}}"
  class="{{classPrefix}} class {{prefix}}-class"
  style="{{_._style([style, customStyle, '--td-image-viewer-top: ' + maskTop + 'px'])}}"
  aria-modal="{{true}}"
  aria-role="dialog"
  aria-label="图片查看器"
>
  <view
    class="{{classPrefix}}__mask"
    data-source="overlay"
    bind:tap="onClose"
    style="{{ 'background-color: ' + backgroundColor }}"
    aria-role="button"
    aria-label="关闭"
  />
  <block wx:if="{{images && images.length}}">
    <view class="{{classPrefix}}__content">
      <swiper
        class="swiper"
        style="{{swiperStyle[currentSwiperIndex].style}}"
        autoplay="{{false}}"
        current="{{currentSwiperIndex}}"
        bindchange="onSwiperChange"
        bindtap="onClose"
        tabindex="0"
      >
        <swiper-item wx:for="{{images}}" wx:key="index" class="{{classPrefix}}__preview-image">
          <t-image
            t-class="t-image--external"
            style="{{imagesStyle[index].style || ''}}"
            mode="aspectFit"
            lazy
            src="{{item}}"
            data-index="{{index}}"
            class="{{classPrefix}}__image"
            bindload="onImageLoadSuccess"
          ></t-image>
        </swiper-item>
      </swiper>
    </view>
    <view class="{{classPrefix}}__nav">
      <view class="{{classPrefix}}__nav-close" catch:tap="onClose" aria-role="button" aria-label="关闭">
        <slot name="close-btn" />
        <template wx:if="{{_closeBtn}}" is="icon" data="{{ ..._closeBtn }}" />
      </view>
 
      <view wx:if="{{showIndex}}" class="{{classPrefix}}__nav-index">
        {{currentSwiperIndex + 1}}/{{images.length}}
      </view>
 
      <view class="{{classPrefix}}__nav-delete" bind:tap="onDelete" aria-role="button" aria-label="删除">
        <slot name="delete-btn" />
        <template is="icon" data="{{ ..._deleteBtn }}" />
      </view>
    </view>
  </block>
</view>