Browse Source

Select: optimize filterable, fixed #1933 (#1935)

杨奕 8 years ago
parent
commit
12e4b02e31
2 changed files with 3 additions and 6 deletions
  1. 0 5
      packages/select/src/option.vue
  2. 3 1
      packages/select/src/select.vue

+ 0 - 5
packages/select/src/option.vue

@@ -92,11 +92,6 @@
       },
       value() {
         this.dispatch('ElSelect', 'setSelected');
-      },
-      visible() {
-        this.$nextTick(() => {
-          this.dispatch('ElSelectDropdown', 'updatePopper');
-        });
       }
     },
 

+ 3 - 1
packages/select/src/select.vue

@@ -229,7 +229,9 @@
       },
 
       query(val) {
-        this.broadcast('ElSelectDropdown', 'updatePopper');
+        this.$nextTick(() => {
+          this.broadcast('ElSelectDropdown', 'updatePopper');
+        });
         this.hoverIndex = -1;
         if (this.multiple && this.filterable) {
           this.resetInputHeight();