fix: treeSelect treeData[i].children support null #81
parent
e6eeb7e02a
commit
cc613c9012
|
@ -58,7 +58,7 @@ export default {
|
||||||
// label: newLabel,
|
// label: newLabel,
|
||||||
title: newTitle || newLabel,
|
title: newTitle || newLabel,
|
||||||
}
|
}
|
||||||
this.updateTreeData(children)
|
this.updateTreeData(children || [])
|
||||||
Object.assign(list[i], item)
|
Object.assign(list[i], item)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -72,7 +72,7 @@ export default {
|
||||||
dropdownClassName,
|
dropdownClassName,
|
||||||
...restProps
|
...restProps
|
||||||
} = props
|
} = props
|
||||||
this.updateTreeData(props.treeData)
|
this.updateTreeData(props.treeData || [])
|
||||||
const cls = {
|
const cls = {
|
||||||
[`${prefixCls}-lg`]: size === 'large',
|
[`${prefixCls}-lg`]: size === 'large',
|
||||||
[`${prefixCls}-sm`]: size === 'small',
|
[`${prefixCls}-sm`]: size === 'small',
|
||||||
|
|
Loading…
Reference in New Issue