index.wxml 515 B

123456789101112131415
  1. <template name="zan-switch">
  2. <view
  3. class="zan-switch zan-switch--{{ checked ? 'on' : 'off' }} {{ disabled ? 'zan-swtich--disabled' : '' }}"
  4. data-checked="{{ checked }}"
  5. data-loading="{{ loading }}"
  6. data-disabled="{{ disabled }}"
  7. data-component-id="{{ componentId }}"
  8. bindtap="_handleZanSwitchChange"
  9. >
  10. <view class="zan-switch__circle">
  11. <view hidden="{{ !loading }}" class="zan-switch__loading"></view>
  12. </view>
  13. <view class="zan-switch__bg"></view>
  14. </view>
  15. </template>