index.wxml 584 Bytes
Newer Older
李嘉林 committed
1 2 3 4 5 6 7 8 9 10
<wxs src="../wxs/utils.wxs" module="utils" />

<view
  class="{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class"
  hover-class="van-sidebar-item--hover"
  hover-stay-time="70"
  bind:tap="onClick"
>
  <view class="van-sidebar-item__text">
    <van-info
程默 committed
11
      wx:if="{{ badge != null || info !== null || dot }}"
李嘉林 committed
12
      dot="{{ dot }}"
程默 committed
13
      info="{{ badge != null ? badge : info }}"
李嘉林 committed
14
    />
程默 committed
15 16
    <view wx:if="{{ title }}">{{ title }}</view>
    <slot wx:else name="title" />
李嘉林 committed
17 18
  </view>
</view>