Home > other >  Element tree component deletion and clear the problem
Element tree component deletion and clear the problem

Time:10-06



According to the element tree to realize the function, how to empty and single delete the data on the right, the left option synchronization into is not selected,

CodePudding user response:

Clear: this $refs. Tree. SetCheckedKeys ([])
Delete: delete (item) {
Let the index=this. GetData. IndexOf (item)
If (index & gt; 1) {this. GetData. Splice (index, 1); }
This $refs. Tree. SetChecked (item id, false)
},

CodePudding user response:

A stick! Thank you for your bosses
  • Related