Iview tree component, how to get the inside of the currently checked node

clipboard.png

The

getCheckedNodes method and the on-check-change method get all the checked nodes. I need to return the contents of that node when the check box is triggered and when the check box is checked and unchecked, respectively.

at present, an idea is to save a copy of the data of all selected nodes before the check operation, and then compare it with the array of selected nodes returned after the check operation, so as to obtain the difference between the two. When the parent node is not triggered, this method is effective, and only one-level parent, it can also be dealt with, but when there is a multi-level parent linkage, the difference data will be obtained, and it is difficult to locate the current node clicked.

can you tell me what the gods can do?

Feb.28,2022

our own solution is to extract the tree components and add the method of getting checked nodes.


has the problem been solved? Landlord


this requirement can certainly be met by a robust plug-in. Read the documentation carefully. The on-select-change and on-check-change methods have two parameters, the first is all, and the second is current:

// template
<Tree @on-check-change="checkItem"/>

// script
checkItem (selectedArr, selectedItem) {
    // selectedItem...
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf4cba-3a2d3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf4cba-3a2d3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?