index.wxml 711 Bytes
Newer Older
李嘉林 committed
1 2 3 4 5
<wxs src="../wxs/utils.wxs" module="utils" />

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