2020-09-04 js 树结构,提取所有叶子节点
2020-09-04 本文已影响0人
一只鱼_d589
`
buildParentList(arr) {
let self = this;
arr.forEach(item => {
if(item.isLeaf && item.rects && item.rects.length) {
}
if (item.children.length) {
self.buildParentList(item.children);
}
})
}
`