Skip to content

Commit b2215cb

Browse files
authored
feat(steps): add content-center prop to steps and add two saas icons (#2907)
1 parent ac1f4be commit b2215cb

File tree

22 files changed

+267
-7
lines changed

22 files changed

+267
-7
lines changed

examples/sites/demos/apis/steps.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@ export default {
2929
pcDemo: 'advanced-steps',
3030
mfDemo: 'advanced-steps'
3131
},
32+
{
33+
name: 'content-center',
34+
type: 'string',
35+
defaultValue: 'false',
36+
desc: {
37+
'zh-CN': '使步骤条内容默认居中显示',
38+
'en-US': 'Make the step bar content appear centered by default'
39+
},
40+
meta: {
41+
stable: '3.22.0'
42+
},
43+
mode: ['mobile-first', 'pc'],
44+
pcDemo: 'content-center',
45+
mfDemo: 'content-center'
46+
},
3247
{
3348
name: 'count-field',
3449
type: 'string',
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<template>
2+
<tiny-steps ref="steps" advanced content-center flex :data="data" :active="advancedActive"></tiny-steps>
3+
</template>
4+
5+
<script>
6+
import { TinySteps } from '@opentiny/vue'
7+
8+
export default {
9+
components: {
10+
TinySteps
11+
},
12+
data() {
13+
return {
14+
advancedActive: 2,
15+
data: [
16+
{
17+
name: '默认',
18+
status: '',
19+
description:
20+
'Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional '
21+
},
22+
{ name: '已完成', status: 'done', description: 'done 已完成' },
23+
{ name: '进行中', status: 'doing', description: 'doing 进行中' },
24+
{ name: '错误', status: 'error', description: 'error 错误' },
25+
{
26+
name: '已禁用',
27+
status: 'disabled',
28+
description:
29+
'disabled 已禁用,描述内容描述内容,超出部分隐藏,描述内容,超出部分隐藏,描述内容,超出部分隐藏,描述内容,超出部分隐藏'
30+
}
31+
]
32+
}
33+
}
34+
}
35+
</script>

examples/sites/demos/mobile-first/app/steps/webdoc/steps.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ export default {
3939
},
4040
codeFiles: ['advanced-steps.vue']
4141
},
42+
{
43+
demoId: 'content-center',
44+
name: {
45+
'zh-CN': '内容居中',
46+
'en-US': 'Content center'
47+
},
48+
desc: {
49+
'zh-CN': '<p>添加 <code>content-center</code> 使步骤条内容默认居中显示。</p>',
50+
'en-US':
51+
'<p>Adding the attribute<code>content center</code>can make the step bar content appear centered by default.</p>'
52+
},
53+
codeFiles: ['content-center.vue']
54+
},
4255
{
4356
demoId: 'advanced-flex',
4457
name: {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<template>
2+
<tiny-steps ref="steps" advanced content-center flex :data="data" :active="advancedActive"></tiny-steps>
3+
</template>
4+
5+
<script setup>
6+
import { ref } from 'vue'
7+
import { TinySteps } from '@opentiny/vue'
8+
9+
const advancedActive = ref(2)
10+
const data = ref([
11+
{
12+
name: '默认',
13+
status: '',
14+
description:
15+
'Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional '
16+
},
17+
{ name: '已完成', status: 'done', description: 'done 已完成' },
18+
{ name: '进行中', status: 'doing', description: 'doing 进行中' },
19+
{ name: '错误', status: 'error', description: 'error 错误' },
20+
{
21+
name: '已禁用',
22+
status: 'disabled',
23+
description:
24+
'disabled 已禁用,描述内容描述内容,超出部分隐藏,描述内容,超出部分隐藏,描述内容,超出部分隐藏,描述内容,超出部分隐藏'
25+
}
26+
])
27+
</script>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<template>
2+
<tiny-steps ref="steps" advanced content-center flex :data="data" :active="advancedActive"></tiny-steps>
3+
</template>
4+
5+
<script>
6+
import { TinySteps } from '@opentiny/vue'
7+
8+
export default {
9+
components: {
10+
TinySteps
11+
},
12+
data() {
13+
return {
14+
advancedActive: 2,
15+
data: [
16+
{
17+
name: '默认',
18+
status: '',
19+
description:
20+
'Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional '
21+
},
22+
{ name: '已完成', status: 'done', description: 'done 已完成' },
23+
{ name: '进行中', status: 'doing', description: 'doing 进行中' },
24+
{ name: '错误', status: 'error', description: 'error 错误' },
25+
{
26+
name: '已禁用',
27+
status: 'disabled',
28+
description:
29+
'disabled 已禁用,描述内容描述内容,超出部分隐藏,描述内容,超出部分隐藏,描述内容,超出部分隐藏,描述内容,超出部分隐藏'
30+
}
31+
]
32+
}
33+
}
34+
}
35+
</script>

examples/sites/demos/pc/app/steps/webdoc/steps.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ export default {
5252
},
5353
codeFiles: ['advanced-steps.vue']
5454
},
55+
{
56+
demoId: 'content-center',
57+
name: {
58+
'zh-CN': '内容居中',
59+
'en-US': 'Content center'
60+
},
61+
desc: {
62+
'zh-CN': '<p>添加 <code>content-center</code> 使步骤条内容默认居中显示。</p>',
63+
'en-US':
64+
'<p>Adding the attribute<code>content center</code>can make the step bar content appear centered by default.</p>'
65+
},
66+
codeFiles: ['content-center.vue']
67+
},
5568
{
5669
demoId: 'size',
5770
name: {

packages/theme-saas/src/steps/index.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,10 @@
314314
@apply text-xs;
315315
@apply truncate;
316316
}
317+
318+
&.content-center {
319+
@apply flex-none;
320+
}
317321
}
318322
}
319323

Lines changed: 15 additions & 0 deletions
Loading
Lines changed: 15 additions & 0 deletions
Loading

packages/theme-saas/src/tabs/index.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@
142142

143143
&__nav-next,
144144
&__nav-prev {
145+
@apply flex;
146+
@apply items-center;
145147
@apply absolute;
146148
@apply cursor-pointer;
147149
@apply leading-10;

0 commit comments

Comments
 (0)