<el-tree
ref="tree"
v-loading="treeLoading"
:data="equipmentOptions"
:props="defaultProps"
@node-click="handleNodeClick"
:default-expand-all="true"
node-key="id"
>
<span class="custom-tree-node" slot-scope="{ node }">
<span>{{ node.label }}</span>
</span>
</el-tree>
// 清除选中
this.$refs.tree.setCurrentKey(null);
el-tree 清除当前选中节点
最新推荐文章于 2024-07-10 15:42:45 发布