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): [autocomplete,base-select,amount,anchor,area] fix site: Optimize site documentation typesetting #2695

Merged
merged 9 commits into from
Dec 26, 2024
Merged
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/anchor/change.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('anchor#change')

Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/anchor/webdoc/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
{
demoId: 'change',
name: {
'zh-CN': 'change事件',
'zh-CN': 'change 事件',
'en-US': 'change event'
},
desc: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ const value = ref(['3623', '4199', '649991', '661414'])

function changeRegion(value) {
TinyNotify({
message: '当前选择的 Region 为:' + value,
message: '当前选择的 Region 为' + value,
position: 'top-right'
})
}

function changeRep(value) {
TinyNotify({
message: '当前选择的 Rep 为:' + value,
message: '当前选择的 Rep 为' + value,
position: 'top-right'
})
}

function changeOffice(value) {
TinyNotify({
message: '当前选择的 Office 为:' + value,
message: '当前选择的 Office 为' + value,
position: 'top-right'
})
}
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/area/area-events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ export default {
methods: {
changeRegion(value) {
TinyNotify({
message: '当前选择的 Region 为:' + value,
message: '当前选择的 Region 为' + value,
position: 'top-right'
})
},
changeRep(value) {
TinyNotify({
message: '当前选择的 Rep 为:' + value,
message: '当前选择的 Rep 为' + value,
position: 'top-right'
})
},
changeOffice(value) {
TinyNotify({
message: '当前选择的 Office 为:' + value,
message: '当前选择的 Office 为' + value,
position: 'top-right'
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function getJCR() {
id: '3623',
id_and_type: '3623JCR',
parent_and_type: null,
name: 'A公司销售服务部',
name: 'A 公司销售服务部',
date_from: '2005/06/21 00:00:00',
name_en: 'Consumer BG Marketing and Sales Service Dept',
parent_type: null,
Expand All @@ -36,7 +36,7 @@ function getJCR() {
id: '650561',
id_and_type: '650561JCR',
parent_and_type: null,
name: 'A公司销售服务部(东莞)',
name: 'A 公司销售服务部(东莞)',
date_from: '2012/09/27 00:00:00',
name_en: 'Consumer BG Marketing and Sales Service Dept (Dongguan)',
parent_type: null,
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/area/custom-service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test('测试自定义服务', async ({ page }) => {
await getSelectItem(areaRep).first().click()
await areaInput.nth(3).click()
await getSelectItem(areaOffice).first().click()
await expect(areaInput.first()).toHaveValue('A公司销售服务部')
await expect(areaInput.first()).toHaveValue('A 公司销售服务部')
await expect(areaInput.nth(1)).toHaveValue('火星终端子公司')
await expect(areaInput.nth(2)).toHaveValue('北京代表处')
await expect(areaInput.nth(3)).toHaveValue('牙买加办事处')
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/area/custom-service.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default {
id: '3623',
id_and_type: '3623JCR',
parent_and_type: null,
name: 'A公司销售服务部',
name: 'A 公司销售服务部',
date_from: '2005/06/21 00:00:00',
name_en: 'Consumer BG Marketing and Sales Service Dept',
parent_type: null,
Expand All @@ -43,7 +43,7 @@ export default {
id: '650561',
id_and_type: '650561JCR',
parent_and_type: null,
name: 'A公司销售服务部(东莞)',
name: 'A 公司销售服务部(东莞)',
date_from: '2012/09/27 00:00:00',
name_en: 'Consumer BG Marketing and Sales Service Dept (Dongguan)',
parent_type: null,
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/area/webdoc/area.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default {
'en-US': 'Set Disabled'
},
desc: {
'zh-CN': '<p>通过 <code>disabled</code> 设置组件禁用默认值为 false 。</p>\n',
'zh-CN': '<p>通过 <code>disabled</code> 设置组件禁用默认值为 false。</p>\n',
'en-US': '<p>Use <code>disabled</code> to disable the component. The default value is false. </p>\n'
},
codeFiles: ['disabled.vue']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@ function createFilter(queryString) {
function loadAll() {
return [
{
value: 'GFD科技YX公司',
value: 'GFD 科技 YX 公司',
address: '福州'
},
{
value: 'WWWW科技YX公司',
value: 'WWWW 科技 YX 公司',
address: '深圳福田区'
},
{
value: 'RFV有限责任公司',
value: 'RFV 有限责任公司',
address: '中山市'
},
{
value: 'TGBYX公司',
value: 'TGBYX 公司',
address: '梅州'
},
{
value: 'YHN科技YX公司',
value: 'YHN 科技 YX 公司',
address: '韶关'
},
{
value: '康康物业YX公司',
value: '康康物业 YX 公司',
address: '广州天河区'
}
]
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/autocomplete/basic-usage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('basic-usage', async ({ page }) => {
await expect(autocomplete).toBeVisible()

await page.getByRole('textbox', { name: '请输入内容', exact: true }).click()
await page.getByRole('option', { name: 'GFD科技YX公司' }).click()
await page.getByRole('option', { name: 'GFD 科技 YX 公司' }).click()

await expect(page.getByRole('textbox', { name: '请输入内容', exact: true })).toHaveValue('GFD科技YX公司')
await expect(page.getByRole('textbox', { name: '请输入内容', exact: true })).toHaveValue('GFD 科技 YX 公司')
})
12 changes: 6 additions & 6 deletions examples/sites/demos/pc/app/autocomplete/basic-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ export default {
loadAll() {
return [
{
value: 'GFD科技YX公司',
value: 'GFD 科技 YX 公司',
address: '福州'
},
{
value: 'WWWW科技YX公司',
value: 'WWWW 科技 YX 公司',
address: '深圳福田区'
},
{
value: 'RFV有限责任公司',
value: 'RFV 有限责任公司',
address: '中山市'
},
{
value: 'TGBYX公司',
value: 'TGBYX 公司',
address: '梅州'
},
{
value: 'YHN科技YX公司',
value: 'YHN 科技 YX 公司',
address: '韶关'
},
{
value: '康康物业YX公司',
value: '康康物业 YX 公司',
address: '广州天河区'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@ function createFilter(queryString) {
function loadAll() {
return [
{
value: 'GFD科技YX公司',
value: 'GFD 科技 YX 公司',
address: '福州'
},
{
value: 'WWWW科技YX公司',
value: 'WWWW 科技 YX 公司',
address: '深圳福田区'
},
{
value: 'RFV有限责任公司',
value: 'RFV 有限责任公司',
address: '中山市'
},
{
value: 'TGBYX公司',
value: 'TGBYX 公司',
address: '梅州'
},
{
value: 'YHN科技YX公司',
value: 'YHN 科技 YX 公司',
address: '韶关'
},
{
value: '康康物业YX公司',
value: '康康物业 YX 公司',
address: '广州天河区'
}
]
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/autocomplete/clearable.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test('可清除', async ({ page }) => {

const demo = page.locator('#clearable')
await demo.getByRole('textbox', { name: '请输入内容', exact: true }).click()
await page.getByRole('option', { name: 'WWWW科技YX公司' }).click()
await page.getByRole('option', { name: 'WWWW 科技 YX 公司' }).click()
await demo.getByRole('textbox', { name: '请输入内容', exact: true }).hover()
await demo.getByRole('combobox').locator('.tiny-input__clear').click()

Expand Down
12 changes: 6 additions & 6 deletions examples/sites/demos/pc/app/autocomplete/clearable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ export default {
loadAll() {
return [
{
value: 'GFD科技YX公司',
value: 'GFD 科技 YX 公司',
address: '福州'
},
{
value: 'WWWW科技YX公司',
value: 'WWWW 科技 YX 公司',
address: '深圳福田区'
},
{
value: 'RFV有限责任公司',
value: 'RFV 有限责任公司',
address: '中山市'
},
{
value: 'TGBYX公司',
value: 'TGBYX 公司',
address: '梅州'
},
{
value: 'YHN科技YX公司',
value: 'YHN 科技 YX 公司',
address: '韶关'
},
{
value: '康康物业YX公司',
value: '康康物业 YX 公司',
address: '广州天河区'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@ function createFilter(queryString) {
function loadAll() {
return [
{
value: 'GFD科技YX公司',
value: 'GFD 科技 YX 公司',
address: '福州'
},
{
value: 'WWWW科技YX公司',
value: 'WWWW 科技 YX 公司',
address: '深圳福田区'
},
{
value: 'RFV有限责任公司',
value: 'RFV 有限责任公司',
address: '中山市'
},
{
value: 'TGBYX公司',
value: 'TGBYX 公司',
address: '梅州'
},
{
value: 'YHN科技YX公司',
value: 'YHN 科技 YX 公司',
address: '韶关'
},
{
value: '康康物业YX公司',
value: '康康物业 YX 公司',
address: '广州天河区'
}
]
Expand Down
12 changes: 6 additions & 6 deletions examples/sites/demos/pc/app/autocomplete/custom-icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,27 @@ export default {
loadAll() {
return [
{
value: 'GFD科技YX公司',
value: 'GFD 科技 YX 公司',
address: '福州'
},
{
value: 'WWWW科技YX公司',
value: 'WWWW 科技 YX 公司',
address: '深圳福田区'
},
{
value: 'RFV有限责任公司',
value: 'RFV 有限责任公司',
address: '中山市'
},
{
value: 'TGBYX公司',
value: 'TGBYX 公司',
address: '梅州'
},
{
value: 'YHN科技YX公司',
value: 'YHN 科技 YX 公司',
address: '韶关'
},
{
value: '康康物业YX公司',
value: '康康物业 YX 公司',
address: '广州天河区'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@ function createFilter(queryString) {
function loadAll() {
return [
{
value: 'GFD科技YX公司',
value: 'GFD 科技 YX 公司',
address: '福州'
},
{
value: 'WWWW科技YX公司',
value: 'WWWW 科技 YX 公司',
address: '深圳福田区'
},
{
value: 'RFV有限责任公司',
value: 'RFV 有限责任公司',
address: '中山市'
},
{
value: 'TGBYX公司',
value: 'TGBYX 公司',
address: '梅州'
},
{
value: 'YHN科技YX公司',
value: 'YHN 科技 YX 公司',
address: '韶关'
},
{
value: '康康物业YX公司',
value: '康康物业 YX 公司',
address: '广州天河区'
}
]
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/autocomplete/debounce.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ test('debounce', async ({ page }) => {
await page.goto('autocomplete#debounce')

await page.getByRole('textbox', { name: '请输入内容', exact: true }).click()
await expect(page.getByRole('option', { name: 'WWWW科技YX公司' })).not.toBeVisible()
await expect(page.getByRole('option', { name: 'WWWW 科技 YX 公司' })).not.toBeVisible()
await page.waitForTimeout(1000)
await expect(page.getByRole('option', { name: 'WWWW科技YX公司' })).toBeVisible()
await expect(page.getByRole('option', { name: 'WWWW 科技 YX 公司' })).toBeVisible()
await expect(
page.locator('.demo-autocomplete > .tiny-autocomplete > .tiny-input > .tiny-input-display-only > input')
).toHaveAttribute('debounce', '1000')
Expand Down
Loading
Loading