فهرست منبع

fix autocomplete suggestions show

baiyaaaaa 8 سال پیش
والد
کامیت
d8610aaa54
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      packages/autocomplete/src/autocomplete.vue

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

@@ -98,6 +98,10 @@
       },
       handleChange(value) {
         this.$emit('input', value);
+        if (!this.triggerOnFocus && !value) {
+          this.suggestions = [];
+          return;
+        }
         this.getData(value);
       },
       handleFocus() {