diff --git a/components/auto-complete/InputElement.jsx b/components/auto-complete/InputElement.jsx index 817616dce..5a2bbf4ed 100644 --- a/components/auto-complete/InputElement.jsx +++ b/components/auto-complete/InputElement.jsx @@ -1,5 +1,6 @@ import PropTypes from '../_util/vue-types'; import { cloneElement } from '../_util/vnode'; +import { getOptionProps } from '../_util/props-util'; function chaining(...fns) { return function(...args) { // eslint-disable-line @@ -12,6 +13,7 @@ function chaining(...fns) { }; } export default { + name: 'InputElement', props: { value: PropTypes.any, disabled: PropTypes.bool, @@ -29,7 +31,8 @@ export default { render() { const { $slots = {}, $listeners = {}, $props = {}, $attrs = {} } = this; - const value = $props.value === undefined ? '' : $props.value; + const props = getOptionProps(this); + const value = props.value === undefined ? '' : props.value; const children = $slots.default[0]; const { componentOptions = {} } = $slots.default[0]; const { listeners = {} } = componentOptions; @@ -43,7 +46,7 @@ export default { domProps: { value, }, - props: $props, + props, on: newEvent, attrs: { ...$attrs, value }, ref: 'ele', diff --git a/components/vc-select/Select.jsx b/components/vc-select/Select.jsx index ac382be38..faf59cfd9 100644 --- a/components/vc-select/Select.jsx +++ b/components/vc-select/Select.jsx @@ -304,7 +304,7 @@ const Select = { onInputChange(e) { const { value: val, composing } = e.target; - const { _inputValue = '' } = this; + const { _inputValue = '' } = this.$data; if (composing || _inputValue === val) return; const { tokenSeparators } = this.$props; if (