mirror of https://github.com/ElemeFE/element
fix autocomplete event bug
parent
fd989dbd0f
commit
d10d0ed61e
|
@ -5,8 +5,8 @@
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:name='name'
|
:name='name'
|
||||||
@onchange="handleChange"
|
@change="handleChange"
|
||||||
@onfocus="handleFocus"
|
@focus="handleFocus"
|
||||||
@keydown.up.native="highlight(highlightedIndex - 1)"
|
@keydown.up.native="highlight(highlightedIndex - 1)"
|
||||||
@keydown.down.native="highlight(highlightedIndex + 1)"
|
@keydown.down.native="highlight(highlightedIndex + 1)"
|
||||||
@keydown.enter.native="select(highlightedIndex)"
|
@keydown.enter.native="select(highlightedIndex)"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
:minlength="minlength"
|
:minlength="minlength"
|
||||||
:autocomplete="autoComplete"
|
:autocomplete="autoComplete"
|
||||||
ref="input"
|
ref="input"
|
||||||
@focus="$emit('onfocus', currentValue)"
|
@focus="$emit('focus', currentValue)"
|
||||||
@blur="handleBlur"
|
@blur="handleBlur"
|
||||||
>
|
>
|
||||||
<!-- input 图标 -->
|
<!-- input 图标 -->
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:maxlength="maxlength"
|
:maxlength="maxlength"
|
||||||
:minlength="minlength"
|
:minlength="minlength"
|
||||||
@focus="$emit('onfocus', currentValue)"
|
@focus="$emit('focus', currentValue)"
|
||||||
@blur="handleBlur">
|
@blur="handleBlur">
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
@ -162,6 +162,7 @@
|
||||||
|
|
||||||
'currentValue'(val) {
|
'currentValue'(val) {
|
||||||
this.$emit('input', val);
|
this.$emit('input', val);
|
||||||
|
this.$emit('change', val);
|
||||||
this.dispatch('form-item', 'el.form.change', [val]);
|
this.dispatch('form-item', 'el.form.change', [val]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue