index.axml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <view class='page-container-classname' ref='saveChildRef0'>
  2. <demo-block title='基础用法' ref='saveChildRef1'>
  3. <van-count-down time='{{ time }}' ref='saveChildRef2'>
  4. </van-count-down>
  5. </demo-block>
  6. <demo-block title='自定义格式' ref='saveChildRef3'>
  7. <van-count-down time='{{ time }}' format='DD 天 HH 时 mm 分 ss 秒' ref='saveChildRef4'>
  8. </van-count-down>
  9. </demo-block>
  10. <demo-block title='毫秒级渲染' ref='saveChildRef5'>
  11. <van-count-down millisecond=" " time='{{ time }}' format='HH:mm:ss:SSS' ref='saveChildRef6'>
  12. </van-count-down>
  13. </demo-block>
  14. <demo-block title='自定义样式' ref='saveChildRef7'>
  15. <van-count-down use-slot=" " time='{{ time }}' onChange='onChange' ref='saveChildRef8'>
  16. <text class='item'>
  17. {{ timeData.hours }} </text> <text class='item'>
  18. {{ timeData.minutes }} </text> <text class='item'>
  19. {{ timeData.seconds }} </text>
  20. </van-count-down>
  21. </demo-block> <demo-block title='手动控制' ref='saveChildRef9'>
  22. <van-count-down class='control-count-down' millisecond=" " time='{{ 3000 }}' auto-start='{{ false }}' format='ss:SSS' onFinish='finished' ref='saveChildRef10'>
  23. </van-count-down>
  24. <van-grid clickable=" " column-num='3' ref='saveChildRef11'>
  25. <van-grid-item text='开始' icon='play-circle-o' onClick='start' ref='saveChildRef12'>
  26. </van-grid-item>
  27. <van-grid-item text='暂停' icon='pause-circle-o' onClick='pause' ref='saveChildRef13'>
  28. </van-grid-item>
  29. <van-grid-item text='重置' icon='replay' onClick='reset' ref='saveChildRef14'>
  30. </van-grid-item>
  31. </van-grid>
  32. </demo-block>
  33. <van-toast id='van-toast' ref='saveChildRef15'>
  34. </van-toast>
  35. </view>