瀏覽代碼

Select: fix Switching select`s multiple-choice radio will cause an error (#15206) (#15587)

MASONGZHI 6 年之前
父節點
當前提交
b245929242
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6 4
      packages/select/src/select.vue

+ 6 - 4
packages/select/src/select.vue

@@ -466,10 +466,12 @@
         });
         this.hoverIndex = -1;
         if (this.multiple && this.filterable) {
-          const length = this.$refs.input.value.length * 15 + 20;
-          this.inputLength = this.collapseTags ? Math.min(50, length) : length;
-          this.managePlaceholder();
-          this.resetInputHeight();
+          this.$nextTick(() => {
+            const length = this.$refs.input.value.length * 15 + 20;
+            this.inputLength = this.collapseTags ? Math.min(50, length) : length;
+            this.managePlaceholder();
+            this.resetInputHeight();
+          });
         }
         if (this.remote && typeof this.remoteMethod === 'function') {
           this.hoverIndex = -1;