index.wxml 696 B

123456789101112131415161718192021222324252627282930
  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. bind:tap="onClick"
  6. >
  7. <view class="van-tabbar-item__icon">
  8. <van-icon
  9. wx:if="{{ icon }}"
  10. name="{{ icon }}"
  11. custom-class="van-tabbar-item__icon__inner"
  12. />
  13. <block wx:else>
  14. <slot
  15. wx:if="{{ active }}"
  16. name="icon-active"
  17. />
  18. <slot wx:else name="icon" />
  19. </block>
  20. <van-info
  21. dot="{{ dot }}"
  22. info="{{ info }}"
  23. custom-class="van-tabbar-item__info"
  24. />
  25. </view>
  26. <view class="van-tabbar-item__text">
  27. <slot />
  28. </view>
  29. </view>