index.axml 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. <van-tabs active='{{ activeTab }}' ref='saveChildRef1' onChange='onChange'>
  2. <van-tab title='基础用法' ref='saveChildRef2'>
  3. <van-index-bar a:if='{{ activeTab === 0 }}' scroll-top='{{ scrollTop }}' ref='saveChildRef3'>
  4. <view a:for='{{ indexList }}' a:for-item='item' a:key='{{item}}' ref-numbers='{{ indexList }}'>
  5. <van-index-anchor index='{{ item }}' ref='saveChildRef4'>
  6. </van-index-anchor>
  7. <van-cell title='文本' ref='saveChildRef5'>
  8. </van-cell>
  9. <van-cell title='文本' ref='saveChildRef6'>
  10. </van-cell>
  11. <van-cell title='文本' ref='saveChildRef7'>
  12. </van-cell>
  13. </view>
  14. </van-index-bar>
  15. </van-tab>
  16. <van-tab title='自定义索引列表' ref='saveChildRef8'>
  17. <van-index-bar a:if='{{ activeTab === 1 }}' index-list='{{ customIndexList }}' scroll-top='{{ scrollTop }}' ref='saveChildRef9'>
  18. <view a:for='{{ customIndexList }}' a:key='{{index}}' ref-numbers='{{ customIndexList }}'>
  19. <van-index-anchor use-slot=" " index='{{ item }}' ref='saveChildRef10'>
  20. <text>
  21. 标题{{ item }} </text>
  22. </van-index-anchor> <van-cell title='文本' ref='saveChildRef11'>
  23. </van-cell>
  24. <van-cell title='文本' ref='saveChildRef12'>
  25. </van-cell>
  26. <van-cell title='文本' ref='saveChildRef13'>
  27. </van-cell>
  28. </view>
  29. </van-index-bar>
  30. </van-tab>
  31. </van-tabs>