Skip to content

Commit

Permalink
fix(vue-renderless): [checkbox, collapse, color-picker, color-select-…
Browse files Browse the repository at this point in the history
…panel,company,config-provider,container,crop,currency] fix site: Optimize site documentation typesetting
  • Loading branch information
dufu1991 committed Dec 27, 2024
1 parent 5be8e63 commit 4338e78
Show file tree
Hide file tree
Showing 58 changed files with 113 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
import { ref } from 'vue'
import { TinyCheckboxButton, TinyCheckboxGroup } from '@opentiny/vue'
const checked = ref(['复选框1'])
const checked = ref(['复选框 1'])
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/checkbox/checkbox-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
},
data() {
return {
checked: ['复选框1']
checked: ['复选框 1']
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { ref } from 'vue'
import { TinyCheckboxButton, TinyCheckboxGroup, TinyModal } from '@opentiny/vue'
const checked = ref(['复选框1'])
const checked = ref(['复选框 1'])
function valueChange(val) {
TinyModal.message({ message: `change 事件触发了,选中值为:${val}`, status: 'info' })
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/checkbox/checkbox-events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test('事件', async ({ page }) => {
const checkbox = demo.locator('.tiny-checkbox-group > label')

await checkbox.nth(1).click()
await expect(page.getByText('change 事件触发了,选中值为:复选框1,复选框2')).toBeVisible()
await expect(page.getByText('change 事件触发了,选中值为:复选框 1,复选框 2')).toBeVisible()
await checkbox.nth(0).click()
await expect(page.getByText('change 事件触发了,选中值为:复选框2')).toBeVisible()
await expect(page.getByText('change 事件触发了,选中值为:复选框 2')).toBeVisible()
})
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/checkbox/checkbox-events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
},
data() {
return {
checked: ['复选框1']
checked: ['复选框 1']
}
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
import { ref } from 'vue'
import { TinyCheckbox, TinyCheckboxGroup } from '@opentiny/vue'
const checked = ref(['复选框1', '复选框2'])
const checked = ref(['复选框 1', '复选框 2'])
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test('复选框组', async ({ page }) => {

const demo = page.locator('#checkbox-group')
const group = demo.locator('.tiny-checkbox-group')
await group.first().getByText('复选框1').first().click()
await group.first().getByText('复选框 1').first().click()
await expect(group.locator('label').first()).not.toHaveClass(/is-checked/)
await expect(group.locator('label').nth(1)).toHaveClass(/is-checked/)
})
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/checkbox/checkbox-group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
},
data() {
return {
checked: ['复选框1', '复选框2']
checked: ['复选框 1', '复选框 2']
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<tiny-checkbox-group v-model="checked">
<tiny-checkbox label="复选框1">
<template #default>
<span class="primary-bg">复选框1</span>
<span class="primary-bg">复选框 1</span>
</template>
</tiny-checkbox>
<tiny-checkbox label="复选框2">
<template #default>
<span class="warning-bg">复选框2</span>
<span class="warning-bg">复选框 2</span>
</template>
</tiny-checkbox>
</tiny-checkbox-group>
Expand All @@ -17,7 +17,7 @@
import { ref } from 'vue'
import { TinyCheckbox, TinyCheckboxGroup } from '@opentiny/vue'
const checked = ref(['复选框1'])
const checked = ref(['复选框 1'])
</script>

<style scoped>
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/checkbox/checkbox-slot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<tiny-checkbox-group v-model="checked">
<tiny-checkbox label="复选框1">
<template #default>
<span class="primary-bg">复选框1</span>
<span class="primary-bg">复选框 1</span>
</template>
</tiny-checkbox>
<tiny-checkbox label="复选框2">
<template #default>
<span class="warning-bg">复选框2</span>
<span class="warning-bg">复选框 2</span>
</template>
</tiny-checkbox>
</tiny-checkbox-group>
Expand All @@ -23,7 +23,7 @@ export default {
},
data() {
return {
checked: ['复选框1']
checked: ['复选框 1']
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
import { ref } from 'vue'
import { TinyCheckbox, TinyCheckboxGroup } from '@opentiny/vue'
const checkedData = ref(['复选框1'])
const checkedData = ref(['复选框 1'])
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/checkbox/checked.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
},
data() {
return {
checkedData: ['复选框1']
checkedData: ['复选框 1']
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
import { ref } from 'vue'
import { TinyCheckboxButton, TinyCheckboxGroup } from '@opentiny/vue'
const checked = ref(['复选框1'])
const checked = ref(['复选框 1'])
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/checkbox/custom-color.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
},
data() {
return {
checked: ['复选框1']
checked: ['复选框 1']
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<tiny-checkbox-group v-model="checked">
<tiny-checkbox label="复选框1"></tiny-checkbox>
<tiny-checkbox label="复选框2" text="复选框2文本"></tiny-checkbox>
<tiny-checkbox label="复选框3" text="复选框3">复选框3文本</tiny-checkbox>
<tiny-checkbox label="复选框3" text="复选框3">复选框 3 文本</tiny-checkbox>
</tiny-checkbox-group>
</template>

<script setup>
import { ref } from 'vue'
import { TinyCheckbox, TinyCheckboxGroup } from '@opentiny/vue'
const checked = ref(['复选框1', '复选框2', '复选框3'])
const checked = ref(['复选框 1', '复选框 2', '复选框 3'])
</script>
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/checkbox/description.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('#description')
const checkbox = demo.locator('.tiny-checkbox-group .tiny-checkbox__label')
await expect(checkbox.first()).toHaveText('复选框1')
await expect(checkbox.nth(1)).toHaveText('复选框2文本')
await expect(checkbox.nth(2)).toHaveText('复选框3文本')
await expect(checkbox.first()).toHaveText('复选框 1')
await expect(checkbox.nth(1)).toHaveText('复选框 2 文本')
await expect(checkbox.nth(2)).toHaveText('复选框 3 文本')
})
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/checkbox/description.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<tiny-checkbox-group v-model="checked">
<tiny-checkbox label="复选框1"></tiny-checkbox>
<tiny-checkbox label="复选框2" text="复选框2文本"></tiny-checkbox>
<tiny-checkbox label="复选框3" text="复选框3">复选框3文本</tiny-checkbox>
<tiny-checkbox label="复选框3" text="复选框3">复选框 3 文本</tiny-checkbox>
</tiny-checkbox-group>
</template>

Expand All @@ -16,7 +16,7 @@ export default {
},
data() {
return {
checked: ['复选框1', '复选框2', '复选框3']
checked: ['复选框 1', '复选框 2', '复选框 3']
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div>
<tiny-checkbox v-model="checked" shape="filter">复选框1</tiny-checkbox>
<tiny-checkbox v-model="checked" shape="filter">复选框 1</tiny-checkbox>
<tiny-checkbox-group v-model="checkedArr" shape="filter">
<tiny-checkbox label="复选框1"></tiny-checkbox>
<tiny-checkbox label="复选框2">复选框2复选框2复选框2复选框2复选框2复选框2</tiny-checkbox>
<tiny-checkbox label="复选框2">复选框 2 复选框 2 复选框 2 复选框 2 复选框 2 复选框 2</tiny-checkbox>
</tiny-checkbox-group>
</div>
</template>
Expand All @@ -13,7 +13,7 @@ import { ref } from 'vue'
import { TinyCheckbox, TinyCheckboxGroup } from '@opentiny/vue'
const checked = ref(true)
const checkedArr = ref(['复选框1'])
const checkedArr = ref(['复选框 1'])
</script>

<style scoped>
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/checkbox/shape.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ test('过滤器模式', async ({ page }) => {
await expect(checkboxGroup.locator('.tiny-checkbox').nth(1)).toHaveCSS('background-color', 'rgb(230, 230, 230)')
await checkboxGroup.locator('.tiny-checkbox').nth(1).hover()
await page.waitForTimeout(50)
await expect(tooltip).toHaveText('复选框2复选框2复选框2复选框2复选框2复选框2')
await expect(tooltip).toHaveText('复选框 2 复选框 2 复选框 2 复选框 2 复选框 2 复选框 2')
})
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/checkbox/shape.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div>
<tiny-checkbox v-model="checked" shape="filter">复选框1</tiny-checkbox>
<tiny-checkbox v-model="checked" shape="filter">复选框 1</tiny-checkbox>
<tiny-checkbox-group v-model="checkedArr" shape="filter">
<tiny-checkbox label="复选框1"></tiny-checkbox>
<tiny-checkbox label="复选框2">复选框2复选框2复选框2复选框2复选框2复选框2</tiny-checkbox>
<tiny-checkbox label="复选框2">复选框 2 复选框 2 复选框 2 复选框 2 复选框 2 复选框 2</tiny-checkbox>
</tiny-checkbox-group>
</div>
</template>
Expand All @@ -19,7 +19,7 @@ export default {
data() {
return {
checked: true,
checkedArr: ['复选框1']
checkedArr: ['复选框 1']
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const checked = ref('假文本')
function getValue() {
TinyModal.message({
message: '当前状态对应的值为:' + checked.value,
message: '当前状态对应的值为' + checked.value,
top: 200,
status: 'info'
})
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/checkbox/text.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ test('状态对应的值', async ({ page }) => {

await demo.locator('.tiny-checkbox__inner').click()
await demo.getByRole('button', { name: '获取文本' }).click()
await expect(page.locator('.tiny-modal').filter({ hasText: '当前状态对应的值为:真文本' })).toBeVisible()
await expect(page.locator('.tiny-modal').filter({ hasText: '当前状态对应的值为真文本' })).toBeVisible()
await demo.locator('.tiny-checkbox__inner').click()
await demo.getByRole('button', { name: '获取文本' }).click()
await expect(page.locator('.tiny-modal').filter({ hasText: '当前状态对应的值为:假文本' })).toBeVisible()
await expect(page.locator('.tiny-modal').filter({ hasText: '当前状态对应的值为假文本' })).toBeVisible()
})
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/checkbox/text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
methods: {
getValue() {
TinyModal.message({
message: '当前状态对应的值为:' + this.checked,
message: '当前状态对应的值为' + this.checked,
top: 200,
status: 'info'
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,39 +97,39 @@ const options = ref([
const data = ref([
{
id: '1',
name: 'GFD科技YX公司',
name: 'GFD 科技 YX 公司',
city: '福州',
employees: 800,
createdDate: '2014-04-30 00:56:00',
boole: false
},
{
id: '2',
name: 'WWW科技YX公司',
name: 'WWW 科技 YX 公司',
city: '深圳',
employees: 300,
createdDate: '2016-07-08 12:36:22',
boole: true
},
{
id: '3',
name: 'RFV有限责任公司',
name: 'RFV 有限责任公司',
city: '中山',
employees: 1300,
createdDate: '2014-02-14 14:14:14',
boole: false
},
{
id: '4',
name: 'TGB科技YX公司',
name: 'TGB 科技 YX 公司',
city: '龙岩',
employees: 360,
createdDate: '2013-01-13 13:13:13',
boole: true
},
{
id: '5',
name: 'YHN科技YX公司',
name: 'YHN 科技 YX 公司',
city: '韶关',
employees: 810,
createdDate: '2012-12-12 12:12:12',
Expand Down
10 changes: 5 additions & 5 deletions examples/sites/demos/pc/app/collapse/nested-content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,39 +114,39 @@ export default {
data: [
{
id: '1',
name: 'GFD科技YX公司',
name: 'GFD 科技 YX 公司',
city: '福州',
employees: 800,
createdDate: '2014-04-30 00:56:00',
boole: false
},
{
id: '2',
name: 'WWW科技YX公司',
name: 'WWW 科技 YX 公司',
city: '深圳',
employees: 300,
createdDate: '2016-07-08 12:36:22',
boole: true
},
{
id: '3',
name: 'RFV有限责任公司',
name: 'RFV 有限责任公司',
city: '中山',
employees: 1300,
createdDate: '2014-02-14 14:14:14',
boole: false
},
{
id: '4',
name: 'TGB科技YX公司',
name: 'TGB 科技 YX 公司',
city: '龙岩',
employees: 360,
createdDate: '2013-01-13 13:13:13',
boole: true
},
{
id: '5',
name: 'YHN科技YX公司',
name: 'YHN 科技 YX 公司',
city: '韶关',
employees: 810,
createdDate: '2012-12-12 12:12:12',
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/collapse/webdoc/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default {
},
desc: {
'zh-CN':
'<p>在 <code>collapse-item</code> 元素上可以通过 <code>icon</code> 插槽的方式自定义展开折叠 icon 图标。 也可以通过 <code>expand-icon</code> 参数传入一个框架自带的 <code>icon</code> 图标,此种方式不需要自己写样式</p>',
'<p>在 <code>collapse-item</code> 元素上可以通过 <code>icon</code> 插槽的方式自定义展开折叠 icon 图标。也可以通过 <code>expand-icon</code> 参数传入一个框架自带的 <code>icon</code> 图标,此种方式不需要自己写样式</p>',
'en-US':
'<p>On the <code>collapse-item</code> element, the <code>icon</code> slot can be used to customize the expand/collapse icon. The <code>expand-icon</code> parameter can also be used to pass in an <code>icon</code> that comes with the framework. In this way, you do not need to write your own style. </p>'
},
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/color-picker/alpha.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'

test('测试Alpha', async ({ page }) => {
test('测试 Alpha', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('color-picker#enable-alpha')
await page.locator('.tiny-color-picker__inner').click()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<div style="position: relative">
<p>颜色值: {{ color }}</p>
<p>颜色值{{ color }}</p>
<tiny-color-picker v-model="color" :visible="visible" @confirm="onConfirm" @cancel="onCancel" :format="options" />
</div>
</div>
Expand Down
Loading

0 comments on commit 4338e78

Please sign in to comment.