index.wxml 533 B

12345678910111213141516
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <wxs src="./index.wxs" module="computed" />
  3. <view
  4. class="{{ utils.bem('switch', { on: checked === activeValue, disabled }) }} custom-class"
  5. style="{{ computed.rootStyle({ size, checked, activeColor, inactiveColor }) }}"
  6. bind:tap="onClick"
  7. >
  8. <view class="van-switch__node node-class">
  9. <van-loading
  10. wx:if="{{ loading }}"
  11. color="{{ computed.loadingColor({ checked, activeColor, inactiveColor }) }}"
  12. custom-class="van-switch__loading"
  13. />
  14. </view>
  15. </view>