index.wxml 584 B

123456789101112131415161718
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <view
  3. class="{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class"
  4. hover-class="van-sidebar-item--hover"
  5. hover-stay-time="70"
  6. bind:tap="onClick"
  7. >
  8. <view class="van-sidebar-item__text">
  9. <van-info
  10. wx:if="{{ badge != null || info !== null || dot }}"
  11. dot="{{ dot }}"
  12. info="{{ badge != null ? badge : info }}"
  13. />
  14. <view wx:if="{{ title }}">{{ title }}</view>
  15. <slot wx:else name="title" />
  16. </view>
  17. </view>