给el-tree里数据type为1的添加自定义图片
<el-tree
ref="tree"
class="member-search-dept-tree"
:data="deptOptions"
:highlight-current="highlight"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
default-expand-all
>
<span slot-scope="{ node , data }" class="custom-tree-node">
<span class="custom-tree-node-list" @dblclick="handleNodeClick(node,data)">
<img v-if="data.type===1&&!getSuccess(data.id)" src="@/assets/image/video-surveillanceac.png" alt="" style="width:16px;height:16px">
<img v-if="data.type===1&&getSuccess(data.id)" src="@/assets/image/video-surveillance.png" alt="" style="width:16px;height:16px">
<span style="font-size:14px;margin-left:4px"> {{ node.label }}</span>
</span>
</span>
</el-tree>
@dblclick是双击事件