the element UI tree control (el-tree) is being used in the form of lazy loading (lazy +: load= "loadNode" method). The business is as follows:
1-add a level 1 node
2-any node can add a new child node
3-edit node
4-delete node
-(problems encountered)-
1-add a level 1 node, and cannot use
bus.$on("adddd", function(nc){
console.log("ssssssssssssssssss")
console.log(nc)
console.log(_this.lastOne)
_this.$refs.tree.insertAfter(nc, _this.lastOne);
})
nc is the new (first-level) node of "newChild" (see console print)
this.lastOne is the data of the last node "1111" of the first-level directory (see console print, screenshot red box)
:
at Node.insertChild (element-ui.common.js?ccbf:22374)-:
2-:
a:lazy-load:load ---
: F5 :
:
3
b: if the parent node has been expanded before, the new operation is normal.
3-another thing to ask is: refresh the node problem in the case of lazy loading (this is now unsolved.)