@@ -38,7 +38,7 @@ export default {
38
38
configProvider : { default : ( ) => ConfigConsumerProps } ,
39
39
} ,
40
40
data ( ) {
41
- const { value, defaultValue } = this . $props ;
41
+ const { value = '' , defaultValue = '' } = this . $props ;
42
42
return {
43
43
stateValue : ! hasProp ( this , 'value' ) ? defaultValue : value ,
44
44
} ;
@@ -85,18 +85,15 @@ export default {
85
85
} ,
86
86
87
87
setValue ( value , e ) {
88
- // https://github.com/vueComponent/ant-design-vue/issues/92
89
- if ( isIE && ! isIE9 && this . stateValue === value ) {
88
+ if ( this . stateValue === value ) {
90
89
return ;
91
90
}
92
91
if ( ! hasProp ( this , 'value' ) ) {
93
92
this . stateValue = value ;
94
93
} else {
95
94
this . $forceUpdate ( ) ;
96
95
}
97
- if ( ! e . target . composing ) {
98
- this . $emit ( 'change.value' , value ) ;
99
- }
96
+ this . $emit ( 'change.value' , value ) ;
100
97
let event = e ;
101
98
if ( e . type === 'click' && this . $refs . input ) {
102
99
// click clear icon
@@ -124,8 +121,9 @@ export default {
124
121
} ,
125
122
126
123
handleChange ( e ) {
127
- if ( e . target . composing ) return ;
128
- this . setValue ( e . target . value , e ) ;
124
+ const { value, composing } = e . target ;
125
+ if ( composing || this . stateValue === value ) return ;
126
+ this . setValue ( value , e ) ;
129
127
} ,
130
128
131
129
renderClearIcon ( prefixCls ) {
0 commit comments