管灌系统农户端微信小程序(嘉峪关应用)
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
<wxs src="../common/utils.wxs" module="_" />
<view
  style="{{_._style([style, customStyle, !text ? ('width: ' + _.addUnit(size) + '; height: ' + _.addUnit(size)) : '', show ? '' : 'display: none', inheritColor ? 'color: inherit' : ''])}}"
  class="class {{prefix}}-class {{classPrefix}} {{classPrefix + '--' + layout}}"
>
  <view
    wx:if="{{indicator}}"
    class="{{prefix}}-class-indicator {{classPrefix}}__spinner {{classPrefix}}__spinner--{{ theme }} {{reverse ? 'reverse' : ''}}"
    style="width: {{ _.addUnit(size) }}; height: {{ _.addUnit(size) }}; {{inheritColor ? 'color: inherit;' : ''}} {{indicator ? '' : 'display: none;'}} {{duration ? 'animation-duration: ' + duration / 1000 + 's;' : ''}} animation-play-state: {{pause ? 'paused' : 'running'}};"
    aria-role="{{ariaRole  || 'img'}}"
    aria-label="{{ ariaLabel || text || '加载中'  }}"
  >
    <view wx:if="{{ theme === 'spinner' }}" wx:for="{{12}}" wx:key="index" class="{{classPrefix}}__dot" />
    <view wx:if="{{ theme === 'circular' }}" class="{{classPrefix}}__circular" />
    <block wx:if="{{ theme === 'dots' }}">
      <view
        class="{{classPrefix}}__dot"
        style="{{duration ? 'animation-duration: ' + duration/1000 + 's; animation-delay:' + 0 + 's;' : ''}} animation-play-state: {{pause ? 'paused' : 'running'}};"
      ></view>
      <view
        class="{{classPrefix}}__dot"
        style="{{duration ? 'animation-duration: ' + duration/1000 + 's; animation-delay:' + duration * 1 / 3000 + 's;' : ''}} animation-play-state: {{pause ? 'paused' : 'running'}};"
      ></view>
      <view
        class="{{classPrefix}}__dot"
        style="{{duration ? 'animation-duration: ' + duration/1000 + 's; animation-delay:' + duration * 2 / 3000 + 's;' : ''}} animation-play-state: {{pause ? 'paused' : 'running'}};"
      ></view>
    </block>
    <slot name="indicator" />
  </view>
  <view
    class="{{_.cls(classPrefix + '__text', [layout])}} {{prefix}}-class-text"
    aria-hidden="{{indicator}}"
    aria-label="{{ ariaLabel || text }}"
  >
    <block wx:if="{{text}}">{{text}}</block>
    <slot name="text" />
    <slot />
  </view>
</view>