getSelectChild(treeData) {
let selectArr = [];
for (let index = 0; index < treeData.length; index++) {
const element = treeData[index];
if (this.selectedKeys.indexOf(element.unid) != -1) {
selectArr.push(element);
}
if (element.children && element.children.length > 0) {
selectArr.push(…this.getSelectChild(element.children));
}
}
return selectArr;
},
好用的递归子查询
最新推荐文章于 2024-04-18 18:02:48 发布