index.axml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <import-sjs
  2. from="./index.sjs"
  3. name="sjs" />
  4. <view
  5. a:if="{{ mode === 'default' }}"
  6. class="ant-grid ant-grid-columns-{{ columns }} ant-grid-{{ mode }} {{ className || '' }}"
  7. style="{{ style || '' }}">
  8. <block
  9. a:for="{{ items }}"
  10. a:for-index="index"
  11. a:for-item="item">
  12. <view
  13. data-item="{{ item }}"
  14. class="ant-grid-item ant-grid-item-{{ gridItemLayout }} {{ sjs.checkNeedVerticalSpace(items.length, index, columns) ? 'ant-grid-item-vertical-space' : '' }} ant-grid-item-columns-{{ columns }} {{ sjs.checkShowSplitLine(index, items.length, columns, mode, showDivider) ? 'ant-grid-item-line' : '' }}"
  15. onTap="onTap"
  16. onFirstAppear="onFirstAppear">
  17. <view
  18. class="ant-grid-item-icon ant-grid-item-icon-{{ item.iconStyle || iconStyle }}">
  19. <slot
  20. name="icon"
  21. value="{{ item }}"
  22. index="{{ index }}">
  23. <image-icon
  24. image="{{ item.icon }}"
  25. className="ant-grid-item-icon"
  26. style="{{ iconSize ? 'width:' + iconSize + 'px;height:' + iconSize + 'px;font-size:' + iconSize + 'px' : '' }}" />
  27. </slot>
  28. </view>
  29. <view class="ant-grid-item-title">
  30. <slot
  31. name="title"
  32. value="{{ item }}"
  33. index="{{ index }}">
  34. {{ item.title }}
  35. </slot>
  36. </view>
  37. <view class="ant-grid-item-description">
  38. <slot
  39. name="description"
  40. value="{{ item }}"
  41. index="{{ index }}">
  42. {{ item.description }}
  43. </slot>
  44. </view>
  45. </view>
  46. </block>
  47. </view>
  48. <ant-pagination
  49. a:elif="{{ mode === 'scroll' }}"
  50. fillColor="{{ paginationFillColor }}"
  51. frontColor="{{ paginationFrontColor }}"
  52. className="{{ className || '' }}"
  53. style="{{ style || '' }}">
  54. <view class="ant-grid ant-grid-{{ mode }}">
  55. <block
  56. a:for="{{ items }}"
  57. a:for-index="index"
  58. a:for-item="item">
  59. <view
  60. data-item="{{ item }}"
  61. class="ant-grid-item ant-grid-item-{{ gridItemLayout }} ant-grid-item-columns-scroll {{ sjs.checkShowSplitLine(index, items.length, columns, mode, showDivider) ? 'ant-grid-item-line' : '' }}"
  62. onTap="onTap"
  63. onFirstAppear="onFirstAppear">
  64. <view
  65. class="ant-grid-item-icon ant-grid-item-icon-{{ item.iconStyle || iconStyle }}">
  66. <slot
  67. name="icon"
  68. value="{{ item }}"
  69. index="{{ index }}">
  70. <image-icon
  71. image="{{ item.icon }}"
  72. className="ant-grid-item-icon"
  73. style="{{ iconSize ? 'width:' + iconSize + 'px;height:' + iconSize + 'px;font-size:' + iconSize + 'px' : '' }}" />
  74. </slot>
  75. </view>
  76. <view class="ant-grid-item-title">
  77. <slot
  78. name="title"
  79. value="{{ item }}"
  80. index="{{ index }}">
  81. {{ item.title }}
  82. </slot>
  83. </view>
  84. <view class="ant-grid-item-description">
  85. <slot
  86. name="description"
  87. value="{{ item }}"
  88. index="{{ index }}">
  89. {{ item.description }}
  90. </slot>
  91. </view>
  92. </view>
  93. </block>
  94. </view>
  95. </ant-pagination>