fix: update input not trigger change event

pull/2682/head
tanjinzhou 2020-08-11 18:26:09 +08:00
parent aa8e176fc7
commit 7197bbffad
9 changed files with 14 additions and 16 deletions

@ -1 +1 @@
Subproject commit 4a986352a599904cfe895d0df1a8bb794e684645
Subproject commit bf2888abeb14599693b4261c0ea81819af8cb869

View File

@ -0,0 +1,6 @@
import shallowequal from 'shallowequal';
import { toRaw } from 'vue';
export default function(value, other, customizer, thisArg) {
return shallowequal(toRaw(value), toRaw(other), customizer, thisArg);
}

View File

@ -161,7 +161,7 @@ export default {
ref: this.saveInput,
key: 'ant-input',
onInput: handleChange,
onChange: noop,
onChange: handleChange,
};
if (!inputProps.autofocus) {
delete inputProps.autofocus;

View File

@ -106,6 +106,7 @@ export default {
...this.$attrs,
prefixCls,
onInput: this.handleChange,
onChange: this.handleChange,
onKeydown: this.handleKeyDown,
};
return <ResizableTextArea {...resizeProps} ref={this.saveTextArea} />;

View File

@ -200,6 +200,7 @@ const DateInput = {
disabled={disabled}
placeholder={placeholder}
onInput={this.onInputChange}
onChange={this.onInputChange}
onKeydown={this.onKeyDown}
onFocus={this.onFocus}
onBlur={this.onBlur}

View File

@ -136,15 +136,9 @@ export default {
type="text"
value={goInputText}
onInput={this.handleChange}
onChange={this.handleChange}
onKeyup={this.go}
onBlur={this.handleBlur}
{...{
directives: [
{
name: 'ant-input',
},
],
}}
/>
{locale.page}
{gotoButton}

View File

@ -380,14 +380,8 @@ export default {
onKeydown={this.handleKeyDown}
onKeyup={this.handleKeyUp}
onInput={this.handleKeyUp}
onChange={this.handleKeyUp}
size="3"
{...{
directives: [
{
name: 'ant-input',
},
],
}}
/>
<span class={`${prefixCls}-slash`}></span>
{allPages}

View File

@ -169,6 +169,7 @@ const Header = {
value={str}
placeholder={placeholder}
onInput={this.onInputChange}
onChange={this.onInputChange}
readonly={!!inputReadOnly}
/>
);

View File

@ -122,6 +122,7 @@ const SearchInput = {
type="text"
ref={this.inputRef}
onInput={handleInputChange}
onChange={handleInputChange}
onKeydown={onSearchInputKeyDown}
value={searchValue}
disabled={disabled}