Commit 74ef0a6ae1fdf694ab3bef79625395d376a923a6

Authored by 梁灏
1 parent ab719ff2

fixed #4194

src/components/select/dropdown.vue
... ... @@ -28,7 +28,7 @@
28 28 computed: {
29 29 styles () {
30 30 let style = {};
31   - if (this.width) style.width = `${this.width}px`;
  31 + if (this.width) style.minWidth = `${this.width}px`;
32 32 return style;
33 33 }
34 34 },
... ...
src/components/select/select.vue
... ... @@ -201,9 +201,9 @@
201 201 },
202 202 placement: {
203 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 208 transfer: {
209 209 type: Boolean,
... ...
src/styles/components/select.less
... ... @@ -235,6 +235,10 @@
235 235 min-width: 100%;
236 236 list-style: none;
237 237 }
  238 +
  239 + & &-dropdown{
  240 + width: auto;
  241 + }
238 242 }
239 243  
240 244 .select-item(@select-prefix-cls, @select-item-prefix-cls);
... ...