Skip to content

Commit d59111b

Browse files
authored
fix(milestone): [milestone] repair component sample document (#2463)
* fix(milestones): [milestone] 修复组件示例文档 * fix(milestones): [milestone] 修复测试用例
1 parent b8bdb31 commit d59111b

17 files changed

+37
-31
lines changed

examples/sites/demos/pc/app/milestone/custom-bottom-top-composition-api.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="demo-milestone">
33
<tiny-milestone :data="milestoneData" :milestones-status="statusMap">
44
<template #top="data">
5-
<span class="f18 ml50">{{ data.slotScope.status }}</span>
5+
<span class="status f18 ml50 mb8">{{ data.slotScope.status }}</span>
66
</template>
77
<template #bottom="data">
88
<span class="f12">{{ data.slotScope.name }} {{ data.slotScope.time }}</span>
@@ -19,7 +19,7 @@ const timeActive1 = ref(1)
1919
const normalActive = ref(2)
2020
const advancedActive = ref(2)
2121
const statusMap = ref({
22-
completed: 'var(--ti-common-color-line-active)',
22+
completed: 'var(--tv-color-bg-disabled-control-active)',
2323
doing: '#7ED321',
2424
back: '#f5222d',
2525
end: '#faad14',
@@ -55,4 +55,7 @@ const milestoneData = ref([
5555
.demo-milestone ::v-deep .tiny-milestone__description-status {
5656
margin-top: 4px;
5757
}
58+
.status {
59+
display: inline-block;
60+
}
5861
</style>

examples/sites/demos/pc/app/milestone/custom-bottom-top.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="demo-milestone">
33
<tiny-milestone :data="milestoneData" :milestones-status="statusMap">
44
<template #top="data">
5-
<span class="f18 ml50">{{ data.slotScope.status }}</span>
5+
<span class="status f18 ml50 mb8">{{ data.slotScope.status }}</span>
66
</template>
77
<template #bottom="data">
88
<span class="f12">{{ data.slotScope.name }} {{ data.slotScope.time }}</span>
@@ -24,7 +24,7 @@ export default {
2424
normalActive: 2,
2525
advancedActive: 2,
2626
statusMap: {
27-
completed: 'var(--ti-common-color-line-active)',
27+
completed: 'var(--tv-color-bg-disabled-control-active)',
2828
doing: '#7ED321',
2929
back: '#f5222d',
3030
end: '#faad14',
@@ -63,4 +63,7 @@ export default {
6363
.demo-milestone ::v-deep .tiny-milestone__description-status {
6464
margin-top: 4px;
6565
}
66+
.status {
67+
display: inline-block;
68+
}
6669
</style>

examples/sites/demos/pc/app/milestone/custom-flag-composition-api.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const timeActive1 = ref(1)
1616
const normalActive = ref(2)
1717
const advancedActive = ref(2)
1818
const statusMap = ref({
19-
completed: 'var(--ti-common-color-line-active)',
19+
completed: 'var(--tv-color-bg-disabled-control-active)',
2020
doing: '#7ED321',
2121
back: '#f5222d',
2222
end: '#faad14',

examples/sites/demos/pc/app/milestone/custom-flag.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
normalActive: 2,
2222
advancedActive: 2,
2323
statusMap: {
24-
completed: 'var(--ti-common-color-line-active)',
24+
completed: 'var(--tv-color-bg-disabled-control-active)',
2525
doing: '#7ED321',
2626
back: '#f5222d',
2727
end: '#faad14',

examples/sites/demos/pc/app/milestone/data-field-mapping-composition-api.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { ref } from 'vue'
2020
import { TinyMilestone } from '@opentiny/vue'
2121
2222
const statusMap = ref({
23-
completed: 'var(--ti-common-color-line-active)',
23+
completed: 'var(--tv-color-bg-disabled-control-active)',
2424
doing: '#7ED321',
2525
back: '#f5222d',
2626
end: '#faad14',

examples/sites/demos/pc/app/milestone/data-field-mapping.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default {
2525
data() {
2626
return {
2727
statusMap: {
28-
completed: 'var(--ti-common-color-line-active)',
28+
completed: 'var(--tv-color-bg-disabled-control-active)',
2929
doing: '#7ED321',
3030
back: '#f5222d',
3131
end: '#faad14',

examples/sites/demos/pc/app/milestone/flag-before-composition-api.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import { TinyMilestone, TinyButton } from '@opentiny/vue'
1313
1414
const isBefore = ref(false)
1515
const statusMap = ref({
16-
completed: 'var(--ti-common-color-line-active)',
17-
doing: '#7ED321',
18-
back: '#f5222d',
19-
end: '#faad14',
20-
cancel: '#d9d9d9'
16+
completed: 'var(--tv-color-bg-disabled-control-active)', // 组件库基础变量
17+
doing: '#9edb58',
18+
back: '#c2c2c2',
19+
end: '#edf7df',
20+
cancel: '#f23030'
2121
})
2222
const milestoneData = ref([
2323
{

examples/sites/demos/pc/app/milestone/flag-before.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ test('旗子数据来源', async ({ page }) => {
1212
const flagAfterContents = [//, /test7使vui/, /test8/, /test6/]
1313
const flagBeforeContents = [/test1/, //, /test7使vui/, /test8/]
1414
const button = page.getByRole('button').filter({ hasText: '设置flag-before值为true' })
15-
const flagAfterLineColors = ['rgb(245, 34, 45)', 'rgb(245, 34, 45)', 'rgb(126, 211, 33)', 'rgba(0, 0, 0, 0)']
16-
const flagBeforeLineColors = ['rgba(0, 0, 0, 0)', 'rgb(245, 34, 45)', 'rgb(245, 34, 45)', 'rgb(126, 211, 33)']
15+
const flagAfterLineColors = ['rgb(194, 194, 194)', 'rgb(194, 194, 194)', 'rgb(158, 219, 88)', 'rgb(179, 214, 255)']
16+
const flagBeforeLineColors = ['rgb(179, 214, 255)', 'rgb(194, 194, 194)', 'rgb(194, 194, 194)', 'rgb(158, 219, 88)']
1717

1818
for (let i = 0; i < flagCount; i++) {
1919
const { x, y, width, height } = await flags.nth(i).boundingBox()

examples/sites/demos/pc/app/milestone/flag-before.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export default {
1919
return {
2020
isBefore: false,
2121
statusMap: {
22-
completed: 'var(--ti-common-color-line-active)',
23-
doing: '#7ED321',
24-
back: '#f5222d',
25-
end: '#faad14',
26-
cancel: '#d9d9d9'
22+
completed: 'var(--tv-color-bg-disabled-control-active)', // 组件库基础变量
23+
doing: '#9edb58',
24+
back: '#c2c2c2',
25+
end: '#edf7df',
26+
cancel: '#f23030'
2727
},
2828
milestoneData: [
2929
{

examples/sites/demos/pc/app/milestone/milestone-events-composition-api.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const timeActive1 = ref(1)
1717
const normalActive = ref(2)
1818
const advancedActive = ref(2)
1919
const statusMap = ref({
20-
completed: 'var(--ti-common-color-line-active)',
20+
completed: 'var(--tv-color-bg-disabled-control-active)',
2121
doing: '#7ED321',
2222
back: '#f5222d',
2323
end: '#faad14',

0 commit comments

Comments
 (0)