fix: treeNode dataRef is undefined

This commit is contained in:
zkwolf 2019-08-21 15:17:21 +08:00
parent f66fae47e3
commit 5f9ebe8b45

View File

@ -134,7 +134,8 @@ const TreeSelect = {
const clearIcon = <Icon type="close-circle" class={`${prefixCls}-clear-icon`} theme="filled" />;
const VcTreeSelectProps = {
props: {
props: Object.assign(
{
switcherIcon: nodeProps => this.renderSwitcherIcon(prefixCls, nodeProps),
inputIcon,
removeIcon,
@ -148,6 +149,8 @@ const TreeSelect = {
notFoundContent: notFoundContent || renderEmpty(h, 'Select'),
__propsSymbol__: Symbol(),
},
treeData ? { treeData } : {},
),
class: cls,
on: { ...this.$listeners, change: this.onChange },
ref: 'vcTreeSelect',