Sanakey
2020-08-13 d98d05000c3d14e1f12a7754ebeea11ec1fa0f0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<wxs src="../wxs/utils.wxs" module="utils" />
 
<view
  class="{{ utils.bem('tabbar-item', { active }) }} custom-class"
  style="color: {{ active ? activeColor : inactiveColor }}"
  bind:tap="onClick"
>
  <view class="van-tabbar-item__icon">
    <van-icon
      wx:if="{{ icon }}"
      name="{{ icon }}"
      custom-class="van-tabbar-item__icon__inner"
    />
    <block wx:else>
      <slot
        wx:if="{{ active }}"
        name="icon-active"
      />
      <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>