You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.1 KiB

1 year ago
  1. <!--pages/common/comTree/index.wxml-->
  2. <view wx:for="{{tree}}" wx:key="index" class="tree">
  3. <view class="tree-item tree-item-select">
  4. <view class="tree-item-onOff" wx:if="{{item.children && item.children.length > 0}}" bindtap="isOpen" data-index="{{index}}">
  5. <image src="/static/u1490.svg" class="{{item.open ? 'tree-item-onOff-open' : 'tree-item-onOff-closed'}}"></image>
  6. </view>
  7. <view class="tree-item-onOff" wx:else>
  8. </view>
  9. <view class="tree-item-name {{selectKey == item.id ? 'tree-item-name-select' : '' }}" bindtap="select" data-item="{{item}}" data-index="{{index}}">
  10. <view class="name">{{item.name}}</view>
  11. <view class="img">
  12. <!-- <image wx:if="{{selectKey == item.id }}" src="/assets/icon/u435.svg"></image> -->
  13. </view>
  14. </view>
  15. </view>
  16. <c-tree
  17. wx:if="{{item.children && item.children.length > 0 && item.open }}"
  18. dataTree='{{ item.children }}'
  19. selectKey="{{selectKey}}"
  20. isSelectLastNode="{{isSelectLastNode}}"
  21. isOpenAll="{{isOpenAll}}"
  22. >
  23. </c-tree>
  24. </view>