From 74ef0a6ae1fdf694ab3bef79625395d376a923a6 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Wed, 8 Aug 2018 15:18:24 +0800 Subject: [PATCH] fixed #4194 --- src/components/select/dropdown.vue | 2 +- src/components/select/select.vue | 4 ++-- src/styles/components/select.less | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/select/dropdown.vue b/src/components/select/dropdown.vue index 50c674d..d54b121 100644 --- a/src/components/select/dropdown.vue +++ b/src/components/select/dropdown.vue @@ -28,7 +28,7 @@ computed: { styles () { let style = {}; - if (this.width) style.width = `${this.width}px`; + if (this.width) style.minWidth = `${this.width}px`; return style; } }, diff --git a/src/components/select/select.vue b/src/components/select/select.vue index e4f800b..fb9fbd0 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -201,9 +201,9 @@ }, placement: { validator (value) { - return oneOf(value, ['top', 'bottom']); + return oneOf(value, ['top', 'bottom', 'top-start', 'bottom-start', 'top-end', 'bottom-end']); }, - default: 'bottom' + default: 'bottom-start' }, transfer: { type: Boolean, diff --git a/src/styles/components/select.less b/src/styles/components/select.less index 2b9f851..9dad2ab 100644 --- a/src/styles/components/select.less +++ b/src/styles/components/select.less @@ -235,6 +235,10 @@ min-width: 100%; list-style: none; } + + & &-dropdown{ + width: auto; + } } .select-item(@select-prefix-cls, @select-item-prefix-cls); -- libgit2 0.21.4