index.axml 1.3 KB

12345678910111213141516171819202122232425262728
  1. <view class='page-container-classname' ref='saveChildRef0'>
  2. <demo-block title='基础用法' padding=" " ref='saveChildRef1'>
  3. <van-switch checked='{{ checked }}' onChange='onChange' ref='saveChildRef2'>
  4. </van-switch>
  5. </demo-block>
  6. <demo-block title='禁用状态' padding=" " ref='saveChildRef3'>
  7. <van-switch checked='{{ checked }}' disabled=" " onChange='onChange' ref='saveChildRef4'>
  8. </van-switch>
  9. </demo-block>
  10. <demo-block title='加载状态' padding=" " ref='saveChildRef5'>
  11. <van-switch checked='{{ checked }}' loading=" " onChange='onChange' ref='saveChildRef6'>
  12. </van-switch>
  13. </demo-block>
  14. <demo-block title='自定义大小' padding=" " ref='saveChildRef7'>
  15. <van-switch checked='{{ checked }}' size='24px' onChange='onChange' ref='saveChildRef8'>
  16. </van-switch>
  17. </demo-block>
  18. <demo-block title='自定义颜色' padding=" " ref='saveChildRef9'>
  19. <van-switch checked='{{ checked }}' active-color='#07c160' inactive-color='#ee0a24' onChange='onChange' ref='saveChildRef10'>
  20. </van-switch>
  21. </demo-block>
  22. <demo-block title='异步控制' padding=" " ref='saveChildRef11'>
  23. <van-switch checked='{{ checked2 }}' size='36px' onChange='onChange2' ref='saveChildRef12'>
  24. </van-switch>
  25. </demo-block>
  26. <van-dialog id='van-dialog' ref='saveChildRef13'>
  27. </van-dialog>
  28. </view>