Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ import { Milestone as TinyMilestone } from '@opentiny/vue'
// statusMap 对应 milestoneData的status;显示的背景色样式(可以是旗,可以是步骤条)
const statusMap = ref({
// 对应 status = completed
completed: 'var(--ti-common-color-line-active)',
completed: '#1890ff',
// 对应 status = doing
doing: '#9ec591',
doing: '#7eb7fc',
// 对应 status = back
back: '#97a7db',
back: '#ff8800',
// 对应 status = end
end: '#faad14',
// 对应 status = cancel
cancel: '#d9d9d9'
cancel: '#fce2e0'
})

// 数据源
Expand Down
12 changes: 6 additions & 6 deletions examples/sites/demos/pc/app/milestone/basic-usage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,27 @@ test('基本用法', async ({ page }) => {
const iconStyles = [
{
'background-color': 'rgb(255, 255, 255)',
'color': 'rgb(25, 25, 25)',
'color': 'rgb(24, 144, 255)',
'box-shadow': 'none'
},
{
'background-color': 'rgb(255, 255, 255)',
'color': 'rgb(25, 25, 25)',
'color': 'rgb(24, 144, 255)',
'box-shadow': 'none'
},
{
'background-color': 'rgb(158, 197, 145)',
'background-color': 'rgb(126, 183, 252)',
'color': 'rgb(255, 255, 255)',
'box-shadow': 'none'
},
{
'background-color': 'rgb(255, 255, 255)',
'color': 'rgb(217, 217, 217)',
'color': 'rgb(252, 226, 224)',
'box-shadow': 'none'
},
{
'background-color': 'rgb(255, 255, 255)',
'color': 'rgb(151, 167, 219)',
'color': 'rgb(255, 136, 0)',
'box-shadow': 'none'
},
{
Expand All @@ -56,7 +56,7 @@ test('基本用法', async ({ page }) => {
]
const titles = ['completed 状态', 'completed 状态', 'doing 状态', 'cancel 状态', 'back 状态', 'end 状态']
const flagContents = [/引导用户按照流程完成任务/, /test7欢迎使用vui/, /test8/, /test6/]
const flagLineColors = ['rgb(151, 167, 219)', 'rgb(151, 167, 219)', 'rgb(158, 197, 145)', 'rgb(217, 217, 217)']
const flagLineColors = ['rgb(255, 136, 0)', 'rgb(255, 136, 0)', 'rgb(126, 183, 252)', 'rgb(252, 226, 224)']

await expect(nodes).toHaveCount(nodeCount)
await expect(nodeLines).toHaveCount(nodeCount)
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/milestone/basic-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ export default {
// 对应 status = completed
completed: '#1890ff',
// 对应 status = doing
doing: '#9ec591',
doing: '#7eb7fc',
// 对应 status = back
back: '#97a7db',
back: '#ff8800',
// 对应 status = end
end: '#faad14',
// 对应 status = cancel
cancel: '#d9d9d9'
cancel: '#fce2e0'
},
// 数据源
milestoneData: [
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/milestone/flag-before.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ test('旗子数据来源', async ({ page }) => {
const flagAfterContents = [/引导用户按照流程完成任务/, /test7欢迎使用vui/, /test8/, /test6/]
const flagBeforeContents = [/test1已完成/, /引导用户按照流程完成任务/, /test7欢迎使用vui/, /test8/]
const button = page.getByRole('button').filter({ hasText: '设置flag-before值为true' })
const flagAfterLineColors = ['rgb(245, 34, 45)', 'rgb(245, 34, 45)', 'rgb(126, 211, 33)', 'rgb(25, 25, 25)']
const flagBeforeLineColors = ['rgb(25, 25, 25)', 'rgb(245, 34, 45)', 'rgb(245, 34, 45)', 'rgb(126, 211, 33)']
const flagAfterLineColors = ['rgb(245, 34, 45)', 'rgb(245, 34, 45)', 'rgb(126, 211, 33)', 'rgba(0, 0, 0, 0)']
const flagBeforeLineColors = ['rgba(0, 0, 0, 0)', 'rgb(245, 34, 45)', 'rgb(245, 34, 45)', 'rgb(126, 211, 33)']

for (let i = 0; i < flagCount; i++) {
const { x, y, width, height } = await flags.nth(i).boundingBox()
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/milestone/show-number.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ test('序号显示', async ({ page }) => {
const iconStyles = [
{
'background-color': 'rgb(255, 255, 255)',
'color': 'rgb(25, 25, 25)',
'color': 'rgb(0, 0, 0)',
'box-shadow': 'none'
},
{
'background-color': 'rgb(255, 255, 255)',
'color': 'rgb(25, 25, 25)',
'color': 'rgb(0, 0, 0)',
'box-shadow': 'none'
},
{
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/milestone/solid-style.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ test('实心显示', async ({ page }) => {
const iconStyles = [
{
'background-color': 'rgb(255, 255, 255)',
'color': 'rgb(25, 25, 25)',
'color': 'rgb(0, 0, 0)',
'box-shadow': 'none'
},
{
'background-color': 'rgb(255, 255, 255)',
'color': 'rgb(25, 25, 25)',
'color': 'rgb(0, 0, 0)',
'box-shadow': 'none'
},
{
Expand Down Expand Up @@ -98,6 +98,6 @@ test('实心显示', async ({ page }) => {
await button.click()

for (let i = 0; i < 2; i++) {
await expect(nodeIcons.nth(i)).toHaveCSS('background-color', 'rgb(25, 25, 25)')
await expect(nodeIcons.nth(i)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
}
})
1 change: 0 additions & 1 deletion packages/theme/src/milestone/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
left: ~'calc(50% - 29px)';
bottom: 5px;
width: 58px;
text-align: center;
z-index: 1;

&:hover {
Expand Down
Loading