index.axml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <view class='page-container-classname' ref='saveChildRef0'>
  2. <demo-block title='基础用法' ref='saveChildRef1'>
  3. <van-tabbar active='{{ active }}' data-key='active' custom-class='tabbar-position' safe-area-inset-bottom='{{ false }}' onChange='onChange' ref='saveChildRef2'>
  4. <van-tabbar-item icon='home-o' ref='saveChildRef3'>
  5. 标签
  6. </van-tabbar-item>
  7. <van-tabbar-item icon='search' ref='saveChildRef4'>
  8. 标签
  9. </van-tabbar-item>
  10. <van-tabbar-item icon='friends-o' ref='saveChildRef5'>
  11. 标签
  12. </van-tabbar-item>
  13. <van-tabbar-item icon='setting-o' ref='saveChildRef6'>
  14. 标签
  15. </van-tabbar-item>
  16. </van-tabbar>
  17. </demo-block>
  18. <demo-block title='通过名称匹配' ref='saveChildRef7'>
  19. <van-tabbar active='{{ active2 }}' data-key='active2' custom-class='tabbar-position' safe-area-inset-bottom='{{ false }}' onChange='onChange' ref='saveChildRef8'>
  20. <van-tabbar-item name='home' icon='home-o' ref='saveChildRef9'>
  21. 标签
  22. </van-tabbar-item>
  23. <van-tabbar-item name='search' icon='search' ref='saveChildRef10'>
  24. 标签
  25. </van-tabbar-item>
  26. <van-tabbar-item name='friends' icon='friends-o' ref='saveChildRef11'>
  27. 标签
  28. </van-tabbar-item>
  29. <van-tabbar-item name='setting' icon='setting-o' ref='saveChildRef12'>
  30. 标签
  31. </van-tabbar-item>
  32. </van-tabbar>
  33. </demo-block>
  34. <demo-block title='显示徽标' ref='saveChildRef13'>
  35. <van-tabbar active='{{ active3 }}' data-key='active3' custom-class='tabbar-position' safe-area-inset-bottom='{{ false }}' onChange='onChange' ref='saveChildRef14'>
  36. <van-tabbar-item icon='home-o' ref='saveChildRef15'>
  37. 标签
  38. </van-tabbar-item>
  39. <van-tabbar-item icon='search' dot=" " ref='saveChildRef16'>
  40. 标签
  41. </van-tabbar-item>
  42. <van-tabbar-item icon='friends-o' info='5' ref='saveChildRef17'>
  43. 标签
  44. </van-tabbar-item>
  45. <van-tabbar-item icon='setting-o' info='20' ref='saveChildRef18'>
  46. 标签
  47. </van-tabbar-item>
  48. </van-tabbar>
  49. </demo-block>
  50. <demo-block title='自定义图标' ref='saveChildRef19'>
  51. <van-tabbar active='{{ active4 }}' data-key='active4' custom-class='tabbar-position' safe-area-inset-bottom='{{ false }}' onChange='onChange' ref='saveChildRef20'>
  52. <van-tabbar-item info='3' ref='saveChildRef21'>
  53. <image slot='icon' src='{{ icon.normal }}' mode='aspectFit' style='width: 30px; height: 18px;'>
  54. </image>
  55. <image slot='icon-active' src='{{ icon.active }}' mode='aspectFit' style='width: 30px; height: 18px;'>
  56. </image>
  57. 自定义
  58. </van-tabbar-item>
  59. <van-tabbar-item icon='search' ref='saveChildRef22'>
  60. 标签
  61. </van-tabbar-item>
  62. <van-tabbar-item icon='setting-o' ref='saveChildRef23'>
  63. 标签
  64. </van-tabbar-item>
  65. </van-tabbar>
  66. </demo-block>
  67. <demo-block title='自定义颜色' ref='saveChildRef24'>
  68. <van-tabbar active='{{ active5 }}' data-key='active5' custom-class='tabbar-position' active-color='#07c160' inactive-color='#000' safe-area-inset-bottom='{{ false }}' onChange='onChange' ref='saveChildRef25'>
  69. <van-tabbar-item icon='home-o' ref='saveChildRef26'>
  70. 标签
  71. </van-tabbar-item>
  72. <van-tabbar-item icon='search' ref='saveChildRef27'>
  73. 标签
  74. </van-tabbar-item>
  75. <van-tabbar-item icon='friends-o' ref='saveChildRef28'>
  76. 标签
  77. </van-tabbar-item>
  78. <van-tabbar-item icon='setting-o' ref='saveChildRef29'>
  79. 标签
  80. </van-tabbar-item>
  81. </van-tabbar>
  82. </demo-block>
  83. <demo-block title='切换标签事件' ref='saveChildRef30'>
  84. <van-tabbar active='{{ active6 }}' data-key='active6' custom-class='tabbar-position' safe-area-inset-bottom='{{ false }}' onChange='handleChange' ref='saveChildRef31'>
  85. <van-tabbar-item icon='home-o' ref='saveChildRef32'>
  86. 标签1
  87. </van-tabbar-item>
  88. <van-tabbar-item icon='search' ref='saveChildRef33'>
  89. 标签2
  90. </van-tabbar-item>
  91. <van-tabbar-item icon='friends-o' ref='saveChildRef34'>
  92. 标签3
  93. </van-tabbar-item>
  94. <van-tabbar-item icon='setting-o' ref='saveChildRef35'>
  95. 标签4
  96. </van-tabbar-item>
  97. </van-tabbar>
  98. </demo-block>
  99. </view>