SoFunction
Updated on 2025-04-05

How to refresh the instance of tree after adding and deleting nodes in Element-ui el-tree

1. Refresh the current node after adding a new node

= false;

();

// Create a new child node to refresh the expansion request of the node once, while renaming and deletion require refreshing the expansion event of the parent node.

2. Delete nodes

= false

()

Finished ~

Supplementary knowledge:element-ui component el-tree add buttons to work. If you delete the button, the data will change, but the page will not be updated.

Maybe the element-ui version is too low

I used element-ui 2.4.6

Later I found that 2.4.11 works

All updated element-ui versions

cnpm i [email protected]

The above example of how to refresh tree after adding and deleting nodes of Element-ui el-tree is all the content I share with you. I hope you can give you a reference and I hope you support me more.