index.wxml 711B

1234567891011121314151617181920212223242526272829
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <view
  3. class="{{ utils.bem('tabbar-item', { active }) }} custom-class"
  4. style="color: {{ active ? activeColor : inactiveColor }}"
  5. bindtap="onClick"
  6. >
  7. <view class="van-tabbar-item__icon">
  8. <van-icon
  9. wx:if="{{ icon }}"
  10. name="{{ icon }}"
  11. class-prefix="{{ iconPrefix }}"
  12. custom-class="van-tabbar-item__icon__inner"
  13. />
  14. <block wx:else>
  15. <slot wx:if="{{ active }}" name="icon-active" />
  16. <slot wx:else name="icon" />
  17. </block>
  18. <van-info
  19. dot="{{ dot }}"
  20. info="{{ info }}"
  21. custom-class="van-tabbar-item__info"
  22. />
  23. </view>
  24. <view class="van-tabbar-item__text">
  25. <slot />
  26. </view>
  27. </view>