<el-tree
:data="treeDatas"
:props="defaultProps"
:default-expand-all="true"
@node-click="handleNodeClick"
:expand-on-click-node="false"
:indent = "10"
ref="tree">
<span class="custom-tree-node" slot-scope="{ node, treeDatas }">
<span :class="handleClass(node.data)"><i :class="node.icon"></i>{{ node.label }}</span>
</span>
</el-tree>
The requirement of the project is to change the small icon of the current node when the state of the node deployment changes. The icon is the icon component in the elementUI used.
now is stuck in getting the status of the node here, ask all the gods for guidance!