Commit 4b6f6cc8 authored by wenqing's avatar wenqing Committed by 杨奕

Select: fix input height when props.size not assigned

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