管灌系统农户端微信小程序(嘉峪关应用)
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
<wxs src="../common/utils.wxs" module="_" />
 
<!-- 加载中占位 -->
<view
  wx:if="{{isLoading}}"
  style="{{_._style([innerStyle, style, customStyle])}}"
  class="class {{prefix}}-class {{classPrefix}} {{classPrefix}}__mask {{classPrefix}}--loading {{classPrefix}}--shape-{{shape}}"
  aria-hidden="{{ariaHidden}}"
>
  <t-loading
    wx:if="{{loading === 'default'}}"
    theme="dots"
    size="44rpx"
    loading
    inherit-color
    t-class="t-class-load"
    t-class-text="{{classPrefix}}--loading-text"
  ></t-loading>
  <view wx:elif="{{loading !== '' && loading !== 'slot'}}" class="{{classPrefix}}__common {{prefix}}-class-load">
    {{loading}}
  </view>
  <slot wx:else name="loading" />
</view>
<!-- 加载失败占位 -->
<view
  wx:elif="{{isFailed}}"
  style="{{_._style([innerStyle, style, customStyle])}}"
  class="class {{prefix}}-class {{classPrefix}} {{classPrefix}}__mask {{classPrefix}}--failed {{classPrefix}}--shape-{{shape}}"
  aria-hidden="{{ariaHidden}}"
>
  <view wx:if="{{error === 'default'}}" style="font-size: 44rpx" class="{{prefix}}-class-load">
    <t-icon name="close" aria-role="img" aria-label="加载失败" />
  </view>
  <view wx:elif="{{error && error !== 'slot'}}" class="{{classPrefix}}__common {{prefix}}-class-load"> {{error}} </view>
  <slot wx:else name="error" />
</view>
<!-- 图片 -->
<image
  id="image"
  hidden="{{isLoading || isFailed}}"
  class="class {{prefix}}-class {{classPrefix}} {{classPrefix}}--shape-{{shape}}"
  src="{{src}}"
  style="{{_._style([innerStyle, style, customStyle])}}"
  mode="{{mode}}"
  webp="{{webp}}"
  lazy-load="{{lazy}}"
  bind:load="onLoaded"
  bind:error="onLoadError"
  show-menu-by-longpress="{{showMenuByLongpress}}"
  aria-hidden="{{ariaHidden || isLoading || isFailed}}"
  aria-label="{{ariaLabel}}"
/>