<template>
<div class="treeData">
<!-- 左侧树控件 -->
<div class="layui-layer-title" style="cursor: move;font-size:16px;">
<i class="fa fa-tasks"></i>巡检数据
</div>
<i
class="el-icon-close"
@click="closePopover()"
style="float: right;font-size: 16px;color: rgb(255, 255, 255);position: relative;bottom: 25px;right: 10px;cursor:pointer;"
></i>
<el-tree
:data="data"
:show-checkbox="false"
:default-expand-all="false"
node-key="id"
ref="tree"
highlight-current
:props="defaultProps"
@node-click="getNodeData"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>
<!-- <i class="folers"></!-->
<img v-if="data.children&&data.children.length>0" src="../../assets/img/folder.png" alt />
<img v-else src="../../assets/img/layer2.png" alt />
{{ node.label }}
</span>
</span>
</el-tree>
</div>
</template>
效果图