Commit 74ef0a6ae1fdf694ab3bef79625395d376a923a6
1 parent
ab719ff2
fixed #4194
Showing
3 changed files
with
7 additions
and
3 deletions
Show diff stats
src/components/select/dropdown.vue
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | computed: { | 28 | computed: { |
29 | styles () { | 29 | styles () { |
30 | let style = {}; | 30 | let style = {}; |
31 | - if (this.width) style.width = `${this.width}px`; | 31 | + if (this.width) style.minWidth = `${this.width}px`; |
32 | return style; | 32 | return style; |
33 | } | 33 | } |
34 | }, | 34 | }, |
src/components/select/select.vue
@@ -201,9 +201,9 @@ | @@ -201,9 +201,9 @@ | ||
201 | }, | 201 | }, |
202 | placement: { | 202 | placement: { |
203 | validator (value) { | 203 | validator (value) { |
204 | - return oneOf(value, ['top', 'bottom']); | 204 | + return oneOf(value, ['top', 'bottom', 'top-start', 'bottom-start', 'top-end', 'bottom-end']); |
205 | }, | 205 | }, |
206 | - default: 'bottom' | 206 | + default: 'bottom-start' |
207 | }, | 207 | }, |
208 | transfer: { | 208 | transfer: { |
209 | type: Boolean, | 209 | type: Boolean, |
src/styles/components/select.less
@@ -235,6 +235,10 @@ | @@ -235,6 +235,10 @@ | ||
235 | min-width: 100%; | 235 | min-width: 100%; |
236 | list-style: none; | 236 | list-style: none; |
237 | } | 237 | } |
238 | + | ||
239 | + & &-dropdown{ | ||
240 | + width: auto; | ||
241 | + } | ||
238 | } | 242 | } |
239 | 243 | ||
240 | .select-item(@select-prefix-cls, @select-item-prefix-cls); | 244 | .select-item(@select-prefix-cls, @select-item-prefix-cls); |