소스 검색

Select: fix resetInputHeight (#21201)

好多大米 4 년 전
부모
커밋
a54484e8b3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/select/src/select.vue

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

@@ -646,7 +646,7 @@
           let inputChildNodes = this.$refs.reference.$el.childNodes;
           let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
           const tags = this.$refs.tags;
-          const tagsHeight = Math.round(tags.getBoundingClientRect().height);
+          const tagsHeight = tags ? Math.round(tags.getBoundingClientRect().height) : 0;
           const sizeInMap = this.initialInputHeight || 40;
           input.style.height = this.selected.length === 0
             ? sizeInMap + 'px'