mirror of https://github.com/ElemeFE/element
AutoComplete: add clear event (#13326)
* AutoComplete: add clear event(#13317) * remove arg in `handleClear` in AutoCompletepull/13337/head
parent
1f592944d6
commit
036102675a
|
@ -13,6 +13,7 @@
|
||||||
@input="handleChange"
|
@input="handleChange"
|
||||||
@focus="handleFocus"
|
@focus="handleFocus"
|
||||||
@blur="handleBlur"
|
@blur="handleBlur"
|
||||||
|
@clear="handleClear"
|
||||||
@keydown.up.native.prevent="highlight(highlightedIndex - 1)"
|
@keydown.up.native.prevent="highlight(highlightedIndex - 1)"
|
||||||
@keydown.down.native.prevent="highlight(highlightedIndex + 1)"
|
@keydown.down.native.prevent="highlight(highlightedIndex + 1)"
|
||||||
@keydown.enter.native="handleKeyEnter"
|
@keydown.enter.native="handleKeyEnter"
|
||||||
|
@ -193,6 +194,9 @@
|
||||||
handleBlur(event) {
|
handleBlur(event) {
|
||||||
this.$emit('blur', event);
|
this.$emit('blur', event);
|
||||||
},
|
},
|
||||||
|
handleClear() {
|
||||||
|
this.$emit('clear');
|
||||||
|
},
|
||||||
close(e) {
|
close(e) {
|
||||||
this.activated = false;
|
this.activated = false;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue