Skip to content

Commit 03cdca0

Browse files
feat(button-group): [button-group] Adapting to the SMB theme (#2088)
* feat(button-group): [button-group] Adapting to the SMB theme * feat(button-group): [button-group] Adapting to the SMB theme * feat(button-group): [button-group] Adapting to the SMB theme * feat(button-group): [button-group] Adapting to the SMB theme
1 parent d1424ae commit 03cdca0

File tree

2 files changed

+19
-46
lines changed

2 files changed

+19
-46
lines changed

examples/sites/demos/pc/app/button-group/sup-composition-api.vue

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
</template>
1212
</tiny-button-group>
1313
</div>
14-
<br /><br />
1514
<p>插槽引用tag角标</p>
1615
<div class="tag">
1716
<tiny-button-group :data="groupDataTag" v-model="checkedVal">
1817
<template #btn="{ sup }">
19-
<tiny-tag type="warning" size="small" hit>
20-
<component :is="sup.icon" class="tiny-svg-size"></component>
18+
<tiny-tag type="danger" class="tiny-only-icon" size="small">
19+
<component :is="sup.icon"></component>
2120
{{ sup.text }}
2221
</tiny-tag>
2322
</template>
@@ -96,16 +95,6 @@ const groupDataTag = ref([
9695
class: 'sup-tag',
9796
icon: iconPlusCircle()
9897
}
99-
},
100-
{
101-
text: '组合',
102-
value: 'Button4',
103-
sup: {
104-
slot: 'btn',
105-
class: 'sup-tag',
106-
icon: iconPlusCircle(),
107-
text: '8折'
108-
}
10998
}
11099
])
111100
</script>
@@ -132,25 +121,23 @@ const groupDataTag = ref([
132121
</style>
133122

134123
<style>
124+
125+
.demo-button p {
126+
margin: 16px 0 8px 0;
127+
}
135128
.demo-button .sup button {
136-
width: 84px;
129+
width: 96px;
137130
}
138131
.demo-button .sup li:nth-of-type(4) button {
139132
width: 124px;
140133
}
141134
.demo-button .tag button {
142135
width: 84px;
143136
}
144-
.demo-button .tag li:last-child button {
145-
width: 120px;
137+
.demo-button .tag li:first-child button {
138+
width: 100px;
146139
}
147-
.demo-button p {
148-
margin-bottom: 8px;
149-
}
150-
.demo-button .tiny-tag {
151-
border-radius: 0px 5px 0 8px;
152-
}
153-
.demo-button .tiny-svg-size {
154-
margin-right: 4px;
140+
.tiny-only-icon {
141+
border-radius: 0px 6px;
155142
}
156143
</style>

examples/sites/demos/pc/app/button-group/sup.vue

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
</template>
1212
</tiny-button-group>
1313
</div>
14-
<br /><br />
1514
<p>插槽引用tag角标</p>
1615
<div class="tag">
1716
<tiny-button-group :data="groupData2" v-model="checkedVal">
1817
<template #btn="{ sup }">
19-
<tiny-tag type="warning" size="small" hit>
20-
<component :is="sup.icon" class="tiny-svg-size"></component>
18+
<tiny-tag type="danger" class="tiny-only-icon" size="small">
19+
<component :is="sup.icon"></component>
2120
{{ sup.text }}
2221
</tiny-tag>
2322
</template>
@@ -103,16 +102,6 @@ export default {
103102
class: 'sup-tag',
104103
icon: iconPlusCircle()
105104
}
106-
},
107-
{
108-
text: '组合',
109-
value: 'Button4',
110-
sup: {
111-
slot: 'btn',
112-
class: 'sup-tag',
113-
icon: iconPlusCircle(),
114-
text: '8折'
115-
}
116105
}
117106
]
118107
}
@@ -143,24 +132,21 @@ export default {
143132

144133
<style>
145134
.demo-button p {
146-
margin-bottom: 8px;
135+
margin: 16px 0 8px 0;
147136
}
148137
.demo-button .sup button {
149-
width: 84px;
138+
width: 96px;
150139
}
151140
.demo-button .sup li:nth-of-type(4) button {
152141
width: 124px;
153142
}
154143
.demo-button .tag button {
155144
width: 84px;
156145
}
157-
.demo-button .tag li:last-child button {
158-
width: 120px;
159-
}
160-
.demo-button .tiny-tag {
161-
border-radius: 0px 5px 0 8px;
146+
.demo-button .tag li:first-child button {
147+
width: 100px;
162148
}
163-
.demo-button .tiny-svg-size {
164-
margin-right: 4px;
149+
.tiny-only-icon {
150+
border-radius: 0px 6px;
165151
}
166152
</style>

0 commit comments

Comments
 (0)