mirror of https://github.com/ElemeFE/element
Update select.vue
parent
4b6f6cc885
commit
95fe0fd2d8
|
@ -495,9 +495,10 @@
|
|||
if (!this.$refs.reference) return;
|
||||
let inputChildNodes = this.$refs.reference.$el.childNodes;
|
||||
let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
|
||||
const tagsClientHeight = this.$refs.tags && this.$refs.tags.clientHeight || 0;
|
||||
const defaultSize = sizeMap[this.size || 'small'];
|
||||
input.style.height = Math.max(tagsClientHeight, defaultSize) + 6 + 'px';
|
||||
const tags = this.$refs.tags;
|
||||
input.style.height = this.selected.length === 0
|
||||
? (sizeMap[this.size] || 36) + 'px'
|
||||
: Math.max(tags ? (tags.clientHeight + 6) : 0, sizeMap[this.size] || 36) + 'px';
|
||||
if (this.visible && this.emptyText !== false) {
|
||||
this.broadcast('ElSelectDropdown', 'updatePopper');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue