Skip to content

Commit 05e2d30

Browse files
committed
[Dropdown] Apply btn-group class instead of style while using default tag.
1 parent 7abf033 commit 05e2d30

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

docs/pages/components/Dropdown.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Use `v-model` to indicate the dropdown status.
2323
<li><a role="button">Separated link</a></li>
2424
</template>
2525
</dropdown>
26-
<dropdown class="btn-group">
26+
<dropdown>
2727
<btn type="info">Split Button</btn>
2828
<btn type="info" class="dropdown-toggle"><span class="caret"></span></btn>
2929
<template slot="dropdown">

src/components/dropdown/Dropdown.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@
99
this.tag,
1010
{
1111
class: {
12+
'btn-group': this.tag === DEFAULT_TAG,
1213
dropdown: !this.dropup,
1314
dropup: this.dropup,
1415
open: this.show
15-
},
16-
style: {
17-
'display': this.tag === DEFAULT_TAG ? 'inline-block' : null,
18-
'vertical-align': this.tag === DEFAULT_TAG ? 'middle' : null
1916
}
2017
},
2118
[

0 commit comments

Comments
 (0)