在遍历之前,先判断是否存在row.children (#103)
Cannot read property 'forEach' of undefined 展开日志详情报错,找不到forEach属性
This commit is contained in:
@@ -511,17 +511,18 @@ function CRUD(options) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const lazyTreeNodeMap = table.store.states.lazyTreeNodeMap
|
const lazyTreeNodeMap = table.store.states.lazyTreeNodeMap
|
||||||
const children = lazyTreeNodeMap[crud.getDataId(row)]
|
row.children = lazyTreeNodeMap[crud.getDataId(row)]
|
||||||
row.children = children
|
if (row.children) {
|
||||||
children.forEach(ele => {
|
row.children.forEach(ele => {
|
||||||
const id = crud.getDataId(ele)
|
const id = crud.getDataId(ele)
|
||||||
if (that.dataStatus[id] === undefined) {
|
if (that.dataStatus[id] === undefined) {
|
||||||
that.dataStatus[id] = {
|
that.dataStatus[id] = {
|
||||||
delete: 0,
|
delete: 0,
|
||||||
edit: 0
|
edit: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user