|
|
@ -125,10 +125,12 @@ export default { |
|
|
|
}, |
|
|
|
updateKeyChildren(data) { |
|
|
|
const oldDatas = this.$refs.tree.getCurrentNode().childMenus |
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
const oldData = oldDatas.find((d) => { d.id === data[i].id }) |
|
|
|
if (oldData) { |
|
|
|
data.childMenus = oldData.childMenus |
|
|
|
if (oldDatas) { |
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
const oldData = oldDatas.find((d) => { d.id === data[i].id }) |
|
|
|
if (oldData) { |
|
|
|
data.childMenus = oldData.childMenus |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs.tree.updateKeyChildren(this.$refs.tree.getCurrentKey(), data) |
|
|
|