index.wxml 788 B

12345678910111213141516171819202122
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <view class="{{ utils.bem('grid-item', { square }) }}" style="{{ style }}" bindtap="onClick">
  3. <view
  4. class="{{ utils.bem('grid-item__content', { center, square, clickable, surround: border && gutter }) }} {{ border ? 'van-hairline--surround' : '' }}"
  5. style="{{ contentStyle }}"
  6. >
  7. <block wx:if="{{ useSlot }}">
  8. <slot />
  9. </block>
  10. <block wx:else>
  11. <view class="van-grid-item__icon">
  12. <van-icon wx:if="{{ icon }}" name="{{ icon }}" dot="{{ dot }}" info="{{ info }}" />
  13. <slot wx:else name="icon"></slot>
  14. </view>
  15. <view class="van-grid-item__text">
  16. <text wx:if="{{ text }}">{{ text }}</text>
  17. <slot wx:else name="text"></slot>
  18. </view>
  19. </block>
  20. </view>
  21. </view>