Commit f180098687d7fdb2d01f4f1b7d3519518940ff33

Authored by 梁灏
1 parent 82151bd9

update Dropdown cls

examples/routers/select.vue
... ... @@ -95,6 +95,7 @@
95 95 v-model="model13"
96 96 filterable
97 97 remote
  98 + transfer
98 99 :remote-method="remoteMethod1"
99 100 :loading="loading1">
100 101 <Option v-for="(option, index) in options1" :value="option.value" :key="index">{{option.label}}</Option>
... ...
src/components/dropdown/dropdown.vue
... ... @@ -7,6 +7,7 @@
7 7 <div :class="[prefixCls + '-rel']" ref="reference" @click="handleClick"><slot></slot></div>
8 8 <transition :name="transition">
9 9 <Drop
  10 + :class="dropdownCls"
10 11 v-show="currentVisible"
11 12 :placement="placement"
12 13 ref="drop"
... ... @@ -54,6 +55,11 @@
54 55 computed: {
55 56 transition () {
56 57 return ['bottom-start', 'bottom', 'bottom-end'].indexOf(this.placement) > -1 ? 'slide-up' : 'fade';
  58 + },
  59 + dropdownCls () {
  60 + return {
  61 + [prefixCls + '-transfer']: this.transfer
  62 + };
57 63 }
58 64 },
59 65 data () {
... ...
src/styles/components/dropdown.less
... ... @@ -21,6 +21,10 @@
21 21 &-menu{
22 22 min-width: 100px;
23 23 }
  24 +
  25 + &-transfer{
  26 + width: auto;
  27 + }
24 28 }
25 29  
26 30 .select-item(@dropdown-prefix-cls, @dropdown-item-prefix-cls);
27 31 \ No newline at end of file
... ...