This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop-wechat/components/switch/index.wxml
2020-04-25 22:59:04 +08:00

12 lines
467 B
Plaintext

<wxs src="../wxs/utils.wxs" module="utils" />
<view
class="custom-class {{ utils.bem('switch', { on: value === activeValue, disabled }) }}"
style="font-size: {{ size }}; {{ (checked ? activeColor : inactiveColor) ? 'background-color: ' + (checked ? activeColor : inactiveColor ) : '' }}"
bind:tap="onClick"
>
<view class="van-switch__node node-class">
<van-loading wx:if="{{ loading }}" size="50%" custom-class="van-switch__loading" />
</view>
</view>