<body>
<script>
let tree = [
{
id: '1',
title: '节点1',
children: [
{
id: '1-1',
title: '节点1-1'
},
{
id: '1-2',
title: '节点1-2'
}
]
},
{
id: '2',
title: '节点2',
children: [
{
id: '2-1',
title: '节点2-1',
children: [
{
id: '3-1',
title: '节点3-1'
}
树形结构数据利用深拷贝和递归修改key值
于 2023-01-18 14:06:43 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)