function eachReplaceKey(currentArr) {
currentArr.forEach(item => {
item.__node = {}
if (item.children && item.children.length > 0) { // 有下一级标签时
eachReplaceKey(item.children)
}
})
}
eachReplaceKey(currentArr)
02-17
1434
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-21
2029
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-14
3605
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)