Blame view

src/ui/vant-weapp/tabbar-item/index.wxml 696 Bytes
simon committed
1 2 3 4
<wxs src="../wxs/utils.wxs" module="utils" />

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