管灌系统农户端微信小程序(嘉峪关应用)
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}}"
  style="{{_._style([style, customStyle])}}"
  class="{{classPrefix}} {{classPrefix}}--{{theme}} class {{prefix}}-class"
>
  <!-- prefixIcon -->
  <view class="{{classPrefix}}__prefix-icon" bind:tap="clickPrefixIcon">
    <slot name="prefix-icon" />
    <template
      wx:if="{{_prefixIcon}}"
      is="icon"
      data="{{tClass: prefix + '-class-prefix-icon', ..._prefixIcon }}"
    ></template>
  </view>
 
  <!-- content -->
  <view class="{{classPrefix}}__content-wrap" bind:tap="clickContent">
    <!-- 垂直滚动通知:基于swiper实现,适用信息量短的多条公告消息,超出省略 -->
    <view wx:if="{{ direction === 'vertical' && _.isArray(content) }}">
      <swiper
        autoplay="true"
        vertical="true"
        circular="true"
        interval="{{interval}}"
        display-multiple-items="1"
        class="{{classPrefix}}__content {{classPrefix}}__content--vertical"
        bindchange="onChange"
      >
        <block wx:for="{{content}}" wx:key="index">
          <swiper-item>
            <view class="{{classPrefix}}__content--vertical-item"> {{item}} </view>
          </swiper-item>
        </block>
      </swiper>
    </view>
    <view
      wx:else
      class="{{classPrefix}}__content {{prefix}}-class-content {{ !marquee ? classPrefix + '__content-wrapable' : ''}}"
      animation="{{ animationData }}"
    >
      <block wx:if="{{content}}">{{content}}</block>
      <slot name="content" />
      <view class="{{classPrefix}}__operation {{prefix}}-class-operation" catch:tap="clickOperation">
        <block wx:if="{{ operation }}">{{operation}}</block>
        <slot name="operation" />
      </view>
    </view>
  </view>
 
  <!-- suffixIcon -->
  <view class="{{classPrefix}}__suffix-icon" bind:tap="clickSuffixIcon">
    <slot name="suffix-icon" />
    <template
      wx:if="{{_suffixIcon}}"
      is="icon"
      data="{{tClass: prefix + '-class-suffix-icon', ..._suffixIcon }}"
    ></template>
  </view>
</view>