fix: treeSelect treeData[i].children support null #81

This commit is contained in:
tjz 2018-07-25 22:21:19 +08:00
parent 675f918149
commit 1367cfc70a

View File

@ -58,7 +58,7 @@ export default {
// label: newLabel,
title: newTitle || newLabel,
}
this.updateTreeData(children)
this.updateTreeData(children || [])
Object.assign(list[i], item)
}
},
@ -72,7 +72,7 @@ export default {
dropdownClassName,
...restProps
} = props
this.updateTreeData(props.treeData)
this.updateTreeData(props.treeData || [])
const cls = {
[`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-sm`]: size === 'small',