drawer.wxml 779 B

1234567891011121314151617181920212223242526
  1. <t-popup
  2. bind:visible-change="visibleChange"
  3. visible="{{visible}}"
  4. zIndex="{{zIndex}}"
  5. placement="{{placement == 'right' ? 'right' : 'left'}}"
  6. showOverlay="{{showOverlay}}"
  7. destroyOnClose="{{destroyOnClose}}"
  8. closeOnOverlayClick="{{closeOnOverlayClick}}"
  9. >
  10. <view class="{{classPrefix}}__sidebar">
  11. <view
  12. class="{{classPrefix}}__sidebar-item"
  13. wx:for="{{items}}"
  14. wx:item="item"
  15. wx:key="index"
  16. data-item="{{item}}"
  17. data-index="{{index}}"
  18. bindtap="itemClick"
  19. >
  20. <view wx:if="{{item.icon}}" class="{{classPrefix}}__sidebar-item-icon">
  21. <t-icon name="{{item.icon}}" size="24px" />
  22. </view>
  23. <view class="{{classPrefix}}__sidebar-item-title"> {{item.title}} </view>
  24. </view>
  25. </view>
  26. </t-popup>