Select: fix input height of mini size

This commit is contained in:
wubaiqing
2017-11-03 18:17:58 +08:00
committed by 杨奕
parent 9bad910664
commit 3a23ab7b01

View File

@@ -495,7 +495,10 @@
if (!this.$refs.reference) return;
let inputChildNodes = this.$refs.reference.$el.childNodes;
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) {
this.broadcast('ElSelectDropdown', 'updatePopper');
}