Merge pull request #1111 from zkwolf/fix-tree-select-dataRef-undefined

fix: treeNode dataRef is undefined
pull/1150/head
三点包子 2019-08-22 17:31:17 +08:00 committed by GitHub
commit f12d53bfc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 14 deletions

View File

@ -134,20 +134,23 @@ const TreeSelect = {
const clearIcon = <Icon type="close-circle" class={`${prefixCls}-clear-icon`} theme="filled" />; const clearIcon = <Icon type="close-circle" class={`${prefixCls}-clear-icon`} theme="filled" />;
const VcTreeSelectProps = { const VcTreeSelectProps = {
props: { props: Object.assign(
switcherIcon: nodeProps => this.renderSwitcherIcon(prefixCls, nodeProps), {
inputIcon, switcherIcon: nodeProps => this.renderSwitcherIcon(prefixCls, nodeProps),
removeIcon, inputIcon,
clearIcon, removeIcon,
...rest, clearIcon,
getPopupContainer: getPopupContainer || getContextPopupContainer, ...rest,
dropdownClassName: classNames(dropdownClassName, `${prefixCls}-tree-dropdown`), getPopupContainer: getPopupContainer || getContextPopupContainer,
prefixCls, dropdownClassName: classNames(dropdownClassName, `${prefixCls}-tree-dropdown`),
dropdownStyle: { maxHeight: '100vh', overflow: 'auto', ...dropdownStyle }, prefixCls,
treeCheckable: checkable, dropdownStyle: { maxHeight: '100vh', overflow: 'auto', ...dropdownStyle },
notFoundContent: notFoundContent || renderEmpty(h, 'Select'), treeCheckable: checkable,
__propsSymbol__: Symbol(), notFoundContent: notFoundContent || renderEmpty(h, 'Select'),
}, __propsSymbol__: Symbol(),
},
treeData ? { treeData } : {},
),
class: cls, class: cls,
on: { ...this.$listeners, change: this.onChange }, on: { ...this.$listeners, change: this.onChange },
ref: 'vcTreeSelect', ref: 'vcTreeSelect',