Explorar o código

AutoComplete: add clear event (#13326)

* AutoComplete: add clear event(#13317)

* remove arg in `handleClear` in AutoComplete
Harlan %!s(int64=6) %!d(string=hai) anos
pai
achega
036102675a
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      packages/autocomplete/src/autocomplete.vue

+ 4 - 0
packages/autocomplete/src/autocomplete.vue

@@ -13,6 +13,7 @@
       @input="handleChange"
       @focus="handleFocus"
       @blur="handleBlur"
+      @clear="handleClear"
       @keydown.up.native.prevent="highlight(highlightedIndex - 1)"
       @keydown.down.native.prevent="highlight(highlightedIndex + 1)"
       @keydown.enter.native="handleKeyEnter"
@@ -193,6 +194,9 @@
       handleBlur(event) {
         this.$emit('blur', event);
       },
+      handleClear() {
+        this.$emit('clear');
+      },
       close(e) {
         this.activated = false;
       },