Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vue-renderless): [breadcrumb, bulletin-board, button, button-group,calendar, calendar-view, card, carousel, cascader, cascader-panel, chart,checkbox, collapse, color-picker, color-select-panel,company,config-provider,container,crop,currency,date-picker,dept,dialog-box,dialog-select,directives,divider,drawer,drop-roles,drop-times,dropdown,espace,fall-menu,file-upload,filter-panel,float-button,floatbar,flowchart,fluent-editor,form,fullscreen] fix site: Optimize site documentation typesetting #2709

Merged
merged 17 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
0d99213
feat(site):Optimize the typography of CJK characters, mix Chinese and…
dufu1991 Dec 21, 2024
0b4be1b
Merge branch 'opentiny:dev' into dufu1991/feat-site-ptimize-typesetting
dufu1991 Dec 25, 2024
de5ae7c
feat(site):Optimize the typography of CJK characters, mix Chinese and…
dufu1991 Dec 25, 2024
5236677
Merge branch 'opentiny:dev' into dufu1991/feat-site-ptimize-typesetting
dufu1991 Dec 25, 2024
93c55c9
Merge branch 'opentiny:dev' into dufu1991/feat-site-ptimize-typesetting
dufu1991 Dec 25, 2024
add7ed0
fix(vue-renderless): [amount, anchor, area, autocomplete] fix site: O…
dufu1991 Dec 25, 2024
e4797cf
fix(vue-renderless): [base-select] fix site: Optimize site documentat…
dufu1991 Dec 25, 2024
b57dc9e
fix(vue-renderless): [base-select] fix site: Optimize site documentat…
dufu1991 Dec 25, 2024
a085874
fix(vue-renderless): [base-select] fix site: Optimize site documentat…
dufu1991 Dec 26, 2024
5525a60
Merge branch 'opentiny:dev' into dufu1991/feat-site-ptimize-typesetting
dufu1991 Dec 26, 2024
bb2ada5
Merge branch 'opentiny:dev' into dufu1991/feat-site-ptimize-typesetting
dufu1991 Dec 27, 2024
c15edf5
fix(vue-renderless): [breadcrumb, bulletin-board, button, button-grou…
dufu1991 Dec 27, 2024
5be8e63
fix(vue-renderless): [calendar, calendar-view, card, carousel, cascad…
dufu1991 Dec 27, 2024
4338e78
fix(vue-renderless): [checkbox, collapse, color-picker, color-select-…
dufu1991 Dec 27, 2024
e85129a
fix(vue-renderless): [breadcrumb, bulletin-board, button, button-grou…
dufu1991 Dec 27, 2024
d1afe7f
fix(vue-renderless): [date-picker,dept,dialog-box,dialog-select,direc…
dufu1991 Dec 27, 2024
80a89b7
fix(vue-renderless): [espace,fall-menu,file-upload,filter-panel,float…
dufu1991 Dec 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/breadcrumb/base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/breadcrumb/options.spec.ts
Original file line number Diff line number Diff line change
@@ -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')

Expand All @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/breadcrumb/size.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const data = ref([
])
function contentClick(item) {
TinyModal.message({
message: '触发 contentClick 事件:内容为' + item.text,
message: '触发 contentClick 事件:内容为 ' + item.text,
status: 'info'
})
}
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/bulletin-board/events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/bulletin-board/events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default {
methods: {
contentClick(item) {
TinyModal.message({
message: '触发 contentClick 事件:内容为' + item.text,
message: '触发 contentClick 事件:内容为 ' + item.text,
status: 'info'
})
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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')

Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/bulletin-board/route.spec.ts
Original file line number Diff line number Diff line change
@@ -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')
})
Original file line number Diff line number Diff line change
@@ -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')

Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/bulletin-board/title.spec.ts
Original file line number Diff line number Diff line change
@@ -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')

Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/bulletin-board/url.spec.ts
Original file line number Diff line number Diff line change
@@ -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')
})
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default {
{
demoId: 'url',
name: {
'zh-CN': '基于Url的跳转',
'zh-CN': '基于 Url 的跳转',
'en-US': 'URL-based redirection'
},
desc: {
Expand All @@ -70,7 +70,7 @@ export default {
{
demoId: 'route',
name: {
'zh-CN': '基于Route的跳转',
'zh-CN': '基于 Route 的跳转',
'en-US': 'Route-based redirection'
},
desc: {
Expand All @@ -82,7 +82,7 @@ export default {
{
demoId: 'more-link',
name: {
'zh-CN': '显示 “更多” 链接',
'zh-CN': '显示“更多”链接',
'en-US': 'Show More links'
},
desc: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ const groupData = ref([
])

function handleChange(val) {
TinyModal.message({ message: `change事件触发了,选中值为${val}`, status: 'info' })
TinyModal.message({ message: `change 事件触发了,选中值为 ${val}`, status: 'info' })
}
</script>
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/button-group/change-event.spec.ts
Original file line number Diff line number Diff line change
@@ -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')

Expand All @@ -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()
})
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/button-group/change-event.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
},
methods: {
handleChange(val) {
TinyModal.message({ message: `change事件触发了,选中值为${val}`, status: 'info' })
TinyModal.message({ message: `change 事件触发了,选中值为 ${val}`, status: 'info' })
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
])
</script>
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/button-group/disabled.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/button-group/disabled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const groupData = ref([
value: 'Button3',
sup: {
class: 'sup-text',
text: '8折'
text: '8 折'
}
},
{
Expand All @@ -64,7 +64,7 @@ const groupData = ref([
sup: {
slot: 'button4',
class: 'sup-slot',
text: '8折'
text: '8 折'
}
}
])
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/button-group/sup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
})
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/button-group/sup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default {
value: 'Button3',
sup: {
class: 'sup-text',
text: '8折'
text: '8 折'
}
},
{
Expand All @@ -71,7 +71,7 @@ export default {
sup: {
slot: 'button4',
class: 'sup-slot',
text: '8折'
text: '8 折'
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {
},
desc: {
'zh-CN':
'<p>通过 <code>disabled</code> 设置按钮组是否禁用,数据项设置 <code>disabled</code> 属性可以禁用单个按钮,数据项设置 <code>tip</code> 属性(v3.17.0版本增加此功能)增加按钮悬浮提示功能。</p>',
'<p>通过 <code>disabled</code> 设置按钮组是否禁用,数据项设置 <code>disabled</code> 属性可以禁用单个按钮,数据项设置 <code>tip</code> 属性 (v3.17.0 版本增加此功能) 增加按钮悬浮提示功能。</p>',
'en-US':
'<p>You can set whether to disable the button group through <code>disabled</code>. You can set the <code>disabled</code> attribute to disable a single button. You can set the <code>tip</code> attribute to add the reason for disabling the button. </p></p>'
},
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/button/reset-time.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,63 @@ import { TinyCalendarView } from '@opentiny/vue'

const eventslist = ref([
{
title: '前端周会1',
title: '前端周会 1',
start: '2023-05-15 8:30:00',
end: '2023-05-15 9:00:00',
content: '日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注',
theme: 'blue'
},
{
title: '前端周会2',
title: '前端周会 2',
start: '2023-05-15 10:00:00',
end: '2023-05-15 12:00:00',
content: '日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注',
theme: 'green'
},
{
title: '前端周会2-1',
title: '前端周会 2-1',
start: '2023-05-15 13:00:00',
end: '2023-05-15 15:00:00',
content: '日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注',
theme: 'red'
},
{
title: '前端周会3',
title: '前端周会 3',
start: '2023-05-16 9:00:00',
end: '2023-05-16 10:00:00',
content: '日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注',
theme: 'yellow'
},
{
title: '前端周会4',
title: '前端周会 4',
start: '2023-05-16 11:00:00',
end: '2023-05-16 14:00:00',
content: '日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注',
theme: 'purple'
},
{
title: '前端周会5',
title: '前端周会 5',
start: '2023-05-25 8:00:00',
end: '2023-05-25 9:00:00',
content: '日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注',
theme: 'cyan'
},
{
title: '前端周会6',
title: '前端周会 6',
start: '2023-05-26 8:00:00',
end: '2023-05-26 11:30:00',
content: '日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注',
theme: 'blue'
},
{
title: '前端周会7',
title: '前端周会 7',
start: '2023-05-27 8:30:00',
end: '2023-05-27 9:30:00',
content: '日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注',
theme: 'blue'
},
{
title: '节假日25-28',
title: '节假日 25-28',
start: '2023-05-25 10:30:00',
end: '2023-05-28 03:30:00',
content: '日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注日程备注',
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/calendar-view/basic-usage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ test('基本用法', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('calendar-view#basic-usage')
const demoPage = page.locator('#basic-usage')
const fixWeek2 = page.getByText('前端周会2').first()
const popWeek2 = page.locator('.title').filter({ hasText: '前端周会2' })
const fixWeek2 = page.getByText('前端周会 2').first()
const popWeek2 = page.locator('.title').filter({ hasText: '前端周会 2' })
// 校验固定内容
await expect(demoPage).toHaveText(/15前端周会2前端周会2-1前端周会1/)
await expect(demoPage).toHaveText(/16前端周会4前端周会3/)
await expect(demoPage).toHaveText(/25节假日25-28前端周会5/)
await expect(demoPage.locator('.events-end').first()).toHaveClass(/bg-green/)
// 校验hover弹出框
// 校验 hover 弹出框
await fixWeek2.hover()
await page.waitForTimeout(200)
await expect(popWeek2).toBeVisible()
Expand Down
Loading
Loading