index.axml 1.2 KB

12345678910111213141516171819202122232425
  1. <view class='grid-item-index {{className}}' style='{{style}}' ref='saveChildRef0'>
  2. <import-sjs from='../wxs/utils.sjs' name='utils'>
  3. </import-sjs>
  4. <view class="{{customClass}} {{ utils.bem('grid-item', { square }) }}" style='{{ viewStyle }}' onTap='antmoveAction' data-antmove-tap='onClick'>
  5. <view class="{{contentClass}} {{ utils.bem('grid-item__content', [direction, { center, square, clickable, surround: border && gutter }]) }} {{ border ? 'van-hairline--surround' : '' }}" style='{{ contentStyle }}'>
  6. <block a:if='{{ useSlot }}'>
  7. <slot>
  8. </slot>
  9. </block>
  10. <block a:else >
  11. <view class='van-grid-item__icon {{iconClass}}'>
  12. <van-icon a:if='{{ icon }}' name='{{ icon }}' color='{{ iconColor }}' dot='{{ dot }}' info='{{ badge || info }}' size='{{ iconSize }}' ref='saveChildRef1'>
  13. </van-icon>
  14. <slot a:else name='icon'>
  15. </slot>
  16. </view>
  17. <view class='van-grid-item__text {{textClass}}'>
  18. <text a:if='{{ text }}'>
  19. {{ text }} </text> <slot a:else name='text'>
  20. </slot>
  21. </view>
  22. </block>
  23. </view>
  24. </view>
  25. </view>