index.axml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <view class='page-container-classname' ref='saveChildRef0'>
  2. <demo-block title='基础用法' ref='saveChildRef1'>
  3. <van-collapse value='{{ active1 }}' data-key='active1' onChange='onChange' ref='saveChildRef2'>
  4. <van-collapse-item title='{{ title1 }}' ref='saveChildRef3'>
  5. {{ content1 }}
  6. </van-collapse-item>
  7. <van-collapse-item title='{{ title2 }}' ref='saveChildRef4'>
  8. {{ content2 }}
  9. </van-collapse-item>
  10. <van-collapse-item title='{{ title3 }}' disabled=" " ref='saveChildRef5'>
  11. {{ content3 }}
  12. </van-collapse-item>
  13. </van-collapse>
  14. </demo-block>
  15. <demo-block title='手风琴' ref='saveChildRef6'>
  16. <van-collapse value='{{ active2 }}' data-key='active2' accordion=" " onChange='onChange' ref='saveChildRef7'>
  17. <van-collapse-item title='{{ title1 }}' ref='saveChildRef8'>
  18. {{ content1 }}
  19. </van-collapse-item>
  20. <van-collapse-item title='{{ title2 }}' ref='saveChildRef9'>
  21. {{ content2 }}
  22. </van-collapse-item>
  23. <van-collapse-item title='{{ title3 }}' ref='saveChildRef10'>
  24. {{ content3 }}
  25. </van-collapse-item>
  26. </van-collapse>
  27. </demo-block>
  28. <demo-block title='事件监听' ref='saveChildRef11'>
  29. <van-collapse value='{{ active3 }}' data-key='active3' onChange='onChange' onOpen='onOpen' onClose='onClose' ref='saveChildRef12'>
  30. <van-collapse-item title='{{ title1 }}' ref='saveChildRef13'>
  31. {{ content1 }}
  32. </van-collapse-item>
  33. <van-collapse-item title='{{ title2 }}' ref='saveChildRef14'>
  34. {{ content2 }}
  35. </van-collapse-item>
  36. <van-collapse-item title='{{ title3 }}' ref='saveChildRef15'>
  37. {{ content3 }}
  38. </van-collapse-item>
  39. </van-collapse>
  40. </demo-block>
  41. <demo-block title='自定义标题内容' ref='saveChildRef16'>
  42. <van-collapse value='{{ active4 }}' data-key='active4' onChange='onChange' ref='saveChildRef17'>
  43. <van-collapse-item ref='saveChildRef18'>
  44. <view slot='title'>
  45. {{ title1 }} <van-icon name='question-o' class='van-icon-question' ref='saveChildRef19'>
  46. </van-icon>
  47. </view>
  48. {{ content1 }}
  49. </van-collapse-item>
  50. <van-collapse-item title='{{ title2 }}' value='内容' icon='shop-o' ref='saveChildRef20'>
  51. {{ content2 }}
  52. </van-collapse-item>
  53. </van-collapse>
  54. </demo-block>
  55. <van-toast id='van-toast' ref='saveChildRef21'>
  56. </van-toast>
  57. </view>