index.axml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <view class='page-container-classname' ref='saveChildRef0'>
  2. <demo-block custom-class='white' title='基础用法' ref='saveChildRef1'>
  3. <van-dropdown-menu ref='saveChildRef2'>
  4. <van-dropdown-item value='{{ value1 }}' options='{{ option1 }}' ref='saveChildRef3'>
  5. </van-dropdown-item>
  6. <van-dropdown-item value='{{ value2 }}' options='{{ option2 }}' ref='saveChildRef4'>
  7. </van-dropdown-item>
  8. </van-dropdown-menu>
  9. </demo-block>
  10. <demo-block custom-class='white' title='自定义菜单内容' ref='saveChildRef5'>
  11. <van-dropdown-menu ref='saveChildRef6'>
  12. <van-dropdown-item value='{{ value1 }}' options='{{ option1 }}' ref='saveChildRef7'>
  13. </van-dropdown-item>
  14. <van-dropdown-item id='item' title='{{ itemTitle }}' ref='saveChildRef8'>
  15. <van-cell title='{{ switchTitle1 }}' ref='saveChildRef9'>
  16. <van-switch slot='right-icon' size='24px' style='height: 26px' checked='{{ switch1 }}' active-color='#ee0a24' onChange='onSwitch1Change' ref='saveChildRef10'>
  17. </van-switch>
  18. </van-cell>
  19. <van-cell title='{{ switchTitle2 }}' ref='saveChildRef11'>
  20. <van-switch slot='right-icon' size='24px' style='height: 26px' checked='{{ switch2 }}' active-color='#ee0a24' onChange='onSwitch2Change' ref='saveChildRef12'>
  21. </van-switch>
  22. </van-cell>
  23. <view style='padding: 5px 16px;'>
  24. <van-button type='danger' block=" " round=" " onClick='onConfirm' ref='saveChildRef13'>
  25. 确认
  26. </van-button>
  27. </view>
  28. </van-dropdown-item>
  29. </van-dropdown-menu>
  30. </demo-block>
  31. <demo-block custom-class='white' title='自定义选中状态颜色' ref='saveChildRef14'>
  32. <van-dropdown-menu active-color='#1989fa' ref='saveChildRef15'>
  33. <van-dropdown-item value='{{ value1 }}' options='{{ option1 }}' ref='saveChildRef16'>
  34. </van-dropdown-item>
  35. <van-dropdown-item value='{{ value2 }}' options='{{ option2 }}' ref='saveChildRef17'>
  36. </van-dropdown-item>
  37. </van-dropdown-menu>
  38. </demo-block>
  39. <demo-block custom-class='white' title='向上展开' ref='saveChildRef18'>
  40. <van-dropdown-menu direction='up' ref='saveChildRef19'>
  41. <van-dropdown-item value='{{ value1 }}' options='{{ option1 }}' ref='saveChildRef20'>
  42. </van-dropdown-item>
  43. <van-dropdown-item value='{{ value2 }}' options='{{ option2 }}' ref='saveChildRef21'>
  44. </van-dropdown-item>
  45. </van-dropdown-menu>
  46. </demo-block>
  47. <demo-block custom-class='white' title='禁用菜单' ref='saveChildRef22'>
  48. <van-dropdown-menu ref='saveChildRef23'>
  49. <van-dropdown-item value='{{ value1 }}' disabled=" " options='{{ option1 }}' ref='saveChildRef24'>
  50. </van-dropdown-item>
  51. <van-dropdown-item value='{{ value2 }}' disabled=" " options='{{ option2 }}' ref='saveChildRef25'>
  52. </van-dropdown-item>
  53. </van-dropdown-menu>
  54. </demo-block>
  55. </view>