mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-03 12:37:42 +08:00
fix: AutoComplete can not delete last character #1429
This commit is contained in:
parent
59dc98dbd1
commit
cece7332cb
@ -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',
|
||||
|
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user