The problem of vue2.0+elementUi tree Control sending back data

clipboard.png

treedivtree

clipboard.png
truepush

clipboard.png
iterate through the new array. Each item can be closed. How to uncheck the tree at the same time when closing?

Mar.01,2021

theoretically, don't you choose to share an array object? Bi-directional binding should have solved this problem for you.


if the data structure is different, do so
the value of watch tree and the corresponding array value of div
update the corresponding array value of div with the checked value in tree, and vice versa so that you can update each other
data structure, then directly change the array value of div = the selected array value of tree when the div array value is deleted. Those waiting for tree will also be updated with the same array

Menu