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

<!--pages/common/comTree/index.wxml-->
<view wx:for="{{tree}}" wx:key="index" class="tree">
<view class="tree-item tree-item-select">
<view class="tree-item-onOff" wx:if="{{item.children && item.children.length > 0}}" bindtap="isOpen" data-index="{{index}}">
<image src="/static/u1490.svg" class="{{item.open ? 'tree-item-onOff-open' : 'tree-item-onOff-closed'}}"></image>
</view>
<view class="tree-item-onOff" wx:else>
</view>
<view class="tree-item-name {{selectKey == item.id ? 'tree-item-name-select' : '' }}" bindtap="select" data-item="{{item}}" data-index="{{index}}">
<view class="name">{{item.name}}</view>
<view class="img">
<!-- <image wx:if="{{selectKey == item.id }}" src="/assets/icon/u435.svg"></image> -->
</view>
</view>
</view>
<c-tree
wx:if="{{item.children && item.children.length > 0 && item.open }}"
dataTree='{{ item.children }}'
selectKey="{{selectKey}}"
isSelectLastNode="{{isSelectLastNode}}"
isOpenAll="{{isOpenAll}}"
>
</c-tree>
</view>