21 lines
864 B
Plaintext
21 lines
864 B
Plaintext
<wxs module="_"> module.exports.format = function(num) { return num < 10 ? '0' + num : num; } </wxs>
|
|
|
|
<view
|
|
style="{{ customStyle }}"
|
|
class="{{classPrefix}} {{classPrefix}}--{{theme}} {{classPrefix}}--{{size}} {{prefix}}-class "
|
|
aria-role="option"
|
|
>
|
|
<slot wx:if="{{content !== 'default'}}" />
|
|
<block wx:elif="{{theme == 'default'}}">{{formattedTime}}</block>
|
|
<block wx:else>
|
|
<block wx:for="{{timeRange}}" wx:key="index">
|
|
<text class="{{classPrefix}}__item {{prefix}}-class-count">{{_.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>
|