From c15edf5b6bfafc923f99103bd31d950ecc1ee2bc Mon Sep 17 00:00:00 2001 From: dufu1991 Date: Fri, 27 Dec 2024 15:44:47 +0800 Subject: [PATCH] fix(vue-renderless): [breadcrumb, bulletin-board, button, button-group] fix site: Optimize site documentation typesetting --- examples/sites/demos/pc/app/breadcrumb/base.spec.ts | 2 +- examples/sites/demos/pc/app/breadcrumb/options.spec.ts | 4 ++-- examples/sites/demos/pc/app/breadcrumb/size.spec.ts | 2 +- examples/sites/demos/pc/app/bulletin-board/events.spec.ts | 2 +- .../sites/demos/pc/app/bulletin-board/more-link.spec.ts | 2 +- examples/sites/demos/pc/app/bulletin-board/route.spec.ts | 4 ++-- .../sites/demos/pc/app/bulletin-board/tab-title.spec.ts | 2 +- examples/sites/demos/pc/app/bulletin-board/title.spec.ts | 2 +- examples/sites/demos/pc/app/bulletin-board/url.spec.ts | 4 ++-- .../demos/pc/app/bulletin-board/webdoc/bulletin-board.js | 6 +++--- .../pc/app/button-group/change-event-composition-api.vue | 2 +- .../sites/demos/pc/app/button-group/change-event.spec.ts | 6 +++--- examples/sites/demos/pc/app/button-group/change-event.vue | 2 +- .../demos/pc/app/button-group/disabled-composition-api.vue | 2 +- examples/sites/demos/pc/app/button-group/disabled.spec.ts | 2 +- examples/sites/demos/pc/app/button-group/disabled.vue | 2 +- .../sites/demos/pc/app/button-group/sup-composition-api.vue | 4 ++-- examples/sites/demos/pc/app/button-group/sup.spec.ts | 4 ++-- examples/sites/demos/pc/app/button-group/sup.vue | 4 ++-- .../sites/demos/pc/app/button-group/webdoc/button-group.js | 2 +- examples/sites/demos/pc/app/button/reset-time.spec.ts | 4 ++-- 21 files changed, 32 insertions(+), 32 deletions(-) diff --git a/examples/sites/demos/pc/app/breadcrumb/base.spec.ts b/examples/sites/demos/pc/app/breadcrumb/base.spec.ts index 85ed5491eb..c4fcefe569 100644 --- a/examples/sites/demos/pc/app/breadcrumb/base.spec.ts +++ b/examples/sites/demos/pc/app/breadcrumb/base.spec.ts @@ -9,7 +9,7 @@ test('Breadcrumb 基础用法', async ({ page }) => { const currentItem = breadcrumbItem.last() const separator = page.locator('.tiny-breadcrumb__separator') - // 面包屑导航、导航项出现,当前页导航加粗 + // 面包屑导航、导航项出现,当前页导航加粗 await expect(breadcrumb).toBeVisible() await expect(breadcrumbItem).toHaveCount(3) await expect(currentItem.last().locator('.is-link')).toHaveCSS('font-weight', '600') diff --git a/examples/sites/demos/pc/app/breadcrumb/options.spec.ts b/examples/sites/demos/pc/app/breadcrumb/options.spec.ts index 505ea26848..3300d99299 100644 --- a/examples/sites/demos/pc/app/breadcrumb/options.spec.ts +++ b/examples/sites/demos/pc/app/breadcrumb/options.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@playwright/test' -test('Breadcrumb options配置', async ({ page }) => { +test('Breadcrumb options 配置', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('breadcrumb#options') @@ -9,7 +9,7 @@ test('Breadcrumb options配置', async ({ page }) => { const currentItem = breadcrumbItem.last() const separator = breadcrumb.locator('.tiny-breadcrumb__separator') - // 面包屑导航、导航项出现,当前页导航加粗 + // 面包屑导航、导航项出现,当前页导航加粗 await expect(breadcrumb).toBeVisible() await expect(breadcrumbItem).toHaveCount(3) await expect(currentItem.last().getByRole('link')).toHaveCSS('font-weight', '600') diff --git a/examples/sites/demos/pc/app/breadcrumb/size.spec.ts b/examples/sites/demos/pc/app/breadcrumb/size.spec.ts index 8a71544942..6b89e10a24 100644 --- a/examples/sites/demos/pc/app/breadcrumb/size.spec.ts +++ b/examples/sites/demos/pc/app/breadcrumb/size.spec.ts @@ -10,7 +10,7 @@ test('Breadcrumb 尺寸设置', async ({ page }) => { const currentItem = breadcrumbItem.last() const separator = page.locator('.tiny-breadcrumb__separator') - // 面包屑导航、导航项出现,当前页导航加粗 + // 面包屑导航、导航项出现,当前页导航加粗 await expect(breadcrumb).toBeVisible() await expect(breadcrumbItem).toHaveCount(3) await expect(currentItem.last().locator('.is-link')).toHaveCSS('font-weight', '600') diff --git a/examples/sites/demos/pc/app/bulletin-board/events.spec.ts b/examples/sites/demos/pc/app/bulletin-board/events.spec.ts index 53a3c6e41e..dadc297e49 100644 --- a/examples/sites/demos/pc/app/bulletin-board/events.spec.ts +++ b/examples/sites/demos/pc/app/bulletin-board/events.spec.ts @@ -7,5 +7,5 @@ test('测试点击事件', async ({ page }) => { const modal = page.locator('.tiny-modal') await demo.getByRole('link', { name: 'TINY v2.1.3 版本' }).click() - await expect(modal.getByText('click 事件:内容为TINY v2.1.3 版本')).toBeVisible() + await expect(modal.getByText('click 事件:内容为 TINY v2.1.3 版本')).toBeVisible() }) diff --git a/examples/sites/demos/pc/app/bulletin-board/more-link.spec.ts b/examples/sites/demos/pc/app/bulletin-board/more-link.spec.ts index b27e3a67a4..9c41a3d9b9 100644 --- a/examples/sites/demos/pc/app/bulletin-board/more-link.spec.ts +++ b/examples/sites/demos/pc/app/bulletin-board/more-link.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@playwright/test' -test('BulletinBoard 显示 “更多” 链接(', async ({ page }) => { +test('BulletinBoard 显示“更多”链接 (', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('bulletin-board#more-link') diff --git a/examples/sites/demos/pc/app/bulletin-board/route.spec.ts b/examples/sites/demos/pc/app/bulletin-board/route.spec.ts index 67663eeb36..902491277b 100644 --- a/examples/sites/demos/pc/app/bulletin-board/route.spec.ts +++ b/examples/sites/demos/pc/app/bulletin-board/route.spec.ts @@ -1,12 +1,12 @@ import { test, expect } from '@playwright/test' -test('BulletinBoard 基于Route的跳转', async ({ page }) => { +test('BulletinBoard 基于 Route 的跳转', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('bulletin-board#route') const preview = page.locator('#route') const contentTitle = preview.locator('.tiny-bulletin-board__textTitle') - // 判断a标签href属性值 + // 判断 a 标签 href 属性值 await expect(contentTitle).toHaveAttribute('href', '/#/Alert') }) diff --git a/examples/sites/demos/pc/app/bulletin-board/tab-title.spec.ts b/examples/sites/demos/pc/app/bulletin-board/tab-title.spec.ts index bc92274fdf..0170060b82 100644 --- a/examples/sites/demos/pc/app/bulletin-board/tab-title.spec.ts +++ b/examples/sites/demos/pc/app/bulletin-board/tab-title.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@playwright/test' -test('BulletinBoard 选项卡标题(', async ({ page }) => { +test('BulletinBoard 选项卡标题 (', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('bulletin-board#tab-title') diff --git a/examples/sites/demos/pc/app/bulletin-board/title.spec.ts b/examples/sites/demos/pc/app/bulletin-board/title.spec.ts index 583ec7440d..9b7aaa54d6 100644 --- a/examples/sites/demos/pc/app/bulletin-board/title.spec.ts +++ b/examples/sites/demos/pc/app/bulletin-board/title.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@playwright/test' -test('BulletinBoard 公告牌标题(', async ({ page }) => { +test('BulletinBoard 公告牌标题 (', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('bulletin-board#title') diff --git a/examples/sites/demos/pc/app/bulletin-board/url.spec.ts b/examples/sites/demos/pc/app/bulletin-board/url.spec.ts index b70330dc2b..9be86ad94b 100644 --- a/examples/sites/demos/pc/app/bulletin-board/url.spec.ts +++ b/examples/sites/demos/pc/app/bulletin-board/url.spec.ts @@ -1,12 +1,12 @@ import { test, expect } from '@playwright/test' -test('BulletinBoard 基于Url的跳转', async ({ page }) => { +test('BulletinBoard 基于 Url 的跳转', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('bulletin-board#url') const preview = page.locator('#url') const contentTitle = preview.locator('.tiny-bulletin-board__textTitle') - // a标签href属性值 + // a 标签 href 属性值 await expect(contentTitle).toHaveAttribute('href', 'localhost:3000/#/webcore/zh-CN/guide/changelog') }) diff --git a/examples/sites/demos/pc/app/bulletin-board/webdoc/bulletin-board.js b/examples/sites/demos/pc/app/bulletin-board/webdoc/bulletin-board.js index a03a2c84db..bfc232a181 100644 --- a/examples/sites/demos/pc/app/bulletin-board/webdoc/bulletin-board.js +++ b/examples/sites/demos/pc/app/bulletin-board/webdoc/bulletin-board.js @@ -56,7 +56,7 @@ export default { { demoId: 'url', name: { - 'zh-CN': '基于Url的跳转', + 'zh-CN': '基于 Url 的跳转', 'en-US': 'URL-based redirection' }, desc: { @@ -70,7 +70,7 @@ export default { { demoId: 'route', name: { - 'zh-CN': '基于Route的跳转', + 'zh-CN': '基于 Route 的跳转', 'en-US': 'Route-based redirection' }, desc: { @@ -82,7 +82,7 @@ export default { { demoId: 'more-link', name: { - 'zh-CN': '显示 “更多” 链接', + 'zh-CN': '显示“更多”链接', 'en-US': 'Show More links' }, desc: { diff --git a/examples/sites/demos/pc/app/button-group/change-event-composition-api.vue b/examples/sites/demos/pc/app/button-group/change-event-composition-api.vue index 81b6e8bd7d..935bf86ca7 100644 --- a/examples/sites/demos/pc/app/button-group/change-event-composition-api.vue +++ b/examples/sites/demos/pc/app/button-group/change-event-composition-api.vue @@ -16,6 +16,6 @@ const groupData = ref([ ]) function handleChange(val) { - TinyModal.message({ message: `change事件触发了,选中值为${val}`, status: 'info' }) + TinyModal.message({ message: `change 事件触发了,选中值为 ${val}`, status: 'info' }) } diff --git a/examples/sites/demos/pc/app/button-group/change-event.spec.ts b/examples/sites/demos/pc/app/button-group/change-event.spec.ts index 98605d6220..1d53bd4196 100644 --- a/examples/sites/demos/pc/app/button-group/change-event.spec.ts +++ b/examples/sites/demos/pc/app/button-group/change-event.spec.ts @@ -1,6 +1,6 @@ import { test, expect } from '@playwright/test' -test('按钮组change事件', async ({ page }) => { +test('按钮组 change 事件', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('button-group#change-event') @@ -9,7 +9,7 @@ test('按钮组change事件', async ({ page }) => { const modal = page.locator('.tiny-modal') await btn.nth(1).click() - await expect(modal.filter({ hasText: 'change事件触发了,选中值为Button2' })).toBeVisible() + await expect(modal.filter({ hasText: 'change 事件触发了,选中值为 Button2' })).toBeVisible() await btn.nth(2).click() - await expect(modal.filter({ hasText: 'change事件触发了,选中值为Button3' })).toBeVisible() + await expect(modal.filter({ hasText: 'change 事件触发了,选中值为 Button3' })).toBeVisible() }) diff --git a/examples/sites/demos/pc/app/button-group/change-event.vue b/examples/sites/demos/pc/app/button-group/change-event.vue index 38bc0a5a20..d531e0916b 100644 --- a/examples/sites/demos/pc/app/button-group/change-event.vue +++ b/examples/sites/demos/pc/app/button-group/change-event.vue @@ -23,7 +23,7 @@ export default { }, methods: { handleChange(val) { - TinyModal.message({ message: `change事件触发了,选中值为${val}`, status: 'info' }) + TinyModal.message({ message: `change 事件触发了,选中值为 ${val}`, status: 'info' }) } } } diff --git a/examples/sites/demos/pc/app/button-group/disabled-composition-api.vue b/examples/sites/demos/pc/app/button-group/disabled-composition-api.vue index a51f60d806..6c95a4b28d 100644 --- a/examples/sites/demos/pc/app/button-group/disabled-composition-api.vue +++ b/examples/sites/demos/pc/app/button-group/disabled-composition-api.vue @@ -22,7 +22,7 @@ const groupData = ref([ const disabledGroup = ref([ { text: 'Button1', value: 1 }, - { text: 'Button2', value: 2, disabled: true, tip: '因为xxx原因被禁用' }, + { text: 'Button2', value: 2, disabled: true, tip: '因为 xxx 原因被禁用' }, { text: 'Button3', value: 3 } ]) diff --git a/examples/sites/demos/pc/app/button-group/disabled.spec.ts b/examples/sites/demos/pc/app/button-group/disabled.spec.ts index 683782a450..6f63b0f3cf 100644 --- a/examples/sites/demos/pc/app/button-group/disabled.spec.ts +++ b/examples/sites/demos/pc/app/button-group/disabled.spec.ts @@ -26,5 +26,5 @@ test('测试按钮是否禁用', async ({ page }) => { // 按钮悬浮提示 await buttonGroup3.locator('button').nth(1).hover() - await expect(page.getByText('因为xxx原因被禁用')).toBeVisible() + await expect(page.getByText('因为 xxx 原因被禁用')).toBeVisible() }) diff --git a/examples/sites/demos/pc/app/button-group/disabled.vue b/examples/sites/demos/pc/app/button-group/disabled.vue index 9c42d2abe0..6a5fe23b05 100644 --- a/examples/sites/demos/pc/app/button-group/disabled.vue +++ b/examples/sites/demos/pc/app/button-group/disabled.vue @@ -26,7 +26,7 @@ export default { ], disabledGroup: [ { text: 'Button1', value: 1 }, - { text: 'Button2', value: 2, disabled: true, tip: '因为xxx原因被禁用' }, + { text: 'Button2', value: 2, disabled: true, tip: '因为 xxx 原因被禁用' }, { text: 'Button3', value: 3 } ] } diff --git a/examples/sites/demos/pc/app/button-group/sup-composition-api.vue b/examples/sites/demos/pc/app/button-group/sup-composition-api.vue index ac43891f00..dfe4aca24a 100644 --- a/examples/sites/demos/pc/app/button-group/sup-composition-api.vue +++ b/examples/sites/demos/pc/app/button-group/sup-composition-api.vue @@ -55,7 +55,7 @@ const groupData = ref([ value: 'Button3', sup: { class: 'sup-text', - text: '8折' + text: '8 折' } }, { @@ -64,7 +64,7 @@ const groupData = ref([ sup: { slot: 'button4', class: 'sup-slot', - text: '8折' + text: '8 折' } } ]) diff --git a/examples/sites/demos/pc/app/button-group/sup.spec.ts b/examples/sites/demos/pc/app/button-group/sup.spec.ts index d89ce7ce60..6341a12b63 100644 --- a/examples/sites/demos/pc/app/button-group/sup.spec.ts +++ b/examples/sites/demos/pc/app/button-group/sup.spec.ts @@ -21,12 +21,12 @@ test('测试选块角标', async ({ page }) => { // 测试文字角标 const sup3 = getSup(item.nth(2)) - await expect(sup3).toHaveText('8折') + await expect(sup3).toHaveText('8 折') await expect(sup3).toHaveClass(/tiny-group-item__sup-text/) // 测试自定义角标 const sup4 = getSup(item.nth(3)) await expect(sup4.locator('svg')).toBeVisible() - await expect(sup4).toHaveText('8折') + await expect(sup4).toHaveText('8 折') await expect(sup4).toHaveClass(/sup-slot/) }) diff --git a/examples/sites/demos/pc/app/button-group/sup.vue b/examples/sites/demos/pc/app/button-group/sup.vue index 1a1f173e71..d8fbd61368 100644 --- a/examples/sites/demos/pc/app/button-group/sup.vue +++ b/examples/sites/demos/pc/app/button-group/sup.vue @@ -62,7 +62,7 @@ export default { value: 'Button3', sup: { class: 'sup-text', - text: '8折' + text: '8 折' } }, { @@ -71,7 +71,7 @@ export default { sup: { slot: 'button4', class: 'sup-slot', - text: '8折' + text: '8 折' } } ], diff --git a/examples/sites/demos/pc/app/button-group/webdoc/button-group.js b/examples/sites/demos/pc/app/button-group/webdoc/button-group.js index fcb0f906d8..8bd5fa05be 100644 --- a/examples/sites/demos/pc/app/button-group/webdoc/button-group.js +++ b/examples/sites/demos/pc/app/button-group/webdoc/button-group.js @@ -37,7 +37,7 @@ export default { }, desc: { 'zh-CN': - '

通过 disabled 设置按钮组是否禁用,数据项设置 disabled 属性可以禁用单个按钮,数据项设置 tip 属性(v3.17.0版本增加此功能)增加按钮悬浮提示功能。

', + '

通过 disabled 设置按钮组是否禁用,数据项设置 disabled 属性可以禁用单个按钮,数据项设置 tip 属性 (v3.17.0 版本增加此功能) 增加按钮悬浮提示功能。

', 'en-US': '

You can set whether to disable the button group through disabled. You can set the disabled attribute to disable a single button. You can set the tip attribute to add the reason for disabling the button.

' }, diff --git a/examples/sites/demos/pc/app/button/reset-time.spec.ts b/examples/sites/demos/pc/app/button/reset-time.spec.ts index 337a855cfc..a14b6f3781 100644 --- a/examples/sites/demos/pc/app/button/reset-time.spec.ts +++ b/examples/sites/demos/pc/app/button/reset-time.spec.ts @@ -10,7 +10,7 @@ test('测试按钮禁用事件', async ({ page }) => { const noDisabled = demo.getByRole('button', { name: '无禁用' }) const fiveSecondDisabled = demo.getByRole('button', { name: '禁用 5 秒' }) - // 默认禁用1S + // 默认禁用 1S await defalutDisabled.click() await expect(defalutDisabled).toBeDisabled() await page.waitForTimeout(1000) @@ -20,7 +20,7 @@ test('测试按钮禁用事件', async ({ page }) => { await noDisabled.click() await expect(noDisabled).not.toBeDisabled() - // 自定义禁用5s + // 自定义禁用 5s await fiveSecondDisabled.click() await expect(fiveSecondDisabled).toBeDisabled() await page.waitForTimeout(5000)