Skip to content

Commit

Permalink
fix(vue-renderless): [espace,fall-menu,file-upload,filter-panel,float…
Browse files Browse the repository at this point in the history
…-button,floatbar,flowchart,fluent-editor,form,fullscreen] fix site: Optimize site documentation typesetting
  • Loading branch information
dufu1991 committed Dec 27, 2024
1 parent d1afe7f commit 80a89b7
Show file tree
Hide file tree
Showing 71 changed files with 161 additions and 161 deletions.
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/espace/webdoc/espace.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default {
},
desc: {
'zh-CN':
'<p><code>data</code> 属性设置组件数据,数组对象中包含选项有 type、value、icon。其中 type 的可选择值有:im、sip、mailto 。单击图标,将会打开 type 选项值对应的外部应用。</p>\n',
'<p><code>data</code> 属性设置组件数据,数组对象中包含选项有 type、value、icon。其中 type 的可选择值有:im、sip、mailto。单击图标,将会打开 type 选项值对应的外部应用。</p>\n',
'en-US':
'The <p><code>data</code> attribute sets the component data. The array object contains the options type, value, and icon. The value of type can be im, sip, or mailto. Click to open the external application corresponding to the value of type. </p>\n'
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'

// 以下2个测试将覆盖2个demo:基本用法、数据源
// 以下 2 个测试将覆盖 2 个 demo:基本用法、数据源
test('基础用法、数据源', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('fall-menu#data-resource')
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/fall-menu/webdoc/fall-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
},
desc: {
'zh-CN':
'<p>可通过 <code>left</code> 属性设置插槽自定义左侧切换图标为 IconLeft , <code>right</code> 属性设置插槽右侧切换图标 IconRight 。</p>\n',
'<p>可通过 <code>left</code> 属性设置插槽自定义左侧切换图标为 IconLeft, <code>right</code> 属性设置插槽右侧切换图标 IconRight。</p>\n',
'en-US':
'<p>Use the <code>left</code> slot to set the left switch icon to IconLeft, and use the <code>right</code> slot to set the right switch icon to IconRight. </p>\n'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ test('基本用法', async ({ page }) => {

await fileChooser.setFiles(currentPath)
await page.getByText('测试.jpg').isVisible()
await expect(lists).toHaveText('测试.jpg按 delete 键可删除')
await expect(lists).toHaveText('测试.jpg 按 delete 键可删除')
})
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<tiny-button>选取文件</tiny-button>
</template>
<template #tip>
<div class="tiny-upload__tip">只能上传 jpg/png 文件,且不超过500 kb</div>
<div class="tiny-upload__tip">只能上传 jpg/png 文件,且不超过 500 kb</div>
</template>
</tiny-file-upload>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ test('自定义上传提示', async ({ page }) => {

const tip = page.locator('.tiny-upload__tip')

await expect(tip).toHaveText('只能上传 jpg/png 文件,且不超过500 kb')
await expect(tip).toHaveText('只能上传 jpg/png 文件,且不超过 500 kb')
})
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<tiny-button>选取文件</tiny-button>
</template>
<template #tip>
<div class="tiny-upload__tip">只能上传 jpg/png 文件,且不超过500 kb</div>
<div class="tiny-upload__tip">只能上传 jpg/png 文件,且不超过 500 kb</div>
</template>
</tiny-file-upload>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const action = ref('http://localhost:3000/api/upload')
const encryptConfig = reactive({
enabled: true,
encrypt: true,
watermark: '水印示例1'
watermark: '水印示例 1'
})
const data = computed(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ test('水印和加密弹窗', async ({ page }) => {

await fileChooser.setFiles(currentPath)
await page.getByText('测试.jpg').isVisible()
await expect(lists).toHaveText('测试.jpg按 delete 键可删除')
await expect(lists).toHaveText('测试.jpg 按 delete 键可删除')
})
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/file-upload/encrypt-config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
encryptConfig: {
enabled: true,
encrypt: true,
watermark: '水印示例1'
watermark: '水印示例 1'
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const fileList = ref([
docId: 'M1T2A1N548572512085860353',
path: 'edm/one/',
docVersion: 'V1',
name: 'test5超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
name: 'test5 超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
docSize: 17252 * 1024,
size: 17252 * 1024,
serverName: 'ShenZhen'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default {
docId: 'M1T2A1N548572512085860353',
path: 'edm/one/',
docVersion: 'V1',
name: 'test5超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
name: 'test5 超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
docSize: 17252 * 1024,
size: 17252 * 1024,
serverName: 'ShenZhen'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const fileList = ref([
docId: 'M1T2A1N548572512085860353',
path: 'edm/one/',
docVersion: 'V1',
name: 'test5超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
name: 'test5 超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
docSize: 17252 * 1024,
size: 17252 * 1024,
serverName: 'ShenZhen'
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/file-upload/file-size.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default {
docId: 'M1T2A1N548572512085860353',
path: 'edm/one/',
docVersion: 'V1',
name: 'test5超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
name: 'test5 超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
docSize: 17252 * 1024,
size: 17252 * 1024,
serverName: 'ShenZhen'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const rules = reactive({
})
const uploadSuccess = () => {
// 模拟上传成功后,返回的数据信息,以此通过validatePass的校验
// 模拟上传成功后,返回的数据信息,以此通过 validatePass 的校验
createData.files = `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/book.jpg`
// 上传成功后再进行表单验证
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default {
},
methods: {
uploadSuccess() {
// 模拟上传成功后,返回的数据信息,以此通过validatePass的校验
// 模拟上传成功后,返回的数据信息,以此通过 validatePass 的校验
this.createData.files = `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/book.jpg`
// 上传成功后再进行表单验证
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('图片列表缩略图', async ({ page }) => {
const container = page.locator('#picture-list')
const upload = container.locator('.tiny-upload')
const lists = container.locator('.tiny-upload-list__item')
const item1 = container.getByText('test1按 delete 键可删除')
const item1 = container.getByText('test1 按 delete 键可删除')
const [fileChooser] = await Promise.all([page.waitForEvent('filechooser'), upload.click()])
const { width, height } = await item1.boundingBox()
const images = container.locator('.tiny-upload-list__item-thumbnail')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const fileList = ref([
docId: 'M1T2A1N548572512085860353',
path: 'edm/one/',
docVersion: 'V1',
name: 'test5超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
name: 'test5 超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
docSize: 17252 * 1024,
size: 17252 * 1024,
serverName: 'ShenZhen'
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/file-upload/prompt-tip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default {
docId: 'M1T2A1N548572512085860353',
path: 'edm/one/',
docVersion: 'V1',
name: 'test5超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
name: 'test5 超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
docSize: 17252 * 1024,
size: 17252 * 1024,
serverName: 'ShenZhen'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const handleDownloadFile = (file) => {
const timer = setInterval(() => {
if (file.downloadPercentage >= 100) {
clearInterval(timer)
// 下载完成后可以隐藏进度条,因为进度条有过渡动画,所以可以延迟1s再隐藏
// 下载完成后可以隐藏进度条,因为进度条有过渡动画,所以可以延迟 1s 再隐藏
setTimeout(() => {
file.showDownloadBar = false
}, 1000)
Expand Down
14 changes: 7 additions & 7 deletions examples/sites/demos/pc/app/file-upload/show-download-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ export default {
if (file.docId === 'M1T2A1N548572512085860351') {
file.showDownloadBar = true
// 更新downloadPercentage,vue2下写法
// 更新 downloadPercentage,vue2 下写法
// this.$set(file, 'downloadPercentage', 0)
// 更新downloadPercentage,vue3下写法
// 更新 downloadPercentage,vue3 下写法
file.downloadPercentage = 0
const timer = setInterval(() => {
if (file.downloadPercentage >= 100) {
clearInterval(timer)
// 下载完成后可以隐藏进度条,因为进度条有过渡动画,所以可以延迟1s再隐藏
// 下载完成后可以隐藏进度条,因为进度条有过渡动画,所以可以延迟 1s 再隐藏
setTimeout(() => {
file.showDownloadBar = false
}, 1000)
Expand All @@ -68,18 +68,18 @@ export default {
// 模拟下载失败场景
file.showDownloadBar = true
// 更新downloadPercentage,vue2下写法
// 更新 downloadPercentage,vue2 下写法
// this.$set(file, 'downloadPercentage', 0)
// 更新downloadPercentage,vue3下写法
// 更新 downloadPercentage,vue3 下写法
file.downloadPercentage = 0
const timer = setInterval(() => {
if (file.downloadPercentage >= 50) {
clearInterval(timer)
// file.showDownloadBar = false
// 更新downloadStatus,vue2下写法
// 更新 downloadStatus,vue2 下写法
// this.$set(file, 'downloadStatus', 'exception')
// 更新downloadStatus,vue3下写法
// 更新 downloadStatus,vue3 下写法
file.downloadStatus = 'exception'
TinyModal.message({ message: '下载失败', status: 'error' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ function handleChange() {
}
function handleHashProgress() {
TinyModal.message({ message: '文件上传生成hash值时的回调 返回进程', status: 'info' })
TinyModal.message({ message: '文件上传生成 hash 值时的回调 返回进程', status: 'info' })
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('事件', async ({ page }) => {
const modals = page.locator('.tiny-modal')
const delButton = page
.getByRole('listitem')
.filter({ hasText: 'test1按 delete 键可删除' })
.filter({ hasText: 'test1 按 delete 键可删除' })
.getByTitle('删除文件')
.locator('svg')

Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/file-upload/upload-events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default {
TinyModal.message({ message: '触发上传文件改变回调事件', status: 'info' })
},
handleHashProgress() {
TinyModal.message({ message: '文件上传生成hash值时的回调 返回进程', status: 'info' })
TinyModal.message({ message: '文件上传生成 hash 值时的回调 返回进程', status: 'info' })
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const fileList = reactive([
docId: 'M1T2A1N548572512085860353',
path: 'edm/one/',
docVersion: 'V1',
name: 'test5超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
name: 'test5 超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
docSize: 17252 * 1024,
size: 17252 * 1024,
serverName: 'ShenZhen'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default {
docId: 'M1T2A1N548572512085860353',
path: 'edm/one/',
docVersion: 'V1',
name: 'test5超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
name: 'test5 超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长超长.doc',
docSize: 17252 * 1024,
size: 17252 * 1024,
serverName: 'ShenZhen'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test('文件列表', async ({ page }) => {
const currentPath = path.resolve(__dirname, '测试.jpg')

await expect(width).toBeGreaterThanOrEqual(height)
// 行高取1.5,计算结果是21
// 行高取 1.5,计算结果是 21
await expect(height).toBeGreaterThanOrEqual(21, 0)
await expect(items).toHaveCount(2)
await expect(items).toHaveText([/test1/, /test2/])
Expand Down
8 changes: 4 additions & 4 deletions examples/sites/demos/pc/app/file-upload/webdoc/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ export default {
{
demoId: 'prompt-tip',
name: {
'zh-CN': 'tip提示',
'zh-CN': 'tip 提示',
'en-US': 'tip Hints'
},
desc: {
'zh-CN': '<p>通过 <code>propmtTip</code> 为 `true` 设置提示为tip类型,悬浮图标时显示tip提示。<p>',
'zh-CN': '<p>通过 <code>propmtTip</code> 为 `true` 设置提示为 tip 类型,悬浮图标时显示 tip 提示。<p>',
'en-US':
'<p>Set the prompt to the tip type by setting <code>propmtTip</code> to `true`. The tip prompt is displayed when the icon is suspended.</p>'
},
Expand Down Expand Up @@ -365,7 +365,7 @@ export default {
'en-US': 'User avatar upload'
},
desc: {
'zh-CN': '通过 <code>URL.createobjectURL</code> 创建出文件的URL对象,用来展示头像。',
'zh-CN': '通过 <code>URL.createobjectURL</code> 创建出文件的 URL 对象,用来展示头像。',
'en-US': 'Create a URL object for the file through <code>URL.createobjectURL</code> to display the avatar.'
},
codeFiles: ['upload-user-head.vue']
Expand Down Expand Up @@ -430,7 +430,7 @@ export default {
},
desc: {
'zh-CN':
'<div class="tip custom-block"><code>preview</code> 监听文件点击事件;<br/> <code>remove</code> 监听文件移除事件;<br/> <code>error</code> 监听文件上传失败事件;<br/>\n <code>exceed</code> 监听文件超出个数限制事件;<br/> <code>progress</code> 监听文件上传过程事件;<br/> <code>change</code> 监听文件改变事件(文件改变涵盖文件添加、上传成功和上传失败);<br/>\n <code>success</code> 监听文件上传成功事件;<br/> <code>hash-progress</code> 监听文件上传生成hash值事件。</div>',
'<div class="tip custom-block"><code>preview</code> 监听文件点击事件;<br/> <code>remove</code> 监听文件移除事件;<br/> <code>error</code> 监听文件上传失败事件;<br/>\n <code>exceed</code> 监听文件超出个数限制事件;<br/> <code>progress</code> 监听文件上传过程事件;<br/> <code>change</code> 监听文件改变事件(文件改变涵盖文件添加、上传成功和上传失败);<br/>\n <code>success</code> 监听文件上传成功事件;<br/> <code>hash-progress</code> 监听文件上传生成 hash 值事件。</div>',
'en-US':
'<div class="tip custom-block"><code>preview</code> Listen for file click events; <br /> <code>remove</code> Listen for file removal events; <br /> <code>error</code> Listen for file upload failure events;<br />\n <code>exceeded</code> Listen for events where the number of files exceeds the limit; <br/> <code>progress</code> Listen for file upload process events;<br/> <code>change</code> Listen for file change events (file changes include file addition, successful upload, and failed upload);<br />\n <code>success</code> Listen for file upload success events;<br/> <code>hash-progress</code> Listen for file upload to generate hash value events.</div>'
},
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/file-upload/测试.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
测试txt文件
测试 txt 文件
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('基本用法', async ({ page }) => {
await button.getByText('物品数量等于').isVisible()
await inputEl.click()
await inputEl.fill('10')
await button.getByText('物品数量等于10').isVisible()
await button.getByText('物品数量等于 10').isVisible()

// 禁用
await switchBtn.click()
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/filter-panel/event.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('事件', async ({ page }) => {
const modal = page.locator('.tiny-modal')
const clear = panel.locator('.filter-icon-close')

// handle-clear事件
// handle-clear 事件
await button.click()
await popPanel.isVisible()
await page.locator('label').filter({ hasText: '等于' }).click()
Expand All @@ -19,7 +19,7 @@ test('事件', async ({ page }) => {
await expect(button).toHaveText('物品数量')
await button.click()

// visible-change事件
// visible-change 事件
await button.click()
await expect(modal.nth(1)).toHaveText('true visibleChange')
await button.click()
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/filter-panel/tip.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test'

test('tip提示', async ({ page }) => {
test('tip 提示', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('filter-panel#tip')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test('测试按钮禁用事件', async ({ page }) => {

const defalutDisabled = demo.getByRole('button', { name: '点' })

// 默认禁用1S
// 默认禁用 1S
await defalutDisabled.click()
await expect(page.locator('.tiny-float-button')).toHaveClass(
/tiny-float-button tiny-float-button--success is-disabled is-circle/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
'name': { 'zh-CN': '图标按钮', 'en-US': 'Icon Button' },
'desc': {
'zh-CN':
'<p>通过 <code>icon</code> 设置按钮展示图标, 接收一个图标组件。</p><div class="tip custom-block"><p class="custom-block-title">Icon 图标用法</p><p>先从 <code>@opentiny/vue-icon</code> 中导入需要的 Icon,执行Icon函数得到Icon组件。然后在模板中通过 <code>icon</code> 属性进行引用。</p>',
'<p>通过 <code>icon</code> 设置按钮展示图标,接收一个图标组件。</p><div class="tip custom-block"><p class="custom-block-title">Icon 图标用法</p><p>先从 <code>@opentiny/vue-icon</code> 中导入需要的 Icon,执行 Icon 函数得到 Icon 组件。然后在模板中通过 <code>icon</code> 属性进行引用。</p>',
'en-US':
'<p>Display icons and receive an icon component through the <code>icon</code> settings button</ p> <div class="tip custom block"><p class="custom block title">Icon icon usage</p><p>First, import the required Icon from <code>@ opentiny/vue icon</code> , and execute the Icon function to obtain the Icon component. Then refer to it in the template through the <code>icon</code> attribute.</p>'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const chartData = {
createNode('11', 2, '审批', '2018.08.02', [], 4, 3),
createNode('12', 3, '运算调职兑现率', '', [], 4, 4),
createNode('13', 1, '复核', '2018.08.02', [], 6, 2),
createNode('14', 4, '审批审批审批审批审批0123456789asdfghjkl', '2018.08.02', [], 6, 3)
createNode('14', 4, '审批审批审批审批审批 0123456789asdfghjkl', '2018.08.02', [], 6, 3)
],
links: [
createLink('1', '2', '0 r0.5 t1 c r1.5', 1),
Expand Down
Loading

0 comments on commit 80a89b7

Please sign in to comment.