修改编目BUG

This commit is contained in:
a0049873 2022-06-20 17:42:01 +08:00
parent 2b5676d31c
commit 9c10dce23c
1 changed files with 13 additions and 12 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-05-06 11:17:55
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-08 17:19:11
* @LastEditTime: 2022-06-20 17:40:52
* @Description: 编目弹窗
-->
<template>
@ -441,17 +441,7 @@ export default {
const newData = [...this.data]
this.editData = {}
newData.forEach(val => {
if (val.key === key) {
this.editData = val
} else {
if (val.children) {
val.children.forEach(item => {
if (item.key === key) {
this.editData = item
}
})
}
}
this.handleChangeFor(val, key)
})
if (this.editData) {
this.editData[column] = value
@ -459,6 +449,17 @@ export default {
}
console.log(this.data)
},
handleChangeFor (val, key) {
if (val.key === key) {
this.editData = val
} else {
if (val.children) {
val.children.forEach(item => {
this.handleChangeFor(item, key)
})
}
}
},
edit (key) {
if (this.flag) {
const newData = [...this.data]