This commit is contained in:
pushuo 2022-07-13 17:54:41 +08:00
parent 0eb8f7aefb
commit 414fb90ec0
1 changed files with 19 additions and 18 deletions

View File

@ -282,8 +282,13 @@
data.path = data.path.replace(/\/[^\/]*$/, '/' + value);
this.folderCurrent = this.folderCurrent.replace(/\/[^\/]*$/, '/' + value);
// 递归 修改 data 内 所有 children
changeChildren(data);
function changeChildren(data) {
this.changeChildren(data, node, value);
})
}
}).catch(() => {});
},
changeChildren(data, node, value) {
if (data.children) {
data.children.map(e => {
if (e.path) {
@ -295,15 +300,11 @@
}
if (e.children) {
changeChildren(e)
this.changeChildren(e, node, value)
}
})
}
}
})
}
}).catch(() => {});
}
},
// 在实例初始化之后组件属性计算之前如data属性等
beforeCreate () {