fix: input bug at ie9 #1421

pull/1423/head
tanjinzhou 2019-11-14 19:19:24 +08:00
parent 45eb4be22a
commit cdcae1b39f
9 changed files with 49 additions and 5 deletions

View File

@ -251,9 +251,7 @@ export default {
ref: 'input',
key: 'ant-input',
};
if ($listeners['change.value']) {
inputProps.directives = [{ name: 'ant-input' }];
}
inputProps.directives = [{ name: 'ant-input' }];
return this.renderLabeledIcon(prefixCls, <input {...inputProps} />);
},
},

View File

@ -178,6 +178,9 @@ const DateInput = {
name: 'ant-ref',
value: this.saveDateInput,
},
{
name: 'ant-input',
},
],
}}
class={`${prefixCls}-input ${invalidClass}`}

View File

@ -15,7 +15,7 @@ function chooseYear(year) {
const value = this.sValue.clone();
value.year(year);
value.month(this.sValue.month());
this.sValue = value
this.sValue = value;
this.__emit('select', value);
}

View File

@ -129,6 +129,13 @@ export default {
onChange={this.handleChange}
onKeyup={this.go}
onBlur={this.handleBlur}
{...{
directives: [
{
name: 'ant-input',
},
],
}}
/>
{locale.page}
{gotoButton}

View File

@ -355,6 +355,13 @@ export default {
onKeyup={this.handleKeyUp}
onInput={this.handleKeyUp}
size="3"
{...{
directives: [
{
name: 'ant-input',
},
],
}}
/>
<span class={`${prefixCls}-slash`}></span>
{allPages}

View File

@ -733,7 +733,19 @@ const Select = {
const props = this.$props;
const { _inputValue: inputValue } = this.$data;
const attrs = getAttrs(this);
const defaultInput = <input id={attrs.id} autoComplete="off" />;
const defaultInput = (
<input
{...{
directives: [
{
name: 'ant-input',
},
],
}}
id={attrs.id}
autoComplete="off"
/>
);
const inputElement = props.getInputElement ? props.getInputElement() : defaultInput;
const inputCls = classnames(getClass(inputElement), {

View File

@ -178,6 +178,13 @@ const Header = {
placeholder={placeholder}
onInput={this.onInputChange}
readOnly={!!inputReadOnly}
{...{
directives: [
{
name: 'ant-input',
},
],
}}
/>
);
},

View File

@ -377,6 +377,13 @@ export default {
autoFocus={autoFocus}
readOnly={!!inputReadOnly}
id={id}
{...{
directives: [
{
name: 'ant-input',
},
],
}}
/>
{inputIcon || <span class={`${prefixCls}-icon`} />}
{this.renderClearButton()}

View File

@ -103,6 +103,9 @@ const SearchInput = {
name: 'ant-ref',
value: this.inputRef,
},
{
name: 'ant-input',
},
],
}}
onInput={onSearchInputChange}