Commit 3a23ab7b authored by wubaiqing's avatar wubaiqing Committed by 杨奕

Select: fix input height of mini size

parent 9bad9106
...@@ -495,7 +495,10 @@ ...@@ -495,7 +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];
input.style.height = Math.max(this.$refs.tags.clientHeight + 6, sizeMap[this.size] || 36) + 'px'; const tags = this.$refs.tags;
input.style.height = this.selected.length === 0
? sizeMap[this.selectSize] + 'px'
: Math.max(tags ? (tags.clientHeight + 6) : 0, sizeMap[this.selectSize] || 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