// 递归处理树
treeRecursive(list) {
return list.map(el => {
if (el.permission && el.permission.length > 0) {
el.children = el.permission.map(p => {
p.isPermis = true
return p
})
} else if (el.children && el.children.length > 0) {
el.children = this.treeRecursive(el.children)
}
return el
})
},
递归处理树
最新推荐文章于 2024-09-06 13:44:54 发布