Skip to content

Commit

Permalink
feat(site):Optimize the typography of CJK characters, mix Chinese and…
Browse files Browse the repository at this point in the history
… English punctuation, and avoid excessive use of spaces for all Chinese text and comments within the site.
  • Loading branch information
dufu1991 committed Dec 25, 2024
1 parent 0b4be1b commit de5ae7c
Show file tree
Hide file tree
Showing 28 changed files with 46 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const options = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
])
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/action-menu/basic-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const options = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
])
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/action-menu/card-mode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const options = ref([
label: '网络设置',
children: [
{ label: '更改安全组', disabled: true },
{ label: '切换VPC', divided: true }
{ label: '切换 VPC', divided: true }
]
}
])
Expand All @@ -55,7 +55,7 @@ const options1 = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
])
</script>
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/action-menu/disabled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {
label: '网络设置',
children: [
{ label: '更改安全组', disabled: true },
{ label: '切换VPC', divided: true }
{ label: '切换 VPC', divided: true }
]
}
],
Expand All @@ -60,7 +60,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const options = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
])
Expand All @@ -42,7 +42,7 @@ const itemClick = (data) => {
const visibleChange = (status) => {
TinyNotify({
message: `触发 visible-change 事件,下拉状态为 ${status}`,
message: `触发 visible-change 事件下拉状态为 ${status}`,
position: 'top-right',
duration: 2000
})
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/action-menu/events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ test('菜单项点击事件', async ({ page }) => {
// more-click 更多按钮点击事件
await expect(notify.filter({ hasText: '触发 moreClick 事件' })).toBeVisible()
// visible-change 下拉面板显示隐藏事件
await expect(notify.filter({ hasText: '触发 visible-change 事件,下拉状态为 true' })).toBeVisible()
await expect(notify.filter({ hasText: '触发 visible-change 事件下拉状态为 true' })).toBeVisible()
// item-click 菜单项点击事件
await dropDownMenuItem.filter({ hasText: '关机' }).click()
await expect(notify.filter({ hasText: '{"label":"关机"}' })).toBeVisible()
// visible-change 下拉面板显示隐藏事件
await expect(notify.filter({ hasText: '触发 visible-change 事件,下拉状态为 false' })).toBeVisible()
await expect(notify.filter({ hasText: '触发 visible-change 事件下拉状态为 false' })).toBeVisible()
await expect(dropDownMenu).not.toBeVisible()
})
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/action-menu/events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
]
}
Expand All @@ -49,7 +49,7 @@ export default {
},
visibleChange(status) {
TinyNotify({
message: `触发 visible-change 事件,下拉状态为 ${status}`,
message: `触发 visible-change 事件下拉状态为 ${status}`,
position: 'top-right',
duration: 2000
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<p>场景1:显示图标</p>
<p>场景 1:显示图标</p>
<tiny-action-menu
class="custom-icon"
:options="options"
Expand All @@ -11,7 +11,7 @@
>
</tiny-action-menu>
<br />
<p>场景2:只显示文本</p>
<p>场景 2:只显示文本</p>
<tiny-action-menu :options="options1" :show-icon="false" :max-show-num="3"> </tiny-action-menu>
</div>
</template>
Expand Down Expand Up @@ -39,7 +39,7 @@ const options = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC' }]
children: [{ label: '更改安全组' }, { label: '切换 VPC' }]
}
])
Expand All @@ -58,7 +58,7 @@ const options1 = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
])
Expand Down
8 changes: 4 additions & 4 deletions examples/sites/demos/pc/app/action-menu/icon.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<p>场景1:显示图标</p>
<p>场景 1:显示图标</p>
<tiny-action-menu
class="custom-icon"
:options="options"
Expand All @@ -10,7 +10,7 @@
:max-show-num="3"
>
</tiny-action-menu>
<p>场景2:只显示文本</p>
<p>场景 2:只显示文本</p>
<tiny-action-menu :options="options1" :show-icon="false" :max-show-num="3"> </tiny-action-menu>
</div>
</template>
Expand Down Expand Up @@ -43,7 +43,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC' }]
children: [{ label: '更改安全组' }, { label: '切换 VPC' }]
}
],
options1: [
Expand All @@ -61,7 +61,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
],
tinyIconEllipsis: iconEllipsis()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const options = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
])
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/action-menu/max-show-num.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const options = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
])
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/action-menu/more-text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const options = ref([
label: '网络设置',
children: [
{ label: '更改安全组', children: [{ label: '断开' }] },
{ label: '切换VPC', divided: true }
{ label: '切换 VPC', divided: true }
]
}
])
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/action-menu/popper-class.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
label: '网络设置',
children: [
{ label: '更改安全组', children: [{ label: '断开' }] },
{ label: '切换VPC', divided: true }
{ label: '切换 VPC', divided: true }
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const options = ref([
},
{
name: '网络设置',
children: [{ name: '更改安全组' }, { name: '切换VPC', divided: true }]
children: [{ name: '更改安全组' }, { name: '切换 VPC', divided: true }]
}
])
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/action-menu/slot-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default {
},
{
name: '网络设置',
children: [{ name: '更改安全组' }, { name: '切换VPC', divided: true }]
children: [{ name: '更改安全组' }, { name: '切换 VPC', divided: true }]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const options = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
])
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/action-menu/spacing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换 VPC', divided: true }]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const options = ref([
},
{
name: '网络设置',
children: [{ name: '更改安全组' }, { name: '切换VPC', divided: true }]
children: [{ name: '更改安全组' }, { name: '切换 VPC', divided: true }]
}
])
</script>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/action-menu/text-field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
},
{
name: '网络设置',
children: [{ name: '更改安全组' }, { name: '切换VPC', divided: true }]
children: [{ name: '更改安全组' }, { name: '切换 VPC', divided: true }]
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions examples/sites/demos/pc/app/action-menu/webdoc/action-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default {
'en-US': 'Dropdown button text'
},
desc: {
'zh-CN': '<p>通过 <code>more-text</code> 属性设置下拉按钮文本,默认为 <code>更多</code>。</p>',
'zh-CN': '<p>通过 <code>more-text</code> 属性设置下拉按钮文本默认为 <code>更多</code>。</p>',
'en-US':
'<p>Set the dropdown button text through the <code>more-text</code> attribute, default to <code>More</code></p>'
},
Expand All @@ -74,7 +74,7 @@ export default {
'en-US': 'Spacing'
},
desc: {
'zh-CN': '<p>通过 <code>spacing</code> 属性设置菜单按钮之间的间距,默认为 <code>5px</code>。</p>',
'zh-CN': '<p>通过 <code>spacing</code> 属性设置菜单按钮之间的间距默认为 <code>5px</code>。</p>',
'en-US':
'<p>Set the spacing between menu buttons through the <code>spacing</code> attribute, which defaults to <code>5px</code>.</p>'
},
Expand All @@ -88,7 +88,7 @@ export default {
},
desc: {
'zh-CN':
'<p>通过 <code>mode</code> 属性设置菜单模式以适配在不同场景中能够使用,例如:菜单按钮在卡片中使用,可以配置为 <code>card</code>,卡片模式字体为黑色,间距为10px。 <code>mode</code> 默认为值<code>default</code>。</p>',
'<p>通过 <code>mode</code> 属性设置菜单模式以适配在不同场景中能够使用,例如:菜单按钮在卡片中使用,可以配置为 <code>card</code>,卡片模式字体为黑色,间距为 10px。 <code>mode</code> 默认为值<code>default</code>。</p>',
'en-US':
'<p>Use the <code>mode</code> attribute to set the menu mode so that the vehicle can be used in different scenarios. For example, if the menu button is used in configuration, it can be configured as <code>card</code>, and the auxiliary mode font is Black with 10px spacing. <code>mode</code> defaults to <code>default</code>. </p>'
},
Expand Down Expand Up @@ -142,7 +142,7 @@ export default {
'zh-CN':
'<div class="tip custom-block"><p class="custom-block-title">事件说明</p>\n<p>item-click:监听菜单项的点击事件。</p>\n<p>more-click:监听下拉按钮的点击事件。trigger 为 click 时生效。</p>\n<p>visible-change:监听下拉弹框的显示或隐藏状态变化。</p>\n</div>\n',
'en-US':
'<div class="tip custom-block"><p class="custom-block-title">Event description</p>\n<p>item-clickListen for click events on menu items.</p>\n<p>more-clickListen for the click event of the drop-down button. Effective when trigger is click.</p>\n<p>visible-changeMonitor the display or hidden status changes of the dropdown pop-up.</p>\n</div>\n'
'<div class="tip custom-block"><p class="custom-block-title">Event description</p>\n<p>item-click: Listen for click events on menu items.</p>\n<p>more-click: Listen for the click event of the drop-down button. Effective when trigger is click.</p>\n<p>visible-change: Monitor the display or hidden status changes of the dropdown pop-up.</p>\n</div>\n'
},
codeFiles: ['events.vue']
}
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/alert/custom-close.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test('关闭按钮事件', async ({ page }) => {
const alertWarning = page.locator('.tiny-alert--warning')
const close = alertWarning.locator('.tiny-alert__close')

// 点击关闭后警告消失,自定义事件modalBox提示出现
// 点击关闭后警告消失,自定义事件 modalBox 提示出现
await close.click()
await expect(alertWarning).not.toBeVisible()
await expect(page.locator('.tiny-notify__content').getByText('触发关闭事件')).toBeVisible()
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/alert/slot-default.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test('测试 Alert 自定义交互操作', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('alert#slot-default')

// size为large时可通过插槽自定义操作
// size 为 large 时可通过插槽自定义操作
const alert = page.locator('.tiny-alert--large').first()
const opration = alert.locator('.tiny-alert__opration')
await expect(opration).toHaveCount(1)
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/alert/title.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test('测试 Alert 自定义标题', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('alert#title')

// size为large时可设置自定义标题
// size 为 large 时可设置自定义标题
const alert = page.locator('.tiny-alert--large').first()
const title = alert.locator('.tiny-alert__title')
await expect(title).toHaveCount(1)
Expand Down
10 changes: 5 additions & 5 deletions examples/sites/demos/pc/app/alert/webdoc/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export default {
<div class="tip custom-block">
<p class="custom-block-title"> 尺寸模式区别 </p>
<ul>
<li> normal模式下,不会显示标题和交互操作的区域,相当于简单模式。</li>
<li> large模式下,显示全部元素,相当于完整模式。</li>
<li> normal 模式下,不会显示标题和交互操作的区域,相当于简单模式。</li>
<li> large 模式下,显示全部元素,相当于完整模式。</li>
</ul>
</div>
`,
Expand All @@ -54,7 +54,7 @@ export default {
},
desc: {
'zh-CN': `当 <code>size</code> 为 <code>large</code> 时,通过 <code>title </code>属性或 <code>title </code>插槽,可以自定义组件的标题。<br>
如果未自定义标题, 会根据对应的 <code>type</code> 显示相应的默认标题。`,
如果未自定义标题,会根据对应的 <code>type</code> 显示相应的默认标题。`,
'en-US':
'<p>When <code>size</code> is set to large, the title is displayed. You can set <code>title</code> or <code>slot</code> to customize the title. <br>The default title is displayed according to the set <code>type</code> . </p>'
},
Expand Down Expand Up @@ -121,8 +121,8 @@ export default {
desc: {
'zh-CN': `
通过 <code>closable</code> 属性,启用内置的关闭图标,默认值为 <code>true</code>。<br />
通过 <code>close-text</code> 设置关闭按钮显示为文本,仅当<code>closable</code>为<code>true</code>时生效 。<br />
将 <code>closable</code> 设置为 <code>false</code> 时, 取消内置的关闭功能。此时可通过 <code>close</code> 插槽,完全自定义关闭按钮区域的展示。
通过 <code>close-text</code> 设置关闭按钮显示为文本,仅当<code>closable</code>为<code>true</code>时生效。<br />
将 <code>closable</code> 设置为 <code>false</code> 时取消内置的关闭功能。此时可通过 <code>close</code> 插槽完全自定义关闭按钮区域的展示。
<div class="tip custom-block">
<p class="custom-block-title"> 组件关闭或隐藏时,会有渐隐动画,详见示例! </p>
</div>
Expand Down

0 comments on commit de5ae7c

Please sign in to comment.