index.wxml 702 B

12345678910111213141516171819202122232425262728
  1. <view
  2. class="van-tabbar-item custom-class {{ active ? 'van-tabbar-item--active' : '' }}"
  3. style="{{ active && color ? 'color: ' + color : '' }}"
  4. bind:tap="onClick"
  5. >
  6. <view class="van-tabbar-item__icon {{ dot ? 'van-tabbar-item__icon--dot' : '' }}">
  7. <van-icon
  8. wx:if="{{ icon }}"
  9. name="{{ icon }}"
  10. customStyle="display: block"
  11. />
  12. <block wx:else>
  13. <slot
  14. wx:if="{{ active }}"
  15. name="icon-active"
  16. />
  17. <slot wx:else name="icon" />
  18. </block>
  19. <van-info
  20. wx:if="{{ info !== null }}"
  21. info="{{ info }}"
  22. custom-style="margin-top: 2px"
  23. />
  24. </view>
  25. <view class="van-tabbar-item__text">
  26. <slot />
  27. </view>
  28. </view>