project init & fix ui

This commit is contained in:
2023-01-06 14:24:11 +08:00
parent abc4f65a8e
commit ac9b479805
866 changed files with 39916 additions and 53 deletions

View File

@@ -0,0 +1,31 @@
<wxs src="../common/utils.wxs" module="_" />
<view
style="{{ customStyle }}"
class="{{ prefix }}-class {{classPrefix}}"
bind:tap="handleSwitch"
aria-checked="{{checked}}"
aria-disabled="{{disabled}}"
aria-role="switch"
>
<view
class="{{_.cls(classPrefix + '__body', [['checked', checked], ['disabled', disabled], size])}} {{prefix}}-class-body"
>
<view
class="{{_.cls(classPrefix + '__dot', [['checked', checked], ['plain', label.length != 2 && icon.length != 2 && !loading], size])}} {{prefix}}-class-dot"
aria-hidden="{{true}}"
>
<view
wx:if="{{label}}"
class="{{_.cls(classPrefix + '__label', [['checked', checked], size])}} {{prefix}}-class-label"
>
<t-loading wx:if="{{loading}}" inherit-color size="32rpx" class="{{classPrefix}}__loading" />
<text wx:elif="{{label.length == 2}}">{{checked ? label[1] : label[0]}}</text>
<t-icon
wx:elif="{{icon.length == 2}}"
name="{{checked ? icon[1] : icon[0]}}"
class="{{_.cls(classPrefix + '__icon', [['checked', checked], size])}}"
/>
</view>
</view>
</view>
</view>