side-bar-item.wxml 541 B

1234567891011121314
  1. <import src="../common/template/badge" />
  2. <wxs src="../common/utils.wxs" module="_" />
  3. <view class="{{_.cls(classPrefix, [['active', active], ['disabled', disabled]])}}" bind:tap="handleClick">
  4. <block wx:if="{{active}}">
  5. <view class="{{classPrefix}}__line"></view>
  6. <view class="{{classPrefix}}__prefix"></view>
  7. <view class="{{classPrefix}}__suffix"></view>
  8. </block>
  9. <block wx:if="{{badgeProps}}">
  10. <template is="badge" data="{{ ...badgeProps, content: label }}" />
  11. </block>
  12. <block wx:else>{{label}}</block>
  13. </view>