管灌系统农户端微信小程序(嘉峪关应用)
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
<wxs src="../common/utils.wxs" module="_" />
<wxs module="this"> module.exports.format = function(num) { return num < 10 ? '0' + num : num; } </wxs>
 
<view
  style="{{_._style([style, customStyle])}}"
  class="{{classPrefix}} {{classPrefix}}--{{theme}} {{classPrefix}}--{{size}} class {{prefix}}-class "
  aria-role="option"
>
  <slot wx:if="{{content !== 'default'}}" name="content" />
  <slot wx:if="{{content !== 'default'}}" />
  <block wx:elif="{{theme == 'default' && !splitWithUnit}}">{{formattedTime}}</block>
  <block wx:else>
    <block wx:for="{{timeRange}}" wx:key="index">
      <text class="{{classPrefix}}__item {{prefix}}-class-count">{{this.format(timeData[timeRange[index]])}}</text>
      <text
        wx:if="{{ splitWithUnit || timeRange.length - 1 !== index}}"
        class="{{classPrefix}}__split {{classPrefix}}__split--{{splitWithUnit ? 'text' : 'dot'}} {{prefix}}-class-split"
        >{{splitWithUnit ? timeDataUnit[timeRange[index]] : ':'}}</text
      >
    </block>
  </block>
</view>