update 优化 如果不存在属性 则做兼容
This commit is contained in:
parent
b3edce5a20
commit
6b2838141a
@ -171,6 +171,9 @@ export const handleTree = <T>(data: any[], id?: string, parentId?: string, child
|
||||
for (const d of data) {
|
||||
const id = d[config.id];
|
||||
childrenListMap[id] = d;
|
||||
if (!d[config.childrenList]) {
|
||||
d[config.childrenList] = [];
|
||||
}
|
||||
}
|
||||
|
||||
for (const d of data) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user