index.wxml 467B

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