index.axml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <view class='page-container-classname' ref='saveChildRef0'>
  2. <demo-block title='基本用法' ref='saveChildRef1'>
  3. <van-grid ref='saveChildRef2'>
  4. <van-grid-item icon='photo-o' text='文字' a:for='{{ array4 }}' a:key='{{*this}}' ref-numbers='{{ array4 }}' ref='saveChildRef3'>
  5. </van-grid-item>
  6. </van-grid>
  7. </demo-block>
  8. <demo-block title='自定义列数' ref='saveChildRef4'>
  9. <van-grid column-num='3' ref='saveChildRef5'>
  10. <van-grid-item icon='photo-o' text='文字' a:for='{{ array6 }}' a:key='{{*this}}' ref-numbers='{{ array6 }}' ref='saveChildRef6'>
  11. </van-grid-item>
  12. </van-grid>
  13. </demo-block>
  14. <demo-block title='自定义内容' ref='saveChildRef7'>
  15. <van-grid column-num='3' border='{{ false }}' ref='saveChildRef8'>
  16. <van-grid-item use-slot=" " a:for='{{ array3 }}' a:for-item='item' a:key='{{*this}}' ref-numbers='{{ array3 }}' ref='saveChildRef9'>
  17. <image style='width: 100%; height: 90px;' src='https://img.yzcdn.cn/vant/apple-{{ item + 1 }}.jpg'>
  18. </image>
  19. </van-grid-item>
  20. </van-grid>
  21. </demo-block>
  22. <demo-block title='正方形格子' ref='saveChildRef10'>
  23. <van-grid square=" " ref='saveChildRef11'>
  24. <van-grid-item icon='photo-o' text='文字' a:for='{{ array8 }}' a:key='{{*this}}' ref-numbers='{{ array8 }}' ref='saveChildRef12'>
  25. </van-grid-item>
  26. </van-grid>
  27. </demo-block>
  28. <demo-block title='格子间距' ref='saveChildRef13'>
  29. <van-grid gutter='{{ 10 }}' ref='saveChildRef14'>
  30. <van-grid-item icon='photo-o' text='文字' a:for='{{ array8 }}' a:key='{{*this}}' ref-numbers='{{ array8 }}' ref='saveChildRef15'>
  31. </van-grid-item>
  32. </van-grid>
  33. </demo-block>
  34. <demo-block title='内容横排' ref='saveChildRef16'>
  35. <van-grid direction='horizontal' column-num='3' ref='saveChildRef17'>
  36. <van-grid-item icon='photo-o' text='文字' a:for='{{ array3 }}' a:key='{{*this}}' ref-numbers='{{ array3 }}' ref='saveChildRef18'>
  37. </van-grid-item>
  38. </van-grid>
  39. </demo-block>
  40. <demo-block title='页面跳转' ref='saveChildRef19'>
  41. <van-grid clickable=" " column-num='2' ref='saveChildRef20'>
  42. <van-grid-item icon='home-o' link-type='navigateTo' url='/pages/dashboard/index' text='Navigate 跳转' ref='saveChildRef21'>
  43. </van-grid-item>
  44. <van-grid-item icon='search' link-type='reLaunch' url='/pages/dashboard/index' text='ReLaunch 跳转' ref='saveChildRef22'>
  45. </van-grid-item>
  46. </van-grid>
  47. </demo-block>
  48. <demo-block title='徽标提示' ref='saveChildRef23'>
  49. <van-grid column-num='2' ref='saveChildRef24'>
  50. <van-grid-item icon='home-o' text='文字' dot=" " ref='saveChildRef25'>
  51. </van-grid-item>
  52. <van-grid-item icon='search' text='文字' badge='99+' ref='saveChildRef26'>
  53. </van-grid-item>
  54. </van-grid>
  55. </demo-block>
  56. </view>