Commit 95fe0fd2 authored by 杨奕's avatar 杨奕

Update select.vue

parent 4b6f6cc8
...@@ -495,9 +495,10 @@ ...@@ -495,9 +495,10 @@
if (!this.$refs.reference) return; if (!this.$refs.reference) return;
let inputChildNodes = this.$refs.reference.$el.childNodes; let inputChildNodes = this.$refs.reference.$el.childNodes;
let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0]; let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
const tagsClientHeight = this.$refs.tags && this.$refs.tags.clientHeight || 0; const tags = this.$refs.tags;
const defaultSize = sizeMap[this.size || 'small']; input.style.height = this.selected.length === 0
input.style.height = Math.max(tagsClientHeight, defaultSize) + 6 + 'px'; ? (sizeMap[this.size] || 36) + 'px'
: Math.max(tags ? (tags.clientHeight + 6) : 0, sizeMap[this.size] || 36) + 'px';
if (this.visible && this.emptyText !== false) { if (this.visible && this.emptyText !== false) {
this.broadcast('ElSelectDropdown', 'updatePopper'); this.broadcast('ElSelectDropdown', 'updatePopper');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment