Select: fix size attribute not working (#13070)

pull/13084/head
hetech 2018-10-17 10:36:33 +08:00 committed by GitHub
parent 9b1d120a0f
commit ef397572da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -854,7 +854,12 @@
const reference = this.$refs.reference; const reference = this.$refs.reference;
if (reference && reference.$el) { if (reference && reference.$el) {
this.initialInputHeight = reference.$el.getBoundingClientRect().height; const sizeMap = {
medium: 36,
small: 32,
mini: 28
};
this.initialInputHeight = reference.$el.getBoundingClientRect().height || sizeMap[this.selectSize];
} }
if (this.remote && this.multiple) { if (this.remote && this.multiple) {
this.resetInputHeight(); this.resetInputHeight();