diff --git a/.all-contributorsrc b/.all-contributorsrc index 000842497..7c3e8e289 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -293,24 +293,6 @@ "contributions": [ "test" ] - }, - { - "login": "Zz-ZzzZ", - "name": "Zz-ZzzZ", - "avatar_url": "https://avatars.githubusercontent.com/u/48228016?v=4", - "profile": "https://zz-zzzz.github.io/", - "contributions": [ - "test" - ] - }, - { - "login": "lyx-jay", - "name": "Lyx", - "avatar_url": "https://avatars.githubusercontent.com/u/39766860?v=4", - "profile": "https://github.com/lyx-jay", - "contributions": [ - "code" - ] } ], "contributorsPerLine": 8, diff --git a/.eslintignore b/.eslintignore index 295562c16..c1808f7f6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,7 @@ dist runtime -dist-vue2/ -dist-vue3/ +dist2/ +dist2.7/ +dist3/ node_modules examples/docs/public/assets/map/js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3baa85b10..2b85cdedf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,7 +2,7 @@ /** @type {import('eslint').Linter.Config} */ module.exports = { - extends: '@antfu', + extends: ['@antfu', 'plugin:prettier/recommended'], rules: { 'vue/component-tags-order': [ 'error', @@ -20,6 +20,7 @@ module.exports = { 'vue/prefer-separate-static-class': 'off', 'vue/comma-dangle': 'off', 'vue/prefer-template': 'off', + 'vue/singleline-html-element-content-newline': 'off', 'curly': 'off', 'sort-imports': 'off', 'prefer-template': 'off', @@ -31,6 +32,7 @@ module.exports = { 'import/no-duplicates': 'off', 'quote-props': 'off', 'prefer-const': 'off', + 'multiline-ternary': 'off', '@typescript-eslint/comma-dangle': 'off', // '@typescript-eslint/indent': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', diff --git a/.gitignore b/.gitignore index a62da9d86..0486da9ef 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ vitest.config.ts.timestamp* npm-debug.log* yarn-debug.log* yarn-error.log* +pnpm-lock.yaml yarn.lock # Editor directories and files @@ -47,3 +48,5 @@ packages/theme/scripts/theme-result.txt packages/theme/scripts/themeExcel.xlsx packages/theme/src/theme/*-theme/component.js + + diff --git a/.prettierignore b/.prettierignore index c94cf7a53..300d5a5f8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,6 @@ dist dist2 +dist2.7 dist3 node_modules internal/template diff --git a/.vscode/settings.json b/.vscode/settings.json index ce6140fc6..3d29d348e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -24,6 +24,7 @@ "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, + "stylelint.validate": ["css", "less", "postcss", "scss", "sass"], "better-comments.highlightPlainText": true, "better-comments.tags": [ { diff --git a/README.md b/README.md index a642855b5..4a8d7a2fb 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,9 @@ npm i @opentiny/vue@2 Then you can use the TinyVue component(such as ``) in the `App.vue` file. -```vue +```html diff --git a/examples/docs/resources/mobile-first/app/badge/base.vue b/examples/docs/resources/mobile-first/app/badge/base.vue index 163d626bd..178b12893 100644 --- a/examples/docs/resources/mobile-first/app/badge/base.vue +++ b/examples/docs/resources/mobile-first/app/badge/base.vue @@ -6,9 +6,7 @@
点标记 :
- - 我的待办 - + 我的待办 @@ -23,9 +21,7 @@
数字标记 :
- - 我的待办 - + 我的待办 diff --git a/examples/docs/resources/mobile-first/app/badge/dynamic-hidden.vue b/examples/docs/resources/mobile-first/app/badge/dynamic-hidden.vue index 8be8a545e..032be0867 100644 --- a/examples/docs/resources/mobile-first/app/badge/dynamic-hidden.vue +++ b/examples/docs/resources/mobile-first/app/badge/dynamic-hidden.vue @@ -1,12 +1,8 @@ diff --git a/examples/docs/resources/mobile-first/app/badge/is-dot.vue b/examples/docs/resources/mobile-first/app/badge/is-dot.vue index c9542e49c..eb8176578 100644 --- a/examples/docs/resources/mobile-first/app/badge/is-dot.vue +++ b/examples/docs/resources/mobile-first/app/badge/is-dot.vue @@ -1,7 +1,5 @@ - + \ No newline at end of file + diff --git a/examples/docs/resources/mobile-first/app/collapse/nested-grid.vue b/examples/docs/resources/mobile-first/app/collapse/nested-grid.vue index 618c7d1ba..908a410a9 100644 --- a/examples/docs/resources/mobile-first/app/collapse/nested-grid.vue +++ b/examples/docs/resources/mobile-first/app/collapse/nested-grid.vue @@ -7,7 +7,13 @@ - + diff --git a/examples/docs/resources/mobile-first/app/collapse/slot-icon.vue b/examples/docs/resources/mobile-first/app/collapse/slot-icon.vue index 95ef23b11..01b5c2036 100644 --- a/examples/docs/resources/mobile-first/app/collapse/slot-icon.vue +++ b/examples/docs/resources/mobile-first/app/collapse/slot-icon.vue @@ -2,13 +2,16 @@
与现实生活一致:与现实生活的流程、逻辑保持一致,遵循用户习惯的语言和概念;
@@ -24,6 +27,7 @@ \ No newline at end of file + diff --git a/examples/docs/resources/mobile-first/app/drawer/event.vue b/examples/docs/resources/mobile-first/app/drawer/event.vue index 0f388e094..53679a429 100644 --- a/examples/docs/resources/mobile-first/app/drawer/event.vue +++ b/examples/docs/resources/mobile-first/app/drawer/event.vue @@ -1,7 +1,14 @@ + + diff --git a/examples/docs/resources/mobile-first/app/tag/color3.vue b/examples/docs/resources/mobile-first/app/tag/color3.vue index 0c921a778..5aed8926f 100644 --- a/examples/docs/resources/mobile-first/app/tag/color3.vue +++ b/examples/docs/resources/mobile-first/app/tag/color3.vue @@ -1,7 +1,5 @@ diff --git a/examples/docs/resources/mobile-first/app/tag/create.vue b/examples/docs/resources/mobile-first/app/tag/create.vue index 8c57c64e3..c02eb4aba 100644 --- a/examples/docs/resources/mobile-first/app/tag/create.vue +++ b/examples/docs/resources/mobile-first/app/tag/create.vue @@ -1,18 +1,29 @@ + +} + diff --git a/examples/docs/resources/mobile/app/navbar/webdoc/navbar.js b/examples/docs/resources/mobile/app/navbar/webdoc/navbar.js index d686e6fa7..5fb232b4a 100644 --- a/examples/docs/resources/mobile/app/navbar/webdoc/navbar.js +++ b/examples/docs/resources/mobile/app/navbar/webdoc/navbar.js @@ -6,50 +6,50 @@ export default { demoId: 'left-right-arrow', name: { 'zh-CN': '显示左右箭头', - 'en-US': 'left right arrow', + 'en-US': 'left right arrow' }, desc: { 'zh-CN': '

显示左右箭头

', - 'en-US': '

button type

', + 'en-US': '

button type

' }, - codeFiles: ['left-right-arrow.vue'], + codeFiles: ['left-right-arrow.vue'] }, { demoId: 'left-right-text', name: { 'zh-CN': '指定左右文本', - 'en-US': 'left right text', + 'en-US': 'left right text' }, desc: { 'zh-CN': '

指定左右文本

', - 'en-US': '

button round

', + 'en-US': '

button round

' }, - codeFiles: ['left-right-text.vue'], + codeFiles: ['left-right-text.vue'] }, { demoId: 'slots', name: { 'zh-CN': '自定义左右侧内容', - 'en-US': 'slots', + 'en-US': 'slots' }, desc: { 'zh-CN': '

自定义左右侧内容

', - 'en-US': '

button click

', + 'en-US': '

button click

' }, - codeFiles: ['slots.vue'], + codeFiles: ['slots.vue'] }, { demoId: 'z-index', name: { 'zh-CN': '设置层级', - 'en-US': 'z-index', + 'en-US': 'z-index' }, desc: { 'zh-CN': '

设置层

', - 'en-US': '

button click

', + 'en-US': '

button click

' }, - codeFiles: ['z-index.vue'], - }, + codeFiles: ['z-index.vue'] + } ], apis: [ { @@ -62,9 +62,9 @@ export default { defaultValue: 'true', desc: { 'zh-CN': '

是否固定在顶部,该属性默认为true

', - 'en-US': 'Is fixed top', + 'en-US': 'Is fixed top' }, - demoId: 'left-right-arrow', + demoId: 'left-right-arrow' }, { name: 'left-arrow', @@ -72,9 +72,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

是否显示左侧箭头,该属性默认为false

', - 'en-US': 'Is show left arrow', + 'en-US': 'Is show left arrow' }, - demoId: 'left-right-arrow', + demoId: 'left-right-arrow' }, { name: 'right-arrow', @@ -82,9 +82,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

是否显示右侧箭头

', - 'en-US': 'Is show right arrow', + 'en-US': 'Is show right arrow' }, - demoId: 'left-right-arrow', + demoId: 'left-right-arrow' }, { name: 'right-text', @@ -92,9 +92,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

设置右侧文本

', - 'en-US': 'Is show right text', + 'en-US': 'Is show right text' }, - demoId: 'left-right-text', + demoId: 'left-right-text' }, { name: 'left-text', @@ -102,9 +102,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

设置左侧文本

', - 'en-US': 'Is show left text', + 'en-US': 'Is show left text' }, - demoId: 'left-right-text', + demoId: 'left-right-text' }, { name: 'sub-title', @@ -112,9 +112,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

设置副标题

', - 'en-US': 'set sub-title', + 'en-US': 'set sub-title' }, - demoId: 'left-right-text', + demoId: 'left-right-text' }, { name: 'title', @@ -122,9 +122,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

设置主标题

', - 'en-US': 'set main-title', + 'en-US': 'set main-title' }, - demoId: 'z-index', + demoId: 'z-index' }, { name: 'z-index', @@ -132,10 +132,10 @@ export default { defaultValue: '', desc: { 'zh-CN': '

设置z-index

', - 'en-US': 'set z-index', + 'en-US': 'set z-index' }, - demoId: 'z-index', - }, + demoId: 'z-index' + } ], slot: [ { @@ -144,9 +144,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

自定义标题

', - 'en-US': 'Click', + 'en-US': 'Click' }, - demoId: 'left-right-arrow', + demoId: 'left-right-arrow' }, { name: 'left', @@ -154,9 +154,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

自定义左侧内容

', - 'en-US': 'Click', + 'en-US': 'Click' }, - demoId: 'left-right-text', + demoId: 'left-right-text' }, { name: 'right', @@ -164,11 +164,11 @@ export default { defaultValue: '', desc: { 'zh-CN': '

自定义右侧内容

', - 'en-US': 'Click', + 'en-US': 'Click' }, - demoId: 'left-right-text', - }, - ], - }, - ], + demoId: 'left-right-text' + } + ] + } + ] } diff --git a/examples/docs/resources/mobile/app/numeric/webdoc/numeric.js b/examples/docs/resources/mobile/app/numeric/webdoc/numeric.js index 149a87422..8702cb168 100644 --- a/examples/docs/resources/mobile/app/numeric/webdoc/numeric.js +++ b/examples/docs/resources/mobile/app/numeric/webdoc/numeric.js @@ -6,122 +6,122 @@ export default { demoId: 'automatic-price', name: { 'zh-CN': '根据商品数量自动计算价格', - 'en-US': 'button type', + 'en-US': 'button type' }, desc: { 'zh-CN': '

根据商品数量自动计算价格

', - 'en-US': '

button type

', + 'en-US': '

button type

' }, - codeFiles: ['automatic-price.vue'], + codeFiles: ['automatic-price.vue'] }, { demoId: 'circulate', name: { 'zh-CN': '是否循环', - 'en-US': 'button round', + 'en-US': 'button round' }, desc: { 'zh-CN': '

是否循环

', - 'en-US': '

button round

', + 'en-US': '

button round

' }, - codeFiles: ['circulate.vue'], + codeFiles: ['circulate.vue'] }, { demoId: 'controls-position', name: { 'zh-CN': '控制按钮显示位置', - 'en-US': 'events', + 'en-US': 'events' }, desc: { 'zh-CN': '

控制按钮显示位置

', - 'en-US': '

bbutton click

', + 'en-US': '

bbutton click

' }, - codeFiles: ['controls-position.vue'], + codeFiles: ['controls-position.vue'] }, { demoId: 'controls', name: { 'zh-CN': '控制按钮', - 'en-US': 'controls', + 'en-US': 'controls' }, desc: { 'zh-CN': '

控制按钮

', - 'en-US': '

bbutton click

', + 'en-US': '

bbutton click

' }, - codeFiles: ['controls.vue'], + codeFiles: ['controls.vue'] }, { demoId: 'event', name: { 'zh-CN': '事件', - 'en-US': 'event', + 'en-US': 'event' }, desc: { 'zh-CN': '

事件

', - 'en-US': '

bbutton click

', + 'en-US': '

bbutton click

' }, - codeFiles: ['event.vue'], + codeFiles: ['event.vue'] }, { demoId: 'max', name: { 'zh-CN': '最大值最小值', - 'en-US': 'max', + 'en-US': 'max' }, desc: { 'zh-CN': '

最大值最小值

', - 'en-US': '

bbutton click

', + 'en-US': '

bbutton click

' }, - codeFiles: ['max.vue'], + codeFiles: ['max.vue'] }, { demoId: 'placeholder', name: { 'zh-CN': '占位文本', - 'en-US': 'placeholder', + 'en-US': 'placeholder' }, desc: { 'zh-CN': '

通过placeholder属性设置输入框占位文本。

', - 'en-US': '

bbutton click

', + 'en-US': '

bbutton click

' }, - codeFiles: ['placeholder.vue'], + codeFiles: ['placeholder.vue'] }, { demoId: 'precision', name: { 'zh-CN': '数值精度', - 'en-US': 'precision', + 'en-US': 'precision' }, desc: { 'zh-CN': '

数值精度

', - 'en-US': '

bbutton click

', + 'en-US': '

bbutton click

' }, - codeFiles: ['precision.vue'], + codeFiles: ['precision.vue'] }, { demoId: 'size', name: { 'zh-CN': '尺寸', - 'en-US': 'size', + 'en-US': 'size' }, desc: { 'zh-CN': '

尺寸

', - 'en-US': '

bbutton click

', + 'en-US': '

bbutton click

' }, - codeFiles: ['size.vue'], + codeFiles: ['size.vue'] }, { demoId: 'step', name: { 'zh-CN': '步长', - 'en-US': 'step', + 'en-US': 'step' }, desc: { 'zh-CN': '

步长

', - 'en-US': '

bbutton click

', + 'en-US': '

bbutton click

' }, - codeFiles: ['step.vue'], - }, + codeFiles: ['step.vue'] + } ], apis: [ { @@ -134,9 +134,9 @@ export default { defaultValue: 'false', desc: { 'zh-CN': '

向上到达最大值后从最小值开始,或反过来,该属性默认为false

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'circulate', + demoId: 'circulate' }, { name: 'controls', @@ -144,9 +144,9 @@ export default { defaultValue: 'true', desc: { 'zh-CN': '

是否使用控制按钮,该属性默认为true

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'controls', + demoId: 'controls' }, { name: 'controls-position', @@ -154,9 +154,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

控制按钮位置

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'controls-position', + demoId: 'controls-position' }, { name: 'disabled', @@ -164,9 +164,9 @@ export default { defaultValue: 'false', desc: { 'zh-CN': '

是否禁用计数器。该属性默认为false。

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'label', @@ -174,9 +174,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

输入框关联的label文字

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'max', @@ -184,9 +184,9 @@ export default { defaultValue: 'Infinity', desc: { 'zh-CN': '

设置计数器允许的最大值,该属性默为 Infinity。

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'max', + demoId: 'max' }, { name: 'min', @@ -194,9 +194,9 @@ export default { defaultValue: '-Infinity', desc: { 'zh-CN': '

设置计数器允许的最小值,该属性默为 -Infinity

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'max', + demoId: 'max' }, { name: 'placeholder', @@ -204,9 +204,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

输入框占位文本

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'placeholder', + demoId: 'placeholder' }, { name: 'precision', @@ -214,9 +214,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

数值精度

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'precision', + demoId: 'precision' }, { name: 'size', @@ -224,9 +224,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

计数器尺寸,可选值:larger

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'precision', + demoId: 'precision' }, { name: 'step', @@ -234,9 +234,9 @@ export default { defaultValue: '1', desc: { 'zh-CN': '

设置按上下方向键或点击上下按钮增减的数值,该属性默认步长为 1。

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'step', + demoId: 'step' }, { name: 'step-strictly', @@ -244,9 +244,9 @@ export default { defaultValue: 'false', desc: { 'zh-CN': '

是否只能输入 step 的倍数,该属性默认为false。

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'step', + demoId: 'step' }, { name: 'theme', @@ -254,9 +254,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

设置圆角风格按钮

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { @@ -265,10 +265,10 @@ export default { defaultValue: '0', desc: { 'zh-CN': '

设置输入组件的默认值,该属性默认为 0。

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', - }, + demoId: '' + } ], events: [ { @@ -277,9 +277,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

设置组件的值变化时触发的回调函数。

', - 'en-US': 'Click', + 'en-US': 'Click' }, - demoId: 'event', + demoId: 'event' }, { name: 'blur', @@ -287,9 +287,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

设置组件失去焦点时触发的回调函数。

', - 'en-US': 'Click', + 'en-US': 'Click' }, - demoId: 'event', + demoId: 'event' }, { name: 'focus', @@ -297,11 +297,11 @@ export default { defaultValue: '', desc: { 'zh-CN': '

设置组件获得焦点时触发的回调函数。

', - 'en-US': 'Click', + 'en-US': 'Click' }, - demoId: 'event', - }, - ], - }, - ], + demoId: 'event' + } + ] + } + ] } diff --git a/examples/docs/resources/mobile/app/popover/webdoc/popover.js b/examples/docs/resources/mobile/app/popover/webdoc/popover.js index 7522cd136..8ccf9ec23 100644 --- a/examples/docs/resources/mobile/app/popover/webdoc/popover.js +++ b/examples/docs/resources/mobile/app/popover/webdoc/popover.js @@ -6,26 +6,26 @@ export default { demoId: 'base', name: { 'zh-CN': '基础用法', - 'en-US': 'button type', + 'en-US': 'button type' }, desc: { 'zh-CN': '

基础用法

', - 'en-US': '

button type

', + 'en-US': '

button type

' }, - codeFiles: ['base.vue'], + codeFiles: ['base.vue'] }, { demoId: 'direction', name: { 'zh-CN': '方向', - 'en-US': 'button type', + 'en-US': 'button type' }, desc: { 'zh-CN': '

展开方向

', - 'en-US': '

button type

', + 'en-US': '

button type

' }, - codeFiles: ['direction.vue'], - }, + codeFiles: ['direction.vue'] + } ], apis: [ { @@ -38,9 +38,9 @@ export default { defaultValue: 'click', desc: { 'zh-CN': '

触发方式;该属性的可选值为 click / focus / hover / manual

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'title', @@ -48,9 +48,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

标题

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', + demoId: 'base' }, { name: 'content', @@ -58,9 +58,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

显示的内容,也可以通过 slot 传入 DOM

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'width', @@ -68,19 +68,20 @@ export default { defaultValue: 'auto', desc: { 'zh-CN': '

宽度,该属性的默认值为auto,最小宽度 150px

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', + demoId: 'base' }, { name: 'placement', type: 'String', defaultValue: 'bottom', desc: { - 'zh-CN': '

出现位置;该属性的可选值为 top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end

', - 'en-US': 'display different button', + 'zh-CN': + '

出现位置;该属性的可选值为 top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end

', + 'en-US': 'display different button' }, - demoId: 'base', + demoId: 'base' }, { name: 'disabled', @@ -88,9 +89,9 @@ export default { defaultValue: 'false', desc: { 'zh-CN': '

Popover 是否可用

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'modelValue / v-model', @@ -98,9 +99,9 @@ export default { defaultValue: 'false', desc: { 'zh-CN': '

状态是否可见

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'offset', @@ -108,9 +109,9 @@ export default { defaultValue: '0', desc: { 'zh-CN': '

出现位置的偏移量

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'arrow-offset', @@ -118,9 +119,9 @@ export default { defaultValue: '0', desc: { 'zh-CN': '

箭头的位置偏移

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'transform-origin', @@ -128,9 +129,9 @@ export default { defaultValue: 'true', desc: { 'zh-CN': '

组件的旋转中心点

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'append-to-body', @@ -138,9 +139,9 @@ export default { defaultValue: 'true', desc: { 'zh-CN': '

是否添加到body上

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'transition', @@ -148,9 +149,9 @@ export default { defaultValue: 'fade-in-linear', desc: { 'zh-CN': '

定义渐变动画

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'visible-arrow', @@ -158,9 +159,9 @@ export default { defaultValue: 'true', desc: { 'zh-CN': '

是否显示 Tooltip 箭头

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'popper-options', @@ -168,9 +169,9 @@ export default { defaultValue: '{ boundariesElement: "body", gpuAcceleration: false }', desc: { 'zh-CN': '

popper.js 的参数;该属性的可选值为 参考popper.js文档

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'popper-class', @@ -178,9 +179,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

为 popper 添加类名

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'open-delay', @@ -188,9 +189,9 @@ export default { defaultValue: '0', desc: { 'zh-CN': '

触发方式为 hover 时的显示延迟,单位为毫秒

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'close-delay', @@ -198,9 +199,9 @@ export default { defaultValue: '200', desc: { 'zh-CN': '

触发方式为 hover 时的隐藏延迟,单位为毫秒

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: '', + demoId: '' }, { name: 'maxHeight', @@ -208,9 +209,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

最大高度

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', + demoId: 'base' }, { name: 'listData', @@ -218,10 +219,10 @@ export default { defaultValue: '', desc: { 'zh-CN': '

内容对象列表,对象字段包含:icon图片地址、label标题、subLabel子标题

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', - }, + demoId: 'base' + } ], events: [ { @@ -230,9 +231,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

显示时触发

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', + demoId: 'base' }, { name: 'hide', @@ -240,9 +241,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

隐藏时触发

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', + demoId: 'base' }, { name: 'after-enter', @@ -250,9 +251,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

显示动画播放完毕后触发

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', + demoId: 'base' }, { name: 'after-leave', @@ -260,10 +261,10 @@ export default { defaultValue: '', desc: { 'zh-CN': '

隐藏动画播放完毕后触发

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', - }, + demoId: 'base' + } ], slots: [ { @@ -272,9 +273,9 @@ export default { defaultValue: '', desc: { 'zh-CN': '

Popover 内嵌 HTML 文本

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', + demoId: 'base' }, { name: 'reference', @@ -282,10 +283,10 @@ export default { defaultValue: '', desc: { 'zh-CN': '

触发 Popover 显示的 HTML 元素

', - 'en-US': 'display different button', + 'en-US': 'display different button' }, - demoId: 'base', - }, + demoId: 'base' + } ] } ] diff --git a/examples/docs/resources/mobile/app/progress/dynamic-control-changes.vue b/examples/docs/resources/mobile/app/progress/dynamic-control-changes.vue index e4d432ef0..2f6cd453d 100644 --- a/examples/docs/resources/mobile/app/progress/dynamic-control-changes.vue +++ b/examples/docs/resources/mobile/app/progress/dynamic-control-changes.vue @@ -12,6 +12,7 @@ + diff --git a/examples/docs/resources/pc/demo/autocomplete/remote-search.vue b/examples/docs/resources/pc/demo/autocomplete/remote-search.vue deleted file mode 100644 index 3ca84ac6b..000000000 --- a/examples/docs/resources/pc/demo/autocomplete/remote-search.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/autocomplete/size.vue b/examples/docs/resources/pc/demo/autocomplete/size.vue deleted file mode 100644 index aba66de1e..000000000 --- a/examples/docs/resources/pc/demo/autocomplete/size.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/breadcrumb/base.vue b/examples/docs/resources/pc/demo/breadcrumb/base.vue deleted file mode 100644 index 8b7389043..000000000 --- a/examples/docs/resources/pc/demo/breadcrumb/base.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/breadcrumb/slot-default.vue b/examples/docs/resources/pc/demo/breadcrumb/slot-default.vue deleted file mode 100644 index 5da96ed2d..000000000 --- a/examples/docs/resources/pc/demo/breadcrumb/slot-default.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/button-group/button-group-multiple.vue b/examples/docs/resources/pc/demo/button-group/button-group-multiple.vue deleted file mode 100644 index 34657de82..000000000 --- a/examples/docs/resources/pc/demo/button-group/button-group-multiple.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/button-group/disabled.spec.ts b/examples/docs/resources/pc/demo/button-group/disabled.spec.ts deleted file mode 100644 index f1840440f..000000000 --- a/examples/docs/resources/pc/demo/button-group/disabled.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('测试按钮是否禁用', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/button-group/disabled') - await expect(page.getByRole('button', { name: 'Button1' }).first()).toHaveClass(/disabled/) - await expect(page.getByRole('button', { name: 'Button2' }).first()).toHaveClass(/disabled/) - await expect(page.getByRole('button', { name: 'Button2' }).first()).toHaveClass(/disabled/) - await expect(page.getByRole('button', { name: 'Button1' }).nth(1)).toHaveClass(/disabled/) - await expect(page.getByRole('button', { name: 'Button2' }).nth(1)).toHaveClass(/disabled/) - await expect(page.getByRole('button', { name: 'Button3' }).nth(1)).toHaveClass(/disabled/) -}) diff --git a/examples/docs/resources/pc/demo/button-group/disabled.vue b/examples/docs/resources/pc/demo/button-group/disabled.vue deleted file mode 100644 index 583a9134c..000000000 --- a/examples/docs/resources/pc/demo/button-group/disabled.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/button/base.vue b/examples/docs/resources/pc/demo/button/base.vue deleted file mode 100644 index be7ac8ec1..000000000 --- a/examples/docs/resources/pc/demo/button/base.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/button/circle.vue b/examples/docs/resources/pc/demo/button/circle.vue deleted file mode 100644 index b188f530d..000000000 --- a/examples/docs/resources/pc/demo/button/circle.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/button/icon.vue b/examples/docs/resources/pc/demo/button/icon.vue deleted file mode 100644 index ecbc8ebb3..000000000 --- a/examples/docs/resources/pc/demo/button/icon.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/button/size.vue b/examples/docs/resources/pc/demo/button/size.vue deleted file mode 100644 index a5d365047..000000000 --- a/examples/docs/resources/pc/demo/button/size.vue +++ /dev/null @@ -1,123 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/button/slot-default.vue b/examples/docs/resources/pc/demo/button/slot-default.vue deleted file mode 100644 index 11ba7bfaa..000000000 --- a/examples/docs/resources/pc/demo/button/slot-default.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/carousel/autoplay.spec.ts b/examples/docs/resources/pc/demo/carousel/autoplay.spec.ts deleted file mode 100644 index a70a2f256..000000000 --- a/examples/docs/resources/pc/demo/carousel/autoplay.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自动切换', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/autoplay'); - const preview = page.locator('#preview'); - const carousel = preview.locator('.tiny-carousel'); - const carouselItems = preview.locator('div.tiny-carousel__item'); - // 默认显示第一张幻灯片 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - // 这里需要等待幻灯片在3秒后切换 - await page.waitForTimeout(3000); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - await carousel.hover(); - await page.waitForTimeout(100); - // 点击下一张按钮 - await preview.locator('button:nth-child(2)').click(); - // 当前应该显示第三张幻灯片 - await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - // 点击上一张按钮 - await page.locator('.tiny-carousel__arrow').first().click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/carousel/basic-usage.spec.ts b/examples/docs/resources/pc/demo/carousel/basic-usage.spec.ts deleted file mode 100644 index fa49d90e0..000000000 --- a/examples/docs/resources/pc/demo/carousel/basic-usage.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('基础用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/basic-usage'); - const preview = page.locator('#preview'); - const carousel = preview.locator('.tiny-carousel'); - const carouselItems = preview.locator('div.tiny-carousel__item'); - // 默认显示第一张幻灯片 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - await carousel.hover(); - await page.waitForTimeout(100); - // 点击下一张按钮 - await preview.locator('button:nth-child(2)').click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - // 点击上一张按钮 - await page.locator('.tiny-carousel__arrow').first().click(); - // 当前应该显示第一张幻灯片 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - // 点击底部按钮切换 - await preview.getByRole('list').getByRole('button').nth(1).click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/carousel/card-mode.spec.ts b/examples/docs/resources/pc/demo/carousel/card-mode.spec.ts deleted file mode 100644 index f4ffbc9fb..000000000 --- a/examples/docs/resources/pc/demo/carousel/card-mode.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('卡片模式', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/card-mode'); - const preview = page.locator('#preview'); - const carousel = preview.locator('.tiny-carousel'); - const carouselItems = preview.locator('div.tiny-carousel__item'); - // 默认显示第一张幻灯片 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 192.75, 0)'); - // 第二张幻灯片应该可见,并且被缩放 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, 418.267, 0)'); - // 第四张幻灯片应该可见,并且被缩放 - await expect(carouselItems.nth(3)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, -32.7675, 0)'); - - await carousel.hover(); - await page.waitForTimeout(100); - // 点击下一张按钮 - await preview.locator('button:nth-child(2)').click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 192.75, 0)'); - // 第三张幻灯片应该可见,并且被缩放 - await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, 418.267, 0)'); - // 第一张幻灯片应该可见,并且被缩放 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, -32.7675, 0)'); - - // 点击底部按钮切换 - await preview.getByRole('list').getByRole('button').nth(2).click(); - // 当前应该显示第三张幻灯片 - await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 192.75, 0)'); - // 第四张幻灯片应该可见,并且被缩放 - await expect(carouselItems.nth(3)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, 418.267, 0)'); - // 第二张幻灯片应该可见,并且被缩放 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, -32.7675, 0)'); - - // 点击上一张按钮 - await page.locator('.tiny-carousel__arrow').first().click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 192.75, 0)'); - // 第三张幻灯片应该可见,并且被缩放 - await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, 418.267, 0)'); - // 第一张幻灯片应该可见,并且被缩放 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, -32.7675, 0)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/carousel/carousel-arrow-always.spec.ts b/examples/docs/resources/pc/demo/carousel/carousel-arrow-always.spec.ts deleted file mode 100644 index bfafea217..000000000 --- a/examples/docs/resources/pc/demo/carousel/carousel-arrow-always.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('总是显示切换箭头', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/carousel-arrow-always'); - const preview = page.locator('#preview'); - const carousel = preview.locator('.tiny-carousel'); - const carouselItems = preview.locator('div.tiny-carousel__item'); - // 默认显示第一张幻灯片 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - // 点击下一张按钮 - await preview.locator('button:nth-child(2)').click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - // 点击上一张按钮 - await page.locator('.tiny-carousel__arrow').first().click(); - // 当前应该显示第一张幻灯片 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - // 点击底部按钮切换 - await preview.getByRole('list').getByRole('button').nth(1).click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/carousel/carousel-arrow-hover.spec.ts b/examples/docs/resources/pc/demo/carousel/carousel-arrow-hover.spec.ts deleted file mode 100644 index 03d34f6b1..000000000 --- a/examples/docs/resources/pc/demo/carousel/carousel-arrow-hover.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('hover 时显示切换箭头', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/carousel-arrow-hover'); - const preview = page.locator('#preview'); - const carousel = preview.locator('.tiny-carousel'); - const carouselItems = preview.locator('div.tiny-carousel__item'); - - await carousel.hover(); - await page.waitForTimeout(100); - const arrow = carousel.locator('.tiny-carousel__arrow'); - // 左侧切换按钮 - await expect(arrow.first()).toBeVisible(); - // 右侧切换按钮 - await expect(arrow.nth(1)).toBeVisible(); - - // 点击下一张按钮 - await preview.locator('button:nth-child(2)').click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - - // 点击上一张按钮 - await page.locator('.tiny-carousel__arrow').first().click(); - // 当前应该显示第一张幻灯片 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/carousel/carousel-arrow-never.spec.ts b/examples/docs/resources/pc/demo/carousel/carousel-arrow-never.spec.ts deleted file mode 100644 index b98316e38..000000000 --- a/examples/docs/resources/pc/demo/carousel/carousel-arrow-never.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('隐藏切换箭头', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/carousel-arrow-never'); - const preview = page.locator('#preview'); - const carousel = preview.locator('.tiny-carousel'); - const carouselItems = preview.locator('div.tiny-carousel__item'); - - await carousel.hover(); - await page.waitForTimeout(100); - const arrow = carousel.locator('.tiny-carousel__arrow'); - // 左侧切换按钮应该不可见 - await expect(arrow.first()).not.toBeVisible(); - // 右侧切换按钮应该不可见 - await expect(arrow.nth(1)).not.toBeVisible(); - - // 点击底部按钮切换 - await preview.getByRole('list').getByRole('button').nth(1).click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/carousel/close-loop.spec.ts b/examples/docs/resources/pc/demo/carousel/close-loop.spec.ts deleted file mode 100644 index f8b9aa3d8..000000000 --- a/examples/docs/resources/pc/demo/carousel/close-loop.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('关闭循环轮播', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/close-loop'); - const preview = page.locator('#preview'); - const carousel = preview.locator('.tiny-carousel'); - const carouselItems = preview.locator('div.tiny-carousel__item'); - const arrow = carousel.locator('.tiny-carousel__arrow'); - - // 左侧切换按钮应该不可见 - await expect(arrow.first()).not.toBeVisible(); - // 点击下一张按钮 - await arrow.nth(1).click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - await arrow.nth(1).click(); - // 当前应该显示第三张幻灯片 - await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - // 右侧切换按钮应该不可见 - await expect(arrow.nth(1)).not.toBeVisible(); - // 点击上一张按钮 - await arrow.first().click(); - // 当前应该显示第一张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/carousel/indicator-trigger.spec.ts b/examples/docs/resources/pc/demo/carousel/indicator-trigger.spec.ts deleted file mode 100644 index e6548b09b..000000000 --- a/examples/docs/resources/pc/demo/carousel/indicator-trigger.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('指示器和触发方式', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/indicator-trigger'); - const preview = page.locator('#preview'); - const carouselItems = preview.locator('div.tiny-carousel__item'); - const indicators = preview.getByRole('list').getByRole('button'); - - // 悬浮底部第二个按钮 - await indicators.nth(1).hover(); - // 当前应该显示第一张幻灯片 - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - // 点击底部第二个按钮 - await indicators.nth(1).click(); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/carousel/show-title.spec.ts b/examples/docs/resources/pc/demo/carousel/show-title.spec.ts deleted file mode 100644 index 1a718fd9f..000000000 --- a/examples/docs/resources/pc/demo/carousel/show-title.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('显示标题', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/show-title'); - const preview = page.locator('#preview'); - const carouselItems = preview.locator('div.tiny-carousel__item'); - const indicators = preview.getByRole('list').getByRole('button'); - await expect(carouselItems.first().locator('span')).toHaveText('幻灯片 - 1'); - await indicators.nth(1).hover(); - await expect(carouselItems.nth(1).locator('span')).toHaveText('幻灯片 - 2'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/carousel/up-down-carousel.spec.ts b/examples/docs/resources/pc/demo/carousel/up-down-carousel.spec.ts deleted file mode 100644 index b3fa4fe54..000000000 --- a/examples/docs/resources/pc/demo/carousel/up-down-carousel.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('纵向轮播', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/carousel/up-down-carousel'); - const preview = page.locator('#preview'); - const indicators = preview.getByRole('button'); - const carouselItems = preview.locator('.tiny-carousel__item'); - await indicators.nth(1).hover(); - // 第一张幻灯片在Y轴向上平移了150px - await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, -150)'); - // 当前应该显示第二张幻灯片 - await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)'); - // 第三张幻灯片在Y轴向下平移了150px - await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 150)'); - // 第四张幻灯片在Y轴向上平移了450px - await expect(carouselItems.nth(3)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, -450)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/chart/boxplot/base.vue b/examples/docs/resources/pc/demo/chart/boxplot/base.vue deleted file mode 100644 index ef6facabe..000000000 --- a/examples/docs/resources/pc/demo/chart/boxplot/base.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/chart/map/base.vue b/examples/docs/resources/pc/demo/chart/map/base.vue deleted file mode 100644 index 12855e93f..000000000 --- a/examples/docs/resources/pc/demo/chart/map/base.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/chart/question/demo5.vue b/examples/docs/resources/pc/demo/chart/question/demo5.vue deleted file mode 100644 index 58ef6b3cf..000000000 --- a/examples/docs/resources/pc/demo/chart/question/demo5.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/chart/tree/demo5.vue b/examples/docs/resources/pc/demo/chart/tree/demo5.vue deleted file mode 100644 index 89088ce99..000000000 --- a/examples/docs/resources/pc/demo/chart/tree/demo5.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/col/col-move.vue b/examples/docs/resources/pc/demo/col/col-move.vue deleted file mode 100644 index 6abc00420..000000000 --- a/examples/docs/resources/pc/demo/col/col-move.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/col/tag.vue b/examples/docs/resources/pc/demo/col/tag.vue deleted file mode 100644 index 71ea80626..000000000 --- a/examples/docs/resources/pc/demo/col/tag.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/color/auxiliary-color.spec.js b/examples/docs/resources/pc/demo/color/auxiliary-color.spec.js deleted file mode 100644 index be8f8db18..000000000 --- a/examples/docs/resources/pc/demo/color/auxiliary-color.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('test', async ({ page }) => { - await page.goto('http://localhost:7130/pc/color/neutral-color'); - await page.getByText('主色彩').click(); - await page.getByText('bg-primary-normal').click(); - await expect(page.getByText('bg-primary-normal')).toHaveClass(/bg-primary-normal/); - await page.getByText('bg-primary-hover').click(); - await expect(page.getByText('bg-primary-hover')).toHaveClass(/bg-primary-hover/); - await page.getByText('bg-primary-active').click(); - await expect(page.getByText('bg-primary-active')).toHaveClass(/bg-primary-active/); - await page.getByText('bg-btn-active').click(); - await expect(page.getByText('bg-btn-active')).toHaveClass(/bg-btn-active/) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/color/main-color.spec.js b/examples/docs/resources/pc/demo/color/main-color.spec.js deleted file mode 100644 index 76da7ca03..000000000 --- a/examples/docs/resources/pc/demo/color/main-color.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('test', async ({ page }) => { - await page.goto('http://localhost:7130/pc/color/main-color'); - await page.getByText('辅助色').click(); - await page.getByText('bg-success-normal').click(); - await expect(page.getByText('bg-success-normal')).toHaveClass(/bg-success-normal/) - await page.getByText('bg-warning-normal').click(); - await expect(page.getByText('bg-warning-normal')).toHaveClass(/bg-warning-normal/) - await page.getByText('bg-error-normal').click(); - await expect(page.getByText('bg-error-normal')).toHaveClass(/bg-error-normal/) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/color/neutral-color.spec.js b/examples/docs/resources/pc/demo/color/neutral-color.spec.js deleted file mode 100644 index 763c2d7c1..000000000 --- a/examples/docs/resources/pc/demo/color/neutral-color.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('test', async ({ page }) => { - await page.goto('http://localhost:7130/pc/color/auxiliary-color'); - await page.getByText('中性色').click(); - await page.getByText('bg-gray-navigation').click(); - await expect(page.getByText('bg-gray-navigation')).toHaveClass(/bg-gray-navigation/) - await page.getByText('bg-gray-darker').click(); - await expect(page.getByText('bg-gray-darker')).toHaveClass(/bg-gray-darker/) - await page.getByText('bg-gray-dark').nth(1).click(); - await expect(page.getByText('bg-gray-dark').nth(1)).toHaveClass(/bg-gray-dark/) - await page.getByText('bg-gray-normal').click(); - await expect(page.getByText('bg-gray-normal')).toHaveClass(/bg-gray-normal/) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/config-provider/base.vue b/examples/docs/resources/pc/demo/config-provider/base.vue deleted file mode 100644 index f19f82548..000000000 --- a/examples/docs/resources/pc/demo/config-provider/base.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/config-provider/text-direct.vue b/examples/docs/resources/pc/demo/config-provider/text-direct.vue deleted file mode 100644 index 28fac4f60..000000000 --- a/examples/docs/resources/pc/demo/config-provider/text-direct.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/container/basic-usage.vue b/examples/docs/resources/pc/demo/container/basic-usage.vue deleted file mode 100644 index 2af79515e..000000000 --- a/examples/docs/resources/pc/demo/container/basic-usage.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/container/classic.spec.js b/examples/docs/resources/pc/demo/container/classic.spec.js deleted file mode 100644 index e4ec773ea..000000000 --- a/examples/docs/resources/pc/demo/container/classic.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('经典布局', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/container/simple'); - await page.getByText('经典布局').click(); - await page.locator('#preview').getByText('header').click(); - await expect(page.locator('.tiny-container > div').first()).toHaveAttribute('style', 'height: 60px;'); - await page.getByText('Main').click(); - await expect(page.locator('.tiny-container > div').nth(1)).toHaveAttribute('style', 'top: 60px; left: 0px; bottom: 60px;'); - await page.locator('#preview').getByText('footer').click(); - await expect(page.locator('.tiny-container > div').nth(2)).toHaveAttribute('style', 'height: 60px; left: 0px;'); -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/crop/basic-usage.vue b/examples/docs/resources/pc/demo/crop/basic-usage.vue deleted file mode 100644 index 0fd5d5b8f..000000000 --- a/examples/docs/resources/pc/demo/crop/basic-usage.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/crop/no-guides.vue b/examples/docs/resources/pc/demo/crop/no-guides.vue deleted file mode 100644 index c4759d676..000000000 --- a/examples/docs/resources/pc/demo/crop/no-guides.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/crop/no-modal.vue b/examples/docs/resources/pc/demo/crop/no-modal.vue deleted file mode 100644 index 6e32ff44b..000000000 --- a/examples/docs/resources/pc/demo/crop/no-modal.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/crop/view-mode.vue b/examples/docs/resources/pc/demo/crop/view-mode.vue deleted file mode 100644 index 754d1bc28..000000000 --- a/examples/docs/resources/pc/demo/crop/view-mode.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/currency/custom-service.spec.ts b/examples/docs/resources/pc/demo/currency/custom-service.spec.ts deleted file mode 100644 index f01d288a1..000000000 --- a/examples/docs/resources/pc/demo/currency/custom-service.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('自定义服务', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/currency/custom-service') - await page.locator('#preview').getByRole('textbox').click() - await page.waitForTimeout(500) - await page.getByRole('listitem').filter({ hasText: 'USD' }).click() - const inputBox = page.locator('#preview').getByRole('textbox').first() - await expect(inputBox).toHaveValue( 'USD') -}) diff --git a/examples/docs/resources/pc/demo/date-picker/basic-usage.spec.ts b/examples/docs/resources/pc/demo/date-picker/basic-usage.spec.ts deleted file mode 100644 index f6ac83335..000000000 --- a/examples/docs/resources/pc/demo/date-picker/basic-usage.spec.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('[DatePicker] 测试日期选择和清除', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/date-picker/basic-usage') - const dateInput = page.getByRole('textbox', { name: '2023-05-20' }) - const dateInput2 = page.getByRole('textbox', { name: '2023-05-21' }) - const clearIcon = page.locator('#preview').getByRole('img').nth(1) - - await page.locator('#preview').getByRole('textbox').fill('2023-05-20') - await page.locator('#preview').getByRole('textbox').press('Enter') - await expect(dateInput).toBeVisible() - - // 测试日期选择 - await dateInput.click() - await page.getByText('21', { exact: true }).click() - await expect(dateInput2).toBeVisible() - - // 测试日期清除 - await dateInput2.hover() - await expect(clearIcon).toBeVisible() - await clearIcon.click() - await expect(dateInput2).not.toBeVisible() -}) - -test('[DatePicker] 测试上一月/下一月/前一年/后一年', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/date-picker/basic-usage') - const dateInputNextMonth = page.getByRole('textbox', { name: '2023-06-04' }) - const dateInputNextYear = page.getByRole('textbox', { name: '2024-06-01' }) - const dateInputPreMonth = page.getByRole('textbox', { name: '2023-05-14' }) - const dateInputPreYear = page.getByRole('textbox', { name: '2023-06-11' }) - - // 先输入一个日期,确保后续选中的月份、年份正确 - await page.locator('#preview').getByRole('textbox').click() - await page.locator('#preview').getByRole('textbox').fill('2023-05-20') - await page.locator('#preview').getByRole('textbox').press('Enter') - - // 下一月/后一年 - await page.locator('#preview').getByRole('textbox').click() - await page.getByRole('button', { name: '下个月' }).click() - await page.getByRole('row', { name: '4 5 6 7 8 9 10' }).getByText('4').click() - await expect(dateInputNextMonth).toBeVisible() - - await dateInputNextMonth.click() - await page.getByRole('button', { name: '后一年' }).click() - await page.getByRole('row', { name: '26 27 28 29 30 31 1' }).getByText('1', { exact: true }).click() - await expect(dateInputNextYear).toBeVisible() - - // 前一年/上一月 - await dateInputNextYear.click() - await page.getByRole('button', { name: '前一年' }).click() - await page.getByText('11', { exact: true }).click() - await expect(dateInputPreYear).toBeVisible() - - await dateInputPreYear.click() - await page.getByRole('button', { name: '上个月' }).click() - await page.getByText('14').click() - await expect(dateInputPreMonth).toBeVisible() -}) - -test('[DatePicker] 测试月份/年份选择', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/date-picker/basic-usage') - const dateInputMonth = page.getByRole('textbox', { name: '2023-06-04' }) - const dateInputYear = page.getByRole('textbox', { name: '2024-02-07' }) - - // 先输入一个日期,确保后续选中的月份、年份正确 - await page.locator('#preview').getByRole('textbox').click() - await page.locator('#preview').getByRole('textbox').fill('2023-04-20') - await page.locator('#preview').getByRole('textbox').press('Enter') - - // 选择月份 - await page.locator('#preview').getByRole('textbox').click() - await page.getByRole('button', { name: '4 月' }).click() - await page.getByText('六月').click() - await page.getByRole('row', { name: '4 5 6 7 8 9 10' }).getByText('4').click() - await expect(dateInputMonth).toBeVisible() - - // 选择年份 - await dateInputMonth.click() - await page.getByRole('button', { name: '2023 年' }).click() - await page.getByText('2024').click() - await page.getByText('二月', { exact: true }).click() - await page.getByRole('row', { name: '4 5 6 7 8 9 10' }).getByText('7').click() - await expect(dateInputYear).toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/date-picker/custom-suffix-icon.spec.ts b/examples/docs/resources/pc/demo/date-picker/custom-suffix-icon.spec.ts deleted file mode 100644 index 6e6162d95..000000000 --- a/examples/docs/resources/pc/demo/date-picker/custom-suffix-icon.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('[DatePicker] 测试自定义后置图标', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/date-picker/custom-suffix-icon') - const svgPathDom = page.locator('i path') - await expect(svgPathDom).toHaveAttribute('d', 'M19.1 13H4.9c-.5 0-.9-.4-.9-1s.4-1 .9-1h14.2c.5 0 .9.4.9 1s-.4 1-.9 1z') -}) diff --git a/examples/docs/resources/pc/demo/date-picker/max-min.spec.ts b/examples/docs/resources/pc/demo/date-picker/max-min.spec.ts deleted file mode 100644 index 07478f431..000000000 --- a/examples/docs/resources/pc/demo/date-picker/max-min.spec.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { test,expect } from '@playwright/test' - -test('[DatePicker] 测试最大最小值', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/date-picker/max-min') -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/date-picker/other-picker-type.vue b/examples/docs/resources/pc/demo/date-picker/other-picker-type.vue deleted file mode 100644 index e81998745..000000000 --- a/examples/docs/resources/pc/demo/date-picker/other-picker-type.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/date-picker/readonly.spec.ts b/examples/docs/resources/pc/demo/date-picker/readonly.spec.ts deleted file mode 100644 index bf35905ea..000000000 --- a/examples/docs/resources/pc/demo/date-picker/readonly.spec.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('[DatePicker] 测试只读状态', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/date-picker/readonly') -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/date-picker/time-format.vue b/examples/docs/resources/pc/demo/date-picker/time-format.vue deleted file mode 100644 index c2ca7fd2b..000000000 --- a/examples/docs/resources/pc/demo/date-picker/time-format.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/date-picker/timezone.vue b/examples/docs/resources/pc/demo/date-picker/timezone.vue deleted file mode 100644 index 3457c6bea..000000000 --- a/examples/docs/resources/pc/demo/date-picker/timezone.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/date-picker/utc8.vue b/examples/docs/resources/pc/demo/date-picker/utc8.vue deleted file mode 100644 index ad963eec0..000000000 --- a/examples/docs/resources/pc/demo/date-picker/utc8.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/dept/custom-service.spec.ts b/examples/docs/resources/pc/demo/dept/custom-service.spec.ts deleted file mode 100644 index ff1486bf2..000000000 --- a/examples/docs/resources/pc/demo/dept/custom-service.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('自定义服务数据', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/dept/custom-service') - const iconBox = page.locator('.tiny-input__suffix-inner svg') - await iconBox.first().click() - await page.getByPlaceholder('可输入部门编码或名称').click() - await page.getByText('无线网络业务架构与设计部').click() - await page.locator('.col-xs-9 > .tiny-select > div > .tiny-input > .tiny-input__inner').first().click() - await page.getByRole('listitem').filter({ hasText: 'SZ技术' }).click() - await page.locator('div:nth-child(3) > .col-xs-9 > .tiny-select > div > .tiny-input > .tiny-input__inner').click() - await page.getByRole('listitem').filter({ hasText: '测试数据室XX' }).click() - await page.locator('div:nth-child(7) > .col-xs-9 > .tiny-select > div > .tiny-input > .tiny-input__inner').click() - await page.getByRole('listitem').filter({ hasText: '测试数据室XX' }).click() - await page.waitForTimeout(500) - await page.getByRole('button', { name: '确定' }).click() -// await page.waitForTimeout(500) - const inputBox = page.locator('.tiny-dept .tiny-input input').first() - await expect(inputBox).toHaveValue( - 'SZ技术/测试数据室XX/中央XX测试数据部/XX应用交付部/XX应用实施部/测试数据室XX/中央XX测试数据部/XX应用交付部/XX应用实施部' - ) -}) diff --git a/examples/docs/resources/pc/demo/dialog-box/fullscreen.spec.ts b/examples/docs/resources/pc/demo/dialog-box/fullscreen.spec.ts deleted file mode 100644 index 901b3713b..000000000 --- a/examples/docs/resources/pc/demo/dialog-box/fullscreen.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('全屏弹窗', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/dialog-box/fullscreen') - - const dialogBox = page.locator('.tiny-dialog-box') - await page.getByRole('button', { name: '全屏弹窗' }).click() - await expect(dialogBox).toHaveClass(/is-fullscreen/) - await expect(page.locator('body')).toHaveClass(/tiny-dialog-box__scroll-lock/) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/dialog-box/lock-scroll.spec.ts b/examples/docs/resources/pc/demo/dialog-box/lock-scroll.spec.ts deleted file mode 100644 index 0b923d7e9..000000000 --- a/examples/docs/resources/pc/demo/dialog-box/lock-scroll.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('弹出时禁用滚动', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/dialog-box/lock-scroll') - - const dialogBox = page.locator('.tiny-dialog-box') - await page.getByRole('button', { name: '允许滚动背景' }).click() - await expect(page.locator('body')).not.toHaveClass(/tiny-dialog-box__scroll-lock/) - - // 检查页面元素是否随鼠标滑轮滚动而移动 - const { y: initY } = await page.locator('#preview').boundingBox() - await page.mouse.wheel(0, 100) - await page.waitForTimeout(100) - const { y: afterY } = await page.locator('#preview').boundingBox() - expect(initY).toBeGreaterThan(afterY) - - await page.getByRole('button', { name: '确 定' }).click() - await expect(dialogBox).not.toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/drawer/basic-usage.vue b/examples/docs/resources/pc/demo/drawer/basic-usage.vue deleted file mode 100644 index 030005b02..000000000 --- a/examples/docs/resources/pc/demo/drawer/basic-usage.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/drawer/confirm-event.vue b/examples/docs/resources/pc/demo/drawer/confirm-event.vue deleted file mode 100644 index 2f53d3fe4..000000000 --- a/examples/docs/resources/pc/demo/drawer/confirm-event.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/drawer/default-slot.vue b/examples/docs/resources/pc/demo/drawer/default-slot.vue deleted file mode 100644 index 0c6e6f909..000000000 --- a/examples/docs/resources/pc/demo/drawer/default-slot.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/drawer/slot.vue b/examples/docs/resources/pc/demo/drawer/slot.vue deleted file mode 100644 index 22690849a..000000000 --- a/examples/docs/resources/pc/demo/drawer/slot.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/drawer/width.vue b/examples/docs/resources/pc/demo/drawer/width.vue deleted file mode 100644 index c531c6915..000000000 --- a/examples/docs/resources/pc/demo/drawer/width.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/drop-roles/basic-usage.vue b/examples/docs/resources/pc/demo/drop-roles/basic-usage.vue deleted file mode 100644 index c098bad3d..000000000 --- a/examples/docs/resources/pc/demo/drop-roles/basic-usage.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/drop-times/basic-usage.spec.ts b/examples/docs/resources/pc/demo/drop-times/basic-usage.spec.ts deleted file mode 100644 index 9d88bfa53..000000000 --- a/examples/docs/resources/pc/demo/drop-times/basic-usage.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/drop-times/basic-usage') - - const droptimes = page.getByPlaceholder('请选择') - const option = page.getByRole('listitem').filter({ hasText: '01:00' }) - - await droptimes.click() - await droptimes.focus() - await expect(option).toBeVisible() - await option.click() - await expect(droptimes).toHaveValue('01:00') - await expect(option).not.toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/drop-times/size.spec.ts b/examples/docs/resources/pc/demo/drop-times/size.spec.ts deleted file mode 100644 index bc8f30949..000000000 --- a/examples/docs/resources/pc/demo/drop-times/size.spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('设置组件尺寸', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/drop-times/size') - - const droptimes = page.locator('.tiny-select') - await expect(droptimes).toHaveClass(/tiny-select--medium/) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/drop-times/start-end-step.vue b/examples/docs/resources/pc/demo/drop-times/start-end-step.vue deleted file mode 100644 index 0364e3a02..000000000 --- a/examples/docs/resources/pc/demo/drop-times/start-end-step.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/dropdown/slot-default.vue b/examples/docs/resources/pc/demo/dropdown/slot-default.vue deleted file mode 100644 index 49a718f4d..000000000 --- a/examples/docs/resources/pc/demo/dropdown/slot-default.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/file-upload/custom-prefix.vue b/examples/docs/resources/pc/demo/file-upload/custom-prefix.vue deleted file mode 100644 index 15cc8fa78..000000000 --- a/examples/docs/resources/pc/demo/file-upload/custom-prefix.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/file-upload/mini-mode.vue b/examples/docs/resources/pc/demo/file-upload/mini-mode.vue deleted file mode 100644 index 9b664387f..000000000 --- a/examples/docs/resources/pc/demo/file-upload/mini-mode.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/floatbar/base.spec.ts b/examples/docs/resources/pc/demo/floatbar/base.spec.ts deleted file mode 100644 index 8fc8f94c2..000000000 --- a/examples/docs/resources/pc/demo/floatbar/base.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/floatbar/base') - - const floatbar = page.locator('#preview .tiny-float-bar') - await expect(floatbar).toBeVisible() - await expect(floatbar).toHaveCSS('right', '10px') - await page.getByRole('listitem').filter({ hasText: 'Default-A' }).click() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/font/Font-usage-specifications.spec.js b/examples/docs/resources/pc/demo/font/Font-usage-specifications.spec.js deleted file mode 100644 index 2fb7ac661..000000000 --- a/examples/docs/resources/pc/demo/font/Font-usage-specifications.spec.js +++ /dev/null @@ -1,20 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('test', async ({ page }) => { - await page.goto('http://localhost:7130/pc/font/english-fonts'); - await page.getByText('字体使用规范').click(); - await page.locator('.col-xs-10').first().click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div[1]')).toHaveAttribute('class', 'tiny-row row-font-css font-38-css') - await page.locator('div:nth-child(2) > .col-xs-10').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div[2]')).toHaveAttribute('class', 'tiny-row row-font-css font-30-css') - await page.locator('div:nth-child(3) > .col-xs-10').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div[3]')).toHaveAttribute('class', 'tiny-row row-font-css font-24-css') - await page.locator('div:nth-child(4) > .col-xs-10').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div[4]')).toHaveAttribute('class', 'tiny-row row-font-css font-20-css') - await page.locator('div:nth-child(5) > .col-xs-10').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div[5]')).toHaveAttribute('class', 'tiny-row row-font-css font-16-css') - await page.locator('div:nth-child(6) > .col-xs-10').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div[6]')).toHaveAttribute('class', 'tiny-row row-font-css font-14-css') - await page.locator('div:nth-child(7) > .col-xs-10').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div[7]')).toHaveAttribute('class', 'tiny-row row-font-css font-12-css') -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/font/chinese-font-set.spec.js b/examples/docs/resources/pc/demo/font/chinese-font-set.spec.js deleted file mode 100644 index a5004bcfa..000000000 --- a/examples/docs/resources/pc/demo/font/chinese-font-set.spec.js +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('test', async ({ page }) => { - await page.goto('http://localhost:7130/pc/font/Font-usage-specifications'); - await page.getByText('中文字体集').click(); - await page.getByRole('heading', { name: '用户体验' }).click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/h1')).toHaveText('用户体验') - await page.getByRole('heading', { name: '微软雅黑' }).click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/h5')).toHaveText('微软雅黑') -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/font/english-fonts.spec.js b/examples/docs/resources/pc/demo/font/english-fonts.spec.js deleted file mode 100644 index 1c6e87234..000000000 --- a/examples/docs/resources/pc/demo/font/english-fonts.spec.js +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('test', async ({ page }) => { - await page.goto('http://localhost:7130/pc/font/chinese-font-set'); - await page.getByText('英文字体').click(); - await page.getByRole('heading', { name: 'User Experience Design' }).click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/h1')).toHaveText('User Experience Design') - await page.getByRole('heading', { name: 'Helvetica' }).click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/h5')).toHaveText('Helvetica') -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/form/form-row-col.vue b/examples/docs/resources/pc/demo/form/form-row-col.vue deleted file mode 100644 index 571849746..000000000 --- a/examples/docs/resources/pc/demo/form/form-row-col.vue +++ /dev/null @@ -1,108 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/form/group-form.vue b/examples/docs/resources/pc/demo/form/group-form.vue deleted file mode 100644 index a76e65b7f..000000000 --- a/examples/docs/resources/pc/demo/form/group-form.vue +++ /dev/null @@ -1,134 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/form/size.vue b/examples/docs/resources/pc/demo/form/size.vue deleted file mode 100644 index dba7172e0..000000000 --- a/examples/docs/resources/pc/demo/form/size.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/form/validation-position.vue b/examples/docs/resources/pc/demo/form/validation-position.vue deleted file mode 100644 index e88fee787..000000000 --- a/examples/docs/resources/pc/demo/form/validation-position.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/fullscreen/before-change.vue b/examples/docs/resources/pc/demo/fullscreen/before-change.vue deleted file mode 100644 index 507ac5c02..000000000 --- a/examples/docs/resources/pc/demo/fullscreen/before-change.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/grid/column/column-params.vue b/examples/docs/resources/pc/demo/grid/column/column-params.vue deleted file mode 100644 index 0ef9364ad..000000000 --- a/examples/docs/resources/pc/demo/grid/column/column-params.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/grid/fixed/multi-column-fixed.vue b/examples/docs/resources/pc/demo/grid/fixed/multi-column-fixed.vue deleted file mode 100644 index 75f4fb3f1..000000000 --- a/examples/docs/resources/pc/demo/grid/fixed/multi-column-fixed.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/grid/grid-params.vue b/examples/docs/resources/pc/demo/grid/grid-params.vue deleted file mode 100644 index 8c3211429..000000000 --- a/examples/docs/resources/pc/demo/grid/grid-params.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/grid/slot/default-slot.vue b/examples/docs/resources/pc/demo/grid/slot/default-slot.vue deleted file mode 100644 index e339631bd..000000000 --- a/examples/docs/resources/pc/demo/grid/slot/default-slot.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/guide/base.vue b/examples/docs/resources/pc/demo/guide/base.vue deleted file mode 100644 index 0066d7ba0..000000000 --- a/examples/docs/resources/pc/demo/guide/base.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/guide/image-text.vue b/examples/docs/resources/pc/demo/guide/image-text.vue deleted file mode 100644 index d0c092a02..000000000 --- a/examples/docs/resources/pc/demo/guide/image-text.vue +++ /dev/null @@ -1,39 +0,0 @@ - - diff --git a/examples/docs/resources/pc/demo/guide/size.vue b/examples/docs/resources/pc/demo/guide/size.vue deleted file mode 100644 index 67bc8af88..000000000 --- a/examples/docs/resources/pc/demo/guide/size.vue +++ /dev/null @@ -1,39 +0,0 @@ - - diff --git a/examples/docs/resources/pc/demo/hrapprover/basic-usage.vue b/examples/docs/resources/pc/demo/hrapprover/basic-usage.vue deleted file mode 100644 index e83f21e08..000000000 --- a/examples/docs/resources/pc/demo/hrapprover/basic-usage.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/hrapprover/category-type.vue b/examples/docs/resources/pc/demo/hrapprover/category-type.vue deleted file mode 100644 index 1f1d7992d..000000000 --- a/examples/docs/resources/pc/demo/hrapprover/category-type.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/icon/basic-usage.spec.js b/examples/docs/resources/pc/demo/icon/basic-usage.spec.js deleted file mode 100644 index f7fa57dda..000000000 --- a/examples/docs/resources/pc/demo/icon/basic-usage.spec.js +++ /dev/null @@ -1,16 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('test', async ({ page }) => { - await page.goto('http://localhost:7130/pc/icon/basic-usage'); - await page.getByText('基本用法').nth(1).click(); - await page.locator('.icon-demo > svg').first().click(); - await expect(page.locator('.icon-demo > svg').first()).toHaveClass(/icon-share/); - await page.locator('svg:nth-child(2)').first().click(); - await expect(page.locator('svg:nth-child(2)').first()).toHaveClass(/icon-del/); - await page.locator('svg:nth-child(3)').click(); - await expect(page.locator('svg:nth-child(3)')).toHaveClass(/icon-writing/); - await page.locator('svg:nth-child(4)').click(); - await expect(page.locator('svg:nth-child(4)')).toHaveClass(/icon-ascending/); - await page.locator('.icon').click(); - await expect(page.locator('.icon')).toHaveClass(/icon-clockWork/); -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/icon/list.spec.js b/examples/docs/resources/pc/demo/icon/list.spec.js deleted file mode 100644 index 90285baff..000000000 --- a/examples/docs/resources/pc/demo/icon/list.spec.js +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('test', async ({ page }) => { - await page.goto('http://localhost:7130/pc/icon/show-title'); - await page.getByText('显示 Title').nth(1).click(); - await page.getByTitle('复制').locator('svg').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]')).toHaveAttribute('title', '复制') -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/image/basic-usage.vue b/examples/docs/resources/pc/demo/image/basic-usage.vue deleted file mode 100644 index 555c6eec0..000000000 --- a/examples/docs/resources/pc/demo/image/basic-usage.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/image/lazy-load.vue b/examples/docs/resources/pc/demo/image/lazy-load.vue deleted file mode 100644 index 666f7a7f5..000000000 --- a/examples/docs/resources/pc/demo/image/lazy-load.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/image/preview-in-dialog.vue b/examples/docs/resources/pc/demo/image/preview-in-dialog.vue deleted file mode 100644 index 4d28ea0da..000000000 --- a/examples/docs/resources/pc/demo/image/preview-in-dialog.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/image/preview-src-list.vue b/examples/docs/resources/pc/demo/image/preview-src-list.vue deleted file mode 100644 index 87d970882..000000000 --- a/examples/docs/resources/pc/demo/image/preview-src-list.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/image/preview-z-index.vue b/examples/docs/resources/pc/demo/image/preview-z-index.vue deleted file mode 100644 index 3d3352666..000000000 --- a/examples/docs/resources/pc/demo/image/preview-z-index.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/index.js b/examples/docs/resources/pc/demo/index.js deleted file mode 100644 index 405d14673..000000000 --- a/examples/docs/resources/pc/demo/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import Components from './components' - -export const getDemoCode = ({ component, type, name }) => - `${component}/${Components[component][type][name]}` diff --git a/examples/docs/resources/pc/demo/input/method-blur.vue b/examples/docs/resources/pc/demo/input/method-blur.vue deleted file mode 100644 index bf4ee5141..000000000 --- a/examples/docs/resources/pc/demo/input/method-blur.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/layout/base.vue b/examples/docs/resources/pc/demo/layout/base.vue deleted file mode 100644 index f5acbe559..000000000 --- a/examples/docs/resources/pc/demo/layout/base.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/layout/gutter.vue b/examples/docs/resources/pc/demo/layout/gutter.vue deleted file mode 100644 index fa443592b..000000000 --- a/examples/docs/resources/pc/demo/layout/gutter.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/layout/offset.vue b/examples/docs/resources/pc/demo/layout/offset.vue deleted file mode 100644 index 5e2d86ea6..000000000 --- a/examples/docs/resources/pc/demo/layout/offset.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/layout/order.vue b/examples/docs/resources/pc/demo/layout/order.vue deleted file mode 100644 index 499d00969..000000000 --- a/examples/docs/resources/pc/demo/layout/order.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/link/basic-usage.spec.ts b/examples/docs/resources/pc/demo/link/basic-usage.spec.ts deleted file mode 100644 index c0bd0a37f..000000000 --- a/examples/docs/resources/pc/demo/link/basic-usage.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('基础用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/link/basic-usage'); - const preview = page.locator('#preview'); - const anchor = preview.locator('a'); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(82, 110, 204)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/link/config-href.spec.ts b/examples/docs/resources/pc/demo/link/config-href.spec.ts deleted file mode 100644 index 142836bdd..000000000 --- a/examples/docs/resources/pc/demo/link/config-href.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('链接地址', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/link/config-href'); - const preview = page.locator('#preview'); - const anchor = preview.getByRole('link', { name: '默认链接' }); - await expect(anchor).toHaveAttribute('target', '_blank'); - await expect(anchor).toHaveAttribute('href', /\S+/); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/link/custom-icon.spec.ts b/examples/docs/resources/pc/demo/link/custom-icon.spec.ts deleted file mode 100644 index ad12af1b2..000000000 --- a/examples/docs/resources/pc/demo/link/custom-icon.spec.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义图标', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/link/custom-icon'); - const preview = page.locator('#preview'); - const edit = preview.locator('a').filter({ hasText: '编辑' }); - await expect(edit.locator('svg')).toHaveCount(1); - const disabled = preview.locator('a').filter({ hasText: '禁用' }); - await expect(disabled.locator('svg')).toHaveCount(1); - const view = preview.locator('a').filter({ hasText: '查看' }); - await expect(view.locator('svg')).toHaveCount(1); - const del = preview.locator('a').filter({ hasText: '删除' }); - await expect(del.locator('svg')).toHaveCount(1); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/link/dynamic-disable.spec.ts b/examples/docs/resources/pc/demo/link/dynamic-disable.spec.ts deleted file mode 100644 index 35de5a563..000000000 --- a/examples/docs/resources/pc/demo/link/dynamic-disable.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('禁用', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/link/dynamic-disable'); - const preview = page.locator('#preview'); - let anchor = preview.locator('a').filter({ hasText: '默认链接' }); - await expect(anchor).toHaveCSS('cursor', 'not-allowed'); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(191, 191, 191)'); - anchor = preview.locator('a').filter({ hasText: '主要链接' }); - await expect(anchor).toHaveCSS('cursor', 'not-allowed'); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(191, 191, 191)'); - anchor = preview.locator('a').filter({ hasText: '成功链接' }); - await expect(anchor).toHaveCSS('cursor', 'not-allowed'); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(191, 191, 191)'); - anchor = preview.locator('a').filter({ hasText: '警告链接' }); - await expect(anchor).toHaveCSS('cursor', 'not-allowed'); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(191, 191, 191)'); - anchor = preview.locator('a').filter({ hasText: '危险链接' }); - await expect(anchor).toHaveCSS('cursor', 'not-allowed'); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(191, 191, 191)'); - anchor = preview.locator('a').filter({ hasText: '信息链接' }); - await expect(anchor).toHaveCSS('cursor', 'not-allowed'); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(191, 191, 191)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/link/focus-no-underline.spec.ts b/examples/docs/resources/pc/demo/link/focus-no-underline.spec.ts deleted file mode 100644 index 3711aebea..000000000 --- a/examples/docs/resources/pc/demo/link/focus-no-underline.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('聚焦时有无下划线', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/link/focus-no-underline'); - const preview = page.locator('#preview'); - let anchor = preview.locator('a').filter({ hasText: '无下划线' }); - await anchor.hover(); - await expect(anchor).toHaveCSS('text-decoration', /none/); - // 无法获取到伪元素::after,暂时跳过测试 - anchor = preview.locator('a').filter({ hasText: '有下划线' }); - await anchor.hover(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/link/link-style.spec.ts b/examples/docs/resources/pc/demo/link/link-style.spec.ts deleted file mode 100644 index 259109a5e..000000000 --- a/examples/docs/resources/pc/demo/link/link-style.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('主题样式', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/link/link-style'); - const preview = page.locator('#preview'); - let anchor = preview.locator('a').filter({ hasText: '默认链接' }); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(82, 110, 204)'); - anchor = preview.locator('a').filter({ hasText: '主要链接' }); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(118, 147, 245)'); - anchor = preview.locator('a').filter({ hasText: '成功链接' }); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(172, 242, 220)'); - anchor = preview.locator('a').filter({ hasText: '警告链接' }); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(250, 194, 10)'); - anchor = preview.locator('a').filter({ hasText: '危险链接' }); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(214, 74, 82)'); - anchor = preview.locator('a').filter({ hasText: '信息链接' }); - await anchor.hover(); - await expect(anchor).toHaveCSS('color', 'rgb(92, 97, 115)'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/locales/custom-service.vue b/examples/docs/resources/pc/demo/locales/custom-service.vue deleted file mode 100644 index c02d6876a..000000000 --- a/examples/docs/resources/pc/demo/locales/custom-service.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/logout/custom-service.vue b/examples/docs/resources/pc/demo/logout/custom-service.vue deleted file mode 100644 index 5f01855ec..000000000 --- a/examples/docs/resources/pc/demo/logout/custom-service.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/milestone/basic-usage.spec.ts b/examples/docs/resources/pc/demo/milestone/basic-usage.spec.ts deleted file mode 100644 index 6aaabef06..000000000 --- a/examples/docs/resources/pc/demo/milestone/basic-usage.spec.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).not.toBeNull()) - await page.goto('http://127.0.0.1:7130/pc/milestone/basic-usage') - - const nodes = page.locator('.tiny-milestone__node') - const nodeIcons = page.locator('.tiny-milestone__icon') - const nodeLines = page.locator('.tiny-milestone__line') - const nodeTitles = page.locator('.tiny-milestone__description-name') - const nodeDates = page.locator('.tiny-milestone__description-status') - const flags = page.locator('.tiny-milestone__flag-content') - const flagLines = page.locator('.tiny-milestone__flag-line') - const flagLineDots = flagLines.locator('.tiny-milestone__dot') - const nodeCount = 6 - const iconClasss = [/is-completed status-completed/, /is-completed status-completed/, /status-doing/, /status-cancel/, /status-back/, /status-end/] - const iconStyles = [ - { 'background-color': 'rgb(255, 255, 255)', 'color': 'rgb(94, 124, 224)', 'box-shadow': 'rgba(94, 124, 224, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(255, 255, 255)', 'color': 'rgb(94, 124, 224)', 'box-shadow': 'rgba(94, 124, 224, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(126, 211, 33)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(126, 211, 33, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(217, 217, 217)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(217, 217, 217, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(245, 34, 45)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(245, 34, 45, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(250, 173, 20)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(250, 173, 20, 0.4) 0px 0px 0px 4px' } - ] - const titles = ['POR1', 'POR2', 'POR3', 'POR4', 'POR5', 'POR6'] - const flagContents = [/引导用户按照流程完成任务/, /test7欢迎使用vui/, /test8/, /test6/] - const flagLineColors = ['rgb(245, 34, 45)', 'rgb(245, 34, 45)', 'rgb(126, 211, 33)', 'rgb(94, 124, 224)'] - - await expect(nodes).toHaveCount(nodeCount) - await expect(nodeLines).toHaveCount(nodeCount) - await expect(nodeIcons).toHaveCount(nodeCount) - await expect(nodeTitles).toHaveCount(nodeCount) - await expect(nodeDates).toHaveCount(nodeCount) - for (let i = 0; i < nodeCount; i++) { - await expect(nodes.nth(i)).toHaveCSS('width', '128.484px') - await expect(nodes.nth(i)).toHaveCSS('height', '88px') - await expect(nodeLines.nth(i)).toHaveCSS('height', '4px') - await expect(nodeIcons.nth(i)).toHaveClass(iconClasss[i]) - await expect(nodeTitles.nth(i)).toHaveText(titles[i]) - await expect(nodeDates.nth(i)).toHaveText(/2018-9/) - - if (i < 5) { - await expect(nodeLines.nth(i)).toHaveCSS('width', '128.484px') - } else { - await expect(nodeLines.nth(i)).toHaveCSS('width', '0px') - } - if (i < 2) { - await expect(nodeIcons.nth(i).locator('svg')).toHaveCSS('font-size', '12px') - } else { - await expect(nodeIcons.nth(i)).toHaveText(String(i - 1)) - } - if (i < 4) { - const { y, width, height } = await flags.nth(i).boundingBox() - await expect(y).toBeCloseTo(290, 2) - await expect(width).toEqual(58) - await expect(height).toEqual(34) - await expect(flags.nth(i)).toHaveText(flagContents[i]) - await expect(flagLines.nth(i)).toHaveCSS('width', '1px') - await expect(flagLines.nth(i)).toHaveCSS('height', '30px') - await expect(flagLines.nth(i)).toHaveCSS('background-color', flagLineColors[i]) - await flagLineDots.nth(i).isVisible() - } - - for (let k in iconStyles[0]) { - await expect(nodeIcons.nth(i)).toHaveCSS(k, iconStyles[i][k]) - } - } -}) diff --git a/examples/docs/resources/pc/demo/milestone/data-field-mapping.spec.ts b/examples/docs/resources/pc/demo/milestone/data-field-mapping.spec.ts deleted file mode 100644 index 8e0853ba4..000000000 --- a/examples/docs/resources/pc/demo/milestone/data-field-mapping.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('数据字段映射', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).not.toBeNull()) - await page.goto('http://127.0.0.1:7130/pc/milestone/data-field-mapping') - - const flags = page.locator('.tiny-milestone__flag-content') - const nodeIcons = page.locator('.tiny-milestone__icon') - const nodeTitles = page.locator('.tiny-milestone__description-name') - const nodeDates = page.locator('.tiny-milestone__description-status') - const count = 4 - const iconClasss = [/is-completed status-completed/, /is-completed status-completed/, /status-doing/, /status-cancel/, /status-back/] - const flagcontents = [/第二阶段flag-content-field/, /第四阶段1flag-content-field/, /第四阶段2flag-content-field/, /第五阶段flag-content-field/] - const titles = ['POR1', 'POR2', 'POR3', 'POR4', 'POR5'] - - for (let i = 0; i < count; i++) { - await expect(flags.nth(i)).toHaveText(flagcontents[i]) - await expect(nodeIcons.nth(i)).toHaveClass(iconClasss[i]) - await expect(nodeTitles.nth(i)).toHaveText(titles[i]) - await expect(nodeDates.nth(i)).toHaveText(/2018-9/) - } -}) diff --git a/examples/docs/resources/pc/demo/milestone/milestones-status.spec.ts b/examples/docs/resources/pc/demo/milestone/milestones-status.spec.ts deleted file mode 100644 index bfe61c389..000000000 --- a/examples/docs/resources/pc/demo/milestone/milestones-status.spec.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('状态与颜色对应关系', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).not.toBeNull()) - await page.goto('http://127.0.0.1:7130/pc/milestone/milestones-status') - - const nodes = page.locator('.tiny-milestone__node') - const nodeIcons = page.locator('.tiny-milestone__icon') - const nodeLines = page.locator('.tiny-milestone__line') - const nodeTitles = page.locator('.tiny-milestone__description-name') - const nodeDates = page.locator('.tiny-milestone__description-status') - const nodeCount = 6 - const iconClasss = [/is-completed status-completed/, /is-completed status-completed/, /status-doing/, /status-cancel/, /status-back/, /status-end/] - const iconStyles = [ - { 'background-color': 'rgb(255, 255, 255)', 'color': 'rgb(94, 124, 224)', 'box-shadow': 'rgba(94, 124, 224, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(255, 255, 255)', 'color': 'rgb(94, 124, 224)', 'box-shadow': 'rgba(94, 124, 224, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(126, 211, 33)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(126, 211, 33, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(217, 217, 217)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(217, 217, 217, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(245, 34, 45)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(245, 34, 45, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(250, 173, 20)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(250, 173, 20, 0.4) 0px 0px 0px 4px' } - ] - const titles = ['完成状态,状态值:completed', '完成状态,状态值:completed', '未完成状态, 状态值:doing', '未完成状态,状态值:cancel', '未完成状态,状态值:back', '未完成状态,状态值:end'] - - await expect(nodes).toHaveCount(nodeCount) - await expect(nodeLines).toHaveCount(nodeCount) - await expect(nodeIcons).toHaveCount(nodeCount) - await expect(nodeTitles).toHaveCount(nodeCount) - await expect(nodeDates).toHaveCount(nodeCount) - for (let i = 0; i < nodeCount; i++) { - await expect(nodes.nth(i)).toHaveCSS('width', '128.484px') - await expect(nodes.nth(i)).toHaveCSS('height', '102px') - await expect(nodeLines.nth(i)).toHaveCSS('height', '4px') - await expect(nodeIcons.nth(i)).toHaveClass(iconClasss[i]) - await expect(nodeTitles.nth(i)).toHaveText(titles[i]) - await expect(nodeDates.nth(i)).toHaveText(/2018-9/) - - if (i < 5) { - await expect(nodeLines.nth(i)).toHaveCSS('width', '128.484px') - } else { - await expect(nodeLines.nth(i)).toHaveCSS('width', '0px') - } - if (i < 2) { - await expect(nodeIcons.nth(i).locator('svg')).toHaveCSS('font-size', '12px') - } else { - await expect(nodeIcons.nth(i)).toHaveText(String(i - 1)) - } - - for (let k in iconStyles[0]) { - await expect(nodeIcons.nth(i)).toHaveCSS(k, iconStyles[i][k]) - } - } -}) diff --git a/examples/docs/resources/pc/demo/milestone/show-number.spec.ts b/examples/docs/resources/pc/demo/milestone/show-number.spec.ts deleted file mode 100644 index fef25b6aa..000000000 --- a/examples/docs/resources/pc/demo/milestone/show-number.spec.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('取消未完成状态序号显示', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).not.toBeNull()) - await page.goto('http://127.0.0.1:7130/pc/milestone/show-number') - - const button = page.getByRole('button').filter({ hasText: '设置show-number值为false' }) - const nodes = page.locator('.tiny-milestone__node') - const nodeIcons = page.locator('.tiny-milestone__icon') - const nodeLines = page.locator('.tiny-milestone__line') - const nodeTitles = page.locator('.tiny-milestone__description-name') - const nodeDates = page.locator('.tiny-milestone__description-status') - const nodeCount = 6 - const iconClasss = [/is-completed status-completed/, /is-completed status-completed/, /status-doing/, /status-cancel/, /status-back/, /status-end/] - const iconStyles = [ - { 'background-color': 'rgb(255, 255, 255)', 'color': 'rgb(94, 124, 224)', 'box-shadow': 'rgba(94, 124, 224, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(255, 255, 255)', 'color': 'rgb(94, 124, 224)', 'box-shadow': 'rgba(94, 124, 224, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(126, 211, 33)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(126, 211, 33, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(217, 217, 217)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(217, 217, 217, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(245, 34, 45)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(245, 34, 45, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(250, 173, 20)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(250, 173, 20, 0.4) 0px 0px 0px 4px' } - ] - const titles = ['完成状态,状态值:completed', '完成状态,状态值:completed', '未完成状态, 状态值:doing', '未完成状态,状态值:cancel', '未完成状态,状态值:back', '未完成状态,状态值:end'] - - await expect(nodes).toHaveCount(nodeCount) - await expect(nodeLines).toHaveCount(nodeCount) - await expect(nodeIcons).toHaveCount(nodeCount) - await expect(nodeTitles).toHaveCount(nodeCount) - await expect(nodeDates).toHaveCount(nodeCount) - for (let i = 0; i < nodeCount; i++) { - await expect(nodes.nth(i)).toHaveCSS('width', '128.484px') - await expect(nodes.nth(i)).toHaveCSS('height', '102px') - await expect(nodeLines.nth(i)).toHaveCSS('height', '4px') - await expect(nodeIcons.nth(i)).toHaveClass(iconClasss[i]) - await expect(nodeTitles.nth(i)).toHaveText(titles[i]) - await expect(nodeDates.nth(i)).toHaveText(/2018-9/) - - if (i < 5) { - await expect(nodeLines.nth(i)).toHaveCSS('width', '128.484px') - } else { - await expect(nodeLines.nth(i)).toHaveCSS('width', '0px') - } - if (i < 2) { - await expect(nodeIcons.nth(i).locator('svg')).toHaveCSS('font-size', '12px') - } else { - await expect(nodeIcons.nth(i)).toHaveText(String(i - 1)) - } - - for (let k in iconStyles[0]) { - await expect(nodeIcons.nth(i)).toHaveCSS(k, iconStyles[i][k]) - } - } - - await button.click() - - for (let i = 0; i < nodeCount; i++) { - if (i < 2) { - await expect(nodeIcons.nth(i).locator('svg')).toHaveCSS('font-size', '12px') - } else { - await expect(nodeIcons.nth(i)).toHaveText('') - } - } -}) diff --git a/examples/docs/resources/pc/demo/milestone/solid-style.spec.ts b/examples/docs/resources/pc/demo/milestone/solid-style.spec.ts deleted file mode 100644 index 0e11ad65f..000000000 --- a/examples/docs/resources/pc/demo/milestone/solid-style.spec.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('已完成节点实心显示', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).not.toBeNull()) - await page.goto('http://127.0.0.1:7130/pc/milestone/solid-style') - - const button = page.getByRole('button').filter({ hasText: '设置solid值为true' }) - const nodes = page.locator('.tiny-milestone__node') - const nodeIcons = page.locator('.tiny-milestone__icon') - const nodeLines = page.locator('.tiny-milestone__line') - const nodeTitles = page.locator('.tiny-milestone__description-name') - const nodeDates = page.locator('.tiny-milestone__description-status') - const nodeCount = 6 - const iconClasss = [/is-completed status-completed/, /is-completed status-completed/, /status-doing/, /status-xxx/, /status-back/, /status-end/] - const iconStyles = [ - { 'background-color': 'rgb(255, 255, 255)', 'color': 'rgb(94, 124, 224)', 'box-shadow': 'rgba(94, 124, 224, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(255, 255, 255)', 'color': 'rgb(94, 124, 224)', 'box-shadow': 'rgba(94, 124, 224, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(126, 211, 33)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(126, 211, 33, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(217, 217, 217)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(217, 217, 217, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(245, 34, 45)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(245, 34, 45, 0.4) 0px 0px 0px 4px' }, - { 'background-color': 'rgb(250, 173, 20)', 'color': 'rgb(255, 255, 255)', 'box-shadow': 'rgba(250, 173, 20, 0.4) 0px 0px 0px 4px' } - ] - const titles = ['完成状态,状态值:completed', '完成状态,状态值:completed', '未完成状态, 状态值:doing', '未完成状态,状态值:xxx', '未完成状态,状态值:back', '未完成状态,状态值:end'] - - await expect(nodes).toHaveCount(nodeCount) - await expect(nodeLines).toHaveCount(nodeCount) - await expect(nodeIcons).toHaveCount(nodeCount) - await expect(nodeTitles).toHaveCount(nodeCount) - await expect(nodeDates).toHaveCount(nodeCount) - for (let i = 0; i < nodeCount; i++) { - await expect(nodes.nth(i)).toHaveCSS('width', '128.484px') - await expect(nodes.nth(i)).toHaveCSS('height', '102px') - await expect(nodeLines.nth(i)).toHaveCSS('height', '4px') - await expect(nodeIcons.nth(i)).toHaveClass(iconClasss[i]) - await expect(nodeTitles.nth(i)).toHaveText(titles[i]) - await expect(nodeDates.nth(i)).toHaveText(/2018-9/) - - if (i < 5) { - await expect(nodeLines.nth(i)).toHaveCSS('width', '128.484px') - } else { - await expect(nodeLines.nth(i)).toHaveCSS('width', '0px') - } - if (i < 2) { - await expect(nodeIcons.nth(i).locator('svg')).toHaveCSS('font-size', '12px') - } else { - await expect(nodeIcons.nth(i)).toHaveText(String(i - 1)) - } - - for (let k in iconStyles[0]) { - await expect(nodeIcons.nth(i)).toHaveCSS(k, iconStyles[i][k]) - } - } - - await button.click() - - for (let i = 0; i < 2; i++) { - await expect(nodeIcons.nth(i)).toHaveCSS('background-color', 'rgb(94, 124, 224)') - } -}) diff --git a/examples/docs/resources/pc/demo/modal/base.spec.ts b/examples/docs/resources/pc/demo/modal/base.spec.ts deleted file mode 100644 index caccc319e..000000000 --- a/examples/docs/resources/pc/demo/modal/base.spec.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/base') - - // 基本提示框 - const modal = page.locator('.tiny-modal.type__alert') - await page.getByRole('button', { name: '基本提示框' }).click() - await expect(modal).toBeVisible() - await expect(modal).toHaveClass(/is__mask/) - await page.getByRole('button', { name: '确认', exact: true }).click() - await expect(modal).not.toBeVisible() - await page.getByRole('button', { name: '基本提示框' }).click() - await page.locator('.tiny-modal__close-btn').click() - await expect(modal).not.toBeVisible() - - // 成功提示框 - await page.getByRole('button', { name: '成功提示框' }).click() - await expect(modal).toHaveClass(/status__success/) - await expect(modal.locator('.tiny-modal__status-wrapper svg')).toHaveClass(/tiny-modal-svg__success/) - await page.getByRole('button', { name: '确认', exact: true }).click() - await expect(page.locator('.tiny-modal.type__alert.status__success')).not.toBeVisible() - - // 失败提示框 - await page.getByRole('button', { name: '失败提示框' }).click() - await expect(page.locator('.tiny-modal.type__alert')).toHaveClass(/status__error/) - await expect(modal.locator('.tiny-modal__status-wrapper svg')).toHaveClass(/tiny-modal-svg__error/) - await page.getByRole('button', { name: '确认', exact: true }).click() - await expect(page.locator('.tiny-modal.type__alert.status__error')).not.toBeVisible() - - // 确认提示框 - await page.getByRole('button', { name: '确认提示框' }).click() - await expect(page.locator('.tiny-modal')).toHaveClass(/type__confirm/) - await page.getByRole('button', { name: '确认', exact: true }).click() - await expect(page.locator('.tiny-modal.type__confirm')).not.toBeVisible() - await page.getByRole('button', { name: '确认提示框' }).click() - await page.getByRole('button', { name: '取消' }).click() - await expect(page.locator('.tiny-modal.type__confirm')).not.toBeVisible() - await page.getByRole('button', { name: '确认提示框' }).click() - await page.locator('.tiny-modal__close-btn').click() - await expect(page.locator('.tiny-modal.type__confirm')).not.toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/base.vue b/examples/docs/resources/pc/demo/modal/base.vue deleted file mode 100644 index 375ee7c3e..000000000 --- a/examples/docs/resources/pc/demo/modal/base.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/modal/close-event.spec.ts b/examples/docs/resources/pc/demo/modal/close-event.spec.ts deleted file mode 100644 index 88e52bdcd..000000000 --- a/examples/docs/resources/pc/demo/modal/close-event.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('关闭按钮事件', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/close-event') - - const modal = page.locator('.tiny-modal').filter({ hasText: 'test' }) - await page.getByRole('button', { name: '点击关闭按钮时触发事件' }).click() - await page.locator('.tiny-modal__close-btn').click() - await expect(modal).not.toBeVisible() - await expect(page.locator('.tiny-modal.type__message')).toHaveText('点击关闭按钮时触发事件') - -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/confirm-event.spec.ts b/examples/docs/resources/pc/demo/modal/confirm-event.spec.ts deleted file mode 100644 index b3b4c8561..000000000 --- a/examples/docs/resources/pc/demo/modal/confirm-event.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('确认按钮事件', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/confirm-event') - - const modal = page.locator('.tiny-modal').filter({ hasText: 'test' }) - await page.getByRole('button', { name: '点击确定按钮触发事件' }).click() - await page.getByRole('button', { name: '确认' }).click() - await expect(modal).not.toBeVisible() - await expect(page.locator('.tiny-modal.type__message')).toHaveText('点击确定按钮时触发事件') -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/footer-slot.spec.ts b/examples/docs/resources/pc/demo/modal/footer-slot.spec.ts deleted file mode 100644 index d38ef5ae1..000000000 --- a/examples/docs/resources/pc/demo/modal/footer-slot.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('底部插槽', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/footer-slot') - - const modal = page.locator('.tiny-modal') - await page.getByRole('button', { name: '自定义脚部' }).click() - await expect(modal.getByRole('button', { name: '自定义脚部信息' })).toBeVisible() - await modal.getByRole('button', { name: '自定义脚部信息' }).click() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/fullscreen.spec.ts b/examples/docs/resources/pc/demo/modal/fullscreen.spec.ts deleted file mode 100644 index b859d83fa..000000000 --- a/examples/docs/resources/pc/demo/modal/fullscreen.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('最大化显示', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/fullscreen') - - const modal = page.locator('.tiny-modal.type__alert') - await page.getByRole('button', { name: '最大化显示' }).click() - await expect(modal).toHaveClass(/is__maximize/) - await page.locator('.tiny-modal__close-btn').click() - await expect(modal).not.toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/grid.spec.ts b/examples/docs/resources/pc/demo/modal/grid.spec.ts deleted file mode 100644 index bb47d7e9a..000000000 --- a/examples/docs/resources/pc/demo/modal/grid.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('嵌套grid', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/grid') - - const modal = page.locator('.tiny-modal') - const grid = modal.locator('.tiny-grid ') - await page.getByRole('button', { name: '默认插槽' }).click() - await expect(grid).toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/lock-scroll.spec.ts b/examples/docs/resources/pc/demo/modal/lock-scroll.spec.ts deleted file mode 100644 index d3bb78e74..000000000 --- a/examples/docs/resources/pc/demo/modal/lock-scroll.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('锁住滚动条', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/lock-scroll') - - const modal = page.locator('.tiny-modal') - await page.getByRole('button', { name: '不锁住滚动条不要遮罩层' }).click() - await expect(modal).not.toHaveClass(/lock__scroll/) - - // 上下滑动模态框内容 - const { y: initY } = await modal.locator('.tiny-modal__box').boundingBox() - await page.mouse.wheel(0, 100) - await page.waitForTimeout(100) - const { y: afterY } = await modal.locator('.tiny-modal__box').boundingBox() - expect(afterY).toBeLessThan(initY) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/mask-closable.spec.ts b/examples/docs/resources/pc/demo/modal/mask-closable.spec.ts deleted file mode 100644 index 16da32963..000000000 --- a/examples/docs/resources/pc/demo/modal/mask-closable.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('点击遮罩层关闭窗口', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/mask-closable') - - await page.getByRole('button', { name: '点击遮罩层可以关闭' }).click() - await expect(page.locator('.tiny-modal')).toBeVisible() - await page.mouse.click(10, 10) - await expect(page.locator('.tiny-modal')).not.toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/resize.spec.ts b/examples/docs/resources/pc/demo/modal/resize.spec.ts deleted file mode 100644 index c27db5c23..000000000 --- a/examples/docs/resources/pc/demo/modal/resize.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('调整窗口大小', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/resize') - - await page.getByRole('button', { name: '可以拖动调整窗口大小' }).click() - const modal = page.locator('.tiny-modal__box') - - // 获取弹窗位置 - const { x, y, width, height } = await modal.boundingBox() - - // 开始拖动放大 - await page.mouse.move(x, y) - await page.mouse.down() - await page.mouse.move(x, y - 50) - await page.mouse.move(x - 50, y) - await expect(modal).toHaveClass(/is__drag/) - await page.mouse.up() - - // 判断窗口尺寸是否放大 - const { width: finalWidth, height: finalHeight } = await modal.boundingBox() - expect(width).toBeLessThan(finalWidth) - expect(height).toBeLessThan(finalHeight) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/title.spec.ts b/examples/docs/resources/pc/demo/modal/title.spec.ts deleted file mode 100644 index d15ee06ca..000000000 --- a/examples/docs/resources/pc/demo/modal/title.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('标题', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/title') - - const modal = page.locator('.tiny-modal') - await page.getByRole('button', { name: '自定义标题' }).click() - await expect(modal.locator('.tiny-modal__header')).toHaveText('自定义标题') -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/type.spec.ts b/examples/docs/resources/pc/demo/modal/type.spec.ts deleted file mode 100644 index 9a7700fab..000000000 --- a/examples/docs/resources/pc/demo/modal/type.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('窗口类型', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/modal/type') - - const alert = page.locator('.tiny-modal').filter({ hasText: 'alert 弹框' }) - await page.getByRole('button', { name: 'alert 弹框' }).click() - await expect(alert).toBeVisible() - await expect(alert).toHaveClass(/type__alert/) - await page.getByRole('button', { name: '确认', exact: true }).click() - - const message = page.locator('.tiny-modal').filter({ hasText: 'message 提示框' }) - await page.getByRole('button', { name: 'message 提示框' }).click() - await expect(message).toBeVisible() - await expect(message).toHaveClass(/type__message/) - - const confirm = page.locator('.tiny-modal').filter({ hasText: '确定框' }) - await page.getByRole('button', { name: 'confirm 确认提示框' }).click() - await expect(confirm).toBeVisible() - await expect(confirm).toHaveClass(/type__confirm/) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/modal/value.vue b/examples/docs/resources/pc/demo/modal/value.vue deleted file mode 100644 index 0c5b6b6f4..000000000 --- a/examples/docs/resources/pc/demo/modal/value.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/nav-menu/basic-usage.spec.ts b/examples/docs/resources/pc/demo/nav-menu/basic-usage.spec.ts deleted file mode 100644 index 2ba353cf9..000000000 --- a/examples/docs/resources/pc/demo/nav-menu/basic-usage.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('基础用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/nav-menu/basic-usage'); - const preview = page.locator('#preview'); - const popMenu = preview.locator('.popmenu'); - const homePage = preview.getByText('首页'); - await homePage.click(); - await expect(homePage).toHaveCSS('border-bottom', /3px solid/); - const components = preview.getByText('组件'); - await components.hover(); - await expect(popMenu).toBeVisible(); - const showMore = preview.getByText('更多'); - await showMore.hover(); - await expect(popMenu).toBeVisible(); -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/nav-menu/before-skip-prevent.spec.ts b/examples/docs/resources/pc/demo/nav-menu/before-skip-prevent.spec.ts deleted file mode 100644 index 9e9f98aae..000000000 --- a/examples/docs/resources/pc/demo/nav-menu/before-skip-prevent.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('使用组件默认服务时,菜单跳转处理', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/nav-menu/before-skip-prevent'); - const preview = page.locator('#preview'); - const popMenu = preview.locator('.popmenu'); - const modal = page.locator('div').filter({ hasText: /prevent 事件/ }).first(); - await preview.getByText('首页').click(); - await expect(modal).toBeVisible(); - const components = preview.locator('a').filter({ hasText: '组件' }); - await components.hover(); - await expect(popMenu).toBeVisible(); - await components.click(); - await expect(modal).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/nav-menu/before-skip.spec.ts b/examples/docs/resources/pc/demo/nav-menu/before-skip.spec.ts deleted file mode 100644 index cc20880c8..000000000 --- a/examples/docs/resources/pc/demo/nav-menu/before-skip.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('菜单跳转处理', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/nav-menu/before-skip'); - const preview = page.locator('#preview'); - await preview.getByText('规范').click(); - await expect(page.locator('div').filter({ hasText: '当前跳转的菜单为:规范' }).first()).toBeVisible(); - await preview.getByText('案例').click(); - await expect(page.locator('div').filter({ hasText: '当前跳转的菜单为:案例' }).first()).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/nav-menu/custom-service.spec.ts b/examples/docs/resources/pc/demo/nav-menu/custom-service.spec.ts deleted file mode 100644 index 49f0918cc..000000000 --- a/examples/docs/resources/pc/demo/nav-menu/custom-service.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义服务', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/nav-menu/custom-service'); - const preview = page.locator('#preview'); - const guides = preview.getByText('指南'); - await guides.hover(); - await expect(preview.locator('.popmenu')).toBeVisible(); - await guides.click(); - await expect(guides).toHaveCSS('border-bottom', /3px solid/); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/nav-menu/data-resource.spec.ts b/examples/docs/resources/pc/demo/nav-menu/data-resource.spec.ts deleted file mode 100644 index 2f25f5624..000000000 --- a/examples/docs/resources/pc/demo/nav-menu/data-resource.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('数据源', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/nav-menu/data-resource'); - const preview = page.locator('#preview'); - const popMenu = preview.locator('.popmenu'); - const homePage = preview.getByText('首页'); - await homePage.click(); - await expect(homePage).toHaveCSS('border-bottom', /3px solid/); - const components = preview.getByText('组件'); - await components.hover(); - await expect(popMenu).toBeVisible(); - const showMore = preview.getByText('更多'); - await showMore.hover(); - await expect(popMenu).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/nav-menu/overflow.spec.ts b/examples/docs/resources/pc/demo/nav-menu/overflow.spec.ts deleted file mode 100644 index b7762ac86..000000000 --- a/examples/docs/resources/pc/demo/nav-menu/overflow.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('显示策略', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/nav-menu/overflow'); - const preview = page.locator('#preview'); - const popMenu = preview.locator('.popmenu'); - await preview.locator('.more-button').hover(); - await expect(popMenu).toBeVisible(); - await preview.getByRole('listitem').filter({ hasText: '指南' }).nth(2).hover(); - await expect(popMenu.locator('.sub-menu')).toBeVisible(); - await preview.getByText('指南').first().hover(); - await expect(popMenu).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/nav-menu/slot-logo.spec.ts b/examples/docs/resources/pc/demo/nav-menu/slot-logo.spec.ts deleted file mode 100644 index bfbfa816c..000000000 --- a/examples/docs/resources/pc/demo/nav-menu/slot-logo.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('Logo 插槽', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/nav-menu/slot-logo'); - const preview = page.locator('#preview'); - await expect(preview.locator('.slot-logo svg')).toHaveCount(1); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/nav-menu/slot-toolbar.spec.ts b/examples/docs/resources/pc/demo/nav-menu/slot-toolbar.spec.ts deleted file mode 100644 index d05bfedd2..000000000 --- a/examples/docs/resources/pc/demo/nav-menu/slot-toolbar.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('Toolbar 插槽', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/nav-menu/slot-toolbar'); - const preview = page.locator('#preview'); - await expect(preview.locator('.slot-toolbar svg')).toHaveCount(1); -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/numeric/allow-empty.vue b/examples/docs/resources/pc/demo/numeric/allow-empty.vue deleted file mode 100644 index 41f09e309..000000000 --- a/examples/docs/resources/pc/demo/numeric/allow-empty.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/numeric/basic-usage.spec.ts b/examples/docs/resources/pc/demo/numeric/basic-usage.spec.ts deleted file mode 100644 index abb2aa082..000000000 --- a/examples/docs/resources/pc/demo/numeric/basic-usage.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/numeric/basic-usage') - - const input = page.getByRole('spinbutton') - const increaseBtn = page.locator('#preview .tiny-numeric__increase') - const decreaseBtn = page.locator('#preview .tiny-numeric__decrease') - const value = Number(await input.inputValue()) - await increaseBtn.click() - const increasedVal = Number(await input.inputValue()) - expect(value).toEqual(increasedVal - 1) - - await decreaseBtn.click() - const decreasedVal = Number(await input.inputValue()) - expect(decreasedVal).toEqual(increasedVal - 1) - - await input.fill('10001') - const currentVal = await input.inputValue() - expect(currentVal).toEqual('10001') -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/numeric/max-min.spec.ts b/examples/docs/resources/pc/demo/numeric/max-min.spec.ts deleted file mode 100644 index 4ae096b67..000000000 --- a/examples/docs/resources/pc/demo/numeric/max-min.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('最值与数值循环', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/numeric/max-min') - - const input = page.getByRole('spinbutton') - const increaseBtn = page.locator('#preview .tiny-numeric__increase') - const decreaseBtn = page.locator('#preview .tiny-numeric__decrease') - const min = 0 - const max = 10 - await decreaseBtn.click() - const decreasedVal = Number(await input.inputValue()) - expect(decreasedVal).toEqual(max) - await increaseBtn.click() - const increasedVal = Number(await input.inputValue()) - expect(increasedVal).toEqual(min) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/pager/basic-usage.vue b/examples/docs/resources/pc/demo/pager/basic-usage.vue deleted file mode 100644 index 6bebc1c93..000000000 --- a/examples/docs/resources/pc/demo/pager/basic-usage.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/pager/page-size.vue b/examples/docs/resources/pc/demo/pager/page-size.vue deleted file mode 100644 index d632f81da..000000000 --- a/examples/docs/resources/pc/demo/pager/page-size.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/pager/pager-disabled.vue b/examples/docs/resources/pc/demo/pager/pager-disabled.vue deleted file mode 100644 index 01f38a0fd..000000000 --- a/examples/docs/resources/pc/demo/pager/pager-disabled.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/pager/pager-size.vue b/examples/docs/resources/pc/demo/pager/pager-size.vue deleted file mode 100644 index d35d85bee..000000000 --- a/examples/docs/resources/pc/demo/pager/pager-size.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/pop-upload/basic-usage.spec.ts b/examples/docs/resources/pc/demo/pop-upload/basic-usage.spec.ts deleted file mode 100644 index 64123b593..000000000 --- a/examples/docs/resources/pc/demo/pop-upload/basic-usage.spec.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { test, expect } from '@playwright/test' -import exp from 'constants' - -test('PopUpload 基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-upload/basic-usage') - - const preview = page.locator('#preview') - const modalAppearBtn = preview.getByRole('button', { name: '选择文件' }) - const modal = page.locator('.tiny-modal') - const selectFilesBtn = modal.getByRole('button', { name: '选择文件' }) - const uploadsBtn = modal.getByRole('button', { name: '开始上传' }) - const cancelBtn = modal.getByRole('button', { name: '取消' }) - const lists = modal.locator('.tiny-popupload__dialog-table-item') - const deleteIcon = lists.locator('.delIcon') - const path = require('node:path') - const currentPath = path.resolve(__dirname, '测试.jpg') - - // 点击选择文件按钮,上传弹窗弹出 - await modalAppearBtn.click() - await expect(modal).toBeVisible() - await expect(selectFilesBtn).toBeVisible() - - // 没有文件被选择时,开始上传按钮禁用 - await expect(lists).toHaveCount(0) - await expect(uploadsBtn).toBeDisabled() - - // 点击选择文件后,文件被选择,开始上传按钮启用 - const [fileChooser] = await Promise.all([page.waitForEvent('filechooser'), selectFilesBtn.click()]) - await fileChooser.setFiles(currentPath) - await expect(lists).toHaveCount(1) - await expect(uploadsBtn).not.toBeDisabled() - - // 文件被选择后,点击垃圾桶图标删除文件 - await expect(lists).toHaveCount(1) - await deleteIcon.click() - await expect(lists).toHaveCount(0) - await expect(uploadsBtn).toBeDisabled() - - // 点击取消按钮,上传弹窗消失 - await cancelBtn.click() - await expect(modal).not.toBeVisible() -}) diff --git a/examples/docs/resources/pc/demo/pop-upload/size.spec.ts b/examples/docs/resources/pc/demo/pop-upload/size.spec.ts deleted file mode 100644 index c33bb1397..000000000 --- a/examples/docs/resources/pc/demo/pop-upload/size.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { test, expect } from '@playwright/test' -import exp from 'constants' - -test('PopUpload 设置组件大小', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-upload/size') - - const preview = page.locator('#preview') - const modalAppearBtn = preview.getByRole('button', { name: '选择文件' }) - - await expect(modalAppearBtn).toHaveClass(/tiny-button--medium/) - await expect(modalAppearBtn).toHaveCSS('height', '40px') - await expect(modalAppearBtn).toHaveCSS('min-width', '88px') -}) diff --git a/examples/docs/resources/pc/demo/popconfirm/basic-usage.vue b/examples/docs/resources/pc/demo/popconfirm/basic-usage.vue deleted file mode 100644 index 25ce1f781..000000000 --- a/examples/docs/resources/pc/demo/popconfirm/basic-usage.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popconfirm/confirm-event.vue b/examples/docs/resources/pc/demo/popconfirm/confirm-event.vue deleted file mode 100644 index f090bc144..000000000 --- a/examples/docs/resources/pc/demo/popconfirm/confirm-event.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popconfirm/placement.vue b/examples/docs/resources/pc/demo/popconfirm/placement.vue deleted file mode 100644 index bc502e642..000000000 --- a/examples/docs/resources/pc/demo/popconfirm/placement.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/popconfirm/popper-class.vue b/examples/docs/resources/pc/demo/popconfirm/popper-class.vue deleted file mode 100644 index 8e16ff8e8..000000000 --- a/examples/docs/resources/pc/demo/popconfirm/popper-class.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/popconfirm/slot-footer.vue b/examples/docs/resources/pc/demo/popconfirm/slot-footer.vue deleted file mode 100644 index 86e7ec7da..000000000 --- a/examples/docs/resources/pc/demo/popconfirm/slot-footer.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popconfirm/trigger.vue b/examples/docs/resources/pc/demo/popconfirm/trigger.vue deleted file mode 100644 index 490f14bbe..000000000 --- a/examples/docs/resources/pc/demo/popconfirm/trigger.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/popconfirm/type.spec.ts b/examples/docs/resources/pc/demo/popconfirm/type.spec.ts deleted file mode 100644 index 43e87dceb..000000000 --- a/examples/docs/resources/pc/demo/popconfirm/type.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('图标类型', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/popconfirm/type') - - const preview = page.locator('#preview') - const popConfirm = preview.locator('.tiny-popconfirm .tiny-popconfirm__reference .tiny-button') - const popConfirmPopover = page.locator('body > .tiny-popconfirm-popover') - const getIcon = parent => parent.locator('svg.tiny-svg path').first() - - await popConfirm.first().click() - await expect(popConfirmPopover.first()).toBeVisible() - await expect(getIcon(popConfirmPopover.first())).toBeVisible() - await popConfirm.nth(1).click() - await expect(popConfirmPopover.nth(1)).toBeVisible() - await expect(getIcon(popConfirmPopover.nth(1))).toBeVisible() - await popConfirm.nth(2).click() - await expect(popConfirmPopover.nth(2)).toBeVisible() - await expect(getIcon(popConfirmPopover.nth(2))).toBeVisible() - await popConfirm.nth(3).click() - await expect(popConfirmPopover.nth(3)).toBeVisible() - await expect(getIcon(popConfirmPopover.nth(3))).toBeVisible() -}) diff --git a/examples/docs/resources/pc/demo/popconfirm/width.vue b/examples/docs/resources/pc/demo/popconfirm/width.vue deleted file mode 100644 index 58ca714dd..000000000 --- a/examples/docs/resources/pc/demo/popconfirm/width.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/auto-lookup.vue b/examples/docs/resources/pc/demo/popeditor/auto-lookup.vue deleted file mode 100644 index ae5156a2b..000000000 --- a/examples/docs/resources/pc/demo/popeditor/auto-lookup.vue +++ /dev/null @@ -1,89 +0,0 @@ - - - \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/popeditor/base.spec.ts b/examples/docs/resources/pc/demo/popeditor/base.spec.ts deleted file mode 100644 index 078d01966..000000000 --- a/examples/docs/resources/pc/demo/popeditor/base.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/base') - - const preview = page.locator('#preview') - const textBox = preview.getByPlaceholder('请选择') - const del = preview.locator('span').nth(2) - const dialogBox = page.locator('.tiny-dialog-box') - const confirmBtn = dialogBox.getByRole('button', { name: '确 认' }) - const cancelBtn = dialogBox.getByRole('button', { name: '取 消' }) - const dataItem = dialogBox.getByRole('row', { name: '1 GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司 福建 福州' }).locator('span') - - // 点击文本框,编辑弹出框弹出,数据渲染 - await expect(textBox).toBeVisible() - await textBox.click() - await expect(dialogBox).toBeVisible() - await expect(dialogBox.locator('.tiny-grid__wrapper')).toBeVisible() - - // 选择数据后点击确认,弹出框消失,文本框填充选中的数据 - await dataItem.click() - await confirmBtn.click() - await expect(dialogBox).not.toBeVisible() - await expect(textBox).toHaveValue('GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司') - - // 点击删除图标,清空文本框 - await del.click() - await expect(textBox).toHaveValue('') - // 编辑弹出框弹出后点击取消按钮,弹出框消失 - await textBox.click() - await expect(dialogBox).toBeVisible() - await cancelBtn.click() - await expect(dialogBox).not.toBeVisible() -}) diff --git a/examples/docs/resources/pc/demo/popeditor/base.vue b/examples/docs/resources/pc/demo/popeditor/base.vue deleted file mode 100644 index e381ac7cd..000000000 --- a/examples/docs/resources/pc/demo/popeditor/base.vue +++ /dev/null @@ -1,105 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/clearable.spec.ts b/examples/docs/resources/pc/demo/popeditor/clearable.spec.ts deleted file mode 100644 index 96b9ef6a6..000000000 --- a/examples/docs/resources/pc/demo/popeditor/clearable.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 弹出窗筛选条件支持可清空', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/clearable') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - const company = dialogBox.getByRole('listitem').filter({ hasText: '公司名' }).getByRole('textbox') - const companyDel = dialogBox.locator('.tiny-popeditor__search-input > .tiny-input__suffix').nth(0) - const city = dialogBox.getByRole('listitem').filter({ hasText: '城市' }).getByRole('textbox') - const cityDel = dialogBox.locator('.tiny-popeditor__search-input > .tiny-input__suffix').nth(1) - - // 弹出框搜索框支持清空 - await textBox.click() - await company.fill('111') - await expect(companyDel).toBeVisible() - await companyDel.click() - await expect(company).toHaveValue('') - - await city.fill('222') - await expect(cityDel).toBeVisible() - await companyDel.click() - await expect(city).toHaveValue('') -}) diff --git a/examples/docs/resources/pc/demo/popeditor/clearable.vue b/examples/docs/resources/pc/demo/popeditor/clearable.vue deleted file mode 100644 index 70dabe067..000000000 --- a/examples/docs/resources/pc/demo/popeditor/clearable.vue +++ /dev/null @@ -1,109 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/close-event.spec.ts b/examples/docs/resources/pc/demo/popeditor/close-event.spec.ts deleted file mode 100644 index 208161462..000000000 --- a/examples/docs/resources/pc/demo/popeditor/close-event.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor close 事件', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/close-event') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - const infoModal = page.getByText('弹框关闭事件') - const closeBtn = dialogBox.getByRole('button', { name: 'Close' }) - const cancelBtn = dialogBox.getByRole('button', { name: '取 消' }) - - // 编辑弹出框弹出后点击取消按钮,弹出框消失 - await textBox.click() - await expect(dialogBox).toBeVisible() - await cancelBtn.click() - await expect(dialogBox).not.toBeVisible() - await expect(infoModal.nth(0)).toBeVisible() - - // 编辑弹出框弹出后点击关闭按钮,弹出框消失 - await textBox.click() - await expect(dialogBox).toBeVisible() - await closeBtn.click() - await expect(dialogBox).not.toBeVisible() - await expect(infoModal.nth(1)).toBeVisible() -}) diff --git a/examples/docs/resources/pc/demo/popeditor/disabled.spec.ts b/examples/docs/resources/pc/demo/popeditor/disabled.spec.ts deleted file mode 100644 index 86966b94f..000000000 --- a/examples/docs/resources/pc/demo/popeditor/disabled.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 禁用', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/disabled') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - - // 禁用 - await expect(textBox).toBeDisabled() - -}) diff --git a/examples/docs/resources/pc/demo/popeditor/disabled.vue b/examples/docs/resources/pc/demo/popeditor/disabled.vue deleted file mode 100644 index ff60db498..000000000 --- a/examples/docs/resources/pc/demo/popeditor/disabled.vue +++ /dev/null @@ -1,105 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/draggable.spec.ts b/examples/docs/resources/pc/demo/popeditor/draggable.spec.ts deleted file mode 100644 index 235ed27f4..000000000 --- a/examples/docs/resources/pc/demo/popeditor/draggable.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 拖动窗口', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/draggable') - - const textBox = page.getByRole('textbox').nth(1) - const dialogBox = page.locator('.tiny-dialog-box').nth(1) - - await textBox.click() - await expect(dialogBox).toBeVisible() - - // 获取拖拽元素的位置 - const { x, y } = await dialogBox.boundingBox() - - // 开始拖拽 - await page.mouse.move(x + 2, y + 2) - await page.mouse.down() - await page.mouse.move(x + 300, y + 300) - await page.mouse.up() - - const { x:x1, y:y1 } = await dialogBox.boundingBox() - await expect(x).not.toEqual(x1) - await expect(y).not.toEqual(y1) - -}) diff --git a/examples/docs/resources/pc/demo/popeditor/grid.spec.ts b/examples/docs/resources/pc/demo/popeditor/grid.spec.ts deleted file mode 100644 index 3ab89879f..000000000 --- a/examples/docs/resources/pc/demo/popeditor/grid.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 表格编辑', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/grid') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - const grid = dialogBox.locator('.tiny-grid__wrapper') - - await textBox.click() - await expect(dialogBox).toBeVisible() - await expect(grid).toBeVisible() - -}) diff --git a/examples/docs/resources/pc/demo/popeditor/icon.spec.ts b/examples/docs/resources/pc/demo/popeditor/icon.spec.ts deleted file mode 100644 index e81015267..000000000 --- a/examples/docs/resources/pc/demo/popeditor/icon.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 自定义图标', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/icon') - - const preview = page.locator('#preview') - const icon = preview.locator('.tiny-popeditor-readonly svg path') - - // 图标非默认图标 - await expect(icon).not.toHaveAttribute('d', 'M292.768 449.694c2.491.515 4.99.987 7.469 1.551 28.956 6.587 48.828 32.893 47.59 62.98-1.187 28.85-23.508 53.387-52.383 57.605-.904.132-1.784.433-2.676.655H280.21c-.773-.21-1.536-.498-2.323-.615-26.22-3.891-46.433-23.108-51.662-49.134-.36-1.793-.753-3.579-1.13-5.369V504.81c.233-.992.536-1.973.694-2.977 3.902-24.797 21.983-44.51 46.302-50.418 2.688-.653 5.413-1.151 8.12-1.722 4.185.002 8.371.002 12.557.002zm212.46 122.792c-2.49-.515-4.99-.988-7.469-1.55-28.956-6.589-48.828-32.895-47.59-62.981 1.186-28.85 23.507-53.387 52.383-57.604.905-.132 1.785-.433 2.676-.656h12.557c2.491.515 4.99.987 7.47 1.551 28.956 6.587 48.828 32.893 47.59 62.98-1.186 28.85-23.507 53.387-52.383 57.605-.904.132-1.784.433-2.676.655h-12.558zm224.692 0c-2.491-.515-4.991-.988-7.47-1.55-28.957-6.589-48.829-32.895-47.59-62.981 1.186-28.85 23.507-53.387 52.383-57.604.904-.132 1.784-.433 2.676-.656h12.557c.774.209 1.536.498 2.324.615 26.22 3.89 46.433 23.108 51.661 49.134.361 1.793.753 3.58 1.131 5.368v12.558c-.234.992-.536 1.973-.695 2.977-3.902 24.798-21.983 44.51-46.302 50.418-2.688.654-5.412 1.152-8.12 1.723-4.184-.002-8.369-.002-12.555-.002z') -}) diff --git a/examples/docs/resources/pc/demo/popeditor/icon.vue b/examples/docs/resources/pc/demo/popeditor/icon.vue deleted file mode 100644 index 98d93a365..000000000 --- a/examples/docs/resources/pc/demo/popeditor/icon.vue +++ /dev/null @@ -1,105 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/popup-event.vue b/examples/docs/resources/pc/demo/popeditor/popup-event.vue deleted file mode 100644 index f30145107..000000000 --- a/examples/docs/resources/pc/demo/popeditor/popup-event.vue +++ /dev/null @@ -1,112 +0,0 @@ - - - - \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/popeditor/readonly.spec.ts b/examples/docs/resources/pc/demo/popeditor/readonly.spec.ts deleted file mode 100644 index 60b9460d4..000000000 --- a/examples/docs/resources/pc/demo/popeditor/readonly.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 只读', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/readonly') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - - await textBox.click() - await expect(dialogBox).not.toBeVisible() -}) diff --git a/examples/docs/resources/pc/demo/popeditor/remote-search.vue b/examples/docs/resources/pc/demo/popeditor/remote-search.vue deleted file mode 100644 index 308512a5a..000000000 --- a/examples/docs/resources/pc/demo/popeditor/remote-search.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/resize.spec.ts b/examples/docs/resources/pc/demo/popeditor/resize.spec.ts deleted file mode 100644 index 216deb70a..000000000 --- a/examples/docs/resources/pc/demo/popeditor/resize.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 全屏展示', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/resize') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - const resizeBtn = dialogBox.getByRole('button', { name: 'Resize' }) - - await textBox.click() - await expect(dialogBox).toBeVisible() - await expect(dialogBox).not.toHaveClass(/is-fullscreen/) - await resizeBtn.click() - await expect(dialogBox).toHaveClass(/is-fullscreen/) - -}) diff --git a/examples/docs/resources/pc/demo/popeditor/showOverflow.spec.ts b/examples/docs/resources/pc/demo/popeditor/showOverflow.spec.ts deleted file mode 100644 index 938dbb539..000000000 --- a/examples/docs/resources/pc/demo/popeditor/showOverflow.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 数据超出隐藏', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/showOverflow') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - const overflowDate = dialogBox.getByRole('cell', { name: 'GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司' }) - const tooltip = page.getByRole('tooltip', { name: 'GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司' }) - - // 数据超出隐藏,tooltips显示全部内容 - await textBox.click() - await expect(dialogBox).toBeVisible() - await expect(tooltip).not.toBeVisible() - await overflowDate.hover() - await expect(tooltip).toBeVisible() - -}) diff --git a/examples/docs/resources/pc/demo/popeditor/single-select-radio.spec.ts b/examples/docs/resources/pc/demo/popeditor/single-select-radio.spec.ts deleted file mode 100644 index 63be55256..000000000 --- a/examples/docs/resources/pc/demo/popeditor/single-select-radio.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 树模式单选', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/single-select-radio') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - const tree = dialogBox.locator('.tiny-tree') - const treeNode = tree.locator('label') - - // 单选tree模式 - await textBox.click() - await expect(dialogBox).toBeVisible() - await expect(tree).toBeVisible() - await expect(treeNode.locator('.is-checked')).toHaveCount(1) -}) diff --git a/examples/docs/resources/pc/demo/popeditor/single-select-radio.vue b/examples/docs/resources/pc/demo/popeditor/single-select-radio.vue deleted file mode 100644 index ea5d7a2c4..000000000 --- a/examples/docs/resources/pc/demo/popeditor/single-select-radio.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/size.spec.ts b/examples/docs/resources/pc/demo/popeditor/size.spec.ts deleted file mode 100644 index e43d42386..000000000 --- a/examples/docs/resources/pc/demo/popeditor/size.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 编辑框大小', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/size') - - const preview = page.locator('#preview') - const textBox = preview.locator('.tiny-popeditor') - - await expect(textBox).toHaveCSS('height', '40px') -}) diff --git a/examples/docs/resources/pc/demo/popeditor/size.vue b/examples/docs/resources/pc/demo/popeditor/size.vue deleted file mode 100644 index 8d5d5f57a..000000000 --- a/examples/docs/resources/pc/demo/popeditor/size.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/slot.vue b/examples/docs/resources/pc/demo/popeditor/slot.vue deleted file mode 100644 index 7be53c475..000000000 --- a/examples/docs/resources/pc/demo/popeditor/slot.vue +++ /dev/null @@ -1,132 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/title.spec.ts b/examples/docs/resources/pc/demo/popeditor/title.spec.ts deleted file mode 100644 index f2112b774..000000000 --- a/examples/docs/resources/pc/demo/popeditor/title.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { test, expect } from '@playwright/test' - -test.describe('PopEditor 自定义标题和提交字段映射', () => { - test('PopEditor 自定义标题', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/title') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - const customTitle = dialogBox.getByText('自定义弹窗标题') - - // 自定义标题 - await textBox.click() - await expect(dialogBox).toBeVisible() - await expect(customTitle).toBeVisible() - - }) - - test('PopEditor 提交字段映射', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/title1') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - const confirmBtn = dialogBox.getByRole('button', { name: '确 认' }) - const seletItem = dialogBox.getByRole('row', { name: '1 GFD科技YX公司 福建 福州' }).locator('span') - - // 显示公司的字段映射 - await textBox.click() - await expect(dialogBox).toBeVisible() - await seletItem.nth(0).check() - await confirmBtn.click() - await expect(textBox).toHaveValue('GFD科技YX公司') - }) -}) diff --git a/examples/docs/resources/pc/demo/popeditor/trigger.vue b/examples/docs/resources/pc/demo/popeditor/trigger.vue deleted file mode 100644 index 265275424..000000000 --- a/examples/docs/resources/pc/demo/popeditor/trigger.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popeditor/width.spec.ts b/examples/docs/resources/pc/demo/popeditor/width.spec.ts deleted file mode 100644 index 374c5b23f..000000000 --- a/examples/docs/resources/pc/demo/popeditor/width.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('PopEditor 弹窗宽度', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/width') - - const preview = page.locator('#preview') - const textBox = preview.getByRole('textbox') - const dialogBox = page.locator('.tiny-dialog-box') - - await textBox.click() - await expect(dialogBox).toBeVisible() - await expect(dialogBox).toHaveCSS('width', '800px') -}) diff --git a/examples/docs/resources/pc/demo/popeditor/width.vue b/examples/docs/resources/pc/demo/popeditor/width.vue deleted file mode 100644 index 2db040ef7..000000000 --- a/examples/docs/resources/pc/demo/popeditor/width.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/popover/trigger-mode.vue b/examples/docs/resources/pc/demo/popover/trigger-mode.vue deleted file mode 100644 index 75ca539ae..000000000 --- a/examples/docs/resources/pc/demo/popover/trigger-mode.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/progress/progress-type-circle.vue b/examples/docs/resources/pc/demo/progress/progress-type-circle.vue deleted file mode 100644 index 50697bb29..000000000 --- a/examples/docs/resources/pc/demo/progress/progress-type-circle.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/rate/disabled-not-selected-class.spec.js b/examples/docs/resources/pc/demo/rate/disabled-not-selected-class.spec.js deleted file mode 100644 index 4b3809ddd..000000000 --- a/examples/docs/resources/pc/demo/rate/disabled-not-selected-class.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -import { test, expect } from '@playwright/test' - -test.describe('Rate 自定义禁用时未选中图标类名', () => { - test('禁用时未选中图标类名', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/rate/disabled-not-selected-class') - - // 禁用 - const icon = page.locator('.tiny-rate__star > .tiny-svg') - await icon.nth(0).hover() - await expect(icon.nth(0)).toHaveClass(/disabled/) - await icon.nth(1).hover() - await expect(icon.nth(1)).toHaveClass(/disabled/) - await icon.nth(2).hover() - await expect(icon.nth(3)).toHaveClass(/disabled/) - await icon.nth(3).hover() - await expect(icon.nth(3)).toHaveClass(/disabled/) - await icon.nth(4).hover() - await expect(icon.nth(4)).toHaveClass(/disabled/) - - // 未选中图标 - const svg = page.locator('.tiny-rate > span:nth-child(5) > .tiny-svg > .st0') - await expect(svg).toHaveAttribute( - 'd', - 'M12 1c-.4 0-.8.1-1.1.3-.4.2-.6.5-.8.9L7.8 7l-5 .8c-.8.1-1.4.7-1.7 1.4s-.1 1.6.5 2.2l3.7 3.8-.9 5.4c-.1.6.1 1.2.5 1.7s1 .8 1.6.8c.4 0 .7-.1 1-.3l4.4-2.5 4.4 2.5c.3.2.7.3 1 .3.6 0 1.2-.3 1.6-.8.4-.5.6-1.1.5-1.7l-.9-5.4 3.7-3.8c.6-.6.7-1.4.5-2.2-.3-.8-.9-1.3-1.7-1.4L16 7l-2.2-4.8c-.2-.4-.5-.7-.8-.9-.2-.2-.6-.3-1-.3z' - ) - }) -}) diff --git a/examples/docs/resources/pc/demo/rate/threshold-value.vue b/examples/docs/resources/pc/demo/rate/threshold-value.vue deleted file mode 100644 index 398d5a904..000000000 --- a/examples/docs/resources/pc/demo/rate/threshold-value.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/row/gutter.vue b/examples/docs/resources/pc/demo/row/gutter.vue deleted file mode 100644 index 06833d248..000000000 --- a/examples/docs/resources/pc/demo/row/gutter.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/row/order.vue b/examples/docs/resources/pc/demo/row/order.vue deleted file mode 100644 index 4f97966e1..000000000 --- a/examples/docs/resources/pc/demo/row/order.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/search/mini-mode.vue b/examples/docs/resources/pc/demo/search/mini-mode.vue deleted file mode 100644 index 0252c69ec..000000000 --- a/examples/docs/resources/pc/demo/search/mini-mode.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/select/basic-usage.vue b/examples/docs/resources/pc/demo/select/basic-usage.vue deleted file mode 100644 index 5f525048e..000000000 --- a/examples/docs/resources/pc/demo/select/basic-usage.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/select/clearable.vue b/examples/docs/resources/pc/demo/select/clearable.vue deleted file mode 100644 index f7788f756..000000000 --- a/examples/docs/resources/pc/demo/select/clearable.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/select/custom-prefix.vue b/examples/docs/resources/pc/demo/select/custom-prefix.vue deleted file mode 100644 index bfe790a86..000000000 --- a/examples/docs/resources/pc/demo/select/custom-prefix.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/select/disabled-and-selected-options.vue b/examples/docs/resources/pc/demo/select/disabled-and-selected-options.vue deleted file mode 100644 index 87bb2cbfd..000000000 --- a/examples/docs/resources/pc/demo/select/disabled-and-selected-options.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/select/disabled-options.vue b/examples/docs/resources/pc/demo/select/disabled-options.vue deleted file mode 100644 index 28320e87e..000000000 --- a/examples/docs/resources/pc/demo/select/disabled-options.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/select/disabled.vue b/examples/docs/resources/pc/demo/select/disabled.vue deleted file mode 100644 index 56095143f..000000000 --- a/examples/docs/resources/pc/demo/select/disabled.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/select/is-drop-inherit-width.vue b/examples/docs/resources/pc/demo/select/is-drop-inherit-width.vue deleted file mode 100644 index 8f3441089..000000000 --- a/examples/docs/resources/pc/demo/select/is-drop-inherit-width.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/select/search-allow-copy.vue b/examples/docs/resources/pc/demo/select/search-allow-copy.vue deleted file mode 100644 index cc2403911..000000000 --- a/examples/docs/resources/pc/demo/select/search-allow-copy.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/select/slot-footer.vue b/examples/docs/resources/pc/demo/select/slot-footer.vue deleted file mode 100644 index 3f5cdb9ec..000000000 --- a/examples/docs/resources/pc/demo/select/slot-footer.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/steps/data-resource.spec.ts b/examples/docs/resources/pc/demo/steps/data-resource.spec.ts deleted file mode 100644 index 5fd1e9f78..000000000 --- a/examples/docs/resources/pc/demo/steps/data-resource.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/steps/data-resource') - - const steps = page.locator('#preview .tiny-steps') - const nodes = steps.locator('li') - - await expect(nodes.first()).toHaveText('name属性内容1') - await expect(nodes.first()).toHaveClass(/done/) - await expect(nodes.first().locator('.dot')).toHaveClass(/done/) - await expect(nodes.nth(1)).toHaveClass(/doing/) - await expect(nodes.nth(1).locator('.count')).toHaveText('9') - await expect(nodes.nth(1).locator('.dot')).toHaveClass(/doing/) - - // 点击节点 - await page.getByTitle('name属性内容3').click() - await expect(nodes.nth(2)).toHaveClass(/current/) - await expect(nodes.nth(2)).toHaveClass(/doing/) - await expect(nodes.nth(3)).toHaveClass(/undo/) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/steps/node-status.vue b/examples/docs/resources/pc/demo/steps/node-status.vue deleted file mode 100644 index aabff05c7..000000000 --- a/examples/docs/resources/pc/demo/steps/node-status.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/steps/size.spec.ts b/examples/docs/resources/pc/demo/steps/size.spec.ts deleted file mode 100644 index 438d4d248..000000000 --- a/examples/docs/resources/pc/demo/steps/size.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('尺寸', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/steps/size') - - const miniSteps = page.locator('#preview .tiny-steps').first() - const normalSteps = page.locator('#preview .tiny-steps').nth(1) - await expect(miniSteps).toHaveClass(/tiny-steps--mini/) - await expect(normalSteps).not.toHaveClass(/tiny-steps--mini/) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/steps/size.vue b/examples/docs/resources/pc/demo/steps/size.vue deleted file mode 100644 index 3b895cc02..000000000 --- a/examples/docs/resources/pc/demo/steps/size.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/steps/slot-active-node-desc.vue b/examples/docs/resources/pc/demo/steps/slot-active-node-desc.vue deleted file mode 100644 index 9c40979d1..000000000 --- a/examples/docs/resources/pc/demo/steps/slot-active-node-desc.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/steps/text-position.spec.ts b/examples/docs/resources/pc/demo/steps/text-position.spec.ts deleted file mode 100644 index 1ae5903ab..000000000 --- a/examples/docs/resources/pc/demo/steps/text-position.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('文本内容位置', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/steps/text-position') - - const steps1 = page.locator('#preview .tiny-steps').first() - const steps2 = page.locator('#preview .tiny-steps').nth(1) - await expect(steps1.locator('.tiny-steps-normal .normal').first()).toHaveClass(/tiny-step--text-bottom/) - await expect(steps2.locator('.tiny-steps-normal ul').first()).toHaveClass(/tiny-steps--text-right/) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/steps/text-position.vue b/examples/docs/resources/pc/demo/steps/text-position.vue deleted file mode 100644 index 5144a9aa7..000000000 --- a/examples/docs/resources/pc/demo/steps/text-position.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/switch/before-change.vue b/examples/docs/resources/pc/demo/switch/before-change.vue deleted file mode 100644 index 81846115b..000000000 --- a/examples/docs/resources/pc/demo/switch/before-change.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/tabs/basic-usage.spec.ts b/examples/docs/resources/pc/demo/tabs/basic-usage.spec.ts deleted file mode 100644 index 5fb0db21a..000000000 --- a/examples/docs/resources/pc/demo/tabs/basic-usage.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tabs/basic-usage') - - const tabs = page.locator('.tiny-tabs') - const tabItems = tabs.getByRole('tab') - const item1 = tabItems.nth(0) - const content = tabs.getByRole('tabpanel') - - await expect(tabItems).toHaveCount(4) - await expect(tabItems).toHaveClass([/is-top/, /is-top is-active/, /is-top/, /is-top/]) - await expect(content).toHaveText(/数据组件/) - await item1.click() - await expect(item1).toHaveClass(/is-active/) - await expect(item1).toHaveCSS('border-bottom', '3px solid rgb(94, 124, 224)') - await expect(item1).toHaveCSS('color', 'rgb(94, 124, 224)') - await expect(content).toHaveText(/表单组件/) -}) diff --git a/examples/docs/resources/pc/demo/tabs/tab-style-card.vue b/examples/docs/resources/pc/demo/tabs/tab-style-card.vue deleted file mode 100644 index b7677e977..000000000 --- a/examples/docs/resources/pc/demo/tabs/tab-style-card.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/tag/before-delete.vue b/examples/docs/resources/pc/demo/tag/before-delete.vue deleted file mode 100644 index 3fbbe6879..000000000 --- a/examples/docs/resources/pc/demo/tag/before-delete.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/tag/create.vue b/examples/docs/resources/pc/demo/tag/create.vue deleted file mode 100644 index aaa1182ab..000000000 --- a/examples/docs/resources/pc/demo/tag/create.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/tag/disabled.vue b/examples/docs/resources/pc/demo/tag/disabled.vue deleted file mode 100644 index 0bff8e6c9..000000000 --- a/examples/docs/resources/pc/demo/tag/disabled.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/text-popup/basic-usage.spec.ts b/examples/docs/resources/pc/demo/text-popup/basic-usage.spec.ts deleted file mode 100644 index 13e63d0d8..000000000 --- a/examples/docs/resources/pc/demo/text-popup/basic-usage.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('Textpopup 基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/textpopup/basic-usage') - - const preview = page.locator('#preview') - const small = preview.locator('input') - const larger = preview.locator('textarea') - - // 正常时只显示小输入框 - await expect(small).toBeVisible() - await expect(small).toHaveCSS('border-color', 'rgb(173, 176, 184)') - await expect(larger).toHaveCSS('display', 'none') - await small.hover() - await expect(small).toHaveCSS('border-color', 'rgb(87, 93, 108)') - - // 点击输入框后,大输入框弹出,小输入框消失 - await small.click() - await expect(larger).toBeVisible() - await expect(small).toHaveCSS('display', 'none') - await expect(larger).toHaveCSS('border-color', 'rgb(94, 124, 224)') - - // 点击非输入框区域,大输入框消失 - await preview.click() - await expect(small).toBeVisible() - await expect(larger).toHaveCSS('display', 'none') -}) diff --git a/examples/docs/resources/pc/demo/text-popup/readonly.spec.ts b/examples/docs/resources/pc/demo/text-popup/readonly.spec.ts deleted file mode 100644 index 58fdb6dcf..000000000 --- a/examples/docs/resources/pc/demo/text-popup/readonly.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('Textpopup 只读', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/textpopup/readonly') - - const preview = page.locator('#preview') - const small = preview.locator('input') - const larger = preview.locator('textarea') - - expect(await larger.evaluate((larger) => larger.hasAttribute('readonly'))).toBe(true) -}) diff --git a/examples/docs/resources/pc/demo/text-popup/width.spec.ts b/examples/docs/resources/pc/demo/text-popup/width.spec.ts deleted file mode 100644 index ddfd88d21..000000000 --- a/examples/docs/resources/pc/demo/text-popup/width.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('Textpopup 宽度', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/textpopup/width') - - const preview = page.locator('#preview') - const textPopup = preview.locator('.tiny-text-popup') - - await expect(textPopup).toHaveCSS('width', '500px') -}) diff --git a/examples/docs/resources/pc/demo/time-line/basic-usage.spec.ts b/examples/docs/resources/pc/demo/time-line/basic-usage.spec.ts deleted file mode 100644 index c0b3d6016..000000000 --- a/examples/docs/resources/pc/demo/time-line/basic-usage.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('基本用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/time-line/basic-usage') - - const timeline = page.locator('#preview .tiny-steps') - const nodes = timeline.locator('.normal') - - await expect(nodes.first()).toHaveClass(/process-done/) - await expect(nodes.first().locator('.time')).toHaveText('2019-11-11 00:01') - await expect(nodes.first().locator('.icon svg')).toBeVisible() - await expect(nodes.first().locator('.node-description')).toHaveText('已下单') - await expect(nodes.nth(1)).toHaveClass(/process-current/) - await expect(nodes.nth(1).locator('.icon')).toHaveText('2') - await expect(nodes.nth(2)).toHaveClass(/process-wait/) - - // 点击切换节点状态 - await nodes.first().click() - await expect(nodes.first()).toHaveClass(/process-current/) - await expect(nodes.nth(1)).toHaveClass(/process-wait/) - await nodes.nth(2).click() - await expect(nodes.nth(2)).toHaveClass(/process-current/) - await expect(nodes.nth(1)).toHaveClass(/process-done/) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/time-line/set-step-width.spec.ts b/examples/docs/resources/pc/demo/time-line/set-step-width.spec.ts deleted file mode 100644 index 00749fd67..000000000 --- a/examples/docs/resources/pc/demo/time-line/set-step-width.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('引导线长度设置', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/time-line/set-step-width') - - const timeline = page.locator('#preview .tiny-steps') - const { width: lineWidth } = await timeline.locator('.step-line').first().boundingBox() - expect(Math.round(lineWidth)).toBeCloseTo(200) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/time-line/set-step-width.vue b/examples/docs/resources/pc/demo/time-line/set-step-width.vue deleted file mode 100644 index 0f05224ed..000000000 --- a/examples/docs/resources/pc/demo/time-line/set-step-width.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/time-line/show-number.spec.ts b/examples/docs/resources/pc/demo/time-line/show-number.spec.ts deleted file mode 100644 index 0881a92d6..000000000 --- a/examples/docs/resources/pc/demo/time-line/show-number.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('隐藏未完成节点的序号', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/time-line/show-number') - - const nodes = page.locator('#preview .tiny-steps .normal') - await expect(nodes.first().locator('.icon svg')).toBeVisible() - await expect(nodes.nth(1).locator('.icon')).not.toHaveText('2') - await expect(nodes.nth(2).locator('.icon')).not.toHaveText('3') -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/time-picker/popper-class.vue b/examples/docs/resources/pc/demo/time-picker/popper-class.vue deleted file mode 100644 index 8fa8ca34b..000000000 --- a/examples/docs/resources/pc/demo/time-picker/popper-class.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/time-picker/suffix-icon.spec.ts b/examples/docs/resources/pc/demo/time-picker/suffix-icon.spec.ts deleted file mode 100644 index 071f9a5c2..000000000 --- a/examples/docs/resources/pc/demo/time-picker/suffix-icon.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('自定义后置图标', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/time-picker/suffix-icon') - - const preview = page.locator('#preview') - const timePicker = preview.locator('.tiny-date-editor') - const customIcon = timePicker.locator('svg') - await expect(customIcon).toBeVisible() - await expect(customIcon.locator('path')).toHaveAttribute('d', 'M19.1 13H4.9c-.5 0-.9-.4-.9-1s.4-1 .9-1h14.2c.5 0 .9.4.9 1s-.4 1-.9 1z') -}) diff --git a/examples/docs/resources/pc/demo/time-select/event-blur.vue b/examples/docs/resources/pc/demo/time-select/event-blur.vue deleted file mode 100644 index d3c8e212a..000000000 --- a/examples/docs/resources/pc/demo/time-select/event-blur.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/time-select/popper-class.vue b/examples/docs/resources/pc/demo/time-select/popper-class.vue deleted file mode 100644 index b7004d6e2..000000000 --- a/examples/docs/resources/pc/demo/time-select/popper-class.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/toggle-menu/automatic-filtering.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/automatic-filtering.spec.ts deleted file mode 100644 index 196eff644..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/automatic-filtering.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自动过滤', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/automatic-filtering'); - const preview = page.locator('#preview'); - await preview.getByTitle('更新日志').click(); - await preview.getByTitle('开发指南').click(); - await preview.getByTitle('表单组件').click(); - await preview.getByTitle('数据组件').click(); - await preview.getByTitle('其他组件').click(); - await page.getByPlaceholder('请输入过滤值').click(); - await page.getByPlaceholder('请输入过滤值').fill('组件'); - // 未点击搜索图标,将不会进行搜索 - await expect(preview.locator('.tiny-tree .tiny-tree-node:visible')).toHaveCount(14); - // 点击搜索按钮 - await page.locator('.tiny-toggle-menu__filter-search > .tiny-svg').click(); - // 搜索结果应该为5 - await expect(preview.locator('.tiny-tree .tiny-tree-node:visible')).toHaveCount(5); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/basic-usage.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/basic-usage.spec.ts deleted file mode 100644 index ae10a37f1..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/basic-usage.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('基础用法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/basic-usage'); - const preview = page.locator('#preview'); - const nodes = preview.locator('.tiny-toggle-menu .tiny-tree > div'); - // 点击文字展开 - await preview.getByTitle('更新日志').click(); - // 点击文字展开 - await preview.getByTitle('开发指南').hover(); - // “更新日志”应该被选中 - await expect(nodes.first().locator('.tiny-tree-node__content')).toHaveCSS('background-color', 'rgb(94, 124, 224)'); - - // 点击文字展开 - await preview.getByTitle('开发指南').click(); - // 子菜单应该可见 - await expect(nodes.nth(1).locator('.tiny-tree-node__children')).toBeVisible(); - - // 点击下拉图标展开 - await preview.getByRole('treeitem', { name: '表单组件' }).locator('svg').click(); - // // 子菜单应该可见 - await expect(nodes.nth(2).locator('.tiny-tree-node__children')).toBeVisible(); - - // 点击整个元素展开 - await preview.getByRole('treeitem', { name: '数据组件' }).locator('div').nth(1).click(); - // 子菜单应该可见 - await expect(nodes.nth(3).locator('.tiny-tree-node__children')).toBeVisible(); - - // 点击整个元素收起 - await preview.getByRole('treeitem', { name: '数据组件' }).locator('div').nth(1).click(); - // 子菜单应该可见 - await expect(nodes.nth(3).locator('.tiny-tree-node__children')).not.toBeVisible(); - - await preview.getByPlaceholder('请输入内容进行筛选').click(); - // 输入筛选关键字 - await preview.getByPlaceholder('请输入内容进行筛选').fill('组件'); - await expect(preview.locator('.tiny-tree .tiny-tree-node:visible')).toHaveCount(5); - - // 点击右侧收缩按钮 - await page.locator('.tiny-toggle-menu__toggle').click(); - // 收缩项文字不可见 - await expect(preview.locator('.tiny-tree .tiny-toggle-menu__body:visible')).toHaveCount(0); - // 过滤框应该不可见 - await expect(preview.locator('.tiny-toggle-menu .tiny-toggle-menu__filter')).toBeHidden(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/custom-icon.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/custom-icon.spec.ts deleted file mode 100644 index a69e76ca8..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/custom-icon.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义菜单左侧图标', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/custom-icon'); - const preview = page.locator('#preview'); - const nodes = preview.locator('.tiny-toggle-menu .tiny-tree > div'); - const svg = preview.getByRole('treeitem', { name: '开发指南' }).locator('svg'); - await expect(svg.locator('path').first()).not.toHaveAttribute('d', /^M7 21c.2 0 .5-.1.6-.2l9/); - await svg.click(); - // 子菜单应该可见 - await expect(nodes.nth(1).locator('.tiny-tree-node__children')).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/drag-events.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/drag-events.spec.ts deleted file mode 100644 index fb31a73a5..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/drag-events.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('拖拽事件', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/drag-events'); - const preview = page.locator('#preview'); - const dragNode = preview.getByRole('treeitem', { name: '开发指南' }).locator('div').filter({ hasText: '开发指南' }).first(); - const dragToNode = preview.getByRole('treeitem', { name: '数据组件' }).locator('div').filter({ hasText: '数据组件' }).first(); - // 开始拖拽 - await dragNode.hover(); - await page.mouse.down(); - await dragToNode.hover(); - await page.mouse.up(); - await expect(page.locator('.tiny-notify').filter({ hasText: '拖拽节点后的事件' })).toBeVisible(); - await expect(page.locator('.tiny-notify').filter({ hasText: '拖拽进入某个节点(包含自身节点)时触发的事件' })).toBeVisible(); - await expect(page.locator('.tiny-notify').filter({ hasText: '拖拽经过某个节点(包含自身节点)时触发的事件' })).toBeVisible(); - await expect(page.locator('.tiny-notify').filter({ hasText: '拖拽结束时触发的事件' })).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/draggable.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/draggable.spec.ts deleted file mode 100644 index fb3569800..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/draggable.spec.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('拖拽节点', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/draggable'); - const preview = page.locator('#preview'); - const nodes = preview.locator('.tiny-toggle-menu .tiny-tree > div'); - const dragNode = preview.getByText('更新日志'); - const dragToNode = preview.getByRole('treeitem', { name: '表单组件' }).locator('div').filter({ hasText: '表单组件' }).first(); - // 开始拖拽 - await dragNode.hover(); - await page.mouse.down(); - await dragToNode.hover(); - await page.mouse.up(); - // 展开子菜单 - await dragToNode.click(); - // “更新日志”应该在“表单组件”下可以找到 - await expect(nodes.nth(1).locator('.tiny-toggle-menu__name').filter({ hasText: '更新日志' })).toHaveCount(1); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/node-collapse.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/node-collapse.spec.ts deleted file mode 100644 index 6b8c23ba7..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/node-collapse.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('收缩节点事件', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/node-collapse'); - const preview = page.locator('#preview'); - // 点击展开 - await preview.getByTitle('开发指南').click(); - // 点击收起 - await preview.getByTitle('开发指南').click(); - await expect(page.locator('.tiny-modal__box').filter({ hasText: '收缩节点后的事件' })).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/node-drop.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/node-drop.spec.ts deleted file mode 100644 index 3cade965f..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/node-drop.spec.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('拖放节点事件', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/node-drop'); - const preview = page.locator('#preview'); - const dragNode = preview.getByRole('treeitem', { name: '开发指南' }).locator('div').filter({ hasText: '开发指南' }).first(); - const dragToNode = preview.getByRole('treeitem', { name: '数据组件' }).locator('div').filter({ hasText: '数据组件' }).first(); - // 开始拖拽 - await dragNode.hover(); - await page.mouse.down(); - await dragToNode.hover(); - await page.mouse.up(); - await expect(page.locator('.tiny-modal').filter({ hasText: '拖放节点后的事件' })).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/node-expand.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/node-expand.spec.ts deleted file mode 100644 index d7b8a40e6..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/node-expand.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('展开节点事件', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/node-expand'); - const preview = page.locator('#preview'); - // 点击展开 - await preview.getByTitle('开发指南').click(); - await expect(page.locator('.tiny-modal__box').filter({ hasText: '展开节点后的事件' }).first()).toBeVisible(); - await preview.getByTitle('表单组件').click(); - await expect(page.locator('.tiny-modal__box').filter({ hasText: '展开节点后的事件' }).nth(1)).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/show-filter.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/show-filter.spec.ts deleted file mode 100644 index a3617583c..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/show-filter.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('显示过滤搜索框', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/show-filter'); - const preview = page.locator('#preview'); - // 应该获取不到搜索框 - await expect(preview.locator('.tiny-toggle-menu__filter')).toHaveCount(0); - const noWrapText = page.getByRole('treeitem', { name: '菜单内容超长是否换行显示,默认为不换行' }).locator('div').first().locator('.tiny-toggle-menu__name'); - await expect(noWrapText).toHaveCSS('white-space', 'normal'); - await expect(noWrapText).toHaveCSS('word-break', 'break-word'); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/slot-node.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/slot-node.spec.ts deleted file mode 100644 index f24224b2c..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/slot-node.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义节点内容', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/slot-node'); - const preview = page.locator('#preview'); - await expect(preview.locator('.tiny-toggle-menu__name > div').filter({ hasText: '表单组件3' })).toHaveCount(1); - await page.getByRole('treeitem', { name: '数据组件4' }).locator('svg').click(); - await expect(preview.locator('.tiny-toggle-menu__name > div').filter({ hasText: 'Pager 分页14' })).toHaveCount(1); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/toggle-menu/toggle-props.spec.ts b/examples/docs/resources/pc/demo/toggle-menu/toggle-props.spec.ts deleted file mode 100644 index e55f865ae..000000000 --- a/examples/docs/resources/pc/demo/toggle-menu/toggle-props.spec.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('props 选项映射', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/toggle-menu/basic-usage'); - const preview = page.locator('#preview'); - const nodes = preview.locator('.tiny-toggle-menu .tiny-tree > div'); - // 点击文字展开 - await preview.getByTitle('更新日志').click(); - // 点击文字展开 - await preview.getByTitle('开发指南').hover(); - // “更新日志”应该被选中 - await expect(nodes.first().locator('.tiny-tree-node__content')).toHaveCSS('background-color', 'rgb(94, 124, 224)'); - - // 点击文字展开 - await preview.getByTitle('开发指南').click(); - // 子菜单应该可见 - await expect(nodes.nth(1).locator('.tiny-tree-node__children')).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tooltip/basic-usage.vue b/examples/docs/resources/pc/demo/tooltip/basic-usage.vue deleted file mode 100644 index 38657e4cd..000000000 --- a/examples/docs/resources/pc/demo/tooltip/basic-usage.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/transfer/basic-usage.spec.ts b/examples/docs/resources/pc/demo/transfer/basic-usage.spec.ts deleted file mode 100644 index 38a79711b..000000000 --- a/examples/docs/resources/pc/demo/transfer/basic-usage.spec.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('默认状态下交换按钮是否禁用', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/basic-usage'); - const preview = page.locator('#preview'); - const buttons = preview.getByRole('button'); - // 向左交换按钮应该为禁用状态 - await expect(buttons.first()).toBeDisabled(); - // 向右交换按钮应该为禁用状态 - await expect(buttons.nth(1)).toBeDisabled(); -}) - -test('多选', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/basic-usage'); - const preview = page.locator('#preview'); - // 穿梭框按钮 - const buttons = preview.getByRole('button'); - // 穿梭框面板 - const transferPanels = preview.locator('.tiny-transfer-panel'); - // 左侧面板 - const leftPanel = transferPanels.first(); - // 右侧面板 - const rightPanel = transferPanels.nth(1); - - // 从左侧面板选择多个备用项,交换至右侧面板 - let labels = leftPanel.locator('label').filter({ hasText: '备选项 2' }).locator('span'); - // 选中"备选项2" - await labels.nth(1).click(); - // 判断是否有类名"is-checked" - await expect(labels.first()).toHaveClass(/is-checked/); - - labels = leftPanel.locator('label').filter({ hasText: '备选项 3' }).locator('span'); - // 选中"备选项3" - await labels.nth(1).click(); - // 判断是否有类名"is-checked" - await expect(labels.first()).toHaveClass(/is-checked/); - - // 复选框 - let checkbox = leftPanel.getByRole('paragraph').filter({ hasText: '列表 1 2 / 14' }).getByRole('checkbox'); - // 应该为半选状态 - await expect(checkbox).toHaveClass(/is-indeterminate/); - // 向左侧交换的按钮应该为可用状态 - await expect(buttons.first()).toBeEnabled(); - // 向右侧交换的按钮应该为不可用状态 - await expect(buttons.nth(1)).toBeDisabled(); - // 最后点击向左侧交换按钮 - await buttons.first().click(); - - // 右侧面板应该出现"备选项2" - await expect(rightPanel.locator('label').filter({ hasText: '备选项 2' })).toHaveCount(1); - // 右侧面板应该出现"备选项3" - await expect(rightPanel.locator('label').filter({ hasText: '备选项 3' })).toHaveCount(1); - // 向左侧交换的按钮应该为不可用状态 - await expect(buttons.first()).toBeDisabled(); - // 向右侧交换的按钮应该为不可用状态 - await expect(buttons.nth(1)).toBeDisabled(); - - // 从右侧面板选择多个备用项,交换至左侧面板 - labels = rightPanel.locator('label').filter({ hasText: '备选项 2' }).locator('span'); - // 选中"备选项2" - await labels.nth(1).click(); - // 判断是否有类名"is-checked" - await expect(labels.first()).toHaveClass(/is-checked/); - - labels = page.locator('label').filter({ hasText: '备选项 3' }).locator('span'); - // 选中"备选项3" - await labels.nth(1).click(); - // 判断是否有类名"is-checked" - await expect(labels.first()).toHaveClass(/is-checked/); - - // 复选框 - checkbox = rightPanel.getByRole('paragraph').filter({ hasText: '列表 2 2 / 4' }).getByRole('checkbox'); - // 应该为半选状态 - await expect(checkbox).toHaveClass(/is-indeterminate/); - // 向左侧交换的按钮应该为不可用状态 - await expect(buttons.first()).toBeDisabled(); - // 向右侧交换的按钮应该为可用状态 - await expect(buttons.nth(1)).toBeEnabled(); - // 点击向左侧交换按钮 - await buttons.nth(1).click(); - - // 左侧面板应该出现"备选项2" - await expect(leftPanel.locator('label').filter({ hasText: '备选项 2' })).toHaveCount(1); - // 左侧面板应该出现"备选项3" - await expect(leftPanel.locator('label').filter({ hasText: '备选项 3' })).toHaveCount(1); - // 向左侧交换的按钮应该为不可用状态 - await expect(buttons.first()).toBeDisabled(); - // 向右侧交换的按钮应该为不可用状态 - await expect(buttons.nth(1)).toBeDisabled(); -}) - -test('全选', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/basic-usage'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - // 全选 - await leftPanel.locator('.tiny-checkbox__input').first().click(); - // 显示的选中数量应该为 11 - await expect(preview.getByRole('paragraph').filter({ hasText: '列表 1 11 / 14' })).toHaveCount(1); -}) diff --git a/examples/docs/resources/pc/demo/transfer/checked-format-text.spec.ts b/examples/docs/resources/pc/demo/transfer/checked-format-text.spec.ts deleted file mode 100644 index 3923237f2..000000000 --- a/examples/docs/resources/pc/demo/transfer/checked-format-text.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断展示的已勾选数据和所有数据的比值是否正确', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/checked-format-text'); - const preview = page.locator('#preview'); - await preview.locator('label').filter({ hasText: '备选项 2' }).locator('span').nth(1).click(); - await preview.locator('label').filter({ hasText: '备选项 3' }).locator('span').nth(1).click(); - await expect(preview.getByRole('paragraph').filter({ hasText: '列表 1 2/14' })).toHaveCount(1); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/custom-button-texts.spec.ts b/examples/docs/resources/pc/demo/transfer/custom-button-texts.spec.ts deleted file mode 100644 index 33bbe841d..000000000 --- a/examples/docs/resources/pc/demo/transfer/custom-button-texts.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义按钮文案', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/custom-button-texts'); - const preview = page.locator('#preview'); - const buttons = preview.getByRole('button'); - await expect(buttons.first().locator('span')).not.toBeEmpty(); - await expect(buttons.nth(1).locator('span')).not.toBeEmpty(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/custom-filter-method.spec.ts b/examples/docs/resources/pc/demo/transfer/custom-filter-method.spec.ts deleted file mode 100644 index b76241bf0..000000000 --- a/examples/docs/resources/pc/demo/transfer/custom-filter-method.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义过滤方法', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/custom-filter-method'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('div.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - const input = preview.getByPlaceholder('请输入城市拼音').first(); - await input.click(); - await input.fill('xi'); - const items = leftPanel.locator('div.tiny-transfer-panel__list > label'); - await expect(items).toHaveCount(1); - // 判断删除搜索关键字后是否正常显示列表 - await input.click(); - await input.fill(''); - await expect(items).toHaveCount(5); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/custom-footer.spec.ts b/examples/docs/resources/pc/demo/transfer/custom-footer.spec.ts deleted file mode 100644 index d4943b88c..000000000 --- a/examples/docs/resources/pc/demo/transfer/custom-footer.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义列表底部', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/custom-footer'); - await page.getByRole('button', { name: '操作' }).first().click(); - await page.getByRole('button', { name: '操作' }).nth(1).click(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/custom-render-content.spec.ts b/examples/docs/resources/pc/demo/transfer/custom-render-content.spec.ts deleted file mode 100644 index 3a8d94186..000000000 --- a/examples/docs/resources/pc/demo/transfer/custom-render-content.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断是否可以选中自定义数据项', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/custom-render-content'); - await page.locator('label').filter({ hasText: '2 - 备选项 2' }).locator('span').nth(1).click(); - await expect(page.locator('label').filter({ hasText: '2 - 备选项 2' }).locator('span').first()).toHaveClass(/is-checked/); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/custom-transfer-titles.spec.ts b/examples/docs/resources/pc/demo/transfer/custom-transfer-titles.spec.ts deleted file mode 100644 index d5699233d..000000000 --- a/examples/docs/resources/pc/demo/transfer/custom-transfer-titles.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义列表标题', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/custom-transfer-titles'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - await expect(leftPanel.locator('.tiny-checkbox__label').first()).toHaveText(/所有数据列表/); - const rightPanel = transferPanels.nth(1); - await expect(rightPanel.locator('.tiny-checkbox__label').first()).toHaveText(/已选数据列表/); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/data-source.spec.ts b/examples/docs/resources/pc/demo/transfer/data-source.spec.ts deleted file mode 100644 index 2d09beb5a..000000000 --- a/examples/docs/resources/pc/demo/transfer/data-source.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('从左侧交换数据至右侧面板', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/data-source'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const rightPanel = transferPanels.nth(1); - const buttons = preview.getByRole('button'); - await preview.locator('label').filter({ hasText: '备选项 2' }).click(); - await buttons.first().click(); - await expect(rightPanel.locator('.tiny-transfer-panel__header').filter({ hasText: '列表 2 0 / 3' })).toHaveCount(1); -}) - -test('从右侧交换数据至左侧面板', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/data-source'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - const rightPanel = transferPanels.nth(1); - const buttons = preview.getByRole('button'); - await rightPanel.locator('label').filter({ hasText: '备选项 1' }).click(); - await buttons.nth(1).click(); - await expect(leftPanel.locator('.tiny-transfer-panel__header').filter({ hasText: '列表 1 0 / 15' })).toHaveCount(1); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/default-checked.spec.ts b/examples/docs/resources/pc/demo/transfer/default-checked.spec.ts deleted file mode 100644 index 80368791c..000000000 --- a/examples/docs/resources/pc/demo/transfer/default-checked.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断左侧面板是否有默认勾选项', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/default-checked'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - await expect(leftPanel.locator('label').filter({ hasText: '备选项 2' }).first()).toHaveClass(/is-checked/); - await expect(leftPanel.locator('label').filter({ hasText: '备选项 6' }).first()).toHaveClass(/is-checked/); - await expect(preview.getByRole('button').first()).toBeEnabled(); -}) - -test('判断右侧面板是否有默认勾选项', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/default-checked'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const rightPanel = transferPanels.nth(1); - await expect(rightPanel.locator('label').filter({ hasText: '备选项 1' }).first()).toHaveClass(/is-checked/); - await expect(preview.getByRole('button').nth(1)).toBeEnabled(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/drop-config.spec.ts b/examples/docs/resources/pc/demo/transfer/drop-config.spec.ts deleted file mode 100644 index bc3eadafb..000000000 --- a/examples/docs/resources/pc/demo/transfer/drop-config.spec.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('尝试拖拽左侧某一项至右侧面板', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/drop-config'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - const rightPanel = transferPanels.nth(1); - const dragDiv = leftPanel.locator('label:nth-child(2)').first(); - await dragDiv.hover(); - await page.mouse.down(); - await rightPanel.hover(); - await page.mouse.up(); - await expect(rightPanel.locator('.tiny-transfer-panel__header').filter({ hasText: '列表 2 0 / 5' })).toHaveCount(1); - await expect(leftPanel.locator('.tiny-transfer-panel__header').filter({ hasText: '列表 1 0 / 11' })).toHaveCount(1); -}) - -test('尝试拖拽右侧某一项至左侧面板', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/drop-config'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - const rightPanel = transferPanels.nth(1); - const dragDiv = rightPanel.locator('label').filter({ hasText: '备选项 3' }); - await dragDiv.hover(); - await page.mouse.down(); - await leftPanel.hover(); - await page.mouse.up(); - await expect(leftPanel.locator('.tiny-transfer-panel__header').filter({ hasText: '列表 1 0 / 13' })).toHaveCount(1); - await expect(rightPanel.locator('.tiny-transfer-panel__header').filter({ hasText: '列表 2 0 / 3' })).toHaveCount(1); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/filter-placeholder.spec.ts b/examples/docs/resources/pc/demo/transfer/filter-placeholder.spec.ts deleted file mode 100644 index 708326bf3..000000000 --- a/examples/docs/resources/pc/demo/transfer/filter-placeholder.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断是否有占位符', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/filter-placeholder'); - const preview = page.locator('#preview'); - await expect(preview.getByPlaceholder('请输入关键字搜索')).toHaveCount(2); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/filterable.spec.ts b/examples/docs/resources/pc/demo/transfer/filterable.spec.ts deleted file mode 100644 index a60b292a2..000000000 --- a/examples/docs/resources/pc/demo/transfer/filterable.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('输入搜索关键字判断功能是否正常', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/filterable'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - const input = preview.getByPlaceholder('请输入搜索内容'); - await input.first().click(); - await input.first().fill('1'); - const labels = leftPanel.locator('.tiny-transfer-panel__list > label'); - await expect(labels).toHaveCount(6); - // 清空搜索关键字 - await input.first().click(); - await input.first().fill(''); - await expect(labels).toHaveCount(14); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/manual-clear-query.spec.ts b/examples/docs/resources/pc/demo/transfer/manual-clear-query.spec.ts deleted file mode 100644 index 69e523666..000000000 --- a/examples/docs/resources/pc/demo/transfer/manual-clear-query.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断是否可以清除搜索内容', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/manual-clear-query'); - const preview = page.locator('#preview'); - const input = preview.getByPlaceholder('请输入搜索内容').first(); - await input.click(); - await input.fill('1'); - await preview.getByRole('button', { name: '重置查询' }).click(); - await expect(input).toHaveValue(''); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/nested-table.spec.ts b/examples/docs/resources/pc/demo/transfer/nested-table.spec.ts deleted file mode 100644 index e9a6294ef..000000000 --- a/examples/docs/resources/pc/demo/transfer/nested-table.spec.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断是否可以将左侧数据交换到右侧面板', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/nested-table'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const rightPanel = transferPanels.nth(1); - await preview.locator('.tiny-button').first().click(); - await expect(rightPanel.getByText('列表 2 1 / 8')).toHaveCount(1); -}) - -test('判断是否可以将右侧数据交换到左侧面板', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/nested-table'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - await preview.locator('.defaultButton > button:nth-child(2)').click(); - await expect(leftPanel.getByText('列表 1 1 / 14')).toHaveCount(1); -}) - -test('判断是否可以切换分页页码', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/nested-table'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - await preview.getByRole('listitem').filter({ hasText: '2' }).click(); - await expect(leftPanel.getByRole('table').locator('tbody > tr')).toHaveCount(3); -}) - -test('判断搜索功能是否正常', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/nested-table'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - const input = preview.getByPlaceholder('请输入城市拼音'); - await input.first().click(); - await input.first().fill('1'); - const count = leftPanel.getByRole('table').locator('tbody > tr'); - await expect(count).toHaveCount(7); - // 清空搜索内容 - await input.first().click(); - await input.first().fill(''); - await expect(count).toHaveCount(10); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/panel-slot.spec.ts b/examples/docs/resources/pc/demo/transfer/panel-slot.spec.ts deleted file mode 100644 index 5059920b6..000000000 --- a/examples/docs/resources/pc/demo/transfer/panel-slot.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断插槽内是否有内容', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/panel-slot'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - await expect(leftPanel).toHaveClass(/transfer-custom-left-panel/); - await expect(leftPanel).not.toBeEmpty(); - const rightPanel = transferPanels.nth(1); - await expect(rightPanel).toHaveClass(/transfer-custom-right-panel/); - await expect(rightPanel).not.toBeEmpty(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/props-of-data-source.spec.ts b/examples/docs/resources/pc/demo/transfer/props-of-data-source.spec.ts deleted file mode 100644 index a8e834ea8..000000000 --- a/examples/docs/resources/pc/demo/transfer/props-of-data-source.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('从左侧交换数据至右侧面板', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/props-of-data-source'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const rightPanel = transferPanels.nth(1); - const buttons = preview.getByRole('button'); - await preview.locator('label').filter({ hasText: '备选项 2' }).click(); - await buttons.first().click(); - await expect(rightPanel.locator('.tiny-transfer-panel__header').filter({ hasText: '列表 2 0 / 3' })).toHaveCount(1); -}) - -test('从右侧交换数据至左侧面板', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/props-of-data-source'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - const rightPanel = transferPanels.nth(1); - const buttons = preview.getByRole('button'); - await rightPanel.locator('label').filter({ hasText: '备选项 1' }).click(); - await buttons.nth(1).click(); - await expect(leftPanel.locator('.tiny-transfer-panel__header').filter({ hasText: '列表 1 0 / 14' })).toHaveCount(1); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/show-all-btn.spec.ts b/examples/docs/resources/pc/demo/transfer/show-all-btn.spec.ts deleted file mode 100644 index 8c864637f..000000000 --- a/examples/docs/resources/pc/demo/transfer/show-all-btn.spec.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断按钮是否可用', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/show-all-btn'); - const preview = page.locator('#preview'); - const buttons = preview.getByRole('button'); - await expect(buttons.first()).toBeEnabled(); - await expect(buttons.nth(3)).toBeEnabled(); -}) - -test('全部移动到右侧', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/show-all-btn'); - const preview = page.locator('#preview'); - const buttons = preview.getByRole('button'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const rightPanel = transferPanels.nth(1); - await buttons.first().click(); - await expect(rightPanel.locator('label').filter({ hasText: '列表 2 0 / 13' })).toHaveCount(1); - await expect(buttons.first()).toBeDisabled(); - await expect(buttons.nth(3)).toBeEnabled(); -}) - -test('全部移动到左侧', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/show-all-btn'); - const preview = page.locator('#preview'); - const buttons = preview.getByRole('button'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - await buttons.nth(3).click(); - await expect(leftPanel.locator('label').filter({ hasText: '列表 1 0 / 15' })).toHaveCount(1); - await expect(buttons.first()).toBeEnabled(); - await expect(buttons.nth(3)).toBeDisabled(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/target-order.spec.ts b/examples/docs/resources/pc/demo/transfer/target-order.spec.ts deleted file mode 100644 index cd8b1629a..000000000 --- a/examples/docs/resources/pc/demo/transfer/target-order.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断交换左侧备选项后是否位于右侧面板首位', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/target-order'); - const preview = page.locator('#preview'); - const buttons = preview.getByRole('button'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - await leftPanel.locator('label').filter({ hasText: '备选项 2' }).click(); - await buttons.first().click(); - const rightPanel = transferPanels.nth(1); - await expect(rightPanel.locator('label').filter({ hasText: '备选项 2' })).toHaveCount(1); - await leftPanel.locator('label').filter({ hasText: '备选项 3' }).click(); - await buttons.first().click(); - await expect(rightPanel.locator('label').filter({ hasText: '备选项 3' })).toHaveCount(1); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/transfer/transfer-events.spec.ts b/examples/docs/resources/pc/demo/transfer/transfer-events.spec.ts deleted file mode 100644 index f5d1138be..000000000 --- a/examples/docs/resources/pc/demo/transfer/transfer-events.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('判断是否触发了不同事件', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()); - await page.goto('http://localhost:7130/pc/transfer/transfer-events'); - const preview = page.locator('#preview'); - const transferPanels = preview.locator('.tiny-transfer-panel'); - const leftPanel = transferPanels.first(); - await leftPanel.locator('label').filter({ hasText: '备选项 2' }).click(); - await expect(page.getByText(/^left-check-change 事件/)).toBeVisible(); - await preview.getByRole('button').first().click(); - await expect(page.getByText(/^change 事件/)).toBeVisible(); - const rightPanel = transferPanels.nth(1); - await rightPanel.locator('label').first().click(); - await expect(page.getByText(/^right-check-change 事件/)).toBeVisible(); -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree-menu/basic-usage.spec.ts b/examples/docs/resources/pc/demo/tree-menu/basic-usage.spec.ts deleted file mode 100644 index 1b91003ee..000000000 --- a/examples/docs/resources/pc/demo/tree-menu/basic-usage.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('基本使用,无数据场景', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree-menu/basic-usage') - - const treeMenu = page.locator('#preview .tiny-tree-menu') - await expect(treeMenu.getByPlaceholder('请输入内容进行筛选')).toBeVisible() - await expect(treeMenu).toContainText('暂无数据') -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree-menu/check-strictly.spec.ts b/examples/docs/resources/pc/demo/tree-menu/check-strictly.spec.ts deleted file mode 100644 index d3be05a46..000000000 --- a/examples/docs/resources/pc/demo/tree-menu/check-strictly.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('父子级不相关联', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree-menu/check-strictly') - - // 父节点勾选不会改变子节点 - await page.getByRole('treeitem', { name: '指南', exact: true }).getByRole('img').first().click() - await expect(page.getByRole('treeitem', { name: '引入组件' }).locator('span').nth(1)).not.toHaveClass(/is-checked/) - await expect(page.getByRole('treeitem', { name: '构建部署' }).locator('span').nth(1)).not.toHaveClass(/is-checked/) - - // 子节点勾选不改变父节点 - await page.getByRole('treeitem', { name: '引入组件' }).click() - await page.getByRole('treeitem', { name: '按需引入' }).locator('span').nth(2).click() - await page.getByRole('treeitem', { name: '完整引入' }).locator('span').nth(2).click() - await expect(page.getByRole('treeitem', { name: '引入组件' }).locator('span').nth(1)).not.toHaveClass(/is-checked/) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree-menu/data-resource.spec.ts b/examples/docs/resources/pc/demo/tree-menu/data-resource.spec.ts deleted file mode 100644 index 8d353b497..000000000 --- a/examples/docs/resources/pc/demo/tree-menu/data-resource.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('绑定数据源', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree-menu/data-resource') - - await page.getByTitle('指南', { exact: true }).click() - await expect(page.getByTitle('后端适配器')).toBeVisible() - await page.getByTitle('后端适配器').click() - await expect(page.getByRole('treeitem', { name: '后端适配器' })).toHaveClass(/is-current/) - await page.getByTitle('指南', { exact: true }).click() - await expect(page.getByTitle('后端适配器')).not.toBeVisible() - - // 过滤功能 - await page.locator('#preview').getByPlaceholder('请输入内容进行筛选').fill('添加标签页') - await expect(page.getByTitle('添加标签页')).toBeVisible() - await expect(page.getByTitle('指南', { exact: true })).not.toBeVisible() - await page.locator('#preview').getByPlaceholder('请输入内容进行筛选').clear() - await expect(page.getByTitle('指南', { exact: true })).toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree-menu/default-expand-all.spec.ts b/examples/docs/resources/pc/demo/tree-menu/default-expand-all.spec.ts deleted file mode 100644 index 685b38f66..000000000 --- a/examples/docs/resources/pc/demo/tree-menu/default-expand-all.spec.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('默认展开全部菜单', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree-menu/default-expand-all') - - const treeMenu = page.locator('#preview .tiny-tree-menu') - await expect(treeMenu.getByTitle('首页')).toBeVisible() - await expect(treeMenu.getByTitle('组件').first()).toBeVisible() - await expect(treeMenu.getByTitle('引入组件')).toBeVisible() - await expect(treeMenu.getByRole('link', { name: 'Button 按钮' })).toBeVisible() - await expect(treeMenu.getByTitle('教程')).toBeVisible() - await expect(treeMenu.getByTitle('页面布局')).toBeVisible() - await expect(treeMenu.getByTitle('列表属性配置')).toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree-menu/expand-on-click-node.spec.ts b/examples/docs/resources/pc/demo/tree-menu/expand-on-click-node.spec.ts deleted file mode 100644 index 5a63d13d3..000000000 --- a/examples/docs/resources/pc/demo/tree-menu/expand-on-click-node.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('点击文字展开菜单', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree-menu/expand-on-click-node') - - const treeMenu = page.locator('#preview .tiny-tree-menu') - await treeMenu.getByTitle('指南', { exact: true }).click() - await expect(treeMenu.getByTitle('后端适配器')).toBeVisible() -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree-menu/lazy-load.vue b/examples/docs/resources/pc/demo/tree-menu/lazy-load.vue deleted file mode 100644 index 5fb061d01..000000000 --- a/examples/docs/resources/pc/demo/tree-menu/lazy-load.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/tree-menu/show-checkbox.spec.ts b/examples/docs/resources/pc/demo/tree-menu/show-checkbox.spec.ts deleted file mode 100644 index 7c2b80681..000000000 --- a/examples/docs/resources/pc/demo/tree-menu/show-checkbox.spec.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { test, expect } from '@playwright/test' - -test('节点可勾选', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree-menu/show-checkbox') - - const treeMenu = page.locator('#preview .tiny-tree-menu') - const node = treeMenu.getByRole('treeitem', { name: '首页' }) - const selectedClass = /is-checked/ - await expect(node.locator('.tiny-tree-node__content .tiny-checkbox')).toBeVisible() - await page.getByRole('treeitem', { name: '首页' }).locator('span').nth(2).click() - await expect(node).toHaveClass(/is-current/) - await expect(node.locator('.tiny-tree-node__content .tiny-checkbox')).toHaveClass(selectedClass) - - // 父级选中, 子孙节点同时都选中 - await page.getByRole('treeitem', { name: '指南', exact: true }).locator('span').nth(2).click() - await treeMenu.getByRole('treeitem', { name: '指南' }).click() - await expect(treeMenu.getByRole('treeitem', { name: '引入组件' }).locator('.tiny-checkbox')).toHaveClass(selectedClass) - await expect(treeMenu.getByRole('treeitem', { name: '后端适配器' }).locator('.tiny-checkbox')).toHaveClass(selectedClass) - await treeMenu.getByRole('treeitem', { name: '引入组件' }).click() - await expect(treeMenu.getByRole('treeitem', { name: '按需引入' }).locator('.tiny-checkbox')).toHaveClass(selectedClass) - - // 子节点取消勾选, 祖先节点改变勾选状态 - await page.getByRole('treeitem', { name: '按需引入' }).locator('span').nth(2).click() - await expect(treeMenu.getByRole('treeitem', { name: '引入组件' }).locator('.tiny-checkbox__input').first()).toHaveClass(/is-indeterminate/) - await expect(treeMenu.getByRole('treeitem', { name: '指南' }).locator('.tiny-checkbox__input').first()).toHaveClass(/is-indeterminate/) - await page.getByRole('treeitem', { name: '完整引入' }).locator('span').nth(2).click() - await expect(treeMenu.getByRole('treeitem', { name: '引入组件' }).locator('.tiny-checkbox__input').first()).not.toHaveClass(/is-indeterminate/) -}) \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/accordion-mode.spec.ts b/examples/docs/resources/pc/demo/tree/accordion-mode.spec.ts deleted file mode 100644 index 4a3f51cde..000000000 --- a/examples/docs/resources/pc/demo/tree/accordion-mode.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('手风琴模式', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/accordion-mode') - - await expect(page.getByRole('treeitem', { name: '二级 1-1' })).toBeVisible() - await expect(page.getByRole('treeitem', { name: '二级 2-1' })).not.toBeVisible() - await expect(page.getByRole('treeitem', { name: '二级 3-1' })).not.toBeVisible() - await page.getByText('一级 2').click() - await expect(page.getByRole('treeitem', { name: '三级 2-1-1' })).toBeVisible() - await expect(page.getByRole('treeitem', { name: '三级 2-2-1' })).not.toBeVisible() -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/allow-drop.spec.ts b/examples/docs/resources/pc/demo/tree/allow-drop.spec.ts deleted file mode 100644 index 312b27cc6..000000000 --- a/examples/docs/resources/pc/demo/tree/allow-drop.spec.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义节点能否被拖拽', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/allow-drop') - - const draggedDom = page.getByRole('treeitem', { name: '二级 3-2' }) - // 获取拖拽元素位置 - const { x, y } = await draggedDom.boundingBox() - - // 拖拽到不可放置子节点的元素上 - await page.mouse.move(x, y) - await page.mouse.down() - await page.mouse.move(x, y - 55) - await page.mouse.up() - - // 拖拽完成判断目标节点有没有增加子节点 - await expect(page.getByRole('treeitem', { name: '二级 3-1' }).locator('.tiny-tree-node__children .tiny-tree-node')).toHaveCount(0) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/auto-expand-parent.spec.ts b/examples/docs/resources/pc/demo/tree/auto-expand-parent.spec.ts deleted file mode 100644 index fe164bcf5..000000000 --- a/examples/docs/resources/pc/demo/tree/auto-expand-parent.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('展开子节点的时候是否自动展开父节点', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/auto-expand-parent'); - - const expandNode = page.getByRole('treeitem', { name: '二级 1-1' }) - await expect(expandNode).toHaveCount(0) - await page.getByText('一级 1').first().click() - await expect(expandNode).toHaveCount(1) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/basic-usage.spec.ts b/examples/docs/resources/pc/demo/tree/basic-usage.spec.ts deleted file mode 100644 index e20c6960c..000000000 --- a/examples/docs/resources/pc/demo/tree/basic-usage.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('tree组件基本使用', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/basic-usage'); - await page.getByRole('treeitem', { name: '一级 1' }).locator('div').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[1]/div')).toHaveClass(/is-current/); - await page.getByText('二级 1-1').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[1]/div/div[2]/div/div')).toHaveClass(/is-current/); - await page.getByRole('treeitem', { name: '三级 1-1-1' }).locator('div').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[1]/div/div[2]/div/div/div[2]/div/div')).toHaveClass(/is-current/); - await page.getByRole('treeitem', { name: '一级 3' }).getByRole('img').click(); - await page.getByRole('treeitem', { name: '一级 1' }).locator('div').filter({ hasText: '一级 1' }).click(); - await expect(page.getByRole('treeitem', { name: '一级 1-1', includeHidden: true })).toBeHidden(0) - await page.locator('.tiny-modal__box').first().click(); -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/check-strictly.spec.ts b/examples/docs/resources/pc/demo/tree/check-strictly.spec.ts deleted file mode 100644 index 377861671..000000000 --- a/examples/docs/resources/pc/demo/tree/check-strictly.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('父子节点互不关联', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/check-strictly'); - - const checkedClass = /is-checked/ - const parantNode1 = page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[1]/div/div[2]/div/div/div[1]/label') - const childNodes1 = [page.getByRole('treeitem', { name: '三级 1-1-1' }).locator('span').nth(1), page.getByRole('treeitem', { name: '三级 1-1-2' }).locator('span').nth(1)] - const parantNode2 = page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[2]/div/div[1]/label') - const childNodes2 = [page.getByRole('treeitem', { name: '二级 2-1' }).locator('span').nth(1), page.getByRole('treeitem', { name: '二级 2-2' }).locator('span').nth(1)] - const parantNode3 = page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[3]/div/div[1]/label') - const childNodes3 = [page.getByRole('treeitem', { name: '二级 3-1' }).locator('span').nth(1)] - - // 子节点选中不影响父节点 - await childNodes1[0].click(); - await childNodes1[1].click(); - await expect(parantNode1).not.toHaveClass(checkedClass) - - // 子节点取消选中, 不影响父节点 - await parantNode1.click(); - await childNodes1[0].click(); - await childNodes1[1].click(); - await expect(parantNode1).toHaveClass(checkedClass) - - // 父节点选中, 子节点不变 - await parantNode2.click(); - await expect(childNodes2[0]).not.toHaveClass(checkedClass); - await expect(childNodes2[1]).not.toHaveClass(checkedClass); - await childNodes3[0].click(); - await parantNode3.click(); - await expect(childNodes3[0]).toHaveClass(checkedClass) - - // 父节点取消选中, 子节点不变 - await childNodes1[0].click(); - await childNodes1[1].click(); - await parantNode1.click() - await expect(childNodes1[0]).toHaveClass(checkedClass) - await expect(childNodes1[1]).toHaveClass(checkedClass) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/contextmenu.spec.ts b/examples/docs/resources/pc/demo/tree/contextmenu.spec.ts deleted file mode 100644 index 56c8fe920..000000000 --- a/examples/docs/resources/pc/demo/tree/contextmenu.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('可自定义右键菜单内容', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/contextmenu') - - await page.getByRole('treeitem', { name: '三级 1-1-1' }).click({ - button: 'right' - }) - const menu = page.locator('#preview .tiny-tree-node__menu') - await expect(menu).toBeVisible() - await page.getByText('新增 三级 1-1-1删除 { "label": "三级 1-1-1" }更新 三级 1-1-1').click() -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/contextmenu.vue b/examples/docs/resources/pc/demo/tree/contextmenu.vue deleted file mode 100644 index b6b369e22..000000000 --- a/examples/docs/resources/pc/demo/tree/contextmenu.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/tree/current-node-key.spec.ts b/examples/docs/resources/pc/demo/tree/current-node-key.spec.ts deleted file mode 100644 index 71bda9071..000000000 --- a/examples/docs/resources/pc/demo/tree/current-node-key.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('当前选中节点标志', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/current-node-key') - - const selectedNodeClass = /is-current/ - await expect(page.getByRole('treeitem', { name: '一级 2' })).toHaveClass(selectedNodeClass) - await expect(page.getByRole('treeitem', { name: '一级 1' })).not.toHaveClass(selectedNodeClass) - await expect(page.getByRole('treeitem', { name: '二级 2-1' })).not.toHaveClass(selectedNodeClass) - await expect(page.getByRole('treeitem', { name: '二级 3-2' })).not.toHaveClass(selectedNodeClass) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/custom-node-icon.spec.ts b/examples/docs/resources/pc/demo/tree/custom-node-icon.spec.ts deleted file mode 100644 index 6e235716a..000000000 --- a/examples/docs/resources/pc/demo/tree/custom-node-icon.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义展开折叠图标', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/custom-node-icon') - - await expect(page.getByRole('treeitem', { name: '二级 1-1' }).locator('.tree-node-icon .expanded').first()).toBeVisible() - await page.locator('div').filter({ hasText: /^一级 2$/ }).click() - await expect(page.getByRole('treeitem', { name: '一级 2' }).locator('.tree-node-icon').first()).not.toHaveClass(/expanded/) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/data-source.spec.ts b/examples/docs/resources/pc/demo/tree/data-source.spec.ts deleted file mode 100644 index 42652fe00..000000000 --- a/examples/docs/resources/pc/demo/tree/data-source.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('测试数据源是否正常显示', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/data-source'); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[1]/div')).toHaveText('一级 1') - await page.getByRole('treeitem', { name: '一级 1' }).click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[1]/div/div[2]/div/div/div[1]')).toHaveText('二级 1-1') - await page.getByRole('treeitem', { name: '二级 1-1' }).locator('div').click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[1]/div/div[2]/div/div/div[2]/div[1]/div')).toHaveText('三级 1-1-1') - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[3]/div')).toHaveText('一级 3') -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/default-expand-all.spec.ts b/examples/docs/resources/pc/demo/tree/default-expand-all.spec.ts deleted file mode 100644 index 0aba544bc..000000000 --- a/examples/docs/resources/pc/demo/tree/default-expand-all.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('初始化展开所有节点', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/default-expand-all'); - - const expandClass = /is-expanded/ - await expect(page.getByRole('treeitem', { name: '一级 1' })).toHaveClass(expandClass) - await expect(page.getByRole('treeitem', { name: '二级 1-1' })).toHaveClass(expandClass) - await expect(page.getByRole('treeitem', { name: '三级 1-1-1' })).toHaveClass(expandClass) - await expect(page.getByRole('treeitem', { name: '二级 2-1' })).toHaveClass(expandClass) - await expect(page.getByRole('treeitem', { name: '二级 1-1' })).toHaveClass(expandClass) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/default-expended-keys.spec.ts b/examples/docs/resources/pc/demo/tree/default-expended-keys.spec.ts deleted file mode 100644 index d4f6a95fe..000000000 --- a/examples/docs/resources/pc/demo/tree/default-expended-keys.spec.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('默认展开指定节点', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/default-expanded-keys') - - const expandClass = /is-expanded/ - await expect(page.getByRole('treeitem', { name: '一级 1' })).toHaveClass(expandClass) - await expect(page.getByRole('treeitem', { name: '二级 1-1' })).toHaveClass(expandClass) - await expect(page.getByRole('treeitem', { name: '一级 2' })).not.toHaveClass(expandClass) - await expect(page.getByRole('treeitem', { name: '一级 3' })).not.toHaveClass(expandClass) - await expect(page.getByRole('treeitem', { name: '三级 1-1-1' })).toHaveCount(1) - await expect(page.getByRole('treeitem', { name: '二级 2-1' })).toHaveCount(0) - await expect(page.getByRole('treeitem', { name: '二级 3-1' })).toHaveCount(0) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/disable-node.spec.ts b/examples/docs/resources/pc/demo/tree/disable-node.spec.ts deleted file mode 100644 index 2d4a399da..000000000 --- a/examples/docs/resources/pc/demo/tree/disable-node.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('树节点禁用状态', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/disable-node'); - - const checkboxDisabled = page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[1]/div/div[2]/div/div/div[2]/div[1]/div/div[1]/label') - const parentNodeCheckbox = page.locator('div').filter({ hasText: /^一级 2$/ }).locator('span').nth(1) - const childNodeCheckbox = page.getByRole('treeitem', { name: '二级 2-1' }).locator('span').nth(1) - const parentNodeCheckbox2 = page.locator('div').filter({ hasText: /^二级 1-1$/ }).locator('span').nth(1) - - // 禁用节点复选框是否不能选中 - await expect(checkboxDisabled).toHaveClass(/is-disabled/) - await expect(checkboxDisabled).not.toHaveClass(/is-checked/) - - // 选中父节点, 子节点中除禁用的都可以选中 - await parentNodeCheckbox.click() - await expect(parentNodeCheckbox).toHaveClass(/is-indeterminate/) - await expect(childNodeCheckbox).toHaveClass(/is-checked/) - - // 子节点都禁用的情况下, 父节点不可选中 - await parentNodeCheckbox2.click() - expect(parentNodeCheckbox2).not.toHaveClass(/is-checked|is-indeterminate/) - - // 非禁用节点可点击选中 - await page.getByRole('treeitem', { name: '二级 3-1' }).locator('span').nth(2).click(); - await page.locator('div').filter({ hasText: /^一级 3$/ }).getByRole('checkbox').click(); -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/drag-events.spec.ts b/examples/docs/resources/pc/demo/tree/drag-events.spec.ts deleted file mode 100644 index 9ace3bae2..000000000 --- a/examples/docs/resources/pc/demo/tree/drag-events.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('拖拽节点事件', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/drag-events') - - const draggedDom = page.getByRole('treeitem', { name: '三级 1-1-2' }) - // 获取拖拽元素位置 - const { x, y } = await draggedDom.boundingBox() - - await page.mouse.move(x, y) - await page.mouse.down() - await page.mouse.move(x, y - 15) - await page.mouse.move(x, y - 15) - await page.mouse.move(x, y - 15) - await expect(page.getByText('拖拽节点开始时触发的事件').first()).toBeVisible() - await expect(page.getByText('拖拽节点时触发的事件').first()).toBeVisible() - await expect(page.getByText('拖拽离开节点时触发的事件').first()).toBeVisible() - await expect(page.getByText('拖拽进入其他节点时触发的事件').first()).toBeVisible() - await page.mouse.up() - await expect(page.getByText('拖拽结束时触发的事件').first()).toBeVisible() -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/expand-on-click-node.spec.ts b/examples/docs/resources/pc/demo/tree/expand-on-click-node.spec.ts deleted file mode 100644 index 6fe3c0362..000000000 --- a/examples/docs/resources/pc/demo/tree/expand-on-click-node.spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('点击节点展开收缩', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/expand-on-click-node'); - - const expandedClass = /is-expanded/ - const rootNode = page.locator('div').filter({ hasText: /^一级 1$/ }) - const mediumNode = page.getByRole('treeitem', { name: '二级 1-1' }) - const leafNode = page.getByRole('treeitem', { name: '三级 1-1-1' }) - - // 点击收缩 - await rootNode.click(); - await expect(mediumNode).toBeHidden(0) - await expect(leafNode).toBeHidden(0) - - // 点击展开 - await rootNode.click(); - await expect(mediumNode).toHaveClass(expandedClass) - await expect(leafNode).toHaveClass(expandedClass) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/filter-node.spec.ts b/examples/docs/resources/pc/demo/tree/filter-node.spec.ts deleted file mode 100644 index 7e519342e..000000000 --- a/examples/docs/resources/pc/demo/tree/filter-node.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('节点过滤', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/filter-node') - - await page.getByPlaceholder('输入关键字进行过滤').click() - await page.getByPlaceholder('输入关键字进行过滤').fill('1') - const validNodeCount = await page.locator('#preview .tiny-tree-node').filter({ hasText: '1' }).count() - await expect(validNodeCount).toBeGreaterThan(0) - await expect(page.getByRole('treeitem', { name: '二级 2-2' })).not.toBeVisible() -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/indent.spec.ts b/examples/docs/resources/pc/demo/tree/indent.spec.ts deleted file mode 100644 index 89a3e79ec..000000000 --- a/examples/docs/resources/pc/demo/tree/indent.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('水平缩进', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/indent') - - const childNode1 = page.locator('#preview .tiny-tree-node__content').filter({ hasText: /^二级 1-1$/ }) - await expect(childNode1).toHaveCSS('padding-left', '50px') - const childNode2 = page.locator('#preview .tiny-tree-node__content').filter({ hasText: /^三级 1-1-1$/ }) - await expect(childNode2).toHaveCSS('padding-left', '100px') -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/node-draggable.spec.ts b/examples/docs/resources/pc/demo/tree/node-draggable.spec.ts deleted file mode 100644 index 9d384666c..000000000 --- a/examples/docs/resources/pc/demo/tree/node-draggable.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('可拖拽节点', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/node-draggable'); - - const draggedDom = page.getByRole('treeitem', { name: '三级 1-1-1' }) - // 获取拖拽元素位置 - const { x, y } = await draggedDom.boundingBox() - - // 1. 兄弟节点之间交换位置 - await page.mouse.move(x, y) - await page.mouse.down() - await page.mouse.move(x, y + 55) - await page.mouse.up() - // 拖拽完成判断位置是否变化 - await expect(page.getByRole('treeitem', { name: '二级 1-1' }).locator('.tiny-tree-node__content').nth(1)).toContainText('1-1-2') - - // 2. 拖拽兄弟节点跨层级 - await page.mouse.move(x, y) - await page.mouse.down() - await page.mouse.move(x, y + 30) - await page.mouse.up() - // 判断新的子节点和父节点的位置 - await expect(page.getByRole('treeitem', { name: '三级 1-1-1' }).locator('.tiny-tree-node__children .tiny-tree-node')).toHaveCount(1) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/node-key.spec.ts b/examples/docs/resources/pc/demo/tree/node-key.spec.ts deleted file mode 100644 index 0255fe1be..000000000 --- a/examples/docs/resources/pc/demo/tree/node-key.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('唯一标识', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/node-key'); - - await page.getByRole('button', { name: '设置当前选中的节点的 key' }).click() - await expect(page.getByRole('treeitem', { name: '二级 2-1' })).toHaveClass(/is-current/) - - await page.getByRole('button', { name: '设置当前选中的节点', exact: true }).click(); - await expect(page.getByRole('treeitem', { name: '三级 1-1-2' })).toHaveClass(/is-current/) - - await page.getByText('三级 1-1-1').click(); - await page.getByRole('button', { name: '获取当前被选中节点的 key' }).click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[2]/div[1]')).toContainText('9') - - await page.getByRole('button', { name: '获得当前选中的节点' }).click(); - await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[2]/div[2]')).toContainText('"id": 9') - - const newNode1 = page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[5]/div[1]/div/div[2]/div/div/div[2]/div[3]/div') - await expect(newNode1).toHaveCount(0) - await page.getByRole('button', { name: '为 Tree 中的一个节点追加一个子节点' }).click(); - await expect(newNode1).toHaveCount(1) - - const newNode2 = page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[5]/div[4]/div') - await expect(newNode2).toHaveCount(0) - await page.getByRole('button', { name: '根据节点数据在父节点下插入一个子节点' }).click(); - await expect(newNode2).toHaveCount(1) - - const newNode3 = page.getByRole('treeitem', { name: '一级 5' }) - await expect(newNode3).toHaveCount(0) - await page.getByRole('button', { name: '为 Tree 的一个节点的前面增加一个节点' }).click(); - await expect(newNode3).toHaveCount(1) - - const node = page.locator('div').filter({ hasText: /^一级 2$/ }) - await expect(node).toHaveCount(1) - await page.getByRole('button', { name: '删除节点' }).click(); - await expect(node).toHaveCount(0) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/node-props-config.spec.ts b/examples/docs/resources/pc/demo/tree/node-props-config.spec.ts deleted file mode 100644 index eee5bd02d..000000000 --- a/examples/docs/resources/pc/demo/tree/node-props-config.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('数据节点属性配置', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/node-props-config'); - - await expect(page.locator('#preview .tiny-tree-node__content').first()).toHaveText('一级 1') - const childCount = await page.getByRole('treeitem', { name: '一级 1' }).locator('.tiny-tree-node__children .tiny-tree-node__content').count() - await expect(childCount).toBeGreaterThan(0) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/render-content.spec.ts b/examples/docs/resources/pc/demo/tree/render-content.spec.ts deleted file mode 100644 index 56e708daa..000000000 --- a/examples/docs/resources/pc/demo/tree/render-content.spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('自定义内容区渲染', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/render-content'); - - const node = page.getByRole('treeitem', { name: '三级 1-1-1' }) - const customContent1 = node.getByText('Append') - const customContent2 = node.getByText('Delete') - const customContent3 = page.locator('span').filter({ hasText: '二级 1-1AppendDelete' }).getByRole('button', { name: 'Append' }).nth(0) - const customContent4 = page.getByRole('treeitem', { name: '一级 1 Append Delete' }).getByRole('button', { name: 'Append' }).nth(0) - const appendedNode = page.getByRole('treeitem', { name: 'testtest' }) - for (const item of [customContent1, customContent2, customContent3, customContent4]) { - await expect(item).toHaveCount(1) - } - - await customContent1.click() - await expect(appendedNode).toHaveCount(1) - await appendedNode.getByRole('button', { name: 'Delete' }).click(); - await expect(appendedNode).toHaveCount(0) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/show-checkbox.spec.ts b/examples/docs/resources/pc/demo/tree/show-checkbox.spec.ts deleted file mode 100644 index 5d11584ae..000000000 --- a/examples/docs/resources/pc/demo/tree/show-checkbox.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('是否开启多选模式', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/show-checkbox') - - const checkbox1 = page.getByRole('treeitem', { name: '三级 1-1-2' }).locator('.tiny-checkbox') - const checkbox2 = page.getByRole('treeitem', { name: '二级 3-2' }).locator('.tiny-checkbox') - const checkbox3 = page.getByRole('treeitem', { name: '三级 1-1-1' }).locator('.tiny-checkbox') - const checkbox4 = page.getByRole('treeitem', { name: '三级 3-3-1' }).locator('.tiny-checkbox') - const checkedClass = /is-checked/ - - await expect(checkbox1).toBeVisible() - await checkbox1.click() - await expect(checkbox1).toHaveClass(checkedClass) - await checkbox1.click() - await expect(checkbox1).not.toHaveClass(checkedClass) - - await expect(checkbox2).not.toHaveClass(checkedClass) - await page.getByRole('button', { name: '通过 data 设置节点的勾选状态' }).click() - await expect(checkbox2).toHaveClass(checkedClass) - - await expect(checkbox3).not.toHaveClass(checkedClass) - await page.getByRole('button', { name: '通过 key 设置节点的当前选中状态' }).click(); - await expect(checkbox3).toHaveClass(checkedClass) - - await expect(checkbox1).not.toHaveClass(checkedClass) - await page.getByRole('button', { name: '通过 node 设置节点的当前选中状态' }).click(); - await expect(checkbox1).toHaveClass(checkedClass) - - await expect(checkbox4).not.toBeVisible() - await page.getByRole('button', { name: '通过 keys 设置节点子元素' }).click(); - await expect(checkbox4).toBeVisible() -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/single-select-radio.spec.ts b/examples/docs/resources/pc/demo/tree/single-select-radio.spec.ts deleted file mode 100644 index 1d190f39f..000000000 --- a/examples/docs/resources/pc/demo/tree/single-select-radio.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('单选', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/single-select-radio') - - const node1 = page.getByRole('treeitem', { name: '一级 3' }) - const node2 = page.getByRole('treeitem', { name: '二级 3-1' }) - - await expect(node1.locator('.tiny-radio').first()).toBeVisible() - - await node1.click() - await node2.click() - await expect(node2.locator('.tiny-radio')).toHaveClass(/is-checked/) - await expect(node1.locator('.tiny-radio').first()).not.toHaveClass(/is-checked/) -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/single-select-radio.vue b/examples/docs/resources/pc/demo/tree/single-select-radio.vue deleted file mode 100644 index 76c2d6870..000000000 --- a/examples/docs/resources/pc/demo/tree/single-select-radio.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/tree/slot-deffault.spec.ts b/examples/docs/resources/pc/demo/tree/slot-deffault.spec.ts deleted file mode 100644 index 7b95db110..000000000 --- a/examples/docs/resources/pc/demo/tree/slot-deffault.spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('默认插槽', async ({ page }) => { - page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/tree/slot-deffault'); - - const currentNodeContent = page.getByText('一级 1') - await expect(currentNodeContent).toHaveClass('custom-label') -}); \ No newline at end of file diff --git a/examples/docs/resources/pc/demo/tree/slot-deffault.vue b/examples/docs/resources/pc/demo/tree/slot-deffault.vue deleted file mode 100644 index 6ec2d67de..000000000 --- a/examples/docs/resources/pc/demo/tree/slot-deffault.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - - - diff --git a/examples/docs/resources/pc/demo/user-account/custom-service.vue b/examples/docs/resources/pc/demo/user-account/custom-service.vue deleted file mode 100644 index 3edfa538f..000000000 --- a/examples/docs/resources/pc/demo/user-account/custom-service.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/user-contact/basic-usage.vue b/examples/docs/resources/pc/demo/user-contact/basic-usage.vue deleted file mode 100644 index 5ab10a1db..000000000 --- a/examples/docs/resources/pc/demo/user-contact/basic-usage.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/user-contact/not-displayed-content.vue b/examples/docs/resources/pc/demo/user-contact/not-displayed-content.vue deleted file mode 100644 index e241f50e5..000000000 --- a/examples/docs/resources/pc/demo/user-contact/not-displayed-content.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/user-head/color.vue b/examples/docs/resources/pc/demo/user-head/color.vue deleted file mode 100644 index d835443b1..000000000 --- a/examples/docs/resources/pc/demo/user-head/color.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/user-link/custom-service.vue b/examples/docs/resources/pc/demo/user-link/custom-service.vue deleted file mode 100644 index 77ddf86c6..000000000 --- a/examples/docs/resources/pc/demo/user-link/custom-service.vue +++ /dev/null @@ -1,97 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/user/cache-users.vue b/examples/docs/resources/pc/demo/user/cache-users.vue deleted file mode 100644 index 3778eb922..000000000 --- a/examples/docs/resources/pc/demo/user/cache-users.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/user/custom-sort.vue b/examples/docs/resources/pc/demo/user/custom-sort.vue deleted file mode 100644 index 8f9f24b34..000000000 --- a/examples/docs/resources/pc/demo/user/custom-sort.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/demo/wizard/basic-usage.vue b/examples/docs/resources/pc/demo/wizard/basic-usage.vue deleted file mode 100644 index 23bd6b379..000000000 --- a/examples/docs/resources/pc/demo/wizard/basic-usage.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - diff --git a/examples/docs/resources/pc/menus.js b/examples/docs/resources/pc/menus.js deleted file mode 100644 index c852a5f8f..000000000 --- a/examples/docs/resources/pc/menus.js +++ /dev/null @@ -1,1106 +0,0 @@ -const routerArr = [ - { - zh: '使用指南', - en: 'Usage Guidelines', - type: 'groupCount', - children: [ - { - en: 'Changelog', - zh: '更新日志', - enSuffix: false, - path: '/changelog' - }, - { - en: 'envpreparation', - zh: '环境准备', - enSuffix: false, - path: '/envpreparation' - }, - { - en: 'installation', - zh: '安装', - enSuffix: false, - path: '/installation' - }, - { - en: 'importComponents', - zh: '引入组件', - enSuffix: false, - path: '/import-components' - }, - { - en: 'adapter', - zh: '后端适配器', - enSuffix: false, - path: '/adapter' - }, - { - en: 'developDemo', - zh: '开发示例', - enSuffix: false, - path: '/develop-demo' - }, - { - en: 'tinyStage', - zh: '创建项目', - enSuffix: false, - path: '/tiny-stage' - }, - { - en: 'i18n', - zh: '国际化', - enSuffix: false, - path: '/i18n' - }, - { - en: 'theme', - zh: '主题配置', - enSuffix: false, - path: '/theme' - }, - { - en: 'formValid', - zh: '表单校验配置', - enSuffix: false, - path: '/form-valid' - } - ] - }, - { - zh: '框架风格', - en: 'Frame Style', - type: 'groupCount', - children: [ - { - en: 'Color', - zh: '色彩', - enSuffix: true, - path: '/color' - }, - { - en: 'Container', - zh: '版型', - enSuffix: true, - path: '/container' - }, - { - en: 'Font', - zh: '字体', - enSuffix: true, - path: '/font' - }, - { - en: 'Icon', - zh: '图标', - enSuffix: true, - path: '/icon' - }, - { - en: 'Layout', - zh: '布局', - enSuffix: true, - path: '/layout' - } - ] - }, - { - zh: '导航组件', - en: 'Navigation Components', - type: 'groupCount', - children: [ - { - en: 'Anchor', - zh: '锚点', - enSuffix: true, - path: '/anchor' - }, - { - en: 'Guide', - zh: '引导', - enSuffix: true, - path: '/guide' - }, - { - en: 'Breadcrumb', - zh: '面包屑', - enSuffix: true, - path: '/breadcrumb' - }, - { - en: 'FallMenu', - zh: '瀑布菜单', - enSuffix: true, - path: '/fall-menu' - }, - { - en: 'Floatbar', - zh: '浮动块', - enSuffix: true, - path: '/floatbar' - }, - { - en: 'ToggleMenu', - zh: '收缩菜单', - enSuffix: true, - path: '/toggle-menu' - }, - { - en: 'LinkMenu', - zh: '收藏夹菜单', - enSuffix: true, - path: '/link-menu' - }, - { - en: 'Milestone', - zh: '里程碑', - enSuffix: true, - path: '/milestone' - }, - { - en: 'NavMenu', - zh: '导航菜单', - enSuffix: true, - path: '/nav-menu' - }, - { - en: 'Steps', - zh: '步骤条', - enSuffix: true, - path: '/steps' - }, - { - en: 'Tabs', - zh: '标签页', - enSuffix: true, - path: '/tabs' - }, - { - en: 'TimeLine', - zh: '时间线', - enSuffix: true, - path: '/time-line' - }, - { - en: 'TreeMenu', - zh: '树型菜单', - enSuffix: true, - path: '/tree-menu' - }, - { - en: 'Wizard', - zh: '流程图', - enSuffix: true, - path: '/wizard' - }, - { - en: 'Dropdown', - zh: '下拉菜单', - enSuffix: true, - path: '/dropdown' - }, - { - en: 'ActionMenu', - zh: '菜单按钮', - enSuffix: true, - path: '/action-menu' - } - ] - }, - { - zh: '容器组件', - en: 'Container Components', - type: 'groupCount', - children: [ - { - en: 'Carousel', - zh: '走马灯', - enSuffix: true, - path: '/carousel' - }, - { - en: 'DialogBox', - zh: '对话框', - enSuffix: true, - path: '/dialog-box' - }, - { - en: 'Drawer', - zh: '抽屉', - enSuffix: true, - path: '/drawer' - }, - { - en: 'Collapse', - zh: '折叠面板', - enSuffix: true, - path: '/collapse' - }, - { - en: 'Split', - zh: '面板分割', - enSuffix: true, - path: '/split' - } - ] - }, - { - zh: '表单组件', - en: 'Form Components', - type: 'groupCount', - children: [ - { - en: 'Autocomplete', - zh: '自动完成', - enSuffix: true, - path: '/autocomplete' - }, - { - en: 'Button', - zh: '按钮', - enSuffix: true, - path: '/button' - }, - { - en: 'ButtonGroup', - zh: '按钮组', - enSuffix: true, - path: '/button-group' - }, - { - en: 'Cascader', - zh: '级联选择器', - enSuffix: true, - path: '/cascader' - }, - { - en: 'CascaderPanel', - zh: '级联面板', - enSuffix: true, - path: '/cascader-panel' - }, - { - en: 'Checkbox', - zh: '复选框', - enSuffix: true, - path: '/checkbox' - }, - { - en: 'DatePicker', - zh: '日期选择器', - enSuffix: true, - path: '/date-picker' - }, - { - en: 'DropTimes', - zh: '下拉时间', - enSuffix: true, - path: '/drop-times' - }, - { - en: 'FileUpload', - zh: '文件上传', - enSuffix: true, - path: '/file-upload' - }, - { - en: 'Form', - zh: '表单', - enSuffix: true, - path: '/form' - }, - { - en: 'Input', - zh: '输入框', - enSuffix: true, - path: '/input' - }, - { - en: 'IpAddress', - zh: '输入框', - enSuffix: true, - path: '/ip-address' - }, - { - en: 'Link', - zh: '文字链接', - enSuffix: true, - path: '/link' - }, - { - en: 'Numeric', - zh: '计数器', - enSuffix: true, - path: '/numeric' - }, - { - en: 'PopEditor', - zh: '弹出编辑', - enSuffix: true, - path: '/pop-editor' - }, - { - en: 'PopUpload', - zh: '弹出框上传', - enSuffix: true, - path: '/pop-upload' - }, - { - en: 'Radio', - zh: '单选框', - enSuffix: true, - path: '/radio' - }, - { - en: 'Search', - zh: '搜索', - enSuffix: true, - path: '/search' - }, - { - en: 'Select', - zh: '选择器', - enSuffix: true, - path: '/select' - }, - { - en: 'Slider', - zh: '滑块', - enSuffix: true, - path: '/slider' - }, - { - en: 'Switch', - zh: '开关', - enSuffix: true, - path: '/switch' - }, - { - en: 'TimePicker', - zh: '时间选择器', - enSuffix: true, - path: '/time-picker' - }, - { - en: 'TimeSelect', - zh: '时间选择', - enSuffix: true, - path: '/time-select' - } - ] - }, - { - zh: '表格组件', - en: 'Table Components', - type: 'groupCount', - children: [ - { - en: 'Basic Usage', - zh: '基本用法', - enSuffix: false, - path: '/grid' - }, - { - en: 'Ordinal column', - zh: '序号列', - enSuffix: false, - path: '/grid-serial-column' - }, - { - en: 'Operation column', - zh: '操作列', - enSuffix: false, - path: '/grid-operation-column' - }, - { - en: 'Empty data', - zh: '空数据', - enSuffix: false, - path: '/grid-empty-data-tip' - }, - { - en: 'Data source', - zh: '数据源', - enSuffix: false, - path: '/grid-data-source' - }, - { - en: 'Big data', - zh: '大数据', - enSuffix: false, - path: '/grid-large-data' - }, - { - en: 'Pagination', - zh: '分页', - enSuffix: false, - path: '/grid-pager' - }, - { - en: 'Editing', - zh: '编辑', - enSuffix: false, - path: '/grid-edit' - }, - { - en: 'Toolbar', - zh: '工具栏', - enSuffix: false, - path: '/grid-toolbar' - }, - { - en: 'Loading', - zh: '加载中', - enSuffix: false, - path: '/grid-grid-loading-tip' - }, - { - en: 'Size', - zh: '尺寸', - enSuffix: false, - path: '/grid-grid-size' - }, - { - en: 'Width and height', - zh: '宽高', - enSuffix: false, - path: '/grid-width-height' - }, - { - en: 'Borders', - zh: '边框', - enSuffix: false, - path: '/grid-grid-border' - }, - { - en: 'Highlighting', - zh: '高亮', - enSuffix: false, - path: '/grid-highlight' - }, - { - en: 'Zebra Crossing Stripes', - zh: '斑马线条纹', - enSuffix: false, - path: '/grid-grid-stripe' - }, - { - en: 'OptimizedConfigurationItems', - zh: '优化配置项', - enSuffix: false, - path: '/grid-grid-optimization' - }, - { - en: 'Tip', - zh: '提示', - enSuffix: false, - path: '/grid-tip' - }, - { - en: 'Alignment', - zh: '对齐方式', - enSuffix: false, - path: '/grid-align' - }, - { - en: 'Table Header', - zh: '表头', - enSuffix: false, - path: '/grid-header' - }, - { - en: 'End of table', - zh: '表尾', - enSuffix: false, - path: '/grid-footer' - }, - { - en: 'Custom Styles', - zh: '自定义样式', - enSuffix: false, - path: '/grid-custom-style' - }, - { - en: 'Sorting', - zh: '排序', - enSuffix: false, - path: '/grid-sort' - }, - { - en: 'Filtering', - zh: '筛选', - enSuffix: false, - path: '/grid-filter' - }, - { - en: 'Freeze', - zh: '冻结', - enSuffix: false, - path: '/grid-fixed' - }, - { - en: 'Merges', - zh: '合并', - enSuffix: false, - path: '/grid-span' - }, - { - en: 'Grouping', - zh: '分组', - enSuffix: false, - path: '/grid-row-grouping' - }, - { - en: 'Statistic', - zh: '统计', - enSuffix: false, - path: '/grid-summary' - }, - { - en: 'Drag and drop', - zh: '拖拽', - enSuffix: false, - path: '/grid-drag' - }, - { - en: 'Data Cascading', - zh: '数据级联', - enSuffix: false, - path: '/grid-cascade' - }, - { - en: 'Right-click menu', - zh: '右键菜单', - enSuffix: false, - path: '/grid-context-menu' - }, - { - en: 'Editors', - zh: '编辑器', - enSuffix: false, - path: '/grid-editor' - }, - { - en: 'Renderer', - zh: '渲染器', - enSuffix: false, - path: '/grid-renderer' - }, - { - en: 'Check the table', - zh: '表格校验', - enSuffix: false, - path: '/grid-validation' - }, - { - en: 'Events', - zh: '事件', - enSuffix: false, - path: '/grid-event' - }, - { - en: 'Slots', - zh: '插槽', - enSuffix: false, - path: '/grid-slot' - }, - { - en: 'Personalized', - zh: '个性化', - enSuffix: false, - path: '/grid-customized' - }, - { - en: 'Tree table', - zh: '树表', - enSuffix: false, - path: '/grid-tree-grid' - }, - { - en: 'Nested Tables', - zh: '嵌套表格', - enSuffix: false, - path: '/grid-nested-grid' - }, - { - en: 'Import and export', - zh: '导入导出', - enSuffix: false, - path: '/grid-import-export' - }, - { - en: 'Mouse and Keyboard Configuration', - zh: '鼠标和键盘配置', - enSuffix: false, - path: '/grid-keyboard' - }, - { - en: 'Table row and column reversal', - zh: '表格行列反转', - enSuffix: false, - path: '/grid-reverse-column-row' - }, - { - en: 'Dynamically Generate Columns', - zh: '动态生成列', - enSuffix: false, - path: '/grid-dynamically-columns' - }, - { - en: 'Frequently Asked Questions', - zh: '常见问题', - enSuffix: false, - path: '/grid-faq' - } - ] - }, - { - zh: '图表组件', - en: 'Chart Components', - type: 'groupCount', - children: [ - { - en: 'Basic Usage', - zh: '基本用法', - enSuffix: false, - path: '/chart' - }, - { - en: 'Event Listening', - zh: '事件监听', - enSuffix: false, - path: '/chart-events' - }, - { - en: 'Attribute Configuration Example', - zh: '属性配置示例', - enSuffix: false, - path: '/chart-attributes-demo' - }, - { - en: 'Examples of FAQs', - zh: '常见问题示例', - enSuffix: false, - path: '/chart-question' - }, - { - en: 'Line Chart', - zh: '折线图', - enSuffix: false, - path: '/chart-line' - }, - { - en: 'Bar Chart', - zh: '柱状图', - enSuffix: false, - path: '/chart-histogram' - }, - { - en: 'Rank chart', - zh: '条形图', - enSuffix: false, - path: '/chart-bar' - }, - { - en: 'Pie Chart', - zh: '饼图', - enSuffix: false, - path: '/chart-pie' - }, - { - en: 'Ring diagram', - zh: '环图', - enSuffix: false, - path: '/chart-ring' - }, - { - en: 'Waterfall Map', - zh: '瀑布图', - enSuffix: false, - path: '/chart-waterfall' - }, - { - en: 'Funnel diagram', - zh: '漏斗图', - enSuffix: false, - path: '/chart-funnel' - }, - { - en: 'Radar chart', - zh: '雷达图', - enSuffix: false, - path: '/chart-radar' - }, - { - en: 'Map', - zh: '地图', - enSuffix: false, - path: '/chart-map' - }, - { - en: 'Sankitu', - zh: '桑基图', - enSuffix: false, - path: '/chart-sankey' - }, - { - en: 'Heat map', - zh: '热力图', - enSuffix: false, - path: '/chart-heatmap' - }, - { - en: 'Scatter chart', - zh: '散点图', - enSuffix: false, - path: '/chart-scatter' - }, - { - en: 'K-line chart', - zh: 'K线图', - enSuffix: false, - path: '/chart-candle' - }, - { - en: 'Dashboard', - zh: '仪表盘', - enSuffix: false, - path: '/chart-gauge' - }, - { - en: 'Treemap', - zh: '树图', - enSuffix: false, - path: '/chart-tree' - }, - { - en: 'Water balloon diagram', - zh: '水球图', - enSuffix: false, - path: '/chart-liquidfill' - }, - { - en: 'Word cloud map', - zh: '词云图', - enSuffix: false, - path: '/chart-wordcloud' - }, - { - en: 'Rising Sun Map', - zh: '旭日图', - enSuffix: false, - path: '/chart-sunburst' - }, - { - en: 'Topology Diagram', - zh: '拓扑图', - enSuffix: false, - path: '/chart-graph' - }, - { - en: 'Baidu Map', - zh: '百度地图', - enSuffix: false, - path: '/chart-baidu-map' - }, - { - en: 'Gaud Map', - zh: '高德地图', - enSuffix: false, - path: '/chart-autonavi-map' - }, - { - en: 'Box diagram', - zh: '箱形图', - enSuffix: false, - path: '/chart-boxplot' - } - ] - }, - { - zh: '数据组件', - en: 'Data Components', - type: 'groupCount', - children: [ - { - en: 'Pager', - zh: '分页', - enSuffix: true, - path: '/pager' - }, - { - en: 'Progress', - zh: '进度条', - enSuffix: true, - path: '/progress' - }, - { - en: 'Tree', - zh: '树形控件', - enSuffix: true, - path: '/tree' - }, - { - en: 'Transfer', - zh: '穿梭框', - enSuffix: true, - path: '/transfer' - } - ] - }, - { - zh: '提示组件', - en: 'Tips Components', - type: 'groupCount', - children: [ - { - en: 'Alert', - zh: '警告', - enSuffix: true, - path: '/alert' - }, - { - en: 'Badge', - zh: '标记', - enSuffix: true, - path: '/badge' - }, - { - en: 'Loading', - zh: '加载', - enSuffix: true, - path: '/loading' - }, - { - en: 'Tooltip', - zh: '文字提示', - enSuffix: true, - path: '/tooltip' - }, - { - en: 'Popover', - zh: '弹出框', - enSuffix: true, - path: '/popover' - }, - { - en: 'Popconfirm', - zh: '气泡确认框组件', - enSuffix: true, - path: '/popconfirm' - }, - { - en: 'Modal', - zh: '模态框', - enSuffix: true, - path: '/modal' - }, - { - en: 'Notify', - zh: '通知', - enSuffix: true, - path: '/notify' - } - ] - }, - { - zh: '业务组件', - en: 'Business Components', - type: 'groupCount', - children: [ - { - en: 'Amount', - zh: '金额', - enSuffix: true, - path: '/amount' - }, - { - en: 'Area', - zh: '片区', - enSuffix: true, - path: '/area' - }, - { - en: 'Company', - zh: '公司', - enSuffix: true, - path: '/company' - }, - { - en: 'Country', - zh: '国家/地区', - enSuffix: true, - path: '/country' - }, - { - en: 'Currency', - zh: '币种', - enSuffix: true, - path: '/currency' - }, - { - en: 'Dept', - zh: '部门', - enSuffix: true, - path: '/dept' - }, - { - en: 'DropRoles', - zh: '下拉角色', - enSuffix: true, - path: '/drop-roles' - }, - { - en: 'Espace', - zh: '消息弹框', - enSuffix: true, - path: '/espace' - }, - { - en: 'Hrapprover', - zh: '权签人', - enSuffix: true, - path: '/hrapprover' - }, - { - en: 'Locales', - zh: '语言选择', - enSuffix: true, - path: '/locales' - }, - { - en: 'LogonUser', - zh: '登录用户', - enSuffix: true, - path: '/logon-user' - }, - { - en: 'Logout', - zh: '注销', - enSuffix: true, - path: '/logout' - }, - { - en: 'Roles', - zh: '角色切换', - enSuffix: true, - path: '/roles' - }, - { - en: 'User', - zh: '用户', - enSuffix: true, - path: '/user' - }, - { - en: 'UserAccount', - zh: '用户账号', - enSuffix: true, - path: '/user-account' - }, - { - en: 'UserLink', - zh: '用户信息链接', - enSuffix: true, - path: '/user-link' - } - ] - }, - { - zh: '其他组件', - en: 'Other Components', - type: 'groupCount', - children: [ - { - en: 'BulletinBoard', - zh: '公告牌', - enSuffix: true, - path: '/bulletin-board' - }, - { - en: 'Calendar', - zh: '日历', - enSuffix: true, - path: '/calendar' - }, - { - en: 'CreditCardForm', - zh: '信用卡表单', - enSuffix: true, - path: '/credit-card-form' - }, - { - en: 'Crop', - zh: '图片裁剪', - enSuffix: true, - path: '/crop' - }, - { - en: 'DetailPage', - zh: '表头详情栏', - enSuffix: true, - path: '/detail-page' - }, - { - en: 'Image', - zh: '图片预览', - enSuffix: true, - path: '/image' - }, - { - en: 'Rate', - zh: '评分', - enSuffix: true, - path: '/rate' - }, - { - en: 'ScrollText', - zh: '文字滚动', - enSuffix: true, - path: '/scroll-text' - }, - { - en: 'SlideBar', - zh: '滚动块', - enSuffix: true, - path: '/slide-bar' - }, - { - en: 'Tag', - zh: '标签', - enSuffix: true, - path: '/tag' - }, - { - en: 'TextPopup', - zh: '输入框', - enSuffix: true, - path: '/textpopup' - }, - { - en: 'UserContact', - zh: '联系人', - enSuffix: true, - path: '/user-contact' - }, - { - en: 'UserHead', - zh: '用户头像', - enSuffix: true, - path: '/user-head' - }, - { - en: 'Fullscreen', - zh: '全屏显示', - enSuffix: true, - path: '/fullscreen' - }, - { - en: 'ConfigProvider', - zh: '全局设置', - enSuffix: true, - path: '/config-provider' - } - ] - } -] -export default routerArr diff --git a/examples/docs/types/shims-app.d.ts b/examples/docs/types/shims-app.d.ts index e7359d204..2843008e3 100644 --- a/examples/docs/types/shims-app.d.ts +++ b/examples/docs/types/shims-app.d.ts @@ -1,4 +1,4 @@ declare module '*?raw' { const content: string export default content -} \ No newline at end of file +} diff --git a/examples/docs/types/shims-vue.d.ts b/examples/docs/types/shims-vue.d.ts index 1e1696e01..32a1b5cd4 100644 --- a/examples/docs/types/shims-vue.d.ts +++ b/examples/docs/types/shims-vue.d.ts @@ -2,4 +2,4 @@ declare module '*.vue' { import { defineComponent } from 'vue' const component: ReturnType export default component -} \ No newline at end of file +} diff --git a/examples/docs/vite-plugins/vite-plugin-uno-preset.ts b/examples/docs/vite-plugins/vite-plugin-uno-preset.ts index 86ff795c2..152094a6e 100644 --- a/examples/docs/vite-plugins/vite-plugin-uno-preset.ts +++ b/examples/docs/vite-plugins/vite-plugin-uno-preset.ts @@ -184,7 +184,10 @@ const utilRules = [ const _s5 = { c: 'color', bg: 'background-color' } const colorRules = [ // 颜色 #不建议使用 c-black bg-primary c#123456 c-theme-color - [/^(c|bg)-rand(\d+)$/, ([, attr, seed]) => ({ [`${_s5[attr]}`]: `#${Math.floor(Math.random() * 255 * 255 * 255).toString(16)}` })], + [ + /^(c|bg)-rand(\d+)$/, + ([, attr, seed]) => ({ [`${_s5[attr]}`]: `#${Math.floor(Math.random() * 255 * 255 * 255).toString(16)}` }) + ], [/^(c|bg)-([\w|-]+)$/, ([, attr, color]) => ({ [`${_s5[attr]}`]: `var(--${color})` })], [/^(c|bg)#(\w+)$/, ([, attr, color]) => ({ [`${_s5[attr]}`]: `#${color}` })] ] diff --git a/examples/sites/.gitignore b/examples/sites/.gitignore new file mode 100644 index 000000000..b92afff85 --- /dev/null +++ b/examples/sites/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local +pnpm-lock.yaml +# Editor directories and files +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +/package-lock.json +/public/@demos diff --git a/examples/sites/.prettierignore b/examples/sites/.prettierignore new file mode 100644 index 000000000..4dd8f436d --- /dev/null +++ b/examples/sites/.prettierignore @@ -0,0 +1,11 @@ +# package.json is formatted by package managers, so we ignore it here +package.json +lib +build +demo/*.js +demo/*.css +module +.* +docs +*.log +node_modules \ No newline at end of file diff --git a/examples/sites/.prettierrc b/examples/sites/.prettierrc new file mode 100644 index 000000000..a607ca7c5 --- /dev/null +++ b/examples/sites/.prettierrc @@ -0,0 +1,22 @@ +{ + "semi": false, + "singleQuote": true, + "printWidth": 120, + "trailingComma": "none", + "quoteProps": "preserve", + "endOfLine": "auto", + "bracketSpacing": true, + "jsxBracketSameLine": true, + "jsxSingleQuote": false, + "useTabs": false, + "tabWidth": 2, + "proseWrap": "preserve", + "overrides": [ + { + "files": ".prettierrc", + "options": { + "parser": "json" + } + } + ] +} diff --git a/examples/sites/.stylelintignore b/examples/sites/.stylelintignore new file mode 100644 index 000000000..b500cb659 --- /dev/null +++ b/examples/sites/.stylelintignore @@ -0,0 +1,6 @@ +*.js +*.ts +*.png +*.eot +*.ttf +*.woff \ No newline at end of file diff --git a/examples/sites/.stylelintrc.js b/examples/sites/.stylelintrc.js new file mode 100644 index 000000000..d3c6e6a89 --- /dev/null +++ b/examples/sites/.stylelintrc.js @@ -0,0 +1,11 @@ +module.exports = { + extends: 'stylelint-config-standard', //stylelint-config-airbnb + rules: { + 'string-quotes': 'single', + 'property-no-unknown': true, + 'selector-pseudo-class-no-unknown': true, + 'at-rule-empty-line-before': 'always', + 'block-no-empty': true, + 'indentation': 4 // http://cui.ulanqab.huawei.com/#/articalDetail?id=b76da810d8ed8 + } +} diff --git a/examples/sites/README.md b/examples/sites/README.md new file mode 100644 index 000000000..e92d5ae04 --- /dev/null +++ b/examples/sites/README.md @@ -0,0 +1,56 @@ +## @opentiny/tiny-toolkit-docs 套件说明 2023.3.11 + +### 1.项目技术架构 +1. vite + vue3 + naive UI +2. 特色: + - 支持 md 格式文档! + - 国际化切换、主题切换、配置/非配置化文档切换! + - 支持组件的 demo 导航,API 属性向 demo 跳转! + - 支持单列 demo 及 2 列 demo 展示! + +### 2. 启动命令说明: +`tiny start` -----> 启动新官网 + +### 4.项目部署 + +tiny build之后,套件前台工程部署完成后 + +在server仓库中配置相应路由 仓库: https://codehub-g.huawei.com/Tiny/tiny-club/tinyui-design-server/files?ref=master + +再部署 tinyui-design-server 流水线: https://fuxi.huawei.com/mine/components/10089577/pipeline/list/259496 + +测试环境验证: https://tinyuidesign-alpha.cloudbu.huawei.com/ + +内网环境验证: https://tinyuidesign.cloudbu.huawei.com/ + + + +### 5. 更换环境时 + +1、检查 env 中的context变量 +2、检查 viteconfig 中的base路径 + + +### Angular官网 自适应方案 2023.1.4 + +#### 1.屏幕宽度为`1920px`以下时 + +a. 总览组件单行显示4个 + +#### 2.屏幕宽度为`1280px`以下时 + +a. 组件示例和文档页面,隐藏快速导航 + +b. 总览组件单行显示2个 + +#### 3.屏幕宽度为`1024px`以下时 + +a. 页面整体隐藏左侧菜单 + +#### 4.屏幕宽度为`768px`以下时 + +a. 组件示例页面,代码示例单行显示 + +#### 图片说明: + +![layout](public/images/layout.png) \ No newline at end of file diff --git a/examples/sites/demos/app/action-menu/basic-usage-composition-api.vue b/examples/sites/demos/app/action-menu/basic-usage-composition-api.vue new file mode 100644 index 000000000..6fa5b2432 --- /dev/null +++ b/examples/sites/demos/app/action-menu/basic-usage-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/basic-usage.spec.ts b/examples/sites/demos/app/action-menu/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/basic-usage.spec.ts rename to examples/sites/demos/app/action-menu/basic-usage.spec.ts diff --git a/examples/sites/demos/app/action-menu/basic-usage.vue b/examples/sites/demos/app/action-menu/basic-usage.vue new file mode 100644 index 000000000..4a00382ba --- /dev/null +++ b/examples/sites/demos/app/action-menu/basic-usage.vue @@ -0,0 +1,35 @@ + + + diff --git a/examples/sites/demos/app/action-menu/disabled-composition-api.vue b/examples/sites/demos/app/action-menu/disabled-composition-api.vue new file mode 100644 index 000000000..f80cc6ca5 --- /dev/null +++ b/examples/sites/demos/app/action-menu/disabled-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/disabled.spec.ts b/examples/sites/demos/app/action-menu/disabled.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/disabled.spec.ts rename to examples/sites/demos/app/action-menu/disabled.spec.ts diff --git a/examples/docs/resources/pc/demo/action-menu/disabled.vue b/examples/sites/demos/app/action-menu/disabled.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/disabled.vue rename to examples/sites/demos/app/action-menu/disabled.vue diff --git a/examples/sites/demos/app/action-menu/item-click-composition-api.vue b/examples/sites/demos/app/action-menu/item-click-composition-api.vue new file mode 100644 index 000000000..efd9650dc --- /dev/null +++ b/examples/sites/demos/app/action-menu/item-click-composition-api.vue @@ -0,0 +1,35 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/item-click.spec.ts b/examples/sites/demos/app/action-menu/item-click.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/item-click.spec.ts rename to examples/sites/demos/app/action-menu/item-click.spec.ts diff --git a/examples/docs/resources/pc/demo/action-menu/item-click.vue b/examples/sites/demos/app/action-menu/item-click.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/item-click.vue rename to examples/sites/demos/app/action-menu/item-click.vue diff --git a/examples/sites/demos/app/action-menu/max-show-num-composition-api.vue b/examples/sites/demos/app/action-menu/max-show-num-composition-api.vue new file mode 100644 index 000000000..7f1b0f797 --- /dev/null +++ b/examples/sites/demos/app/action-menu/max-show-num-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/max-show-num.spec.ts b/examples/sites/demos/app/action-menu/max-show-num.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/max-show-num.spec.ts rename to examples/sites/demos/app/action-menu/max-show-num.spec.ts diff --git a/examples/docs/resources/pc/demo/action-menu/max-show-num.vue b/examples/sites/demos/app/action-menu/max-show-num.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/max-show-num.vue rename to examples/sites/demos/app/action-menu/max-show-num.vue diff --git a/examples/sites/demos/app/action-menu/more-click-composition-api.vue b/examples/sites/demos/app/action-menu/more-click-composition-api.vue new file mode 100644 index 000000000..6a6c96d6b --- /dev/null +++ b/examples/sites/demos/app/action-menu/more-click-composition-api.vue @@ -0,0 +1,35 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/more-click.spec.ts b/examples/sites/demos/app/action-menu/more-click.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/more-click.spec.ts rename to examples/sites/demos/app/action-menu/more-click.spec.ts diff --git a/examples/docs/resources/pc/demo/action-menu/more-click.vue b/examples/sites/demos/app/action-menu/more-click.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/more-click.vue rename to examples/sites/demos/app/action-menu/more-click.vue diff --git a/examples/sites/demos/app/action-menu/more-text-composition-api.vue b/examples/sites/demos/app/action-menu/more-text-composition-api.vue new file mode 100644 index 000000000..efe8a4351 --- /dev/null +++ b/examples/sites/demos/app/action-menu/more-text-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/more-text.spec.ts b/examples/sites/demos/app/action-menu/more-text.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/more-text.spec.ts rename to examples/sites/demos/app/action-menu/more-text.spec.ts diff --git a/examples/docs/resources/pc/demo/action-menu/more-text.vue b/examples/sites/demos/app/action-menu/more-text.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/more-text.vue rename to examples/sites/demos/app/action-menu/more-text.vue diff --git a/examples/sites/demos/app/action-menu/popper-class-composition-api.vue b/examples/sites/demos/app/action-menu/popper-class-composition-api.vue new file mode 100644 index 000000000..794415378 --- /dev/null +++ b/examples/sites/demos/app/action-menu/popper-class-composition-api.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/action-menu/popper-class.spec.ts b/examples/sites/demos/app/action-menu/popper-class.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/popper-class.spec.ts rename to examples/sites/demos/app/action-menu/popper-class.spec.ts diff --git a/examples/docs/resources/pc/demo/action-menu/popper-class.vue b/examples/sites/demos/app/action-menu/popper-class.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/popper-class.vue rename to examples/sites/demos/app/action-menu/popper-class.vue diff --git a/examples/sites/demos/app/action-menu/slot-item-composition-api.vue b/examples/sites/demos/app/action-menu/slot-item-composition-api.vue new file mode 100644 index 000000000..befb31f5a --- /dev/null +++ b/examples/sites/demos/app/action-menu/slot-item-composition-api.vue @@ -0,0 +1,35 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/slot-item.spec.ts b/examples/sites/demos/app/action-menu/slot-item.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/slot-item.spec.ts rename to examples/sites/demos/app/action-menu/slot-item.spec.ts diff --git a/examples/docs/resources/pc/demo/action-menu/slot-item.vue b/examples/sites/demos/app/action-menu/slot-item.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/slot-item.vue rename to examples/sites/demos/app/action-menu/slot-item.vue diff --git a/examples/sites/demos/app/action-menu/spacing-composition-api.vue b/examples/sites/demos/app/action-menu/spacing-composition-api.vue new file mode 100644 index 000000000..9df37fee8 --- /dev/null +++ b/examples/sites/demos/app/action-menu/spacing-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/spacing.spec.ts b/examples/sites/demos/app/action-menu/spacing.spec.ts similarity index 89% rename from examples/docs/resources/pc/demo/action-menu/spacing.spec.ts rename to examples/sites/demos/app/action-menu/spacing.spec.ts index 0f2114716..55318d0fd 100644 --- a/examples/docs/resources/pc/demo/action-menu/spacing.spec.ts +++ b/examples/sites/demos/app/action-menu/spacing.spec.ts @@ -6,7 +6,7 @@ test('菜单项间距', async ({ page }) => { const preview = page.locator('#preview') const actionMenu = preview.locator('.tiny-action-menu') - const getDivider = parent => parent.locator('.tiny-action-menu__item-line').first() + const getDivider = (parent) => parent.locator('.tiny-action-menu__item-line').first() const tenPXSpacing = actionMenu.first() const twentyPXSpacing = actionMenu.nth(1) diff --git a/examples/docs/resources/pc/demo/action-menu/spacing.vue b/examples/sites/demos/app/action-menu/spacing.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/spacing.vue rename to examples/sites/demos/app/action-menu/spacing.vue diff --git a/examples/sites/demos/app/action-menu/text-field-composition-api.vue b/examples/sites/demos/app/action-menu/text-field-composition-api.vue new file mode 100644 index 000000000..2ffc05f63 --- /dev/null +++ b/examples/sites/demos/app/action-menu/text-field-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/text-field.spec.ts b/examples/sites/demos/app/action-menu/text-field.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/text-field.spec.ts rename to examples/sites/demos/app/action-menu/text-field.spec.ts diff --git a/examples/docs/resources/pc/demo/action-menu/text-field.vue b/examples/sites/demos/app/action-menu/text-field.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/text-field.vue rename to examples/sites/demos/app/action-menu/text-field.vue diff --git a/examples/sites/demos/app/action-menu/visible-change-composition-api.vue b/examples/sites/demos/app/action-menu/visible-change-composition-api.vue new file mode 100644 index 000000000..4898e8db4 --- /dev/null +++ b/examples/sites/demos/app/action-menu/visible-change-composition-api.vue @@ -0,0 +1,35 @@ + + + diff --git a/examples/docs/resources/pc/demo/action-menu/visible-change.spec.ts b/examples/sites/demos/app/action-menu/visible-change.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/visible-change.spec.ts rename to examples/sites/demos/app/action-menu/visible-change.spec.ts diff --git a/examples/docs/resources/pc/demo/action-menu/visible-change.vue b/examples/sites/demos/app/action-menu/visible-change.vue similarity index 100% rename from examples/docs/resources/pc/demo/action-menu/visible-change.vue rename to examples/sites/demos/app/action-menu/visible-change.vue diff --git a/examples/sites/demos/app/action-menu/webdoc/action-menu.cn.md b/examples/sites/demos/app/action-menu/webdoc/action-menu.cn.md new file mode 100644 index 000000000..4d6ee3d6b --- /dev/null +++ b/examples/sites/demos/app/action-menu/webdoc/action-menu.cn.md @@ -0,0 +1,7 @@ +--- +title: ActionMenu 菜单按钮 +--- + +# ActionMenu 菜单按钮 + +
ActionMenu 菜单按钮
diff --git a/examples/sites/demos/app/action-menu/webdoc/action-menu.en.md b/examples/sites/demos/app/action-menu/webdoc/action-menu.en.md new file mode 100644 index 000000000..1dcfe3bf5 --- /dev/null +++ b/examples/sites/demos/app/action-menu/webdoc/action-menu.en.md @@ -0,0 +1,7 @@ +--- +title: ActionMenu +--- + +# ActionMenu + +
ActionMenu
diff --git a/examples/sites/demos/app/action-menu/webdoc/action-menu.js b/examples/sites/demos/app/action-menu/webdoc/action-menu.js new file mode 100644 index 000000000..87f832e75 --- /dev/null +++ b/examples/sites/demos/app/action-menu/webdoc/action-menu.js @@ -0,0 +1,242 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': 'ActionMenu 组件的基本用法。', 'en-US': 'Basic usage of the ActionMenu component.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'disabled', + 'name': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'desc': { + 'zh-CN': '通过 disabled 字段配置当前下拉选项是否为禁用状态', + 'en-US': 'Use the disabled field to configure whether the current drop-down list box is disabled.' + }, + 'codeFiles': ['disabled.vue'] + }, + { + 'demoId': 'text-field', + 'name': { 'zh-CN': '显示文本', 'en-US': 'Display Text' }, + 'desc': { + 'zh-CN': '通过属性 text-field 配置要显示文本的键值,默认值为 label。', + 'en-US': + 'Use the text-field attribute to configure the key value of the text to be displayed. The default value is label.' + }, + 'codeFiles': ['text-field.vue'] + }, + { + 'demoId': 'more-text', + 'name': { 'zh-CN': '下拉按钮显示文本', 'en-US': 'The text of the drop-down button is displayed.' }, + 'desc': { + 'zh-CN': '通过属性 more-text 配置下拉菜单显示文本,默认值为 更多more-text to configure the text to be displayed in the drop-down list box. The default value is Morespacing 配置菜单按钮之间的间距,默认值为 5px。', + 'en-US': + 'The spacing attribute is used to configure the spacing between menu buttons. The default value is 5px.' + }, + 'codeFiles': ['spacing.vue'] + }, + { + 'demoId': 'popper-class', + 'name': { 'zh-CN': '自定义下拉面板样式', 'en-US': 'Customize drop-down panel style' }, + 'desc': { + 'zh-CN': '通过属性 popper-class 设置下拉面板的类名,自定义样式', + 'en-US': 'Set the class name and style of the drop-down panel through the popper-class attribute.' + }, + 'codeFiles': ['popper-class.vue'] + }, + { + 'demoId': 'max-show-num', + 'name': { 'zh-CN': '显示个数', 'en-US': 'Displayed Number' }, + 'desc': { + 'zh-CN': '通过属性 max-show-num 配置显示菜单按钮的最大个数,默认值为 2 ', + 'en-US': + 'The max-show-num attribute specifies the maximum number of displayed menu buttons. The default value is 2' + }, + 'codeFiles': ['max-show-num.vue'] + }, + { + 'demoId': 'item-click', + 'name': { 'zh-CN': '菜单项点击事件', 'en-US': 'Menu Item Click Event' }, + 'desc': { + 'zh-CN': '当选中菜单项时触发 item-click 事件,传递出去的参数为当前选中项的数据', + 'en-US': + 'When a menu item is selected, the item-click event is triggered. The transferred parameter is the data of the selected item.' + }, + 'codeFiles': ['item-click.vue'] + }, + { + 'demoId': 'more-click', + 'name': { 'zh-CN': '更多按钮点击事件', 'en-US': 'More button click event' }, + 'desc': { + 'zh-CN': '当点击下拉菜单按钮时触发 more-click 事件', + 'en-US': 'The more-click event is triggered when a drop-down list button is clicked.' + }, + 'codeFiles': ['more-click.vue'] + }, + { + 'demoId': 'slot-item', + 'name': { 'zh-CN': '菜单项插槽', 'en-US': 'Menu Slot' }, + 'desc': { + 'zh-CN': '通过 #item 配置下拉面板中选项的模板', + 'en-US': 'Use #item to configure the template for the options in the drop-down list box.' + }, + 'codeFiles': ['slot-item.vue'] + }, + { + 'demoId': 'visible-change', + 'name': { 'zh-CN': '下拉面板显示事件', 'en-US': 'Drop-down menu visible change' }, + 'desc': { + 'zh-CN': '当下拉面板出现或者隐藏时触发 visible-change 事件', + 'en-US': + 'When the drop-down menu change to be visible or hidden, the visible-change event is triggered.' + }, + 'codeFiles': ['visible-change.vue'] + } + ], + apis: [ + { + 'name': 'action-menu', + 'type': 'component', + 'properties': [ + { + 'name': 'options', + 'type': 'Array', + 'defaultValue': '[]', + 'desc': { + 'zh-CN': + "可以配置菜单按钮数据,默认值为 [],数组中的每个元素为对象item,每个 item 一般可包含的字段有 (label,children,disabled,divided),例如:{ label: '登录',children:[],divided: true,disabled :true}。", + 'en-US': + "You can configure menu button data. The default value is []. Each element in the array is an object item. Each item can contain the following fields: label, children, disabled, and divided, for example, {label:'Login', children:[],divided: true,disabled :true} ." + }, + 'demoId': 'basic-usage' + }, + { + 'name': 'label', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '菜单项的显示值', 'en-US': 'Display value of a menu item' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'children', + 'type': 'Array', + 'defaultValue': '[]', + 'desc': { 'zh-CN': '菜单项的子集', 'en-US': 'Subset of menu items' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'divided', + 'type': 'Boolean', + 'defaultValue': 'false', + 'desc': { 'zh-CN': '显示分割线。默认值:false', 'en-US': 'Displays the split line. Default value: false' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': 'false', + 'desc': { + 'zh-CN': '是否禁用。默认:false', + 'en-US': 'Whether to disable the function. Default value: false' + }, + 'demoId': 'disabled' + }, + { + 'name': 'text-field', + 'type': 'String', + 'defaultValue': 'label', + 'desc': { + 'zh-CN': '设置菜单按钮显示文本的键值,默认值为 label', + 'en-US': 'Set the key value of the displayed text of a menu button. The default value is label.' + }, + 'demoId': 'text-field' + }, + { + 'name': 'more-text', + 'type': 'String', + 'defaultValue': '更多', + 'desc': { + 'zh-CN': '配置下拉按钮显示文本,默认值为“更多”', + 'en-US': 'Configure the display text of the drop-down button. The default value is More.' + }, + 'demoId': 'more-text' + }, + { + 'name': 'spacing', + 'type': '[String,Number]', + 'defaultValue': '5px', + 'desc': { + 'zh-CN': '配置菜单按钮之间的间距,默认值为 5px', + 'en-US': 'Set the spacing between menu buttons. The default value is 5px.' + }, + 'demoId': 'spacing' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置下拉面板的类名,自定义样式', + 'en-US': 'Set the class name of the drop-down list box and customize the style.' + }, + 'demoId': 'popper-class' + }, + { + 'name': 'max-show-num', + 'type': 'Number', + 'defaultValue': '2', + 'desc': { + 'zh-CN': ' 配置显示菜单按钮的最大个数,默认值为2', + 'en-US': 'Maximum number of menu buttons to be displayed. The default value is 2.' + }, + 'demoId': 'max-show-num' + } + ], + 'events': [ + { + 'name': 'item-click', + 'type': 'Function', + 'defaultValue': 'Function(data:Object)', + 'desc': { + 'zh-CN': + '当选中菜单项时触发。返回数据data为Object类型,对象包含字段 itemData 和 vm 字段,itemData 为当前选中项的数据(仅配置式时生效),vm 为当前选中项的实例', + 'en-US': + 'The itemClick event is triggered when a menu item is selected. The transferred parameter is the data of the selected item.' + }, + 'demoId': 'item-click' + }, + { + 'name': 'more-click', + 'type': 'Function', + 'defaultValue': 'Function', + 'desc': { + 'zh-CN': '当点击下拉按钮时触发。', + 'en-US': 'The moreClick event is triggered when a drop-down list button is clicked.' + }, + 'demoId': 'more-click' + } + ], + 'slots': [ + { + 'name': 'item', + 'type': '插槽', + 'defaultValue': '', + 'desc': { 'zh-CN': '下拉面板中选项插槽', 'en-US': 'Slots in the drop-down list box' }, + 'demoId': 'slot-item' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/alert/base-composition-api.vue b/examples/sites/demos/app/alert/base-composition-api.vue new file mode 100644 index 000000000..c592fae60 --- /dev/null +++ b/examples/sites/demos/app/alert/base-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/base.spec.ts b/examples/sites/demos/app/alert/base.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/base.spec.ts rename to examples/sites/demos/app/alert/base.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/base.vue b/examples/sites/demos/app/alert/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/base.vue rename to examples/sites/demos/app/alert/base.vue diff --git a/examples/sites/demos/app/alert/center-composition-api.vue b/examples/sites/demos/app/alert/center-composition-api.vue new file mode 100644 index 000000000..ae41e8d89 --- /dev/null +++ b/examples/sites/demos/app/alert/center-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/center.spec.ts b/examples/sites/demos/app/alert/center.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/center.spec.ts rename to examples/sites/demos/app/alert/center.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/center.vue b/examples/sites/demos/app/alert/center.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/center.vue rename to examples/sites/demos/app/alert/center.vue diff --git a/examples/sites/demos/app/alert/closable-composition-api.vue b/examples/sites/demos/app/alert/closable-composition-api.vue new file mode 100644 index 000000000..4da34cae5 --- /dev/null +++ b/examples/sites/demos/app/alert/closable-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/closable.spec.ts b/examples/sites/demos/app/alert/closable.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/closable.spec.ts rename to examples/sites/demos/app/alert/closable.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/closable.vue b/examples/sites/demos/app/alert/closable.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/closable.vue rename to examples/sites/demos/app/alert/closable.vue diff --git a/examples/sites/demos/app/alert/close-composition-api.vue b/examples/sites/demos/app/alert/close-composition-api.vue new file mode 100644 index 000000000..39eeedbd4 --- /dev/null +++ b/examples/sites/demos/app/alert/close-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/sites/demos/app/alert/close-text-composition-api.vue b/examples/sites/demos/app/alert/close-text-composition-api.vue new file mode 100644 index 000000000..4bc8b68e0 --- /dev/null +++ b/examples/sites/demos/app/alert/close-text-composition-api.vue @@ -0,0 +1,15 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/close-text.spec.ts b/examples/sites/demos/app/alert/close-text.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/close-text.spec.ts rename to examples/sites/demos/app/alert/close-text.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/close-text.vue b/examples/sites/demos/app/alert/close-text.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/close-text.vue rename to examples/sites/demos/app/alert/close-text.vue diff --git a/examples/docs/resources/pc/demo/alert/close.spec.ts b/examples/sites/demos/app/alert/close.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/close.spec.ts rename to examples/sites/demos/app/alert/close.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/close.vue b/examples/sites/demos/app/alert/close.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/close.vue rename to examples/sites/demos/app/alert/close.vue diff --git a/examples/sites/demos/app/alert/custom-close-composition-api.vue b/examples/sites/demos/app/alert/custom-close-composition-api.vue new file mode 100644 index 000000000..f6a95ba6e --- /dev/null +++ b/examples/sites/demos/app/alert/custom-close-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/sites/demos/app/alert/custom-close.spec.ts b/examples/sites/demos/app/alert/custom-close.spec.ts new file mode 100644 index 000000000..f51806ca1 --- /dev/null +++ b/examples/sites/demos/app/alert/custom-close.spec.ts @@ -0,0 +1,27 @@ +import { test, expect } from '@playwright/test' + +test('自定义关闭图标,控制警告的再次显示或隐藏', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/alert/custom-close') + + const alertSuccess = page.locator('.tiny-alert--success') + const defaultClose = alertSuccess.locator('.tiny-alert__close') + const customClose = alertSuccess.locator('.icon') + const btn = page.getByRole('button', { name: '显示或隐藏警告' }) + + // 自定义关闭图标 + await expect(defaultClose).not.toBeVisible() + await expect(customClose).toBeVisible() + + // 点击自定义关闭按钮,警告消失 + await customClose.click() + await expect(alertSuccess).toBeHidden() + await btn.click() + + // 点击按钮控制警告消失或隐藏 + await expect(alertSuccess).toBeVisible() + await btn.click() + await expect(alertSuccess).toBeHidden() + await btn.click() + await expect(alertSuccess).toBeVisible() +}) diff --git a/examples/sites/demos/app/alert/custom-close.vue b/examples/sites/demos/app/alert/custom-close.vue new file mode 100644 index 000000000..7907b428a --- /dev/null +++ b/examples/sites/demos/app/alert/custom-close.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/sites/demos/app/alert/custom-description-composition-api.vue b/examples/sites/demos/app/alert/custom-description-composition-api.vue new file mode 100644 index 000000000..5866ce017 --- /dev/null +++ b/examples/sites/demos/app/alert/custom-description-composition-api.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/custom-description.spec.ts b/examples/sites/demos/app/alert/custom-description.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/custom-description.spec.ts rename to examples/sites/demos/app/alert/custom-description.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/custom-description.vue b/examples/sites/demos/app/alert/custom-description.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/custom-description.vue rename to examples/sites/demos/app/alert/custom-description.vue diff --git a/examples/sites/demos/app/alert/feedback-of-result-composition-api.vue b/examples/sites/demos/app/alert/feedback-of-result-composition-api.vue new file mode 100644 index 000000000..4f873e921 --- /dev/null +++ b/examples/sites/demos/app/alert/feedback-of-result-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/feedback-of-result.spec.ts b/examples/sites/demos/app/alert/feedback-of-result.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/feedback-of-result.spec.ts rename to examples/sites/demos/app/alert/feedback-of-result.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/feedback-of-result.vue b/examples/sites/demos/app/alert/feedback-of-result.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/feedback-of-result.vue rename to examples/sites/demos/app/alert/feedback-of-result.vue diff --git a/examples/sites/demos/app/alert/icon-composition-api.vue b/examples/sites/demos/app/alert/icon-composition-api.vue new file mode 100644 index 000000000..311d2bb8c --- /dev/null +++ b/examples/sites/demos/app/alert/icon-composition-api.vue @@ -0,0 +1,16 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/icon.spec.ts b/examples/sites/demos/app/alert/icon.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/icon.spec.ts rename to examples/sites/demos/app/alert/icon.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/icon.vue b/examples/sites/demos/app/alert/icon.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/icon.vue rename to examples/sites/demos/app/alert/icon.vue diff --git a/examples/sites/demos/app/alert/show-icon-composition-api.vue b/examples/sites/demos/app/alert/show-icon-composition-api.vue new file mode 100644 index 000000000..c9c7cb4f6 --- /dev/null +++ b/examples/sites/demos/app/alert/show-icon-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/show-icon.spec.ts b/examples/sites/demos/app/alert/show-icon.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/show-icon.spec.ts rename to examples/sites/demos/app/alert/show-icon.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/show-icon.vue b/examples/sites/demos/app/alert/show-icon.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/show-icon.vue rename to examples/sites/demos/app/alert/show-icon.vue diff --git a/examples/sites/demos/app/alert/size-composition-api.vue b/examples/sites/demos/app/alert/size-composition-api.vue new file mode 100644 index 000000000..cb8d386b0 --- /dev/null +++ b/examples/sites/demos/app/alert/size-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/size.spec.ts b/examples/sites/demos/app/alert/size.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/size.spec.ts rename to examples/sites/demos/app/alert/size.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/size.vue b/examples/sites/demos/app/alert/size.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/size.vue rename to examples/sites/demos/app/alert/size.vue diff --git a/examples/sites/demos/app/alert/slot-default-composition-api.vue b/examples/sites/demos/app/alert/slot-default-composition-api.vue new file mode 100644 index 000000000..694f13dd8 --- /dev/null +++ b/examples/sites/demos/app/alert/slot-default-composition-api.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/alert/slot-default.spec.ts b/examples/sites/demos/app/alert/slot-default.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/slot-default.spec.ts rename to examples/sites/demos/app/alert/slot-default.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/slot-default.vue b/examples/sites/demos/app/alert/slot-default.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/slot-default.vue rename to examples/sites/demos/app/alert/slot-default.vue diff --git a/examples/sites/demos/app/alert/title-composition-api.vue b/examples/sites/demos/app/alert/title-composition-api.vue new file mode 100644 index 000000000..1d3df13a8 --- /dev/null +++ b/examples/sites/demos/app/alert/title-composition-api.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/title.spec.ts b/examples/sites/demos/app/alert/title.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/title.spec.ts rename to examples/sites/demos/app/alert/title.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/title.vue b/examples/sites/demos/app/alert/title.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/title.vue rename to examples/sites/demos/app/alert/title.vue diff --git a/examples/sites/demos/app/alert/type-composition-api.vue b/examples/sites/demos/app/alert/type-composition-api.vue new file mode 100644 index 000000000..2620b6a1a --- /dev/null +++ b/examples/sites/demos/app/alert/type-composition-api.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/docs/resources/pc/demo/alert/type.spec.ts b/examples/sites/demos/app/alert/type.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/alert/type.spec.ts rename to examples/sites/demos/app/alert/type.spec.ts diff --git a/examples/docs/resources/pc/demo/alert/type.vue b/examples/sites/demos/app/alert/type.vue similarity index 100% rename from examples/docs/resources/pc/demo/alert/type.vue rename to examples/sites/demos/app/alert/type.vue diff --git a/examples/sites/demos/app/alert/webdoc/alert.cn.md b/examples/sites/demos/app/alert/webdoc/alert.cn.md new file mode 100644 index 000000000..819b6c660 --- /dev/null +++ b/examples/sites/demos/app/alert/webdoc/alert.cn.md @@ -0,0 +1,7 @@ +--- +title: Alert 警告 +--- + +# Alert 警告 + +
Alert 警告,提供 warning、error、info、success 四种类型显示不同类别的信息。
diff --git a/examples/sites/demos/app/alert/webdoc/alert.en.md b/examples/sites/demos/app/alert/webdoc/alert.en.md new file mode 100644 index 000000000..08cd41e21 --- /dev/null +++ b/examples/sites/demos/app/alert/webdoc/alert.en.md @@ -0,0 +1,7 @@ +--- +title: Alert +--- + +# Alert + +
Alert alarms, including warning, error, info, and success.
diff --git a/examples/sites/demos/app/alert/webdoc/alert.js b/examples/sites/demos/app/alert/webdoc/alert.js new file mode 100644 index 000000000..8a44f270c --- /dev/null +++ b/examples/sites/demos/app/alert/webdoc/alert.js @@ -0,0 +1,269 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['base.vue'] + }, + { + 'demoId': 'type', + 'name': { 'zh-CN': '类型', 'en-US': 'Type' }, + 'desc': { + 'zh-CN': + '

通过 type 设置不同的类型。可选值:success、warning、info、error,默认值:success 。

\n', + 'en-US': + '

Set different types through type. The options are success, warning, info, and error. The default value is success.

\n' + }, + 'codeFiles': ['type.vue'] + }, + { + 'demoId': 'size', + 'name': { 'zh-CN': '大尺寸', 'en-US': 'Large Size' }, + 'desc': { + 'zh-CN': '

通过 size 属性设置不同的尺寸,可选值:nomal、large,默认值:nomal 。

\n', + 'en-US': + '

Set different sizes through the size attribute. The options are nomal and large. The default value is nomal.

\n' + }, + 'codeFiles': ['size.vue'] + }, + { + 'demoId': 'title', + 'name': { 'zh-CN': '自定义标题', 'en-US': 'Custom Title' }, + 'desc': { + 'zh-CN': + '

size 为 large 时显示标题,可设置 titleslot 自定义标题。默认标题根据设置的 type 显示。

\n', + 'en-US': + '

When size is set to large, the title is displayed. You can set title or slot to customize the title. The default title is displayed according to the set type.

\n' + }, + 'codeFiles': ['title.vue'] + }, + { + 'demoId': 'center', + 'name': { 'zh-CN': '文字居中', 'en-US': 'Center text' }, + 'desc': { + 'zh-CN': '

通过 center 属性可使文字显示居中。

\n', + 'en-US': '

You can use the center property to center the text.

\n' + }, + 'codeFiles': ['center.vue'] + }, + { + 'demoId': 'close-text', + 'name': { 'zh-CN': '自定义关闭按钮文本', 'en-US': 'Customize the close button text' }, + 'desc': { + 'zh-CN': '

通过属性 close-text 自定义关闭按钮文本。

\n', + 'en-US': '

Customize the close button text through the close-text attribute.

\n' + }, + 'codeFiles': ['close-text.vue'] + }, + { + 'demoId': 'icon', + 'name': { 'zh-CN': '自定义警告图标', 'en-US': 'Customized warning icon' }, + 'desc': { + 'zh-CN': '

通过 icon 属性自定义图标。

\n', + 'en-US': '

Customize the icon through the icon attribute.

\n' + }, + 'codeFiles': ['icon.vue'] + }, + { + 'demoId': 'closable', + 'name': { 'zh-CN': '不可关闭', 'en-US': 'Cannot be closed' }, + 'desc': { + 'zh-CN': '

通过 closable 属性可设置是否显示关闭按钮,没有关闭按钮,警告框将不可关闭。

\n', + 'en-US': + '

You can set whether to display the close button through the closable attribute. If there is no close button, the warning box cannot be closed.

\n' + }, + 'codeFiles': ['closable.vue'] + }, + { + 'demoId': 'custom-description', + 'name': { 'zh-CN': '自定义提示内容', 'en-US': 'Customized prompt content' }, + 'desc': { + 'zh-CN': '

可通过 description 属性或插槽设置自定义提示内容。

\n', + 'en-US': + '

You can customize the prompt content through the description attribute or slot.

\n' + }, + 'codeFiles': ['custom-description.vue'] + }, + { + 'demoId': 'slot-default', + 'name': { 'zh-CN': '自定义交互操作', 'en-US': 'Customized Interaction' }, + 'desc': { + 'zh-CN': '

size 为 large 时,设置默认插槽自定义交互操作。

\n', + 'en-US': '

When size is large, set the default slot custom interaction operation.

\n' + }, + 'codeFiles': ['slot-default.vue'] + }, + { + 'demoId': 'close-events', + 'name': { 'zh-CN': '关闭事件', 'en-US': 'Close Event' }, + 'desc': { + 'zh-CN': '

close 事件,关闭警告框时触发。

\n', + 'en-US': '

close event, triggered when the warning dialog box is closed.

\n' + }, + 'codeFiles': ['close.vue'] + }, + { + 'demoId': 'feedback-of-result', + 'name': { 'zh-CN': '表单提交结果反馈', 'en-US': 'Form submission result feedback' }, + 'desc': { + 'zh-CN': + '

size 为 large时,属性 description 和默认插槽结合使用,可渲染提交反馈界面。

\n', + 'en-US': + '

When size is set to large, the description attribute is used together with the default slot to render the feedback submission interface.

\n' + }, + 'codeFiles': ['feedback-of-result.vue'] + }, + { + 'demoId': 'show-icon', + 'name': { 'zh-CN': '是否显示图标', 'en-US': 'Display icon' }, + 'desc': { + 'zh-CN': '

通过配置 show-icon 属性,控制图标是否显示。

\n', + 'en-US': '

You can set the show-icon attribute to control whether to display the icon.

\n' + }, + 'codeFiles': ['show-icon.vue'] + }, + { + 'demoId': 'custom-close', + 'name': { 'zh-CN': '自定义关闭按钮', 'en-US': '' }, + 'desc': { + 'zh-CN': '

通过配置 close 插槽自定义关闭按钮,当 closable 属性为false时有效

\n', + 'en-US': '' + }, + 'codeFiles': ['custom-close.vue'] + } + ], + apis: [ + { + 'name': 'alert', + 'type': 'component', + 'properties': [ + { + 'name': 'closable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '设置警告是否可以关闭', 'en-US': 'Set whether alarms can be disabled.' }, + 'demoId': 'closable' + }, + { + 'name': 'icon', + 'type': 'String , Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置警告的图标,默认会根据 type 值自动使用对应图标', + 'en-US': + 'Set the alarm icon. By default, the corresponding icon is automatically used based on the value of type.' + }, + 'demoId': 'icon' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '该属性的默认值为 normal', + 'desc': { + 'zh-CN': '设置警告的大小 nomal/large, 缺省为 nomal。;该属性的可选值为 nomal / large', + 'en-US': + 'Set the warning size to nomal or large. The default value is nomal. ;The value of this attribute can be nomal or large' + }, + 'demoId': 'size' + }, + { + 'name': 'title', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置警告的标题,在 size 为 large 时有效,默认根据 type 自动设置', + 'en-US': + 'Set the warning title. This parameter is valid only when size is set to large. By default, the alarm title is automatically set based on type.' + }, + 'demoId': 'title' + }, + { + 'name': 'type', + 'type': 'String', + 'defaultValue': '该属性的默认值为 success', + 'desc': { + 'zh-CN': '设置警告的类型;该属性的可选值为 success/warning/info/error', + 'en-US': 'Set the alarm type. The value of this attribute can be success / warning / info / error' + }, + 'demoId': 'type' + }, + { + 'name': 'description', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置警告的提示内容,默认为空;', + 'en-US': 'Set the warning prompt content. The default value is null.' + }, + 'demoId': 'custom-description' + }, + { + 'name': 'center', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '文字是否居中', 'en-US': 'Whether the text is centered' }, + 'demoId': 'center' + }, + { + 'name': 'close-text', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '关闭按钮自定义文本', 'en-US': 'Customized text of the close button' }, + 'demoId': 'close-text' + }, + { + 'name': 'show-icon', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否显示图标', 'en-US': 'Display icon' }, + 'demoId': 'show-icon' + } + ], + 'events': [ + { + 'name': 'close', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '关闭 alert 时触发的事件', + 'en-US': 'Event triggered when the alert function is disabled' + }, + 'demoId': 'close-events' + } + ], + 'slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '组件默认插槽', 'en-US': 'Default slot of the component' }, + 'demoId': 'slot-default' + }, + { + 'name': 'title', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '标题的内容', 'en-US': 'Title content' }, + 'demoId': 'title' + }, + { + 'name': 'description', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '提示内容', 'en-US': 'Prompt Content' }, + 'demoId': 'custom-description' + }, + { + 'name': 'close', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义关闭按钮,当 closable 属性为 false 时有效', 'en-US': '' }, + 'demoId': 'custom-close' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/amount/amount-disable-composition-api.vue b/examples/sites/demos/app/amount/amount-disable-composition-api.vue new file mode 100644 index 000000000..056c4fc68 --- /dev/null +++ b/examples/sites/demos/app/amount/amount-disable-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/amount/amount-disable.vue b/examples/sites/demos/app/amount/amount-disable.vue similarity index 100% rename from examples/docs/resources/pc/demo/amount/amount-disable.vue rename to examples/sites/demos/app/amount/amount-disable.vue diff --git a/examples/sites/demos/app/amount/basic-usage-composition-api.vue b/examples/sites/demos/app/amount/basic-usage-composition-api.vue new file mode 100644 index 000000000..e23fd81a9 --- /dev/null +++ b/examples/sites/demos/app/amount/basic-usage-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/amount/basic-usage.vue b/examples/sites/demos/app/amount/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/amount/basic-usage.vue rename to examples/sites/demos/app/amount/basic-usage.vue diff --git a/examples/sites/demos/app/amount/custom-currency-composition-api.vue b/examples/sites/demos/app/amount/custom-currency-composition-api.vue new file mode 100644 index 000000000..4a658426f --- /dev/null +++ b/examples/sites/demos/app/amount/custom-currency-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/amount/custom-currency.vue b/examples/sites/demos/app/amount/custom-currency.vue similarity index 100% rename from examples/docs/resources/pc/demo/amount/custom-currency.vue rename to examples/sites/demos/app/amount/custom-currency.vue diff --git a/examples/sites/demos/app/amount/custom-service-composition-api.vue b/examples/sites/demos/app/amount/custom-service-composition-api.vue new file mode 100644 index 000000000..77f0963ce --- /dev/null +++ b/examples/sites/demos/app/amount/custom-service-composition-api.vue @@ -0,0 +1,22 @@ + + + diff --git a/examples/docs/resources/pc/demo/amount/custom-service.spec.js b/examples/sites/demos/app/amount/custom-service.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/amount/custom-service.spec.js rename to examples/sites/demos/app/amount/custom-service.spec.js diff --git a/examples/docs/resources/pc/demo/amount/custom-service.vue b/examples/sites/demos/app/amount/custom-service.vue similarity index 100% rename from examples/docs/resources/pc/demo/amount/custom-service.vue rename to examples/sites/demos/app/amount/custom-service.vue diff --git a/examples/sites/demos/app/amount/digits-maxlen-composition-api.vue b/examples/sites/demos/app/amount/digits-maxlen-composition-api.vue new file mode 100644 index 000000000..38f1fb725 --- /dev/null +++ b/examples/sites/demos/app/amount/digits-maxlen-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/amount/digits-maxlen.vue b/examples/sites/demos/app/amount/digits-maxlen.vue similarity index 100% rename from examples/docs/resources/pc/demo/amount/digits-maxlen.vue rename to examples/sites/demos/app/amount/digits-maxlen.vue diff --git a/examples/sites/demos/app/amount/set-date-composition-api.vue b/examples/sites/demos/app/amount/set-date-composition-api.vue new file mode 100644 index 000000000..3045105ce --- /dev/null +++ b/examples/sites/demos/app/amount/set-date-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/amount/set-date.vue b/examples/sites/demos/app/amount/set-date.vue similarity index 100% rename from examples/docs/resources/pc/demo/amount/set-date.vue rename to examples/sites/demos/app/amount/set-date.vue diff --git a/examples/sites/demos/app/amount/size-composition-api.vue b/examples/sites/demos/app/amount/size-composition-api.vue new file mode 100644 index 000000000..cf229f0ba --- /dev/null +++ b/examples/sites/demos/app/amount/size-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/docs/resources/pc/demo/amount/size.vue b/examples/sites/demos/app/amount/size.vue similarity index 100% rename from examples/docs/resources/pc/demo/amount/size.vue rename to examples/sites/demos/app/amount/size.vue diff --git a/examples/sites/demos/app/amount/webdoc/amount.cn.md b/examples/sites/demos/app/amount/webdoc/amount.cn.md new file mode 100644 index 000000000..cdd06df31 --- /dev/null +++ b/examples/sites/demos/app/amount/webdoc/amount.cn.md @@ -0,0 +1,7 @@ +--- +title: Amount 金额 +--- + +# Amount 金额 + +
用于处理货币、金额和相关时间,选择货币类型并填写数目和时间,也可以通过设定服务,自定义货币类型。
diff --git a/examples/sites/demos/app/amount/webdoc/amount.en.md b/examples/sites/demos/app/amount/webdoc/amount.en.md new file mode 100644 index 000000000..eddec623f --- /dev/null +++ b/examples/sites/demos/app/amount/webdoc/amount.en.md @@ -0,0 +1,7 @@ +--- +title: Amount +--- + +# Amount + +
Used to process currency, amount, and related time. Select a currency type and enter the number and time. You can also set the service. Customized currency type.
diff --git a/examples/sites/demos/app/amount/webdoc/amount.js b/examples/sites/demos/app/amount/webdoc/amount.js new file mode 100644 index 000000000..306c54aa3 --- /dev/null +++ b/examples/sites/demos/app/amount/webdoc/amount.js @@ -0,0 +1,238 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example ' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'set-date', + 'name': { 'zh-CN': '设置日期', 'en-US': 'Set Date' }, + 'desc': { + 'zh-CN': + '

通过 date 属性设置日期后,将会在金额组件中显示日期框。值可设置为 String 或者 Date() 类型。\n通过 change 获取改变后的值。

\n', + 'en-US': + '

After the date is set through the date attribute, the date box is displayed in the amount component. The value can be of the String or Date() type. \n Obtain the changed value through change.

\n' + }, + 'codeFiles': ['set-date.vue'] + }, + { + 'demoId': 'size', + 'name': { 'zh-CN': '编辑框大小', 'en-US': 'editing box size' }, + 'desc': { + 'zh-CN': '

可选择的类型:mediumsmallmini

\n', + 'en-US': '

The options are as follows:medium,small, mini

\n' + }, + 'codeFiles': ['size.vue'] + }, + { + 'demoId': 'custom-currency', + 'name': { 'zh-CN': '指定币种', 'en-US': 'Specified Currency' }, + 'desc': { + 'zh-CN': + '

默认显示币种为 CNY,可通过 currency 指定需要的币种,若指定的币种在返回的服务数据中不存在,则币种下拉框将不显示该币种。

\n', + 'en-US': + '

The default currency is CNY. You can use currency to specify the currency. If the specified currency does not exist in the returned service data, the currency is not displayed in the Currency drop-down list box.

\n' + }, + 'codeFiles': ['custom-currency.vue'] + }, + { + 'demoId': 'digits-maxlen', + 'name': { 'zh-CN': '金额设置', 'en-US': 'Amount Setting' }, + 'desc': { + 'zh-CN': + '

设置 digits 属性可指定金额小数位数,默认为 2 位。设置 max-len 属性指定整数位最大可输入长度,默认为 15 位。

\n', + 'en-US': + '

Set the digits attribute to specify the number of decimal places of the amount. The default value is 2. Set the max-len attribute to specify the maximum length of an integer. The default value is 15.

\n' + }, + 'codeFiles': ['digits-maxlen.vue'] + }, + { + 'demoId': 'custom-service', + 'name': { 'zh-CN': '自定义服务', 'en-US': 'Custom Service ' }, + 'desc': { + 'zh-CN': + '

fetchCurrency 指定自定义服务,fields 可指定显示字段和值设置在服务数据中的字段映射。

\n', + 'en-US': + '

fetchCurrency specifies the custom service. fields can specify the field mapping of the display field and value settings in the service data.

\n' + }, + 'codeFiles': ['custom-service.vue'] + }, + { + 'demoId': 'amount-disable', + 'name': { 'zh-CN': '禁用', 'en-US': 'Disable' }, + 'desc': { + 'zh-CN': '

通过 disabled 配置 Amount 组件禁用。

\n', + 'en-US': '

You can disable the Amount component by using disabled.

\n' + }, + 'codeFiles': ['amount-disable.vue'] + } + ], + apis: [ + { + 'name': 'amount', + 'type': 'component', + 'properties': [ + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '当数据为空时的占位符', 'en-US': 'Placeholder when data is empty' }, + 'demoId': 'custom-service' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置组件大小', 'en-US': 'Set the component size' }, + 'demoId': 'size' + }, + { + 'name': 'format', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': + "数字格式化置项,可配置如下字段:;{\n fraction: 4, // 保留小数位数\n rounding: 0, // 舍入点,0-9之间的数字,如配置为7时则为6舍7入,默认为5(四舍五入);配置为0或>9将会进行截取\n prefix: '$', // 前置标识\n groupSize: 3, // 整数部分分组间隔,即第一个分组位数\n secondaryGroupSize: 2, // 整数部分第二级分组间隔,不设置或为0时 自动取groupSize\n groupSeparator: ',', // 整数部分分组分隔符\n decimalSeparator: '.', // 小数点符号\n fractionGroupSize: 0, // 小数部分分组间隔\n fractionGroupSeparator: ' ', // 小数分组分隔符\n suffix: '@' // 后置标识\n }", + 'en-US': + "Number formatting configuration item. The following fields can be configured:; {\n fraction: 4, //Retain the number of decimal places. \n rounding: 0, //Round the number between 0 and 9. For example, if the value is set to 7, the value is rounded off to 6. The default value is 5 (rounded off). If this parameter is set to 0 or greater than 9, truncation is performed. \n prefix: '$', //Front identifier. \n groupSize: 3, //Integer part grouping interval, that is, the number of bits of the first grouping. \n secondaryGroupSize: 2, //Integer part second-level grouping interval. If this parameter is not set or is set to 0, the value of groupSize is automatically used. \n groupSeparator: ',', //Integer part grouping separator. \n decimalSeparator:' ', / / Decimal point symbol \n fractionGroupSize: 0, // Decimal part grouping interval \n fractionGroupSeparator: '', / / Decimal grouping separator \n suffix: '@' / / Post identifier \n}" + }, + 'demoId': '' + }, + { + 'name': 'currency', + 'type': 'String', + 'defaultValue': '该属性的默认值为 CNY', + 'desc': { 'zh-CN': '', 'en-US': '' }, + 'demoId': 'custom-currency' + }, + { + 'name': 'digits', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 2', + 'desc': { + 'zh-CN': '设置小数点位数,默认为 2 位。', + 'en-US': 'Set the number of decimal places. The default value is two.' + }, + 'demoId': 'digits-maxlen' + }, + { + 'name': 'date', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置弹出框内显示日期框。值可设置为 String 或者 Date() 类型。', + 'en-US': + 'Set the date box to be displayed in the pop-up box. The value can be of the String or Date() type.' + }, + 'demoId': 'set-date' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '设置是否禁用,默认为 false。', + 'en-US': 'Whether to disable the function. The default value is false.' + }, + 'demoId': 'amount-disable' + }, + { + 'name': 'max-len', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 15', + 'desc': { + 'zh-CN': '整数位最大长度,默认为 15 位。', + 'en-US': 'Maximum integer length. The default value is 15 characters.' + }, + 'demoId': 'digits-maxlen' + }, + { + 'name': 'negative', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '是否可为负数,默认为 true ,可设为负数。', + 'en-US': + 'Indicates whether the value can be a negative number. The default value is true. The value can be a negative number.' + }, + 'demoId': '' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '为 popper 添加类名(可参考 popover 组件)', + 'en-US': 'Add a class name for the popper. For details, see the popover component.' + }, + 'demoId': '' + }, + { + 'name': 'popper-append-to-body', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': + '是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)', + 'en-US': + 'Indicates whether to insert the pop-up box to the body element. When a fault occurs in the dialog box that is displayed, you can set this attribute to false (for details, see the select component).' + }, + 'demoId': '' + }, + { + 'name': 'value', + 'type': 'String , Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置金额组件的值。', 'en-US': 'Set the value of the amount component.' }, + 'demoId': 'digits-maxlen' + }, + { + 'name': 'rounding', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { 'zh-CN': '控制输入金额四舍五入。', 'en-US': 'Controls the rounding of the input amount.' }, + 'demoId': 'digits-maxlen' + }, + { + 'name': 'fetchCurrency', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义金额组件的请求服务接口,fetchCurrency返回一个Promise对象 ', + 'en-US': + 'Request service interface of the customized amount component. fetchCurrency returns a Promise object.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'fields', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义金额组件数据映射,在没有使用框架服务时必填', + 'en-US': + 'Customized amount component data mapping. This parameter is mandatory when the framework service is not used.' + }, + 'demoId': 'custom-service' + } + ], + 'events': [ + { + 'name': 'change', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当组件的值发生变化时会触发该事件。', + 'en-US': 'This event is triggered when the value of a component changes.' + }, + 'demoId': 'set-date' + } + ], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/anchor/basic-usage-composition-api.vue b/examples/sites/demos/app/anchor/basic-usage-composition-api.vue new file mode 100644 index 000000000..d1a15ab78 --- /dev/null +++ b/examples/sites/demos/app/anchor/basic-usage-composition-api.vue @@ -0,0 +1,43 @@ + + + diff --git a/examples/docs/resources/pc/demo/anchor/basic-usage.spec.ts b/examples/sites/demos/app/anchor/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/anchor/basic-usage.spec.ts rename to examples/sites/demos/app/anchor/basic-usage.spec.ts diff --git a/examples/sites/demos/app/anchor/basic-usage.vue b/examples/sites/demos/app/anchor/basic-usage.vue new file mode 100644 index 000000000..42feaf601 --- /dev/null +++ b/examples/sites/demos/app/anchor/basic-usage.vue @@ -0,0 +1,51 @@ + + + diff --git a/examples/sites/demos/app/anchor/is-affix-composition-api.vue b/examples/sites/demos/app/anchor/is-affix-composition-api.vue new file mode 100644 index 000000000..deec04920 --- /dev/null +++ b/examples/sites/demos/app/anchor/is-affix-composition-api.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/anchor/is-affix.spec.ts b/examples/sites/demos/app/anchor/is-affix.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/anchor/is-affix.spec.ts rename to examples/sites/demos/app/anchor/is-affix.spec.ts diff --git a/examples/docs/resources/pc/demo/anchor/is-affix.vue b/examples/sites/demos/app/anchor/is-affix.vue similarity index 99% rename from examples/docs/resources/pc/demo/anchor/is-affix.vue rename to examples/sites/demos/app/anchor/is-affix.vue index 9bc847ca8..92cb74e97 100644 --- a/examples/docs/resources/pc/demo/anchor/is-affix.vue +++ b/examples/sites/demos/app/anchor/is-affix.vue @@ -8,6 +8,7 @@ diff --git a/examples/docs/resources/pc/demo/anchor/on-change.spec.ts b/examples/sites/demos/app/anchor/on-change.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/anchor/on-change.spec.ts rename to examples/sites/demos/app/anchor/on-change.spec.ts diff --git a/examples/docs/resources/pc/demo/anchor/on-change.vue b/examples/sites/demos/app/anchor/on-change.vue similarity index 100% rename from examples/docs/resources/pc/demo/anchor/on-change.vue rename to examples/sites/demos/app/anchor/on-change.vue diff --git a/examples/sites/demos/app/anchor/set-container-composition-api.vue b/examples/sites/demos/app/anchor/set-container-composition-api.vue new file mode 100644 index 000000000..697823a34 --- /dev/null +++ b/examples/sites/demos/app/anchor/set-container-composition-api.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/anchor/set-container.spec.ts b/examples/sites/demos/app/anchor/set-container.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/anchor/set-container.spec.ts rename to examples/sites/demos/app/anchor/set-container.spec.ts diff --git a/examples/docs/resources/pc/demo/anchor/set-container.vue b/examples/sites/demos/app/anchor/set-container.vue similarity index 100% rename from examples/docs/resources/pc/demo/anchor/set-container.vue rename to examples/sites/demos/app/anchor/set-container.vue diff --git a/examples/sites/demos/app/anchor/webdoc/anchor.cn.md b/examples/sites/demos/app/anchor/webdoc/anchor.cn.md new file mode 100644 index 000000000..15f0b06ed --- /dev/null +++ b/examples/sites/demos/app/anchor/webdoc/anchor.cn.md @@ -0,0 +1,7 @@ +--- +title: Anchor 锚点 +--- + +# Anchor 锚点 + +
用于跳转到页面指定位置
diff --git a/examples/sites/demos/app/anchor/webdoc/anchor.en.md b/examples/sites/demos/app/anchor/webdoc/anchor.en.md new file mode 100644 index 000000000..d7bd43200 --- /dev/null +++ b/examples/sites/demos/app/anchor/webdoc/anchor.en.md @@ -0,0 +1,7 @@ +--- +title: Anchor +--- + +# Anchor + +
Used to jump to the specified position on the page
diff --git a/examples/sites/demos/app/anchor/webdoc/anchor.js b/examples/sites/demos/app/anchor/webdoc/anchor.js new file mode 100644 index 000000000..38d115627 --- /dev/null +++ b/examples/sites/demos/app/anchor/webdoc/anchor.js @@ -0,0 +1,112 @@ +export default { + column: '1', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': '属性links传入数据渲染', + 'en-US': 'Attribute links: input data rendering' + }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'is-affix', + 'name': { 'zh-CN': '固定模式', 'en-US': 'Fixed mode' }, + 'desc': { + 'zh-CN': '设置属性is-affix为true, 让锚点不随页面滚动', + 'en-US': 'Set the is-affix attribute to true so that the anchor does not scroll with the page.' + }, + 'codeFiles': ['is-affix.vue'] + }, + { + 'demoId': 'set-container', + 'name': { 'zh-CN': '滚动容器', 'en-US': 'Rolling Container' }, + 'desc': { + 'zh-CN': + '通过container-id属性指定滚动容器,link-click监听锚点点击事件,阻止浏览器默认行为,实现单页面hash路由模式的页内跳转,让页面只在想要的指定容器内滚动。通过mask-class属性设置自定义类名,高亮显示滚动的目标元素', + 'en-US': + 'Use the container-id attribute to specify the scrolling container. link-click listens to anchor click events and prevents the default browser behavior. Implement intra-page redirection in single-page hash routing mode so that the page scrolls only in the specified container. Set the custom class name through the mask-class attribute to highlight the scrolling target element' + }, + 'codeFiles': ['set-container.vue'] + }, + { + 'demoId': 'on-change', + 'name': { 'zh-CN': 'change事件', 'en-US': 'change event' }, + 'desc': { + 'zh-CN': 'on-change事件,锚点链接改变时触发回调', + 'en-US': 'on-change event. Callback is triggered when the anchor link changes.' + }, + 'codeFiles': ['on-change.vue'] + } + ], + apis: [ + { + 'name': 'anchor', + 'type': 'component', + 'properties': [ + { + 'name': 'links', + 'type': '{ key, link, title, children }[]', + 'defaultValue': '', + 'desc': { + 'zh-CN': '数据配置项,可通过children嵌套', + 'en-US': 'Data configuration item, which can be nested by children.' + }, + 'demoId': 'basic-usage' + }, + { + 'name': 'is-affix', + 'type': 'Boolean', + 'defaultValue': 'false', + 'desc': { 'zh-CN': '固定模式', 'en-US': 'Fixed mode' }, + 'demoId': 'is-affix' + }, + { + 'name': 'container-id', + 'type': 'String', + 'defaultValue': 'document.body', + 'desc': { 'zh-CN': '指定滚动容器的id值', 'en-US': 'Specify the scrolling container ID.' }, + 'demoId': 'set-container' + }, + { + 'name': 'mask-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义滚动的目标元素类名', + 'en-US': 'Class name of the customized scrolling target element' + }, + 'demoId': 'set-container' + } + ], + 'events': [ + { + 'name': 'link-click', + 'type': 'Function(arg1,arg2)', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '锚点点击事件, 点击后触发的回调函数;//参数arg1:点击事件对象 //参数arg2: {link: 点击锚点的链接, title: 点击节点的标题文字 }', + 'en-US': + 'An anchor click event, which is a callback function triggered after the anchor clicks. //Parameter arg1: click event object //Parameter arg2: {link: click anchor link, title: click node title}' + }, + 'demoId': 'set-container' + }, + { + 'name': 'on-change', + 'type': 'Function(arg1)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '监听锚点链接的改变;锚点改变后的回调函数; // 参数arg1: 当前锚点的id值', + 'en-US': + 'Listen to the change of the anchor link; Callback function after the anchor point is changed; //arg1: ID of the current anchor' + }, + 'demoId': 'on-change' + } + ], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/area/area-events-composition-api.vue b/examples/sites/demos/app/area/area-events-composition-api.vue new file mode 100644 index 000000000..55149c3c8 --- /dev/null +++ b/examples/sites/demos/app/area/area-events-composition-api.vue @@ -0,0 +1,37 @@ + + + diff --git a/examples/docs/resources/pc/demo/area/area-events.vue b/examples/sites/demos/app/area/area-events.vue similarity index 100% rename from examples/docs/resources/pc/demo/area/area-events.vue rename to examples/sites/demos/app/area/area-events.vue diff --git a/examples/sites/demos/app/area/basic-usage-composition-api.vue b/examples/sites/demos/app/area/basic-usage-composition-api.vue new file mode 100644 index 000000000..d695f0e40 --- /dev/null +++ b/examples/sites/demos/app/area/basic-usage-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/area/basic-usage.vue b/examples/sites/demos/app/area/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/area/basic-usage.vue rename to examples/sites/demos/app/area/basic-usage.vue diff --git a/examples/sites/demos/app/area/custom-service-composition-api.vue b/examples/sites/demos/app/area/custom-service-composition-api.vue new file mode 100644 index 000000000..d75a991d6 --- /dev/null +++ b/examples/sites/demos/app/area/custom-service-composition-api.vue @@ -0,0 +1,151 @@ + + + diff --git a/examples/sites/demos/app/area/custom-service.spec.ts b/examples/sites/demos/app/area/custom-service.spec.ts new file mode 100644 index 000000000..6fe882718 --- /dev/null +++ b/examples/sites/demos/app/area/custom-service.spec.ts @@ -0,0 +1,42 @@ +import { test, expect } from '@playwright/test' + +test('测试自定义服务', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/area/custom-service') + + const preview = page.locator('#preview') + const areaInput = preview.locator('.tiny-area input') + const areaJCR = page.locator('.tiny-area-jcr') + const areaRegion = page.locator('.tiny-area-region') + const areaRep = page.locator('.tiny-area-rep') + const areaOffice = page.locator('.tiny-area-office') + const getSelectItem = (parent) => parent.locator('.tiny-option.tiny-select-dropdown__item') + + // 未选择一级片区,其他片区选项应该为空 + await areaInput.first().click() + await expect(areaJCR).toBeVisible() + await expect(getSelectItem(areaJCR)).toHaveCount(2) + await areaInput.nth(1).click() + await expect(areaRegion).toBeVisible() + await expect(areaRegion).toContainText('暂无相关数据') + await areaInput.nth(2).click() + await expect(areaRep).toBeVisible() + await expect(areaRep).toContainText('暂无相关数据') + await areaInput.nth(3).click() + await expect(areaOffice).toBeVisible() + await expect(areaOffice).toContainText('暂无相关数据') + + // 依次选择,查看是否具有争取的值 + await areaInput.first().click() + await getSelectItem(areaJCR).first().click() + await areaInput.nth(1).click() + await getSelectItem(areaRegion).first().click() + await areaInput.nth(2).click() + await getSelectItem(areaRep).first().click() + await areaInput.nth(3).click() + await getSelectItem(areaOffice).first().click() + await expect(areaInput.first()).toHaveValue('A公司 Marketing与销售服务部') + await expect(areaInput.nth(1)).toHaveValue('火星终端子公司') + await expect(areaInput.nth(2)).toHaveValue('北京代表处') + await expect(areaInput.nth(3)).toHaveValue('牙买加办事处') +}) diff --git a/examples/docs/resources/pc/demo/area/custom-service.vue b/examples/sites/demos/app/area/custom-service.vue similarity index 100% rename from examples/docs/resources/pc/demo/area/custom-service.vue rename to examples/sites/demos/app/area/custom-service.vue diff --git a/examples/sites/demos/app/area/disabled-composition-api.vue b/examples/sites/demos/app/area/disabled-composition-api.vue new file mode 100644 index 000000000..4b72fdfbe --- /dev/null +++ b/examples/sites/demos/app/area/disabled-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/area/disabled.vue b/examples/sites/demos/app/area/disabled.vue similarity index 100% rename from examples/docs/resources/pc/demo/area/disabled.vue rename to examples/sites/demos/app/area/disabled.vue diff --git a/examples/sites/demos/app/area/size-composition-api.vue b/examples/sites/demos/app/area/size-composition-api.vue new file mode 100644 index 000000000..7352f05d5 --- /dev/null +++ b/examples/sites/demos/app/area/size-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/area/size.vue b/examples/sites/demos/app/area/size.vue similarity index 100% rename from examples/docs/resources/pc/demo/area/size.vue rename to examples/sites/demos/app/area/size.vue diff --git a/examples/sites/demos/app/area/webdoc/area.cn.md b/examples/sites/demos/app/area/webdoc/area.cn.md new file mode 100644 index 000000000..e233eb818 --- /dev/null +++ b/examples/sites/demos/app/area/webdoc/area.cn.md @@ -0,0 +1,7 @@ +--- +title: Area 片区 +--- + +# Area 片区 + +
用于显示区域名称,通过配置区域和数据源获取选项。
diff --git a/examples/sites/demos/app/area/webdoc/area.en.md b/examples/sites/demos/app/area/webdoc/area.en.md new file mode 100644 index 000000000..7544c69d6 --- /dev/null +++ b/examples/sites/demos/app/area/webdoc/area.en.md @@ -0,0 +1,7 @@ +--- +title: Area +--- + +# Area + +
Displays the region name. The options are obtained by configuring the region and data source.
diff --git a/examples/sites/demos/app/area/webdoc/area.js b/examples/sites/demos/app/area/webdoc/area.js new file mode 100644 index 000000000..a41e83dd7 --- /dev/null +++ b/examples/sites/demos/app/area/webdoc/area.js @@ -0,0 +1,195 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': '

通过 v-model / value 属性设置默认值。

\n', + 'en-US': '

Sets the default value through the v-model / value property.

\n' + }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'custom-service', + 'name': { 'zh-CN': '自定义服务', 'en-US': 'Custom Service' }, + 'desc': { + 'zh-CN': + '

通过 fetch-jcr 可以自定义服务用于获取片区 JCR 数据,fetch-rigion 用于获取地区部 Region 的数据,fetch-rep 用于获取代表处 Rep 的数据,fetch-office 用于获取办事处 Office 的数据。同时 当数据字段为非默认的 name_cn org_id 时,可以通过 props 属性设置数据的映射字段。

\n', + 'en-US': + '

You can use fetch-jcr to customize services to obtain regional JCR data, and fetch-rigion to obtain regional region data. fetch-rep is used to obtain the data of rep offices, and fetch-office is used to obtain the data of offices. In addition, when the data field is not the default name_cn org_id, you can set the mapping field of the data through the props attribute.

\n' + }, + 'codeFiles': ['custom-service.vue'] + }, + { + 'demoId': 'size', + 'name': { 'zh-CN': '设置组件大小', 'en-US': 'Set Component Size' }, + 'desc': { + 'zh-CN': '

可选值为:mediumsmallmini

\n', + 'en-US': '

The options are as follows: medium, small, mini

\n' + }, + 'codeFiles': ['size.vue'] + }, + { + 'demoId': 'area-events', + 'name': { 'zh-CN': '事件', 'en-US': 'Event' }, + 'desc': { + 'zh-CN': + '

Region 下拉框的值改变时触发 change-region 事件,Rep 下拉框的值改变时触发 change-rep 事件,Office 下拉框的值改变时触发 change-office 事件。

\n', + 'en-US': + 'The change-region event is triggered when the value of the Region drop-down list box changes. The change-rep event is triggered when the value of the Rep drop-down list box changes. The change-office event is triggered when the value of the Office drop-down list box changes.

\n' + }, + 'codeFiles': ['area-events.vue'] + }, + { + 'demoId': 'disabled', + 'name': { 'zh-CN': '设置组件大小', 'en-US': 'Set Component Size' }, + 'desc': { + 'zh-CN': '

通过 disabled 设置组件禁用默认值为 false 。

\n', + 'en-US': '

Use disabled to disable the component. The default value is false.

\n' + }, + 'codeFiles': ['disabled.vue'] + } + ], + apis: [ + { + 'name': 'area', + 'type': 'component', + 'properties': [ + { + 'name': 'modelValue / v-model', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置片区默认值', 'en-US': 'Set the default value of a region.' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置组件大小,可设置值为:medium,small,mini', + 'en-US': 'Set the component size. The options are medium, small, and mini.' + }, + 'demoId': 'size' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '当数据为空时的占位符', 'en-US': 'Placeholder when data is empty' }, + 'demoId': 'custom-service' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '为 popper 添加类名(可参考 popover 组件)', + 'en-US': 'Add a class name for the popper. For details, see the popover component.' + }, + 'demoId': '' + }, + { + 'name': 'popper-append-to-body', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': + '是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)', + 'en-US': + 'Indicates whether to insert the pop-up box to the body element. If a fault occurs in locating the fault in the dialog box that is displayed, set this parameter to false (for details, see the select component)' + }, + 'demoId': '' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { 'zh-CN': '禁用输入框;默认为 false', 'en-US': 'Disable the text box. The default value is false' }, + 'demoId': 'disabled' + }, + { + 'name': 'props', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': + "自定义服务时,设置数据的映射字段;默认为 {label: 'name_cn',// 显示文本对应的字段 value: 'org_id'// 值对应的字段}", + 'en-US': + "Set the data mapping field when customizing a service. The default value is {label:'name_cn', //Display the field corresponding to the text value:'org_id' //Display the field corresponding to the value}" + }, + 'demoId': 'custom-service' + }, + { + 'name': 'fetch-jcr', + 'type': 'Function', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义获取片区 JCR 的服务', 'en-US': 'User-defined service for obtaining regional JCRs' }, + 'demoId': 'custom-service' + }, + { + 'name': 'fetch-region', + 'type': 'Function', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义获取地区部 Region 的服务', 'en-US': 'Obtain the service of a region.' }, + 'demoId': 'custom-service' + }, + { + 'name': 'fetch-rep', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义获取代表处 Rep 的服务', + 'en-US': 'Obtain services of rep offices and rep offices.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'fetch-office', + 'type': 'Function', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义获取办事处 Office 的服务', 'en-US': 'User-defined Office service' }, + 'demoId': 'custom-service' + } + ], + 'events': [ + { + 'name': 'change-region', + 'type': 'Function(value, vm)', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'Region 的值发生变化时会触发该事件;回调参数为 改变的值;value: 改变后的值, vm: Area组件实例', + 'en-US': + 'This event is triggered when the value of a region changes. The callback parameter is the changed value. value: new value, vm: Area component instance' + }, + 'demoId': 'area-events' + }, + { + 'name': 'change-rep', + 'type': 'Function(value, vm)', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'Rep 的值发生变化时会触发该事件;回调参数为 改变的值;value: 改变后的值, vm: Area组件实例', + 'en-US': + 'This event is triggered when the value of Rep changes. The callback parameter is the changed value. value: new value, vm: Area component instance' + }, + 'demoId': 'area-events' + }, + { + 'name': 'change-office', + 'type': 'Function(value, vm)', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'Office 的值发生变化时会触发该事件;回调参数为 改变的值;value: 改变后的值, vm: Area组件实例', + 'en-US': + 'This event is triggered when the value of Office changes. The callback parameter is the changed value. value: new value, vm: Area component instance' + }, + 'demoId': 'area-events' + } + ], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/autocomplete/append-prepend-composition-api.vue b/examples/sites/demos/app/autocomplete/append-prepend-composition-api.vue new file mode 100644 index 000000000..eba466869 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/append-prepend-composition-api.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/append-prepend.spec.ts b/examples/sites/demos/app/autocomplete/append-prepend.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/append-prepend.spec.ts rename to examples/sites/demos/app/autocomplete/append-prepend.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/append-prepend.vue b/examples/sites/demos/app/autocomplete/append-prepend.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/append-prepend.vue rename to examples/sites/demos/app/autocomplete/append-prepend.vue diff --git a/examples/sites/demos/app/autocomplete/basic-usage-composition-api.vue b/examples/sites/demos/app/autocomplete/basic-usage-composition-api.vue new file mode 100644 index 000000000..329176dca --- /dev/null +++ b/examples/sites/demos/app/autocomplete/basic-usage-composition-api.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/basic-usage.spec.ts b/examples/sites/demos/app/autocomplete/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/basic-usage.spec.ts rename to examples/sites/demos/app/autocomplete/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/basic-usage.vue b/examples/sites/demos/app/autocomplete/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/basic-usage.vue rename to examples/sites/demos/app/autocomplete/basic-usage.vue diff --git a/examples/sites/demos/app/autocomplete/clearable-composition-api.vue b/examples/sites/demos/app/autocomplete/clearable-composition-api.vue new file mode 100644 index 000000000..dffe6864a --- /dev/null +++ b/examples/sites/demos/app/autocomplete/clearable-composition-api.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/clearable.spec.ts b/examples/sites/demos/app/autocomplete/clearable.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/clearable.spec.ts rename to examples/sites/demos/app/autocomplete/clearable.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/clearable.vue b/examples/sites/demos/app/autocomplete/clearable.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/clearable.vue rename to examples/sites/demos/app/autocomplete/clearable.vue diff --git a/examples/sites/demos/app/autocomplete/cust-template-composition-api.vue b/examples/sites/demos/app/autocomplete/cust-template-composition-api.vue new file mode 100644 index 000000000..a41416484 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/cust-template-composition-api.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/cust-template.spec.ts b/examples/sites/demos/app/autocomplete/cust-template.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/cust-template.spec.ts rename to examples/sites/demos/app/autocomplete/cust-template.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/cust-template.vue b/examples/sites/demos/app/autocomplete/cust-template.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/cust-template.vue rename to examples/sites/demos/app/autocomplete/cust-template.vue diff --git a/examples/sites/demos/app/autocomplete/custom-icon-composition-api.vue b/examples/sites/demos/app/autocomplete/custom-icon-composition-api.vue new file mode 100644 index 000000000..457e14be6 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/custom-icon-composition-api.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/custom-icon.spec.ts b/examples/sites/demos/app/autocomplete/custom-icon.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/custom-icon.spec.ts rename to examples/sites/demos/app/autocomplete/custom-icon.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/custom-icon.vue b/examples/sites/demos/app/autocomplete/custom-icon.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/custom-icon.vue rename to examples/sites/demos/app/autocomplete/custom-icon.vue diff --git a/examples/sites/demos/app/autocomplete/debounce-composition-api.vue b/examples/sites/demos/app/autocomplete/debounce-composition-api.vue new file mode 100644 index 000000000..73e404975 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/debounce-composition-api.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/debounce.spec.ts b/examples/sites/demos/app/autocomplete/debounce.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/debounce.spec.ts rename to examples/sites/demos/app/autocomplete/debounce.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/debounce.vue b/examples/sites/demos/app/autocomplete/debounce.vue similarity index 89% rename from examples/docs/resources/pc/demo/autocomplete/debounce.vue rename to examples/sites/demos/app/autocomplete/debounce.vue index 729e8f4c8..2bbc93d81 100644 --- a/examples/docs/resources/pc/demo/autocomplete/debounce.vue +++ b/examples/sites/demos/app/autocomplete/debounce.vue @@ -1,6 +1,11 @@ diff --git a/examples/sites/demos/app/autocomplete/disabled-composition-api.vue b/examples/sites/demos/app/autocomplete/disabled-composition-api.vue new file mode 100644 index 000000000..862414693 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/disabled-composition-api.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/disabled.spec.ts b/examples/sites/demos/app/autocomplete/disabled.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/disabled.spec.ts rename to examples/sites/demos/app/autocomplete/disabled.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/disabled.vue b/examples/sites/demos/app/autocomplete/disabled.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/disabled.vue rename to examples/sites/demos/app/autocomplete/disabled.vue diff --git a/examples/sites/demos/app/autocomplete/hide-loading-composition-api.vue b/examples/sites/demos/app/autocomplete/hide-loading-composition-api.vue new file mode 100644 index 000000000..f3d704be6 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/hide-loading-composition-api.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/hide-loading.spec.ts b/examples/sites/demos/app/autocomplete/hide-loading.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/hide-loading.spec.ts rename to examples/sites/demos/app/autocomplete/hide-loading.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/hide-loading.vue b/examples/sites/demos/app/autocomplete/hide-loading.vue similarity index 82% rename from examples/docs/resources/pc/demo/autocomplete/hide-loading.vue rename to examples/sites/demos/app/autocomplete/hide-loading.vue index 262ac93c7..7a0c67771 100644 --- a/examples/docs/resources/pc/demo/autocomplete/hide-loading.vue +++ b/examples/sites/demos/app/autocomplete/hide-loading.vue @@ -1,11 +1,17 @@ diff --git a/examples/sites/demos/app/autocomplete/highlight-first-item-composition-api.vue b/examples/sites/demos/app/autocomplete/highlight-first-item-composition-api.vue new file mode 100644 index 000000000..48207302a --- /dev/null +++ b/examples/sites/demos/app/autocomplete/highlight-first-item-composition-api.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/highlight-first-item.spec.ts b/examples/sites/demos/app/autocomplete/highlight-first-item.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/highlight-first-item.spec.ts rename to examples/sites/demos/app/autocomplete/highlight-first-item.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/highlight-first-item.vue b/examples/sites/demos/app/autocomplete/highlight-first-item.vue similarity index 89% rename from examples/docs/resources/pc/demo/autocomplete/highlight-first-item.vue rename to examples/sites/demos/app/autocomplete/highlight-first-item.vue index d1813664c..42526c049 100644 --- a/examples/docs/resources/pc/demo/autocomplete/highlight-first-item.vue +++ b/examples/sites/demos/app/autocomplete/highlight-first-item.vue @@ -1,6 +1,11 @@ diff --git a/examples/sites/demos/app/autocomplete/no-trigger-on-focus-composition-api.vue b/examples/sites/demos/app/autocomplete/no-trigger-on-focus-composition-api.vue new file mode 100644 index 000000000..5d8f564a3 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/no-trigger-on-focus-composition-api.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/no-trigger-on-focus.spec.ts b/examples/sites/demos/app/autocomplete/no-trigger-on-focus.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/no-trigger-on-focus.spec.ts rename to examples/sites/demos/app/autocomplete/no-trigger-on-focus.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/no-trigger-on-focus.vue b/examples/sites/demos/app/autocomplete/no-trigger-on-focus.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/no-trigger-on-focus.vue rename to examples/sites/demos/app/autocomplete/no-trigger-on-focus.vue diff --git a/examples/sites/demos/app/autocomplete/placement-composition-api.vue b/examples/sites/demos/app/autocomplete/placement-composition-api.vue new file mode 100644 index 000000000..2361fb837 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/placement-composition-api.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/placement.spec.ts b/examples/sites/demos/app/autocomplete/placement.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/placement.spec.ts rename to examples/sites/demos/app/autocomplete/placement.spec.ts diff --git a/examples/sites/demos/app/autocomplete/placement.vue b/examples/sites/demos/app/autocomplete/placement.vue new file mode 100644 index 000000000..055f8040f --- /dev/null +++ b/examples/sites/demos/app/autocomplete/placement.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/examples/sites/demos/app/autocomplete/popper-class-composition-api.vue b/examples/sites/demos/app/autocomplete/popper-class-composition-api.vue new file mode 100644 index 000000000..6d48503e4 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/popper-class-composition-api.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/popper-class.spec.ts b/examples/sites/demos/app/autocomplete/popper-class.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/popper-class.spec.ts rename to examples/sites/demos/app/autocomplete/popper-class.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/popper-class.vue b/examples/sites/demos/app/autocomplete/popper-class.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/popper-class.vue rename to examples/sites/demos/app/autocomplete/popper-class.vue diff --git a/examples/sites/demos/app/autocomplete/prefix-suffix-slot-composition-api.vue b/examples/sites/demos/app/autocomplete/prefix-suffix-slot-composition-api.vue new file mode 100644 index 000000000..1d759106d --- /dev/null +++ b/examples/sites/demos/app/autocomplete/prefix-suffix-slot-composition-api.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/prefix-suffix-slot.spec.ts b/examples/sites/demos/app/autocomplete/prefix-suffix-slot.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/prefix-suffix-slot.spec.ts rename to examples/sites/demos/app/autocomplete/prefix-suffix-slot.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/prefix-suffix-slot.vue b/examples/sites/demos/app/autocomplete/prefix-suffix-slot.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/prefix-suffix-slot.vue rename to examples/sites/demos/app/autocomplete/prefix-suffix-slot.vue diff --git a/examples/sites/demos/app/autocomplete/remote-search-composition-api.vue b/examples/sites/demos/app/autocomplete/remote-search-composition-api.vue new file mode 100644 index 000000000..dad046259 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/remote-search-composition-api.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/remote-search.spec.ts b/examples/sites/demos/app/autocomplete/remote-search.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/remote-search.spec.ts rename to examples/sites/demos/app/autocomplete/remote-search.spec.ts diff --git a/examples/sites/demos/app/autocomplete/remote-search.vue b/examples/sites/demos/app/autocomplete/remote-search.vue new file mode 100644 index 000000000..4021e4936 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/remote-search.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/examples/sites/demos/app/autocomplete/select-event-composition-api.vue b/examples/sites/demos/app/autocomplete/select-event-composition-api.vue new file mode 100644 index 000000000..08bb76784 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/select-event-composition-api.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/select-event.spec.ts b/examples/sites/demos/app/autocomplete/select-event.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/select-event.spec.ts rename to examples/sites/demos/app/autocomplete/select-event.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/select-event.vue b/examples/sites/demos/app/autocomplete/select-event.vue similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/select-event.vue rename to examples/sites/demos/app/autocomplete/select-event.vue diff --git a/examples/sites/demos/app/autocomplete/size-composition-api.vue b/examples/sites/demos/app/autocomplete/size-composition-api.vue new file mode 100644 index 000000000..2ed6388d2 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/size-composition-api.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/size.spec.ts b/examples/sites/demos/app/autocomplete/size.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/size.spec.ts rename to examples/sites/demos/app/autocomplete/size.spec.ts diff --git a/examples/sites/demos/app/autocomplete/size.vue b/examples/sites/demos/app/autocomplete/size.vue new file mode 100644 index 000000000..9a42c1e0c --- /dev/null +++ b/examples/sites/demos/app/autocomplete/size.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/examples/sites/demos/app/autocomplete/value-key-composition-api.vue b/examples/sites/demos/app/autocomplete/value-key-composition-api.vue new file mode 100644 index 000000000..93bcb94a2 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/value-key-composition-api.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/autocomplete/value-key.spec.ts b/examples/sites/demos/app/autocomplete/value-key.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/autocomplete/value-key.spec.ts rename to examples/sites/demos/app/autocomplete/value-key.spec.ts diff --git a/examples/docs/resources/pc/demo/autocomplete/value-key.vue b/examples/sites/demos/app/autocomplete/value-key.vue similarity index 85% rename from examples/docs/resources/pc/demo/autocomplete/value-key.vue rename to examples/sites/demos/app/autocomplete/value-key.vue index 72607f38e..454adb13c 100644 --- a/examples/docs/resources/pc/demo/autocomplete/value-key.vue +++ b/examples/sites/demos/app/autocomplete/value-key.vue @@ -25,18 +25,13 @@ export default { methods: { querySearch(queryString, cb) { let restaurants = this.restaurants - restaurants = queryString - ? restaurants.filter(this.createFilter(queryString)) - : restaurants + restaurants = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants // 调用 callback 返回建议列表的数据 cb(restaurants) }, createFilter(queryString) { - return (restaurant) => - restaurant.name - .toLowerCase() - .indexOf(queryString.toLowerCase()) === 0 + return (restaurant) => restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 }, loadAll() { return [ diff --git a/examples/sites/demos/app/autocomplete/webdoc/autocomplete.cn.md b/examples/sites/demos/app/autocomplete/webdoc/autocomplete.cn.md new file mode 100644 index 000000000..81a14d342 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/webdoc/autocomplete.cn.md @@ -0,0 +1,7 @@ +--- +title: Autocomplete 自动完成 +--- + +# Autocomplete 自动完成 + +
根据输入内容提供对应的输入建议。
diff --git a/examples/sites/demos/app/autocomplete/webdoc/autocomplete.en.md b/examples/sites/demos/app/autocomplete/webdoc/autocomplete.en.md new file mode 100644 index 000000000..7292a41f3 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/webdoc/autocomplete.en.md @@ -0,0 +1,7 @@ +--- +title: Autocomplete +--- + +# Autocomplete + +
Provide input suggestions based on the input content.
diff --git a/examples/sites/demos/app/autocomplete/webdoc/autocomplete.js b/examples/sites/demos/app/autocomplete/webdoc/autocomplete.js new file mode 100644 index 000000000..478a59b04 --- /dev/null +++ b/examples/sites/demos/app/autocomplete/webdoc/autocomplete.js @@ -0,0 +1,408 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'disabled1', + 'name': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'desc': { + 'zh-CN': '

通过 disabled 属性可以设置为禁用状态。

\n', + 'en-US': '

The disabled attribute can be set to the disabled state.

\n' + }, + 'codeFiles': ['disabled.vue'] + }, + { + 'demoId': 'disabled', + 'name': { 'zh-CN': '原生属性', 'en-US': 'Native Attribute' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['disabled.vue'] + }, + { + 'demoId': 'size', + 'name': { 'zh-CN': '输入框大小', 'en-US': 'Text box size' }, + 'desc': { + 'zh-CN': '

可选择值为medium,small,mini

\n', + 'en-US': '

The value can be medium, small, or mini

\n' + }, + 'codeFiles': ['size.vue'] + }, + { + 'demoId': 'clearable', + 'name': { 'zh-CN': '可清除', 'en-US': 'Can be cleared' }, + 'desc': { + 'zh-CN': '

配置 clearable 属性后,输入内容后会显示清除图标,单击可以清除输入框内容。

\n', + 'en-US': + '

After the clearable attribute is configured, the clear icon is displayed after you enter content. You can click to clear the content in the text box.

\n' + }, + 'codeFiles': ['clearable.vue'] + }, + { + 'demoId': 'append-prepend', + 'name': { 'zh-CN': '输入框前置内容', 'en-US': 'Pre-content in the text box' }, + 'desc': { + 'zh-CN': '

配置 prepend 属性设置输入框前置内容。

\n', + 'en-US': '

Configure the prepend attribute to set the front content of the text box.

\n' + }, + 'codeFiles': ['append-prepend.vue'] + }, + { + 'demoId': 'append-append', + 'name': { 'zh-CN': '输入框后置内容', 'en-US': 'Content after the text box' }, + 'desc': { + 'zh-CN': '

配置 append 属性设置输入框后置内容。

\n', + 'en-US': '

Configure the append attribute to set the content behind the text box.

\n' + }, + 'codeFiles': ['append-prepend.vue'] + }, + { + 'demoId': 'custom-icon', + 'name': { 'zh-CN': '自定义图标', 'en-US': 'Custom Icon' }, + 'desc': { + 'zh-CN': + '

配置 prefix-iconsuffix-icon 属性可分别自定义输入框前后置图标。

\n', + 'en-US': + '

Configure the prefix-icon and suffix-icon attributes to customize the icons before and after the text box.

\n' + }, + 'codeFiles': ['custom-icon.vue'] + }, + { + 'demoId': 'prefix-suffix-slot', + 'name': { 'zh-CN': '通过插槽自定义图标', 'en-US': 'Customize icons by slot' }, + 'desc': { + 'zh-CN': '

通过 prefixsuffix 插槽也可以分别自定义输入框前后置图标。

\n', + 'en-US': + '

You can also customize the front and rear icons of the text box through the prefix and suffix slots.

\n' + }, + 'codeFiles': ['prefix-suffix-slot.vue'] + }, + { + 'demoId': 'debounce', + 'name': { 'zh-CN': '去抖延时', 'en-US': 'Debounce Delay' }, + 'desc': { + 'zh-CN': '

通过 debounce 属性可以设置获取输入建议的去抖延时,默认值为 300 毫秒。

\n', + 'en-US': + '

You can set the dejitter delay for obtaining input suggestions through the debounce attribute. The default value is 300 ms.

\n' + }, + 'codeFiles': ['debounce.vue'] + }, + { + 'demoId': 'hide-loading', + 'name': { 'zh-CN': '隐藏加载图标', 'en-US': 'Hide the loading icon' }, + 'desc': { + 'zh-CN': '

设置 hide-loading 属性为 true ,可以隐藏加载图标。

\n', + 'en-US': '

Set hide-loading to true to hide the loading icon.

\n' + }, + 'codeFiles': ['hide-loading.vue'] + }, + { + 'demoId': 'hide-loading1', + 'name': { 'zh-CN': '输入框占位文本', 'en-US': 'Placeholder text in the text box' }, + 'desc': { + 'zh-CN': '

通过 placeholder 属性设置输入框占位文本。

\n', + 'en-US': '

Use the placeholder attribute to set the placeholder text in the text box.

\n' + }, + 'codeFiles': ['hide-loading.vue'] + }, + { + 'demoId': 'cust-template', + 'name': { 'zh-CN': '自定义模板', 'en-US': 'Custom Template' }, + 'desc': { + 'zh-CN': '

通过作用域插槽可以自定义输入建议模板。

\n', + 'en-US': '

You can customize the input suggestion template through the scope slot.

\n' + }, + 'codeFiles': ['cust-template.vue'] + }, + { + 'demoId': 'remote-search', + 'name': { 'zh-CN': '远程搜索', 'en-US': 'Remote Search' }, + 'desc': { + 'zh-CN': '

通过 fetch-suggestions 属性设置远程搜索。

\n', + 'en-US': '

Set the remote search through the fetch-suggestions attribute.

\n' + }, + 'codeFiles': ['remote-search.vue'] + }, + { + 'demoId': 'value-key', + 'name': { 'zh-CN': '指定显示的键名', 'en-US': 'Specify the key name to be displayed.' }, + 'desc': { + 'zh-CN': + '

输入内容后,建议列表中默认显示输入建议对象中 value 键名对应的值,若对象中没有 value 键名,就可以通过 value-key 属性指定显示的键名。

\n', + 'en-US': + '

After you enter content, the value corresponding to the value key name of the input object is displayed in the suggestion list by default. If the object does not have a value key name, you can specify the key name by using the value-key attribute.

\n' + }, + 'codeFiles': ['value-key.vue'] + }, + { + 'demoId': 'popper-class', + 'name': { 'zh-CN': '自定义列表样式', 'en-US': 'Custom List Style' }, + 'desc': { + 'zh-CN': + '

popper-class 属性可指定一个样式类名,可自定义建议列表的样式。\npopper-append-to-body 属性可设置是否将下拉列表插入至 body 元素。在下拉列表的定位出现问题时,可将该属性设置为 false。

\n', + 'en-US': + '

popper-class property specifies a style class name to customize the style of the suggestion list. The \npopper-append-to-body property sets whether the drop-down list is inserted into the body element. You can set this property to false when a problem occurs in locating the drop-down list.

\n' + }, + 'codeFiles': ['popper-class.vue'] + }, + { + 'demoId': 'placement', + 'name': { 'zh-CN': '设置菜单弹出位置', 'en-US': 'Set menu pop-up position' }, + 'desc': { + 'zh-CN': + '

placement 属性可以设置菜单弹出位置,默认为 bottom-start。可选值有 top、top-start、top-end、bottom、bottom-start、bottom-end 。

\n', + 'en-US': + '

placement property can be used to set the menu pop-up position. The default value is bottom-start. The options are top, top-start, top-end, bottom, bottom-start, and bottom-end.

\n' + }, + 'codeFiles': ['placement.vue'] + }, + { + 'demoId': 'highlight-first-item', + 'name': { 'zh-CN': '高亮显示第一项', 'en-US': 'Highlight the first item' }, + 'desc': { + 'zh-CN': '

设置 highlight-first-item 属性为 true ,可以突出显示远程搜索建议中的第一项。

\n', + 'en-US': + '

Set the highlight-first-item attribute to true to highlight the first item in the remote search suggestion.

\n' + }, + 'codeFiles': ['highlight-first-item.vue'] + }, + { + 'demoId': 'no-trigger-on-focus', + 'name': { 'zh-CN': '聚焦不显示建议列表', 'en-US': 'Focus does not display the suggestion list' }, + 'desc': { + 'zh-CN': + '

默认输入框聚焦就会显示全部的建议列表,但设置 trigger-on-focus 属性为 false 后只有在匹配到输入建议后才会显示匹配到的建议列表。

\n', + 'en-US': + '

By default, all suggestions are displayed when the input box is focused. However, if trigger-on-focus is set to false, the list of matched suggestions is displayed only after the input suggestions are matched.

\n' + }, + 'codeFiles': ['no-trigger-on-focus.vue'] + }, + { + 'demoId': 'select-event', + 'name': { 'zh-CN': '事件', 'en-US': 'Event' }, + 'desc': { + 'zh-CN': + '

Autocomplete 组件提供 select 事件,点击选中建议项时触发,回调参数为选中建议项。\n通过 select-when-unmatched 设置在输入联想没有匹配值时,按 Enter 键时是否触发 select 事件,默认值为 false。

\n', + 'en-US': + '

Autocomplete provides the select event, which is triggered when a suggestion item is selected. The callback parameter is the suggestion item selected. \n Use select-when-unmatched to set whether to trigger the select event when you press Enter when no matching value is entered. The default value is false.

\n' + }, + 'codeFiles': ['select-event.vue'] + } + ], + apis: [ + { + 'name': 'autocomplete', + 'type': 'component', + 'properties': [ + { + 'name': 'clearable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否可清空', 'en-US': 'Whether to clear data' }, + 'demoId': 'clearable' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入框占位文本', 'en-US': 'Placeholder text in the text box' }, + 'demoId': 'hide-loading1' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'demoId': 'disabled1' + }, + { + 'name': 'value-key', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '输入建议对象中用于显示的键名', + 'en-US': 'Enter the key name for display in the suggestion object.' + }, + 'demoId': 'value-key' + }, + { + 'name': 'value', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '必填值,输入绑定值', 'en-US': 'This parameter is mandatory. Enter a bound value.' }, + 'demoId': 'clearable' + }, + { + 'name': 'debounce', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 300', + 'desc': { 'zh-CN': '获取输入建议的去抖延时', 'en-US': 'Obtain the recommended input dejitter delay.' }, + 'demoId': 'debounce' + }, + { + 'name': 'placement', + 'type': 'String', + 'defaultValue': '该属性的默认值为 bottom-start', + 'desc': { + 'zh-CN': '菜单弹出位置;该属性的可选值为 top / top-start / top-end / bottom / bottom-start / bottom-end', + 'en-US': + 'Menu pop-up position; The optional value of this attribute is top / top-start / top-end / bottom / bottom-start / bottom-end' + }, + 'demoId': 'placement' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'Autocomplete 下拉列表的类名', + 'en-US': 'Class name of the Autocomplete drop-down list box' + }, + 'demoId': 'popper-class' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置组件大小,可设置为:medium,small,mini', + 'en-US': 'Set the component size. The value can be medium, small, or mini.' + }, + 'demoId': 'size' + }, + { + 'name': 'trigger-on-focus', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': '是否在输入框 focus 时显示建议列表', + 'en-US': 'Whether to display the suggestion list when the text box is focused' + }, + 'demoId': 'no-trigger-on-focus' + }, + { + 'name': 'name', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '原生属性', 'en-US': 'Native attribute' }, + 'demoId': 'clearable' + }, + { + 'name': 'select-when-unmatched', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '在输入没有任何匹配建议的情况下,按下回车是否触发 select 事件', + 'en-US': + 'Indicates whether to trigger the select event when pressing Enter when the input does not have any matching suggestions.' + }, + 'demoId': 'select-event' + }, + { + 'name': 'label', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入框关联的label文字', 'en-US': 'Label text associated with the text box' }, + 'demoId': '' + }, + { + 'name': 'prefix-icon', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入框头部图标', 'en-US': 'Icon on the header of the text box' }, + 'demoId': 'custom-icon' + }, + { + 'name': 'suffix-icon', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入框尾部图标', 'en-US': 'Icon at the end of the text box' }, + 'demoId': 'custom-icon' + }, + { + 'name': 'hide-loading', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '是否隐藏远程加载时的加载图标', + 'en-US': 'Whether to hide the loading icon during remote loading' + }, + 'demoId': 'hide-loading' + }, + { + 'name': 'popper-append-to-body', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': '是否将下拉列表插入至 body 元素。在下拉列表的定位出现问题时,可将该属性设置为 false', + 'en-US': + 'Indicates whether to insert the drop-down list into the body element. When a fault occurs in locating the drop-down list, you can set this attribute to false' + }, + 'demoId': 'popper-class' + }, + { + 'name': 'fetch-suggestions', + 'type': 'Function(queryString, callback)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '返回输入建议的方法,仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它', + 'en-US': + 'This method is used to return input suggestions. It is returned by calling callback(data:[]) only when your input suggestions are resolved.' + }, + 'demoId': 'remote-search' + }, + { + 'name': 'highlight-first-item', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '是否默认突出显示远程搜索建议中的第一项', + 'en-US': 'Whether to highlight the first item in remote search suggestions by default' + }, + 'demoId': 'highlight-first-item' + } + ], + 'events': [ + { + 'name': 'select', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '点击选中建议项时触发。回调参数为:选中建议项', + 'en-US': + 'This event is triggered when a suggestion item is selected. The callback parameter is: Selected Suggestions' + }, + 'demoId': 'select-event' + } + ], + 'slots': [ + { + 'name': 'prefix', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入框头部内容', 'en-US': 'Content in the text box header' }, + 'demoId': 'custom-icon' + }, + { + 'name': 'suffix', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入框尾部内容', 'en-US': 'Content at the end of the text box' }, + 'demoId': 'custom-icon' + }, + { + 'name': 'prepend', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入框前置内容', 'en-US': 'Pre-content in the text box' }, + 'demoId': 'append-prepend' + }, + { + 'name': 'append', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入框后置内容', 'en-US': 'Content after the text box' }, + 'demoId': 'append-prepend' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/badge/badge-class-composition-api.vue b/examples/sites/demos/app/badge/badge-class-composition-api.vue new file mode 100644 index 000000000..fbbc900da --- /dev/null +++ b/examples/sites/demos/app/badge/badge-class-composition-api.vue @@ -0,0 +1,15 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/badge/badge-class.spec.ts b/examples/sites/demos/app/badge/badge-class.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/badge-class.spec.ts rename to examples/sites/demos/app/badge/badge-class.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/badge-class.vue b/examples/sites/demos/app/badge/badge-class.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/badge-class.vue rename to examples/sites/demos/app/badge/badge-class.vue diff --git a/examples/sites/demos/app/badge/base-composition-api.vue b/examples/sites/demos/app/badge/base-composition-api.vue new file mode 100644 index 000000000..4d250e839 --- /dev/null +++ b/examples/sites/demos/app/badge/base-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/badge/base.spec.ts b/examples/sites/demos/app/badge/base.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/base.spec.ts rename to examples/sites/demos/app/badge/base.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/base.vue b/examples/sites/demos/app/badge/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/base.vue rename to examples/sites/demos/app/badge/base.vue diff --git a/examples/sites/demos/app/badge/dynamic-hidden-composition-api.vue b/examples/sites/demos/app/badge/dynamic-hidden-composition-api.vue new file mode 100644 index 000000000..d0e718c37 --- /dev/null +++ b/examples/sites/demos/app/badge/dynamic-hidden-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/badge/dynamic-hidden.spec.ts b/examples/sites/demos/app/badge/dynamic-hidden.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/dynamic-hidden.spec.ts rename to examples/sites/demos/app/badge/dynamic-hidden.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/dynamic-hidden.vue b/examples/sites/demos/app/badge/dynamic-hidden.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/dynamic-hidden.vue rename to examples/sites/demos/app/badge/dynamic-hidden.vue diff --git a/examples/sites/demos/app/badge/is-dot-composition-api.vue b/examples/sites/demos/app/badge/is-dot-composition-api.vue new file mode 100644 index 000000000..4dd33c14b --- /dev/null +++ b/examples/sites/demos/app/badge/is-dot-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/badge/is-dot.spec.ts b/examples/sites/demos/app/badge/is-dot.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/is-dot.spec.ts rename to examples/sites/demos/app/badge/is-dot.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/is-dot.vue b/examples/sites/demos/app/badge/is-dot.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/is-dot.vue rename to examples/sites/demos/app/badge/is-dot.vue diff --git a/examples/sites/demos/app/badge/max-composition-api.vue b/examples/sites/demos/app/badge/max-composition-api.vue new file mode 100644 index 000000000..efb4b47db --- /dev/null +++ b/examples/sites/demos/app/badge/max-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/badge/max.spec.ts b/examples/sites/demos/app/badge/max.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/max.spec.ts rename to examples/sites/demos/app/badge/max.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/max.vue b/examples/sites/demos/app/badge/max.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/max.vue rename to examples/sites/demos/app/badge/max.vue diff --git a/examples/sites/demos/app/badge/offset-composition-api.vue b/examples/sites/demos/app/badge/offset-composition-api.vue new file mode 100644 index 000000000..891e04eae --- /dev/null +++ b/examples/sites/demos/app/badge/offset-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/badge/offset.spec.ts b/examples/sites/demos/app/badge/offset.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/offset.spec.ts rename to examples/sites/demos/app/badge/offset.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/offset.vue b/examples/sites/demos/app/badge/offset.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/offset.vue rename to examples/sites/demos/app/badge/offset.vue diff --git a/examples/sites/demos/app/badge/slot-content-composition-api.vue b/examples/sites/demos/app/badge/slot-content-composition-api.vue new file mode 100644 index 000000000..922cc5cda --- /dev/null +++ b/examples/sites/demos/app/badge/slot-content-composition-api.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/badge/slot-content.spec.ts b/examples/sites/demos/app/badge/slot-content.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/slot-content.spec.ts rename to examples/sites/demos/app/badge/slot-content.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/slot-content.vue b/examples/sites/demos/app/badge/slot-content.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/slot-content.vue rename to examples/sites/demos/app/badge/slot-content.vue diff --git a/examples/sites/demos/app/badge/slot-default-composition-api.vue b/examples/sites/demos/app/badge/slot-default-composition-api.vue new file mode 100644 index 000000000..c502bfa3d --- /dev/null +++ b/examples/sites/demos/app/badge/slot-default-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/docs/resources/pc/demo/badge/slot-default.spec.ts b/examples/sites/demos/app/badge/slot-default.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/slot-default.spec.ts rename to examples/sites/demos/app/badge/slot-default.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/slot-default.vue b/examples/sites/demos/app/badge/slot-default.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/slot-default.vue rename to examples/sites/demos/app/badge/slot-default.vue diff --git a/examples/sites/demos/app/badge/target-composition-api.vue b/examples/sites/demos/app/badge/target-composition-api.vue new file mode 100644 index 000000000..e073ae408 --- /dev/null +++ b/examples/sites/demos/app/badge/target-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/docs/resources/pc/demo/badge/target.spec.ts b/examples/sites/demos/app/badge/target.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/target.spec.ts rename to examples/sites/demos/app/badge/target.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/target.vue b/examples/sites/demos/app/badge/target.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/target.vue rename to examples/sites/demos/app/badge/target.vue diff --git a/examples/sites/demos/app/badge/type-composition-api.vue b/examples/sites/demos/app/badge/type-composition-api.vue new file mode 100644 index 000000000..7bd6b5bb7 --- /dev/null +++ b/examples/sites/demos/app/badge/type-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/badge/type.spec.ts b/examples/sites/demos/app/badge/type.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/badge/type.spec.ts rename to examples/sites/demos/app/badge/type.spec.ts diff --git a/examples/docs/resources/pc/demo/badge/type.vue b/examples/sites/demos/app/badge/type.vue similarity index 100% rename from examples/docs/resources/pc/demo/badge/type.vue rename to examples/sites/demos/app/badge/type.vue diff --git a/examples/sites/demos/app/badge/webdoc/badge.cn.md b/examples/sites/demos/app/badge/webdoc/badge.cn.md new file mode 100644 index 000000000..7983c3588 --- /dev/null +++ b/examples/sites/demos/app/badge/webdoc/badge.cn.md @@ -0,0 +1,7 @@ +--- +title: Badge 标记 +--- + +# Badge 标记 + +
Badge 展示指定数据信息,如:我的待办数、新任务数等。
diff --git a/examples/sites/demos/app/badge/webdoc/badge.en.md b/examples/sites/demos/app/badge/webdoc/badge.en.md new file mode 100644 index 000000000..196d11a2b --- /dev/null +++ b/examples/sites/demos/app/badge/webdoc/badge.en.md @@ -0,0 +1,7 @@ +--- +title: Badge flag +--- + +# Badge flag + +
Badge displays specified data, such as the number of to-do tasks and the number of new tasks.
diff --git a/examples/sites/demos/app/badge/webdoc/badge.js b/examples/sites/demos/app/badge/webdoc/badge.js new file mode 100644 index 000000000..04649cab8 --- /dev/null +++ b/examples/sites/demos/app/badge/webdoc/badge.js @@ -0,0 +1,188 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': '

Badge 展示指定数据信息,如:我的待办数、新任务数等。

\n', + 'en-US': + '

Badge Displays specified data, such as the number of to-do tasks and the number of new tasks.

\n' + }, + 'codeFiles': ['base.vue'] + }, + { + 'demoId': 'type', + 'name': { 'zh-CN': '主題样式', 'en-US': 'Theme Style' }, + 'desc': { + 'zh-CN': + '

type 设置显示主题,可选值:primary、success、warning、danger、info,默认值:danger

\n', + 'en-US': + '

type Set the display theme. The options are primary, success, warning, danger, and info. The default value is danger

\n' + }, + 'codeFiles': ['type.vue'] + }, + { + 'demoId': 'is-dot', + 'name': { 'zh-CN': '小圆点标记', 'en-US': 'Small dot mark' }, + 'desc': { + 'zh-CN': '

is-dot 显示小圆点标记

\n', + 'en-US': '

is-dot Display small dot mark

\n' + }, + 'codeFiles': ['is-dot.vue'] + }, + { + 'demoId': 'max', + 'name': { 'zh-CN': '计数最大值', 'en-US': 'Maximum count value' }, + 'desc': { + 'zh-CN': "

max 超过最大值会显示 '{max}+'

\n", + 'en-US': "

max exceeds the maximum value, '{max}+'

\n is displayed" + }, + 'codeFiles': ['max.vue'] + }, + { + 'demoId': 'target', + 'name': { 'zh-CN': '跳转链接', 'en-US': 'Link' }, + 'desc': { + 'zh-CN': '

href定义跳转链接

\n', + 'en-US': '

href Define Jump Link

\n' + }, + 'codeFiles': ['target.vue'] + }, + { + 'demoId': 'badge-class', + 'name': { 'zh-CN': '自定义类名', 'en-US': 'Custom Class Name' }, + 'desc': { + 'zh-CN': '

badge-class 自定义类名

\n', + 'en-US': '

badge-class Custom Class Name

\n' + }, + 'codeFiles': ['badge-class.vue'] + }, + { + 'demoId': 'slot-default', + 'name': { 'zh-CN': '自定义标记目标', 'en-US': 'Custom Tag Target' }, + 'desc': { + 'zh-CN': '

default slot 标记内容自定义

\n', + 'en-US': '

default slot Tag Content Custom

\n' + }, + 'codeFiles': ['slot-default.vue'] + }, + { + 'demoId': 'slot-content', + 'name': { 'zh-CN': '自定义提示内容', 'en-US': 'Customized prompt content' }, + 'desc': { + 'zh-CN': '

content slot 自定义提示内容

\n', + 'en-US': '

content slot Custom Prompt Content

\n' + }, + 'codeFiles': ['slot-content.vue'] + }, + { + 'demoId': 'dynamic-hidden', + 'name': { 'zh-CN': '消息已读动态隐藏标记', 'en-US': 'Dynamic hiding flag of read messages' }, + 'desc': { 'zh-CN': '

hidden 隐藏标记

\n', 'en-US': '

hidden Hide Tag

\n' }, + 'codeFiles': ['dynamic-hidden.vue'] + }, + { + 'demoId': 'offset', + 'name': { 'zh-CN': '标记的位置', 'en-US': 'Tag Offset' }, + 'desc': { + 'zh-CN': '

offset 调整标记的位置

\n', + 'en-US': '

offset Custom Tag Offset

\n' + }, + 'codeFiles': ['offset.vue'] + } + ], + apis: [ + { + 'name': 'badge', + 'type': 'component', + 'properties': [ + { + 'name': 'value', + 'type': 'Number | String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '数据集对象,支持静态及动态数据。;显示值', + 'en-US': 'Dataset object, which supports static and dynamic data. ;Display Value' + }, + 'demoId': 'type' + }, + { + 'name': 'href', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '指定跳转的目标页面地址。', 'en-US': 'Specify the URL of the target page.' }, + 'demoId': 'target' + }, + { + 'name': 'max', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '指定徽章显示的最大值,如果实际获取的徽章值超过该最大值,则以最大值后接一个"+"的形式显示徽章数;最大值,超过最大值会显示 \'{max}+\',要求 value 是 Number 类型', + 'en-US': + 'Specifies the maximum number of badges to be displayed. If the actual badge value exceeds the maximum value, the number of badges is displayed in the format of "+". Maximum value. If the value exceeds the maximum value, \'{max}+\' is displayed. The value must be of the Number type.' + }, + 'demoId': 'max' + }, + { + 'name': 'is-dot', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '设置是否有默认的新消息提示。;小圆点', + 'en-US': 'Sets whether there is a default new message prompt. ; Little Dots' + }, + 'demoId': 'is-dot' + }, + { + 'name': 'hidden', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '隐藏 badge', 'en-US': 'Hide badge' }, + 'demoId': 'dynamic-hidden' + }, + { + 'name': 'type', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '该属性的可选值为 primary / success / warning / danger / info', + 'en-US': 'The value of this attribute can be primary / success / warning / danger / info' + }, + 'demoId': 'type' + }, + { + 'name': 'target', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '指定点击徽章 Dom 节点时链接到目标页面的跳转方式,仅在 href 属性存在时使用。', + 'en-US': + 'Specifies the redirection mode to the target page when you click the badge Dom node. This parameter is used only when the href attribute exists.' + }, + 'demoId': 'target' + } + ], + 'events': [], + 'slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认插槽', 'en-US': 'Default slot' }, + 'demoId': 'slot-default' + }, + { + 'name': 'content', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '消息提示内容', 'en-US': 'Message Content' }, + 'demoId': 'slot-content' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/breadcrumb/base-composition-api.vue b/examples/sites/demos/app/breadcrumb/base-composition-api.vue new file mode 100644 index 000000000..d4f756a85 --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/base-composition-api.vue @@ -0,0 +1,33 @@ + + + diff --git a/examples/sites/demos/app/breadcrumb/base-on-route-composition-api.vue b/examples/sites/demos/app/breadcrumb/base-on-route-composition-api.vue new file mode 100644 index 000000000..4cb0bd2ff --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/base-on-route-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/breadcrumb/base-on-route.vue b/examples/sites/demos/app/breadcrumb/base-on-route.vue similarity index 83% rename from examples/docs/resources/pc/demo/breadcrumb/base-on-route.vue rename to examples/sites/demos/app/breadcrumb/base-on-route.vue index c66839695..dfb9153f5 100644 --- a/examples/docs/resources/pc/demo/breadcrumb/base-on-route.vue +++ b/examples/sites/demos/app/breadcrumb/base-on-route.vue @@ -1,6 +1,8 @@ diff --git a/examples/docs/resources/pc/demo/breadcrumb/base.spec.ts b/examples/sites/demos/app/breadcrumb/base.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/breadcrumb/base.spec.ts rename to examples/sites/demos/app/breadcrumb/base.spec.ts diff --git a/examples/sites/demos/app/breadcrumb/base.vue b/examples/sites/demos/app/breadcrumb/base.vue new file mode 100644 index 000000000..986fa4a3f --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/base.vue @@ -0,0 +1,40 @@ + + + diff --git a/examples/sites/demos/app/breadcrumb/options-composition-api.vue b/examples/sites/demos/app/breadcrumb/options-composition-api.vue new file mode 100644 index 000000000..4499335ef --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/options-composition-api.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/breadcrumb/options.spec.ts b/examples/sites/demos/app/breadcrumb/options.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/breadcrumb/options.spec.ts rename to examples/sites/demos/app/breadcrumb/options.spec.ts diff --git a/examples/docs/resources/pc/demo/breadcrumb/options.vue b/examples/sites/demos/app/breadcrumb/options.vue similarity index 100% rename from examples/docs/resources/pc/demo/breadcrumb/options.vue rename to examples/sites/demos/app/breadcrumb/options.vue diff --git a/examples/sites/demos/app/breadcrumb/separator-composition-api.vue b/examples/sites/demos/app/breadcrumb/separator-composition-api.vue new file mode 100644 index 000000000..1f1c4ec8f --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/separator-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/breadcrumb/separator.spec.ts b/examples/sites/demos/app/breadcrumb/separator.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/breadcrumb/separator.spec.ts rename to examples/sites/demos/app/breadcrumb/separator.spec.ts diff --git a/examples/docs/resources/pc/demo/breadcrumb/separator.vue b/examples/sites/demos/app/breadcrumb/separator.vue similarity index 84% rename from examples/docs/resources/pc/demo/breadcrumb/separator.vue rename to examples/sites/demos/app/breadcrumb/separator.vue index 9008a6e38..f67ac7e3f 100644 --- a/examples/docs/resources/pc/demo/breadcrumb/separator.vue +++ b/examples/sites/demos/app/breadcrumb/separator.vue @@ -3,7 +3,7 @@ 首页 - 产品 + 产品 软件 @@ -11,7 +11,7 @@ 首页 - 产品 + 产品 软件 diff --git a/examples/sites/demos/app/breadcrumb/slot-default-composition-api.vue b/examples/sites/demos/app/breadcrumb/slot-default-composition-api.vue new file mode 100644 index 000000000..da780969b --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/slot-default-composition-api.vue @@ -0,0 +1,15 @@ + + + diff --git a/examples/docs/resources/pc/demo/breadcrumb/slot-default.spec.ts b/examples/sites/demos/app/breadcrumb/slot-default.spec.ts similarity index 77% rename from examples/docs/resources/pc/demo/breadcrumb/slot-default.spec.ts rename to examples/sites/demos/app/breadcrumb/slot-default.spec.ts index 3b35b5dcf..170dd37b2 100644 --- a/examples/docs/resources/pc/demo/breadcrumb/slot-default.spec.ts +++ b/examples/sites/demos/app/breadcrumb/slot-default.spec.ts @@ -6,5 +6,5 @@ test('Breadcrumb 自定义节点', async ({ page }) => { const breadcrumbItem = page.locator('.tiny-breadcrumb__item') const slotItem = breadcrumbItem.nth(1).locator('a') - await expect(slotItem).toHaveAttribute('href', 'localhost:3000/webcore/v3/zh-CN/component/breadcrumb') + await expect(slotItem).toHaveAttribute('href', '/') }) diff --git a/examples/sites/demos/app/breadcrumb/slot-default.vue b/examples/sites/demos/app/breadcrumb/slot-default.vue new file mode 100644 index 000000000..e24e6edd3 --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/slot-default.vue @@ -0,0 +1,22 @@ + + + diff --git a/examples/sites/demos/app/breadcrumb/webdoc/breadcrumb.cn.md b/examples/sites/demos/app/breadcrumb/webdoc/breadcrumb.cn.md new file mode 100644 index 000000000..3f8373ef6 --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/webdoc/breadcrumb.cn.md @@ -0,0 +1,7 @@ +--- +title: Breadcrumb 面包屑 +--- + +# Breadcrumb 面包屑 + +
Breadcrumb 面包屑导航,作用是告诉访问者他们目前在网站中的位置以及如何返回。
diff --git a/examples/sites/demos/app/breadcrumb/webdoc/breadcrumb.en.md b/examples/sites/demos/app/breadcrumb/webdoc/breadcrumb.en.md new file mode 100644 index 000000000..02bb7eefe --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/webdoc/breadcrumb.en.md @@ -0,0 +1,7 @@ +--- +title: Breadcrumb +--- + +# Breadcrumb + +
Breadcrumb navigation, which tells visitors where they are currently on the site and how to get back.
diff --git a/examples/sites/demos/app/breadcrumb/webdoc/breadcrumb.js b/examples/sites/demos/app/breadcrumb/webdoc/breadcrumb.js new file mode 100644 index 000000000..9b9a48310 --- /dev/null +++ b/examples/sites/demos/app/breadcrumb/webdoc/breadcrumb.js @@ -0,0 +1,152 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['base.vue'] + }, + { + 'demoId': 'slot-default', + 'name': { 'zh-CN': '自定义节点', 'en-US': 'Custom Node' }, + 'desc': { + 'zh-CN': + '

设置子组件 BreadcrumbItem 的 默认插槽,自定义节点内容。to 设置路由跳转的对象,同时设置 replace 后将不会向 history 添加新记录。

\n', + 'en-US': + '

Sets the default slot of the subcomponent BreadcrumbItem and customizes the node content. to sets the object of route redirection. After replace is set, no new record is added to history.

\n' + }, + 'codeFiles': ['slot-default.vue'] + }, + { + 'demoId': 'separator', + 'name': { 'zh-CN': '自定义分隔符', 'en-US': 'Custom separator' }, + 'desc': { + 'zh-CN': '

设置 separatorseparator-icon 属性,自定义分隔符。

\n', + 'en-US': + '

Set the separator or separator-icon attribute to customize the separator.

\n' + }, + 'codeFiles': ['separator.vue'] + }, + { + 'demoId': 'options', + 'name': { 'zh-CN': 'options 配置', 'en-US': 'options configuration' }, + 'desc': { + 'zh-CN': + '

通过 options 总体配置每个 BreadcrumbItem

设置text-field 指定显示字段,默认显示字段为 label\n', + 'en-US': + '

Totally configure each BreadcrumbItem via options.

Set text-field to specify the field to be displayed. The default field to be displayed is label\n' + }, + 'codeFiles': ['options.vue'] + } + ], + apis: [ + { + 'name': 'breadcrumb', + 'type': 'component', + 'properties': [], + 'events': [], + 'slots': [], + 'breadcrumb-attrs': [ + { + 'name': 'separator', + 'type': 'String', + 'defaultValue': '该属性的默认值为 >', + 'desc': { 'zh-CN': '分隔符', 'en-US': 'Separator' }, + 'demoId': 'separator' + }, + { + 'name': 'separator-icon', + 'type': 'Object', + 'defaultValue': '', + 'desc': { 'zh-CN': '图标分隔符 class', 'en-US': 'Icon separator class' }, + 'demoId': 'separator' + }, + { + 'name': 'options', + 'type': 'Array', + 'defaultValue': '[]', + 'desc': { + 'zh-CN': '配置 options ,可以单独使用 tiny-breadcrumb 组件', + 'en-US': 'Configure options. The tiny-breadcrumb component can be used independently.' + }, + 'demoId': 'options' + }, + { + 'name': 'text-field', + 'type': 'String', + 'defaultValue': 'label', + 'desc': { + 'zh-CN': '指定面包屑的显示字段,结合 options 使用,组件默认 label ', + 'en-US': + 'Specify the breadcrumb display field. This field is used together with options. The component defaults to label.' + }, + 'demoId': 'options' + } + ], + 'breadcrumb-events': [ + { + 'name': 'select', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '点击 breadcrumb-item 时触发', + 'en-US': 'This event is triggered when breadcrumb-item is clicked.' + }, + 'demoId': 'options' + } + ], + 'breadcrumbItem-attrs': [ + { + 'name': 'to', + 'type': 'String , Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '路由跳转对象,同 vue-router 的 to', + 'en-US': 'Route redirection object, which is the same as to of vue-router' + }, + 'demoId': 'slot-default' + }, + { + 'name': 'replace', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '在使用 to 进行路由跳转时,启用 replace 将不会向 history 添加新记录', + 'en-US': 'When to is used for route redirection, if replace is enabled, no new record is added to history.' + }, + 'demoId': 'slot-default' + }, + { + 'name': 'label', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '定义面包屑的显示值', 'en-US': 'Define the breadcrumb display value.' }, + 'demoId': 'base' + } + ], + 'breadcrumbItem-slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认插槽', 'en-US': 'Default slot' }, + 'demoId': 'slot-default' + } + ], + 'breadcrumbItem-events': [ + { + 'name': 'select', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '点击 breadcrumb-item 时触发', + 'en-US': 'This event is triggered when breadcrumb-item is clicked.' + }, + 'demoId': 'base' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/bulletin-board/active-name-composition-api.vue b/examples/sites/demos/app/bulletin-board/active-name-composition-api.vue new file mode 100644 index 000000000..88a160327 --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/active-name-composition-api.vue @@ -0,0 +1,92 @@ + + + diff --git a/examples/docs/resources/pc/demo/bulletin-board/active-name.spec.ts b/examples/sites/demos/app/bulletin-board/active-name.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/active-name.spec.ts rename to examples/sites/demos/app/bulletin-board/active-name.spec.ts diff --git a/examples/docs/resources/pc/demo/bulletin-board/active-name.vue b/examples/sites/demos/app/bulletin-board/active-name.vue similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/active-name.vue rename to examples/sites/demos/app/bulletin-board/active-name.vue diff --git a/examples/sites/demos/app/bulletin-board/base-composition-api.vue b/examples/sites/demos/app/bulletin-board/base-composition-api.vue new file mode 100644 index 000000000..2d4b991b3 --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/base-composition-api.vue @@ -0,0 +1,91 @@ + + + diff --git a/examples/docs/resources/pc/demo/bulletin-board/base.spec.ts b/examples/sites/demos/app/bulletin-board/base.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/base.spec.ts rename to examples/sites/demos/app/bulletin-board/base.spec.ts diff --git a/examples/docs/resources/pc/demo/bulletin-board/base.vue b/examples/sites/demos/app/bulletin-board/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/base.vue rename to examples/sites/demos/app/bulletin-board/base.vue diff --git a/examples/sites/demos/app/bulletin-board/icon-composition-api.vue b/examples/sites/demos/app/bulletin-board/icon-composition-api.vue new file mode 100644 index 000000000..8fd8fcdf6 --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/icon-composition-api.vue @@ -0,0 +1,93 @@ + + + diff --git a/examples/docs/resources/pc/demo/bulletin-board/icon.spec.ts b/examples/sites/demos/app/bulletin-board/icon.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/icon.spec.ts rename to examples/sites/demos/app/bulletin-board/icon.spec.ts diff --git a/examples/docs/resources/pc/demo/bulletin-board/icon.vue b/examples/sites/demos/app/bulletin-board/icon.vue similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/icon.vue rename to examples/sites/demos/app/bulletin-board/icon.vue diff --git a/examples/sites/demos/app/bulletin-board/more-link-composition-api.vue b/examples/sites/demos/app/bulletin-board/more-link-composition-api.vue new file mode 100644 index 000000000..6365d57cc --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/more-link-composition-api.vue @@ -0,0 +1,92 @@ + + + diff --git a/examples/docs/resources/pc/demo/bulletin-board/more-link.spec.ts b/examples/sites/demos/app/bulletin-board/more-link.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/more-link.spec.ts rename to examples/sites/demos/app/bulletin-board/more-link.spec.ts diff --git a/examples/docs/resources/pc/demo/bulletin-board/more-link.vue b/examples/sites/demos/app/bulletin-board/more-link.vue similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/more-link.vue rename to examples/sites/demos/app/bulletin-board/more-link.vue diff --git a/examples/sites/demos/app/bulletin-board/route-composition-api.vue b/examples/sites/demos/app/bulletin-board/route-composition-api.vue new file mode 100644 index 000000000..72b0df26d --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/route-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/bulletin-board/route.spec.ts b/examples/sites/demos/app/bulletin-board/route.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/route.spec.ts rename to examples/sites/demos/app/bulletin-board/route.spec.ts diff --git a/examples/docs/resources/pc/demo/bulletin-board/route.vue b/examples/sites/demos/app/bulletin-board/route.vue similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/route.vue rename to examples/sites/demos/app/bulletin-board/route.vue diff --git a/examples/sites/demos/app/bulletin-board/tab-title-composition-api.vue b/examples/sites/demos/app/bulletin-board/tab-title-composition-api.vue new file mode 100644 index 000000000..2d4b991b3 --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/tab-title-composition-api.vue @@ -0,0 +1,91 @@ + + + diff --git a/examples/docs/resources/pc/demo/bulletin-board/tab-title.spec.ts b/examples/sites/demos/app/bulletin-board/tab-title.spec.ts similarity index 94% rename from examples/docs/resources/pc/demo/bulletin-board/tab-title.spec.ts rename to examples/sites/demos/app/bulletin-board/tab-title.spec.ts index cfc83e0ef..73a59f884 100644 --- a/examples/docs/resources/pc/demo/bulletin-board/tab-title.spec.ts +++ b/examples/sites/demos/app/bulletin-board/tab-title.spec.ts @@ -1,5 +1,4 @@ import { test, expect } from '@playwright/test' -import exp from 'constants' test('BulletinBoard 选项卡标题(', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) diff --git a/examples/docs/resources/pc/demo/bulletin-board/tab-title.vue b/examples/sites/demos/app/bulletin-board/tab-title.vue similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/tab-title.vue rename to examples/sites/demos/app/bulletin-board/tab-title.vue diff --git a/examples/sites/demos/app/bulletin-board/title-composition-api.vue b/examples/sites/demos/app/bulletin-board/title-composition-api.vue new file mode 100644 index 000000000..9ca09037b --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/title-composition-api.vue @@ -0,0 +1,91 @@ + + + diff --git a/examples/docs/resources/pc/demo/bulletin-board/title.spec.ts b/examples/sites/demos/app/bulletin-board/title.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/title.spec.ts rename to examples/sites/demos/app/bulletin-board/title.spec.ts diff --git a/examples/docs/resources/pc/demo/bulletin-board/title.vue b/examples/sites/demos/app/bulletin-board/title.vue similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/title.vue rename to examples/sites/demos/app/bulletin-board/title.vue diff --git a/examples/sites/demos/app/bulletin-board/url-composition-api.vue b/examples/sites/demos/app/bulletin-board/url-composition-api.vue new file mode 100644 index 000000000..391c6e34c --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/url-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/bulletin-board/url.spec.ts b/examples/sites/demos/app/bulletin-board/url.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/url.spec.ts rename to examples/sites/demos/app/bulletin-board/url.spec.ts diff --git a/examples/docs/resources/pc/demo/bulletin-board/url.vue b/examples/sites/demos/app/bulletin-board/url.vue similarity index 100% rename from examples/docs/resources/pc/demo/bulletin-board/url.vue rename to examples/sites/demos/app/bulletin-board/url.vue diff --git a/examples/sites/demos/app/bulletin-board/webdoc/bulletin-board.cn.md b/examples/sites/demos/app/bulletin-board/webdoc/bulletin-board.cn.md new file mode 100644 index 000000000..148f9c384 --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/webdoc/bulletin-board.cn.md @@ -0,0 +1,7 @@ +--- +title: BulletinBoard 公告牌 +--- + +# BulletinBoard 公告牌 + +
BulletinBoard 公告牌组件,展现需要重点关注的信息。
diff --git a/examples/sites/demos/app/bulletin-board/webdoc/bulletin-board.en.md b/examples/sites/demos/app/bulletin-board/webdoc/bulletin-board.en.md new file mode 100644 index 000000000..10facfe90 --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/webdoc/bulletin-board.en.md @@ -0,0 +1,7 @@ +--- +title: BulletinBoard +--- + +# BulletinBoard + +
BulletinBoard bulletin board component, which displays the information that needs to be paid attention to.
diff --git a/examples/sites/demos/app/bulletin-board/webdoc/bulletin-board.js b/examples/sites/demos/app/bulletin-board/webdoc/bulletin-board.js new file mode 100644 index 000000000..c131be1d5 --- /dev/null +++ b/examples/sites/demos/app/bulletin-board/webdoc/bulletin-board.js @@ -0,0 +1,159 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

必须设置 data 属性设置公告牌公告信息数据,以及 tab-title 属性设置每个公告牌标题。

\n', + 'en-US': + '

The data attribute must be set to set the bulletin information data, and the tab-title attribute must be set to set the title of each bulletin board.

\n' + }, + 'codeFiles': ['base.vue'] + }, + { + 'demoId': 'title', + 'name': { 'zh-CN': '公告牌标题', 'en-US': 'Billboard Title' }, + 'desc': { + 'zh-CN': '

可通过 title 设置公告牌标题。

\n', + 'en-US': '

You can use title to set the bulletin board title.

\n' + }, + 'codeFiles': ['title.vue'] + }, + { + 'demoId': 'active-name', + 'name': { 'zh-CN': '默认激活的选项卡', 'en-US': 'Default Activated Tab' }, + 'desc': { + 'zh-CN': '

可通过 active-name 设置默认激活的选项卡,从 1 开始计算。

\n', + 'en-US': + '

You can set the default active tab by active-name, starting from 1.

\n' + }, + 'codeFiles': ['active-name.vue'] + }, + { + 'demoId': 'tab-title', + 'name': { 'zh-CN': '选项卡标题', 'en-US': 'Tab Title' }, + 'desc': { + 'zh-CN': '

可通过 tab-title 属性自定义选项卡标题。

\n', + 'en-US': '

You can customize the tab title by using the tab-title attribute.

\n' + }, + 'codeFiles': ['tab-title.vue'] + }, + { + 'demoId': 'url', + 'name': { 'zh-CN': '基于Url的跳转', 'en-US': 'URL-based redirection' }, + 'desc': { + 'zh-CN': '

基于 Url 的跳转是根据数据中的 urltarget 字段进行跳转的。

\n', + 'en-US': + '

The URL-based redirection is based on the url and target fields in the data.

\n' + }, + 'codeFiles': ['url.vue'] + }, + { + 'demoId': 'route', + 'name': { 'zh-CN': '基于Route的跳转', 'en-US': 'Route-based redirection' }, + 'desc': { + 'zh-CN': '

基于 Route 的跳转是根据数据中的 route 字段进行跳转的。

\n', + 'en-US': '

Route-based redirection is performed based on the route field in the data.

\n' + }, + 'codeFiles': ['route.vue'] + }, + { + 'demoId': 'more-link', + 'name': { 'zh-CN': '显示 “更多” 链接', 'en-US': 'Show More links' }, + 'desc': { + 'zh-CN': + '

可通过 more-link 显示并设置更多链接。 show-more 设置是否显示更多按钮,默认为 true。

\n', + 'en-US': + '

You can use more-link to display and set more links. show-more Sets whether to display the More button. The default value is true.

\n' + }, + 'codeFiles': ['more-link.vue'] + }, + { + 'demoId': 'icon', + 'name': { 'zh-CN': '自定义新公告前缀', 'en-US': 'User-defined bulletin prefix' }, + 'desc': { + 'zh-CN': '

可通过 icon 自定义新公告前缀图标。

\n', + 'en-US': '

You can use icon to customize the new bulletin prefix icon.

\n' + }, + 'codeFiles': ['icon.vue'] + } + ], + apis: [ + { + 'name': 'bulletin-board', + 'type': 'component', + 'properties': [ + { + 'name': 'active-name', + 'type': 'String', + 'defaultValue': '该属性的默认值为 1', + 'desc': { + 'zh-CN': "默认显示第1栏,可选'1' '2' '3'等", + 'en-US': 'By default, column 1 is displayed. You can select 1, 2, or 3.' + }, + 'demoId': 'active-name' + }, + { + 'name': 'data', + 'type': 'Array', + 'defaultValue': '', + 'desc': { 'zh-CN': 'tab-item 数据;tab-item 数据', 'en-US': 'tab-item data; tab-item data' }, + 'demoId': 'base' + }, + { + 'name': 'icon', + 'type': 'Object , String', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'tab-item中第一条信息的字体图标;tab-item中第一条信息的字体图标', + 'en-US': + 'Font icon of the first information in tab-item; Font icon of the first piece of information in tab-item' + }, + 'demoId': 'icon' + }, + { + 'name': 'show-more', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': '是否显示更多按钮,默认显示,需要与 more-link 同时使用', + 'en-US': + 'Indicates whether to display the More button. The More button is displayed by default and must be used together with more-link.' + }, + 'demoId': 'more-link' + }, + { + 'name': 'more-link', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': + "更多按钮跳转地址,show-more 为true 的时候生效;moreLink: { url: 'localhost:3000/', // 跳转地址,url 和 route 属性二选一,url优先级高 route: 'Alert', // 跳转路由,url 和 route 属性二选一,url优先级高 target: '_blank', // 跳转方式 text: '更多' // 链接文本 }", + 'en-US': + "More button redirection URL. This parameter is valid only when show-more is set to true. moreLink: {url:'localhost:3000/', //Redirection address. Either the URL or route attribute must be selected. The URL has a higher priority. route:'Alert', //Redirection route. Either the URL or route attribute must be selected. URL has a high priority target: '_blank', //Redirection mode text: 'More' //Link text}" + }, + 'demoId': 'more-link' + }, + { + 'name': 'tab-title', + 'type': 'Array', + 'defaultValue': '', + 'desc': { 'zh-CN': 'tab栏数据', 'en-US': 'Data in the tab column' }, + 'demoId': 'tab-title' + }, + { + 'name': 'title', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '公告牌的标题', 'en-US': 'Billboard title' }, + 'demoId': 'title' + } + ], + 'events': [], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/button-group/base-composition-api.vue b/examples/sites/demos/app/button-group/base-composition-api.vue new file mode 100644 index 000000000..74f7202be --- /dev/null +++ b/examples/sites/demos/app/button-group/base-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/base.spec.ts b/examples/sites/demos/app/button-group/base.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/base.spec.ts rename to examples/sites/demos/app/button-group/base.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/base.vue b/examples/sites/demos/app/button-group/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/base.vue rename to examples/sites/demos/app/button-group/base.vue diff --git a/examples/sites/demos/app/button-group/border-composition-api.vue b/examples/sites/demos/app/button-group/border-composition-api.vue new file mode 100644 index 000000000..a9abf7df6 --- /dev/null +++ b/examples/sites/demos/app/button-group/border-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/border.spec.ts b/examples/sites/demos/app/button-group/border.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/border.spec.ts rename to examples/sites/demos/app/button-group/border.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/border.vue b/examples/sites/demos/app/button-group/border.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/border.vue rename to examples/sites/demos/app/button-group/border.vue diff --git a/examples/sites/demos/app/button-group/button-group-multiple-composition-api.vue b/examples/sites/demos/app/button-group/button-group-multiple-composition-api.vue new file mode 100644 index 000000000..a70efb55a --- /dev/null +++ b/examples/sites/demos/app/button-group/button-group-multiple-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/button-group-multiple.spec.ts b/examples/sites/demos/app/button-group/button-group-multiple.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/button-group-multiple.spec.ts rename to examples/sites/demos/app/button-group/button-group-multiple.spec.ts diff --git a/examples/sites/demos/app/button-group/button-group-multiple.vue b/examples/sites/demos/app/button-group/button-group-multiple.vue new file mode 100644 index 000000000..aba4c22a4 --- /dev/null +++ b/examples/sites/demos/app/button-group/button-group-multiple.vue @@ -0,0 +1,34 @@ + + + diff --git a/examples/sites/demos/app/button-group/change-event-composition-api.vue b/examples/sites/demos/app/button-group/change-event-composition-api.vue new file mode 100644 index 000000000..9ffe9a9c9 --- /dev/null +++ b/examples/sites/demos/app/button-group/change-event-composition-api.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/change-event.spec.ts b/examples/sites/demos/app/button-group/change-event.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/change-event.spec.ts rename to examples/sites/demos/app/button-group/change-event.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/change-event.vue b/examples/sites/demos/app/button-group/change-event.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/change-event.vue rename to examples/sites/demos/app/button-group/change-event.vue diff --git a/examples/sites/demos/app/button-group/data-composition-api.vue b/examples/sites/demos/app/button-group/data-composition-api.vue new file mode 100644 index 000000000..8504c2119 --- /dev/null +++ b/examples/sites/demos/app/button-group/data-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/data.spec.ts b/examples/sites/demos/app/button-group/data.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/data.spec.ts rename to examples/sites/demos/app/button-group/data.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/data.vue b/examples/sites/demos/app/button-group/data.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/data.vue rename to examples/sites/demos/app/button-group/data.vue diff --git a/examples/sites/demos/app/button-group/disabled-composition-api.vue b/examples/sites/demos/app/button-group/disabled-composition-api.vue new file mode 100644 index 000000000..1ed0b9cb3 --- /dev/null +++ b/examples/sites/demos/app/button-group/disabled-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/sites/demos/app/button-group/disabled.spec.ts b/examples/sites/demos/app/button-group/disabled.spec.ts new file mode 100644 index 000000000..a260e5239 --- /dev/null +++ b/examples/sites/demos/app/button-group/disabled.spec.ts @@ -0,0 +1,14 @@ +import { test, expect } from '@playwright/test' + +test('测试按钮是否禁用', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/button-group/disabled') + await expect(page.getByRole('button', { name: 'Button1' }).first()).toHaveClass(/disabled/) + await expect(page.getByRole('button', { name: 'Button2' }).first()).toHaveClass(/disabled/) + await expect(page.getByRole('button', { name: 'Button2' }).first()).toHaveClass(/disabled/) + await expect(page.getByRole('button', { name: 'Button1' }).nth(1)).toHaveClass(/disabled/) + await expect(page.getByRole('button', { name: 'Button2' }).nth(1)).toHaveClass(/disabled/) + await expect(page.getByRole('button', { name: 'Button3' }).nth(1)).toHaveClass(/disabled/) + await expect(page.getByRole('button', { name: 'Button1' }).nth(2)).not.toHaveClass(/disabled/) + await expect(page.getByRole('button', { name: 'Button2' }).nth(2)).toHaveClass(/disabled/) +}) diff --git a/examples/sites/demos/app/button-group/disabled.vue b/examples/sites/demos/app/button-group/disabled.vue new file mode 100644 index 000000000..c991ec87f --- /dev/null +++ b/examples/sites/demos/app/button-group/disabled.vue @@ -0,0 +1,36 @@ + + + diff --git a/examples/sites/demos/app/button-group/event-edit-composition-api.vue b/examples/sites/demos/app/button-group/event-edit-composition-api.vue new file mode 100644 index 000000000..ddf00d243 --- /dev/null +++ b/examples/sites/demos/app/button-group/event-edit-composition-api.vue @@ -0,0 +1,32 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/event-edit.spec.ts b/examples/sites/demos/app/button-group/event-edit.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/event-edit.spec.ts rename to examples/sites/demos/app/button-group/event-edit.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/event-edit.vue b/examples/sites/demos/app/button-group/event-edit.vue similarity index 79% rename from examples/docs/resources/pc/demo/button-group/event-edit.vue rename to examples/sites/demos/app/button-group/event-edit.vue index f13da07ca..e9062f394 100644 --- a/examples/docs/resources/pc/demo/button-group/event-edit.vue +++ b/examples/sites/demos/app/button-group/event-edit.vue @@ -1,6 +1,12 @@ diff --git a/examples/sites/demos/app/button-group/plain-composition-api.vue b/examples/sites/demos/app/button-group/plain-composition-api.vue new file mode 100644 index 000000000..45f6c92b2 --- /dev/null +++ b/examples/sites/demos/app/button-group/plain-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/plain.spec.ts b/examples/sites/demos/app/button-group/plain.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/plain.spec.ts rename to examples/sites/demos/app/button-group/plain.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/plain.vue b/examples/sites/demos/app/button-group/plain.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/plain.vue rename to examples/sites/demos/app/button-group/plain.vue diff --git a/examples/sites/demos/app/button-group/show-edit-composition-api.vue b/examples/sites/demos/app/button-group/show-edit-composition-api.vue new file mode 100644 index 000000000..1751aaf3c --- /dev/null +++ b/examples/sites/demos/app/button-group/show-edit-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/show-edit.spec.ts b/examples/sites/demos/app/button-group/show-edit.spec.ts similarity index 92% rename from examples/docs/resources/pc/demo/button-group/show-edit.spec.ts rename to examples/sites/demos/app/button-group/show-edit.spec.ts index 7be4d4b2d..f19fcb6bc 100644 --- a/examples/docs/resources/pc/demo/button-group/show-edit.spec.ts +++ b/examples/sites/demos/app/button-group/show-edit.spec.ts @@ -25,7 +25,8 @@ test('测试是否显示编辑按钮', async ({ page }) => { const moreButtonSvg = moreButton.locator('svg path').first() const editButtonSvg = editButton.locator('svg path').first() const moreSvgPathReg = /^M292\.768 449\.694c2\.491\.515.+002-12.555-\.002z$/ - const editSvgPath = 'm14.6 6.6-7.5 7.6c-.3.3-.3.7 0 1 .1.1.4.2.5.2.1 0 .4-.1.5-.2l7.5-7.5c.3-.3.3-.7 0-1-.3-.3-.7-.3-1-.1z' + const editSvgPath = + 'm14.6 6.6-7.5 7.6c-.3.3-.3.7 0 1 .1.1.4.2.5.2.1 0 .4-.1.5-.2l7.5-7.5c.3-.3.3-.7 0-1-.3-.3-.7-.3-1-.1z' await expect(moreButtonSvg).toHaveAttribute('d', moreSvgPathReg) await expect(editButtonSvg).toHaveAttribute('d', editSvgPath) }) diff --git a/examples/docs/resources/pc/demo/button-group/show-edit.vue b/examples/sites/demos/app/button-group/show-edit.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/show-edit.vue rename to examples/sites/demos/app/button-group/show-edit.vue diff --git a/examples/sites/demos/app/button-group/show-more-composition-api.vue b/examples/sites/demos/app/button-group/show-more-composition-api.vue new file mode 100644 index 000000000..c032b6486 --- /dev/null +++ b/examples/sites/demos/app/button-group/show-more-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/show-more.spec.ts b/examples/sites/demos/app/button-group/show-more.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/show-more.spec.ts rename to examples/sites/demos/app/button-group/show-more.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/show-more.vue b/examples/sites/demos/app/button-group/show-more.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/show-more.vue rename to examples/sites/demos/app/button-group/show-more.vue diff --git a/examples/sites/demos/app/button-group/size-composition-api.vue b/examples/sites/demos/app/button-group/size-composition-api.vue new file mode 100644 index 000000000..204f9dc3d --- /dev/null +++ b/examples/sites/demos/app/button-group/size-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/size.spec.ts b/examples/sites/demos/app/button-group/size.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/size.spec.ts rename to examples/sites/demos/app/button-group/size.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/size.vue b/examples/sites/demos/app/button-group/size.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/size.vue rename to examples/sites/demos/app/button-group/size.vue diff --git a/examples/sites/demos/app/button-group/slot-default-composition-api.vue b/examples/sites/demos/app/button-group/slot-default-composition-api.vue new file mode 100644 index 000000000..fea1ac600 --- /dev/null +++ b/examples/sites/demos/app/button-group/slot-default-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/slot-default.spec.ts b/examples/sites/demos/app/button-group/slot-default.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/slot-default.spec.ts rename to examples/sites/demos/app/button-group/slot-default.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/slot-default.vue b/examples/sites/demos/app/button-group/slot-default.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/slot-default.vue rename to examples/sites/demos/app/button-group/slot-default.vue diff --git a/examples/sites/demos/app/button-group/sup-composition-api.vue b/examples/sites/demos/app/button-group/sup-composition-api.vue new file mode 100644 index 000000000..7d718387d --- /dev/null +++ b/examples/sites/demos/app/button-group/sup-composition-api.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/button-group/sup.spec.ts b/examples/sites/demos/app/button-group/sup.spec.ts similarity index 94% rename from examples/docs/resources/pc/demo/button-group/sup.spec.ts rename to examples/sites/demos/app/button-group/sup.spec.ts index 1864feadf..c1e74cf4a 100644 --- a/examples/docs/resources/pc/demo/button-group/sup.spec.ts +++ b/examples/sites/demos/app/button-group/sup.spec.ts @@ -6,7 +6,7 @@ test('测试选块角标', async ({ page }) => { const preview = page.locator('#preview') const buttonGroup = preview.locator('.tiny-button-group').first() const item = buttonGroup.locator('.tiny-group-item > li') - const getSup = parent => parent.locator('.tiny-group-item__sup') + const getSup = (parent) => parent.locator('.tiny-group-item__sup') // 测试自定义背景和字体颜色 const sup1 = getSup(item.first()) diff --git a/examples/docs/resources/pc/demo/button-group/sup.vue b/examples/sites/demos/app/button-group/sup.vue similarity index 98% rename from examples/docs/resources/pc/demo/button-group/sup.vue rename to examples/sites/demos/app/button-group/sup.vue index 635ea43d8..327153a92 100644 --- a/examples/docs/resources/pc/demo/button-group/sup.vue +++ b/examples/sites/demos/app/button-group/sup.vue @@ -20,7 +20,7 @@ const IconPlusCircle = iconPlusCircle() export default { components: { TinyButtonGroup: ButtonGroup, - IconPlusCircle, + IconPlusCircle }, data() { return { diff --git a/examples/sites/demos/app/button-group/text-value-field-composition-api.vue b/examples/sites/demos/app/button-group/text-value-field-composition-api.vue new file mode 100644 index 000000000..1feef79fb --- /dev/null +++ b/examples/sites/demos/app/button-group/text-value-field-composition-api.vue @@ -0,0 +1,16 @@ + + + diff --git a/examples/docs/resources/pc/demo/button-group/text-value-field.spec.ts b/examples/sites/demos/app/button-group/text-value-field.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/button-group/text-value-field.spec.ts rename to examples/sites/demos/app/button-group/text-value-field.spec.ts diff --git a/examples/docs/resources/pc/demo/button-group/text-value-field.vue b/examples/sites/demos/app/button-group/text-value-field.vue similarity index 100% rename from examples/docs/resources/pc/demo/button-group/text-value-field.vue rename to examples/sites/demos/app/button-group/text-value-field.vue diff --git a/examples/sites/demos/app/button-group/webdoc/button-group.cn.md b/examples/sites/demos/app/button-group/webdoc/button-group.cn.md new file mode 100644 index 000000000..3dea80693 --- /dev/null +++ b/examples/sites/demos/app/button-group/webdoc/button-group.cn.md @@ -0,0 +1,7 @@ +--- +title: ButtonGroup 按钮组 +--- + +# ButtonGroup 按钮组 + +
以按钮组的方式出现,常用于多项类似操作。
diff --git a/examples/sites/demos/app/button-group/webdoc/button-group.en.md b/examples/sites/demos/app/button-group/webdoc/button-group.en.md new file mode 100644 index 000000000..c7588c6f2 --- /dev/null +++ b/examples/sites/demos/app/button-group/webdoc/button-group.en.md @@ -0,0 +1,7 @@ +--- +title: ButtonGroup +--- + +# ButtonGroup + +
A button group is used for multiple similar operations.
diff --git a/examples/sites/demos/app/button-group/webdoc/button-group.js b/examples/sites/demos/app/button-group/webdoc/button-group.js new file mode 100644 index 000000000..5198be25e --- /dev/null +++ b/examples/sites/demos/app/button-group/webdoc/button-group.js @@ -0,0 +1,259 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

通过 v-model 设置默认选中的按钮,并实现双向绑定。通过 value 也可设置默认选中按钮,但不能进行双向绑定。

\n', + 'en-US': + '

Use v-model to set the default selected button and implement bidirectional binding. You can also set the default selected button through value, but bidirectional binding cannot be performed.

\n' + }, + 'codeFiles': ['base.vue'] + }, + { + 'demoId': 'data', + 'name': { 'zh-CN': '按钮组数据', 'en-US': 'button group data' }, + 'desc': { + 'zh-CN': + '

通过 data 属性设置按钮组数据,对象中的 text 为按钮显示文本,value 用于双向绑定时指定的值。

\n', + 'en-US': + '

Sets the button group data through the data attribute. In the object, text is the button display text, and value is the value specified during bidirectional binding.

\n' + }, + 'codeFiles': ['data.vue'] + }, + { + 'demoId': 'size', + 'name': { 'zh-CN': '设置组件大小', 'en-US': 'Set Component Size' }, + 'desc': { + 'zh-CN': '

可以设置为:mediumsmallmini

\n', + 'en-US': '

can be set to medium, small, mini

\n' + }, + 'codeFiles': ['size.vue'] + }, + { + 'demoId': 'disabled', + 'name': { 'zh-CN': '禁用状态', 'en-US': 'Disabled' }, + 'desc': { + 'zh-CN': + '

设置 disabled 属性为 true 可禁用整个按钮组,数据项属性设置 disabled 可以禁用单个按钮。

\n', + 'en-US': '

Set disabled to true to disable the entire button group.

\n' + }, + 'codeFiles': ['disabled.vue'] + }, + { + 'demoId': 'plain', + 'name': { 'zh-CN': '朴素按钮', 'en-US': 'Simple button' }, + 'desc': { + 'zh-CN': '

设置 plain 属性为 true 可显示为朴素按钮样式。

\n', + 'en-US': '

Set plain to true to display the simple button style.

\n' + }, + 'codeFiles': ['plain.vue'] + }, + { + 'demoId': 'text-value-field', + 'name': { 'zh-CN': '数据字段映射', 'en-US': 'Data Field Mapping' }, + 'desc': { + 'zh-CN': + '

若按钮组数据对象中的字段不是默认的 text 和 value ,则可通过 text-fieldvalue-field 属性进行映射。

\n', + 'en-US': + '

If the fields in the button group data object are not the default text and value, the text-field and value-field attributes can be used for mapping.

\n' + }, + 'codeFiles': ['text-value-field.vue'] + }, + { + 'demoId': 'show-more', + 'name': { 'zh-CN': '是否显示更多按钮', 'en-US': 'Display More Buttons' }, + 'desc': { + 'zh-CN': '

设置 show-more 属性值大于 0 且小于按钮组数据,可显示更多按钮。

\n', + 'en-US': + '

Set the show-more attribute to a value greater than 0 and less than the button group data to display more buttons.

\n' + }, + 'codeFiles': ['show-more.vue'] + }, + { + 'demoId': 'show-edit', + 'name': { 'zh-CN': '是否显示编辑按钮', 'en-US': 'Display Edit Button' }, + 'desc': { + 'zh-CN': '

设置 show-edit 属性值为 true ,可显示编辑按钮。

\n', + 'en-US': '

Set show-edit to true to display the edit button.

\n' + }, + 'codeFiles': ['show-edit.vue'] + }, + { + 'demoId': 'change-event', + 'name': { 'zh-CN': 'change事件', 'en-US': 'Change Event' }, + 'desc': { + 'zh-CN': '

当选中按钮发生改变时将触发 change 事件。

\n', + 'en-US': '

The change event is triggered when the selected button is changed.

\n' + }, + 'codeFiles': ['change-event.vue'] + }, + { + 'demoId': 'event-edit', + 'name': { 'zh-CN': '编辑事件', 'en-US': 'Edit Event' }, + 'desc': { + 'zh-CN': '

勾选值改变后将触发 edit 事件。

\n', + 'en-US': '

The edit event is triggered when the edit button is clicked.

\n' + }, + 'codeFiles': ['event-edit.vue'] + }, + { + 'demoId': 'slot-default', + 'name': { 'zh-CN': '默认插槽', 'en-US': 'Default slot' }, + 'desc': { + 'zh-CN': + '

使用默认插槽的方式时,ButtonGroup 的 data、text-field、value-field、value / v-model、size 属性对插槽中的按钮将不再生效。\n但可根据使用场景在 Button 组件标签上对不同按钮设置不同的属性,具体参考 Button 组件属性。

\n', + 'en-US': + '

When the default slot mode is used, the data, text-field, value-field, value / v-model, and size attributes of the ButtonGroup do not take effect for buttons in the slot. \n However, you can set different attributes for different buttons on the Button component tag based on the application scenario. For details, see Button Component Attributes.

\n' + }, + 'codeFiles': ['slot-default.vue'] + }, + { + 'demoId': 'button-group-multiple', + 'name': { 'zh-CN': '多行', 'en-US': 'Button Group Multiple' }, + 'desc': { + 'zh-CN': '

多行按钮组,超出最大宽度后,换行显示。

\n', + 'en-US': + '

Multi-line button group, after exceeding the maximum width, it will be displayed in a new line.

\n' + }, + 'codeFiles': ['button-group-multiple.vue'] + }, + { + 'demoId': 'border', + 'name': { 'zh-CN': '边框', 'en-US': 'Border' }, + 'desc': { + 'zh-CN': '

设置有无边框,默认为true。

\n', + 'en-US': '

Set with or without border, the default is true.

\n' + }, + 'codeFiles': ['border.vue'] + }, + { + 'demoId': 'sup', + 'name': { 'zh-CN': '选块角标', 'en-US': '' }, + 'desc': { 'zh-CN': '

通过配置项 sup 配置选块角标。

\n', 'en-US': '' }, + 'codeFiles': ['sup.vue'] + } + ], + apis: [ + { + 'name': 'button-group', + 'type': 'component', + 'properties': [ + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '设置按钮组是否被禁用。', 'en-US': 'Sets whether the button group is disabled.' }, + 'demoId': 'disabled' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置组件大小', 'en-US': 'Set the component size' }, + 'demoId': 'size' + }, + { + 'name': 'data', + 'type': 'Array', + 'defaultValue': '', + 'desc': { + 'zh-CN': "按钮组数据。例:[{text: '', value: ''}]。", + 'en-US': "button group data. Example: [{text: '', value: ''}]" + }, + 'demoId': 'data' + }, + { + 'name': 'value-field', + 'type': 'String', + 'defaultValue': '该属性的默认值为 value', + 'desc': { 'zh-CN': '按钮值的字段值。', 'en-US': 'Field value of the button value.' }, + 'demoId': 'text-value-field' + }, + { + 'name': 'text-field', + 'type': 'String', + 'defaultValue': '该属性的默认值为 text', + 'desc': { 'zh-CN': '按钮显示文字的字段值。', 'en-US': 'Field value of the button displayed text.' }, + 'demoId': 'text-value-field' + }, + { + 'name': 'modelValue / v-model', + 'type': 'Number , String', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认选中按钮的值。', 'en-US': 'Default value of the selected button.' }, + 'demoId': 'base' + }, + { + 'name': 'plain', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否朴素按钮。', 'en-US': 'Indicates whether the button is a simple button.' }, + 'demoId': 'plain' + }, + { + 'name': 'show-more', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置超过多少个显示更多按钮。', + 'en-US': 'Set the number of more buttons to be displayed.' + }, + 'demoId': 'show-more' + }, + { + 'name': 'show-edit', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '是否显示编辑按钮,只有在显示更多的情况下生效。', + 'en-US': + 'Whether to display the edit button. This parameter takes effect only when more buttons are displayed.' + }, + 'demoId': 'show-edit' + }, + { + 'name': 'border', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否显示边框线。', 'en-US': 'Remove button border.' }, + 'demoId': 'border' + } + ], + 'events': [ + { + 'name': 'edit', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置当编辑按钮被点击时触发的回调函数。', + 'en-US': 'Set the callback function triggered when the edit button is clicked.' + }, + 'demoId': 'event-edit' + }, + { + 'name': 'change', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当选中按钮发生改变时触发的回调函数。', + 'en-US': 'Set the callback function triggered when the selected button is changed.' + }, + 'demoId': 'change-event' + } + ], + 'slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '按钮组内容。', 'en-US': 'button group content.' }, + 'demoId': 'slot-default' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/button/autofocus-composition-api.vue b/examples/sites/demos/app/button/autofocus-composition-api.vue new file mode 100644 index 000000000..f0cbf343c --- /dev/null +++ b/examples/sites/demos/app/button/autofocus-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/autofocus.spec.js b/examples/sites/demos/app/button/autofocus.spec.js similarity index 84% rename from examples/docs/resources/pc/demo/button/autofocus.spec.js rename to examples/sites/demos/app/button/autofocus.spec.js index 6541115e2..b901de983 100644 --- a/examples/docs/resources/pc/demo/button/autofocus.spec.js +++ b/examples/sites/demos/app/button/autofocus.spec.js @@ -6,6 +6,6 @@ test('测试是否有默认聚焦', async ({ page }) => { await page.getByRole('button', { name: '默认按钮' }).click() await page.getByRole('button', { name: '默认聚焦' }).click() const button = await page.getByRole('button', { name: '默认聚焦' }) - const hasAutofocus = await button.evaluate(button => button.hasAttribute('autofocus')) + const hasAutofocus = await button.evaluate((button) => button.hasAttribute('autofocus')) await expect(hasAutofocus).toBe(true) }) diff --git a/examples/docs/resources/pc/demo/button/autofocus.vue b/examples/sites/demos/app/button/autofocus.vue similarity index 100% rename from examples/docs/resources/pc/demo/button/autofocus.vue rename to examples/sites/demos/app/button/autofocus.vue diff --git a/examples/sites/demos/app/button/base-composition-api.vue b/examples/sites/demos/app/button/base-composition-api.vue new file mode 100644 index 000000000..1d1f7be95 --- /dev/null +++ b/examples/sites/demos/app/button/base-composition-api.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/button/base.spec.js b/examples/sites/demos/app/button/base.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/base.spec.js rename to examples/sites/demos/app/button/base.spec.js diff --git a/examples/sites/demos/app/button/base.vue b/examples/sites/demos/app/button/base.vue new file mode 100644 index 000000000..c2e683507 --- /dev/null +++ b/examples/sites/demos/app/button/base.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/examples/sites/demos/app/button/circle-composition-api.vue b/examples/sites/demos/app/button/circle-composition-api.vue new file mode 100644 index 000000000..18a86eac4 --- /dev/null +++ b/examples/sites/demos/app/button/circle-composition-api.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/button/circle.spec.js b/examples/sites/demos/app/button/circle.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/circle.spec.js rename to examples/sites/demos/app/button/circle.spec.js diff --git a/examples/sites/demos/app/button/circle.vue b/examples/sites/demos/app/button/circle.vue new file mode 100644 index 000000000..315fccf86 --- /dev/null +++ b/examples/sites/demos/app/button/circle.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/examples/sites/demos/app/button/click-composition-api.vue b/examples/sites/demos/app/button/click-composition-api.vue new file mode 100644 index 000000000..eacc87f26 --- /dev/null +++ b/examples/sites/demos/app/button/click-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/click.spec.js b/examples/sites/demos/app/button/click.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/click.spec.js rename to examples/sites/demos/app/button/click.spec.js diff --git a/examples/docs/resources/pc/demo/button/click.vue b/examples/sites/demos/app/button/click.vue similarity index 100% rename from examples/docs/resources/pc/demo/button/click.vue rename to examples/sites/demos/app/button/click.vue diff --git a/examples/sites/demos/app/button/dynamic-disabled-composition-api.vue b/examples/sites/demos/app/button/dynamic-disabled-composition-api.vue new file mode 100644 index 000000000..91ec337c1 --- /dev/null +++ b/examples/sites/demos/app/button/dynamic-disabled-composition-api.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/button/dynamic-disabled.spec.js b/examples/sites/demos/app/button/dynamic-disabled.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/dynamic-disabled.spec.js rename to examples/sites/demos/app/button/dynamic-disabled.spec.js diff --git a/examples/docs/resources/pc/demo/button/dynamic-disabled.vue b/examples/sites/demos/app/button/dynamic-disabled.vue similarity index 100% rename from examples/docs/resources/pc/demo/button/dynamic-disabled.vue rename to examples/sites/demos/app/button/dynamic-disabled.vue diff --git a/examples/sites/demos/app/button/icon-composition-api.vue b/examples/sites/demos/app/button/icon-composition-api.vue new file mode 100644 index 000000000..fb4cb7ce7 --- /dev/null +++ b/examples/sites/demos/app/button/icon-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/icon.spec.js b/examples/sites/demos/app/button/icon.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/icon.spec.js rename to examples/sites/demos/app/button/icon.spec.js diff --git a/examples/sites/demos/app/button/icon.vue b/examples/sites/demos/app/button/icon.vue new file mode 100644 index 000000000..9f660bb57 --- /dev/null +++ b/examples/sites/demos/app/button/icon.vue @@ -0,0 +1,32 @@ + + + diff --git a/examples/sites/demos/app/button/image-composition-api.vue b/examples/sites/demos/app/button/image-composition-api.vue new file mode 100644 index 000000000..af07392cb --- /dev/null +++ b/examples/sites/demos/app/button/image-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/image.spec.js b/examples/sites/demos/app/button/image.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/image.spec.js rename to examples/sites/demos/app/button/image.spec.js diff --git a/examples/docs/resources/pc/demo/button/image.vue b/examples/sites/demos/app/button/image.vue similarity index 76% rename from examples/docs/resources/pc/demo/button/image.vue rename to examples/sites/demos/app/button/image.vue index 126b00e0e..94338bd6c 100644 --- a/examples/docs/resources/pc/demo/button/image.vue +++ b/examples/sites/demos/app/button/image.vue @@ -14,7 +14,7 @@ export default { }, data() { return { - image: 'static/images/button-image.png' + image: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/button-image.png` } } } diff --git a/examples/sites/demos/app/button/loading-composition-api.vue b/examples/sites/demos/app/button/loading-composition-api.vue new file mode 100644 index 000000000..5865ef5e8 --- /dev/null +++ b/examples/sites/demos/app/button/loading-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/loading.spec.js b/examples/sites/demos/app/button/loading.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/loading.spec.js rename to examples/sites/demos/app/button/loading.spec.js diff --git a/examples/docs/resources/pc/demo/button/loading.vue b/examples/sites/demos/app/button/loading.vue similarity index 100% rename from examples/docs/resources/pc/demo/button/loading.vue rename to examples/sites/demos/app/button/loading.vue diff --git a/examples/sites/demos/app/button/plain-composition-api.vue b/examples/sites/demos/app/button/plain-composition-api.vue new file mode 100644 index 000000000..781265519 --- /dev/null +++ b/examples/sites/demos/app/button/plain-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/plain.spec.js b/examples/sites/demos/app/button/plain.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/plain.spec.js rename to examples/sites/demos/app/button/plain.spec.js diff --git a/examples/docs/resources/pc/demo/button/plain.vue b/examples/sites/demos/app/button/plain.vue similarity index 100% rename from examples/docs/resources/pc/demo/button/plain.vue rename to examples/sites/demos/app/button/plain.vue diff --git a/examples/sites/demos/app/button/reset-time-composition-api.vue b/examples/sites/demos/app/button/reset-time-composition-api.vue new file mode 100644 index 000000000..738352e4e --- /dev/null +++ b/examples/sites/demos/app/button/reset-time-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/reset-time.spec.js b/examples/sites/demos/app/button/reset-time.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/reset-time.spec.js rename to examples/sites/demos/app/button/reset-time.spec.js diff --git a/examples/docs/resources/pc/demo/button/reset-time.vue b/examples/sites/demos/app/button/reset-time.vue similarity index 100% rename from examples/docs/resources/pc/demo/button/reset-time.vue rename to examples/sites/demos/app/button/reset-time.vue diff --git a/examples/sites/demos/app/button/round-composition-api.vue b/examples/sites/demos/app/button/round-composition-api.vue new file mode 100644 index 000000000..90c6ff0a0 --- /dev/null +++ b/examples/sites/demos/app/button/round-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/round.spec.js b/examples/sites/demos/app/button/round.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/round.spec.js rename to examples/sites/demos/app/button/round.spec.js diff --git a/examples/docs/resources/pc/demo/button/round.vue b/examples/sites/demos/app/button/round.vue similarity index 100% rename from examples/docs/resources/pc/demo/button/round.vue rename to examples/sites/demos/app/button/round.vue diff --git a/examples/sites/demos/app/button/size-composition-api.vue b/examples/sites/demos/app/button/size-composition-api.vue new file mode 100644 index 000000000..2e7c17922 --- /dev/null +++ b/examples/sites/demos/app/button/size-composition-api.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/button/size.spec.js b/examples/sites/demos/app/button/size.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/size.spec.js rename to examples/sites/demos/app/button/size.spec.js diff --git a/examples/sites/demos/app/button/size.vue b/examples/sites/demos/app/button/size.vue new file mode 100644 index 000000000..3728143a9 --- /dev/null +++ b/examples/sites/demos/app/button/size.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/examples/sites/demos/app/button/slot-default-composition-api.vue b/examples/sites/demos/app/button/slot-default-composition-api.vue new file mode 100644 index 000000000..332ba0b6f --- /dev/null +++ b/examples/sites/demos/app/button/slot-default-composition-api.vue @@ -0,0 +1,22 @@ + + + diff --git a/examples/sites/demos/app/button/slot-default.vue b/examples/sites/demos/app/button/slot-default.vue new file mode 100644 index 000000000..8376d3625 --- /dev/null +++ b/examples/sites/demos/app/button/slot-default.vue @@ -0,0 +1,30 @@ + + + diff --git a/examples/sites/demos/app/button/text-composition-api.vue b/examples/sites/demos/app/button/text-composition-api.vue new file mode 100644 index 000000000..1c4840632 --- /dev/null +++ b/examples/sites/demos/app/button/text-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/text.spec.js b/examples/sites/demos/app/button/text.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/text.spec.js rename to examples/sites/demos/app/button/text.spec.js diff --git a/examples/docs/resources/pc/demo/button/text.vue b/examples/sites/demos/app/button/text.vue similarity index 77% rename from examples/docs/resources/pc/demo/button/text.vue rename to examples/sites/demos/app/button/text.vue index 7683eb902..86416f078 100644 --- a/examples/docs/resources/pc/demo/button/text.vue +++ b/examples/sites/demos/app/button/text.vue @@ -1,8 +1,6 @@ diff --git a/examples/sites/demos/app/button/type-composition-api.vue b/examples/sites/demos/app/button/type-composition-api.vue new file mode 100644 index 000000000..3a6ed3cac --- /dev/null +++ b/examples/sites/demos/app/button/type-composition-api.vue @@ -0,0 +1,15 @@ + + + diff --git a/examples/docs/resources/pc/demo/button/type.spec.js b/examples/sites/demos/app/button/type.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/button/type.spec.js rename to examples/sites/demos/app/button/type.spec.js diff --git a/examples/docs/resources/pc/demo/button/type.vue b/examples/sites/demos/app/button/type.vue similarity index 100% rename from examples/docs/resources/pc/demo/button/type.vue rename to examples/sites/demos/app/button/type.vue diff --git a/examples/sites/demos/app/button/webdoc/button.cn.md b/examples/sites/demos/app/button/webdoc/button.cn.md new file mode 100644 index 000000000..5c094b3a4 --- /dev/null +++ b/examples/sites/demos/app/button/webdoc/button.cn.md @@ -0,0 +1,7 @@ +--- +title: Button 按钮 +--- + +# Button 按钮 + +
常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型。
diff --git a/examples/sites/demos/app/button/webdoc/button.en.md b/examples/sites/demos/app/button/webdoc/button.en.md new file mode 100644 index 000000000..e56ff81cd --- /dev/null +++ b/examples/sites/demos/app/button/webdoc/button.en.md @@ -0,0 +1,7 @@ +--- +title: Button +--- + +# Button + +
Common operation buttons, including default buttons, icon buttons, picture buttons, and drop-down buttons.
diff --git a/examples/sites/demos/app/button/webdoc/button.js b/examples/sites/demos/app/button/webdoc/button.js new file mode 100644 index 000000000..e2fd22608 --- /dev/null +++ b/examples/sites/demos/app/button/webdoc/button.js @@ -0,0 +1,271 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['base.vue'] + }, + { + 'demoId': 'icon', + 'name': { 'zh-CN': '图标按钮', 'en-US': 'Icon Button' }, + 'desc': { + 'zh-CN': + '

指定 icon 属性值为需要的 Icon 图标即可展示为图标按钮。

\n

Icon 图标用法

\n

先从 @opentiny/vue-icon 中导入需要的 Icon,再在 data 函数中初始化 Icon 组件并赋值给一个属性。最后在模板中通过 icon 属性进行引用。\n通过 native-type 设置 button、image 两种按钮的表单类型。该属性仅当属性 type 为 button 或 image 时使用。该属性的可选值为 button / submit / reset。

\n
\n', + 'en-US': + '

Specify the icon attribute value to display the icon as an icon button.

\n

Icon Icon Usage

\n

Import the required Icon from @opentiny/vue-icon, initialize the Icon component in the data function, and assign a value to an attribute. Use the icon attribute to reference the template. \n Use native-type to set the form type of the button and image buttons. This attribute is used only when type is set to button or image. The optional values of this attribute are button / submit / reset.

\n
\n' + }, + 'codeFiles': ['icon.vue'] + }, + { + 'demoId': 'text', + 'name': { 'zh-CN': '文字按钮', 'en-US': 'Text button' }, + 'desc': { + 'zh-CN': + '

设置 type 属性为 text 即为文字按钮,可在标签子级或者通过 text 属性设置显示内容。

\n', + 'en-US': + '

Set the type attribute to text, which is a text button. You can set the content to be displayed at the tag child level or through the text attribute.

\n' + }, + 'codeFiles': ['text.vue'] + }, + { + 'demoId': 'round', + 'name': { 'zh-CN': '按钮圆角', 'en-US': 'Button Fillet' }, + 'desc': { + 'zh-CN': '

通过 round 属性设置是否圆角按钮。

\n', + 'en-US': '

The round attribute is used to set whether to round the button.

\n' + }, + 'codeFiles': ['round.vue'] + }, + { + 'demoId': 'image', + 'name': { 'zh-CN': '图片按钮', 'en-US': 'Picture button' }, + 'desc': { + 'zh-CN': '

以默认插槽的用法嵌入 img 标签,并引入图片。

\n', + 'en-US': '

Embeds the img tag with the default slot usage and introduces the image.

\n' + }, + 'codeFiles': ['image.vue'] + }, + { + 'demoId': 'type', + 'name': { 'zh-CN': '主题样式', 'en-US': 'Theme Style' }, + 'desc': { + 'zh-CN': + '

通过 type 属性可以设置不同的主题样式,主要包括 primary、success、info、warning、danger、text。

\n', + 'en-US': + '

You can set different theme styles through the type attribute, including primary, success, info, warning, danger, and text.

\n' + }, + 'codeFiles': ['type.vue'] + }, + { + 'demoId': 'loading', + 'name': { 'zh-CN': '显示加载中', 'en-US': 'Display Loading' }, + 'desc': { + 'zh-CN': '

直接配置 loading 属性为 true,即可展示为加载中的样式。

\n', + 'en-US': '

Set loading to true to display the style being loaded.

\n' + }, + 'codeFiles': ['loading.vue'] + }, + { + 'demoId': 'size', + 'name': { 'zh-CN': '尺寸', 'en-US': 'Dimension' }, + 'desc': { + 'zh-CN': + '

通过 size 属性设置按钮不同的大小尺寸,包括 large、medium、small、mini 四种不同大小。不设置时为默认尺寸。

\n', + 'en-US': + '

Use the size attribute to set the button size, including large, medium, small, and mini. If this parameter is not set, the default size is used.

\n' + }, + 'codeFiles': ['size.vue'] + }, + { + 'demoId': 'circle', + 'name': { 'zh-CN': '圆形按钮', 'en-US': 'Round Button' }, + 'desc': { + 'zh-CN': '

直接配置 circle 属性为 true,即可展示为圆形按钮的形式。

\n', + 'en-US': '

Set the circle attribute to true. The button is displayed as a round button.

\n' + }, + 'codeFiles': ['circle.vue'] + }, + { + 'demoId': 'plain', + 'name': { 'zh-CN': '朴素按钮', 'en-US': 'Simple button' }, + 'desc': { + 'zh-CN': '

配置 plain 属性为 true,即可展示为朴素按钮的形式。

\n', + 'en-US': '

Set the plain attribute to true. The button is displayed as a simple button.

\n' + }, + 'codeFiles': ['plain.vue'] + }, + { + 'demoId': 'reset-time', + 'name': { 'zh-CN': '防止表单重复提交', 'en-US': 'Prevent repeated submission of forms' }, + 'desc': { + 'zh-CN': + '

通过 reset-time 属性可设置单击后按钮禁用的时长,默认的禁用时长为 1000 毫秒。\n可用于防止按钮连续点击出现表单重复提交的问题。

\n', + 'en-US': + '

You can use the reset-time attribute to set the duration for which the button is disabled. The default duration is 1000 ms. \n This parameter can be used to prevent repeated submission of the form when you click the button continuously.

\n' + }, + 'codeFiles': ['reset-time.vue'] + }, + { + 'demoId': 'autofocus', + 'name': { 'zh-CN': '默认聚焦', 'en-US': 'Default Focus' }, + 'desc': { + 'zh-CN': '

配置 autofocus 属性的按钮,将默认展示为聚焦状态。

\n', + 'en-US': '

The autofocus attribute button is displayed in the focused state by default.

\n' + }, + 'codeFiles': ['autofocus.vue'] + }, + { + 'demoId': 'click', + 'name': { 'zh-CN': '事件', 'en-US': 'Event' }, + 'desc': { + 'zh-CN': '

按钮的单击事件,该示例中单击按钮将会出现提示信息。

\n', + 'en-US': + 'Click event of the

button. In this example, a message is displayed when a button is clicked.

\n' + }, + 'codeFiles': ['click.vue'] + }, + { + 'demoId': 'dynamic-disabled', + 'name': { 'zh-CN': '动态禁用按钮', 'en-US': 'Dynamic Disable Button' }, + 'desc': { + 'zh-CN': '

设置 disabled 属性为 true 后,可以禁用按钮。

\n', + 'en-US': '

After disabled is set to true, the button can be disabled.

\n' + }, + 'codeFiles': ['dynamic-disabled.vue'] + } + ], + apis: [ + { + 'name': 'button', + 'type': 'component', + 'properties': [ + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '设置按钮是否被禁用。', 'en-US': 'Sets whether the button is disabled.' }, + 'demoId': 'dynamic-disabled' + }, + { + 'name': 'native-type', + 'type': 'String', + 'defaultValue': '该属性的默认值为 button', + 'desc': { + 'zh-CN': + '设置 button、image 两种按钮的表单类型。该属性仅当属性 type 为 button 或 image 时使用。;原生 type 属性;该属性的可选值为 button / submit / reset', + 'en-US': + 'Set the form type of the button and image buttons. This attribute is used only when type is set to button or image. ;Native type attribute; The options of this attribute are button / submit / reset' + }, + 'demoId': 'icon' + }, + { + 'name': 'reset-time', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 1000', + 'desc': { + 'zh-CN': '设置按钮禁用时间,防止重复提交,单位毫秒', + 'en-US': 'Set the button disable time, in milliseconds, to prevent repeated submission.' + }, + 'demoId': 'reset-time' + }, + { + 'name': 'text', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置按钮显示的文本,可配置国际化。', + 'en-US': 'Sets the text displayed on the button. The text can be internationalized.' + }, + 'demoId': 'text' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '定义按钮尺寸;该属性的可选值为 large / medium / small / mini', + 'en-US': 'Define the button size. The value of this attribute can be large, medium, small, or mini' + }, + 'demoId': 'size' + }, + { + 'name': 'type', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '展示按钮不同的状态;该属性的可选值为 primary / success / warning / danger / info / text', + 'en-US': + 'Displays different button states. The optional values of this attribute are primary / success / warning / danger / info / text' + }, + 'demoId': 'type' + }, + { + 'name': 'plain', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否朴素按钮', 'en-US': 'Simple button' }, + 'demoId': 'plain' + }, + { + 'name': 'round', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否圆角按钮', 'en-US': 'Whether to round the corner button' }, + 'demoId': 'round' + }, + { + 'name': 'circle', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否圆形按钮', 'en-US': 'Round button' }, + 'demoId': 'circle' + }, + { + 'name': 'loading', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否加载中状态', 'en-US': 'Loading status' }, + 'demoId': 'loading' + }, + { + 'name': 'icon', + 'type': 'Object , String', + 'defaultValue': '', + 'desc': { 'zh-CN': 'svg 图片对象', 'en-US': 'svg Image Object' }, + 'demoId': 'icon' + }, + { + 'name': 'autofocus', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否默认聚焦', 'en-US': 'Whether to focus by default' }, + 'demoId': 'autofocus' + } + ], + 'events': [ + { + 'name': 'click', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置当按钮被点击时触发的回调函数。', + 'en-US': 'Sets the callback function triggered when a button is clicked.' + }, + 'demoId': 'click' + } + ], + 'slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认插槽', 'en-US': 'Default slot' }, + 'demoId': 'image' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/calendar/basic-usage-composition-api.vue b/examples/sites/demos/app/calendar/basic-usage-composition-api.vue new file mode 100644 index 000000000..4c4d2d5fc --- /dev/null +++ b/examples/sites/demos/app/calendar/basic-usage-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/calendar/basic-usage.vue b/examples/sites/demos/app/calendar/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/calendar/basic-usage.vue rename to examples/sites/demos/app/calendar/basic-usage.vue diff --git a/examples/sites/demos/app/calendar/calendar-mode-composition-api.vue b/examples/sites/demos/app/calendar/calendar-mode-composition-api.vue new file mode 100644 index 000000000..b4e52770b --- /dev/null +++ b/examples/sites/demos/app/calendar/calendar-mode-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/calendar/calendar-mode.vue b/examples/sites/demos/app/calendar/calendar-mode.vue similarity index 100% rename from examples/docs/resources/pc/demo/calendar/calendar-mode.vue rename to examples/sites/demos/app/calendar/calendar-mode.vue diff --git a/examples/sites/demos/app/calendar/custom-calendar-toolbar-composition-api.vue b/examples/sites/demos/app/calendar/custom-calendar-toolbar-composition-api.vue new file mode 100644 index 000000000..dccf58e9a --- /dev/null +++ b/examples/sites/demos/app/calendar/custom-calendar-toolbar-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/calendar/custom-calendar-toolbar.vue b/examples/sites/demos/app/calendar/custom-calendar-toolbar.vue similarity index 100% rename from examples/docs/resources/pc/demo/calendar/custom-calendar-toolbar.vue rename to examples/sites/demos/app/calendar/custom-calendar-toolbar.vue diff --git a/examples/sites/demos/app/calendar/custom-day-cell-composition-api.vue b/examples/sites/demos/app/calendar/custom-day-cell-composition-api.vue new file mode 100644 index 000000000..97292e68c --- /dev/null +++ b/examples/sites/demos/app/calendar/custom-day-cell-composition-api.vue @@ -0,0 +1,51 @@ + + + diff --git a/examples/docs/resources/pc/demo/calendar/custom-day-cell.vue b/examples/sites/demos/app/calendar/custom-day-cell.vue similarity index 100% rename from examples/docs/resources/pc/demo/calendar/custom-day-cell.vue rename to examples/sites/demos/app/calendar/custom-day-cell.vue diff --git a/examples/sites/demos/app/calendar/dynamic-add-schedule-composition-api.vue b/examples/sites/demos/app/calendar/dynamic-add-schedule-composition-api.vue new file mode 100644 index 000000000..33988d315 --- /dev/null +++ b/examples/sites/demos/app/calendar/dynamic-add-schedule-composition-api.vue @@ -0,0 +1,47 @@ + + + diff --git a/examples/docs/resources/pc/demo/calendar/dynamic-add-schedule.vue b/examples/sites/demos/app/calendar/dynamic-add-schedule.vue similarity index 100% rename from examples/docs/resources/pc/demo/calendar/dynamic-add-schedule.vue rename to examples/sites/demos/app/calendar/dynamic-add-schedule.vue diff --git a/examples/sites/demos/app/calendar/show-selected-date-composition-api.vue b/examples/sites/demos/app/calendar/show-selected-date-composition-api.vue new file mode 100644 index 000000000..9b0bb93ec --- /dev/null +++ b/examples/sites/demos/app/calendar/show-selected-date-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/calendar/show-selected-date.vue b/examples/sites/demos/app/calendar/show-selected-date.vue similarity index 100% rename from examples/docs/resources/pc/demo/calendar/show-selected-date.vue rename to examples/sites/demos/app/calendar/show-selected-date.vue diff --git a/examples/sites/demos/app/calendar/webdoc/calendar.cn.md b/examples/sites/demos/app/calendar/webdoc/calendar.cn.md new file mode 100644 index 000000000..20e8fdb74 --- /dev/null +++ b/examples/sites/demos/app/calendar/webdoc/calendar.cn.md @@ -0,0 +1,7 @@ +--- +title: Calendar 日历 +--- + +# Calendar 日历 + +
按照日历形式展示数据的容器。
diff --git a/examples/sites/demos/app/calendar/webdoc/calendar.en.md b/examples/sites/demos/app/calendar/webdoc/calendar.en.md new file mode 100644 index 000000000..4cd3f310c --- /dev/null +++ b/examples/sites/demos/app/calendar/webdoc/calendar.en.md @@ -0,0 +1,7 @@ +--- +title: Calendar +--- + +# Calendar + +
Container for displaying data in calendar format.
diff --git a/examples/sites/demos/app/calendar/webdoc/calendar.js b/examples/sites/demos/app/calendar/webdoc/calendar.js new file mode 100644 index 000000000..a78b7782a --- /dev/null +++ b/examples/sites/demos/app/calendar/webdoc/calendar.js @@ -0,0 +1,131 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': '

默认以月的形式展示当月的每一天。

\n', + 'en-US': '

By default, each day of the current month is displayed in the form of month.

\n' + }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'calendar-mode', + 'name': { 'zh-CN': '显示模式', 'en-US': 'Display mode' }, + 'desc': { + 'zh-CN': '

通过 mode 属性指定以年的形式显示,将展示当年的每个月份。可选值有 year、month。

\n', + 'en-US': + '

The mode attribute specifies that each month of the current year is displayed. The options are year and month.

\n' + }, + 'codeFiles': ['calendar-mode.vue'] + }, + { + 'demoId': 'show-selected-date', + 'name': { 'zh-CN': '显示选中日期', 'en-US': 'Display Selected Date' }, + 'desc': { + 'zh-CN': + '

以月的形式展示时,指定 show-selected 属性后,单击日期单元格,将会在日历框上方展示当前选中的日期。

\n', + 'en-US': + '

When the date is displayed in the format of month, the selected date is displayed above the calendar box after the show-selected attribute is specified and the date cell is clicked.

\n' + }, + 'codeFiles': ['show-selected-date.vue'] + }, + { + 'demoId': 'custom-day-cell', + 'name': { 'zh-CN': '自定义日期单元格', 'en-US': 'Custom Date Cell' }, + 'desc': { + 'zh-CN': '

通过作用域插槽 day 自定义日期单元格。

\n', + 'en-US': '

Customize the date cell through the scope slot day.

\n' + }, + 'codeFiles': ['custom-day-cell.vue'] + }, + { + 'demoId': 'custom-calendar-toolbar', + 'name': { 'zh-CN': '自定义工具栏', 'en-US': 'Custom Toolbar' }, + 'desc': { + 'zh-CN': '

通过作用域插槽 tool 自定义需要的工具栏。

\n', + 'en-US': '

Customize the required toolbar through the scope slot tool.

\n' + }, + 'codeFiles': ['custom-calendar-toolbar.vue'] + }, + { + 'demoId': 'dynamic-add-schedule', + 'name': { 'zh-CN': '添加日程事件', 'en-US': 'Add Schedule Event' }, + 'desc': { + 'zh-CN': + '

通过 events 属性可以指定事件列表,它是一个对象数组,对象中包含如下字段:

\n

events 说明

\n

time:指定需要展示事件的日期\ntitle:指定事件标题\ncontent:指定事件的具体内容 type:指定当鼠标悬停在事件标题上时,弹出的展示事件具体内容的提示框的主题,包括 warning、error、info、success

\n
\n', + 'en-US': + '

You can use the events attribute to specify the event list. It is an object array that contains the following fields:

\n

events Description

\n

time: specifies the date of the event to be displayed.\ntitle: Specifies the event title. \ncontent: specifies the event content. type: specifies the theme of the dialog box that displays the event content when you hover the cursor over the event title. The options are warning, error, info, and success

\n
\n' + }, + 'codeFiles': ['dynamic-add-schedule.vue'] + } + ], + apis: [ + { + 'name': 'calendar', + 'type': 'component', + 'properties': [ + { + 'name': 'events', + 'type': 'Array', + 'defaultValue': '', + 'desc': { 'zh-CN': '事件列表', 'en-US': 'Event List' }, + 'demoId': 'dynamic-add-schedule' + }, + { + 'name': 'mode', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '显示模式,month / year 可选,默认 month', + 'en-US': 'Display mode. The value can be month or year. The default value is month.' + }, + 'demoId': 'calendar-mode' + }, + { + 'name': 'month', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '指定月份,默认当月', + 'en-US': 'Specified month. The default value is the current month.' + }, + 'demoId': 'custom-day-cell' + }, + { + 'name': 'show-selected', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { 'zh-CN': '显示选中的日期', 'en-US': 'Display the selected date.' }, + 'demoId': 'show-selected-date' + }, + { + 'name': 'year', + 'type': 'Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '指定年份,默认今年', 'en-US': 'Specified year. The default year is this year.' }, + 'demoId': 'custom-day-cell' + } + ], + 'events': [], + 'slots': [ + { + 'name': 'day', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '日期单元格插槽', 'en-US': 'Date Cell Slot' }, + 'demoId': 'custom-day-cell' + }, + { + 'name': 'tool', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '日历工具栏插槽', 'en-US': 'Calendar Toolbar Slot' }, + 'demoId': 'custom-calendar-toolbar' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/carousel/autoplay-composition-api.vue b/examples/sites/demos/app/carousel/autoplay-composition-api.vue new file mode 100644 index 000000000..d9a1689bd --- /dev/null +++ b/examples/sites/demos/app/carousel/autoplay-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/autoplay.spec.ts b/examples/sites/demos/app/carousel/autoplay.spec.ts new file mode 100644 index 000000000..ec62afcd8 --- /dev/null +++ b/examples/sites/demos/app/carousel/autoplay.spec.ts @@ -0,0 +1,28 @@ +import { test, expect } from '@playwright/test' + +test('自动切换', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/autoplay') + const preview = page.locator('#preview') + const carousel = preview.locator('.tiny-carousel') + const carouselItems = preview.locator('div.tiny-carousel__item') + // 默认显示第一张幻灯片 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + // 这里需要等待幻灯片在3秒后切换 + await page.waitForTimeout(3000) + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + await carousel.hover() + await page.waitForTimeout(100) + // 点击下一张按钮 + await preview.locator('button:nth-child(2)').click() + // 当前应该显示第三张幻灯片 + await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + // 点击上一张按钮 + await page.locator('.tiny-carousel__arrow').first().click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') +}) diff --git a/examples/docs/resources/pc/demo/carousel/autoplay.vue b/examples/sites/demos/app/carousel/autoplay.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/autoplay.vue rename to examples/sites/demos/app/carousel/autoplay.vue diff --git a/examples/sites/demos/app/carousel/basic-usage-composition-api.vue b/examples/sites/demos/app/carousel/basic-usage-composition-api.vue new file mode 100644 index 000000000..db20e231e --- /dev/null +++ b/examples/sites/demos/app/carousel/basic-usage-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/basic-usage.spec.ts b/examples/sites/demos/app/carousel/basic-usage.spec.ts new file mode 100644 index 000000000..ac7bf8041 --- /dev/null +++ b/examples/sites/demos/app/carousel/basic-usage.spec.ts @@ -0,0 +1,28 @@ +import { test, expect } from '@playwright/test' + +test('基础用法', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/basic-usage') + const preview = page.locator('#preview') + const carousel = preview.locator('.tiny-carousel') + const carouselItems = preview.locator('div.tiny-carousel__item') + // 默认显示第一张幻灯片 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + await carousel.hover() + await page.waitForTimeout(100) + // 点击下一张按钮 + await preview.locator('button:nth-child(2)').click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + // 点击上一张按钮 + await page.locator('.tiny-carousel__arrow').first().click() + // 当前应该显示第一张幻灯片 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + // 点击底部按钮切换 + await preview.getByRole('list').getByRole('button').nth(1).click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') +}) diff --git a/examples/docs/resources/pc/demo/carousel/basic-usage.vue b/examples/sites/demos/app/carousel/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/basic-usage.vue rename to examples/sites/demos/app/carousel/basic-usage.vue diff --git a/examples/sites/demos/app/carousel/card-mode-composition-api.vue b/examples/sites/demos/app/carousel/card-mode-composition-api.vue new file mode 100644 index 000000000..5cf38495b --- /dev/null +++ b/examples/sites/demos/app/carousel/card-mode-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/card-mode.spec.ts b/examples/sites/demos/app/carousel/card-mode.spec.ts new file mode 100644 index 000000000..695451383 --- /dev/null +++ b/examples/sites/demos/app/carousel/card-mode.spec.ts @@ -0,0 +1,44 @@ +import { test, expect } from '@playwright/test' + +test('卡片模式', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/card-mode') + const preview = page.locator('#preview') + const carousel = preview.locator('.tiny-carousel') + const carouselItems = preview.locator('div.tiny-carousel__item') + // 默认显示第一张幻灯片 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 192.75, 0)') + // 第二张幻灯片应该可见,并且被缩放 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, 418.267, 0)') + // 第四张幻灯片应该可见,并且被缩放 + await expect(carouselItems.nth(3)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, -32.7675, 0)') + + await carousel.hover() + await page.waitForTimeout(100) + // 点击下一张按钮 + await preview.locator('button:nth-child(2)').click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 192.75, 0)') + // 第三张幻灯片应该可见,并且被缩放 + await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, 418.267, 0)') + // 第一张幻灯片应该可见,并且被缩放 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, -32.7675, 0)') + + // 点击底部按钮切换 + await preview.getByRole('list').getByRole('button').nth(2).click() + // 当前应该显示第三张幻灯片 + await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 192.75, 0)') + // 第四张幻灯片应该可见,并且被缩放 + await expect(carouselItems.nth(3)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, 418.267, 0)') + // 第二张幻灯片应该可见,并且被缩放 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, -32.7675, 0)') + + // 点击上一张按钮 + await page.locator('.tiny-carousel__arrow').first().click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 192.75, 0)') + // 第三张幻灯片应该可见,并且被缩放 + await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, 418.267, 0)') + // 第一张幻灯片应该可见,并且被缩放 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(0.83, 0, 0, 0.83, -32.7675, 0)') +}) diff --git a/examples/docs/resources/pc/demo/carousel/card-mode.vue b/examples/sites/demos/app/carousel/card-mode.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/card-mode.vue rename to examples/sites/demos/app/carousel/card-mode.vue diff --git a/examples/sites/demos/app/carousel/carousel-arrow-always-composition-api.vue b/examples/sites/demos/app/carousel/carousel-arrow-always-composition-api.vue new file mode 100644 index 000000000..8d4edecfe --- /dev/null +++ b/examples/sites/demos/app/carousel/carousel-arrow-always-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/carousel-arrow-always.spec.ts b/examples/sites/demos/app/carousel/carousel-arrow-always.spec.ts new file mode 100644 index 000000000..08e102716 --- /dev/null +++ b/examples/sites/demos/app/carousel/carousel-arrow-always.spec.ts @@ -0,0 +1,26 @@ +import { test, expect } from '@playwright/test' + +test('总是显示切换箭头', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/carousel-arrow-always') + const preview = page.locator('#preview') + const carousel = preview.locator('.tiny-carousel') + const carouselItems = preview.locator('div.tiny-carousel__item') + // 默认显示第一张幻灯片 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + // 点击下一张按钮 + await preview.locator('button:nth-child(2)').click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + // 点击上一张按钮 + await page.locator('.tiny-carousel__arrow').first().click() + // 当前应该显示第一张幻灯片 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + // 点击底部按钮切换 + await preview.getByRole('list').getByRole('button').nth(1).click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') +}) diff --git a/examples/docs/resources/pc/demo/carousel/carousel-arrow-always.vue b/examples/sites/demos/app/carousel/carousel-arrow-always.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/carousel-arrow-always.vue rename to examples/sites/demos/app/carousel/carousel-arrow-always.vue diff --git a/examples/sites/demos/app/carousel/carousel-arrow-hover-composition-api.vue b/examples/sites/demos/app/carousel/carousel-arrow-hover-composition-api.vue new file mode 100644 index 000000000..fd66830bb --- /dev/null +++ b/examples/sites/demos/app/carousel/carousel-arrow-hover-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/carousel-arrow-hover.spec.ts b/examples/sites/demos/app/carousel/carousel-arrow-hover.spec.ts new file mode 100644 index 000000000..2d5409eb5 --- /dev/null +++ b/examples/sites/demos/app/carousel/carousel-arrow-hover.spec.ts @@ -0,0 +1,27 @@ +import { test, expect } from '@playwright/test' + +test('hover 时显示切换箭头', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/carousel-arrow-hover') + const preview = page.locator('#preview') + const carousel = preview.locator('.tiny-carousel') + const carouselItems = preview.locator('div.tiny-carousel__item') + + await carousel.hover() + await page.waitForTimeout(100) + const arrow = carousel.locator('.tiny-carousel__arrow') + // 左侧切换按钮 + await expect(arrow.first()).toBeVisible() + // 右侧切换按钮 + await expect(arrow.nth(1)).toBeVisible() + + // 点击下一张按钮 + await preview.locator('button:nth-child(2)').click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + + // 点击上一张按钮 + await page.locator('.tiny-carousel__arrow').first().click() + // 当前应该显示第一张幻灯片 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') +}) diff --git a/examples/docs/resources/pc/demo/carousel/carousel-arrow-hover.vue b/examples/sites/demos/app/carousel/carousel-arrow-hover.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/carousel-arrow-hover.vue rename to examples/sites/demos/app/carousel/carousel-arrow-hover.vue diff --git a/examples/sites/demos/app/carousel/carousel-arrow-never-composition-api.vue b/examples/sites/demos/app/carousel/carousel-arrow-never-composition-api.vue new file mode 100644 index 000000000..fe2695db6 --- /dev/null +++ b/examples/sites/demos/app/carousel/carousel-arrow-never-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/carousel-arrow-never.spec.ts b/examples/sites/demos/app/carousel/carousel-arrow-never.spec.ts new file mode 100644 index 000000000..ebd9bef86 --- /dev/null +++ b/examples/sites/demos/app/carousel/carousel-arrow-never.spec.ts @@ -0,0 +1,22 @@ +import { test, expect } from '@playwright/test' + +test('隐藏切换箭头', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/carousel-arrow-never') + const preview = page.locator('#preview') + const carousel = preview.locator('.tiny-carousel') + const carouselItems = preview.locator('div.tiny-carousel__item') + + await carousel.hover() + await page.waitForTimeout(100) + const arrow = carousel.locator('.tiny-carousel__arrow') + // 左侧切换按钮应该不可见 + await expect(arrow.first()).not.toBeVisible() + // 右侧切换按钮应该不可见 + await expect(arrow.nth(1)).not.toBeVisible() + + // 点击底部按钮切换 + await preview.getByRole('list').getByRole('button').nth(1).click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') +}) diff --git a/examples/docs/resources/pc/demo/carousel/carousel-arrow-never.vue b/examples/sites/demos/app/carousel/carousel-arrow-never.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/carousel-arrow-never.vue rename to examples/sites/demos/app/carousel/carousel-arrow-never.vue diff --git a/examples/sites/demos/app/carousel/carousel-events-composition-api.vue b/examples/sites/demos/app/carousel/carousel-events-composition-api.vue new file mode 100644 index 000000000..9aff72140 --- /dev/null +++ b/examples/sites/demos/app/carousel/carousel-events-composition-api.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/carousel/carousel-events.spec.ts b/examples/sites/demos/app/carousel/carousel-events.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/carousel/carousel-events.spec.ts rename to examples/sites/demos/app/carousel/carousel-events.spec.ts diff --git a/examples/docs/resources/pc/demo/carousel/carousel-events.vue b/examples/sites/demos/app/carousel/carousel-events.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/carousel-events.vue rename to examples/sites/demos/app/carousel/carousel-events.vue diff --git a/examples/sites/demos/app/carousel/close-loop-composition-api.vue b/examples/sites/demos/app/carousel/close-loop-composition-api.vue new file mode 100644 index 000000000..f99e6fc0e --- /dev/null +++ b/examples/sites/demos/app/carousel/close-loop-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/close-loop.spec.ts b/examples/sites/demos/app/carousel/close-loop.spec.ts new file mode 100644 index 000000000..3f9a6d324 --- /dev/null +++ b/examples/sites/demos/app/carousel/close-loop.spec.ts @@ -0,0 +1,26 @@ +import { test, expect } from '@playwright/test' + +test('关闭循环轮播', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/close-loop') + const preview = page.locator('#preview') + const carousel = preview.locator('.tiny-carousel') + const carouselItems = preview.locator('div.tiny-carousel__item') + const arrow = carousel.locator('.tiny-carousel__arrow') + + // 左侧切换按钮应该不可见 + await expect(arrow.first()).not.toBeVisible() + // 点击下一张按钮 + await arrow.nth(1).click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + await arrow.nth(1).click() + // 当前应该显示第三张幻灯片 + await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + // 右侧切换按钮应该不可见 + await expect(arrow.nth(1)).not.toBeVisible() + // 点击上一张按钮 + await arrow.first().click() + // 当前应该显示第一张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') +}) diff --git a/examples/docs/resources/pc/demo/carousel/close-loop.vue b/examples/sites/demos/app/carousel/close-loop.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/close-loop.vue rename to examples/sites/demos/app/carousel/close-loop.vue diff --git a/examples/sites/demos/app/carousel/custom-height-composition-api.vue b/examples/sites/demos/app/carousel/custom-height-composition-api.vue new file mode 100644 index 000000000..964ffc3a0 --- /dev/null +++ b/examples/sites/demos/app/carousel/custom-height-composition-api.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/carousel/custom-height.vue b/examples/sites/demos/app/carousel/custom-height.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/custom-height.vue rename to examples/sites/demos/app/carousel/custom-height.vue diff --git a/examples/sites/demos/app/carousel/indicator-trigger-composition-api.vue b/examples/sites/demos/app/carousel/indicator-trigger-composition-api.vue new file mode 100644 index 000000000..634467a91 --- /dev/null +++ b/examples/sites/demos/app/carousel/indicator-trigger-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/indicator-trigger.spec.ts b/examples/sites/demos/app/carousel/indicator-trigger.spec.ts new file mode 100644 index 000000000..b67b7fe3e --- /dev/null +++ b/examples/sites/demos/app/carousel/indicator-trigger.spec.ts @@ -0,0 +1,18 @@ +import { test, expect } from '@playwright/test' + +test('指示器和触发方式', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/indicator-trigger') + const preview = page.locator('#preview') + const carouselItems = preview.locator('div.tiny-carousel__item') + const indicators = preview.getByRole('list').getByRole('button') + + // 悬浮底部第二个按钮 + await indicators.nth(1).hover() + // 当前应该显示第一张幻灯片 + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + // 点击底部第二个按钮 + await indicators.nth(1).click() + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') +}) diff --git a/examples/docs/resources/pc/demo/carousel/indicator-trigger.vue b/examples/sites/demos/app/carousel/indicator-trigger.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/indicator-trigger.vue rename to examples/sites/demos/app/carousel/indicator-trigger.vue diff --git a/examples/sites/demos/app/carousel/initial-index-composition-api.vue b/examples/sites/demos/app/carousel/initial-index-composition-api.vue new file mode 100644 index 000000000..cbcac1903 --- /dev/null +++ b/examples/sites/demos/app/carousel/initial-index-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/carousel/initial-index.vue b/examples/sites/demos/app/carousel/initial-index.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/initial-index.vue rename to examples/sites/demos/app/carousel/initial-index.vue diff --git a/examples/sites/demos/app/carousel/manual-play-composition-api.vue b/examples/sites/demos/app/carousel/manual-play-composition-api.vue new file mode 100644 index 000000000..751b9c8fe --- /dev/null +++ b/examples/sites/demos/app/carousel/manual-play-composition-api.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/carousel/manual-play.spec.ts b/examples/sites/demos/app/carousel/manual-play.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/carousel/manual-play.spec.ts rename to examples/sites/demos/app/carousel/manual-play.spec.ts diff --git a/examples/docs/resources/pc/demo/carousel/manual-play.vue b/examples/sites/demos/app/carousel/manual-play.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/manual-play.vue rename to examples/sites/demos/app/carousel/manual-play.vue diff --git a/examples/sites/demos/app/carousel/play-interval-composition-api.vue b/examples/sites/demos/app/carousel/play-interval-composition-api.vue new file mode 100644 index 000000000..9325bcf3f --- /dev/null +++ b/examples/sites/demos/app/carousel/play-interval-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/carousel/play-interval.spec.ts b/examples/sites/demos/app/carousel/play-interval.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/carousel/play-interval.spec.ts rename to examples/sites/demos/app/carousel/play-interval.spec.ts diff --git a/examples/docs/resources/pc/demo/carousel/play-interval.vue b/examples/sites/demos/app/carousel/play-interval.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/play-interval.vue rename to examples/sites/demos/app/carousel/play-interval.vue diff --git a/examples/sites/demos/app/carousel/show-title-composition-api.vue b/examples/sites/demos/app/carousel/show-title-composition-api.vue new file mode 100644 index 000000000..54b97a4c4 --- /dev/null +++ b/examples/sites/demos/app/carousel/show-title-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/show-title.spec.ts b/examples/sites/demos/app/carousel/show-title.spec.ts new file mode 100644 index 000000000..ef7770d18 --- /dev/null +++ b/examples/sites/demos/app/carousel/show-title.spec.ts @@ -0,0 +1,12 @@ +import { test, expect } from '@playwright/test' + +test('显示标题', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/show-title') + const preview = page.locator('#preview') + const carouselItems = preview.locator('div.tiny-carousel__item') + const indicators = preview.getByRole('list').getByRole('button') + await expect(carouselItems.first().locator('span')).toHaveText('幻灯片 - 1') + await indicators.nth(1).hover() + await expect(carouselItems.nth(1).locator('span')).toHaveText('幻灯片 - 2') +}) diff --git a/examples/docs/resources/pc/demo/carousel/show-title.vue b/examples/sites/demos/app/carousel/show-title.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/show-title.vue rename to examples/sites/demos/app/carousel/show-title.vue diff --git a/examples/sites/demos/app/carousel/up-down-carousel-composition-api.vue b/examples/sites/demos/app/carousel/up-down-carousel-composition-api.vue new file mode 100644 index 000000000..f3b59c66c --- /dev/null +++ b/examples/sites/demos/app/carousel/up-down-carousel-composition-api.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/examples/sites/demos/app/carousel/up-down-carousel.spec.ts b/examples/sites/demos/app/carousel/up-down-carousel.spec.ts new file mode 100644 index 000000000..efdea1194 --- /dev/null +++ b/examples/sites/demos/app/carousel/up-down-carousel.spec.ts @@ -0,0 +1,18 @@ +import { test, expect } from '@playwright/test' + +test('纵向轮播', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/carousel/up-down-carousel') + const preview = page.locator('#preview') + const indicators = preview.getByRole('button') + const carouselItems = preview.locator('.tiny-carousel__item') + await indicators.nth(1).hover() + // 第一张幻灯片在Y轴向上平移了150px + await expect(carouselItems.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, -150)') + // 当前应该显示第二张幻灯片 + await expect(carouselItems.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 0)') + // 第三张幻灯片在Y轴向下平移了150px + await expect(carouselItems.nth(2)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 150)') + // 第四张幻灯片在Y轴向上平移了450px + await expect(carouselItems.nth(3)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, -450)') +}) diff --git a/examples/docs/resources/pc/demo/carousel/up-down-carousel.vue b/examples/sites/demos/app/carousel/up-down-carousel.vue similarity index 100% rename from examples/docs/resources/pc/demo/carousel/up-down-carousel.vue rename to examples/sites/demos/app/carousel/up-down-carousel.vue diff --git a/examples/sites/demos/app/carousel/webdoc/carousel.cn.md b/examples/sites/demos/app/carousel/webdoc/carousel.cn.md new file mode 100644 index 000000000..c8f5bc773 --- /dev/null +++ b/examples/sites/demos/app/carousel/webdoc/carousel.cn.md @@ -0,0 +1,7 @@ +--- +title: Carousel 走马灯 +--- + +# Carousel 走马灯 + +
常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。
diff --git a/examples/sites/demos/app/carousel/webdoc/carousel.en.md b/examples/sites/demos/app/carousel/webdoc/carousel.en.md new file mode 100644 index 000000000..5c93225e4 --- /dev/null +++ b/examples/sites/demos/app/carousel/webdoc/carousel.en.md @@ -0,0 +1,7 @@ +--- +title: Carousel Horse Lantern +--- + +# Carousel Horse Lantern + +
This mode is used to display a group of pictures or cards in carousel mode. When the content space is insufficient, you can store the pictures or cards in carousel mode.
diff --git a/examples/sites/demos/app/carousel/webdoc/carousel.js b/examples/sites/demos/app/carousel/webdoc/carousel.js new file mode 100644 index 000000000..ef6b8a860 --- /dev/null +++ b/examples/sites/demos/app/carousel/webdoc/carousel.js @@ -0,0 +1,268 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'indicator-trigger', + 'name': { 'zh-CN': '指示器和触发方式', 'en-US': 'Indicator and Trigger Mode' }, + 'desc': { + 'zh-CN': + '

走马灯指示器默认显示在幻灯片内容上,配置 indicator-position 为 outside 后,将显示在外部。\n配置 trigger 为 click ,可以修改指示器触发方式为单击,默认鼠标悬停到指示器时,走马灯幻灯片就会对应切换。

\n', + 'en-US': + '

The walk indicator is displayed on the slide by default. After indicator-position is set to outside, the indicator is displayed outside. \n Set trigger to click. You can change the indicator triggering mode to click. By default, when you hover the cursor over an indicator, the slideshow is switched accordingly.

\n' + }, + 'codeFiles': ['indicator-trigger.vue'] + }, + { + 'demoId': 'manual-play', + 'name': { 'zh-CN': '手动轮播', 'en-US': 'Manual Carousel' }, + 'desc': { + 'zh-CN': + '

调用 setActiveItem()next()prev() 方法可根据需要进行轮播。initial-index 属性可以指定初始激活的幻灯片索引。

\n', + 'en-US': + '

Invoke the setActiveItem(), next(), and prev() methods to perform NVOD as required. The initial-index property specifies the slide index that is initially activated.

\n' + }, + 'codeFiles': ['manual-play.vue'] + }, + { + 'demoId': 'close-loop', + 'name': { 'zh-CN': '关闭循环轮播', 'en-US': 'Disable cyclic NVOD.' }, + 'desc': { + 'zh-CN': + '

配置 loop 属性为 false 后,若走马灯幻灯片已切换到最后一项,则将不能再从第一项开始循环切换。即切换到最后一项时,右侧切换箭头不再显示,切换到第一项时,左侧切换箭头不再显示。

\n', + 'en-US': + '

After the loop attribute is set to false, if the slide is switched to the last item, the slide cannot be switched cyclically from the first item. That is, when switching to the last item, the right toggle arrow is no longer displayed, and when switching to the first item, the left toggle arrow is no longer displayed.

\n' + }, + 'codeFiles': ['close-loop.vue'] + }, + { + 'demoId': 'autoplay', + 'name': { 'zh-CN': '自动切换', 'en-US': 'Automatic switchover' }, + 'desc': { + 'zh-CN': '

配置 autoplay 属性为 true 后,走马灯的幻灯片内容将自动轮播切换。

\n', + 'en-US': + '

After autoplay is set to true, the slide content of the walk-through is automatically switched in rotation.

\n' + }, + 'codeFiles': ['autoplay.vue'] + }, + { + 'demoId': 'play-interval', + 'name': { 'zh-CN': '轮播间隔时间', 'en-US': 'NVOD Interval' }, + 'desc': { + 'zh-CN': '

走马灯幻灯片轮播间隔时间默认为 3000 毫秒,通过 interval 属性可以自定义。

\n', + 'en-US': + '

The interval is 3000 ms by default, which can be customized through the interval attribute.

\n' + }, + 'codeFiles': ['play-interval.vue'] + }, + { + 'demoId': 'up-down-carousel', + 'name': { 'zh-CN': '纵向轮播', 'en-US': 'vertical carousel' }, + 'desc': { + 'zh-CN': '

配置 type 属性为 vertical 即可实现纵向轮播。

\n', + 'en-US': '

Set type to vertical to implement vertical rotation.

\n' + }, + 'codeFiles': ['up-down-carousel.vue'] + }, + { + 'demoId': 'show-title', + 'name': { 'zh-CN': '显示标题', 'en-US': 'Display Title' }, + 'desc': { + 'zh-CN': '

通过 title 配置显示标题,需要与 show-title 结合使用。

\n', + 'en-US': + '

Use title to configure the display title. This parameter must be used together with show-title.

\n' + }, + 'codeFiles': ['show-title.vue'] + }, + { + 'demoId': 'carousel-arrow-always', + 'name': { 'zh-CN': '总是显示切换箭头', 'en-US': 'Always show the switch arrow' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['carousel-arrow-always.vue'] + }, + { + 'demoId': 'carousel-arrow-hover', + 'name': { 'zh-CN': 'hover 时显示切换箭头', 'en-US': 'The switch arrow is displayed during Hover.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['carousel-arrow-hover.vue'] + }, + { + 'demoId': 'carousel-arrow-never', + 'name': { 'zh-CN': '隐藏切换箭头', 'en-US': 'Hide the switch arrow' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['carousel-arrow-never.vue'] + }, + { + 'demoId': 'card-mode', + 'name': { 'zh-CN': '卡片模式', 'en-US': 'Card Mode' }, + 'desc': { + 'zh-CN': '

配置 type 属性为 card 后,走马灯将以卡片形式进行展示。

\n', + 'en-US': '

After the type attribute is set to card, the lantern is displayed as a card.

\n' + }, + 'codeFiles': ['card-mode.vue'] + }, + { + 'demoId': 'carousel-events', + 'name': { 'zh-CN': '走马灯事件', 'en-US': '' }, + 'desc': { + 'zh-CN': + '

主要包含change事件。

\n

当幻灯片切换时会触发该事件,回调函数可接收两个参数:当前幻灯片索引上一张幻灯片索引

\n', + 'en-US': '' + }, + 'codeFiles': ['carousel-events.vue'] + } + ], + apis: [ + { + 'name': 'carousel', + 'type': 'component', + 'properties': [], + 'events': [], + 'slots': [], + 'carousel-attrs': [ + { + 'name': 'arrow', + 'type': 'String', + 'defaultValue': '该属性的默认值为 hover', + 'desc': { 'zh-CN': '切换箭头的显示时机;该属性的可选值为 always / hover / never', 'en-US': '' }, + 'demoId': 'up-down-carousel' + }, + { + 'name': 'autoplay', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否自动切换', 'en-US': '' }, + 'demoId': 'autoplay' + }, + { + 'name': 'height', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '走马灯的高度', 'en-US': '' }, + 'demoId': 'indicator-trigger' + }, + { + 'name': 'indicator-position', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '指示器的位置。该属性的可选值为 outside / none', 'en-US': '' }, + 'demoId': 'indicator-trigger' + }, + { + 'name': 'initial-index', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 0', + 'desc': { 'zh-CN': '初始状态激活的幻灯片的索引,从 0 开始', 'en-US': '' }, + 'demoId': 'manual-play' + }, + { + 'name': 'interval', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 3000', + 'desc': { 'zh-CN': '自动切换的时间间隔,单位为毫秒', 'en-US': '' }, + 'demoId': 'play-interval' + }, + { + 'name': 'show-title', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否显示标题', 'en-US': '' }, + 'demoId': 'show-title' + }, + { + 'name': 'trigger', + 'type': 'String', + 'defaultValue': '该属性的默认值为 hover', + 'desc': { 'zh-CN': '指示器的触发方式,默认为 hover。该属性的可选值为 click', 'en-US': '' }, + 'demoId': 'indicator-trigger' + }, + { + 'name': 'type', + 'type': 'String', + 'defaultValue': '该属性的默认值为 horizontal', + 'desc': { 'zh-CN': '走马灯的类型;该属性的可选值为 horizontal / vertical / card', 'en-US': '' }, + 'demoId': 'card-mode' + }, + { + 'name': 'loop', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否循环显示', 'en-US': '' }, + 'demoId': 'close-loop' + } + ], + 'carousel-slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认插槽', 'en-US': '' }, + 'demoId': 'manual-play' + } + ], + 'carousel-methods': [ + { + 'name': 'next', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '切换至下一张幻灯片', 'en-US': '' }, + 'demoId': 'manual-play' + }, + { + 'name': 'prev', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '切换至上一张幻灯片', 'en-US': '' }, + 'demoId': 'manual-play' + }, + { + 'name': 'setActiveItem', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '手动切换幻灯片', 'en-US': '' }, + 'demoId': 'manual-play' + } + ], + 'carousel-events': [ + { + 'name': 'change', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '幻灯片切换时触发', 'en-US': '' }, + 'demoId': 'carousel-events' + } + ], + 'carouselItem-attrs': [ + { + 'name': 'title', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '幻灯片标题', 'en-US': '' }, + 'demoId': 'show-title' + }, + { + 'name': 'name', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '幻灯片名称', 'en-US': '' }, + 'demoId': 'show-title' + } + ], + 'carouselItem-slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认插槽', 'en-US': '' }, + 'demoId': 'manual-play' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/cascader-panel/basic-usage-composition-api.vue b/examples/sites/demos/app/cascader-panel/basic-usage-composition-api.vue new file mode 100644 index 000000000..efc194fb9 --- /dev/null +++ b/examples/sites/demos/app/cascader-panel/basic-usage-composition-api.vue @@ -0,0 +1,209 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/cascader-panel/basic-usage.spec.ts b/examples/sites/demos/app/cascader-panel/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader-panel/basic-usage.spec.ts rename to examples/sites/demos/app/cascader-panel/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader-panel/basic-usage.vue b/examples/sites/demos/app/cascader-panel/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader-panel/basic-usage.vue rename to examples/sites/demos/app/cascader-panel/basic-usage.vue diff --git a/examples/sites/demos/app/cascader-panel/cascader-panel-props-composition-api.vue b/examples/sites/demos/app/cascader-panel/cascader-panel-props-composition-api.vue new file mode 100644 index 000000000..2ddeba104 --- /dev/null +++ b/examples/sites/demos/app/cascader-panel/cascader-panel-props-composition-api.vue @@ -0,0 +1,222 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/cascader-panel/cascader-panel-props.spec.ts b/examples/sites/demos/app/cascader-panel/cascader-panel-props.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader-panel/cascader-panel-props.spec.ts rename to examples/sites/demos/app/cascader-panel/cascader-panel-props.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader-panel/cascader-panel-props.vue b/examples/sites/demos/app/cascader-panel/cascader-panel-props.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader-panel/cascader-panel-props.vue rename to examples/sites/demos/app/cascader-panel/cascader-panel-props.vue diff --git a/examples/sites/demos/app/cascader-panel/change-composition-api.vue b/examples/sites/demos/app/cascader-panel/change-composition-api.vue new file mode 100644 index 000000000..46a677fea --- /dev/null +++ b/examples/sites/demos/app/cascader-panel/change-composition-api.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/cascader-panel/change.spec.ts b/examples/sites/demos/app/cascader-panel/change.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader-panel/change.spec.ts rename to examples/sites/demos/app/cascader-panel/change.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader-panel/change.vue b/examples/sites/demos/app/cascader-panel/change.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader-panel/change.vue rename to examples/sites/demos/app/cascader-panel/change.vue diff --git a/examples/sites/demos/app/cascader-panel/custom-option-content-composition-api.vue b/examples/sites/demos/app/cascader-panel/custom-option-content-composition-api.vue new file mode 100644 index 000000000..04747d902 --- /dev/null +++ b/examples/sites/demos/app/cascader-panel/custom-option-content-composition-api.vue @@ -0,0 +1,214 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/cascader-panel/custom-option-content.spec.ts b/examples/sites/demos/app/cascader-panel/custom-option-content.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader-panel/custom-option-content.spec.ts rename to examples/sites/demos/app/cascader-panel/custom-option-content.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader-panel/custom-option-content.vue b/examples/sites/demos/app/cascader-panel/custom-option-content.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader-panel/custom-option-content.vue rename to examples/sites/demos/app/cascader-panel/custom-option-content.vue diff --git a/examples/sites/demos/app/cascader-panel/expand-change-composition-api.vue b/examples/sites/demos/app/cascader-panel/expand-change-composition-api.vue new file mode 100644 index 000000000..5fd39e915 --- /dev/null +++ b/examples/sites/demos/app/cascader-panel/expand-change-composition-api.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/cascader-panel/expand-change.spec.ts b/examples/sites/demos/app/cascader-panel/expand-change.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader-panel/expand-change.spec.ts rename to examples/sites/demos/app/cascader-panel/expand-change.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader-panel/expand-change.vue b/examples/sites/demos/app/cascader-panel/expand-change.vue similarity index 97% rename from examples/docs/resources/pc/demo/cascader-panel/expand-change.vue rename to examples/sites/demos/app/cascader-panel/expand-change.vue index e3c15eac5..05dc7a54e 100644 --- a/examples/docs/resources/pc/demo/cascader-panel/expand-change.vue +++ b/examples/sites/demos/app/cascader-panel/expand-change.vue @@ -1,5 +1,9 @@ diff --git a/examples/docs/resources/pc/demo/cascader/auto-load-checkStrictly.spec.ts b/examples/sites/demos/app/cascader/auto-load-checkStrictly.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/auto-load-checkStrictly.spec.ts rename to examples/sites/demos/app/cascader/auto-load-checkStrictly.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/auto-load-checkStrictly.vue b/examples/sites/demos/app/cascader/auto-load-checkStrictly.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/auto-load-checkStrictly.vue rename to examples/sites/demos/app/cascader/auto-load-checkStrictly.vue diff --git a/examples/sites/demos/app/cascader/auto-load-composition-api.vue b/examples/sites/demos/app/cascader/auto-load-composition-api.vue new file mode 100644 index 000000000..602a4e75f --- /dev/null +++ b/examples/sites/demos/app/cascader/auto-load-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/auto-load.spec.ts b/examples/sites/demos/app/cascader/auto-load.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/auto-load.spec.ts rename to examples/sites/demos/app/cascader/auto-load.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/auto-load.vue b/examples/sites/demos/app/cascader/auto-load.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/auto-load.vue rename to examples/sites/demos/app/cascader/auto-load.vue diff --git a/examples/sites/demos/app/cascader/basic-usage-composition-api.vue b/examples/sites/demos/app/cascader/basic-usage-composition-api.vue new file mode 100644 index 000000000..64d032008 --- /dev/null +++ b/examples/sites/demos/app/cascader/basic-usage-composition-api.vue @@ -0,0 +1,204 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/basic-usage.spec.ts b/examples/sites/demos/app/cascader/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/basic-usage.spec.ts rename to examples/sites/demos/app/cascader/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/basic-usage.vue b/examples/sites/demos/app/cascader/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/basic-usage.vue rename to examples/sites/demos/app/cascader/basic-usage.vue diff --git a/examples/sites/demos/app/cascader/check-strictly-composition-api.vue b/examples/sites/demos/app/cascader/check-strictly-composition-api.vue new file mode 100644 index 000000000..9a0bc9d98 --- /dev/null +++ b/examples/sites/demos/app/cascader/check-strictly-composition-api.vue @@ -0,0 +1,207 @@ + + + diff --git a/examples/sites/demos/app/cascader/check-strictly-multiple-composition-api.vue b/examples/sites/demos/app/cascader/check-strictly-multiple-composition-api.vue new file mode 100644 index 000000000..07ad07747 --- /dev/null +++ b/examples/sites/demos/app/cascader/check-strictly-multiple-composition-api.vue @@ -0,0 +1,211 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/check-strictly-multiple.spec.ts b/examples/sites/demos/app/cascader/check-strictly-multiple.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/check-strictly-multiple.spec.ts rename to examples/sites/demos/app/cascader/check-strictly-multiple.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/check-strictly-multiple.vue b/examples/sites/demos/app/cascader/check-strictly-multiple.vue similarity index 97% rename from examples/docs/resources/pc/demo/cascader/check-strictly-multiple.vue rename to examples/sites/demos/app/cascader/check-strictly-multiple.vue index e518fae7e..8d4bd21b2 100644 --- a/examples/docs/resources/pc/demo/cascader/check-strictly-multiple.vue +++ b/examples/sites/demos/app/cascader/check-strictly-multiple.vue @@ -1,5 +1,9 @@ diff --git a/examples/docs/resources/pc/demo/cascader/clearable.spec.ts b/examples/sites/demos/app/cascader/clearable.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/clearable.spec.ts rename to examples/sites/demos/app/cascader/clearable.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/clearable.vue b/examples/sites/demos/app/cascader/clearable.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/clearable.vue rename to examples/sites/demos/app/cascader/clearable.vue diff --git a/examples/sites/demos/app/cascader/collapse-tags-composition-api.vue b/examples/sites/demos/app/cascader/collapse-tags-composition-api.vue new file mode 100644 index 000000000..7b51eca71 --- /dev/null +++ b/examples/sites/demos/app/cascader/collapse-tags-composition-api.vue @@ -0,0 +1,209 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/collapse-tags.spec.ts b/examples/sites/demos/app/cascader/collapse-tags.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/collapse-tags.spec.ts rename to examples/sites/demos/app/cascader/collapse-tags.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/collapse-tags.vue b/examples/sites/demos/app/cascader/collapse-tags.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/collapse-tags.vue rename to examples/sites/demos/app/cascader/collapse-tags.vue diff --git a/examples/sites/demos/app/cascader/default-multiple-composition-api.vue b/examples/sites/demos/app/cascader/default-multiple-composition-api.vue new file mode 100644 index 000000000..c8319b36b --- /dev/null +++ b/examples/sites/demos/app/cascader/default-multiple-composition-api.vue @@ -0,0 +1,221 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/default-multiple.spec.ts b/examples/sites/demos/app/cascader/default-multiple.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/default-multiple.spec.ts rename to examples/sites/demos/app/cascader/default-multiple.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/default-multiple.vue b/examples/sites/demos/app/cascader/default-multiple.vue similarity index 97% rename from examples/docs/resources/pc/demo/cascader/default-multiple.vue rename to examples/sites/demos/app/cascader/default-multiple.vue index c9dd89008..7c246f46f 100644 --- a/examples/docs/resources/pc/demo/cascader/default-multiple.vue +++ b/examples/sites/demos/app/cascader/default-multiple.vue @@ -1,5 +1,11 @@ diff --git a/examples/docs/resources/pc/demo/cascader/disabled-items.spec.ts b/examples/sites/demos/app/cascader/disabled-items.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/disabled-items.spec.ts rename to examples/sites/demos/app/cascader/disabled-items.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/disabled-items.vue b/examples/sites/demos/app/cascader/disabled-items.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/disabled-items.vue rename to examples/sites/demos/app/cascader/disabled-items.vue diff --git a/examples/sites/demos/app/cascader/events-composition-api.vue b/examples/sites/demos/app/cascader/events-composition-api.vue new file mode 100644 index 000000000..530f0f401 --- /dev/null +++ b/examples/sites/demos/app/cascader/events-composition-api.vue @@ -0,0 +1,249 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/events.spec.ts b/examples/sites/demos/app/cascader/events.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/events.spec.ts rename to examples/sites/demos/app/cascader/events.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/events.vue b/examples/sites/demos/app/cascader/events.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/events.vue rename to examples/sites/demos/app/cascader/events.vue diff --git a/examples/sites/demos/app/cascader/expand-trigger-composition-api.vue b/examples/sites/demos/app/cascader/expand-trigger-composition-api.vue new file mode 100644 index 000000000..d46764082 --- /dev/null +++ b/examples/sites/demos/app/cascader/expand-trigger-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/expand-trigger.spec.ts b/examples/sites/demos/app/cascader/expand-trigger.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/expand-trigger.spec.ts rename to examples/sites/demos/app/cascader/expand-trigger.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/expand-trigger.vue b/examples/sites/demos/app/cascader/expand-trigger.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/expand-trigger.vue rename to examples/sites/demos/app/cascader/expand-trigger.vue diff --git a/examples/sites/demos/app/cascader/filter-method-composition-api.vue b/examples/sites/demos/app/cascader/filter-method-composition-api.vue new file mode 100644 index 000000000..219edd1d7 --- /dev/null +++ b/examples/sites/demos/app/cascader/filter-method-composition-api.vue @@ -0,0 +1,221 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/filter-method.spec.ts b/examples/sites/demos/app/cascader/filter-method.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/filter-method.spec.ts rename to examples/sites/demos/app/cascader/filter-method.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/filter-method.vue b/examples/sites/demos/app/cascader/filter-method.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/filter-method.vue rename to examples/sites/demos/app/cascader/filter-method.vue diff --git a/examples/sites/demos/app/cascader/filterable-composition-api.vue b/examples/sites/demos/app/cascader/filterable-composition-api.vue new file mode 100644 index 000000000..e5900e796 --- /dev/null +++ b/examples/sites/demos/app/cascader/filterable-composition-api.vue @@ -0,0 +1,207 @@ + + + diff --git a/examples/sites/demos/app/cascader/filterable-multiple-composition-api.vue b/examples/sites/demos/app/cascader/filterable-multiple-composition-api.vue new file mode 100644 index 000000000..2ad7795ee --- /dev/null +++ b/examples/sites/demos/app/cascader/filterable-multiple-composition-api.vue @@ -0,0 +1,203 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/filterable-multiple.spec.ts b/examples/sites/demos/app/cascader/filterable-multiple.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/filterable-multiple.spec.ts rename to examples/sites/demos/app/cascader/filterable-multiple.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/filterable-multiple.vue b/examples/sites/demos/app/cascader/filterable-multiple.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/filterable-multiple.vue rename to examples/sites/demos/app/cascader/filterable-multiple.vue diff --git a/examples/docs/resources/pc/demo/cascader/filterable.spec.ts b/examples/sites/demos/app/cascader/filterable.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/filterable.spec.ts rename to examples/sites/demos/app/cascader/filterable.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/filterable.vue b/examples/sites/demos/app/cascader/filterable.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/filterable.vue rename to examples/sites/demos/app/cascader/filterable.vue diff --git a/examples/sites/demos/app/cascader/props-children-composition-api.vue b/examples/sites/demos/app/cascader/props-children-composition-api.vue new file mode 100644 index 000000000..2ff41a510 --- /dev/null +++ b/examples/sites/demos/app/cascader/props-children-composition-api.vue @@ -0,0 +1,213 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/props-children.spec.ts b/examples/sites/demos/app/cascader/props-children.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/props-children.spec.ts rename to examples/sites/demos/app/cascader/props-children.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/props-children.vue b/examples/sites/demos/app/cascader/props-children.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/props-children.vue rename to examples/sites/demos/app/cascader/props-children.vue diff --git a/examples/sites/demos/app/cascader/show-all-levels-composition-api.vue b/examples/sites/demos/app/cascader/show-all-levels-composition-api.vue new file mode 100644 index 000000000..58ff7c871 --- /dev/null +++ b/examples/sites/demos/app/cascader/show-all-levels-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/cascader/show-all-levels.spec.ts b/examples/sites/demos/app/cascader/show-all-levels.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/cascader/show-all-levels.spec.ts rename to examples/sites/demos/app/cascader/show-all-levels.spec.ts diff --git a/examples/docs/resources/pc/demo/cascader/show-all-levels.vue b/examples/sites/demos/app/cascader/show-all-levels.vue similarity index 100% rename from examples/docs/resources/pc/demo/cascader/show-all-levels.vue rename to examples/sites/demos/app/cascader/show-all-levels.vue diff --git a/examples/sites/demos/app/cascader/webdoc/cascader.cn.md b/examples/sites/demos/app/cascader/webdoc/cascader.cn.md new file mode 100644 index 000000000..3cf9ba1c7 --- /dev/null +++ b/examples/sites/demos/app/cascader/webdoc/cascader.cn.md @@ -0,0 +1,7 @@ +--- +title: Cascader 级联选择器 +--- + +# Cascader 级联选择器 + +
当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择。
diff --git a/examples/sites/demos/app/cascader/webdoc/cascader.en.md b/examples/sites/demos/app/cascader/webdoc/cascader.en.md new file mode 100644 index 000000000..d0b8e3f3c --- /dev/null +++ b/examples/sites/demos/app/cascader/webdoc/cascader.en.md @@ -0,0 +1,7 @@ +--- +title: Cascader cascading selector +--- + +# Cascader cascading selector + +
When a data set has a clear hierarchy, you can use the cascading selector to view and select a data set level by level.
diff --git a/examples/sites/demos/app/cascader/webdoc/cascader.js b/examples/sites/demos/app/cascader/webdoc/cascader.js new file mode 100644 index 000000000..d0c15e4a7 --- /dev/null +++ b/examples/sites/demos/app/cascader/webdoc/cascader.js @@ -0,0 +1,583 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': '

通过 options 属性指定选项数组即可渲染出一个级联选择器。

\n', + 'en-US': + '

Renders a cascade selector by specifying an array of options with the options attribute.

\n' + }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'expand-trigger', + 'name': { 'zh-CN': 'hover 触发子菜单', 'en-US': 'Hover Triggering Submenu' }, + 'desc': { + 'zh-CN': + '

通过 props.expandTrigger 可以指定展开子级菜单的触发方式为 hover,默认为 click

\n', + 'en-US': + '

You can use props.expandTrigger to specify the triggering mode of expanding a submenu as hover. The default triggering mode is click.

\n' + }, + 'codeFiles': ['expand-trigger.vue'] + }, + { + 'demoId': 'disabled-items', + 'name': { 'zh-CN': '禁用选项', 'en-US': 'Disable Options' }, + 'desc': { + 'zh-CN': + '

通过在数据源中设置 disabled 字段来声明该选项是禁用的,本例中,options 指定的数组中的第一个元素含有 disabled: true 键值对,因此是禁用的。在默认情况下,Cascader 会检查数据中每一项的 disabled 字段是否为 true,如果你的数据中表示禁用含义的字段名不为 disabled,可以通过 props.disabled 属性来指定(详见 Cascader Props 的 API 表格)。当然,valuelabelchildren 这三个字段名也可以通过同样的方式指定。

\n', + 'en-US': + '

declares that this option is disabled by setting the disabled field in the data source, in this case, The first element in the array specified by options contains a disabled: true key-value pair and is therefore disabled. By default, Cascader checks whether the disabled field of each item in the data is true. If the name of the field that indicates the disabled meaning in your data is not disabled, you can use the props.disabled property to specify it. For details, see the API table of Cascader Props. Certainly, value, label, and children may also be specified in the same way.

\n' + }, + 'codeFiles': ['disabled-items.vue'] + }, + { + 'demoId': 'disabled-items1', + 'name': { 'zh-CN': '指定属性值', 'en-US': 'Specify Attribute Value' }, + 'desc': { + 'zh-CN': '

通过 props 属性设置属性值映射。

\n', + 'en-US': '

Sets the attribute value mapping through the props attribute.

\n' + }, + 'codeFiles': ['disabled-items.vue'] + }, + { + 'demoId': 'clearable', + 'name': { 'zh-CN': '可清空', 'en-US': 'Can be cleared' }, + 'desc': { + 'zh-CN': '

通过 clearable 属性设置输入框可清空。

\n', + 'en-US': '

You can clear the text box by setting the clearable attribute.

\n' + }, + 'codeFiles': ['clearable.vue'] + }, + { + 'demoId': 'clearable1', + 'name': { 'zh-CN': '分隔符', 'en-US': 'Separator' }, + 'desc': { + 'zh-CN': '

通过 separator 属性设置分隔符。

\n', + 'en-US': '

Set the separator through the separator attribute.

\n' + }, + 'codeFiles': ['clearable.vue'] + }, + { + 'demoId': 'clearable2', + 'name': { 'zh-CN': '尺寸', 'en-US': 'Dimension' }, + 'desc': { + 'zh-CN': '

通过 size 属性设置尺寸。

\n', + 'en-US': '

Sets the size through the size attribute.

\n' + }, + 'codeFiles': ['clearable.vue'] + }, + { + 'demoId': 'default-multiple', + 'name': { 'zh-CN': '多选', 'en-US': 'Multiple Choices' }, + 'desc': { + 'zh-CN': '

通过 props.multiple = true 来开启多选模式。

\n', + 'en-US': '

Use props.multiple = true to enable the multi-selection mode.

\n' + }, + 'codeFiles': ['default-multiple.vue'] + }, + { + 'demoId': 'collapse-tags', + 'name': { 'zh-CN': '折叠展示 Tag', 'en-US': 'Fold Tag' }, + 'desc': { + 'zh-CN': + '

在开启多选模式后,默认情况下会展示所有已选中的选项的 Tag,可以使用 collapse-tags 来折叠 Tag 。\n通过 disabled 设置组件是否禁用,默认值为 false 。

\n', + 'en-US': + '

After the multi-selection mode is enabled, tags of all selected options are displayed by default. You can use collapse-tags to collapse tags. \n Use disabled to set whether to disable the component. The default value is false.

\n' + }, + 'codeFiles': ['collapse-tags.vue'] + }, + { + 'demoId': 'check-strictly', + 'name': { 'zh-CN': '父子级不相关联', 'en-US': 'The parent and child levels are not associated.' }, + 'desc': { + 'zh-CN': + '

通过 props.checkStrictly = true 来设置父子节点取消选中关联,从而达到选择任意一级选项的目的。默认单选模式下,只能选择叶子节点。

\n', + 'en-US': + '

The props.checkStrictly = true is used to set the association between the parent and child nodes. In this way, any level of options can be selected. In the default single-choice mode, only leaf nodes can be selected.

\n' + }, + 'codeFiles': ['check-strictly.vue'] + }, + { + 'demoId': 'check-strictly-multiple', + 'name': { 'zh-CN': '多选选择任意一级选项', 'en-US': 'Select any level of options from multiple options.' }, + 'desc': { + 'zh-CN': '

在多选模式下同时取消父子节点关联,选择任意一级选项。

\n', + 'en-US': + '

In multi-selection mode, cancel the association between parent and child nodes and select any level of options.

\n' + }, + 'codeFiles': ['check-strictly-multiple.vue'] + }, + { + 'demoId': 'auto-load', + 'name': { 'zh-CN': '动态加载', 'en-US': 'Dynamic loading' }, + 'desc': { + 'zh-CN': + '

当选中某一级时,动态加载该级下的选项。通过 props 属性中的 lazy 开启动态加载,并通过 lazyload 来设置加载数据源的方法。lazyload 方法有两个参数,第一个参数 node 为当前点击的节点,第二个 resolve 为数据加载完成的回调(必须调用)。为了更准确的显示节点的状态,还可以对节点数据添加是否为叶子节点的标志位 (默认字段为 leaf,可通过 props.leaf 修改),否则会简单的以有无子节点来判断是否为叶子节点。

\n', + 'en-US': + '

When a level is selected, the options under the level are dynamically loaded. Use lazy in the props attribute to enable dynamic loading, and use lazyload to set the method for loading data sources. The lazyload method has two parameters. The first parameter node is the node that is clicked currently, and the second parameter resolve is the callback for data loading completion (mandatory). To display the status of a node more accurately, a flag bit indicating whether the node is a leaf node may be added to the node data. (The default field is leaf, which can be modified using props.leaf.) Otherwise, the system determines whether a node is a leaf node based on whether there are subnodes.

\n' + }, + 'codeFiles': ['auto-load.vue'] + }, + { + 'demoId': 'auto-load-checkStrictly', + 'name': { 'zh-CN': '动态加载且父子级不相关联', 'en-US': 'Dynamic loading with no parent-child association' }, + 'desc': { + 'zh-CN': + '

当选中某一级时,动态加载该级下的选项。通过 props 属性中的 lazy 开启动态加载,并通过 lazyload 来设置加载数据源的方法。通过 props 属性中的 checkStrictly 开启父子级不相关联。

\n', + 'en-US': + '

When a level is selected, the options under the level are dynamically loaded. Use lazy in the props attribute to enable dynamic loading, and use lazyload to set the method for loading data sources. Use checkStrictly in the props attribute to enable parent-child disassociation.

\n' + }, + 'codeFiles': ['auto-load-checkStrictly.vue'] + }, + { + 'demoId': 'props-children', + 'name': { 'zh-CN': '指定选项', 'en-US': 'Specify Options' }, + 'desc': { + 'zh-CN': + '

Props

\n

通过 children 指定选项的子选项,默认为 children 。\n通过 value 指定指定选项的 value 值,默认为 value 。\n通过 label 指定选项标签,默认为 label 。

\n
\n', + 'en-US': + '

Props

\n

uses children to specify the sub-option of the option. The default value is children. \n Use value to specify the value of a specified option. The default value is value. \nUse label to specify the option label. The default value is label.

\n
\n' + }, + 'codeFiles': ['props-children.vue'] + }, + { + 'demoId': 'filterable', + 'name': { 'zh-CN': '可搜索', 'en-US': 'Searchable' }, + 'desc': { + 'zh-CN': + '

filterable 赋值为 true 即可打开搜索功能,默认会匹配节点的 label 或所有父节点的 label (由 show-all-levels 决定)中包含输入值的选项。 empty 无匹配选项时显示的内容

\n', + 'en-US': + '

Set filterable to true to enable the search function. By default, the label of the node or the options containing the input value in label of all parent nodes (determined by show-all-levels). emptyContent displayed when no matching option

\n' + }, + 'codeFiles': ['filterable.vue'] + }, + { + 'demoId': 'filterable2', + 'name': { 'zh-CN': '搜索延时', 'en-US': 'Search Delay' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['filterable.vue'] + }, + { + 'demoId': 'filterable-multiple', + 'name': { 'zh-CN': '多选可搜索', 'en-US': 'Multiple choices can be searched' }, + 'desc': { + 'zh-CN': '

多选模式下开启搜索功能。

\n', + 'en-US': '

Enable the search function in multi-choice mode.

\n' + }, + 'codeFiles': ['filterable-multiple.vue'] + }, + { + 'demoId': 'filter-method', + 'name': { 'zh-CN': '自定义搜索逻辑', 'en-US': 'Customized search logic' }, + 'desc': { + 'zh-CN': + '

filter-method 自定义搜索逻辑,第一个参数是节点 node,第二个参数是搜索关键词 keyword,通过返回布尔值表示是否命中,如果需要选择父级,通过 props.checkStrictly = true 来设置父子节点取消选中关联,从而达到选择任意一级选项的目的。默认单选模式下,只能选择叶子节点。

\n', + 'en-US': + '

filter-method customizes the search logic. The first parameter is node, and the second parameter is keyword. A Boolean value is returned to indicate whether the search is hit. To select a parent, set props.checkStrictly = true to deselect the parent and child nodes. In this way, the purpose of selecting any level of option is achieved. In the default single-choice mode, only leaf nodes can be selected.

\n' + }, + 'codeFiles': ['filter-method.vue'] + }, + { + 'demoId': 'filterable-multiple1', + 'name': { 'zh-CN': '占位文本', 'en-US': 'Placeholder Text' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['filterable-multiple.vue'] + }, + { + 'demoId': 'show-all-levels', + 'name': { 'zh-CN': '仅显示最后一级', 'en-US': 'Only the last level is displayed.' }, + 'desc': { + 'zh-CN': + '

属性 show-all-levels 定义了是否显示完整的路径,将其赋值为 false 则仅显示最后一级,默认为 true ,显示选中项所在的完整路径。

\n', + 'en-US': + '

The show-all-levels attribute defines whether to display the complete path. If it is set to false, only the last level is displayed. The default value is true, indicating that the full path of the selected item is displayed.

\n' + }, + 'codeFiles': ['show-all-levels.vue'] + }, + { + 'demoId': 'events', + 'name': { 'zh-CN': '事件', 'en-US': 'Event' }, + 'desc': { + 'zh-CN': + '

Cascader 级联选择器的事件有:changeexpand-changeblurfocusvisible-change

\n', + 'en-US': + '

Cascader cascade selector events include: change, expand-change, blur, focus, < code>visible-change.

\n' + }, + 'codeFiles': ['events.vue'] + }, + { + 'demoId': 'events1', + 'name': { 'zh-CN': '节点返回的数据类型', 'en-US': 'Data type returned by a node' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['events.vue'] + } + ], + apis: [ + { + 'name': 'cascader', + 'type': 'component', + 'properties': [ + { + 'name': 'modelValue / v-model', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '选中项绑定值', 'en-US': 'Bound value of the selected item' }, + 'demoId': 'clearable' + }, + { + 'name': 'options', + 'type': 'Array', + 'defaultValue': '', + 'desc': { + 'zh-CN': '可选项数据源,键名可通过 Props 属性配置', + 'en-US': 'Optional data source. The key name can be configured through the Props attribute.' + }, + 'demoId': 'disabled-items' + }, + { + 'name': 'props', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '配置选项,具体见 Cascader Props 表', + 'en-US': 'Configuration options. For details, see the Cascader Props table.' + }, + 'demoId': 'props-children' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '为 popper 添加类名(可参考 popover 组件)', + 'en-US': 'Add a class name for the popper. For details, see the popover component.' + }, + 'demoId': '' + }, + { + 'name': 'popper-append-to-body', + 'type': 'Boolean', + 'defaultValue': 'true', + 'desc': { + 'zh-CN': + '是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)', + 'en-US': + 'Indicates whether to insert a pop-up box to the body element. If an error occurs in locating a fault in the dialog box that is displayed, set this attribute to false (for details, see the select component).' + }, + 'demoId': '' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '尺寸;该属性的可选值为 medium / small / mini', + 'en-US': 'Dimension; The optional values of this attribute are medium / small / mini' + }, + 'demoId': 'clearable2' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '请选择', + 'desc': { 'zh-CN': '输入框占位文本', 'en-US': 'Placeholder text in the text box' }, + 'demoId': 'filterable-multiple1' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': 'false', + 'desc': { 'zh-CN': '是否禁用', 'en-US': 'Disable' }, + 'demoId': 'disabled-items' + }, + { + 'name': 'clearable', + 'type': 'Boolean', + 'defaultValue': 'false', + 'desc': { 'zh-CN': '是否支持清空选项', 'en-US': 'Whether to support the clear option' }, + 'demoId': 'clearable' + }, + { + 'name': 'show-all-levels', + 'type': 'Boolean', + 'defaultValue': 'true', + 'desc': { + 'zh-CN': '输入框中是否显示选中值的完整路径', + 'en-US': 'Whether to display the full path of the selected value in the text box' + }, + 'demoId': 'show-all-levels' + }, + { + 'name': 'collapse-tags', + 'type': 'Boolean', + 'defaultValue': 'false', + 'desc': { 'zh-CN': '多选模式下是否折叠Tag', 'en-US': 'Whether to collapse tags in multi-choice mode' }, + 'demoId': 'collapse-tags' + }, + { + 'name': 'separator', + 'type': 'String', + 'defaultValue': '/', + 'desc': { 'zh-CN': '选项分隔符', 'en-US': 'Option separator' }, + 'demoId': 'clearable1' + }, + { + 'name': 'filterable', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { 'zh-CN': '是否可搜索选项', 'en-US': 'Whether to search for options' }, + 'demoId': 'filterable' + }, + { + 'name': 'filter-method', + 'type': 'Function(node, keyword)', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '自定义搜索逻辑,第一个参数是节点 node,第二个参数是搜索关键词 keyword,通过返回布尔值表示是否命中', + 'en-US': + 'Customize the search logic. The first parameter is node, and the second parameter is keyword. A Boolean value is returned to indicate whether the search is hit.' + }, + 'demoId': 'filter-method' + }, + { + 'name': 'debounce', + 'type': 'Number', + 'defaultValue': '300', + 'desc': { + 'zh-CN': '搜索关键词输入的去抖延迟,单位毫秒', + 'en-US': 'Dejitter delay of the search keyword, in milliseconds.' + }, + 'demoId': 'filterable' + }, + { + 'name': 'before-filter', + 'type': 'Function(value)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '筛选之前的钩子,参数为输入的值,若返回 false 或者返回 Promise 且被 reject,则停止筛选', + 'en-US': + 'Hook before filtering. The parameter is the input value. If false is returned or Promise is returned and rejected, the filtering stops.' + }, + 'demoId': 'filter-method' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义浮层类名', 'en-US': 'Customized floating layer class name' }, + 'demoId': '' + } + ], + 'events': [ + { + 'name': 'change', + 'type': 'Fuction(arg)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当选中节点变化时触发;arg:回调参数为 选中节点的值(Array类型)', + 'en-US': + 'This event is triggered when the selected node changes. arg: The callback parameter is the value of the selected node (array type).' + }, + 'demoId': 'events' + }, + { + 'name': 'expand-change', + 'type': 'Fuction(arg)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当展开节点发生变化时触发;arg:回调参数为 各父级选项值组成的数组(Array类型)', + 'en-US': + 'This event is triggered when the expanded node changes. arg: The callback parameter is an array (Array type) consisting of parent option values.' + }, + 'demoId': 'events' + }, + { + 'name': 'blur', + 'type': 'Fuction(arg)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当失去焦点时触发;arg:回调参数为 (event: Event, 类型:Object)', + 'en-US': + 'This event is triggered when the focus is lost. arg: The callback parameter is (event: Event, type: Object).' + }, + 'demoId': 'events' + }, + { + 'name': 'focus', + 'type': 'Fuction(arg)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当获得焦点时触发;arg:回调参数为 (event: Event, 类型:Object)', + 'en-US': + 'This event is triggered when the focus is obtained. arg: The callback parameter is (event: Event, type: Object).' + }, + 'demoId': 'events' + }, + { + 'name': 'visible-change', + 'type': 'Fuction(arg)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '下拉框出现/隐藏时触发;arg:回调参数为 出现则为 true,隐藏则为 false(布尔类型)', + 'en-US': + 'This event is triggered when the drop-down list box is displayed or hidden. arg: true if the callback parameter is present; false if the callback parameter is hidden (Boolean)' + }, + 'demoId': 'events' + }, + { + 'name': 'remove-tag', + 'type': 'Fuction(arg)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '在多选模式下,移除Tag时触发;arg:回调参数为 移除的Tag对应的节点的值(Array类型)', + 'en-US': + 'In multi-choice mode, this event is triggered when a tag is removed. arg: The callback parameter is the value of the node corresponding to the removed tag (array type).' + }, + 'demoId': 'default-multiple' + } + ], + 'slots': [ + { + 'name': 'empty', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '无匹配选项时的内容', 'en-US': 'Content when no matching option is found' }, + 'demoId': 'filterable' + } + ], + 'methods': [ + { + 'name': 'getCheckedNodes', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '获取选中的节点;参数为 (leafOnly) 是否只是获取子节点,默认值为 false', + 'en-US': + 'Obtain the selected node. The parameter (leafOnly) indicates whether to obtain only subnodes. The default value is false' + }, + 'demoId': 'events' + } + ], + 'casprops': [ + { + 'name': 'expandTrigger', + 'type': 'String', + 'defaultValue': 'click', + 'desc': { + 'zh-CN': '次级菜单的展开方式;该属性的可选值为 click / hover', + 'en-US': 'The expansion mode of the secondary menu; The optional values of this attribute are click / hover' + }, + 'demoId': 'basic-usage' + }, + { + 'name': 'multiple', + 'type': 'Boolean', + 'defaultValue': 'false', + 'desc': { 'zh-CN': '是否多选', 'en-US': 'Whether to select multiple options' }, + 'demoId': 'default-multiple' + }, + { + 'name': 'checkStrictly', + 'type': 'Boolean', + 'defaultValue': ' false', + 'desc': { + 'zh-CN': '是否严格的遵守父子节点不互相关联', + 'en-US': + 'Whether to strictly comply with the principle that parent and child nodes are not associated with each other' + }, + 'demoId': 'check-strictly' + }, + { + 'name': 'emitPath', + 'type': 'Boolean', + 'defaultValue': ' true', + 'desc': { + 'zh-CN': + '在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值', + 'en-US': + 'Indicates whether to return an array consisting of the values of menus at different levels of the selected node when the selected node is changed. If this parameter is set to false, only the value of the selected node is returned.' + }, + 'demoId': 'events' + }, + { + 'name': 'lazy', + 'type': 'Boolean', + 'defaultValue': 'false', + 'desc': { + 'zh-CN': '是否动态加载子节点,需与 lazyLoad 方法结合使用', + 'en-US': + 'Whether to dynamically load subnodes. This parameter must be used together with the lazyLoad method.' + }, + 'demoId': 'auto-load' + }, + { + 'name': 'lazyLoad', + 'type': 'Function(node, resolve)', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '加载动态数据的方法,仅在 lazy 为 true 时有效;参数说明: node为当前点击的节点,resolve为数据加载完成的回调(必须调用)', + 'en-US': + 'Method for loading dynamic data. This parameter is valid only when lazy is set to true. Parameter description: node indicates the currently clicked node. resolve indicates the callback after data loading is complete (mandatory).' + }, + 'demoId': 'auto-load' + }, + { + 'name': 'value', + 'type': 'String', + 'defaultValue': "'value'", + 'desc': { + 'zh-CN': '指定选项的值为选项对象的某个属性值', + 'en-US': 'The value of an option is the value of an attribute of the option object.' + }, + 'demoId': 'props-children' + }, + { + 'name': 'label', + 'type': 'String', + 'defaultValue': "'label'", + 'desc': { + 'zh-CN': '指定选项标签为选项对象的某个属性值', + 'en-US': 'Specify that the option label is an attribute value of the option object.' + }, + 'demoId': 'props-children' + }, + { + 'name': 'children', + 'type': 'String', + 'defaultValue': "'children'", + 'desc': { + 'zh-CN': '指定选项的子选项为选项对象的某个属性值', + 'en-US': 'Specifies that the sub-option of an option is an attribute value of the option object.' + }, + 'demoId': 'props-children' + }, + { + 'name': 'disabled', + 'type': 'String', + 'defaultValue': "'disabled'", + 'desc': { + 'zh-CN': '指定选项的禁用为选项对象的某个属性值', + 'en-US': 'Specify that an option is disabled as an attribute value of the option object.' + }, + 'demoId': 'disabled-items' + }, + { + 'name': 'leaf', + 'type': 'String', + 'defaultValue': "'leaf'", + 'desc': { + 'zh-CN': '指定选项的叶子节点的标志位为选项对象的某个属性值', + 'en-US': 'The flag bit of the leaf node of the specified option is an attribute value of the option object.' + }, + 'demoId': 'check-strictly' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/chart/amap/base-composition-api.vue b/examples/sites/demos/app/chart/amap/base-composition-api.vue new file mode 100644 index 000000000..e117a0b1f --- /dev/null +++ b/examples/sites/demos/app/chart/amap/base-composition-api.vue @@ -0,0 +1,32 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/amap/base.vue b/examples/sites/demos/app/chart/amap/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/amap/base.vue rename to examples/sites/demos/app/chart/amap/base.vue diff --git a/examples/sites/demos/app/chart/bar/base-composition-api.vue b/examples/sites/demos/app/chart/bar/base-composition-api.vue new file mode 100644 index 000000000..bc5589888 --- /dev/null +++ b/examples/sites/demos/app/chart/bar/base-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/bar/base.vue b/examples/sites/demos/app/chart/bar/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/bar/base.vue rename to examples/sites/demos/app/chart/bar/base.vue diff --git a/examples/sites/demos/app/chart/bar/demo2-composition-api.vue b/examples/sites/demos/app/chart/bar/demo2-composition-api.vue new file mode 100644 index 000000000..faa5e39d6 --- /dev/null +++ b/examples/sites/demos/app/chart/bar/demo2-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/bar/demo2.vue b/examples/sites/demos/app/chart/bar/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/bar/demo2.vue rename to examples/sites/demos/app/chart/bar/demo2.vue diff --git a/examples/sites/demos/app/chart/bar/demo3-composition-api.vue b/examples/sites/demos/app/chart/bar/demo3-composition-api.vue new file mode 100644 index 000000000..2c93fce30 --- /dev/null +++ b/examples/sites/demos/app/chart/bar/demo3-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/bar/demo3.vue b/examples/sites/demos/app/chart/bar/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/bar/demo3.vue rename to examples/sites/demos/app/chart/bar/demo3.vue diff --git a/examples/sites/demos/app/chart/bar/demo4-composition-api.vue b/examples/sites/demos/app/chart/bar/demo4-composition-api.vue new file mode 100644 index 000000000..3a8621ef2 --- /dev/null +++ b/examples/sites/demos/app/chart/bar/demo4-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/bar/demo4.vue b/examples/sites/demos/app/chart/bar/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/bar/demo4.vue rename to examples/sites/demos/app/chart/bar/demo4.vue diff --git a/examples/sites/demos/app/chart/bar/demo5-composition-api.vue b/examples/sites/demos/app/chart/bar/demo5-composition-api.vue new file mode 100644 index 000000000..91848e554 --- /dev/null +++ b/examples/sites/demos/app/chart/bar/demo5-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/bar/demo5.vue b/examples/sites/demos/app/chart/bar/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/bar/demo5.vue rename to examples/sites/demos/app/chart/bar/demo5.vue diff --git a/examples/sites/demos/app/chart/bar/demo6-composition-api.vue b/examples/sites/demos/app/chart/bar/demo6-composition-api.vue new file mode 100644 index 000000000..39227caea --- /dev/null +++ b/examples/sites/demos/app/chart/bar/demo6-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/bar/demo6.vue b/examples/sites/demos/app/chart/bar/demo6.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/bar/demo6.vue rename to examples/sites/demos/app/chart/bar/demo6.vue diff --git a/examples/sites/demos/app/chart/bar/demo7-composition-api.vue b/examples/sites/demos/app/chart/bar/demo7-composition-api.vue new file mode 100644 index 000000000..863fa5882 --- /dev/null +++ b/examples/sites/demos/app/chart/bar/demo7-composition-api.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/bar/demo7.vue b/examples/sites/demos/app/chart/bar/demo7.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/bar/demo7.vue rename to examples/sites/demos/app/chart/bar/demo7.vue diff --git a/examples/sites/demos/app/chart/base-composition-api.vue b/examples/sites/demos/app/chart/base-composition-api.vue new file mode 100644 index 000000000..4b0453fd8 --- /dev/null +++ b/examples/sites/demos/app/chart/base-composition-api.vue @@ -0,0 +1,72 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/base.vue b/examples/sites/demos/app/chart/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/base.vue rename to examples/sites/demos/app/chart/base.vue diff --git a/examples/sites/demos/app/chart/bmap/base-composition-api.vue b/examples/sites/demos/app/chart/bmap/base-composition-api.vue new file mode 100644 index 000000000..a4a084c5d --- /dev/null +++ b/examples/sites/demos/app/chart/bmap/base-composition-api.vue @@ -0,0 +1,32 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/bmap/base.vue b/examples/sites/demos/app/chart/bmap/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/bmap/base.vue rename to examples/sites/demos/app/chart/bmap/base.vue diff --git a/examples/sites/demos/app/chart/boxplot/base-composition-api.vue b/examples/sites/demos/app/chart/boxplot/base-composition-api.vue new file mode 100644 index 000000000..ebe0084e2 --- /dev/null +++ b/examples/sites/demos/app/chart/boxplot/base-composition-api.vue @@ -0,0 +1,42 @@ + + + diff --git a/examples/sites/demos/app/chart/boxplot/base.vue b/examples/sites/demos/app/chart/boxplot/base.vue new file mode 100644 index 000000000..c46115a8d --- /dev/null +++ b/examples/sites/demos/app/chart/boxplot/base.vue @@ -0,0 +1,50 @@ + + + diff --git a/examples/sites/demos/app/chart/boxplot/multiple-composition-api.vue b/examples/sites/demos/app/chart/boxplot/multiple-composition-api.vue new file mode 100644 index 000000000..49b395578 --- /dev/null +++ b/examples/sites/demos/app/chart/boxplot/multiple-composition-api.vue @@ -0,0 +1,126 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/boxplot/multiple.vue b/examples/sites/demos/app/chart/boxplot/multiple.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/boxplot/multiple.vue rename to examples/sites/demos/app/chart/boxplot/multiple.vue diff --git a/examples/sites/demos/app/chart/boxplot/vertical-composition-api.vue b/examples/sites/demos/app/chart/boxplot/vertical-composition-api.vue new file mode 100644 index 000000000..a27827e12 --- /dev/null +++ b/examples/sites/demos/app/chart/boxplot/vertical-composition-api.vue @@ -0,0 +1,97 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/boxplot/vertical.vue b/examples/sites/demos/app/chart/boxplot/vertical.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/boxplot/vertical.vue rename to examples/sites/demos/app/chart/boxplot/vertical.vue diff --git a/examples/sites/demos/app/chart/candle/base-composition-api.vue b/examples/sites/demos/app/chart/candle/base-composition-api.vue new file mode 100644 index 000000000..7adb876fa --- /dev/null +++ b/examples/sites/demos/app/chart/candle/base-composition-api.vue @@ -0,0 +1,321 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/candle/base.vue b/examples/sites/demos/app/chart/candle/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/candle/base.vue rename to examples/sites/demos/app/chart/candle/base.vue diff --git a/examples/sites/demos/app/chart/candle/demo2-composition-api.vue b/examples/sites/demos/app/chart/candle/demo2-composition-api.vue new file mode 100644 index 000000000..73ed9cac4 --- /dev/null +++ b/examples/sites/demos/app/chart/candle/demo2-composition-api.vue @@ -0,0 +1,56 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/candle/demo2.vue b/examples/sites/demos/app/chart/candle/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/candle/demo2.vue rename to examples/sites/demos/app/chart/candle/demo2.vue diff --git a/examples/sites/demos/app/chart/candle/demo3-composition-api.vue b/examples/sites/demos/app/chart/candle/demo3-composition-api.vue new file mode 100644 index 000000000..eb4bc292a --- /dev/null +++ b/examples/sites/demos/app/chart/candle/demo3-composition-api.vue @@ -0,0 +1,324 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/candle/demo3.vue b/examples/sites/demos/app/chart/candle/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/candle/demo3.vue rename to examples/sites/demos/app/chart/candle/demo3.vue diff --git a/examples/sites/demos/app/chart/candle/demo4-composition-api.vue b/examples/sites/demos/app/chart/candle/demo4-composition-api.vue new file mode 100644 index 000000000..6c148bbbf --- /dev/null +++ b/examples/sites/demos/app/chart/candle/demo4-composition-api.vue @@ -0,0 +1,325 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/candle/demo4.vue b/examples/sites/demos/app/chart/candle/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/candle/demo4.vue rename to examples/sites/demos/app/chart/candle/demo4.vue diff --git a/examples/sites/demos/app/chart/candle/demo5-composition-api.vue b/examples/sites/demos/app/chart/candle/demo5-composition-api.vue new file mode 100644 index 000000000..eab0267b5 --- /dev/null +++ b/examples/sites/demos/app/chart/candle/demo5-composition-api.vue @@ -0,0 +1,332 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/candle/demo5.vue b/examples/sites/demos/app/chart/candle/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/candle/demo5.vue rename to examples/sites/demos/app/chart/candle/demo5.vue diff --git a/examples/sites/demos/app/chart/candle/demo6-composition-api.vue b/examples/sites/demos/app/chart/candle/demo6-composition-api.vue new file mode 100644 index 000000000..cd82058ec --- /dev/null +++ b/examples/sites/demos/app/chart/candle/demo6-composition-api.vue @@ -0,0 +1,325 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/candle/demo6.vue b/examples/sites/demos/app/chart/candle/demo6.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/candle/demo6.vue rename to examples/sites/demos/app/chart/candle/demo6.vue diff --git a/examples/sites/demos/app/chart/candle/demo7-composition-api.vue b/examples/sites/demos/app/chart/candle/demo7-composition-api.vue new file mode 100644 index 000000000..56fa48851 --- /dev/null +++ b/examples/sites/demos/app/chart/candle/demo7-composition-api.vue @@ -0,0 +1,326 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/candle/demo7.vue b/examples/sites/demos/app/chart/candle/demo7.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/candle/demo7.vue rename to examples/sites/demos/app/chart/candle/demo7.vue diff --git a/examples/sites/demos/app/chart/events/base-composition-api.vue b/examples/sites/demos/app/chart/events/base-composition-api.vue new file mode 100644 index 000000000..e3841d58c --- /dev/null +++ b/examples/sites/demos/app/chart/events/base-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/events/base.vue b/examples/sites/demos/app/chart/events/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/events/base.vue rename to examples/sites/demos/app/chart/events/base.vue diff --git a/examples/sites/demos/app/chart/funnel/base-composition-api.vue b/examples/sites/demos/app/chart/funnel/base-composition-api.vue new file mode 100644 index 000000000..8f7af1a82 --- /dev/null +++ b/examples/sites/demos/app/chart/funnel/base-composition-api.vue @@ -0,0 +1,21 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/funnel/base.vue b/examples/sites/demos/app/chart/funnel/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/funnel/base.vue rename to examples/sites/demos/app/chart/funnel/base.vue diff --git a/examples/sites/demos/app/chart/funnel/demo2-composition-api.vue b/examples/sites/demos/app/chart/funnel/demo2-composition-api.vue new file mode 100644 index 000000000..eadd1067a --- /dev/null +++ b/examples/sites/demos/app/chart/funnel/demo2-composition-api.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/funnel/demo2.vue b/examples/sites/demos/app/chart/funnel/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/funnel/demo2.vue rename to examples/sites/demos/app/chart/funnel/demo2.vue diff --git a/examples/sites/demos/app/chart/funnel/demo3-composition-api.vue b/examples/sites/demos/app/chart/funnel/demo3-composition-api.vue new file mode 100644 index 000000000..524f495cf --- /dev/null +++ b/examples/sites/demos/app/chart/funnel/demo3-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/funnel/demo3.vue b/examples/sites/demos/app/chart/funnel/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/funnel/demo3.vue rename to examples/sites/demos/app/chart/funnel/demo3.vue diff --git a/examples/sites/demos/app/chart/funnel/demo4-composition-api.vue b/examples/sites/demos/app/chart/funnel/demo4-composition-api.vue new file mode 100644 index 000000000..48db0b589 --- /dev/null +++ b/examples/sites/demos/app/chart/funnel/demo4-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/funnel/demo4.vue b/examples/sites/demos/app/chart/funnel/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/funnel/demo4.vue rename to examples/sites/demos/app/chart/funnel/demo4.vue diff --git a/examples/sites/demos/app/chart/funnel/demo5-composition-api.vue b/examples/sites/demos/app/chart/funnel/demo5-composition-api.vue new file mode 100644 index 000000000..db2b3f627 --- /dev/null +++ b/examples/sites/demos/app/chart/funnel/demo5-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/funnel/demo5.vue b/examples/sites/demos/app/chart/funnel/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/funnel/demo5.vue rename to examples/sites/demos/app/chart/funnel/demo5.vue diff --git a/examples/sites/demos/app/chart/funnel/demo6-composition-api.vue b/examples/sites/demos/app/chart/funnel/demo6-composition-api.vue new file mode 100644 index 000000000..de7038a2b --- /dev/null +++ b/examples/sites/demos/app/chart/funnel/demo6-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/funnel/demo6.vue b/examples/sites/demos/app/chart/funnel/demo6.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/funnel/demo6.vue rename to examples/sites/demos/app/chart/funnel/demo6.vue diff --git a/examples/sites/demos/app/chart/funnel/demo7-composition-api.vue b/examples/sites/demos/app/chart/funnel/demo7-composition-api.vue new file mode 100644 index 000000000..e8bdab1bf --- /dev/null +++ b/examples/sites/demos/app/chart/funnel/demo7-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/funnel/demo7.vue b/examples/sites/demos/app/chart/funnel/demo7.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/funnel/demo7.vue rename to examples/sites/demos/app/chart/funnel/demo7.vue diff --git a/examples/sites/demos/app/chart/gauge/base-composition-api.vue b/examples/sites/demos/app/chart/gauge/base-composition-api.vue new file mode 100644 index 000000000..f6459ad5d --- /dev/null +++ b/examples/sites/demos/app/chart/gauge/base-composition-api.vue @@ -0,0 +1,16 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/gauge/base.vue b/examples/sites/demos/app/chart/gauge/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/gauge/base.vue rename to examples/sites/demos/app/chart/gauge/base.vue diff --git a/examples/sites/demos/app/chart/gauge/demo2-composition-api.vue b/examples/sites/demos/app/chart/gauge/demo2-composition-api.vue new file mode 100644 index 000000000..34d27be33 --- /dev/null +++ b/examples/sites/demos/app/chart/gauge/demo2-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/gauge/demo2.vue b/examples/sites/demos/app/chart/gauge/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/gauge/demo2.vue rename to examples/sites/demos/app/chart/gauge/demo2.vue diff --git a/examples/sites/demos/app/chart/gauge/demo3-composition-api.vue b/examples/sites/demos/app/chart/gauge/demo3-composition-api.vue new file mode 100644 index 000000000..99aad36dc --- /dev/null +++ b/examples/sites/demos/app/chart/gauge/demo3-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/gauge/demo3.vue b/examples/sites/demos/app/chart/gauge/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/gauge/demo3.vue rename to examples/sites/demos/app/chart/gauge/demo3.vue diff --git a/examples/sites/demos/app/chart/gauge/demo4-composition-api.vue b/examples/sites/demos/app/chart/gauge/demo4-composition-api.vue new file mode 100644 index 000000000..75e99cabe --- /dev/null +++ b/examples/sites/demos/app/chart/gauge/demo4-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/gauge/demo4.vue b/examples/sites/demos/app/chart/gauge/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/gauge/demo4.vue rename to examples/sites/demos/app/chart/gauge/demo4.vue diff --git a/examples/sites/demos/app/chart/gauge/demo5-composition-api.vue b/examples/sites/demos/app/chart/gauge/demo5-composition-api.vue new file mode 100644 index 000000000..6a2aed6e1 --- /dev/null +++ b/examples/sites/demos/app/chart/gauge/demo5-composition-api.vue @@ -0,0 +1,252 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/gauge/demo5.vue b/examples/sites/demos/app/chart/gauge/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/gauge/demo5.vue rename to examples/sites/demos/app/chart/gauge/demo5.vue diff --git a/examples/sites/demos/app/chart/graph/base-composition-api.vue b/examples/sites/demos/app/chart/graph/base-composition-api.vue new file mode 100644 index 000000000..5a1ec8a5f --- /dev/null +++ b/examples/sites/demos/app/chart/graph/base-composition-api.vue @@ -0,0 +1,119 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/graph/base.vue b/examples/sites/demos/app/chart/graph/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/graph/base.vue rename to examples/sites/demos/app/chart/graph/base.vue diff --git a/examples/sites/demos/app/chart/graph/demo2-composition-api.vue b/examples/sites/demos/app/chart/graph/demo2-composition-api.vue new file mode 100644 index 000000000..607b173fa --- /dev/null +++ b/examples/sites/demos/app/chart/graph/demo2-composition-api.vue @@ -0,0 +1,62 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/graph/demo2.vue b/examples/sites/demos/app/chart/graph/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/graph/demo2.vue rename to examples/sites/demos/app/chart/graph/demo2.vue diff --git a/examples/sites/demos/app/chart/graph/demo3-composition-api.vue b/examples/sites/demos/app/chart/graph/demo3-composition-api.vue new file mode 100644 index 000000000..b96ececf6 --- /dev/null +++ b/examples/sites/demos/app/chart/graph/demo3-composition-api.vue @@ -0,0 +1,349 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/graph/demo3.vue b/examples/sites/demos/app/chart/graph/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/graph/demo3.vue rename to examples/sites/demos/app/chart/graph/demo3.vue diff --git a/examples/sites/demos/app/chart/heatmap/base-composition-api.vue b/examples/sites/demos/app/chart/heatmap/base-composition-api.vue new file mode 100644 index 000000000..1a6670d6f --- /dev/null +++ b/examples/sites/demos/app/chart/heatmap/base-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/heatmap/base.vue b/examples/sites/demos/app/chart/heatmap/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/heatmap/base.vue rename to examples/sites/demos/app/chart/heatmap/base.vue diff --git a/examples/sites/demos/app/chart/heatmap/demo2-composition-api.vue b/examples/sites/demos/app/chart/heatmap/demo2-composition-api.vue new file mode 100644 index 000000000..49b091fe8 --- /dev/null +++ b/examples/sites/demos/app/chart/heatmap/demo2-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/heatmap/demo2.vue b/examples/sites/demos/app/chart/heatmap/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/heatmap/demo2.vue rename to examples/sites/demos/app/chart/heatmap/demo2.vue diff --git a/examples/sites/demos/app/chart/heatmap/demo3-composition-api.vue b/examples/sites/demos/app/chart/heatmap/demo3-composition-api.vue new file mode 100644 index 000000000..5d164662e --- /dev/null +++ b/examples/sites/demos/app/chart/heatmap/demo3-composition-api.vue @@ -0,0 +1,37 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/heatmap/demo3.vue b/examples/sites/demos/app/chart/heatmap/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/heatmap/demo3.vue rename to examples/sites/demos/app/chart/heatmap/demo3.vue diff --git a/examples/sites/demos/app/chart/heatmap/demo4-composition-api.vue b/examples/sites/demos/app/chart/heatmap/demo4-composition-api.vue new file mode 100644 index 000000000..962021c0a --- /dev/null +++ b/examples/sites/demos/app/chart/heatmap/demo4-composition-api.vue @@ -0,0 +1,48 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/heatmap/demo4.vue b/examples/sites/demos/app/chart/heatmap/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/heatmap/demo4.vue rename to examples/sites/demos/app/chart/heatmap/demo4.vue diff --git a/examples/sites/demos/app/chart/heatmap/demo5-composition-api.vue b/examples/sites/demos/app/chart/heatmap/demo5-composition-api.vue new file mode 100644 index 000000000..dd81f6352 --- /dev/null +++ b/examples/sites/demos/app/chart/heatmap/demo5-composition-api.vue @@ -0,0 +1,37 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/heatmap/demo5.vue b/examples/sites/demos/app/chart/heatmap/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/heatmap/demo5.vue rename to examples/sites/demos/app/chart/heatmap/demo5.vue diff --git a/examples/sites/demos/app/chart/histogram/base-composition-api.vue b/examples/sites/demos/app/chart/histogram/base-composition-api.vue new file mode 100644 index 000000000..b8421dca4 --- /dev/null +++ b/examples/sites/demos/app/chart/histogram/base-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/histogram/base.vue b/examples/sites/demos/app/chart/histogram/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/histogram/base.vue rename to examples/sites/demos/app/chart/histogram/base.vue diff --git a/examples/sites/demos/app/chart/histogram/demo2-composition-api.vue b/examples/sites/demos/app/chart/histogram/demo2-composition-api.vue new file mode 100644 index 000000000..1251ab8eb --- /dev/null +++ b/examples/sites/demos/app/chart/histogram/demo2-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/histogram/demo2.vue b/examples/sites/demos/app/chart/histogram/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/histogram/demo2.vue rename to examples/sites/demos/app/chart/histogram/demo2.vue diff --git a/examples/sites/demos/app/chart/histogram/demo3-composition-api.vue b/examples/sites/demos/app/chart/histogram/demo3-composition-api.vue new file mode 100644 index 000000000..1a0808ff2 --- /dev/null +++ b/examples/sites/demos/app/chart/histogram/demo3-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/histogram/demo3.vue b/examples/sites/demos/app/chart/histogram/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/histogram/demo3.vue rename to examples/sites/demos/app/chart/histogram/demo3.vue diff --git a/examples/sites/demos/app/chart/histogram/demo4-composition-api.vue b/examples/sites/demos/app/chart/histogram/demo4-composition-api.vue new file mode 100644 index 000000000..6b75b075c --- /dev/null +++ b/examples/sites/demos/app/chart/histogram/demo4-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/histogram/demo4.vue b/examples/sites/demos/app/chart/histogram/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/histogram/demo4.vue rename to examples/sites/demos/app/chart/histogram/demo4.vue diff --git a/examples/sites/demos/app/chart/histogram/demo5-composition-api.vue b/examples/sites/demos/app/chart/histogram/demo5-composition-api.vue new file mode 100644 index 000000000..5b12cdc34 --- /dev/null +++ b/examples/sites/demos/app/chart/histogram/demo5-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/histogram/demo5.vue b/examples/sites/demos/app/chart/histogram/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/histogram/demo5.vue rename to examples/sites/demos/app/chart/histogram/demo5.vue diff --git a/examples/sites/demos/app/chart/histogram/demo6-composition-api.vue b/examples/sites/demos/app/chart/histogram/demo6-composition-api.vue new file mode 100644 index 000000000..fc08edc11 --- /dev/null +++ b/examples/sites/demos/app/chart/histogram/demo6-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/histogram/demo6.vue b/examples/sites/demos/app/chart/histogram/demo6.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/histogram/demo6.vue rename to examples/sites/demos/app/chart/histogram/demo6.vue diff --git a/examples/sites/demos/app/chart/histogram/demo7-composition-api.vue b/examples/sites/demos/app/chart/histogram/demo7-composition-api.vue new file mode 100644 index 000000000..cb98539bf --- /dev/null +++ b/examples/sites/demos/app/chart/histogram/demo7-composition-api.vue @@ -0,0 +1,33 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/histogram/demo7.vue b/examples/sites/demos/app/chart/histogram/demo7.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/histogram/demo7.vue rename to examples/sites/demos/app/chart/histogram/demo7.vue diff --git a/examples/sites/demos/app/chart/histogram/demo8-composition-api.vue b/examples/sites/demos/app/chart/histogram/demo8-composition-api.vue new file mode 100644 index 000000000..f80d34bc3 --- /dev/null +++ b/examples/sites/demos/app/chart/histogram/demo8-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/histogram/demo8.vue b/examples/sites/demos/app/chart/histogram/demo8.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/histogram/demo8.vue rename to examples/sites/demos/app/chart/histogram/demo8.vue diff --git a/examples/sites/demos/app/chart/line/base-composition-api.vue b/examples/sites/demos/app/chart/line/base-composition-api.vue new file mode 100644 index 000000000..d887decec --- /dev/null +++ b/examples/sites/demos/app/chart/line/base-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/line/base.vue b/examples/sites/demos/app/chart/line/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/line/base.vue rename to examples/sites/demos/app/chart/line/base.vue diff --git a/examples/sites/demos/app/chart/line/demo2-composition-api.vue b/examples/sites/demos/app/chart/line/demo2-composition-api.vue new file mode 100644 index 000000000..5aae4c4a0 --- /dev/null +++ b/examples/sites/demos/app/chart/line/demo2-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/line/demo2.vue b/examples/sites/demos/app/chart/line/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/line/demo2.vue rename to examples/sites/demos/app/chart/line/demo2.vue diff --git a/examples/sites/demos/app/chart/line/demo3-composition-api.vue b/examples/sites/demos/app/chart/line/demo3-composition-api.vue new file mode 100644 index 000000000..f96494e17 --- /dev/null +++ b/examples/sites/demos/app/chart/line/demo3-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/line/demo3.vue b/examples/sites/demos/app/chart/line/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/line/demo3.vue rename to examples/sites/demos/app/chart/line/demo3.vue diff --git a/examples/sites/demos/app/chart/line/demo4-composition-api.vue b/examples/sites/demos/app/chart/line/demo4-composition-api.vue new file mode 100644 index 000000000..2cebc6024 --- /dev/null +++ b/examples/sites/demos/app/chart/line/demo4-composition-api.vue @@ -0,0 +1,32 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/line/demo4.vue b/examples/sites/demos/app/chart/line/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/line/demo4.vue rename to examples/sites/demos/app/chart/line/demo4.vue diff --git a/examples/sites/demos/app/chart/line/demo5-composition-api.vue b/examples/sites/demos/app/chart/line/demo5-composition-api.vue new file mode 100644 index 000000000..57b5a952e --- /dev/null +++ b/examples/sites/demos/app/chart/line/demo5-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/line/demo5.vue b/examples/sites/demos/app/chart/line/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/line/demo5.vue rename to examples/sites/demos/app/chart/line/demo5.vue diff --git a/examples/sites/demos/app/chart/line/demo6-composition-api.vue b/examples/sites/demos/app/chart/line/demo6-composition-api.vue new file mode 100644 index 000000000..87946664a --- /dev/null +++ b/examples/sites/demos/app/chart/line/demo6-composition-api.vue @@ -0,0 +1,32 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/line/demo6.vue b/examples/sites/demos/app/chart/line/demo6.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/line/demo6.vue rename to examples/sites/demos/app/chart/line/demo6.vue diff --git a/examples/sites/demos/app/chart/line/demo7-composition-api.vue b/examples/sites/demos/app/chart/line/demo7-composition-api.vue new file mode 100644 index 000000000..fb49a9ef2 --- /dev/null +++ b/examples/sites/demos/app/chart/line/demo7-composition-api.vue @@ -0,0 +1,33 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/line/demo7.vue b/examples/sites/demos/app/chart/line/demo7.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/line/demo7.vue rename to examples/sites/demos/app/chart/line/demo7.vue diff --git a/examples/sites/demos/app/chart/line/demo8-composition-api.vue b/examples/sites/demos/app/chart/line/demo8-composition-api.vue new file mode 100644 index 000000000..31201d993 --- /dev/null +++ b/examples/sites/demos/app/chart/line/demo8-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/line/demo8.vue b/examples/sites/demos/app/chart/line/demo8.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/line/demo8.vue rename to examples/sites/demos/app/chart/line/demo8.vue diff --git a/examples/sites/demos/app/chart/line/demo9-composition-api.vue b/examples/sites/demos/app/chart/line/demo9-composition-api.vue new file mode 100644 index 000000000..60580dc96 --- /dev/null +++ b/examples/sites/demos/app/chart/line/demo9-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/line/demo9.vue b/examples/sites/demos/app/chart/line/demo9.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/line/demo9.vue rename to examples/sites/demos/app/chart/line/demo9.vue diff --git a/examples/sites/demos/app/chart/liquidfill/base-composition-api.vue b/examples/sites/demos/app/chart/liquidfill/base-composition-api.vue new file mode 100644 index 000000000..280d95d1d --- /dev/null +++ b/examples/sites/demos/app/chart/liquidfill/base-composition-api.vue @@ -0,0 +1,21 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/liquidfill/base.vue b/examples/sites/demos/app/chart/liquidfill/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/liquidfill/base.vue rename to examples/sites/demos/app/chart/liquidfill/base.vue diff --git a/examples/sites/demos/app/chart/liquidfill/demo2-composition-api.vue b/examples/sites/demos/app/chart/liquidfill/demo2-composition-api.vue new file mode 100644 index 000000000..00e86f8ac --- /dev/null +++ b/examples/sites/demos/app/chart/liquidfill/demo2-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/liquidfill/demo2.vue b/examples/sites/demos/app/chart/liquidfill/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/liquidfill/demo2.vue rename to examples/sites/demos/app/chart/liquidfill/demo2.vue diff --git a/examples/sites/demos/app/chart/liquidfill/demo3-composition-api.vue b/examples/sites/demos/app/chart/liquidfill/demo3-composition-api.vue new file mode 100644 index 000000000..589102c03 --- /dev/null +++ b/examples/sites/demos/app/chart/liquidfill/demo3-composition-api.vue @@ -0,0 +1,68 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/liquidfill/demo3.vue b/examples/sites/demos/app/chart/liquidfill/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/liquidfill/demo3.vue rename to examples/sites/demos/app/chart/liquidfill/demo3.vue diff --git a/examples/sites/demos/app/chart/liquidfill/demo4-composition-api.vue b/examples/sites/demos/app/chart/liquidfill/demo4-composition-api.vue new file mode 100644 index 000000000..92f1947f1 --- /dev/null +++ b/examples/sites/demos/app/chart/liquidfill/demo4-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/liquidfill/demo4.vue b/examples/sites/demos/app/chart/liquidfill/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/liquidfill/demo4.vue rename to examples/sites/demos/app/chart/liquidfill/demo4.vue diff --git a/examples/sites/demos/app/chart/liquidfill/demo5-composition-api.vue b/examples/sites/demos/app/chart/liquidfill/demo5-composition-api.vue new file mode 100644 index 000000000..e362c9c87 --- /dev/null +++ b/examples/sites/demos/app/chart/liquidfill/demo5-composition-api.vue @@ -0,0 +1,48 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/liquidfill/demo5.vue b/examples/sites/demos/app/chart/liquidfill/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/liquidfill/demo5.vue rename to examples/sites/demos/app/chart/liquidfill/demo5.vue diff --git a/examples/sites/demos/app/chart/map/base-composition-api.vue b/examples/sites/demos/app/chart/map/base-composition-api.vue new file mode 100644 index 000000000..ee52922ca --- /dev/null +++ b/examples/sites/demos/app/chart/map/base-composition-api.vue @@ -0,0 +1,40 @@ + + + diff --git a/examples/sites/demos/app/chart/map/base.vue b/examples/sites/demos/app/chart/map/base.vue new file mode 100644 index 000000000..8aa62ef28 --- /dev/null +++ b/examples/sites/demos/app/chart/map/base.vue @@ -0,0 +1,49 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/map/china.js b/examples/sites/demos/app/chart/map/china.js similarity index 98% rename from examples/docs/resources/pc/demo/chart/map/china.js rename to examples/sites/demos/app/chart/map/china.js index 439cea9d0..0a14ebeb0 100644 --- a/examples/docs/resources/pc/demo/chart/map/china.js +++ b/examples/sites/demos/app/chart/map/china.js @@ -8,9 +8,7 @@ export default { type: 'MultiPolygon', coordinates: [ ['@@°Ü¯Û'], - [ - '@@ƛĴÕƊÉɼģºðʀ\\ƎsÆNŌÔĚäœnÜƤɊĂǀĆĴžĤNJŨxĚĮǂƺòƌ‚–âÔ®ĮXŦţƸZûЋƕƑGđ¨ĭMó·ęcëƝɉlÝƯֹÅŃ^Ó·śŃNjƏďíåɛGɉ™¿@ăƑŽ¥ĘWǬÏĶŁâ' - ], + ['@@ƛĴÕƊÉɼģºðʀ\\ƎsÆNŌÔĚäœnÜƤɊĂǀĆĴžĤNJŨxĚĮǂƺòƌ‚–âÔ®ĮXŦţƸZûЋƕƑGđ¨ĭMó·ęcëƝɉlÝƯֹÅŃ^Ó·śŃNjƏďíåɛGɉ™¿@ăƑŽ¥ĘWǬÏĶŁâ'], ['@@\\p|WoYG¿¥I†j@¢'], ['@@…¡‰@ˆV^RqˆBbAŒnTXeRz¤Lž«³I'], ['@@ÆEE—„kWqë @œ'], @@ -474,9 +472,7 @@ export default { type: 'MultiPolygon', coordinates: [ ['@@—n„FTs'], - [ - '@@ßÅÆችÔXr—†CO™“…ËR‘ïÿĩ­TooQyšÓ[‹ŅBE¬–ÎÓXa„į§Ã¸G °ITxp‰úxÚij¥Ïš–Ģ¾ŠedžÄ©ĸG…œàGh‚€M¤–Â_U}Ċ}¢pczfŠþg¤€”ÇòAV‘‹M' - ], + ['@@ßÅÆችÔXr—†CO™“…ËR‘ïÿĩ­TooQyšÓ[‹ŅBE¬–ÎÓXa„į§Ã¸G °ITxp‰úxÚij¥Ïš–Ģ¾ŠedžÄ©ĸG…œàGh‚€M¤–Â_U}Ċ}¢pczfŠþg¤€”ÇòAV‘‹M'], [ '@@©K—ƒA·³CQ±Á«³BUŠƑ¹AŠtćOw™D]ŒJiØSm¯b£‘ylƒ›X…HËѱH•«–‘C^õľA–Å§¤É¥„ïyuǙuA¢^{ÌC´­¦ŷJ£^[†“ª¿‡ĕ~•Ƈ…•N… skóā‡¹¿€ï]ă~÷O§­@—Vm¡‹Qđ¦¢Ĥ{ºjԏŽŒª¥nf´•~ÕoŸž×Ûą‹MąıuZœmZcÒ IJĪ²SÊDŽŶ¨ƚƒ’CÖŎªQؼrŭŽ­«}NÏürʬŒmjr€@ĘrTW ­SsdHzƓ^ÇÂyUi¯DÅYlŹu{hTœ}mĉ–¹¥ě‰Dÿë©ıÓ[Oº£ž“¥ót€ł¹MՄžƪƒ`Pš…Di–ÛUŠ¾Å‌ìˆU’ñB“È£ýhe‰dy¡oċ€`pfmjP~‚kZa…ZsÐd°wj§ƒ@€Ĵ®w~^‚kÀÅKvNmX\\¨a“”сqvíó¿F„¤¡@ũÑVw}S@j}¾«pĂr–ªg àÀ²NJ¶¶Dô…K‚|^ª†Ž°LX¾ŴäPĪ±œ£EXd›”^¶›IJÞܓ~‘u¸ǔ˜Ž›MRhsR…e†`ÄofIÔ\\Ø  i”ćymnú¨cj ¢»–GČìƊÿШXeĈĀ¾Oð Fi ¢|[jVxrIQŒ„_E”zAN¦zLU`œcªx”OTu RLÄ¢dV„i`p˔vŎµªÉžF~ƒØ€d¢ºgİàw¸Áb[¦Zb¦–z½xBĖ@ªpº›šlS¸Ö\\Ĕ[N¥ˀmĎă’J\\‹ŀ`€…ňSڊĖÁĐiO“Ĝ«BxDõĚiv—ž–S™Ì}iùŒžÜnšÐºGŠ{Šp°M´w†ÀÒzJ²ò¨ oTçüöoÛÿñŽőФ‚ùTz²CȆȸǎŪƒƑÐc°dPÎŸğ˶[Ƚu¯½WM¡­Éž“’B·rížnZŸÒ `‡¨GA¾\\pē˜XhÆRC­üWGġu…T靧Ŏѝ©ò³I±³}_‘‹EÃħg®ęisÁPDmÅ{‰b[Rşs·€kPŸŽƥƒóRo”O‹ŸVŸ~]{g\\“êYƪ¦kÝbiċƵŠGZ»Ěõ…ó·³vŝž£ø@pyö_‹ëŽIkѵ‡bcѧy…×dY؎ªiþž¨ƒ[]f]Ņ©C}ÁN‡»hĻħƏ’ĩ' ] @@ -838,18 +834,10 @@ export default { ['@@AlBk'], ['@@mŽn'], ['@@EpFo'], - [ - '@@ea¢pl¸Eõ¹‡hj[ƒ]ÔCΖ@lj˜¡uBXŸ…•´‹AI¹…[‹yDUˆ]W`çwZkmc–…M›žp€Åv›}I‹oJlcaƒfёKŽ°ä¬XJmРđhI®æÔtSHn€Eˆ„ÒrÈc' - ], + ['@@ea¢pl¸Eõ¹‡hj[ƒ]ÔCΖ@lj˜¡uBXŸ…•´‹AI¹…[‹yDUˆ]W`çwZkmc–…M›žp€Åv›}I‹oJlcaƒfёKŽ°ä¬XJmРđhI®æÔtSHn€Eˆ„ÒrÈc'], ['@@rMUw‡AS®€e'] ], - encodeOffsets: [ - [[117111, 23002]], - [[117072, 22876]], - [[117045, 22887]], - [[116975, 23082]], - [[116882, 22747]] - ] + encodeOffsets: [[[117111, 23002]], [[117072, 22876]], [[117045, 22887]], [[116975, 23082]], [[116882, 22747]]] }, properties: { cp: [114.173355, 22.320048], diff --git a/examples/docs/resources/pc/demo/chart/mapChina.js b/examples/sites/demos/app/chart/mapChina.js similarity index 100% rename from examples/docs/resources/pc/demo/chart/mapChina.js rename to examples/sites/demos/app/chart/mapChina.js diff --git a/examples/sites/demos/app/chart/pie/base-composition-api.vue b/examples/sites/demos/app/chart/pie/base-composition-api.vue new file mode 100644 index 000000000..d04cc74f5 --- /dev/null +++ b/examples/sites/demos/app/chart/pie/base-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/pie/base.vue b/examples/sites/demos/app/chart/pie/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/pie/base.vue rename to examples/sites/demos/app/chart/pie/base.vue diff --git a/examples/sites/demos/app/chart/pie/demo2-composition-api.vue b/examples/sites/demos/app/chart/pie/demo2-composition-api.vue new file mode 100644 index 000000000..b0645ae2a --- /dev/null +++ b/examples/sites/demos/app/chart/pie/demo2-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/pie/demo2.vue b/examples/sites/demos/app/chart/pie/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/pie/demo2.vue rename to examples/sites/demos/app/chart/pie/demo2.vue diff --git a/examples/sites/demos/app/chart/pie/demo3-composition-api.vue b/examples/sites/demos/app/chart/pie/demo3-composition-api.vue new file mode 100644 index 000000000..0f6f28010 --- /dev/null +++ b/examples/sites/demos/app/chart/pie/demo3-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/pie/demo3.vue b/examples/sites/demos/app/chart/pie/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/pie/demo3.vue rename to examples/sites/demos/app/chart/pie/demo3.vue diff --git a/examples/sites/demos/app/chart/pie/demo4-composition-api.vue b/examples/sites/demos/app/chart/pie/demo4-composition-api.vue new file mode 100644 index 000000000..92143cf31 --- /dev/null +++ b/examples/sites/demos/app/chart/pie/demo4-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/pie/demo4.vue b/examples/sites/demos/app/chart/pie/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/pie/demo4.vue rename to examples/sites/demos/app/chart/pie/demo4.vue diff --git a/examples/sites/demos/app/chart/pie/demo5-composition-api.vue b/examples/sites/demos/app/chart/pie/demo5-composition-api.vue new file mode 100644 index 000000000..beedd848f --- /dev/null +++ b/examples/sites/demos/app/chart/pie/demo5-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/pie/demo5.vue b/examples/sites/demos/app/chart/pie/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/pie/demo5.vue rename to examples/sites/demos/app/chart/pie/demo5.vue diff --git a/examples/sites/demos/app/chart/pie/demo6-composition-api.vue b/examples/sites/demos/app/chart/pie/demo6-composition-api.vue new file mode 100644 index 000000000..28e73a1c9 --- /dev/null +++ b/examples/sites/demos/app/chart/pie/demo6-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/pie/demo6.vue b/examples/sites/demos/app/chart/pie/demo6.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/pie/demo6.vue rename to examples/sites/demos/app/chart/pie/demo6.vue diff --git a/examples/sites/demos/app/chart/pie/demo7-composition-api.vue b/examples/sites/demos/app/chart/pie/demo7-composition-api.vue new file mode 100644 index 000000000..759679fce --- /dev/null +++ b/examples/sites/demos/app/chart/pie/demo7-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/pie/demo7.vue b/examples/sites/demos/app/chart/pie/demo7.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/pie/demo7.vue rename to examples/sites/demos/app/chart/pie/demo7.vue diff --git a/examples/sites/demos/app/chart/props/base-composition-api.vue b/examples/sites/demos/app/chart/props/base-composition-api.vue new file mode 100644 index 000000000..ed64a299a --- /dev/null +++ b/examples/sites/demos/app/chart/props/base-composition-api.vue @@ -0,0 +1,60 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/base.vue b/examples/sites/demos/app/chart/props/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/base.vue rename to examples/sites/demos/app/chart/props/base.vue diff --git a/examples/sites/demos/app/chart/props/demo10-composition-api.vue b/examples/sites/demos/app/chart/props/demo10-composition-api.vue new file mode 100644 index 000000000..4807fc3fc --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo10-composition-api.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo10.vue b/examples/sites/demos/app/chart/props/demo10.vue similarity index 81% rename from examples/docs/resources/pc/demo/chart/props/demo10.vue rename to examples/sites/demos/app/chart/props/demo10.vue index ee6b270fb..33448eae2 100644 --- a/examples/docs/resources/pc/demo/chart/props/demo10.vue +++ b/examples/sites/demos/app/chart/props/demo10.vue @@ -1,7 +1,13 @@ @@ -42,7 +48,7 @@ export default { }, methods: { addDataZoomImg() { - this.dataZoom[0].handleIcon = 'image://localhost:3000/static/favicon.ico' + this.dataZoom[0].handleIcon = `image://${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/data-zoom.png` this.$refs.chart.dataHandler() } } diff --git a/examples/sites/demos/app/chart/props/demo11-composition-api.vue b/examples/sites/demos/app/chart/props/demo11-composition-api.vue new file mode 100644 index 000000000..a64300ff8 --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo11-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo11.vue b/examples/sites/demos/app/chart/props/demo11.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo11.vue rename to examples/sites/demos/app/chart/props/demo11.vue diff --git a/examples/sites/demos/app/chart/props/demo12-composition-api.vue b/examples/sites/demos/app/chart/props/demo12-composition-api.vue new file mode 100644 index 000000000..c6f4dffe2 --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo12-composition-api.vue @@ -0,0 +1,21 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo12.vue b/examples/sites/demos/app/chart/props/demo12.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo12.vue rename to examples/sites/demos/app/chart/props/demo12.vue diff --git a/examples/sites/demos/app/chart/props/demo2-composition-api.vue b/examples/sites/demos/app/chart/props/demo2-composition-api.vue new file mode 100644 index 000000000..137b06dd4 --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo2-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo2.vue b/examples/sites/demos/app/chart/props/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo2.vue rename to examples/sites/demos/app/chart/props/demo2.vue diff --git a/examples/sites/demos/app/chart/props/demo3-composition-api.vue b/examples/sites/demos/app/chart/props/demo3-composition-api.vue new file mode 100644 index 000000000..94121848e --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo3-composition-api.vue @@ -0,0 +1,21 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo3.vue b/examples/sites/demos/app/chart/props/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo3.vue rename to examples/sites/demos/app/chart/props/demo3.vue diff --git a/examples/sites/demos/app/chart/props/demo4-composition-api.vue b/examples/sites/demos/app/chart/props/demo4-composition-api.vue new file mode 100644 index 000000000..72f77efc5 --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo4-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo4.vue b/examples/sites/demos/app/chart/props/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo4.vue rename to examples/sites/demos/app/chart/props/demo4.vue diff --git a/examples/sites/demos/app/chart/props/demo5-composition-api.vue b/examples/sites/demos/app/chart/props/demo5-composition-api.vue new file mode 100644 index 000000000..08e1c00e4 --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo5-composition-api.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo5.vue b/examples/sites/demos/app/chart/props/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo5.vue rename to examples/sites/demos/app/chart/props/demo5.vue diff --git a/examples/sites/demos/app/chart/props/demo6-composition-api.vue b/examples/sites/demos/app/chart/props/demo6-composition-api.vue new file mode 100644 index 000000000..e814edd89 --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo6-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo6.vue b/examples/sites/demos/app/chart/props/demo6.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo6.vue rename to examples/sites/demos/app/chart/props/demo6.vue diff --git a/examples/sites/demos/app/chart/props/demo7-composition-api.vue b/examples/sites/demos/app/chart/props/demo7-composition-api.vue new file mode 100644 index 000000000..ad60a82fe --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo7-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo7.vue b/examples/sites/demos/app/chart/props/demo7.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo7.vue rename to examples/sites/demos/app/chart/props/demo7.vue diff --git a/examples/sites/demos/app/chart/props/demo8-composition-api.vue b/examples/sites/demos/app/chart/props/demo8-composition-api.vue new file mode 100644 index 000000000..e643db2fb --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo8-composition-api.vue @@ -0,0 +1,36 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo8.vue b/examples/sites/demos/app/chart/props/demo8.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo8.vue rename to examples/sites/demos/app/chart/props/demo8.vue diff --git a/examples/sites/demos/app/chart/props/demo9-composition-api.vue b/examples/sites/demos/app/chart/props/demo9-composition-api.vue new file mode 100644 index 000000000..a1dcad6f6 --- /dev/null +++ b/examples/sites/demos/app/chart/props/demo9-composition-api.vue @@ -0,0 +1,33 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/props/demo9.vue b/examples/sites/demos/app/chart/props/demo9.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/props/demo9.vue rename to examples/sites/demos/app/chart/props/demo9.vue diff --git a/examples/sites/demos/app/chart/question/base-composition-api.vue b/examples/sites/demos/app/chart/question/base-composition-api.vue new file mode 100644 index 000000000..de614effb --- /dev/null +++ b/examples/sites/demos/app/chart/question/base-composition-api.vue @@ -0,0 +1,47 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/question/base.vue b/examples/sites/demos/app/chart/question/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/question/base.vue rename to examples/sites/demos/app/chart/question/base.vue diff --git a/examples/sites/demos/app/chart/question/demo2-composition-api.vue b/examples/sites/demos/app/chart/question/demo2-composition-api.vue new file mode 100644 index 000000000..e9b797e59 --- /dev/null +++ b/examples/sites/demos/app/chart/question/demo2-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/question/demo2.vue b/examples/sites/demos/app/chart/question/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/question/demo2.vue rename to examples/sites/demos/app/chart/question/demo2.vue diff --git a/examples/sites/demos/app/chart/question/demo3-composition-api.vue b/examples/sites/demos/app/chart/question/demo3-composition-api.vue new file mode 100644 index 000000000..b8c02dbbc --- /dev/null +++ b/examples/sites/demos/app/chart/question/demo3-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/question/demo3.vue b/examples/sites/demos/app/chart/question/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/question/demo3.vue rename to examples/sites/demos/app/chart/question/demo3.vue diff --git a/examples/sites/demos/app/chart/question/demo4-composition-api.vue b/examples/sites/demos/app/chart/question/demo4-composition-api.vue new file mode 100644 index 000000000..48e62f664 --- /dev/null +++ b/examples/sites/demos/app/chart/question/demo4-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/question/demo4.vue b/examples/sites/demos/app/chart/question/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/question/demo4.vue rename to examples/sites/demos/app/chart/question/demo4.vue diff --git a/examples/sites/demos/app/chart/question/demo5-composition-api.vue b/examples/sites/demos/app/chart/question/demo5-composition-api.vue new file mode 100644 index 000000000..3dbe321b9 --- /dev/null +++ b/examples/sites/demos/app/chart/question/demo5-composition-api.vue @@ -0,0 +1,52 @@ + + + diff --git a/examples/sites/demos/app/chart/question/demo5.vue b/examples/sites/demos/app/chart/question/demo5.vue new file mode 100644 index 000000000..f5f0e5383 --- /dev/null +++ b/examples/sites/demos/app/chart/question/demo5.vue @@ -0,0 +1,53 @@ + + + diff --git a/examples/sites/demos/app/chart/radar/base-composition-api.vue b/examples/sites/demos/app/chart/radar/base-composition-api.vue new file mode 100644 index 000000000..9fb0dfce9 --- /dev/null +++ b/examples/sites/demos/app/chart/radar/base-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/radar/base.vue b/examples/sites/demos/app/chart/radar/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/radar/base.vue rename to examples/sites/demos/app/chart/radar/base.vue diff --git a/examples/sites/demos/app/chart/radar/demo2-composition-api.vue b/examples/sites/demos/app/chart/radar/demo2-composition-api.vue new file mode 100644 index 000000000..e770656b3 --- /dev/null +++ b/examples/sites/demos/app/chart/radar/demo2-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/radar/demo2.vue b/examples/sites/demos/app/chart/radar/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/radar/demo2.vue rename to examples/sites/demos/app/chart/radar/demo2.vue diff --git a/examples/sites/demos/app/chart/radar/demo3-composition-api.vue b/examples/sites/demos/app/chart/radar/demo3-composition-api.vue new file mode 100644 index 000000000..086c281e1 --- /dev/null +++ b/examples/sites/demos/app/chart/radar/demo3-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/radar/demo3.vue b/examples/sites/demos/app/chart/radar/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/radar/demo3.vue rename to examples/sites/demos/app/chart/radar/demo3.vue diff --git a/examples/sites/demos/app/chart/ring/base-composition-api.vue b/examples/sites/demos/app/chart/ring/base-composition-api.vue new file mode 100644 index 000000000..f63f10f0b --- /dev/null +++ b/examples/sites/demos/app/chart/ring/base-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/ring/base.vue b/examples/sites/demos/app/chart/ring/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/ring/base.vue rename to examples/sites/demos/app/chart/ring/base.vue diff --git a/examples/sites/demos/app/chart/ring/demo2-composition-api.vue b/examples/sites/demos/app/chart/ring/demo2-composition-api.vue new file mode 100644 index 000000000..132f4010f --- /dev/null +++ b/examples/sites/demos/app/chart/ring/demo2-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/ring/demo2.vue b/examples/sites/demos/app/chart/ring/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/ring/demo2.vue rename to examples/sites/demos/app/chart/ring/demo2.vue diff --git a/examples/sites/demos/app/chart/ring/demo3-composition-api.vue b/examples/sites/demos/app/chart/ring/demo3-composition-api.vue new file mode 100644 index 000000000..71c03f08f --- /dev/null +++ b/examples/sites/demos/app/chart/ring/demo3-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/ring/demo3.vue b/examples/sites/demos/app/chart/ring/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/ring/demo3.vue rename to examples/sites/demos/app/chart/ring/demo3.vue diff --git a/examples/sites/demos/app/chart/ring/demo4-composition-api.vue b/examples/sites/demos/app/chart/ring/demo4-composition-api.vue new file mode 100644 index 000000000..c2e86a38a --- /dev/null +++ b/examples/sites/demos/app/chart/ring/demo4-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/ring/demo4.vue b/examples/sites/demos/app/chart/ring/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/ring/demo4.vue rename to examples/sites/demos/app/chart/ring/demo4.vue diff --git a/examples/sites/demos/app/chart/ring/demo5-composition-api.vue b/examples/sites/demos/app/chart/ring/demo5-composition-api.vue new file mode 100644 index 000000000..bc0226d42 --- /dev/null +++ b/examples/sites/demos/app/chart/ring/demo5-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/ring/demo5.vue b/examples/sites/demos/app/chart/ring/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/ring/demo5.vue rename to examples/sites/demos/app/chart/ring/demo5.vue diff --git a/examples/sites/demos/app/chart/ring/demo6-composition-api.vue b/examples/sites/demos/app/chart/ring/demo6-composition-api.vue new file mode 100644 index 000000000..85bea8dc0 --- /dev/null +++ b/examples/sites/demos/app/chart/ring/demo6-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/ring/demo6.vue b/examples/sites/demos/app/chart/ring/demo6.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/ring/demo6.vue rename to examples/sites/demos/app/chart/ring/demo6.vue diff --git a/examples/sites/demos/app/chart/ring/ring-title-composition-api.vue b/examples/sites/demos/app/chart/ring/ring-title-composition-api.vue new file mode 100644 index 000000000..512ef9079 --- /dev/null +++ b/examples/sites/demos/app/chart/ring/ring-title-composition-api.vue @@ -0,0 +1,35 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/ring/ring-title.vue b/examples/sites/demos/app/chart/ring/ring-title.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/ring/ring-title.vue rename to examples/sites/demos/app/chart/ring/ring-title.vue diff --git a/examples/sites/demos/app/chart/sankey/base-composition-api.vue b/examples/sites/demos/app/chart/sankey/base-composition-api.vue new file mode 100644 index 000000000..20d5d49b4 --- /dev/null +++ b/examples/sites/demos/app/chart/sankey/base-composition-api.vue @@ -0,0 +1,33 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/sankey/base.vue b/examples/sites/demos/app/chart/sankey/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/sankey/base.vue rename to examples/sites/demos/app/chart/sankey/base.vue diff --git a/examples/sites/demos/app/chart/sankey/demo2-composition-api.vue b/examples/sites/demos/app/chart/sankey/demo2-composition-api.vue new file mode 100644 index 000000000..ae8ca971f --- /dev/null +++ b/examples/sites/demos/app/chart/sankey/demo2-composition-api.vue @@ -0,0 +1,35 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/sankey/demo2.vue b/examples/sites/demos/app/chart/sankey/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/sankey/demo2.vue rename to examples/sites/demos/app/chart/sankey/demo2.vue diff --git a/examples/sites/demos/app/chart/scatter/base-composition-api.vue b/examples/sites/demos/app/chart/scatter/base-composition-api.vue new file mode 100644 index 000000000..7e7370a1b --- /dev/null +++ b/examples/sites/demos/app/chart/scatter/base-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/scatter/base.vue b/examples/sites/demos/app/chart/scatter/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/scatter/base.vue rename to examples/sites/demos/app/chart/scatter/base.vue diff --git a/examples/sites/demos/app/chart/scatter/demo2-composition-api.vue b/examples/sites/demos/app/chart/scatter/demo2-composition-api.vue new file mode 100644 index 000000000..4c8f5cbb7 --- /dev/null +++ b/examples/sites/demos/app/chart/scatter/demo2-composition-api.vue @@ -0,0 +1,42 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/scatter/demo2.vue b/examples/sites/demos/app/chart/scatter/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/scatter/demo2.vue rename to examples/sites/demos/app/chart/scatter/demo2.vue diff --git a/examples/sites/demos/app/chart/scatter/demo3-composition-api.vue b/examples/sites/demos/app/chart/scatter/demo3-composition-api.vue new file mode 100644 index 000000000..40f07edca --- /dev/null +++ b/examples/sites/demos/app/chart/scatter/demo3-composition-api.vue @@ -0,0 +1,45 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/scatter/demo3.vue b/examples/sites/demos/app/chart/scatter/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/scatter/demo3.vue rename to examples/sites/demos/app/chart/scatter/demo3.vue diff --git a/examples/sites/demos/app/chart/scatter/demo4-composition-api.vue b/examples/sites/demos/app/chart/scatter/demo4-composition-api.vue new file mode 100644 index 000000000..519c9295c --- /dev/null +++ b/examples/sites/demos/app/chart/scatter/demo4-composition-api.vue @@ -0,0 +1,48 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/scatter/demo4.vue b/examples/sites/demos/app/chart/scatter/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/scatter/demo4.vue rename to examples/sites/demos/app/chart/scatter/demo4.vue diff --git a/examples/sites/demos/app/chart/scatter/demo5-composition-api.vue b/examples/sites/demos/app/chart/scatter/demo5-composition-api.vue new file mode 100644 index 000000000..f5b4fca10 --- /dev/null +++ b/examples/sites/demos/app/chart/scatter/demo5-composition-api.vue @@ -0,0 +1,49 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/scatter/demo5.vue b/examples/sites/demos/app/chart/scatter/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/scatter/demo5.vue rename to examples/sites/demos/app/chart/scatter/demo5.vue diff --git a/examples/sites/demos/app/chart/scatter/demo6-composition-api.vue b/examples/sites/demos/app/chart/scatter/demo6-composition-api.vue new file mode 100644 index 000000000..ac976b0a9 --- /dev/null +++ b/examples/sites/demos/app/chart/scatter/demo6-composition-api.vue @@ -0,0 +1,45 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/scatter/demo6.vue b/examples/sites/demos/app/chart/scatter/demo6.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/scatter/demo6.vue rename to examples/sites/demos/app/chart/scatter/demo6.vue diff --git a/examples/sites/demos/app/chart/scatter/demo7-composition-api.vue b/examples/sites/demos/app/chart/scatter/demo7-composition-api.vue new file mode 100644 index 000000000..1c24c7539 --- /dev/null +++ b/examples/sites/demos/app/chart/scatter/demo7-composition-api.vue @@ -0,0 +1,47 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/scatter/demo7.vue b/examples/sites/demos/app/chart/scatter/demo7.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/scatter/demo7.vue rename to examples/sites/demos/app/chart/scatter/demo7.vue diff --git a/examples/sites/demos/app/chart/scatter/demo8-composition-api.vue b/examples/sites/demos/app/chart/scatter/demo8-composition-api.vue new file mode 100644 index 000000000..a2ede7e60 --- /dev/null +++ b/examples/sites/demos/app/chart/scatter/demo8-composition-api.vue @@ -0,0 +1,36 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/scatter/demo8.vue b/examples/sites/demos/app/chart/scatter/demo8.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/scatter/demo8.vue rename to examples/sites/demos/app/chart/scatter/demo8.vue diff --git a/examples/sites/demos/app/chart/sunburst/base-composition-api.vue b/examples/sites/demos/app/chart/sunburst/base-composition-api.vue new file mode 100644 index 000000000..b60a84102 --- /dev/null +++ b/examples/sites/demos/app/chart/sunburst/base-composition-api.vue @@ -0,0 +1,288 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/sunburst/base.vue b/examples/sites/demos/app/chart/sunburst/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/sunburst/base.vue rename to examples/sites/demos/app/chart/sunburst/base.vue diff --git a/examples/sites/demos/app/chart/sunburst/demo2-composition-api.vue b/examples/sites/demos/app/chart/sunburst/demo2-composition-api.vue new file mode 100644 index 000000000..08ecb3794 --- /dev/null +++ b/examples/sites/demos/app/chart/sunburst/demo2-composition-api.vue @@ -0,0 +1,849 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/sunburst/demo2.vue b/examples/sites/demos/app/chart/sunburst/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/sunburst/demo2.vue rename to examples/sites/demos/app/chart/sunburst/demo2.vue diff --git a/examples/sites/demos/app/chart/tree/base-composition-api.vue b/examples/sites/demos/app/chart/tree/base-composition-api.vue new file mode 100644 index 000000000..c53be7271 --- /dev/null +++ b/examples/sites/demos/app/chart/tree/base-composition-api.vue @@ -0,0 +1,97 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/tree/base.vue b/examples/sites/demos/app/chart/tree/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/tree/base.vue rename to examples/sites/demos/app/chart/tree/base.vue diff --git a/examples/sites/demos/app/chart/tree/demo2-composition-api.vue b/examples/sites/demos/app/chart/tree/demo2-composition-api.vue new file mode 100644 index 000000000..d11e59f3d --- /dev/null +++ b/examples/sites/demos/app/chart/tree/demo2-composition-api.vue @@ -0,0 +1,117 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/tree/demo2.vue b/examples/sites/demos/app/chart/tree/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/tree/demo2.vue rename to examples/sites/demos/app/chart/tree/demo2.vue diff --git a/examples/sites/demos/app/chart/tree/demo3-composition-api.vue b/examples/sites/demos/app/chart/tree/demo3-composition-api.vue new file mode 100644 index 000000000..b2bf09696 --- /dev/null +++ b/examples/sites/demos/app/chart/tree/demo3-composition-api.vue @@ -0,0 +1,104 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/tree/demo3.vue b/examples/sites/demos/app/chart/tree/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/tree/demo3.vue rename to examples/sites/demos/app/chart/tree/demo3.vue diff --git a/examples/sites/demos/app/chart/tree/demo4-composition-api.vue b/examples/sites/demos/app/chart/tree/demo4-composition-api.vue new file mode 100644 index 000000000..57064ceab --- /dev/null +++ b/examples/sites/demos/app/chart/tree/demo4-composition-api.vue @@ -0,0 +1,104 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/tree/demo4.vue b/examples/sites/demos/app/chart/tree/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/tree/demo4.vue rename to examples/sites/demos/app/chart/tree/demo4.vue diff --git a/examples/sites/demos/app/chart/tree/demo5-composition-api.vue b/examples/sites/demos/app/chart/tree/demo5-composition-api.vue new file mode 100644 index 000000000..1d943b34c --- /dev/null +++ b/examples/sites/demos/app/chart/tree/demo5-composition-api.vue @@ -0,0 +1,115 @@ + + + diff --git a/examples/sites/demos/app/chart/tree/demo5.vue b/examples/sites/demos/app/chart/tree/demo5.vue new file mode 100644 index 000000000..4217383eb --- /dev/null +++ b/examples/sites/demos/app/chart/tree/demo5.vue @@ -0,0 +1,124 @@ + + + diff --git a/examples/sites/demos/app/chart/waterfall/base-composition-api.vue b/examples/sites/demos/app/chart/waterfall/base-composition-api.vue new file mode 100644 index 000000000..77da54bce --- /dev/null +++ b/examples/sites/demos/app/chart/waterfall/base-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/waterfall/base.vue b/examples/sites/demos/app/chart/waterfall/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/waterfall/base.vue rename to examples/sites/demos/app/chart/waterfall/base.vue diff --git a/examples/sites/demos/app/chart/waterfall/demo2-composition-api.vue b/examples/sites/demos/app/chart/waterfall/demo2-composition-api.vue new file mode 100644 index 000000000..9ef390abe --- /dev/null +++ b/examples/sites/demos/app/chart/waterfall/demo2-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/waterfall/demo2.vue b/examples/sites/demos/app/chart/waterfall/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/waterfall/demo2.vue rename to examples/sites/demos/app/chart/waterfall/demo2.vue diff --git a/examples/sites/demos/app/chart/waterfall/demo3-composition-api.vue b/examples/sites/demos/app/chart/waterfall/demo3-composition-api.vue new file mode 100644 index 000000000..78372010f --- /dev/null +++ b/examples/sites/demos/app/chart/waterfall/demo3-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/waterfall/demo3.vue b/examples/sites/demos/app/chart/waterfall/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/waterfall/demo3.vue rename to examples/sites/demos/app/chart/waterfall/demo3.vue diff --git a/examples/sites/demos/app/chart/waterfall/demo4-composition-api.vue b/examples/sites/demos/app/chart/waterfall/demo4-composition-api.vue new file mode 100644 index 000000000..f95d27b27 --- /dev/null +++ b/examples/sites/demos/app/chart/waterfall/demo4-composition-api.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/waterfall/demo4.vue b/examples/sites/demos/app/chart/waterfall/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/waterfall/demo4.vue rename to examples/sites/demos/app/chart/waterfall/demo4.vue diff --git a/examples/sites/demos/app/chart/waterfall/demo5-composition-api.vue b/examples/sites/demos/app/chart/waterfall/demo5-composition-api.vue new file mode 100644 index 000000000..388e44e52 --- /dev/null +++ b/examples/sites/demos/app/chart/waterfall/demo5-composition-api.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/waterfall/demo5.vue b/examples/sites/demos/app/chart/waterfall/demo5.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/waterfall/demo5.vue rename to examples/sites/demos/app/chart/waterfall/demo5.vue diff --git a/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.cn.md b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.en.md b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.js b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.js new file mode 100644 index 000000000..69f1e318a --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.js @@ -0,0 +1,84 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'props-demo10', + 'name': { 'zh-CN': '属性配置示例', 'en-US': 'Attribute Configuration Example' }, + 'desc': { + 'zh-CN': + '

如果某属性加上去之后没有生效,很可能是没有引入相应的模块。例如:

\n

在使用 dataZoom 组件时,需要引入 dataZoom 模块资源 import \'echarts/lib/component/dataZoom\'

\n
\n

1 设置区域缩放组件

\n

可通过 init-options 配置组件初始化附加参数,具体可参考文档

\n', + 'en-US': + '

If an attribute does not take effect after being added or removed, it is likely that the corresponding module is not introduced. For example,

\n

When using the dataZoom component, you need to import the dataZoom module resource import\'echarts/lib/component/dataZoom\'.

\n
\n

1 Setting the Region Scaling Component

\n

You can run the init-options command to configure the additional initialization parameters of the component. For details, see the document

\n' + }, + 'codeFiles': ['props/demo10.vue'] + }, + { + 'demoId': 'props-base', + 'name': { 'zh-CN': '1 设置区域缩放组件', 'en-US': '1 Setting the Region Zoom Component' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/base.vue'] + }, + { + 'demoId': 'props-demo12', + 'name': { 'zh-CN': '2 设置extend配置项', 'en-US': '2 Set the extend configuration item' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo12.vue'] + }, + { + 'demoId': 'props-demo4', + 'name': { 'zh-CN': '3 修改颜色列表', 'en-US': '3 Modify the color list' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo4.vue'] + }, + { + 'demoId': 'props-demo5', + 'name': { 'zh-CN': '4 设置暂无数据状态', 'en-US': '4 Set the status of no data.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo5.vue'] + }, + { + 'demoId': 'props-demo6', + 'name': { 'zh-CN': '5 增加自定义内容', 'en-US': '5 Add Custom Content' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo6.vue'] + }, + { + 'demoId': 'props-demo7', + 'name': { 'zh-CN': '6 隐藏提示框与图例', 'en-US': '6 Hide dialog box and legend' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo7.vue'] + }, + { + 'demoId': 'props-demo8', + 'name': { 'zh-CN': '7 设置图表容器样式', 'en-US': '7 Set chart container style' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo8.vue'] + }, + { + 'demoId': 'props-demo9', + 'name': { 'zh-CN': '8 设置图表标线与标点', 'en-US': '8 Set the chart line and punctuation point' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo9.vue'] + }, + { + 'demoId': 'props-demo2', + 'name': { 'zh-CN': '9 设置视觉映射组件', 'en-US': '9 Setting the Visual Mapping Component' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo2.vue'] + }, + { + 'demoId': 'props-demo11', + 'name': { 'zh-CN': '10 设置afterConfig函数', 'en-US': '10 Set the afterConfig function' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo11.vue'] + }, + { + 'demoId': 'props-demo3', + 'name': { 'zh-CN': '11 设置工具箱', 'en-US': '11 Setting Toolbox' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['props/demo3.vue'] + } + ], + apis: [{ 'name': 'chart-attributes-demo', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-attributes-demo.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.cn.md b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.en.md b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.js b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.js new file mode 100644 index 000000000..d8bd674ce --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.js @@ -0,0 +1,18 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'amap-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。 高德地图需要外网访问权限才能正常使用\n

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts. AutoNavi Map requires the access permission from the external network. \n

\n' + }, + 'codeFiles': ['amap/base.vue'] + } + ], + apis: [{ 'name': 'chart-autonavi-map', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-autonavi-map.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-baidu-map.cn.md b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-baidu-map.en.md b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-baidu-map.js b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.js new file mode 100644 index 000000000..7d0676a95 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.js @@ -0,0 +1,18 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'bmap-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。\n 百度地图需要外网访问权限才能正常使用\n

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts. \n Baidu Map requires the external network access permission. \n

\n' + }, + 'codeFiles': ['bmap/base.vue'] + } + ], + apis: [{ 'name': 'chart-baidu-map', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-baidu-map.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-baidu-map.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-baidu-map.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-bar.cn.md b/examples/sites/demos/app/chart/webdoc/chart-bar.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-bar.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-bar.en.md b/examples/sites/demos/app/chart/webdoc/chart-bar.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-bar.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-bar.js b/examples/sites/demos/app/chart/webdoc/chart-bar.js new file mode 100644 index 000000000..1953c6de5 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-bar.js @@ -0,0 +1,54 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'bar-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['bar/base.vue'] + }, + { + 'demoId': 'bar-demo2', + 'name': { 'zh-CN': '指定指标维度', 'en-US': 'Specify Indicator Dimension' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['bar/demo2.vue'] + }, + { + 'demoId': 'bar-demo3', + 'name': { 'zh-CN': '排序条形图', 'en-US': 'Sort Bar' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['bar/demo3.vue'] + }, + { + 'demoId': 'bar-demo4', + 'name': { 'zh-CN': '条形轴配置双 y 轴', 'en-US': 'The bar axis is configured with two y-axises.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['bar/demo4.vue'] + }, + { + 'demoId': 'bar-demo5', + 'name': { 'zh-CN': '设置 legend 别名', 'en-US': 'Set legend alias' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['bar/demo5.vue'] + }, + { + 'demoId': 'bar-demo6', + 'name': { 'zh-CN': '堆叠条形图', 'en-US': 'Stack Bar' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['bar/demo6.vue'] + }, + { + 'demoId': 'bar-demo7', + 'name': { 'zh-CN': '设置纵轴为连续的数值轴', 'en-US': 'Set the vertical axis to a continuous value axis.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['bar/demo7.vue'] + } + ], + apis: [{ 'name': 'chart-bar', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-bar.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-bar.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-bar.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-bar.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-bar.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-bar.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-boxplot.cn.md b/examples/sites/demos/app/chart/webdoc/chart-boxplot.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-boxplot.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-boxplot.en.md b/examples/sites/demos/app/chart/webdoc/chart-boxplot.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-boxplot.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-boxplot.js b/examples/sites/demos/app/chart/webdoc/chart-boxplot.js new file mode 100644 index 000000000..03682637b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-boxplot.js @@ -0,0 +1,38 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'boxplot-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

Boxplot 中文可以称为『箱形图』、『盒须图』、『盒式图』、『盒状图』、『箱线图』,是一种用作显示一组数据分散情况资料的统计图。它能显示出一组数据的最大值、最小值、中位数、下四分位数及上四分位数。

\n', + 'en-US': + '

Boxplot Chinese can be called box diagram, box diagram. A statistical chart used to show a set of data dispersion. It displays the maximum, minimum, median, lower quartile, and upper quartile of a set of data.

\n' + }, + 'codeFiles': ['boxplot/base.vue'] + }, + { + 'demoId': 'boxplot-multiple', + 'name': { 'zh-CN': '多数据显示', 'en-US': 'Multi-data display' }, + 'desc': { + 'zh-CN': + '

boxplot 提供数据转化方法 prepareBoxplotData 将源数据转化为 { axisData: [...], boxData: [...], outliers: [...] } 的格式化数据。

\n', + 'en-US': + '

boxplot provides the data conversion method prepareBoxplotData to convert source data into {axisData: [...], boxData: [...], outliers: [...]} formatted data.

\n' + }, + 'codeFiles': ['boxplot/multiple.vue'] + }, + { + 'demoId': 'boxplot-vertical', + 'name': { 'zh-CN': '垂直显示', 'en-US': 'vertical display' }, + 'desc': { + 'zh-CN': '

通过 extend 属性实现 echarts 方式的配置。

\n', + 'en-US': '

The extend attribute is used to configure the echarts mode.

\n' + }, + 'codeFiles': ['boxplot/vertical.vue'] + } + ], + apis: [{ 'name': 'chart-boxplot', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-boxplot.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-boxplot.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-boxplot.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-boxplot.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-boxplot.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-boxplot.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-candle.cn.md b/examples/sites/demos/app/chart/webdoc/chart-candle.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-candle.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-candle.en.md b/examples/sites/demos/app/chart/webdoc/chart-candle.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-candle.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-candle.js b/examples/sites/demos/app/chart/webdoc/chart-candle.js new file mode 100644 index 000000000..7551531e0 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-candle.js @@ -0,0 +1,54 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'candle-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['candle/base.vue'] + }, + { + 'demoId': 'candle-demo2', + 'name': { 'zh-CN': '使用简化的数据格式', 'en-US': 'Use simplified data format' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['candle/demo2.vue'] + }, + { + 'demoId': 'candle-demo3', + 'name': { 'zh-CN': '设置数据格式', 'en-US': 'Set the data format' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['candle/demo3.vue'] + }, + { + 'demoId': 'candle-demo4', + 'name': { 'zh-CN': '显示 MA, VOL', 'en-US': 'Display MA, VOL' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['candle/demo4.vue'] + }, + { + 'demoId': 'candle-demo5', + 'name': { 'zh-CN': '修改指标名和图例文字', 'en-US': 'Modify the KQI/KPI Name and Legend Text' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['candle/demo5.vue'] + }, + { + 'demoId': 'candle-demo6', + 'name': { 'zh-CN': '修改 MA 显示周期', 'en-US': 'Modify the MA display period' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['candle/demo6.vue'] + }, + { + 'demoId': 'candle-demo7', + 'name': { 'zh-CN': '设置 dataRoom 控件', 'en-US': 'Set the dataRoom control' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['candle/demo7.vue'] + } + ], + apis: [{ 'name': 'chart-candle', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-candle.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-candle.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-candle.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-candle.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-candle.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-candle.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-events.cn.md b/examples/sites/demos/app/chart/webdoc/chart-events.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-events.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-events.en.md b/examples/sites/demos/app/chart/webdoc/chart-events.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-events.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-events.js b/examples/sites/demos/app/chart/webdoc/chart-events.js new file mode 100644 index 000000000..fcf623f6b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-events.js @@ -0,0 +1,18 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'events-base', + 'name': { 'zh-CN': '事件监听', 'en-US': 'Event Listening' }, + 'desc': { + 'zh-CN': + '

绑定事件通过传递一个事件名称和对应回调函数的对象实现,回调函数内的参数是 echarts 模块,可以据此做相应的处理。

\n

示例

\n', + 'en-US': + '

A binding event is implemented by transferring an event name and an object of the corresponding callback function. The parameter in the callback function is the echarts module, which can be processed accordingly.

\n

Example

\n' + }, + 'codeFiles': ['events/base.vue'] + } + ], + apis: [{ 'name': 'chart-events', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-events.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-events.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-events.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-events.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-events.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-events.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-funnel.cn.md b/examples/sites/demos/app/chart/webdoc/chart-funnel.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-funnel.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-funnel.en.md b/examples/sites/demos/app/chart/webdoc/chart-funnel.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-funnel.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-funnel.js b/examples/sites/demos/app/chart/webdoc/chart-funnel.js new file mode 100644 index 000000000..abb772660 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-funnel.js @@ -0,0 +1,57 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'funnel-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['funnel/base.vue'] + }, + { + 'demoId': 'funnel-demo2', + 'name': { 'zh-CN': '指定指标维度', 'en-US': 'Specify Indicator Dimension' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['funnel/demo2.vue'] + }, + { + 'demoId': 'funnel-demo3', + 'name': { + 'zh-CN': '自动按照数值排序并过滤 0 值', + 'en-US': 'Automatically sorted by value and filtered by value 0' + }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['funnel/demo3.vue'] + }, + { + 'demoId': 'funnel-demo4', + 'name': { 'zh-CN': '定制顺序漏斗图', 'en-US': 'Customized sequence funnel chart' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['funnel/demo4.vue'] + }, + { + 'demoId': 'funnel-demo5', + 'name': { 'zh-CN': '指定数据类型漏斗图', 'en-US': 'Funnel chart of a specified data type' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['funnel/demo5.vue'] + }, + { + 'demoId': 'funnel-demo6', + 'name': { 'zh-CN': '修改 legend 别名漏斗图', 'en-US': 'Modify legend alias funnel chart' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['funnel/demo6.vue'] + }, + { + 'demoId': 'funnel-demo7', + 'name': { 'zh-CN': '金字塔', 'en-US': 'Pyramid' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['funnel/demo7.vue'] + } + ], + apis: [{ 'name': 'chart-funnel', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-funnel.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-funnel.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-funnel.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-funnel.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-funnel.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-funnel.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-gauge.cn.md b/examples/sites/demos/app/chart/webdoc/chart-gauge.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-gauge.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-gauge.en.md b/examples/sites/demos/app/chart/webdoc/chart-gauge.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-gauge.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-gauge.js b/examples/sites/demos/app/chart/webdoc/chart-gauge.js new file mode 100644 index 000000000..e0c8493c6 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-gauge.js @@ -0,0 +1,42 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'gauge-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['gauge/base.vue'] + }, + { + 'demoId': 'gauge-demo2', + 'name': { 'zh-CN': '指标维度配置', 'en-US': 'KQI/KPI Dimension Configuration' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['gauge/demo2.vue'] + }, + { + 'demoId': 'gauge-demo3', + 'name': { 'zh-CN': '设置数据类型', 'en-US': 'Set Data Type' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['gauge/demo3.vue'] + }, + { + 'demoId': 'gauge-demo4', + 'name': { 'zh-CN': '设置指标别名与单位', 'en-US': 'Set the counter alias and unit' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['gauge/demo4.vue'] + }, + { + 'demoId': 'gauge-demo5', + 'name': { 'zh-CN': '设置多表盘及修改样式', 'en-US': 'Set multiple watch faces and modify the style' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['gauge/demo5.vue'] + } + ], + apis: [{ 'name': 'chart-gauge', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-gauge.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-gauge.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-gauge.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-gauge.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-gauge.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-gauge.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-graph.cn.md b/examples/sites/demos/app/chart/webdoc/chart-graph.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-graph.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-graph.en.md b/examples/sites/demos/app/chart/webdoc/chart-graph.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-graph.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-graph.js b/examples/sites/demos/app/chart/webdoc/chart-graph.js new file mode 100644 index 000000000..0cc423a87 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-graph.js @@ -0,0 +1,30 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'graph-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n
\n

该图只支持 extend 配置,使用方式及属性和 eCharts 一致,请参考 eCharts 配置

\n
\n', + 'en-US': + '

It can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts. The

\n
\n

diagram supports only the extend configuration. The usage and attributes of the diagram are the same as those of the eCharts. For details, see the

\n
\n' + }, + 'codeFiles': ['graph/base.vue'] + }, + { + 'demoId': 'graph-demo2', + 'name': { 'zh-CN': '笛卡尔坐标系上的 Graph', 'en-US': 'Graph in Cartesian coordinate system' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['graph/demo2.vue'] + }, + { + 'demoId': 'graph-demo3', + 'name': { 'zh-CN': '拓扑图的事件拓展', 'en-US': 'Extend events in the topology view' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['graph/demo3.vue'] + } + ], + apis: [{ 'name': 'chart-graph', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-graph.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-graph.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-graph.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-graph.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-graph.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-graph.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-heatmap.cn.md b/examples/sites/demos/app/chart/webdoc/chart-heatmap.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-heatmap.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-heatmap.en.md b/examples/sites/demos/app/chart/webdoc/chart-heatmap.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-heatmap.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-heatmap.js b/examples/sites/demos/app/chart/webdoc/chart-heatmap.js new file mode 100644 index 000000000..aca088923 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-heatmap.js @@ -0,0 +1,45 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'heatmap-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['heatmap/base.vue'] + }, + { + 'demoId': 'heatmap-demo2', + 'name': { 'zh-CN': '配置坐标轴', 'en-US': 'Configure the coordinate axis' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['heatmap/demo2.vue'] + }, + { + 'demoId': 'heatmap-demo3', + 'name': { 'zh-CN': '自定义 visualMap', 'en-US': 'Customized visualMap' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['heatmap/demo3.vue'] + }, + { + 'demoId': 'heatmap-demo4', + 'name': { 'zh-CN': '地图热力图', 'en-US': 'Map heat map' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['heatmap/demo4.vue'] + }, + { + 'demoId': 'heatmap-demo5', + 'name': { 'zh-CN': '百度地图热力图', 'en-US': 'Baidu Map Heat Map' }, + 'desc': { + 'zh-CN': '

百度地图和高德地图需要外网访问权限才能正常使用\n

\n', + 'en-US': '

Baidu Map and AutoNavi Map require the external network access permission.\n

\n' + }, + 'codeFiles': ['heatmap/demo5.vue'] + } + ], + apis: [{ 'name': 'chart-heatmap', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-heatmap.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-heatmap.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-heatmap.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-heatmap.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-heatmap.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-heatmap.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-histogram.cn.md b/examples/sites/demos/app/chart/webdoc/chart-histogram.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-histogram.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-histogram.en.md b/examples/sites/demos/app/chart/webdoc/chart-histogram.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-histogram.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-histogram.js b/examples/sites/demos/app/chart/webdoc/chart-histogram.js new file mode 100644 index 000000000..ae29118b2 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-histogram.js @@ -0,0 +1,60 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'histogram-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['histogram/base.vue'] + }, + { + 'demoId': 'histogram-demo2', + 'name': { 'zh-CN': '设置显示的指标维度', 'en-US': 'Set the KQI/KPI dimension to be displayed.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['histogram/demo2.vue'] + }, + { + 'demoId': 'histogram-demo3', + 'name': { 'zh-CN': '设置双 y 轴', 'en-US': 'Set the two y axes' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['histogram/demo3.vue'] + }, + { + 'demoId': 'histogram-demo4', + 'name': { 'zh-CN': '柱状图+折线图', 'en-US': 'Bar chart + Line chart' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['histogram/demo4.vue'] + }, + { + 'demoId': 'histogram-demo5', + 'name': { 'zh-CN': '堆叠柱状图', 'en-US': 'Stacked Bar Chart' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['histogram/demo5.vue'] + }, + { + 'demoId': 'histogram-demo6', + 'name': { 'zh-CN': '默认显示柱状图数据', 'en-US': 'By default, bar chart data is displayed.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['histogram/demo6.vue'] + }, + { + 'demoId': 'histogram-demo7', + 'name': { 'zh-CN': '修改别名', 'en-US': 'Modify Alias' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['histogram/demo7.vue'] + }, + { + 'demoId': 'histogram-demo8', + 'name': { 'zh-CN': '设置横轴为连续的数值轴', 'en-US': 'Set the horizontal axis to a continuous value axis' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['histogram/demo8.vue'] + } + ], + apis: [{ 'name': 'chart-histogram', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-histogram.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-histogram.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-histogram.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-histogram.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-histogram.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-histogram.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-line.cn.md b/examples/sites/demos/app/chart/webdoc/chart-line.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-line.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-line.en.md b/examples/sites/demos/app/chart/webdoc/chart-line.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-line.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-line.js b/examples/sites/demos/app/chart/webdoc/chart-line.js new file mode 100644 index 000000000..880f62151 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-line.js @@ -0,0 +1,66 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'line-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['line/base.vue'] + }, + { + 'demoId': 'line-demo2', + 'name': { 'zh-CN': '设置显示的指标维度', 'en-US': 'Set the KQI/KPI dimension to be displayed' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['line/demo2.vue'] + }, + { + 'demoId': 'line-demo3', + 'name': { 'zh-CN': '设置双 y 轴', 'en-US': 'Set the two y axes' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['line/demo3.vue'] + }, + { + 'demoId': 'line-demo4', + 'name': { 'zh-CN': '横坐标的倾斜', 'en-US': 'Slant of the horizontal coordinate' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['line/demo4.vue'] + }, + { + 'demoId': 'line-demo5', + 'name': { 'zh-CN': '堆叠面积图', 'en-US': 'Stack Area Chart' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['line/demo5.vue'] + }, + { + 'demoId': 'line-demo6', + 'name': { 'zh-CN': '设置别名', 'en-US': 'Set Alias' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['line/demo6.vue'] + }, + { + 'demoId': 'line-demo7', + 'name': { 'zh-CN': '显示指标数值', 'en-US': 'Display Indicator Value' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['line/demo7.vue'] + }, + { + 'demoId': 'line-demo8', + 'name': { 'zh-CN': '设置横轴为连续的数值轴', 'en-US': 'Set the horizontal axis to a continuous value axis' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['line/demo8.vue'] + }, + { + 'demoId': 'line-demo9', + 'name': { 'zh-CN': '设置横轴为连续的时间轴', 'en-US': 'Set the horizontal axis to a continuous time axis.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['line/demo9.vue'] + } + ], + apis: [{ 'name': 'chart-line', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-line.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-line.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-line.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-line.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-line.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-line.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-liquidfill.cn.md b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-liquidfill.en.md b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-liquidfill.js b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.js new file mode 100644 index 000000000..45e03a7bf --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.js @@ -0,0 +1,45 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'liquidfill-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['liquidfill/base.vue'] + }, + { + 'demoId': 'liquidfill-demo2', + 'name': { 'zh-CN': '水球图分层', 'en-US': 'Layered water balloon chart' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['liquidfill/demo2.vue'] + }, + { + 'demoId': 'liquidfill-demo3', + 'name': { 'zh-CN': '设置多个水球图', 'en-US': 'Set multiple water balloons' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['liquidfill/demo3.vue'] + }, + { + 'demoId': 'liquidfill-demo4', + 'name': { 'zh-CN': '设置水球图的形状', 'en-US': 'Set the shape of the water balloon chart' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['liquidfill/demo4.vue'] + }, + { + 'demoId': 'liquidfill-demo5', + 'name': { + 'zh-CN': '水球图文字标签及样式设置', + 'en-US': 'Set the text label and style of the water balloon diagram' + }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['liquidfill/demo5.vue'] + } + ], + apis: [{ 'name': 'chart-liquidfill', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-liquidfill.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-liquidfill.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-liquidfill.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-map.cn.md b/examples/sites/demos/app/chart/webdoc/chart-map.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-map.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-map.en.md b/examples/sites/demos/app/chart/webdoc/chart-map.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-map.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-map.js b/examples/sites/demos/app/chart/webdoc/chart-map.js new file mode 100644 index 000000000..5060765f4 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-map.js @@ -0,0 +1,13 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'map-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['map/base.vue'] + } + ], + apis: [{ 'name': 'chart-map', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-map.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-map.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-map.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-map.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-map.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-map.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-pie.cn.md b/examples/sites/demos/app/chart/webdoc/chart-pie.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-pie.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-pie.en.md b/examples/sites/demos/app/chart/webdoc/chart-pie.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-pie.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-pie.js b/examples/sites/demos/app/chart/webdoc/chart-pie.js new file mode 100644 index 000000000..13711447f --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-pie.js @@ -0,0 +1,54 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'pie-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['pie/base.vue'] + }, + { + 'demoId': 'pie-demo2', + 'name': { 'zh-CN': '设置指标维度', 'en-US': 'Set KQI/KPI Dimension' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['pie/demo2.vue'] + }, + { + 'demoId': 'pie-demo3', + 'name': { 'zh-CN': '玫瑰图', 'en-US': 'Rose' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['pie/demo3.vue'] + }, + { + 'demoId': 'pie-demo4', + 'name': { 'zh-CN': '限制显示条数饼图', 'en-US': 'Restrict the number of pie charts to be displayed.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['pie/demo4.vue'] + }, + { + 'demoId': 'pie-demo5', + 'name': { 'zh-CN': '多圆饼图', 'en-US': 'Multi-Round Pie Chart' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['pie/demo5.vue'] + }, + { + 'demoId': 'pie-demo6', + 'name': { 'zh-CN': '设置数据类型', 'en-US': 'Set Data Type' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['pie/demo6.vue'] + }, + { + 'demoId': 'pie-demo7', + 'name': { 'zh-CN': '设置饼图半径边距', 'en-US': 'Set the radius margin of the pie chart' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['pie/demo7.vue'] + } + ], + apis: [{ 'name': 'chart-pie', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-pie.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-pie.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-pie.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-pie.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-pie.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-pie.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-question.cn.md b/examples/sites/demos/app/chart/webdoc/chart-question.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-question.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-question.en.md b/examples/sites/demos/app/chart/webdoc/chart-question.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-question.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-question.js b/examples/sites/demos/app/chart/webdoc/chart-question.js new file mode 100644 index 000000000..949a326d0 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-question.js @@ -0,0 +1,46 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'question-base', + 'name': { 'zh-CN': '常见问题', 'en-US': 'Frequently Asked Questions' }, + 'desc': { + 'zh-CN': + '

父元素的初始宽度未知

\n

在一个初始宽度未知的容器内绘制图表时,因为无法获取宽度,所以图表会绘制失败,解决的办法是在容器宽度已知后,\n调用 echarts 的 resize 方法。\n通过 cancel-resize-check 是用于resize之前,检测组件元素是否存在,元素是否有宽高,没有则不resize。

\n', + 'en-US': + '

The initial width of the parent element is unknown

\n

When drawing a chart in a container whose initial width is unknown, the chart fails to be drawn because the width cannot be obtained. The solution is to obtain the width after the container width is known. \nInvoke the resize method of echarts. \n cancel-resize-check is used to check whether a component element exists and whether the element has width and height before resize. If no, the component element does not have width and height.

\n' + }, + 'codeFiles': ['question/base.vue'] + }, + { + 'demoId': 'question-demo5', + 'name': { 'zh-CN': '父元素的初始宽度未知', 'en-US': 'The initial width of the parent element is unknown.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['question/demo5.vue'] + }, + { + 'demoId': 'question-demo4', + 'name': { 'zh-CN': '数据改变视图自动更新', 'en-US': 'Automatically update the data change view' }, + 'desc': { + 'zh-CN': + '

图表是基于 Vue 开发的,同样支持 双向数据绑定,只要改变图表数据 (示例中的 chartData.row) 视图会自动更新。

\n', + 'en-US': + '

The chart is developed based on the Vue and also supports bidirectional data binding. If the chart data (chartData.row in the example) is changed, the view is automatically updated.

\n' + }, + 'codeFiles': ['question/demo4.vue'] + }, + { + 'demoId': 'question-demo2', + 'name': { 'zh-CN': '小数显示精度', 'en-US': 'Decimal display precision' }, + 'desc': { + 'zh-CN': + '

处理数据类型时默认保留两位有效数字,但是当数字较小并设置为百分比类型时,这种方式会导致显示上的问题,例如:

\n', + 'en-US': + '

When processing data types, two valid digits are reserved by default. However, when the number is small and the percentage type is set, this method may cause display problems, for example,

\n' + }, + 'codeFiles': ['question/demo2.vue'] + } + ], + apis: [{ 'name': 'chart-question', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-question.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-question.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-question.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-question.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-question.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-question.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-radar.cn.md b/examples/sites/demos/app/chart/webdoc/chart-radar.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-radar.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-radar.en.md b/examples/sites/demos/app/chart/webdoc/chart-radar.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-radar.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-radar.js b/examples/sites/demos/app/chart/webdoc/chart-radar.js new file mode 100644 index 000000000..5a600ad7a --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-radar.js @@ -0,0 +1,30 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'radar-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['radar/base.vue'] + }, + { + 'demoId': 'radar-demo2', + 'name': { 'zh-CN': '设置显示的指标维度', 'en-US': 'Set the KQI/KPI dimension to be displayed' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['radar/demo2.vue'] + }, + { + 'demoId': 'radar-demo3', + 'name': { 'zh-CN': '修改指标名称', 'en-US': 'Change KQI/KPI Name' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['radar/demo3.vue'] + } + ], + apis: [{ 'name': 'chart-radar', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-radar.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-radar.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-radar.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-radar.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-radar.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-radar.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-ring.cn.md b/examples/sites/demos/app/chart/webdoc/chart-ring.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-ring.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-ring.en.md b/examples/sites/demos/app/chart/webdoc/chart-ring.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-ring.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-ring.js b/examples/sites/demos/app/chart/webdoc/chart-ring.js new file mode 100644 index 000000000..a78e93986 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-ring.js @@ -0,0 +1,54 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'ring-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['ring/base.vue'] + }, + { + 'demoId': 'ring-demo2', + 'name': { 'zh-CN': '设置指标维度', 'en-US': 'Set KQI/KPI Dimension' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['ring/demo2.vue'] + }, + { + 'demoId': 'ring-demo3', + 'name': { 'zh-CN': '玫瑰图', 'en-US': 'Rose' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['ring/demo3.vue'] + }, + { + 'demoId': 'ring-demo4', + 'name': { 'zh-CN': '限制显示条数环图', 'en-US': 'Restrict the number of records to be displayed.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['ring/demo4.vue'] + }, + { + 'demoId': 'ring-demo5', + 'name': { 'zh-CN': '设置数据类型', 'en-US': 'Set Data Type' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['ring/demo5.vue'] + }, + { + 'demoId': 'ring-demo6', + 'name': { 'zh-CN': '设置环图半径', 'en-US': 'Set ring radius' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['ring/demo6.vue'] + }, + { + 'demoId': 'ring-ring-title', + 'name': { 'zh-CN': '设置环图title的位置', 'en-US': 'Set the position of the ring chart title.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['ring/ring-title.vue'] + } + ], + apis: [{ 'name': 'chart-ring', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-ring.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-ring.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-ring.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-ring.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-ring.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-ring.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-sankey.cn.md b/examples/sites/demos/app/chart/webdoc/chart-sankey.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sankey.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-sankey.en.md b/examples/sites/demos/app/chart/webdoc/chart-sankey.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sankey.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-sankey.js b/examples/sites/demos/app/chart/webdoc/chart-sankey.js new file mode 100644 index 000000000..f835e04dc --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sankey.js @@ -0,0 +1,24 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'sankey-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['sankey/base.vue'] + }, + { + 'demoId': 'sankey-demo2', + 'name': { 'zh-CN': '设置数据类型', 'en-US': 'Set Data Type' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['sankey/demo2.vue'] + } + ], + apis: [{ 'name': 'chart-sankey', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-sankey.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-sankey.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sankey.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-sankey.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-sankey.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sankey.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-scatter.cn.md b/examples/sites/demos/app/chart/webdoc/chart-scatter.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-scatter.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-scatter.en.md b/examples/sites/demos/app/chart/webdoc/chart-scatter.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-scatter.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-scatter.js b/examples/sites/demos/app/chart/webdoc/chart-scatter.js new file mode 100644 index 000000000..00e9d84f5 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-scatter.js @@ -0,0 +1,66 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'scatter-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['scatter/base.vue'] + }, + { + 'demoId': 'scatter-demo2', + 'name': { + 'zh-CN': '双维度多指标散点图示例', + 'en-US': 'Example of a two-dimensional multi-indicator scatter chart' + }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['scatter/demo2.vue'] + }, + { + 'demoId': 'scatter-demo3', + 'name': { 'zh-CN': '指标维度配置', 'en-US': 'KQI/KPI Dimension Configuration' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['scatter/demo3.vue'] + }, + { + 'demoId': 'scatter-demo4', + 'name': { 'zh-CN': '数据类型配置', 'en-US': 'Data Type Configuration' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['scatter/demo4.vue'] + }, + { + 'demoId': 'scatter-demo5', + 'name': { 'zh-CN': '属性名配置', 'en-US': 'Attribute Name Configuration' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['scatter/demo5.vue'] + }, + { + 'demoId': 'scatter-demo6', + 'name': { 'zh-CN': '缩放配置', 'en-US': 'Zooming Configuration' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['scatter/demo6.vue'] + }, + { + 'demoId': 'scatter-demo7', + 'name': { 'zh-CN': '散点样式配置', 'en-US': 'Scatter Style Configuration' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['scatter/demo7.vue'] + }, + { + 'demoId': 'scatter-demo8', + 'name': { + 'zh-CN': '散点出现覆盖时, 提示框可以改成通过坐标轴触发', + 'en-US': 'When the scatter is overwritten, the dialog box can be triggered by the coordinate axis.' + }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['scatter/demo8.vue'] + } + ], + apis: [{ 'name': 'chart-scatter', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-scatter.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-scatter.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-scatter.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-scatter.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-scatter.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-scatter.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-sunburst.cn.md b/examples/sites/demos/app/chart/webdoc/chart-sunburst.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sunburst.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-sunburst.en.md b/examples/sites/demos/app/chart/webdoc/chart-sunburst.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sunburst.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-sunburst.js b/examples/sites/demos/app/chart/webdoc/chart-sunburst.js new file mode 100644 index 000000000..4c7109b73 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sunburst.js @@ -0,0 +1,24 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'sunburst-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n
\n

该图只支持 extend 配置,使用方式及属性和 eCharts 一致,请参考 eCharts 配置

\n
\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts. The

\n
\n

diagram supports only the extend configuration. The usage and attributes of the diagram are the same as those of the eCharts. For details, see the

\n
\n configuration of the eCharts' + }, + 'codeFiles': ['sunburst/base.vue'] + }, + { + 'demoId': 'sunburst-demo2', + 'name': { 'zh-CN': '复杂示例', 'en-US': 'Complex Example' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['sunburst/demo2.vue'] + } + ], + apis: [{ 'name': 'chart-sunburst', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-sunburst.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-sunburst.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sunburst.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-sunburst.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-sunburst.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-sunburst.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-tree.cn.md b/examples/sites/demos/app/chart/webdoc/chart-tree.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-tree.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-tree.en.md b/examples/sites/demos/app/chart/webdoc/chart-tree.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-tree.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-tree.js b/examples/sites/demos/app/chart/webdoc/chart-tree.js new file mode 100644 index 000000000..5ac7a058c --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-tree.js @@ -0,0 +1,42 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'tree-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['tree/base.vue'] + }, + { + 'demoId': 'tree-demo2', + 'name': { 'zh-CN': '多树图', 'en-US': 'Multi-Tree' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['tree/demo2.vue'] + }, + { + 'demoId': 'tree-demo3', + 'name': { 'zh-CN': '径向树图', 'en-US': 'Radial Tree' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['tree/demo3.vue'] + }, + { + 'demoId': 'tree-demo4', + 'name': { 'zh-CN': '纵向树图', 'en-US': 'Longitudinal tree view' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['tree/demo4.vue'] + }, + { + 'demoId': 'tree-demo5', + 'name': { 'zh-CN': '自定义提示框内容', 'en-US': 'Customized dialog box content' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['tree/demo5.vue'] + } + ], + apis: [{ 'name': 'chart-tree', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-tree.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-tree.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-tree.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-tree.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-tree.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-tree.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-waterfall.cn.md b/examples/sites/demos/app/chart/webdoc/chart-waterfall.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-waterfall.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-waterfall.en.md b/examples/sites/demos/app/chart/webdoc/chart-waterfall.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-waterfall.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-waterfall.js b/examples/sites/demos/app/chart/webdoc/chart-waterfall.js new file mode 100644 index 000000000..549d85679 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-waterfall.js @@ -0,0 +1,42 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'waterfall-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['waterfall/base.vue'] + }, + { + 'demoId': 'waterfall-demo2', + 'name': { 'zh-CN': '设置指标维度', 'en-US': 'Set KQI/KPI Dimension' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['waterfall/demo2.vue'] + }, + { + 'demoId': 'waterfall-demo3', + 'name': { 'zh-CN': '设置数据类型', 'en-US': 'Set Data Type' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['waterfall/demo3.vue'] + }, + { + 'demoId': 'waterfall-demo4', + 'name': { 'zh-CN': '修改指标名称', 'en-US': 'Change Indicator Name' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['waterfall/demo4.vue'] + }, + { + 'demoId': 'waterfall-demo5', + 'name': { 'zh-CN': '设置 总计、剩余 的名称', 'en-US': 'Set the total and remaining names' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['waterfall/demo5.vue'] + } + ], + apis: [{ 'name': 'chart-waterfall', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-waterfall.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-waterfall.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-waterfall.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-waterfall.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-waterfall.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-waterfall.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-wordcloud.cn.md b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.cn.md new file mode 100644 index 000000000..98871a548 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-wordcloud.en.md b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart-wordcloud.js b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.js new file mode 100644 index 000000000..82686a722 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.js @@ -0,0 +1,36 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'wordcloud-base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。

\n', + 'en-US': + '

can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts.

\n' + }, + 'codeFiles': ['wordcloud/base.vue'] + }, + { + 'demoId': 'wordcloud-demo2', + 'name': { 'zh-CN': '设置词云图的颜色', 'en-US': 'Set the color of the word cloud map' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['wordcloud/demo2.vue'] + }, + { + 'demoId': 'wordcloud-demo3', + 'name': { 'zh-CN': '设置词云图的形状', 'en-US': 'Set the shape of the word cloud map' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['wordcloud/demo3.vue'] + }, + { + 'demoId': 'wordcloud-demo4', + 'name': { 'zh-CN': '设置词云图的字体大小范围', 'en-US': 'Set the font size range of the word cloud map' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['wordcloud/demo4.vue'] + } + ], + apis: [{ 'name': 'chart-wordcloud', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/chart/webdoc/chart-wordcloud.json.cn.md b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.json.cn.md new file mode 100644 index 000000000..eba39ee7b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.json.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 eCharts 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart-wordcloud.json.en.md b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.json.en.md new file mode 100644 index 000000000..49b1f3f4e --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart-wordcloud.json.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
Encapsulated based on eCharts, a pure Javascript chart library.
diff --git a/examples/sites/demos/app/chart/webdoc/chart.cn.md b/examples/sites/demos/app/chart/webdoc/chart.cn.md new file mode 100644 index 000000000..99d83b51b --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart.cn.md @@ -0,0 +1,7 @@ +--- +title: Chart 图表 +--- + +# Chart 图表 + +
基于 `eCharts v5.2.1` 封装,一个纯 Javascript 的图表库。
diff --git a/examples/sites/demos/app/chart/webdoc/chart.en.md b/examples/sites/demos/app/chart/webdoc/chart.en.md new file mode 100644 index 000000000..993300be9 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart.en.md @@ -0,0 +1,7 @@ +--- +title: Chart +--- + +# Chart + +
A pure JavaScript chart library encapsulated based on `eCharts v5.2.1`.
diff --git a/examples/sites/demos/app/chart/webdoc/chart.js b/examples/sites/demos/app/chart/webdoc/chart.js new file mode 100644 index 000000000..be20ac6d8 --- /dev/null +++ b/examples/sites/demos/app/chart/webdoc/chart.js @@ -0,0 +1,178 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

图表组件支持 双向数据绑定,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE 9/10/11,Chrome,Firefox,Safari 等)底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。\n可通过 theme 自定义主题\n百度地图和高德地图需要外网访问权限才能正常使用\n

\n', + 'en-US': + '

The chart component supports bidirectional data binding, which can run smoothly on PCs and mobile devices and is compatible with most browsers. (Internet Explorer 9/10/11, Chrome, Firefox, Safari, etc.) The bottom layer relies on the lightweight Canvas class library ZRender to provide intuitive, vivid, interactive, and highly personalized data visualization charts. \nYou can use theme to customize themes. \nBaidu Maps and AutoNavi Maps require external network access. \n

\n' + }, + 'codeFiles': ['base.vue'] + } + ], + apis: [ + { + 'name': 'chart', + 'type': 'component', + 'properties': [ + { + 'name': 'data ', + 'type': 'Object ', + 'defaultValue': '', + 'desc': { + 'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准', + 'en-US': + 'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.' + }, + 'demoId': 'chart/attributes-demo#props-demo10' + }, + { + 'name': 'settings ', + 'type': 'Object ', + 'defaultValue': '', + 'desc': { + 'zh-CN': '配置项,各图表 Settings 属性配置请查阅各图表详情页面', + 'en-US': 'Configuration item. For details about the attributes of each chart, see the chart details page.' + }, + 'demoId': '' + }, + { + 'name': 'width', + 'type': 'String', + 'defaultValue': '该属性的默认值为 auto', + 'desc': { 'zh-CN': '设置图表容器的宽度。', 'en-US': 'Set the width of the chart container.' }, + 'demoId': 'chart/attributes-demo#props-demo10' + }, + { + 'name': 'height', + 'type': 'String', + 'defaultValue': '该属性的默认值为 400px', + 'desc': { 'zh-CN': '设置图表容器的高度。', 'en-US': 'Set the height of the chart container.' }, + 'demoId': 'chart/attributes-demo#props-demo10' + }, + { + 'name': 'events', + 'type': 'Object', + 'defaultValue': '', + 'desc': { 'zh-CN': '事件绑定', 'en-US': 'Event binding' }, + 'demoId': 'chart/events#events-base' + }, + { + 'name': 'init-options', + 'type': 'Object', + 'defaultValue': '', + 'desc': { 'zh-CN': 'init 附加参数', 'en-US': 'Init Additional Parameters' }, + 'demoId': 'chart/attributes-demo#props-demo10' + }, + { + 'name': 'tooltip-visible', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否显示提示框', 'en-US': 'Display dialog box' }, + 'demoId': 'chart/attributes-demo#props-demo10' + }, + { + 'name': 'legend-visible', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否显示图例', 'en-US': 'Display legend' }, + 'demoId': 'chart/attributes-demo#props-demo10' + }, + { + 'name': 'theme', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义主题名称。;自定义主题对象。', + 'en-US': 'User-defined theme name. ;User-defined theme object.' + }, + 'demoId': 'chart#base' + }, + { + 'name': 'theme-name', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义主题名称,如果设置了theme-name,则theme无效', + 'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.' + }, + 'demoId': 'chart#base' + }, + { + 'name': 'judge-width', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '是否处理生成图表时的宽度问题', + 'en-US': 'Do you want to process the width issue when generating charts?' + }, + 'demoId': 'chart/events#events-base' + }, + { + 'name': 'width-change-delay', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 300', + 'desc': { 'zh-CN': '容器宽度变化的延迟', 'en-US': 'Container width change delay' }, + 'demoId': 'chart/question#question-base' + }, + { + 'name': 'resizeable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否处理窗口 resize 事件', 'en-US': 'Whether to process the window resize event' }, + 'demoId': 'chart/question#question-base' + }, + { + 'name': 'cancel-resize-check', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '是否禁用 resize 时的容器检测', + 'en-US': 'Whether to disable container detection during resize' + }, + 'demoId': 'chart/question#question-base' + }, + { + 'name': 'resize-delay', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 200', + 'desc': { 'zh-CN': '窗口 resize 事件回调的延迟', 'en-US': 'Delay of the window resize event callback' }, + 'demoId': 'chart/attributes-demo#props-demo10' + }, + { + 'name': 'change-delay', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 0', + 'desc': { + 'zh-CN': '属性修改触发图表重绘回调的延迟', + 'en-US': 'Delay for triggering chart redrawing callback after attribute modification' + }, + 'demoId': 'chart/question#question-base' + }, + { + 'name': 'set-option-opts', + 'type': 'Boolean , Object', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': 'echarts setOption 的第二个参数', 'en-US': 'Echarts setOption second parameter' }, + 'demoId': '' + }, + { + 'name': 'not-set-unchange', + 'type': 'Array', + 'defaultValue': '', + 'desc': { + 'zh-CN': '未发生变化时不参加 setOption 的属性', + 'en-US': 'The setOption attribute does not change.' + }, + 'demoId': '' + } + ], + 'events': [], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/chart/wordcloud/base-composition-api.vue b/examples/sites/demos/app/chart/wordcloud/base-composition-api.vue new file mode 100644 index 000000000..be7bad951 --- /dev/null +++ b/examples/sites/demos/app/chart/wordcloud/base-composition-api.vue @@ -0,0 +1,159 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/wordcloud/base.vue b/examples/sites/demos/app/chart/wordcloud/base.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/wordcloud/base.vue rename to examples/sites/demos/app/chart/wordcloud/base.vue diff --git a/examples/sites/demos/app/chart/wordcloud/demo2-composition-api.vue b/examples/sites/demos/app/chart/wordcloud/demo2-composition-api.vue new file mode 100644 index 000000000..e53e4eff8 --- /dev/null +++ b/examples/sites/demos/app/chart/wordcloud/demo2-composition-api.vue @@ -0,0 +1,162 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/wordcloud/demo2.vue b/examples/sites/demos/app/chart/wordcloud/demo2.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/wordcloud/demo2.vue rename to examples/sites/demos/app/chart/wordcloud/demo2.vue diff --git a/examples/sites/demos/app/chart/wordcloud/demo3-composition-api.vue b/examples/sites/demos/app/chart/wordcloud/demo3-composition-api.vue new file mode 100644 index 000000000..6a1482473 --- /dev/null +++ b/examples/sites/demos/app/chart/wordcloud/demo3-composition-api.vue @@ -0,0 +1,162 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/wordcloud/demo3.vue b/examples/sites/demos/app/chart/wordcloud/demo3.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/wordcloud/demo3.vue rename to examples/sites/demos/app/chart/wordcloud/demo3.vue diff --git a/examples/sites/demos/app/chart/wordcloud/demo4-composition-api.vue b/examples/sites/demos/app/chart/wordcloud/demo4-composition-api.vue new file mode 100644 index 000000000..f4578ba57 --- /dev/null +++ b/examples/sites/demos/app/chart/wordcloud/demo4-composition-api.vue @@ -0,0 +1,163 @@ + + + diff --git a/examples/docs/resources/pc/demo/chart/wordcloud/demo4.vue b/examples/sites/demos/app/chart/wordcloud/demo4.vue similarity index 100% rename from examples/docs/resources/pc/demo/chart/wordcloud/demo4.vue rename to examples/sites/demos/app/chart/wordcloud/demo4.vue diff --git a/examples/sites/demos/app/checkbox/basic-usage-composition-api.vue b/examples/sites/demos/app/checkbox/basic-usage-composition-api.vue new file mode 100644 index 000000000..fa712f24a --- /dev/null +++ b/examples/sites/demos/app/checkbox/basic-usage-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/basic-usage.spec.ts b/examples/sites/demos/app/checkbox/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/basic-usage.spec.ts rename to examples/sites/demos/app/checkbox/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/basic-usage.vue b/examples/sites/demos/app/checkbox/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/basic-usage.vue rename to examples/sites/demos/app/checkbox/basic-usage.vue diff --git a/examples/docs/resources/pc/demo/checkbox/button-check-box.spec.ts b/examples/sites/demos/app/checkbox/button-check-box.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/button-check-box.spec.ts rename to examples/sites/demos/app/checkbox/button-check-box.spec.ts diff --git a/examples/sites/demos/app/checkbox/button-chek-box-composition-api.vue b/examples/sites/demos/app/checkbox/button-chek-box-composition-api.vue new file mode 100644 index 000000000..4721de8e4 --- /dev/null +++ b/examples/sites/demos/app/checkbox/button-chek-box-composition-api.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/button-chek-box.vue b/examples/sites/demos/app/checkbox/button-chek-box.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/button-chek-box.vue rename to examples/sites/demos/app/checkbox/button-chek-box.vue diff --git a/examples/sites/demos/app/checkbox/checkbox-button-composition-api.vue b/examples/sites/demos/app/checkbox/checkbox-button-composition-api.vue new file mode 100644 index 000000000..262aabbe3 --- /dev/null +++ b/examples/sites/demos/app/checkbox/checkbox-button-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/sites/demos/app/checkbox/checkbox-button-multiple-composition-api.vue b/examples/sites/demos/app/checkbox/checkbox-button-multiple-composition-api.vue new file mode 100644 index 000000000..4d302fdf8 --- /dev/null +++ b/examples/sites/demos/app/checkbox/checkbox-button-multiple-composition-api.vue @@ -0,0 +1,15 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-button-multiple.spec.ts b/examples/sites/demos/app/checkbox/checkbox-button-multiple.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-button-multiple.spec.ts rename to examples/sites/demos/app/checkbox/checkbox-button-multiple.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-button-multiple.vue b/examples/sites/demos/app/checkbox/checkbox-button-multiple.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-button-multiple.vue rename to examples/sites/demos/app/checkbox/checkbox-button-multiple.vue diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-button.spec.ts b/examples/sites/demos/app/checkbox/checkbox-button.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-button.spec.ts rename to examples/sites/demos/app/checkbox/checkbox-button.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-button.vue b/examples/sites/demos/app/checkbox/checkbox-button.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-button.vue rename to examples/sites/demos/app/checkbox/checkbox-button.vue diff --git a/examples/sites/demos/app/checkbox/checkbox-events-composition-api.vue b/examples/sites/demos/app/checkbox/checkbox-events-composition-api.vue new file mode 100644 index 000000000..6d43f613b --- /dev/null +++ b/examples/sites/demos/app/checkbox/checkbox-events-composition-api.vue @@ -0,0 +1,21 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-events.spec.ts b/examples/sites/demos/app/checkbox/checkbox-events.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-events.spec.ts rename to examples/sites/demos/app/checkbox/checkbox-events.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-events.vue b/examples/sites/demos/app/checkbox/checkbox-events.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-events.vue rename to examples/sites/demos/app/checkbox/checkbox-events.vue diff --git a/examples/sites/demos/app/checkbox/checkbox-group-composition-api.vue b/examples/sites/demos/app/checkbox/checkbox-group-composition-api.vue new file mode 100644 index 000000000..0b1412b71 --- /dev/null +++ b/examples/sites/demos/app/checkbox/checkbox-group-composition-api.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-group.spec.ts b/examples/sites/demos/app/checkbox/checkbox-group.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-group.spec.ts rename to examples/sites/demos/app/checkbox/checkbox-group.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-group.vue b/examples/sites/demos/app/checkbox/checkbox-group.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-group.vue rename to examples/sites/demos/app/checkbox/checkbox-group.vue diff --git a/examples/sites/demos/app/checkbox/checkbox-slot-composition-api.vue b/examples/sites/demos/app/checkbox/checkbox-slot-composition-api.vue new file mode 100644 index 000000000..1351b26c2 --- /dev/null +++ b/examples/sites/demos/app/checkbox/checkbox-slot-composition-api.vue @@ -0,0 +1,21 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-slot.spec.ts b/examples/sites/demos/app/checkbox/checkbox-slot.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-slot.spec.ts rename to examples/sites/demos/app/checkbox/checkbox-slot.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/checkbox-slot.vue b/examples/sites/demos/app/checkbox/checkbox-slot.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checkbox-slot.vue rename to examples/sites/demos/app/checkbox/checkbox-slot.vue diff --git a/examples/sites/demos/app/checkbox/checked-composition-api.vue b/examples/sites/demos/app/checkbox/checked-composition-api.vue new file mode 100644 index 000000000..77dd11731 --- /dev/null +++ b/examples/sites/demos/app/checkbox/checked-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/checked.spec.ts b/examples/sites/demos/app/checkbox/checked.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checked.spec.ts rename to examples/sites/demos/app/checkbox/checked.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/checked.vue b/examples/sites/demos/app/checkbox/checked.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/checked.vue rename to examples/sites/demos/app/checkbox/checked.vue diff --git a/examples/sites/demos/app/checkbox/content-overflow-composition-api.vue b/examples/sites/demos/app/checkbox/content-overflow-composition-api.vue new file mode 100644 index 000000000..afb40c745 --- /dev/null +++ b/examples/sites/demos/app/checkbox/content-overflow-composition-api.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/checkbox/content-overflow.spec.ts b/examples/sites/demos/app/checkbox/content-overflow.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/content-overflow.spec.ts rename to examples/sites/demos/app/checkbox/content-overflow.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/content-overflow.vue b/examples/sites/demos/app/checkbox/content-overflow.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/content-overflow.vue rename to examples/sites/demos/app/checkbox/content-overflow.vue diff --git a/examples/sites/demos/app/checkbox/dynamic-create-checkbox-composition-api.vue b/examples/sites/demos/app/checkbox/dynamic-create-checkbox-composition-api.vue new file mode 100644 index 000000000..c87ab213b --- /dev/null +++ b/examples/sites/demos/app/checkbox/dynamic-create-checkbox-composition-api.vue @@ -0,0 +1,57 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/dynamic-create-checkbox.spec.ts b/examples/sites/demos/app/checkbox/dynamic-create-checkbox.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/dynamic-create-checkbox.spec.ts rename to examples/sites/demos/app/checkbox/dynamic-create-checkbox.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/dynamic-create-checkbox.vue b/examples/sites/demos/app/checkbox/dynamic-create-checkbox.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/dynamic-create-checkbox.vue rename to examples/sites/demos/app/checkbox/dynamic-create-checkbox.vue diff --git a/examples/sites/demos/app/checkbox/group-options-composition-api.vue b/examples/sites/demos/app/checkbox/group-options-composition-api.vue new file mode 100644 index 000000000..1790c4fcf --- /dev/null +++ b/examples/sites/demos/app/checkbox/group-options-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/group-options.spec.ts b/examples/sites/demos/app/checkbox/group-options.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/group-options.spec.ts rename to examples/sites/demos/app/checkbox/group-options.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/group-options.vue b/examples/sites/demos/app/checkbox/group-options.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/group-options.vue rename to examples/sites/demos/app/checkbox/group-options.vue diff --git a/examples/sites/demos/app/checkbox/indeterminate-composition-api.vue b/examples/sites/demos/app/checkbox/indeterminate-composition-api.vue new file mode 100644 index 000000000..6b4aa2d98 --- /dev/null +++ b/examples/sites/demos/app/checkbox/indeterminate-composition-api.vue @@ -0,0 +1,38 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/indeterminate.spec.ts b/examples/sites/demos/app/checkbox/indeterminate.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/indeterminate.spec.ts rename to examples/sites/demos/app/checkbox/indeterminate.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/indeterminate.vue b/examples/sites/demos/app/checkbox/indeterminate.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/indeterminate.vue rename to examples/sites/demos/app/checkbox/indeterminate.vue diff --git a/examples/sites/demos/app/checkbox/min-max-composition-api.vue b/examples/sites/demos/app/checkbox/min-max-composition-api.vue new file mode 100644 index 000000000..5f5ce5ecf --- /dev/null +++ b/examples/sites/demos/app/checkbox/min-max-composition-api.vue @@ -0,0 +1,15 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/min-max.spec.ts b/examples/sites/demos/app/checkbox/min-max.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/min-max.spec.ts rename to examples/sites/demos/app/checkbox/min-max.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/min-max.vue b/examples/sites/demos/app/checkbox/min-max.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/min-max.vue rename to examples/sites/demos/app/checkbox/min-max.vue diff --git a/examples/sites/demos/app/checkbox/text-composition-api.vue b/examples/sites/demos/app/checkbox/text-composition-api.vue new file mode 100644 index 000000000..5be56e135 --- /dev/null +++ b/examples/sites/demos/app/checkbox/text-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/text.spec.ts b/examples/sites/demos/app/checkbox/text.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/text.spec.ts rename to examples/sites/demos/app/checkbox/text.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/text.vue b/examples/sites/demos/app/checkbox/text.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/text.vue rename to examples/sites/demos/app/checkbox/text.vue diff --git a/examples/sites/demos/app/checkbox/vertical-checkbox-composition-api.vue b/examples/sites/demos/app/checkbox/vertical-checkbox-composition-api.vue new file mode 100644 index 000000000..c72aecfca --- /dev/null +++ b/examples/sites/demos/app/checkbox/vertical-checkbox-composition-api.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/docs/resources/pc/demo/checkbox/vertical-checkbox.spec.ts b/examples/sites/demos/app/checkbox/vertical-checkbox.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/vertical-checkbox.spec.ts rename to examples/sites/demos/app/checkbox/vertical-checkbox.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/vertical-checkbox.vue b/examples/sites/demos/app/checkbox/vertical-checkbox.vue similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/vertical-checkbox.vue rename to examples/sites/demos/app/checkbox/vertical-checkbox.vue diff --git a/examples/sites/demos/app/checkbox/webdoc/checkbox.cn.md b/examples/sites/demos/app/checkbox/webdoc/checkbox.cn.md new file mode 100644 index 000000000..f84697ebf --- /dev/null +++ b/examples/sites/demos/app/checkbox/webdoc/checkbox.cn.md @@ -0,0 +1,7 @@ +--- +title: Checkbox 复选框 +--- + +# Checkbox 复选框 + +
用于配置不同场景的选项,提供用户可在一组选项中进行多选。
diff --git a/examples/sites/demos/app/checkbox/webdoc/checkbox.en.md b/examples/sites/demos/app/checkbox/webdoc/checkbox.en.md new file mode 100644 index 000000000..f6881b300 --- /dev/null +++ b/examples/sites/demos/app/checkbox/webdoc/checkbox.en.md @@ -0,0 +1,7 @@ +--- +title: Checkbox check box +--- + +# Checkbox check box + +
Used to configure options for different scenarios. Users can select multiple options from a group of options.
diff --git a/examples/sites/demos/app/checkbox/webdoc/checkbox.js b/examples/sites/demos/app/checkbox/webdoc/checkbox.js new file mode 100644 index 000000000..ce924253d --- /dev/null +++ b/examples/sites/demos/app/checkbox/webdoc/checkbox.js @@ -0,0 +1,481 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'checkbox-group', + 'name': { 'zh-CN': '复选框组和垂直复选框组', 'en-US': 'Checkbox Group and Vertical Checkbox Group' }, + 'desc': { + 'zh-CN': + '

通过 checkbox-group 元素把多个 checkbox 元素管理为一组,在 checkbox-group 中使用 v-model 绑定 Array 类型的变量即可实现双向绑定。 checkboxlabel 属性是其对应的值,若该标签中无内容,则该属性也充当 checkbox 后的介绍。label 与数组中的元素值相对应,如果存在指定的值则为选中状态,否则为不选中。

\n', + 'en-US': + '

Manages multiple checkbox elements into a group through the checkbox-group element. In checkbox-group, use v-model to bind variables of the Array type to implement bidirectional binding. The label attribute of the checkbox is its corresponding value. If there is no content in the tag, the attribute also serves as the introduction after the checkbox. label corresponds to the element value in the array. If the specified value exists, the value is selected. Otherwise, the value is not selected.

\n' + }, + 'codeFiles': ['checkbox-group.vue'] + }, + { + 'demoId': 'group-options', + 'name': { 'zh-CN': '配置式复选框组', 'en-US': 'Profile Checkbox Group' }, + 'desc': { + 'zh-CN': + '

提供 options 属性,支持通过配置对象数组数据的形式来渲染多选框组。使用该属性后,可以不用再在标签中以插槽的形式插入 checkboxcheckbox-button 元素。\n\noptions 对象数组中包括三个字段:labeltextevents。\n\n另外还提供 type 属性,配合 options 属性一起使用,默认值为 checkbox。还可以配置为 button,配置后复选框组将以按钮的形式展示。

\n', + 'en-US': + '

Provides the options attribute. You can render a check box group by configuring object array data. With this attribute, you no longer need to insert the checkbox or checkbox-button element as a slot in the tag. \n\nThe options object array contains three fields: label, text, and events. \n\n The type attribute is also provided, which is used with the options attribute. The default value is checkbox. You can also set this parameter to button. After the configuration, the check box group is displayed as a button.

\n' + }, + 'codeFiles': ['group-options.vue'] + }, + { + 'demoId': 'indeterminate', + 'name': { 'zh-CN': '全选与半选', 'en-US': 'All and Half' }, + 'desc': { + 'zh-CN': + '

checkbox 元素中配置 indeterminate 属性为 true 后,勾选框将展示为半选的样式。

\n', + 'en-US': + '

After the indeterminate attribute is set to true in the checkbox element, the check box is displayed as half-selected.

\n' + }, + 'codeFiles': ['indeterminate.vue'] + }, + { + 'demoId': 'min-max', + 'name': { 'zh-CN': '可选数量限制', 'en-US': 'Quantity Limit' }, + 'desc': { + 'zh-CN': + '

checkbox-group 上可通过 minmax 属性指定可勾选项目的最小、最大值。

\n', + 'en-US': + '

On the checkbox-group, the min and max attributes can be used to specify the minimum and maximum values of the options that can be selected.

\n' + }, + 'codeFiles': ['min-max.vue'] + }, + { + 'demoId': 'checked', + 'name': { 'zh-CN': '当前是否勾选', 'en-US': 'Currently selected' }, + 'desc': { + 'zh-CN': '

checked 当前是否勾选,通过 disabled 设置组件是否禁用。

\n', + 'en-US': + '

Whether to select checked. You can set disabled to disable the component.

\n' + }, + 'codeFiles': ['checked.vue'] + }, + { + 'demoId': 'checkbox-button', + 'name': { 'zh-CN': '按钮形式复选框', 'en-US': 'button form check box' }, + 'desc': { + 'zh-CN': + '

checkbox-group 元素中嵌入 checkbox-button 即可实现按钮形式的复选框组。\n通过 fill 按钮形式的 Checkbox 激活时的填充色和边框色,默认值为:#409EFF。

\n', + 'en-US': + '

Embed checkbox-button into the checkbox-group element to implement a checkbox group in the form of a button. \n Fill color and border color when the checkbox is activated by pressing the fill button. The default value is #409EFF.

\n' + }, + 'codeFiles': ['checkbox-button.vue'] + }, + { + 'demoId': 'vertical-checkbox', + 'name': { 'zh-CN': '垂直布局', 'en-US': 'vertical layout' }, + 'desc': { + 'zh-CN': + '

checkbox-group 元素上设置 vertical 为 true,则其管理的 checkbox-buttoncheckbox 将展示为垂直布局。

\n', + 'en-US': + '

Set vertical to true on the checkbox-group element, The checkbox-button or checkbox managed by it is displayed as a vertical layout.

\n' + }, + 'codeFiles': ['vertical-checkbox.vue'] + }, + { + 'demoId': 'dynamic-create-checkbox', + 'name': { 'zh-CN': '动态生成复选框组', 'en-US': 'Dynamicly generate check box groups' }, + 'desc': { + 'zh-CN': '

复选框组所需数据可通过请求服务从后台取得,然后动态生成。

\n', + 'en-US': + '

The data required by the check box group can be obtained from the background through the request service and then dynamically generated.

\n' + }, + 'codeFiles': ['dynamic-create-checkbox.vue'] + }, + { + 'demoId': 'content-overflow', + 'name': { 'zh-CN': '内容超出时的提示信息', 'en-US': 'Prompt message when the content exceeds the upper limit' }, + 'desc': { + 'zh-CN': + '

若复选框后的介绍文字超出时,可以通过 Tooltip 组件增加提示信息,鼠标悬停时可提示所有内容。\n\n在 checkbox 元素上配置 border 属性为 true,可显示边框。

\n', + 'en-US': + '

If the introduction text next to the check box exceeds the limit, you can use the Tooltip component to add a prompt. When you hover the cursor over the tooltip component, you can prompt all the contents. \n\n Set the border attribute to true on the checkbox element to display the border.

\n' + }, + 'codeFiles': ['content-overflow.vue'] + }, + { + 'demoId': 'text', + 'name': { 'zh-CN': '文本', 'en-US': 'Text' }, + 'desc': { + 'zh-CN': + '

text 属性设置文本内容\n通过 true-label 设置选中的值, false-label 设置未选中的值。

\n', + 'en-US': + '

Set the text content in the text attribute.\nUse true-label to set the selected value, and false-label to set the unselected value.

\n' + }, + 'codeFiles': ['text.vue'] + }, + { + 'demoId': 'button-chek-box', + 'name': { 'zh-CN': '文本选择', 'en-US': 'Text Selection' }, + 'desc': { + 'zh-CN': '

通过 true-label 设置选中的值, false-label 设置未选中的值。

\n', + 'en-US': + '

uses true-label to set the selected value and false-label to set the unselected value.

\n' + }, + 'codeFiles': ['button-chek-box.vue'] + }, + { + 'demoId': 'with-border', + 'name': { 'zh-CN': '尺寸', 'en-US': 'Dimension' }, + 'desc': { + 'zh-CN': + '

当复选框为按钮形式时,通过 size 属性可以设置按钮复选框的尺寸,可选项有 medium、small、mini。\n\n在 checkbox-button 上设置 disabled 属性,将禁用某一个复选按钮,若在 checkbox-group 标签上配置 disabled 属性,则禁用所有复选按钮。

\n', + 'en-US': + '

When the check box is a button, you can set the size of the button through the size attribute. The options are medium, small, and mini. \n\n Setting the disabled property on checkbox-button will disable a check button. If the disabled attribute is configured on the checkbox-group tab, all check buttons are disabled.

\n' + }, + 'codeFiles': ['with-border.vue'] + }, + { + 'demoId': 'checkbox-events', + 'name': { 'zh-CN': '事件', 'en-US': 'Event' }, + 'desc': { + 'zh-CN': '

勾选值改变后将触发 change 事件。

\n', + 'en-US': '

The change event is triggered when the value of the check box is changed.

\n' + }, + 'codeFiles': ['checkbox-events.vue'] + }, + { + 'demoId': 'checkbox-slot', + 'name': { 'zh-CN': '插槽', 'en-US': 'Slot' }, + 'desc': { + 'zh-CN': '

Checkbox 的内容

\n', + 'en-US': + '

Multi-line button group, after exceeding the maximum width, it will be displayed in a new line.

\n' + }, + 'codeFiles': ['checkbox-slot.vue'] + }, + { + 'demoId': 'checkbox-button-multiple', + 'name': { 'zh-CN': '多行按钮', 'en-US': 'Checkbox Button Multiple' }, + 'desc': { + 'zh-CN': '

多行按钮组,超出最大宽度后,换行显示

\n', + 'en-US': '

Checkbox button multiple

\n' + }, + 'codeFiles': ['checkbox-button-multiple.vue'] + } + ], + apis: [ + { + 'name': 'checkbox', + 'type': 'component', + 'properties': [ + { + 'name': 'modelValue / v-model', + 'type': 'String , Number , Boolean', + 'defaultValue': '', + 'desc': { 'zh-CN': '绑定值', 'en-US': 'Bound Value' }, + 'demoId': 'checkbox-group' + }, + { + 'name': 'label', + 'type': 'String , Number , Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '选中状态的值(只有在checkbox-group或者绑定对象类型为array时有效)', + 'en-US': + 'Selected value (This parameter is valid only when checkbox-group or the bound object type is array.)' + }, + 'demoId': 'indeterminate' + }, + { + 'name': 'true-label', + 'type': 'String , Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '选中时的值', 'en-US': 'Value when selected' }, + 'demoId': 'text' + }, + { + 'name': 'false-label', + 'type': 'String , Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '没有选中时的值', 'en-US': 'Value when no option is selected' }, + 'demoId': 'text' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否禁用', 'en-US': 'Disable' }, + 'demoId': 'checked' + }, + { + 'name': 'border', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否显示边框', 'en-US': 'Display border' }, + 'demoId': 'content-overflow' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'Checkbox 的尺寸,仅在 border 为真时有效;该属性的可选值为 medium / small / mini', + 'en-US': + 'Checkbox size. This parameter is valid only when border is set to true. The optional values of this attribute are medium / small / mini' + }, + 'demoId': 'with-border' + }, + { + 'name': 'name', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '原生 name 属性', 'en-US': 'Native name attribute' }, + 'demoId': 'checkbox-group' + }, + { + 'name': 'checked', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '当前是否勾选', 'en-US': 'Currently selected' }, + 'demoId': 'checked' + }, + { + 'name': 'indeterminate', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '设置 indeterminate 状态,只负责样式控制', + 'en-US': 'Sets the indeterminate state and controls only the style.' + }, + 'demoId': 'indeterminate' + }, + { + 'name': 'text', + 'type': 'String', + 'defaultValue': '该属性的默认值为空', + 'desc': { 'zh-CN': '复选框显示的文本', 'en-US': 'Text displayed in the check box' }, + 'demoId': 'text' + } + ], + 'events': [ + { + 'name': 'change', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当绑定值变化时触发的事件', + 'en-US': 'This event is triggered when the binding value changes.' + }, + 'demoId': 'checkbox-events' + } + ], + 'slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': 'Checkbox的内容', 'en-US': 'Checkbox content' }, + 'demoId': 'checkbox-slot' + } + ], + 'checkbox-button-attrs': [ + { + 'name': 'label', + 'type': 'String , Number , Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '选中状态的值(只有在checkbox-group或者绑定对象类型为array时有效);该属性的可选值为 medium-', + 'en-US': + 'Value in the selected state (This parameter is valid only when checkbox-group or the bound object type is array.) The optional value of this attribute is medium-' + }, + 'demoId': 'checkbox-group' + }, + { + 'name': 'true-label', + 'type': 'String , Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '选中时的值', 'en-US': 'Value when selected' }, + 'demoId': 'text' + }, + { + 'name': 'false-label', + 'type': 'String , Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '没有选中时的值', 'en-US': 'Value when no option is selected' }, + 'demoId': 'text' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否禁用', 'en-US': 'Disable' }, + 'demoId': 'with-border' + }, + { + 'name': 'name', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '原生 name 属性', 'en-US': 'Native name attribute' }, + 'demoId': 'checkbox-group' + }, + { + 'name': 'text', + 'type': 'String', + 'defaultValue': '该属性的默认值为 Function', + 'desc': { 'zh-CN': '文本', 'en-US': 'Text' }, + 'demoId': 'text' + }, + { + 'name': 'modelValue / v-model', + 'type': 'String , Number , Boolean', + 'defaultValue': '', + 'desc': { 'zh-CN': '绑定值', 'en-US': 'Bound Value' }, + 'demoId': 'checkbox-button' + }, + { + 'name': 'events', + 'type': 'Object', + 'defaultValue': '', + 'desc': { 'zh-CN': '原生事件', 'en-US': 'Native event' }, + 'demoId': 'checkbox-group' + }, + { + 'name': 'checked', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '当前是否勾选', 'en-US': 'Currently selected' }, + 'demoId': 'checkbox-button' + } + ], + 'checkbox-button-slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': 'Checkbox-button的内容', 'en-US': 'Checkbox-button content' }, + 'demoId': 'with-border' + } + ], + 'checkbox-group-attrs': [ + { + 'name': 'modelValue / v-model', + 'type': 'Array', + 'defaultValue': '', + 'desc': { 'zh-CN': '绑定值', 'en-US': 'Bound Value' }, + 'demoId': 'checkbox-group' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '多选框组尺寸,仅对按钮形式的 Checkbox 或带有边框的 Checkbox 有效;该属性的可选值为 medium / small / mini', + 'en-US': + 'Size of the check box group. This parameter is valid only for the check box with buttons or borders. The optional values of this attribute are medium / small / mini' + }, + 'demoId': 'with-border' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否禁用', 'en-US': 'Disable' }, + 'demoId': 'with-border' + }, + { + 'name': 'min', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '可被勾选的 checkbox 的最小数量', + 'en-US': 'Minimum number of checkboxes that can be selected' + }, + 'demoId': 'min-max' + }, + { + 'name': 'max', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '可被勾选的 checkbox 的最大数量', + 'en-US': 'Maximum number of checkboxes that can be selected' + }, + 'demoId': 'min-max' + }, + { + 'name': 'text-color', + 'type': 'String', + 'defaultValue': '该属性的默认值为 #ffffff', + 'desc': { + 'zh-CN': '按钮形式的 Checkbox 激活时的文本颜色', + 'en-US': 'Text color when the checkbox in button mode is activated' + }, + 'demoId': 'vertical-checkbox' + }, + { + 'name': 'fill', + 'type': 'String', + 'defaultValue': '该属性的默认值为 #409EFF', + 'desc': { + 'zh-CN': '按钮形式的 Checkbox 激活时的填充色和边框色', + 'en-US': 'Fill color and border color when the checkbox in button mode is activated' + }, + 'demoId': 'checkbox-button' + }, + { + 'name': 'options', + 'type': 'Array', + 'defaultValue': '', + 'desc': { 'zh-CN': 'checkbox组件列表', 'en-US': 'Checkbox component list' }, + 'demoId': 'checkbox-group' + }, + { + 'name': 'type', + 'type': 'String', + 'defaultValue': '该属性的默认值为 checkbox,配合 options 属性一起使用', + 'desc': { + 'zh-CN': ' checkbox组件类型(button/checkbox)', + 'en-US': 'Checkbox component type (button/checkbox)' + }, + 'demoId': 'checkbox-group' + }, + { + 'name': 'vertical', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '设置组件排列方式;设置复选框是否垂直排列;该属性的可选值为 true / false', + 'en-US': + 'Set the component arrangement mode. Sets whether the check boxes are arranged vertically. The value of this attribute can be true or false' + }, + 'demoId': 'vertical-checkbox' + } + ], + 'checkbox-group-slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': 'checkbox选项组', 'en-US': 'Checkbox Option Group' }, + 'demoId': 'checkbox-group' + } + ], + 'checkbox-group-events': [ + { + 'name': 'change', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当绑定值变化时触发的事件', + 'en-US': 'This event is triggered when the binding value changes.' + }, + 'demoId': 'dynamic-create-checkbox' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/checkbox/with-border-composition-api.vue b/examples/sites/demos/app/checkbox/with-border-composition-api.vue new file mode 100644 index 000000000..25b7a85ae --- /dev/null +++ b/examples/sites/demos/app/checkbox/with-border-composition-api.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/checkbox/with-border.spec.ts b/examples/sites/demos/app/checkbox/with-border.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/checkbox/with-border.spec.ts rename to examples/sites/demos/app/checkbox/with-border.spec.ts diff --git a/examples/docs/resources/pc/demo/checkbox/with-border.vue b/examples/sites/demos/app/checkbox/with-border.vue similarity index 99% rename from examples/docs/resources/pc/demo/checkbox/with-border.vue rename to examples/sites/demos/app/checkbox/with-border.vue index cec2bace2..a90fcf58c 100644 --- a/examples/docs/resources/pc/demo/checkbox/with-border.vue +++ b/examples/sites/demos/app/checkbox/with-border.vue @@ -49,6 +49,7 @@ export default { } } + diff --git a/examples/docs/resources/pc/demo/collapse/custom-collapse-icon.spec.ts b/examples/sites/demos/app/collapse/custom-collapse-icon.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/collapse/custom-collapse-icon.spec.ts rename to examples/sites/demos/app/collapse/custom-collapse-icon.spec.ts diff --git a/examples/docs/resources/pc/demo/collapse/custom-collapse-icon.vue b/examples/sites/demos/app/collapse/custom-collapse-icon.vue similarity index 100% rename from examples/docs/resources/pc/demo/collapse/custom-collapse-icon.vue rename to examples/sites/demos/app/collapse/custom-collapse-icon.vue diff --git a/examples/sites/demos/app/collapse/custom-collapse-title-composition-api.vue b/examples/sites/demos/app/collapse/custom-collapse-title-composition-api.vue new file mode 100644 index 000000000..15e984467 --- /dev/null +++ b/examples/sites/demos/app/collapse/custom-collapse-title-composition-api.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/collapse/custom-collapse-title.spec.ts b/examples/sites/demos/app/collapse/custom-collapse-title.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/collapse/custom-collapse-title.spec.ts rename to examples/sites/demos/app/collapse/custom-collapse-title.spec.ts diff --git a/examples/docs/resources/pc/demo/collapse/custom-collapse-title.vue b/examples/sites/demos/app/collapse/custom-collapse-title.vue similarity index 100% rename from examples/docs/resources/pc/demo/collapse/custom-collapse-title.vue rename to examples/sites/demos/app/collapse/custom-collapse-title.vue diff --git a/examples/sites/demos/app/collapse/custom-title-right-composition-api.vue b/examples/sites/demos/app/collapse/custom-title-right-composition-api.vue new file mode 100644 index 000000000..9d896ca81 --- /dev/null +++ b/examples/sites/demos/app/collapse/custom-title-right-composition-api.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/collapse/custom-title-right.spec.ts b/examples/sites/demos/app/collapse/custom-title-right.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/collapse/custom-title-right.spec.ts rename to examples/sites/demos/app/collapse/custom-title-right.spec.ts diff --git a/examples/docs/resources/pc/demo/collapse/custom-title-right.vue b/examples/sites/demos/app/collapse/custom-title-right.vue similarity index 99% rename from examples/docs/resources/pc/demo/collapse/custom-title-right.vue rename to examples/sites/demos/app/collapse/custom-title-right.vue index d34e19fca..7b03408e4 100644 --- a/examples/docs/resources/pc/demo/collapse/custom-title-right.vue +++ b/examples/sites/demos/app/collapse/custom-title-right.vue @@ -26,7 +26,7 @@
- diff --git a/examples/docs/resources/pc/demo/collapse/dynamic-disable.spec.ts b/examples/sites/demos/app/collapse/dynamic-disable.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/collapse/dynamic-disable.spec.ts rename to examples/sites/demos/app/collapse/dynamic-disable.spec.ts diff --git a/examples/docs/resources/pc/demo/collapse/dynamic-disable.vue b/examples/sites/demos/app/collapse/dynamic-disable.vue similarity index 100% rename from examples/docs/resources/pc/demo/collapse/dynamic-disable.vue rename to examples/sites/demos/app/collapse/dynamic-disable.vue diff --git a/examples/sites/demos/app/collapse/nested-form-composition-api.vue b/examples/sites/demos/app/collapse/nested-form-composition-api.vue new file mode 100644 index 000000000..25c687605 --- /dev/null +++ b/examples/sites/demos/app/collapse/nested-form-composition-api.vue @@ -0,0 +1,85 @@ + + + diff --git a/examples/docs/resources/pc/demo/collapse/nested-form.spec.ts b/examples/sites/demos/app/collapse/nested-form.spec.ts similarity index 93% rename from examples/docs/resources/pc/demo/collapse/nested-form.spec.ts rename to examples/sites/demos/app/collapse/nested-form.spec.ts index 526324430..e5387b117 100644 --- a/examples/docs/resources/pc/demo/collapse/nested-form.spec.ts +++ b/examples/sites/demos/app/collapse/nested-form.spec.ts @@ -5,5 +5,6 @@ test('Collapse 嵌套表单', async ({ page }) => { await page.goto('http://localhost:7130/pc/collapse/nested-form') const content = page.locator('.tiny-collapse-item__content') + page.waitForTimeout(200) await expect(content.locator('.tiny-form')).toBeVisible() }) diff --git a/examples/docs/resources/pc/demo/collapse/nested-form.vue b/examples/sites/demos/app/collapse/nested-form.vue similarity index 90% rename from examples/docs/resources/pc/demo/collapse/nested-form.vue rename to examples/sites/demos/app/collapse/nested-form.vue index 92eae13d3..865e68a22 100644 --- a/examples/docs/resources/pc/demo/collapse/nested-form.vue +++ b/examples/sites/demos/app/collapse/nested-form.vue @@ -24,7 +24,8 @@ - + + @@ -36,7 +37,20 @@ diff --git a/examples/docs/resources/pc/demo/collapse/nested-grid.spec.ts b/examples/sites/demos/app/collapse/nested-grid.spec.ts similarity index 93% rename from examples/docs/resources/pc/demo/collapse/nested-grid.spec.ts rename to examples/sites/demos/app/collapse/nested-grid.spec.ts index 07de4e397..f9ed09420 100644 --- a/examples/docs/resources/pc/demo/collapse/nested-grid.spec.ts +++ b/examples/sites/demos/app/collapse/nested-grid.spec.ts @@ -5,5 +5,6 @@ test('Collapse 嵌套表格', async ({ page }) => { await page.goto('http://localhost:7130/pc/collapse/nested-grid') const content = page.locator('.tiny-collapse-item__content') + page.waitForTimeout(200) await expect(content.locator('.tiny-grid').nth(0)).toBeVisible() }) diff --git a/examples/docs/resources/pc/demo/collapse/nested-grid.vue b/examples/sites/demos/app/collapse/nested-grid.vue similarity index 92% rename from examples/docs/resources/pc/demo/collapse/nested-grid.vue rename to examples/sites/demos/app/collapse/nested-grid.vue index 1611746e9..c5ce3f9de 100644 --- a/examples/docs/resources/pc/demo/collapse/nested-grid.vue +++ b/examples/sites/demos/app/collapse/nested-grid.vue @@ -7,7 +7,13 @@ - + diff --git a/examples/sites/demos/app/collapse/webdoc/collapse.cn.md b/examples/sites/demos/app/collapse/webdoc/collapse.cn.md new file mode 100644 index 000000000..2e14615db --- /dev/null +++ b/examples/sites/demos/app/collapse/webdoc/collapse.cn.md @@ -0,0 +1,7 @@ +--- +title: Collapse 折叠面板 +--- + +# Collapse 折叠面板 + +
内容区可指定动态页面或自定义 html 等,支持展开收起操作。
diff --git a/examples/sites/demos/app/collapse/webdoc/collapse.en.md b/examples/sites/demos/app/collapse/webdoc/collapse.en.md new file mode 100644 index 000000000..3f93553a7 --- /dev/null +++ b/examples/sites/demos/app/collapse/webdoc/collapse.en.md @@ -0,0 +1,7 @@ +--- +title: Collapse Panel +--- + +# Collapse Panel + +
You can specify dynamic pages or customized HTML files in the content area. The content area can be expanded and collapsed.
diff --git a/examples/sites/demos/app/collapse/webdoc/collapse.js b/examples/sites/demos/app/collapse/webdoc/collapse.js new file mode 100644 index 000000000..edbc14b9e --- /dev/null +++ b/examples/sites/demos/app/collapse/webdoc/collapse.js @@ -0,0 +1,221 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'accordion', + 'name': { 'zh-CN': '手风琴效果', 'en-US': 'Accordion Effect' }, + 'desc': { + 'zh-CN': + '

配置 accordion 属性为 true 后,折叠面板将展示手风琴效果。\n配置 v-model 设置当前激活的面板(如果是手风琴模式,绑定值类型需要为 string ,否则为 array )\nchange 事件,在当前激活面板改变时触发,参数为当前的 value 值\n配置 name 属性作为每个 collapse-item 的唯一标志符

\n', + 'en-US': + '

After accordion is set to true, the collapsed panel displays the accordion effect. \nConfigure v-model to set the currently active panel. (In accordion mode, the binding value type must be string. Otherwise, the binding value type is array.) \nchange event, which is triggered when the current active panel changes. The parameter is the current value.\n Configure the name attribute as the unique identifier of each collapse-item.

\n' + }, + 'codeFiles': ['accordion.vue'] + }, + { + 'demoId': 'dynamic-disable', + 'name': { 'zh-CN': '禁用状态', 'en-US': 'Disabled' }, + 'desc': { + 'zh-CN': + '

collapse-item 元素上配置 disabled 属性为 true 后,将禁用指定的折叠面板项。

\n', + 'en-US': + '

When the disabled attribute is set to true on the collapse-item element, the specified collapse panel item is disabled.

\n' + }, + 'codeFiles': ['dynamic-disable.vue'] + }, + { + 'demoId': 'custom-collapse-title', + 'name': { 'zh-CN': '自定义面板标题', 'en-US': 'Custom Panel Title' }, + 'desc': { + 'zh-CN': + '

collapse-item 元素上配置 title 属性可以指定每个折叠面板项的标题。但同时也可以通过 title 插槽的方式自定义面板标题,比如在标题前增加图标。

\n', + 'en-US': + '

Configure the title attribute on the collapse-item element to specify the title of each collapse panel item. However, you can also customize the panel title by using the title slot, for example, adding an icon before the title.

\n' + }, + 'codeFiles': ['custom-collapse-title.vue'] + }, + { + 'demoId': 'custom-collapse-icon', + 'name': { 'zh-CN': '自定义展开折叠图标', 'en-US': 'Customize the expansion and collapse icon' }, + 'desc': { + 'zh-CN': + '

collapse-item 元素上可以通过 icon 插槽的方式自定义展开折叠 icon 图标。

\n', + 'en-US': + '

On the collapse-item element, you can customize the folding icon icon by using the icon slot.

\n' + }, + 'codeFiles': ['custom-collapse-icon.vue'] + }, + { + 'demoId': 'collapse-events', + 'name': { 'zh-CN': '折叠面板事件', 'en-US': 'Fold Panel Event' }, + 'desc': { + 'zh-CN': '

激活面板的值改变时将触发 change 事件。

\n', + 'en-US': '

When the value of the active panel changes, the change event is triggered.

\n' + }, + 'codeFiles': ['collapse-events.vue'] + }, + { + 'demoId': 'block-close', + 'name': { 'zh-CN': '阻止折叠面板关闭事件', 'en-US': 'Prevent the event of closing the folding panel' }, + 'desc': { + 'zh-CN': '

:before-close 折叠面板关闭前事件,方法里面return true/false,表示是否可以关闭

\n', + 'en-US': + '

:before-close event before closing the folding panel. In the method, return true/false indicates whether the folding panel can be closed.

\n' + }, + 'codeFiles': ['block-close.vue'] + }, + { + 'demoId': 'nested-grid', + 'name': { 'zh-CN': '嵌套表格', 'en-US': 'Nested Table' }, + 'desc': { + 'zh-CN': '

通过 collapse-item 元素的默认插槽嵌入表格。

\n', + 'en-US': '

Embeds the table through the default slot of the collapse-item element.

\n' + }, + 'codeFiles': ['nested-grid.vue'] + }, + { + 'demoId': 'nested-form', + 'name': { 'zh-CN': '嵌套表单', 'en-US': 'Nested Form' }, + 'desc': { + 'zh-CN': '

通过 collapse-item 元素的默认插槽嵌入表单。

\n', + 'en-US': '

Embed the form through the default slot of the collapse-item element.

\n' + }, + 'codeFiles': ['nested-form.vue'] + }, + { + 'demoId': 'custom-title-right', + 'name': { 'zh-CN': '自定义面板标题右侧内容', 'en-US': '' }, + 'desc': { + 'zh-CN': + '

collapse-item 元素上配置 title-right 属性可以指定每个折叠面板项标题的右侧内容。但同时也可以通过 title-right 插槽的方式自定义面板标题右侧内容,比如在标题右侧增加图标。

\n', + 'en-US': '' + }, + 'codeFiles': ['custom-title-right.vue'] + } + ], + apis: [ + { + 'name': 'collapse', + 'type': 'component', + 'properties': [], + 'events': [], + 'slots': [], + 'collapse-attrs': [ + { + 'name': 'modelValue / v-model', + 'type': 'String , Array , Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当前激活的面板(如果是手风琴模式,绑定值类型需要为String,否则为array)', + 'en-US': + 'Currently activated panel (In accordion mode, the binding value type must be String. Otherwise, the binding value type is array.)' + }, + 'demoId': 'basic-usage' + }, + { + 'name': 'accordion', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否手风琴模式', 'en-US': 'In accordion mode' }, + 'demoId': 'accordion' + }, + { + 'name': 'before-close', + 'type': 'Function', + 'defaultValue': '', + 'desc': { 'zh-CN': '阻止折叠面板关闭事件', 'en-US': 'Do not close the folding panel.' }, + 'demoId': 'block-close' + } + ], + 'collapse-slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认插槽', 'en-US': 'Default slot' }, + 'demoId': 'dynamic-disable' + } + ], + 'collapse-events': [ + { + 'name': 'change', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当前激活面板改变时触发(如果是手风琴模式,参数 activeNames 类型为String,否则为array)', + 'en-US': + 'Triggered when the current active panel changes. (In accordion mode, the type of activeNames is String. Otherwise, the type of activeNames is array.)' + }, + 'demoId': 'collapse-events' + } + ], + 'collapseItem-attrs': [ + { + 'name': 'name', + 'type': 'String | Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '唯一标志符', 'en-US': 'Unique identifier' }, + 'demoId': 'accordion' + }, + { + 'name': 'title', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '面板标题', 'en-US': 'Panel Title' }, + 'demoId': 'custom-collapse-title' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否禁用', 'en-US': 'Disable' }, + 'demoId': 'dynamic-disable' + }, + { + 'name': 'title-right', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义面板标题右侧内容', 'en-US': '' }, + 'demoId': 'custom-title-right' + } + ], + 'collapseItem-slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认插槽', 'en-US': 'Default slot' }, + 'demoId': 'dynamic-disable' + }, + { + 'name': 'title', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '标题', 'en-US': 'Title' }, + 'demoId': 'custom-collapse-title' + }, + { + 'name': 'icon', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '展开折叠 icon 图标', 'en-US': 'Expand and collapse the icon.' }, + 'demoId': 'custom-collapse-icon' + }, + { + 'name': 'title-right', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义面板标题右侧内容', 'en-US': '' }, + 'demoId': 'custom-title-right' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/color/auxiliary-color-composition-api.vue b/examples/sites/demos/app/color/auxiliary-color-composition-api.vue new file mode 100644 index 000000000..27741d9f3 --- /dev/null +++ b/examples/sites/demos/app/color/auxiliary-color-composition-api.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/examples/sites/demos/app/color/auxiliary-color.spec.js b/examples/sites/demos/app/color/auxiliary-color.spec.js new file mode 100644 index 000000000..ce7b48b84 --- /dev/null +++ b/examples/sites/demos/app/color/auxiliary-color.spec.js @@ -0,0 +1,14 @@ +import { test, expect } from '@playwright/test' + +test('test', async ({ page }) => { + await page.goto('http://localhost:7130/pc/color/neutral-color') + await page.getByText('主色彩').click() + await page.getByText('bg-primary-normal').click() + await expect(page.getByText('bg-primary-normal')).toHaveClass(/bg-primary-normal/) + await page.getByText('bg-primary-hover').click() + await expect(page.getByText('bg-primary-hover')).toHaveClass(/bg-primary-hover/) + await page.getByText('bg-primary-active').click() + await expect(page.getByText('bg-primary-active')).toHaveClass(/bg-primary-active/) + await page.getByText('bg-btn-active').click() + await expect(page.getByText('bg-btn-active')).toHaveClass(/bg-btn-active/) +}) diff --git a/examples/docs/resources/pc/demo/color/auxiliary-color.vue b/examples/sites/demos/app/color/auxiliary-color.vue similarity index 100% rename from examples/docs/resources/pc/demo/color/auxiliary-color.vue rename to examples/sites/demos/app/color/auxiliary-color.vue diff --git a/examples/sites/demos/app/color/main-color-composition-api.vue b/examples/sites/demos/app/color/main-color-composition-api.vue new file mode 100644 index 000000000..cf7ee45ff --- /dev/null +++ b/examples/sites/demos/app/color/main-color-composition-api.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/examples/sites/demos/app/color/main-color.spec.js b/examples/sites/demos/app/color/main-color.spec.js new file mode 100644 index 000000000..b63b607cd --- /dev/null +++ b/examples/sites/demos/app/color/main-color.spec.js @@ -0,0 +1,12 @@ +import { test, expect } from '@playwright/test' + +test('test', async ({ page }) => { + await page.goto('http://localhost:7130/pc/color/main-color') + await page.getByText('辅助色').click() + await page.getByText('bg-success-normal').click() + await expect(page.getByText('bg-success-normal')).toHaveClass(/bg-success-normal/) + await page.getByText('bg-warning-normal').click() + await expect(page.getByText('bg-warning-normal')).toHaveClass(/bg-warning-normal/) + await page.getByText('bg-error-normal').click() + await expect(page.getByText('bg-error-normal')).toHaveClass(/bg-error-normal/) +}) diff --git a/examples/docs/resources/pc/demo/color/main-color.vue b/examples/sites/demos/app/color/main-color.vue similarity index 100% rename from examples/docs/resources/pc/demo/color/main-color.vue rename to examples/sites/demos/app/color/main-color.vue diff --git a/examples/sites/demos/app/color/neutral-color-composition-api.vue b/examples/sites/demos/app/color/neutral-color-composition-api.vue new file mode 100644 index 000000000..74e50680d --- /dev/null +++ b/examples/sites/demos/app/color/neutral-color-composition-api.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/examples/sites/demos/app/color/neutral-color.spec.js b/examples/sites/demos/app/color/neutral-color.spec.js new file mode 100644 index 000000000..21924fb00 --- /dev/null +++ b/examples/sites/demos/app/color/neutral-color.spec.js @@ -0,0 +1,14 @@ +import { test, expect } from '@playwright/test' + +test('test', async ({ page }) => { + await page.goto('http://localhost:7130/pc/color/auxiliary-color') + await page.getByText('中性色').click() + await page.getByText('bg-gray-navigation').click() + await expect(page.getByText('bg-gray-navigation')).toHaveClass(/bg-gray-navigation/) + await page.getByText('bg-gray-darker').click() + await expect(page.getByText('bg-gray-darker')).toHaveClass(/bg-gray-darker/) + await page.getByText('bg-gray-dark').nth(1).click() + await expect(page.getByText('bg-gray-dark').nth(1)).toHaveClass(/bg-gray-dark/) + await page.getByText('bg-gray-normal').click() + await expect(page.getByText('bg-gray-normal')).toHaveClass(/bg-gray-normal/) +}) diff --git a/examples/docs/resources/pc/demo/color/neutral-color.vue b/examples/sites/demos/app/color/neutral-color.vue similarity index 100% rename from examples/docs/resources/pc/demo/color/neutral-color.vue rename to examples/sites/demos/app/color/neutral-color.vue diff --git a/examples/sites/demos/app/color/webdoc/color.cn.md b/examples/sites/demos/app/color/webdoc/color.cn.md new file mode 100644 index 000000000..a0252a50b --- /dev/null +++ b/examples/sites/demos/app/color/webdoc/color.cn.md @@ -0,0 +1,7 @@ +--- +title: Color 色彩 +--- + +# Color 色彩 + +
Color 色彩
diff --git a/examples/sites/demos/app/color/webdoc/color.en.md b/examples/sites/demos/app/color/webdoc/color.en.md new file mode 100644 index 000000000..e0efa419a --- /dev/null +++ b/examples/sites/demos/app/color/webdoc/color.en.md @@ -0,0 +1,7 @@ +--- +title: Color +--- + +# Color + +
Color
diff --git a/examples/sites/demos/app/color/webdoc/color.js b/examples/sites/demos/app/color/webdoc/color.js new file mode 100644 index 000000000..3cf64d77e --- /dev/null +++ b/examples/sites/demos/app/color/webdoc/color.js @@ -0,0 +1,25 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'main-color', + 'name': { 'zh-CN': '主色彩', 'en-US': 'Main Color' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['main-color.vue'] + }, + { + 'demoId': 'auxiliary-color', + 'name': { 'zh-CN': '辅助色', 'en-US': 'Auxiliary Color' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['auxiliary-color.vue'] + }, + { + 'demoId': 'neutral-color', + 'name': { 'zh-CN': '中性色', 'en-US': 'Neutral Color' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['neutral-color.vue'] + } + ], + apis: [{ 'name': 'color', 'type': 'component', 'properties': [], 'events': [], 'slots': [] }] +} diff --git a/examples/sites/demos/app/company/basic-usage-composition-api.vue b/examples/sites/demos/app/company/basic-usage-composition-api.vue new file mode 100644 index 000000000..3081907fb --- /dev/null +++ b/examples/sites/demos/app/company/basic-usage-composition-api.vue @@ -0,0 +1,32 @@ + + + diff --git a/examples/docs/resources/pc/demo/company/basic-usage.spec.ts b/examples/sites/demos/app/company/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/company/basic-usage.spec.ts rename to examples/sites/demos/app/company/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/company/basic-usage.vue b/examples/sites/demos/app/company/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/company/basic-usage.vue rename to examples/sites/demos/app/company/basic-usage.vue diff --git a/examples/sites/demos/app/company/custom-service-composition-api.vue b/examples/sites/demos/app/company/custom-service-composition-api.vue new file mode 100644 index 000000000..240cf11fd --- /dev/null +++ b/examples/sites/demos/app/company/custom-service-composition-api.vue @@ -0,0 +1,55 @@ + + + diff --git a/examples/docs/resources/pc/demo/company/custom-service.spec.ts b/examples/sites/demos/app/company/custom-service.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/company/custom-service.spec.ts rename to examples/sites/demos/app/company/custom-service.spec.ts diff --git a/examples/docs/resources/pc/demo/company/custom-service.vue b/examples/sites/demos/app/company/custom-service.vue similarity index 100% rename from examples/docs/resources/pc/demo/company/custom-service.vue rename to examples/sites/demos/app/company/custom-service.vue diff --git a/examples/sites/demos/app/company/custom-show-num-composition-api.vue b/examples/sites/demos/app/company/custom-show-num-composition-api.vue new file mode 100644 index 000000000..64e1ba81d --- /dev/null +++ b/examples/sites/demos/app/company/custom-show-num-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/company/custom-show-num.vue b/examples/sites/demos/app/company/custom-show-num.vue similarity index 100% rename from examples/docs/resources/pc/demo/company/custom-show-num.vue rename to examples/sites/demos/app/company/custom-show-num.vue diff --git a/examples/sites/demos/app/company/fields-composition-api.vue b/examples/sites/demos/app/company/fields-composition-api.vue new file mode 100644 index 000000000..4db0d1f56 --- /dev/null +++ b/examples/sites/demos/app/company/fields-composition-api.vue @@ -0,0 +1,41 @@ + + + diff --git a/examples/docs/resources/pc/demo/company/fields.vue b/examples/sites/demos/app/company/fields.vue similarity index 100% rename from examples/docs/resources/pc/demo/company/fields.vue rename to examples/sites/demos/app/company/fields.vue diff --git a/examples/sites/demos/app/company/webdoc/company.cn.md b/examples/sites/demos/app/company/webdoc/company.cn.md new file mode 100644 index 000000000..39013e0bc --- /dev/null +++ b/examples/sites/demos/app/company/webdoc/company.cn.md @@ -0,0 +1,7 @@ +--- +title: Company 公司 +--- + +# Company 公司 + +
Company 公司组件,用于公司名称展示及选择,通过配置数据源获取选项。
diff --git a/examples/sites/demos/app/company/webdoc/company.en.md b/examples/sites/demos/app/company/webdoc/company.en.md new file mode 100644 index 000000000..3a57b74e2 --- /dev/null +++ b/examples/sites/demos/app/company/webdoc/company.en.md @@ -0,0 +1,7 @@ +--- +title: Company +--- + +# Company + +
Company gadget, which is used to display and select company names. The options are obtained by configuring the data source.
diff --git a/examples/sites/demos/app/company/webdoc/company.js b/examples/sites/demos/app/company/webdoc/company.js new file mode 100644 index 000000000..4f60257b1 --- /dev/null +++ b/examples/sites/demos/app/company/webdoc/company.js @@ -0,0 +1,121 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'custom-show-num', + 'name': { 'zh-CN': '自定义数据显示数量', 'en-US': 'User-defined number of data to be displayed' }, + 'desc': { + 'zh-CN': + '

可通过 max 属性设置下拉框最大显示的数据条数。clearable 是否显示清除按钮,默认为 true 。

\n', + 'en-US': + '

You can set the maximum number of records displayed in the drop-down list box through the max attribute. clearableIndicates whether to display the Clear button. The default value is true.

\n' + }, + 'codeFiles': ['custom-show-num.vue'] + }, + { + 'demoId': 'custom-service', + 'name': { 'zh-CN': '自定义服务', 'en-US': 'Custom Service' }, + 'desc': { + 'zh-CN': '

通过 fetch-company 属性可以指定一个方法,在方法中可实现请求自定义的服务。

\n', + 'en-US': + '

You can use the fetch-company attribute to specify a method in which the service customized by the request can be implemented.

\n' + }, + 'codeFiles': ['custom-service.vue'] + } + ], + apis: [ + { + 'name': 'company', + 'type': 'component', + 'properties': [ + { + 'name': 'modelValue / v-model', + 'type': 'String , Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置下拉框的值。', 'en-US': 'Set the value of the drop-down list box.' }, + 'demoId': 'custom-show-num' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置输入框内的提示占位文本。', 'en-US': 'Set the placeholder text in the text box.' }, + 'demoId': 'custom-service' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '为 popper 添加类名(可参考 popover 组件)', + 'en-US': 'Add a class name for the popper. For details, see the popover component.' + }, + 'demoId': '' + }, + { + 'name': 'popper-append-to-body', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': + '是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)', + 'en-US': + 'Indicates whether to insert the pop-up box to the body element. If a fault occurs in locating the fault in the dialog box that is displayed, you can set this attribute to false (for details, see the select component).' + }, + 'demoId': '' + }, + { + 'name': 'max', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 1000', + 'desc': { 'zh-CN': '原生属性,设置最大值', 'en-US': 'Native attribute. Set the maximum value.' }, + 'demoId': 'custom-show-num' + }, + { + 'name': 'fetchCompany', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义公司查询接口,fetchCompany返回一个Promise对象', + 'en-US': 'The fetchCompany interface returns a Promise object.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'fields', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义公司数据映射,未使用框架服务时必填', + 'en-US': + 'Customized company data mapping. This parameter is mandatory when the framework service is not used.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'clearable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否显示清除按钮;是否可清空', 'en-US': 'Whether to display the Clear button; Clearable' }, + 'demoId': 'custom-show-num' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'demoId': '' + } + ], + 'events': [], + 'slots': [] + } + ] +} diff --git a/examples/docs/resources/pc/demo/components.js b/examples/sites/demos/app/components.js similarity index 99% rename from examples/docs/resources/pc/demo/components.js rename to examples/sites/demos/app/components.js index a4bf08321..aa654a89a 100644 --- a/examples/docs/resources/pc/demo/components.js +++ b/examples/sites/demos/app/components.js @@ -622,7 +622,7 @@ export default { espace: 'support-open-espace', 'show-img': 'support-open-espace', 'show-name': 'support-open-espace', - 'show-description': 'support-open-espace' + 'show-number': 'support-open-espace' }, Events: {}, Methods: {}, diff --git a/examples/sites/demos/app/config-provider/base-composition-api.vue b/examples/sites/demos/app/config-provider/base-composition-api.vue new file mode 100644 index 000000000..0eaa7b4af --- /dev/null +++ b/examples/sites/demos/app/config-provider/base-composition-api.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/examples/sites/demos/app/config-provider/base.vue b/examples/sites/demos/app/config-provider/base.vue new file mode 100644 index 000000000..0aa9e755d --- /dev/null +++ b/examples/sites/demos/app/config-provider/base.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/examples/sites/demos/app/config-provider/tag-composition-api.vue b/examples/sites/demos/app/config-provider/tag-composition-api.vue new file mode 100644 index 000000000..d52743bed --- /dev/null +++ b/examples/sites/demos/app/config-provider/tag-composition-api.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/examples/sites/demos/app/config-provider/tag.vue b/examples/sites/demos/app/config-provider/tag.vue new file mode 100644 index 000000000..dea9ad763 --- /dev/null +++ b/examples/sites/demos/app/config-provider/tag.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/examples/sites/demos/app/config-provider/text-direct-composition-api.vue b/examples/sites/demos/app/config-provider/text-direct-composition-api.vue new file mode 100644 index 000000000..4ca8a1aa5 --- /dev/null +++ b/examples/sites/demos/app/config-provider/text-direct-composition-api.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/examples/sites/demos/app/config-provider/text-direct.vue b/examples/sites/demos/app/config-provider/text-direct.vue new file mode 100644 index 000000000..a712788d3 --- /dev/null +++ b/examples/sites/demos/app/config-provider/text-direct.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/examples/sites/demos/app/config-provider/webdoc/config-provider.cn.md b/examples/sites/demos/app/config-provider/webdoc/config-provider.cn.md new file mode 100644 index 000000000..037a1e90b --- /dev/null +++ b/examples/sites/demos/app/config-provider/webdoc/config-provider.cn.md @@ -0,0 +1,7 @@ +--- +title: ConfigProvide 组件 +--- + +# ConfigProvide 组件 + +
diff --git a/examples/sites/demos/app/config-provider/webdoc/config-provider.js b/examples/sites/demos/app/config-provider/webdoc/config-provider.js new file mode 100644 index 000000000..7639f91b7 --- /dev/null +++ b/examples/sites/demos/app/config-provider/webdoc/config-provider.js @@ -0,0 +1,66 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'base', + 'name': { 'zh-CN': '基本使用', 'en-US': '' }, + 'desc': { 'zh-CN': '可以通过design属性配置自定义不同设计规范的图标和逻辑', 'en-US': '' }, + 'codeFiles': ['base.vue'] + }, + { + 'demoId': 'text-direct', + 'name': { 'zh-CN': '改变文字方向', 'en-US': '' }, + 'desc': { + 'zh-CN': + '有时, 我们需要改变文字的排列方向, 例如我们在排列阿拉伯语是就需要RTL而非LTR.config-provider也考虑到了这点,只需要覆写design.direction即可', + 'en-US': '' + }, + 'codeFiles': ['text-direct.vue'] + }, + { + 'demoId': 'tag', + 'name': { 'zh-CN': '自定义标签', 'en-US': '' }, + 'desc': { 'zh-CN': '可以通过tag可以自定义容器标签', 'en-US': '' }, + 'codeFiles': ['tag.vue'] + } + ], + apis: [ + { + 'name': 'config-provider', + 'type': 'component', + 'properties': [ + { + 'name': 'design', + 'type': 'ConfigProviderProps', + 'defaultValue': '', + 'desc': { 'zh-CN': '规范,可以通过该属于定制一些自定义的交互规范', 'en-US': '' }, + 'demoId': 'base' + }, + { + 'name': 'breakPoints', + 'type': 'breakPoint', + 'defaultValue': "{'xs': 480,'sm': 640,'md': 768,'lg': 1024,'xl': 1280,'2xl': 1536}", + 'desc': { 'zh-CN': '断点, 为Layout提供', 'en-US': '' }, + 'demoId': 'base' + }, + { + 'name': 'direction', + 'type': "'ltr' | 'rtl'", + 'defaultValue': 'ltr', + 'desc': { 'zh-CN': '文字排版方向', 'en-US': '' }, + 'demoId': 'text-dire' + }, + { + 'name': 'tag', + 'type': 'object', + 'defaultValue': "{enable: true,name: 'div'}", + 'desc': { 'zh-CN': '是否被元素包裹, 如果是vue2且没有一个单一节点, 组件会自动创建一个div', 'en-US': '' }, + 'demoId': 'base' + } + ], + 'events': [], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/container/basic-usage-composition-api.vue b/examples/sites/demos/app/container/basic-usage-composition-api.vue new file mode 100644 index 000000000..cb15d97ce --- /dev/null +++ b/examples/sites/demos/app/container/basic-usage-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/container/basic-usage.spec.js b/examples/sites/demos/app/container/basic-usage.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/container/basic-usage.spec.js rename to examples/sites/demos/app/container/basic-usage.spec.js diff --git a/examples/sites/demos/app/container/basic-usage.vue b/examples/sites/demos/app/container/basic-usage.vue new file mode 100644 index 000000000..46da96872 --- /dev/null +++ b/examples/sites/demos/app/container/basic-usage.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/examples/sites/demos/app/container/classic-composition-api.vue b/examples/sites/demos/app/container/classic-composition-api.vue new file mode 100644 index 000000000..bf2d570db --- /dev/null +++ b/examples/sites/demos/app/container/classic-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/sites/demos/app/container/classic.spec.js b/examples/sites/demos/app/container/classic.spec.js new file mode 100644 index 000000000..f38bd6cac --- /dev/null +++ b/examples/sites/demos/app/container/classic.spec.js @@ -0,0 +1,16 @@ +import { test, expect } from '@playwright/test' + +test('经典布局', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/container/simple') + await page.getByText('经典布局').click() + await page.locator('#preview').getByText('header').click() + await expect(page.locator('.tiny-container > div').first()).toHaveAttribute('style', 'height: 60px;') + await page.getByText('Main').click() + await expect(page.locator('.tiny-container > div').nth(1)).toHaveAttribute( + 'style', + 'top: 60px; left: 0px; bottom: 60px;' + ) + await page.locator('#preview').getByText('footer').click() + await expect(page.locator('.tiny-container > div').nth(2)).toHaveAttribute('style', 'height: 60px; left: 0px;') +}) diff --git a/examples/docs/resources/pc/demo/container/classic.vue b/examples/sites/demos/app/container/classic.vue similarity index 99% rename from examples/docs/resources/pc/demo/container/classic.vue rename to examples/sites/demos/app/container/classic.vue index 4ab1c83c4..7095d581e 100644 --- a/examples/docs/resources/pc/demo/container/classic.vue +++ b/examples/sites/demos/app/container/classic.vue @@ -69,4 +69,4 @@ export default { font-size: 16px; margin: 0 7px; } - + \ No newline at end of file diff --git a/examples/sites/demos/app/container/custom-container-composition-api.vue b/examples/sites/demos/app/container/custom-container-composition-api.vue new file mode 100644 index 000000000..386efd7f9 --- /dev/null +++ b/examples/sites/demos/app/container/custom-container-composition-api.vue @@ -0,0 +1,53 @@ + + + diff --git a/examples/docs/resources/pc/demo/container/custom-container.spec.js b/examples/sites/demos/app/container/custom-container.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/container/custom-container.spec.js rename to examples/sites/demos/app/container/custom-container.spec.js diff --git a/examples/docs/resources/pc/demo/container/custom-container.vue b/examples/sites/demos/app/container/custom-container.vue similarity index 99% rename from examples/docs/resources/pc/demo/container/custom-container.vue rename to examples/sites/demos/app/container/custom-container.vue index 8701a57f6..c64d5f80c 100644 --- a/examples/docs/resources/pc/demo/container/custom-container.vue +++ b/examples/sites/demos/app/container/custom-container.vue @@ -99,4 +99,4 @@ export default { font-size: 16px; margin: 0 7px; } - + \ No newline at end of file diff --git a/examples/sites/demos/app/container/custom-with-height-composition-api.vue b/examples/sites/demos/app/container/custom-with-height-composition-api.vue new file mode 100644 index 000000000..854d4741d --- /dev/null +++ b/examples/sites/demos/app/container/custom-with-height-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/container/custom-with-height.spec.js b/examples/sites/demos/app/container/custom-with-height.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/container/custom-with-height.spec.js rename to examples/sites/demos/app/container/custom-with-height.spec.js diff --git a/examples/docs/resources/pc/demo/container/custom-with-height.vue b/examples/sites/demos/app/container/custom-with-height.vue similarity index 99% rename from examples/docs/resources/pc/demo/container/custom-with-height.vue rename to examples/sites/demos/app/container/custom-with-height.vue index c02c9fef2..a35fd39e4 100644 --- a/examples/docs/resources/pc/demo/container/custom-with-height.vue +++ b/examples/sites/demos/app/container/custom-with-height.vue @@ -77,4 +77,4 @@ export default { font-size: 16px; margin: 0 7px; } - + \ No newline at end of file diff --git a/examples/sites/demos/app/container/fashion-composition-api.vue b/examples/sites/demos/app/container/fashion-composition-api.vue new file mode 100644 index 000000000..55e38d8ad --- /dev/null +++ b/examples/sites/demos/app/container/fashion-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/container/fashion.spec.js b/examples/sites/demos/app/container/fashion.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/container/fashion.spec.js rename to examples/sites/demos/app/container/fashion.spec.js diff --git a/examples/docs/resources/pc/demo/container/fashion.vue b/examples/sites/demos/app/container/fashion.vue similarity index 99% rename from examples/docs/resources/pc/demo/container/fashion.vue rename to examples/sites/demos/app/container/fashion.vue index c81ed6e2b..5f5df847d 100644 --- a/examples/docs/resources/pc/demo/container/fashion.vue +++ b/examples/sites/demos/app/container/fashion.vue @@ -55,4 +55,4 @@ export default { border: 3px solid #ffffff; color: #84a18a; } - + \ No newline at end of file diff --git a/examples/sites/demos/app/container/legend-composition-api.vue b/examples/sites/demos/app/container/legend-composition-api.vue new file mode 100644 index 000000000..57eee8dd8 --- /dev/null +++ b/examples/sites/demos/app/container/legend-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/container/legend.spec.js b/examples/sites/demos/app/container/legend.spec.js similarity index 87% rename from examples/docs/resources/pc/demo/container/legend.spec.js rename to examples/sites/demos/app/container/legend.spec.js index a42ebf7e4..ed24d5ff0 100644 --- a/examples/docs/resources/pc/demo/container/legend.spec.js +++ b/examples/sites/demos/app/container/legend.spec.js @@ -7,18 +7,12 @@ test('传奇布局', async ({ page }) => { await page.locator('#preview').getByText('Header').click() await expect(page.locator('.tiny-container > div').first()).toHaveAttribute('style', 'height: 60px;') await page.locator('#preview').getByText('Aside').click() - await expect(page.locator('.tiny-container > div').nth(1)).toHaveAttribute( - 'style', - 'width: 200px; top: 60px;' - ) + await expect(page.locator('.tiny-container > div').nth(1)).toHaveAttribute('style', 'width: 200px; top: 60px;') await page.getByText('Main').click() await expect(page.locator('.tiny-container > div').nth(2)).toHaveAttribute( 'style', 'top: 60px; left: 200px; bottom: 60px;' ) await page.locator('#preview').getByText('Footer').click() - await expect(page.locator('.tiny-container > div').nth(3)).toHaveAttribute( - 'style', - 'height: 60px; left: 200px;' - ) + await expect(page.locator('.tiny-container > div').nth(3)).toHaveAttribute('style', 'height: 60px; left: 200px;') }) diff --git a/examples/docs/resources/pc/demo/container/legend.vue b/examples/sites/demos/app/container/legend.vue similarity index 99% rename from examples/docs/resources/pc/demo/container/legend.vue rename to examples/sites/demos/app/container/legend.vue index f393a8d21..7f90ba5b4 100644 --- a/examples/docs/resources/pc/demo/container/legend.vue +++ b/examples/sites/demos/app/container/legend.vue @@ -58,4 +58,4 @@ export default { border: 3px solid #ffffff; color: #84a18a; } - + \ No newline at end of file diff --git a/examples/sites/demos/app/container/simple-composition-api.vue b/examples/sites/demos/app/container/simple-composition-api.vue new file mode 100644 index 000000000..64d4a7d54 --- /dev/null +++ b/examples/sites/demos/app/container/simple-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/container/simple.spec.js b/examples/sites/demos/app/container/simple.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/container/simple.spec.js rename to examples/sites/demos/app/container/simple.spec.js diff --git a/examples/docs/resources/pc/demo/container/simple.vue b/examples/sites/demos/app/container/simple.vue similarity index 99% rename from examples/docs/resources/pc/demo/container/simple.vue rename to examples/sites/demos/app/container/simple.vue index c815d6e0a..a54265781 100644 --- a/examples/docs/resources/pc/demo/container/simple.vue +++ b/examples/sites/demos/app/container/simple.vue @@ -52,4 +52,4 @@ export default { border: 3px solid #ffffff; color: #84a18a; } - + \ No newline at end of file diff --git a/examples/sites/demos/app/container/webdoc/container.cn.md b/examples/sites/demos/app/container/webdoc/container.cn.md new file mode 100644 index 000000000..208b9a888 --- /dev/null +++ b/examples/sites/demos/app/container/webdoc/container.cn.md @@ -0,0 +1,7 @@ +--- +title: Container 版型 +--- + +# Container 版型 + +
用于布局的容器组件,方便快速搭建页面的版型。
diff --git a/examples/sites/demos/app/container/webdoc/container.en.md b/examples/sites/demos/app/container/webdoc/container.en.md new file mode 100644 index 000000000..73e66c330 --- /dev/null +++ b/examples/sites/demos/app/container/webdoc/container.en.md @@ -0,0 +1,7 @@ +--- +title: Container dimension +--- + +# Container dimension + +
Container component for layout, which facilitates page layout creation.
diff --git a/examples/sites/demos/app/container/webdoc/container.js b/examples/sites/demos/app/container/webdoc/container.js new file mode 100644 index 000000000..d12e40183 --- /dev/null +++ b/examples/sites/demos/app/container/webdoc/container.js @@ -0,0 +1,124 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '默认布局', 'en-US': 'Default Layout' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'simple', + 'name': { 'zh-CN': '简约布局', 'en-US': 'Simple Layout' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['simple.vue'] + }, + { + 'demoId': 'classic', + 'name': { 'zh-CN': '经典布局', 'en-US': 'Classic Layout' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['classic.vue'] + }, + { + 'demoId': 'fashionid', + 'name': { 'zh-CN': '时尚布局', 'en-US': 'Fashion Layout' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['fashion.vue'] + }, + { + 'demoId': 'legend', + 'name': { 'zh-CN': '传奇布局', 'en-US': 'Legendary Layout' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['legend.vue'] + }, + { + 'demoId': 'custom-with-height', + 'name': { 'zh-CN': '自定义宽度和高度', 'en-US': 'Custom width and height' }, + 'desc': { + 'zh-CN': + '

Container 布局容器支持用户通过设置 headerHeightfooterHeightasideWidth 等属性来控制 header(头部区域)footer(底部区域) 的高度和 aside(左侧区域) 的宽度。main(主体区域) 的宽度和高度是自适应的。

\n', + 'en-US': + '

Container layout container allows users to control header by setting attributes such as headerHeight, footerHeight, and asideWidth (Header area), footer (bottom area), and aside (left area). The width and height of main (main area) are adaptive.

\n' + }, + 'codeFiles': ['custom-with-height.vue'] + }, + { + 'demoId': 'custom-container', + 'name': { 'zh-CN': '版型切换', 'en-US': 'Switch' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['custom-container.vue'] + } + ], + apis: [ + { + 'name': 'container', + 'type': 'component', + 'properties': [ + { + 'name': 'aside-width', + 'type': 'Number , String', + 'defaultValue': '该属性的默认值为 200', + 'desc': { 'zh-CN': '左侧宽度', 'en-US': 'Left width' }, + 'demoId': 'custom-with-height' + }, + { + 'name': 'footer-height', + 'type': 'Number , String', + 'defaultValue': '该属性的默认值为 60', + 'desc': { 'zh-CN': '底部高度', 'en-US': 'Height at the bottom' }, + 'demoId': 'custom-with-height' + }, + { + 'name': 'header-height', + 'type': 'Number , String', + 'defaultValue': '该属性的默认值为 60', + 'desc': { 'zh-CN': '头部高度', 'en-US': 'Head height' }, + 'demoId': 'custom-with-height' + }, + { + 'name': 'pattern', + 'type': 'String', + 'defaultValue': '该属性的默认值为 default', + 'desc': { + 'zh-CN': '版型类型;该属性的可选值为 default / simple / legend / classic / fashion', + 'en-US': + 'Measurement type; The optional values of this attribute are default / simple / legend / classic / fashion' + }, + 'demoId': 'custom-container' + } + ], + 'events': [], + 'slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '主要内容', 'en-US': 'Main Content' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'header', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '头部内容', 'en-US': 'Header Content' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'aside', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '侧边内容', 'en-US': 'Side Content' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'footer', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '底部内容', 'en-US': 'Bottom Content' }, + 'demoId': 'classic' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/country/basic-usage-composition-api.vue b/examples/sites/demos/app/country/basic-usage-composition-api.vue new file mode 100644 index 000000000..0d255e601 --- /dev/null +++ b/examples/sites/demos/app/country/basic-usage-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/country/basic-usage.vue b/examples/sites/demos/app/country/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/country/basic-usage.vue rename to examples/sites/demos/app/country/basic-usage.vue diff --git a/examples/sites/demos/app/country/custom-service-composition-api.vue b/examples/sites/demos/app/country/custom-service-composition-api.vue new file mode 100644 index 000000000..6d7667b60 --- /dev/null +++ b/examples/sites/demos/app/country/custom-service-composition-api.vue @@ -0,0 +1,41 @@ + + + diff --git a/examples/docs/resources/pc/demo/country/custom-service.spec.js b/examples/sites/demos/app/country/custom-service.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/country/custom-service.spec.js rename to examples/sites/demos/app/country/custom-service.spec.js diff --git a/examples/docs/resources/pc/demo/country/custom-service.vue b/examples/sites/demos/app/country/custom-service.vue similarity index 100% rename from examples/docs/resources/pc/demo/country/custom-service.vue rename to examples/sites/demos/app/country/custom-service.vue diff --git a/examples/sites/demos/app/country/fields-composition-api.vue b/examples/sites/demos/app/country/fields-composition-api.vue new file mode 100644 index 000000000..1ff26cdc5 --- /dev/null +++ b/examples/sites/demos/app/country/fields-composition-api.vue @@ -0,0 +1,41 @@ + + + diff --git a/examples/docs/resources/pc/demo/country/fields.spec.js b/examples/sites/demos/app/country/fields.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/country/fields.spec.js rename to examples/sites/demos/app/country/fields.spec.js diff --git a/examples/docs/resources/pc/demo/country/fields.vue b/examples/sites/demos/app/country/fields.vue similarity index 100% rename from examples/docs/resources/pc/demo/country/fields.vue rename to examples/sites/demos/app/country/fields.vue diff --git a/examples/sites/demos/app/country/webdoc/country.cn.md b/examples/sites/demos/app/country/webdoc/country.cn.md new file mode 100644 index 000000000..b2d660153 --- /dev/null +++ b/examples/sites/demos/app/country/webdoc/country.cn.md @@ -0,0 +1,7 @@ +--- +title: Country 国家/地区 +--- + +# Country 国家/地区 + +
Country 国家/地区组件,用于国家/地区名称展示及选择,通过配置数据源获取选项。
diff --git a/examples/sites/demos/app/country/webdoc/country.en.md b/examples/sites/demos/app/country/webdoc/country.en.md new file mode 100644 index 000000000..d1975f849 --- /dev/null +++ b/examples/sites/demos/app/country/webdoc/country.en.md @@ -0,0 +1,7 @@ +--- +title: Country +--- + +# Country + +
Country: country/region component, which is used to display and select country/region names. The options are obtained by configuring the data source.
diff --git a/examples/sites/demos/app/country/webdoc/country.js b/examples/sites/demos/app/country/webdoc/country.js new file mode 100644 index 000000000..ea404a424 --- /dev/null +++ b/examples/sites/demos/app/country/webdoc/country.js @@ -0,0 +1,113 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'custom-service', + 'name': { 'zh-CN': '自定义服务', 'en-US': 'Custom Service' }, + 'desc': { + 'zh-CN': + '

通过 fetch-country 属性可以指定一个方法,在方法中可实现请求自定义的服务。 clearable 设置是否可清空,默认值为 true。

\n', + 'en-US': + '

You can use the fetch-country attribute to specify a method in which the service customized by the request can be implemented. clearable: indicates whether data can be cleared. The default value is true.

\n' + }, + 'codeFiles': ['custom-service.vue'] + }, + { + 'demoId': 'fields', + 'name': { 'zh-CN': '自定义数据的字段', 'en-US': 'Custom Data Fields' }, + 'desc': { + 'zh-CN': '当使用自定义的数据体时,需要使用fields来指定字段', + 'en-US': 'When a user-defined data body is used, fields must be used to specify fields.' + }, + 'codeFiles': ['fields.vue'] + } + ], + apis: [ + { + 'name': 'country', + 'type': 'component', + 'properties': [ + { + 'name': 'modelValue / v-model', + 'type': 'String , number', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置下拉框的值。', 'en-US': 'Set the value of the drop-down list box.' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置输入框内的提示占位文本。', 'en-US': 'Set the placeholder text in the text box.' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '为 popper 添加类名(可参考 popover 组件)', + 'en-US': 'Add a class name for the popper. For details, see the popover component.' + }, + 'demoId': '' + }, + { + 'name': 'popper-append-to-body', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': + '是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)', + 'en-US': + 'Indicates whether to insert the pop-up box to the body element. If a fault occurs in locating the fault in the dialog box that is displayed, you can set this attribute to false (for details, see the select component).' + }, + 'demoId': '' + }, + { + 'name': 'fetchCountry', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义国家查询接口,返回一个Promise对象,未使用框架服务时必填', + 'en-US': + 'The user-defined country query interface returns a Promise object. This parameter is mandatory when the framework service is not used.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'fields', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义数据映射,未使用框架服务时必填', + 'en-US': 'Customized data mapping. This parameter is mandatory when the framework service is not used.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'clearable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否显示清除按钮;是否可清空', 'en-US': 'Whether to display the Clear button; Clearable' }, + 'demoId': 'custom-service' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'demoId': '' + } + ], + 'events': [], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/credit-card-form/background-image-composition-api.vue b/examples/sites/demos/app/credit-card-form/background-image-composition-api.vue new file mode 100644 index 000000000..689f98909 --- /dev/null +++ b/examples/sites/demos/app/credit-card-form/background-image-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/credit-card-form/background-image.spec.ts b/examples/sites/demos/app/credit-card-form/background-image.spec.ts similarity index 91% rename from examples/docs/resources/pc/demo/credit-card-form/background-image.spec.ts rename to examples/sites/demos/app/credit-card-form/background-image.spec.ts index 8ce07b556..fe7c80065 100644 --- a/examples/docs/resources/pc/demo/credit-card-form/background-image.spec.ts +++ b/examples/sites/demos/app/credit-card-form/background-image.spec.ts @@ -5,6 +5,6 @@ test('背景图片', async ({ page }) => { await page.goto('http://localhost:7130/pc/credit-card-form/background-image') await expect(page.locator('.-front > .credit-card-item__cover > img')).toHaveAttribute( 'src', - 'static/images/mountain.png' + '/static/images/mountain.png' ) }) diff --git a/examples/docs/resources/pc/demo/credit-card-form/background-image.vue b/examples/sites/demos/app/credit-card-form/background-image.vue similarity index 82% rename from examples/docs/resources/pc/demo/credit-card-form/background-image.vue rename to examples/sites/demos/app/credit-card-form/background-image.vue index e3b1cc73d..cda8cc4ab 100644 --- a/examples/docs/resources/pc/demo/credit-card-form/background-image.vue +++ b/examples/sites/demos/app/credit-card-form/background-image.vue @@ -11,7 +11,7 @@ export default { }, data() { return { - backgroundImage: 'static/images/mountain.png', + backgroundImage: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, formData: { cardName: '', cardNumber: '', diff --git a/examples/sites/demos/app/credit-card-form/basic-usage-composition-api.vue b/examples/sites/demos/app/credit-card-form/basic-usage-composition-api.vue new file mode 100644 index 000000000..d16256624 --- /dev/null +++ b/examples/sites/demos/app/credit-card-form/basic-usage-composition-api.vue @@ -0,0 +1,16 @@ + + + diff --git a/examples/docs/resources/pc/demo/credit-card-form/basic-usage.spec.ts b/examples/sites/demos/app/credit-card-form/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/credit-card-form/basic-usage.spec.ts rename to examples/sites/demos/app/credit-card-form/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/credit-card-form/basic-usage.vue b/examples/sites/demos/app/credit-card-form/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/credit-card-form/basic-usage.vue rename to examples/sites/demos/app/credit-card-form/basic-usage.vue diff --git a/examples/sites/demos/app/credit-card-form/credit-card-form-events-composition-api.vue b/examples/sites/demos/app/credit-card-form/credit-card-form-events-composition-api.vue new file mode 100644 index 000000000..1ec6f0ee6 --- /dev/null +++ b/examples/sites/demos/app/credit-card-form/credit-card-form-events-composition-api.vue @@ -0,0 +1,51 @@ + + + diff --git a/examples/docs/resources/pc/demo/credit-card-form/credit-card-form-events.spec.ts b/examples/sites/demos/app/credit-card-form/credit-card-form-events.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/credit-card-form/credit-card-form-events.spec.ts rename to examples/sites/demos/app/credit-card-form/credit-card-form-events.spec.ts diff --git a/examples/docs/resources/pc/demo/credit-card-form/credit-card-form-events.vue b/examples/sites/demos/app/credit-card-form/credit-card-form-events.vue similarity index 100% rename from examples/docs/resources/pc/demo/credit-card-form/credit-card-form-events.vue rename to examples/sites/demos/app/credit-card-form/credit-card-form-events.vue diff --git a/examples/sites/demos/app/credit-card-form/webdoc/credit-card-form.cn.md b/examples/sites/demos/app/credit-card-form/webdoc/credit-card-form.cn.md new file mode 100644 index 000000000..fbe7d7b4c --- /dev/null +++ b/examples/sites/demos/app/credit-card-form/webdoc/credit-card-form.cn.md @@ -0,0 +1,7 @@ +--- +title: CreditCardForm 信用卡表单 +--- + +# CreditCardForm 信用卡表单 + +
通过表单输入实时改变信用卡卡片的相关信息。
diff --git a/examples/sites/demos/app/credit-card-form/webdoc/credit-card-form.en.md b/examples/sites/demos/app/credit-card-form/webdoc/credit-card-form.en.md new file mode 100644 index 000000000..b22cc2c5d --- /dev/null +++ b/examples/sites/demos/app/credit-card-form/webdoc/credit-card-form.en.md @@ -0,0 +1,7 @@ +--- +title: CreditCardForm +--- + +# CreditCardForm + +
Change information about credit cards in real time through form input.
diff --git a/examples/sites/demos/app/credit-card-form/webdoc/credit-card-form.js b/examples/sites/demos/app/credit-card-form/webdoc/credit-card-form.js new file mode 100644 index 000000000..d05d25d0a --- /dev/null +++ b/examples/sites/demos/app/credit-card-form/webdoc/credit-card-form.js @@ -0,0 +1,95 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'background-image', + 'name': { 'zh-CN': '背景图片', 'en-US': 'Background Image' }, + 'desc': { + 'zh-CN': '

通过 background-image 设置信用卡背景图片。

\n', + 'en-US': '

Use background-image to set the credit card background image.

\n' + }, + 'codeFiles': ['background-image.vue'] + }, + { + 'demoId': 'credit-card-form-events', + 'name': { 'zh-CN': '事件', 'en-US': 'Event' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['credit-card-form-events.vue'] + } + ], + apis: [ + { + 'name': 'credit-card-form', + 'type': 'component', + 'properties': [ + { + 'name': 'background-image', + 'type': 'String , Object', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置卡片的背景图片;', 'en-US': 'Set the background image of the card.' }, + 'demoId': 'background-image' + }, + { + 'name': 'form-data', + 'type': 'Object', + 'defaultValue': + "// 该属性的默认值为 \n{cardCvv: '', cardName: '', cardYear: '', cardMonth: '', cardNumber: ''}", + 'desc': { 'zh-CN': '设置信用卡显示数据', 'en-US': 'Setting Credit Card Display Data' }, + 'demoId': 'basic-usage' + } + ], + 'events': [ + { + 'name': 'submit', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '提交时触发的事件', 'en-US': 'Event triggered upon submission' }, + 'demoId': 'credit-card-form-events' + }, + { + 'name': 'input-card-number', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入卡号时触发的事件', 'en-US': 'Event triggered when a card number is entered' }, + 'demoId': 'credit-card-form-events' + }, + { + 'name': 'input-card-name', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入卡持有者时触发的事件', 'en-US': 'Event triggered when a card holder is entered' }, + 'demoId': 'credit-card-form-events' + }, + { + 'name': 'input-card-month', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '选择月时触发的事件', 'en-US': 'Event triggered when a month is selected' }, + 'demoId': 'credit-card-form-events' + }, + { + 'name': 'input-card-year', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '选择年时触发的事件', 'en-US': 'Event triggered when the year is selected' }, + 'demoId': 'credit-card-form-events' + }, + { + 'name': 'input-card-cvv', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '输入 cvv 时触发的事件', 'en-US': 'CVV input event triggered' }, + 'demoId': 'credit-card-form-events' + } + ], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/crop/aspect-ratio-composition-api.vue b/examples/sites/demos/app/crop/aspect-ratio-composition-api.vue new file mode 100644 index 000000000..cc5113db1 --- /dev/null +++ b/examples/sites/demos/app/crop/aspect-ratio-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/aspect-ratio.vue b/examples/sites/demos/app/crop/aspect-ratio.vue similarity index 80% rename from examples/docs/resources/pc/demo/crop/aspect-ratio.vue rename to examples/sites/demos/app/crop/aspect-ratio.vue index 88a7bc3e8..06a49b8ba 100644 --- a/examples/docs/resources/pc/demo/crop/aspect-ratio.vue +++ b/examples/sites/demos/app/crop/aspect-ratio.vue @@ -4,7 +4,7 @@ +
+ + +
+ + + diff --git a/examples/docs/resources/pc/demo/crop/auto-crop-area.vue b/examples/sites/demos/app/crop/auto-crop-area.vue similarity index 77% rename from examples/docs/resources/pc/demo/crop/auto-crop-area.vue rename to examples/sites/demos/app/crop/auto-crop-area.vue index d4014c32c..ec587c127 100644 --- a/examples/docs/resources/pc/demo/crop/auto-crop-area.vue +++ b/examples/sites/demos/app/crop/auto-crop-area.vue @@ -4,7 +4,7 @@
@@ -20,7 +20,8 @@ export default { }, data() { return { - visible: false + visible: false, + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png` } } } diff --git a/examples/sites/demos/app/crop/basic-usage-composition-api.vue b/examples/sites/demos/app/crop/basic-usage-composition-api.vue new file mode 100644 index 000000000..e39743f5e --- /dev/null +++ b/examples/sites/demos/app/crop/basic-usage-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/sites/demos/app/crop/basic-usage.vue b/examples/sites/demos/app/crop/basic-usage.vue new file mode 100644 index 000000000..f260684dd --- /dev/null +++ b/examples/sites/demos/app/crop/basic-usage.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/sites/demos/app/crop/crop-meth-composition-api.vue b/examples/sites/demos/app/crop/crop-meth-composition-api.vue new file mode 100644 index 000000000..629376a7a --- /dev/null +++ b/examples/sites/demos/app/crop/crop-meth-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/crop-meth.vue b/examples/sites/demos/app/crop/crop-meth.vue similarity index 87% rename from examples/docs/resources/pc/demo/crop/crop-meth.vue rename to examples/sites/demos/app/crop/crop-meth.vue index 4d91ac796..c5b12c662 100644 --- a/examples/docs/resources/pc/demo/crop/crop-meth.vue +++ b/examples/sites/demos/app/crop/crop-meth.vue @@ -6,7 +6,7 @@ ref="crop" :cropvisible="visible" @update:cropvisible="visible = $event" - src="static/images/mountain.png" + :src="imgUrl" @ready="ready" >
@@ -22,6 +22,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } }, diff --git a/examples/sites/demos/app/crop/drag-mode-composition-api.vue b/examples/sites/demos/app/crop/drag-mode-composition-api.vue new file mode 100644 index 000000000..210308207 --- /dev/null +++ b/examples/sites/demos/app/crop/drag-mode-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/drag-mode.vue b/examples/sites/demos/app/crop/drag-mode.vue similarity index 82% rename from examples/docs/resources/pc/demo/crop/drag-mode.vue rename to examples/sites/demos/app/crop/drag-mode.vue index c7fcfcd3a..189efddea 100644 --- a/examples/docs/resources/pc/demo/crop/drag-mode.vue +++ b/examples/sites/demos/app/crop/drag-mode.vue @@ -4,7 +4,7 @@ @@ -21,6 +21,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } } diff --git a/examples/sites/demos/app/crop/event-about-crop-composition-api.vue b/examples/sites/demos/app/crop/event-about-crop-composition-api.vue new file mode 100644 index 000000000..5ebd56df2 --- /dev/null +++ b/examples/sites/demos/app/crop/event-about-crop-composition-api.vue @@ -0,0 +1,54 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/event-about-crop.vue b/examples/sites/demos/app/crop/event-about-crop.vue similarity index 92% rename from examples/docs/resources/pc/demo/crop/event-about-crop.vue rename to examples/sites/demos/app/crop/event-about-crop.vue index bb73c3c69..24654ce45 100644 --- a/examples/docs/resources/pc/demo/crop/event-about-crop.vue +++ b/examples/sites/demos/app/crop/event-about-crop.vue @@ -6,7 +6,7 @@ :cropvisible="visible" @update:cropvisible="visible = $event" ref="crop" - src="static/images/mountain.png" + :src="imgUrl" @cropstart="cropstart" @cropmove="cropmove" @cropend="cropend" @@ -25,6 +25,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } }, diff --git a/examples/sites/demos/app/crop/event-ready-composition-api.vue b/examples/sites/demos/app/crop/event-ready-composition-api.vue new file mode 100644 index 000000000..c65f82fa0 --- /dev/null +++ b/examples/sites/demos/app/crop/event-ready-composition-api.vue @@ -0,0 +1,30 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/event-ready.vue b/examples/sites/demos/app/crop/event-ready.vue similarity index 86% rename from examples/docs/resources/pc/demo/crop/event-ready.vue rename to examples/sites/demos/app/crop/event-ready.vue index 80b22ab22..03bf77dc2 100644 --- a/examples/docs/resources/pc/demo/crop/event-ready.vue +++ b/examples/sites/demos/app/crop/event-ready.vue @@ -6,7 +6,7 @@ ref="crop" :cropvisible="visible" @update:cropvisible="visible = $event" - src="static/images/mountain.png" + :src="imgUrl" @ready="ready" >
@@ -22,6 +22,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } }, diff --git a/examples/sites/demos/app/crop/get-container-data-composition-api.vue b/examples/sites/demos/app/crop/get-container-data-composition-api.vue new file mode 100644 index 000000000..ce9ef60e3 --- /dev/null +++ b/examples/sites/demos/app/crop/get-container-data-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/get-container-data.vue b/examples/sites/demos/app/crop/get-container-data.vue similarity index 84% rename from examples/docs/resources/pc/demo/crop/get-container-data.vue rename to examples/sites/demos/app/crop/get-container-data.vue index 03f1acba4..594acaa0a 100644 --- a/examples/docs/resources/pc/demo/crop/get-container-data.vue +++ b/examples/sites/demos/app/crop/get-container-data.vue @@ -2,7 +2,7 @@
获取容器数据 - +
@@ -16,6 +16,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } }, diff --git a/examples/sites/demos/app/crop/get-crop-box-data-composition-api.vue b/examples/sites/demos/app/crop/get-crop-box-data-composition-api.vue new file mode 100644 index 000000000..63f3dbdb2 --- /dev/null +++ b/examples/sites/demos/app/crop/get-crop-box-data-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/get-crop-box-data.vue b/examples/sites/demos/app/crop/get-crop-box-data.vue similarity index 84% rename from examples/docs/resources/pc/demo/crop/get-crop-box-data.vue rename to examples/sites/demos/app/crop/get-crop-box-data.vue index 5c5e1360f..c190df2a0 100644 --- a/examples/docs/resources/pc/demo/crop/get-crop-box-data.vue +++ b/examples/sites/demos/app/crop/get-crop-box-data.vue @@ -2,7 +2,7 @@
获取裁剪框数据 - +
@@ -16,6 +16,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } }, diff --git a/examples/sites/demos/app/crop/get-cropped-canvas-composition-api.vue b/examples/sites/demos/app/crop/get-cropped-canvas-composition-api.vue new file mode 100644 index 000000000..b5d77e5b4 --- /dev/null +++ b/examples/sites/demos/app/crop/get-cropped-canvas-composition-api.vue @@ -0,0 +1,36 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/get-cropped-canvas.vue b/examples/sites/demos/app/crop/get-cropped-canvas.vue similarity index 83% rename from examples/docs/resources/pc/demo/crop/get-cropped-canvas.vue rename to examples/sites/demos/app/crop/get-cropped-canvas.vue index db60ffa2b..c700ad057 100644 --- a/examples/docs/resources/pc/demo/crop/get-cropped-canvas.vue +++ b/examples/sites/demos/app/crop/get-cropped-canvas.vue @@ -1,8 +1,10 @@ @@ -16,6 +18,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } }, diff --git a/examples/sites/demos/app/crop/get-data-composition-api.vue b/examples/sites/demos/app/crop/get-data-composition-api.vue new file mode 100644 index 000000000..5fdf4fe2e --- /dev/null +++ b/examples/sites/demos/app/crop/get-data-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/get-data.vue b/examples/sites/demos/app/crop/get-data.vue similarity index 86% rename from examples/docs/resources/pc/demo/crop/get-data.vue rename to examples/sites/demos/app/crop/get-data.vue index e85f24d36..945dffe77 100644 --- a/examples/docs/resources/pc/demo/crop/get-data.vue +++ b/examples/sites/demos/app/crop/get-data.vue @@ -3,7 +3,7 @@ 清除裁剪区域数据 获取裁剪区域数据 - +
@@ -17,6 +17,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } }, diff --git a/examples/sites/demos/app/crop/get-image-data-composition-api.vue b/examples/sites/demos/app/crop/get-image-data-composition-api.vue new file mode 100644 index 000000000..0d6b287d8 --- /dev/null +++ b/examples/sites/demos/app/crop/get-image-data-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/get-image-data.vue b/examples/sites/demos/app/crop/get-image-data.vue similarity index 83% rename from examples/docs/resources/pc/demo/crop/get-image-data.vue rename to examples/sites/demos/app/crop/get-image-data.vue index 5cd158f42..590695306 100644 --- a/examples/docs/resources/pc/demo/crop/get-image-data.vue +++ b/examples/sites/demos/app/crop/get-image-data.vue @@ -2,7 +2,7 @@
获取图像数据 - +
@@ -16,6 +16,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } }, diff --git a/examples/sites/demos/app/crop/min-crop-box-width-height-composition-api.vue b/examples/sites/demos/app/crop/min-crop-box-width-height-composition-api.vue new file mode 100644 index 000000000..5049b8453 --- /dev/null +++ b/examples/sites/demos/app/crop/min-crop-box-width-height-composition-api.vue @@ -0,0 +1,22 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/min-crop-box-width-height.vue b/examples/sites/demos/app/crop/min-crop-box-width-height.vue similarity index 84% rename from examples/docs/resources/pc/demo/crop/min-crop-box-width-height.vue rename to examples/sites/demos/app/crop/min-crop-box-width-height.vue index d1040e747..6eaa4d57b 100644 --- a/examples/docs/resources/pc/demo/crop/min-crop-box-width-height.vue +++ b/examples/sites/demos/app/crop/min-crop-box-width-height.vue @@ -4,7 +4,7 @@ +
+ + +
+ + + diff --git a/examples/docs/resources/pc/demo/crop/no-background.vue b/examples/sites/demos/app/crop/no-background.vue similarity index 81% rename from examples/docs/resources/pc/demo/crop/no-background.vue rename to examples/sites/demos/app/crop/no-background.vue index 71835cf1e..4dcf4f204 100644 --- a/examples/docs/resources/pc/demo/crop/no-background.vue +++ b/examples/sites/demos/app/crop/no-background.vue @@ -4,7 +4,7 @@ @@ -20,6 +20,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } } diff --git a/examples/sites/demos/app/crop/no-guides-composition-api.vue b/examples/sites/demos/app/crop/no-guides-composition-api.vue new file mode 100644 index 000000000..0e014c9bc --- /dev/null +++ b/examples/sites/demos/app/crop/no-guides-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/sites/demos/app/crop/no-guides.vue b/examples/sites/demos/app/crop/no-guides.vue new file mode 100644 index 000000000..a212c760a --- /dev/null +++ b/examples/sites/demos/app/crop/no-guides.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/sites/demos/app/crop/no-modal-composition-api.vue b/examples/sites/demos/app/crop/no-modal-composition-api.vue new file mode 100644 index 000000000..f5c87066f --- /dev/null +++ b/examples/sites/demos/app/crop/no-modal-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/sites/demos/app/crop/no-modal.vue b/examples/sites/demos/app/crop/no-modal.vue new file mode 100644 index 000000000..a45b49d76 --- /dev/null +++ b/examples/sites/demos/app/crop/no-modal.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/sites/demos/app/crop/replace-image-composition-api.vue b/examples/sites/demos/app/crop/replace-image-composition-api.vue new file mode 100644 index 000000000..72efd9bea --- /dev/null +++ b/examples/sites/demos/app/crop/replace-image-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/replace-image.vue b/examples/sites/demos/app/crop/replace-image.vue similarity index 76% rename from examples/docs/resources/pc/demo/crop/replace-image.vue rename to examples/sites/demos/app/crop/replace-image.vue index e399a7fe1..e2e5f2a54 100644 --- a/examples/docs/resources/pc/demo/crop/replace-image.vue +++ b/examples/sites/demos/app/crop/replace-image.vue @@ -6,7 +6,7 @@ ref="crop" :cropvisible="visible" @update:cropvisible="visible = $event" - src="static/images/mountain.png" + :src="imgUrl" zoomable :rotatable="false" >
@@ -23,12 +23,13 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } }, methods: { replaceHandle() { - this.$refs.crop.replace('static/images/bridge.jpg') + this.$refs.crop.replace(`${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/bridge.jpg`) } } } diff --git a/examples/sites/demos/app/crop/view-mode-composition-api.vue b/examples/sites/demos/app/crop/view-mode-composition-api.vue new file mode 100644 index 000000000..257293dd9 --- /dev/null +++ b/examples/sites/demos/app/crop/view-mode-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/sites/demos/app/crop/view-mode.vue b/examples/sites/demos/app/crop/view-mode.vue new file mode 100644 index 000000000..c652a4e71 --- /dev/null +++ b/examples/sites/demos/app/crop/view-mode.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/sites/demos/app/crop/webdoc/crop.cn.md b/examples/sites/demos/app/crop/webdoc/crop.cn.md new file mode 100644 index 000000000..c1054acb1 --- /dev/null +++ b/examples/sites/demos/app/crop/webdoc/crop.cn.md @@ -0,0 +1,7 @@ +--- +title: Crop 图片裁剪 +--- + +# Crop 图片裁剪 + +
Crop 图像裁切,可预览,支持 JPG 和 PNG 格式,浏览图像可以手动调整选择头像区域。
diff --git a/examples/sites/demos/app/crop/webdoc/crop.en.md b/examples/sites/demos/app/crop/webdoc/crop.en.md new file mode 100644 index 000000000..8f4d48495 --- /dev/null +++ b/examples/sites/demos/app/crop/webdoc/crop.en.md @@ -0,0 +1,7 @@ +--- +title: Crop Image Crop +--- + +# Crop Image Crop + +
Crop image cropping, preview, JPG and PNG formats are supported. You can manually adjust the selected avatar area when browsing images.
diff --git a/examples/sites/demos/app/crop/webdoc/crop.js b/examples/sites/demos/app/crop/webdoc/crop.js new file mode 100644 index 000000000..d7a154eab --- /dev/null +++ b/examples/sites/demos/app/crop/webdoc/crop.js @@ -0,0 +1,671 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': + '

通过 src 属性设置默认裁剪的图片源路径,并通过 cropvisible 属性来控制裁剪弹框是否可见。

\n', + 'en-US': + '

The src attribute is used to set the default cropping image source path, and the cropvisible attribute is used to control whether the cropping dialog box is visible.

\n' + }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'aspect-ratio', + 'name': { 'zh-CN': '裁剪框宽高比', 'en-US': 'Aspect-to-height ratio of the crop box' }, + 'desc': { + 'zh-CN': + '

通过 aspect-ratio 属性可以设置裁剪框的宽高比例,默认为 16 / 9 。还可以通过调用 setAspectRatio 方法来设置裁切框的宽高比。\n通过 center 属性可以设置裁剪框是否在图片正中心。

\n', + 'en-US': + '

You can use the aspect-ratio attribute to set the aspect ratio of the crop box. The default value is 16 / 9. You can also set the aspect ratio of the trim box by calling the setAspectRatio method. \nThe center attribute can be used to set whether the crop frame is in the center of the image.

\n' + }, + 'codeFiles': ['aspect-ratio.vue'] + }, + { + 'demoId': 'min-crop-box-width-height', + 'name': { 'zh-CN': '裁剪框最小宽高', 'en-US': 'Minimum width and height of the crop box' }, + 'desc': { + 'zh-CN': + '

通过属性 min-crop-box-widthmin-crop-box-height 设置裁剪框最小宽高。设置后,调整裁剪框宽高时,调整到最小值后将不能再调整。\n通过属性 mmin-container-widthmin-container-height 设置容器的最小宽度,最小高度。

\n', + 'en-US': + '

Set the minimum width and height of the cropping frame through the min-crop-box-width and min-crop-box-height attributes. After this parameter is set, the width and height of the cropping box cannot be adjusted after the width and height are adjusted to the minimum value. \n Set the minimum width and height of the container through the mmin-container-width and min-container-height attributes.

\n' + }, + 'codeFiles': ['min-crop-box-width-height.vue'] + }, + { + 'demoId': 'no-background', + 'name': { 'zh-CN': '不显示网格背景', 'en-US': 'Do not display the grid background.' }, + 'desc': { + 'zh-CN': '

设置 background 属性为 false 后,将不显示容器的网格背景。

\n', + 'en-US': + '

When background is set to false, the grid background of the container is not displayed.

\n' + }, + 'codeFiles': ['no-background.vue'] + }, + { + 'demoId': 'no-guides', + 'name': { 'zh-CN': '不显示虚线', 'en-US': 'Do not display dotted lines.' }, + 'desc': { + 'zh-CN': '

设置 guides 属性为 false 将取消裁剪框上方的虚线显示。

\n', + 'en-US': + '

Setting guides to false will cancel the dotted line above the crop box.

\n' + }, + 'codeFiles': ['no-guides.vue'] + }, + { + 'demoId': 'no-modal', + 'name': { 'zh-CN': '不显示模态', 'en-US': 'Do not display modal' }, + 'desc': { + 'zh-CN': '

设置 modal 属性为 false 将取消裁剪框下方图片上方的模态层显示。

\n', + 'en-US': + '

Setting modal to false cancels the display of the modal layer above the image below the crop box.

\n' + }, + 'codeFiles': ['no-modal.vue'] + }, + { + 'demoId': 'view-mode', + 'name': { 'zh-CN': '视图模式', 'en-US': 'View mode' }, + 'desc': { + 'zh-CN': + '

通过 view-mode 属性可以设置裁剪框的视图模式,有 0123 四种选项,默认为 0

\n

view-mode 选项说明

\n

0:裁剪框可以移动到图片外面。\n1:裁剪框只能在图片内移动。\n2:图片不全部铺满容器,缩小时可以有一边出现空隙。\n3:图片填充整个容器。

\n
\n', + 'en-US': + '

You can set the view mode of the crop box through the view-mode attribute. There are four options: 0, 1, 2, and 3. The default value is 0.

\n

view-mode option description

\n

0: The crop box can be moved outside the image. \n1: The crop box can only be moved within the image. \n2: The image is not completely covered in the container. A gap may appear on one side when the image is zoomed out. \n3: fills the entire container with an image.

\n
\n' + }, + 'codeFiles': ['view-mode.vue'] + }, + { + 'demoId': 'drag-mode', + 'name': { 'zh-CN': '拖拽模式', 'en-US': 'Drag Mode' }, + 'desc': { + 'zh-CN': + '

通过 drag-mode 属性可以设置裁剪框的拖拽模式,有 cropmovenone 三种选项,默认为 crop

\n

drag-mode 选项说明

\n

crop:当裁剪框取消后,按住鼠标左键在图片区域拖拽,将产生一个新的裁剪框。\nmove:当裁剪框取消后,按住鼠标左键将移动图片。\nnone:当裁剪框取消后,不能裁剪、也不能移动图片。\nmovable 控制图片是否可以移动,默认为 true。

\n
\n', + 'en-US': + '

You can set the drag mode of the crop box through the drag-mode attribute. There are three options: crop, move, and none. The default value is crop.

\n

drag-mode Option Description

\n

crop: After the cropping box is canceled, hold down the left mouse button and drag it in the image area to generate a new cropping box. \nmove: After the cropping box is canceled, hold down the left mouse button to move the image. \nnone: After the crop box is canceled, the image cannot be cropped or moved. \nmovable specifies whether an image can be moved. The default value is true.

\n
\n' + }, + 'codeFiles': ['drag-mode.vue'] + }, + { + 'demoId': 'auto-crop-area', + 'name': { 'zh-CN': '自动裁剪面积', 'en-US': 'Automatically Cropped Area' }, + 'desc': { + 'zh-CN': + '

初始化时,通过属性 auto-crop-area 可以设置裁剪框自动裁剪的面积,默认为 0.8,在 auto-crop 属性为 true 时生效。

\n', + 'en-US': + '

During initialization, the auto-crop-area attribute can be used to set the area of the cropping box. The default value is 0.8. This parameter is valid only when auto-crop is set to true.

\n' + }, + 'codeFiles': ['auto-crop-area.vue'] + }, + { + 'demoId': 'get-container-data', + 'name': { 'zh-CN': '获取容器数据', 'en-US': 'Obtain container data' }, + 'desc': { + 'zh-CN': '

调用 getContainerData 方法可以获取容器的大小数据。

\n', + 'en-US': '

Invoke the getContainerData method to obtain the container size data.

\n' + }, + 'codeFiles': ['get-container-data.vue'] + }, + { + 'demoId': 'get-crop-box-data', + 'name': { 'zh-CN': '获取剪切框数据', 'en-US': 'Obtain clip box data' }, + 'desc': { + 'zh-CN': '

调用 getCropBoxData 方法可以获取剪切框的位置和大小数据。

\n', + 'en-US': + '

Invoke the getCropBoxData method to obtain the position and size of the clip box.

\n' + }, + 'codeFiles': ['get-crop-box-data.vue'] + }, + { + 'demoId': 'get-cropped-canvas', + 'name': { 'zh-CN': '获取裁剪后的图片数据', 'en-US': 'Obtain the cropped image data' }, + 'desc': { + 'zh-CN': + '

调用 getCroppedCanvas 方法可以获取裁剪后的图片数据,搭配 toDataURL 方法将转成 base64 图片数据,搭配 toBlob 方法将生成 Blob 图片数据。

\n', + 'en-US': + '

Invoke the getCroppedCanvas method to obtain the cropped image data. Use the toDataURL method to convert the cropped image data to Base64 image data. Use the toBlob method to generate Blob image data.

\n' + }, + 'codeFiles': ['get-cropped-canvas.vue'] + }, + { + 'demoId': 'get-data', + 'name': { 'zh-CN': '获取裁剪区域数据', 'en-US': 'Obtain crop area data' }, + 'desc': { + 'zh-CN': '

调用 getData 方法可以获取裁剪区域的位置以及大小。

\n', + 'en-US': + '

Invoke the getData method to obtain the position and size of the cropping area.

\n' + }, + 'codeFiles': ['get-data.vue'] + }, + { + 'demoId': 'get-image-data', + 'name': { 'zh-CN': '获取图像数据', 'en-US': 'Obtain Image Data' }, + 'desc': { + 'zh-CN': + '

调用 getImageData 方法可以获取图像位置、大小和其他相关数据,若想获取画布位置和大小数据可以调用 getCanvasData 方法。

\n', + 'en-US': + '

Invoke the getImageData method to obtain the image position, size, and other related data. To obtain the canvas position and size data, call the getCanvasData method.

\n' + }, + 'codeFiles': ['get-image-data.vue'] + }, + { + 'demoId': 'replace-image', + 'name': { 'zh-CN': '替换图片', 'en-US': 'Replace Image' }, + 'desc': { + 'zh-CN': + '

调用 replace 方法可以替换图像的 src 并重新构建 cropper 。 通过 rotatable 属性控制图片旋转,默认为 true 。

\n', + 'en-US': + '

Invoke the replace method to replace the image src and rebuild the cropper. The rotatable attribute is used to control image rotation. The default value is true.

\n' + }, + 'codeFiles': ['replace-image.vue'] + }, + { + 'demoId': 'replace-image1', + 'name': { 'zh-CN': '放大图片', 'en-US': 'Enlarge Image' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['replace-image.vue'] + }, + { + 'demoId': 'wheel-zoom-ratio', + 'name': { + 'zh-CN': '鼠标滚轮缩放图像时比例', + 'en-US': 'Scale when the mouse wheel is used to zoom in or out an image' + }, + 'desc': { + 'zh-CN': + '

zoom-on-wheel 属性为 true 情况下,通过 wheel-zoom-ratio 属性可以设置缩放比例,默认为 0.1

\n', + 'en-US': + '

zoom-on-wheel attribute is set to true, you can use the wheel-zoom-ratio attribute to set the scaling ratio. The default value is 0.1.

\n' + }, + 'codeFiles': ['wheel-zoom-ratio.vue'] + }, + { + 'demoId': 'zoom-on-wheel', + 'name': { 'zh-CN': '禁用鼠标滚轮缩放图像', 'en-US': 'Disable the mouse wheel to zoom in or out the image.' }, + 'desc': { + 'zh-CN': + '

设置 zoom-on-wheel 属性为 false 后,将不允许通过滚动鼠标滚轮来缩放图像。

\n', + 'en-US': + '

After the zoom-on-wheel attribute is set to false, the image cannot be zoomed in or out by scrolling the mouse wheel.

\n' + }, + 'codeFiles': ['zoom-on-wheel.vue'] + }, + { + 'demoId': 'event-ready', + 'name': { 'zh-CN': 'ready 事件', 'en-US': 'ready event' }, + 'desc': { + 'zh-CN': '

当一个 cropper 实例完全构建时触发 ready 事件。

\n', + 'en-US': '

When a cropper instance is completely built, the ready event is triggered.

\n' + }, + 'codeFiles': ['event-ready.vue'] + }, + { + 'demoId': 'crop-meth', + 'name': { 'zh-CN': '裁剪框方法 事件', 'en-US': 'Crop box method event' }, + 'desc': { + 'zh-CN': + '

当一个 cropper 实例完全构建时触发 disable 方法禁用裁剪框,当触发 enable 启用裁剪框

\n', + 'en-US': + '

When a cropper instance is completely built, the disable method is triggered to disable the cropping box. When the enable method is triggered to enable the cropping box

\n' + }, + 'codeFiles': ['crop-meth.vue'] + }, + { + 'demoId': 'event-about-crop', + 'name': { 'zh-CN': '裁剪相关事件', 'en-US': 'Cutout Event' }, + 'desc': { + 'zh-CN': + '

TIP

\n

说明当画布或剪切框开始发生变化时触发 cropstart 事件\n当画布或剪切框正在发生变化时触发 cropmove 事件\n当画布或剪切框发生变化结束时触发 cropend 事件\n当画布或裁剪框发生改变时触发 crop 事件\n通过触发 getCanvasData 获取画布 Canvas(图像包装器)位置和大小数据

\n
\n', + 'en-US': + '

TIP

\n

Description: The cropstart event is triggered when the canvas or clipping box starts to change.\nThe cropmove event is triggered when the canvas or clipping box is changed.\nThe cropen event is triggered when the canvas or clipping box ends. dEvent\nThe crop event is triggered when the canvas or crop box changes. \nThe getCanvasData event is triggered to obtain the position and size data of the canvas (image wrapper)

\n
\n' + }, + 'codeFiles': ['event-about-crop.vue'] + } + ], + apis: [ + { + 'name': 'crop', + 'type': 'component', + 'properties': [ + { + 'name': 'crop-type', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置图片裁剪后返回的类型,可配置为 blob 和 base64,默认为 base64 。', + 'en-US': + 'Type of the image that is returned after cropping. The value can be blob or base64. The default value is base64.' + }, + 'demoId': 'get-cropped-canvas' + }, + { + 'name': 'preview', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置裁剪区域图片是否可预览,默认为 false 。', + 'en-US': 'Specifies whether images in the cropping area can be previewed. The default value is false.' + }, + 'demoId': '' + }, + { + 'name': 'quality', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置图片裁剪后的压缩比例,值在 0-1 之间,默认为 0.92 。', + 'en-US': + 'Set the compression ratio of the cropped image. The value ranges from 0 to 1. The default value is 0.92.' + }, + 'demoId': '' + }, + { + 'name': 'src', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认裁剪的源图片', 'en-US': 'Default cropped source image' }, + 'demoId': 'no-background' + }, + { + 'name': 'view-mode', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '定义 cropper 的视图模式;默认为 0;0:没有限制,3 可以移动到 2 外。1:3 只能在 2 内移动。2:2 图片不全部铺满 1 (即缩小时可以有一边出现空隙)。3:2 图片填充整个 1 。', + 'en-US': + 'Defines the view mode of the cropper. The default value is 0. 0: no restriction. The value 3 can be moved out of the value 2. 1:3 can only be moved within 2. The 2:2 picture is not completely covered with 1 (i.e., there may be gaps on one side when the picture is zoomed out). 3: 2 The image fills the entire 1.' + }, + 'demoId': 'view-mode' + }, + { + 'name': 'drag-mode', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': + "定义 cropper 的拖拽模式;默认为 'crop';'crop': 可以产生一个新的裁剪框 3 。'move':只可以移动图片 3 。'none': 什么也不处理。", + 'en-US': + "Defines the drag mode of the cropper. The default value is'crop'. 'Crop': A new crop box 3 can be generated. 'move': Only image 3 can be moved. 'none': no action is required." + }, + 'demoId': 'drag-mode' + }, + { + 'name': 'aspect-ratio', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '裁剪框的宽高比;默认为 16 / 9', + 'en-US': 'Aspect-to-height ratio of the crop box; The default value is 16 / 9' + }, + 'demoId': 'aspect-ratio' + }, + { + 'name': 'max-size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置待裁剪图片的最大大小,默认为 1M ;默认为 1M', + 'en-US': + 'Set the maximum size of the image to be cropped. The default value is 1 MB. The default value is 1M' + }, + 'demoId': '' + }, + { + 'name': 'modal', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '是否显示图片上方裁剪框下方的黑色模态;默认为 true', + 'en-US': + 'Whether to display the black mode below the cropping box above the image; The default value is true.' + }, + 'demoId': 'no-modal' + }, + { + 'name': 'guides', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '是否在裁剪框上方显示虚线;默认为 true', + 'en-US': 'Whether to display dotted lines above the crop box; The default value is true.' + }, + 'demoId': 'no-guides' + }, + { + 'name': 'center', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '裁剪框是否在图片正中心;默认为 true', + 'en-US': 'Whether the cropping frame is in the center of the image; The default value is true.' + }, + 'demoId': 'aspect-ratio' + }, + { + 'name': 'background', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '是否显示容器的网格背景;默认为 true', + 'en-US': 'Whether to display the grid background of the container; The default value is true.' + }, + 'demoId': 'no-background' + }, + { + 'name': 'movable', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '是否允许可以移动后面的图片;默认为 true', + 'en-US': 'Indicates whether the image can be moved. The default value is true.' + }, + 'demoId': 'drag-mode' + }, + { + 'name': 'rotatable', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '是否允许旋转图像;默认为 true', + 'en-US': 'Indicates whether images can be rotated. The default value is true.' + }, + 'demoId': 'replace-image' + }, + { + 'name': 'zoomable', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '是否允许放大图像;默认为 true', + 'en-US': 'Whether to allow image zooming in; The default value is true.' + }, + 'demoId': 'replace-image' + }, + { + 'name': 'zoom-on-wheel', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '是否可以通过滚动鼠标滚轮来缩放图像;默认为 true', + 'en-US': + 'Specifies whether you can zoom in or out an image by scrolling the mouse wheel. The default value is true.' + }, + 'demoId': 'zoom-on-wheel' + }, + { + 'name': 'wheel-zoom-ratio', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '用鼠标移动图像时,定义缩放比例;默认为 0.1', + 'en-US': 'Define the scaling ratio when moving the image with the mouse. The default value is 0.1' + }, + 'demoId': 'wheel-zoom-ratio' + }, + { + 'name': 'min-container-width', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '容器的最小宽度;默认为 652', + 'en-US': 'Minimum width of a container; The default value is 652' + }, + 'demoId': 'min-crop-box-width-height' + }, + { + 'name': 'min-container-height', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '容器的最小高度;默认为 300', + 'en-US': 'Minimum height of a container; The default value is 300' + }, + 'demoId': 'min-crop-box-width-height' + }, + { + 'name': 'min-crop-box-width', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '裁剪层的最小宽度;默认为 0', + 'en-US': 'Minimum width of the cropping layer; The default value is 0' + }, + 'demoId': 'min-crop-box-width-height' + }, + { + 'name': 'min-crop-box-height', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '裁剪层的最小高度;默认为 0', + 'en-US': 'Minimum height of the crop layer; The default value is 0' + }, + 'demoId': 'min-crop-box-width-height' + }, + { + 'name': 'auto-crop', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '初始化时,是否自动显示裁剪框;默认为 true', + 'en-US': + 'Indicates whether to automatically display the crop box during initialization. The default value is true.' + }, + 'demoId': 'auto-crop-area' + }, + { + 'name': 'auto-crop-area', + 'type': 'Number', + 'defaultValue': '', + 'desc': { + 'zh-CN': '定义自动裁剪面积大小(百分比);默认为 0.8', + 'en-US': 'Defines the automatic cropping area size (percentage). The default value is 0.8' + }, + 'demoId': 'auto-crop-area' + }, + { + 'name': 'cropvisible', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置裁剪弹框是否可见;默认为 false', + 'en-US': 'Set whether the cropping dialog box is visible. The default value is false' + }, + 'demoId': 'min-crop-box-width-height' + } + ], + 'events': [ + { + 'name': 'ready', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当一个 cropper 实例完全构建时触发', + 'en-US': 'This event is triggered when a cropper instance is completely built.' + }, + 'demoId': 'event-ready' + }, + { + 'name': 'cropdata', + 'type': 'Function(data)', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'cropdata 事件回调函数中可以拿到裁剪后的数据,默认为 base64 数据', + 'en-US': + 'The tailored data can be obtained from the cropdata event callback function. The default value is Base64 data.' + }, + 'demoId': 'event-about-crop' + }, + { + 'name': 'cropstart', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当画布(图像包装器)或剪切框开始发生变化时触发;回调参数为 (event: Event)', + 'en-US': + 'Triggered when the canvas (image wrapper) or clipping box starts to change; The callback parameter is (event: Event)' + }, + 'demoId': 'event-about-crop' + }, + { + 'name': 'cropmove', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当画布(图像包装器)或剪切框正在发生变化时触发;回调参数为 (event: Event)', + 'en-US': + 'Triggered when the canvas (image wrapper) or clipping box is changing; The callback parameter is (event: Event)' + }, + 'demoId': 'event-about-crop' + }, + { + 'name': 'cropend', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当画布(图像包装器)或剪切框发生变化结束时触发;回调参数为 (event: Event)', + 'en-US': + 'Triggered when the canvas (image wrapper) or clipping box changes. The callback parameter is (event: Event)' + }, + 'demoId': 'event-about-crop' + }, + { + 'name': 'crop', + 'type': 'Function(value)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当画布(图像包装器)或裁剪框发生改变时触发;回调参数为 (event: Event),原生事件', + 'en-US': + 'Triggered when the canvas (image wrapper) or crop box changes; The callback parameter is (event: Event), native event' + }, + 'demoId': 'event-about-crop' + } + ], + 'slots': [], + 'methods': [ + { + 'name': 'getCroppedCanvas', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '获取裁剪后的图片数据;.getCroppedCanvas().toDataURL():转成 base64 图片;.getCroppedCanvas().toBlob():生成 Blob 图片数据', + 'en-US': + 'Obtain the cropped image data. .getCroppedCanvas().toDataURL(): Convert the image to a Base64 image. .getCroppedCanvas().toBlob(): Generate Blob image data' + }, + 'demoId': 'get-cropped-canvas' + }, + { + 'name': 'replace', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '替换图像的 src 并重新构建 cropper;参数为 图片 URL ', + 'en-US': 'Replace the image src and rebuild the cropper. The parameter is the image URL.' + }, + 'demoId': 'replace-image' + }, + { + 'name': 'clear', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '清除裁切框', 'en-US': 'Clear the cropping box' }, + 'demoId': 'get-data' + }, + { + 'name': 'getData', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '获取最终裁剪的区域位置和大小数据(根据原始图像的自然大小);参数为 (rounded) ,默认 false,设置 true 可以获取其所有数据;返回的数据类型为 Object', + 'en-US': + 'Obtain the position and size of the final cropped region (based on the natural size of the original image). The parameter is rounded. The default value is false. If this parameter is set to true, all data can be obtained. The returned data type is Object' + }, + 'demoId': 'get-data' + }, + { + 'name': 'getContainerData', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '获取 container 容器大小数据;返回的数据类型为 Object', + 'en-US': 'Obtain the container size data. The returned data type is Object' + }, + 'demoId': 'get-container-data' + }, + { + 'name': 'getImageData', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '获取图像 image 位置、大小和其他相关数据;返回的数据类型为 Object', + 'en-US': 'Obtain the image position, size, and other related data. The returned data type is Object' + }, + 'demoId': 'get-image-data' + }, + { + 'name': 'getCanvasData', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '获取画布 Canvas(图像包装器)位置和大小数据;返回的数据类型为 Object', + 'en-US': + 'Obtain the position and size of the canvas Canvas (image wrapper). The returned data type is Object' + }, + 'demoId': 'get-image-data' + }, + { + 'name': 'getCropBoxData', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '获取剪切框的位置和大小数据;返回的数据类型为 Object', + 'en-US': 'Obtain the position and size of the clip box. The returned data type is Object' + }, + 'demoId': 'get-crop-box-data' + }, + { + 'name': 'setAspectRatio', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '改变裁切框的宽高比;参数为(aspectRatio),类型 Number,是一个正数', + 'en-US': + 'Change the aspect ratio of the cutting frame; The parameter is (aspectRatio) and the type is Number. The value is a positive number.' + }, + 'demoId': 'aspect-ratio' + }, + { + 'name': 'disable', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '禁用裁切框(裁切框不可移动)', + 'en-US': 'Disable the cropping box (the cropping box cannot be moved).' + }, + 'demoId': 'crop-meth' + }, + { + 'name': 'enable', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '启用裁切框', 'en-US': 'Enable the cropping box' }, + 'demoId': 'event-ready' + }, + { + 'name': 'destroy', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '销毁 cropper 并从图像中删除整个 cropper', + 'en-US': 'Destroy the cropper and delete the entire cropper from the image.' + }, + 'demoId': 'event-ready' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/crop/wheel-zoom-ratio-composition-api.vue b/examples/sites/demos/app/crop/wheel-zoom-ratio-composition-api.vue new file mode 100644 index 000000000..05c37d206 --- /dev/null +++ b/examples/sites/demos/app/crop/wheel-zoom-ratio-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/wheel-zoom-ratio.vue b/examples/sites/demos/app/crop/wheel-zoom-ratio.vue similarity index 81% rename from examples/docs/resources/pc/demo/crop/wheel-zoom-ratio.vue rename to examples/sites/demos/app/crop/wheel-zoom-ratio.vue index 81e4f3d7c..4ce5ebc49 100644 --- a/examples/docs/resources/pc/demo/crop/wheel-zoom-ratio.vue +++ b/examples/sites/demos/app/crop/wheel-zoom-ratio.vue @@ -4,7 +4,7 @@ @@ -20,6 +20,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } } diff --git a/examples/sites/demos/app/crop/zoom-on-wheel-composition-api.vue b/examples/sites/demos/app/crop/zoom-on-wheel-composition-api.vue new file mode 100644 index 000000000..ae91cb023 --- /dev/null +++ b/examples/sites/demos/app/crop/zoom-on-wheel-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/crop/zoom-on-wheel.vue b/examples/sites/demos/app/crop/zoom-on-wheel.vue similarity index 81% rename from examples/docs/resources/pc/demo/crop/zoom-on-wheel.vue rename to examples/sites/demos/app/crop/zoom-on-wheel.vue index dd883d58b..cae7ac024 100644 --- a/examples/docs/resources/pc/demo/crop/zoom-on-wheel.vue +++ b/examples/sites/demos/app/crop/zoom-on-wheel.vue @@ -4,7 +4,7 @@ @@ -20,6 +20,7 @@ export default { }, data() { return { + imgUrl: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/mountain.png`, visible: false } } diff --git a/examples/sites/demos/app/currency/basic-usage-composition-api.vue b/examples/sites/demos/app/currency/basic-usage-composition-api.vue new file mode 100644 index 000000000..4cfcd7b24 --- /dev/null +++ b/examples/sites/demos/app/currency/basic-usage-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/currency/basic-usage.spec.ts b/examples/sites/demos/app/currency/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/currency/basic-usage.spec.ts rename to examples/sites/demos/app/currency/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/currency/basic-usage.vue b/examples/sites/demos/app/currency/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/currency/basic-usage.vue rename to examples/sites/demos/app/currency/basic-usage.vue diff --git a/examples/sites/demos/app/currency/custom-service-composition-api.vue b/examples/sites/demos/app/currency/custom-service-composition-api.vue new file mode 100644 index 000000000..e22bda1c7 --- /dev/null +++ b/examples/sites/demos/app/currency/custom-service-composition-api.vue @@ -0,0 +1,67 @@ + + + diff --git a/examples/sites/demos/app/currency/custom-service.spec.ts b/examples/sites/demos/app/currency/custom-service.spec.ts new file mode 100644 index 000000000..a9170eeb8 --- /dev/null +++ b/examples/sites/demos/app/currency/custom-service.spec.ts @@ -0,0 +1,11 @@ +import { test, expect } from '@playwright/test' + +test('自定义服务', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/currency/custom-service') + await page.locator('#preview').getByRole('textbox').click() + await page.waitForTimeout(500) + await page.getByRole('listitem').filter({ hasText: 'USD' }).click() + const inputBox = page.locator('#preview').getByRole('textbox').first() + await expect(inputBox).toHaveValue('USD') +}) diff --git a/examples/docs/resources/pc/demo/currency/custom-service.vue b/examples/sites/demos/app/currency/custom-service.vue similarity index 100% rename from examples/docs/resources/pc/demo/currency/custom-service.vue rename to examples/sites/demos/app/currency/custom-service.vue diff --git a/examples/sites/demos/app/currency/disable-currency-composition-api.vue b/examples/sites/demos/app/currency/disable-currency-composition-api.vue new file mode 100644 index 000000000..3a5092ba9 --- /dev/null +++ b/examples/sites/demos/app/currency/disable-currency-composition-api.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/docs/resources/pc/demo/currency/disable-currency.spec.ts b/examples/sites/demos/app/currency/disable-currency.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/currency/disable-currency.spec.ts rename to examples/sites/demos/app/currency/disable-currency.spec.ts diff --git a/examples/docs/resources/pc/demo/currency/disable-currency.vue b/examples/sites/demos/app/currency/disable-currency.vue similarity index 100% rename from examples/docs/resources/pc/demo/currency/disable-currency.vue rename to examples/sites/demos/app/currency/disable-currency.vue diff --git a/examples/sites/demos/app/currency/fields-composition-api.vue b/examples/sites/demos/app/currency/fields-composition-api.vue new file mode 100644 index 000000000..36dcf62ea --- /dev/null +++ b/examples/sites/demos/app/currency/fields-composition-api.vue @@ -0,0 +1,34 @@ + + + diff --git a/examples/docs/resources/pc/demo/currency/fields.vue b/examples/sites/demos/app/currency/fields.vue similarity index 100% rename from examples/docs/resources/pc/demo/currency/fields.vue rename to examples/sites/demos/app/currency/fields.vue diff --git a/examples/sites/demos/app/currency/size-composition-api.vue b/examples/sites/demos/app/currency/size-composition-api.vue new file mode 100644 index 000000000..53a97eb1a --- /dev/null +++ b/examples/sites/demos/app/currency/size-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/currency/size.spec.ts b/examples/sites/demos/app/currency/size.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/currency/size.spec.ts rename to examples/sites/demos/app/currency/size.spec.ts diff --git a/examples/docs/resources/pc/demo/currency/size.vue b/examples/sites/demos/app/currency/size.vue similarity index 100% rename from examples/docs/resources/pc/demo/currency/size.vue rename to examples/sites/demos/app/currency/size.vue diff --git a/examples/sites/demos/app/currency/webdoc/currency.cn.md b/examples/sites/demos/app/currency/webdoc/currency.cn.md new file mode 100644 index 000000000..a511cdf02 --- /dev/null +++ b/examples/sites/demos/app/currency/webdoc/currency.cn.md @@ -0,0 +1,7 @@ +--- +title: Currency 币种 +--- + +# Currency 币种 + +
Currency 币种组件,用于货币名称展示及选择,通过配置数据源获取选项。
diff --git a/examples/sites/demos/app/currency/webdoc/currency.en.md b/examples/sites/demos/app/currency/webdoc/currency.en.md new file mode 100644 index 000000000..8855f04d6 --- /dev/null +++ b/examples/sites/demos/app/currency/webdoc/currency.en.md @@ -0,0 +1,7 @@ +--- +title: Currency +--- + +# Currency + +
Currency component, which is used to display and select currency names. The options are obtained by configuring the data source.
diff --git a/examples/sites/demos/app/currency/webdoc/currency.js b/examples/sites/demos/app/currency/webdoc/currency.js new file mode 100644 index 000000000..0c6fa2843 --- /dev/null +++ b/examples/sites/demos/app/currency/webdoc/currency.js @@ -0,0 +1,136 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'disable-currency', + 'name': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'desc': { + 'zh-CN': '

通过 disabled 属性设置组件是否禁用,默认值为 false。

\n', + 'en-US': + '

The disabled attribute is used to set whether to disable the component. The default value is false.

\n' + }, + 'codeFiles': ['disable-currency.vue'] + }, + { + 'demoId': 'custom-service', + 'name': { 'zh-CN': '自定义服务', 'en-US': 'Custom Service' }, + 'desc': { + 'zh-CN': + '

通过 fetch-currency 属性可以指定一个方法,在方法中可实现请求自定义的服务。\n通过 clearable 属性设置是否可以清空,默认值为 true。

\n', + 'en-US': + '

You can use the fetch-currency attribute to specify a method in which the service customized by the request can be implemented. \n The clearable attribute is used to set whether data can be cleared. The default value is true.

\n' + }, + 'codeFiles': ['custom-service.vue'] + }, + { + 'demoId': 'size', + 'name': { 'zh-CN': '设置组件大小', 'en-US': 'Set Component Size' }, + 'desc': { + 'zh-CN': '

可设置为:mediumsmallmini

\n', + 'en-US': '

can be set to medium, small, mini

\n' + }, + 'codeFiles': ['size.vue'] + } + ], + apis: [ + { + 'name': 'currency', + 'type': 'component', + 'properties': [ + { + 'name': 'modelValue / v-model', + 'type': 'String , Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置下拉框的值。', 'en-US': 'Set the value of the drop-down list box.' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置输入框内的提示占位文本。', + 'en-US': 'Set the prompt placeholder text in the text box.' + }, + 'demoId': 'disable-currency' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '为 popper 添加类名(可参考 popover 组件)', + 'en-US': 'Add a class name for the popper. For details, see the popover component.' + }, + 'demoId': '' + }, + { + 'name': 'popper-append-to-body', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': + '是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)', + 'en-US': + 'Indicates whether to insert the pop-up box to the body element. If an error occurs in locating a fault in the dialog box that is displayed, set this attribute to false (for details, see the select component).' + }, + 'demoId': '' + }, + { + 'name': 'fetch-currency', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义金额查询接口,返回一个Promise对象', + 'en-US': 'The user-defined amount query interface returns a Promise object.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'fields', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义数据映射,在没有使用框架服务时必填', + 'en-US': 'User-defined data mapping. This parameter is mandatory when the framework service is not used.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '输入框尺寸,只在 type!="textarea" 时有效;该属性的可选值为 medium / small / mini', + 'en-US': + 'Size of the text box. This parameter is valid only when type!="textarea". The optional values of this attribute are medium / small / mini' + }, + 'demoId': 'size' + }, + { + 'name': 'clearable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否显示清除按钮;是否可清空', 'en-US': 'Whether to display the Clear button; Clearable' }, + 'demoId': 'custom-service' + }, + { + 'name': 'disabled', + 'type': 'Boolen', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'demoId': 'disable-currency' + } + ], + 'events': [], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/date-picker/about-clear-composition-api.vue b/examples/sites/demos/app/date-picker/about-clear-composition-api.vue new file mode 100644 index 000000000..085ccf641 --- /dev/null +++ b/examples/sites/demos/app/date-picker/about-clear-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/about-clear.spec.ts b/examples/sites/demos/app/date-picker/about-clear.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/about-clear.spec.ts rename to examples/sites/demos/app/date-picker/about-clear.spec.ts diff --git a/examples/docs/resources/pc/demo/date-picker/about-clear.vue b/examples/sites/demos/app/date-picker/about-clear.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/about-clear.vue rename to examples/sites/demos/app/date-picker/about-clear.vue diff --git a/examples/sites/demos/app/date-picker/about-format-composition-api.vue b/examples/sites/demos/app/date-picker/about-format-composition-api.vue new file mode 100644 index 000000000..d1526228b --- /dev/null +++ b/examples/sites/demos/app/date-picker/about-format-composition-api.vue @@ -0,0 +1,34 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/about-format.spec.ts b/examples/sites/demos/app/date-picker/about-format.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/about-format.spec.ts rename to examples/sites/demos/app/date-picker/about-format.spec.ts diff --git a/examples/docs/resources/pc/demo/date-picker/about-format.vue b/examples/sites/demos/app/date-picker/about-format.vue similarity index 85% rename from examples/docs/resources/pc/demo/date-picker/about-format.vue rename to examples/sites/demos/app/date-picker/about-format.vue index 720206647..29d580e35 100644 --- a/examples/docs/resources/pc/demo/date-picker/about-format.vue +++ b/examples/sites/demos/app/date-picker/about-format.vue @@ -9,7 +9,11 @@

value-format 为 timestamp 时间戳

值:{{ value2 }}

- +

value-format 为 yyyy-MM-dd 格式

diff --git a/examples/sites/demos/app/date-picker/align-composition-api.vue b/examples/sites/demos/app/date-picker/align-composition-api.vue new file mode 100644 index 000000000..cdacf2c1d --- /dev/null +++ b/examples/sites/demos/app/date-picker/align-composition-api.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/align.spec.ts b/examples/sites/demos/app/date-picker/align.spec.ts similarity index 88% rename from examples/docs/resources/pc/demo/date-picker/align.spec.ts rename to examples/sites/demos/app/date-picker/align.spec.ts index b2c2f8666..e006c7a35 100644 --- a/examples/docs/resources/pc/demo/date-picker/align.spec.ts +++ b/examples/sites/demos/app/date-picker/align.spec.ts @@ -7,8 +7,8 @@ test('[DatePicker] 测试对齐方式', async ({ page }) => { // 左对齐 const leftDateInputDom = page.getByRole('textbox').nth(1) const leftDatePanelDom = page.locator('body > div:nth-child(3)') - console.log('leftDatePanelDom', leftDatePanelDom); - + console.log('leftDatePanelDom', leftDatePanelDom) + const { x: leftDateInputX } = await leftDateInputDom.boundingBox() await leftDateInputDom.click() const { x: leftDatePanelX } = await leftDatePanelDom.boundingBox() @@ -28,5 +28,7 @@ test('[DatePicker] 测试对齐方式', async ({ page }) => { const { x: centerDateInputX, width: centerDateInputWidth } = await centerDateInputDom.boundingBox() await centerDateInputDom.click() const { x: centerDatePanelX, width: centerDatePanelWidth } = await centerDatePanelDom.boundingBox() - expect(centerDateInputX + Math.round(centerDateInputWidth / 2) - centerDatePanelX - Math.round(centerDatePanelWidth / 2)).toBeCloseTo(0) + expect( + centerDateInputX + Math.round(centerDateInputWidth / 2) - centerDatePanelX - Math.round(centerDatePanelWidth / 2) + ).toBeCloseTo(0) }) diff --git a/examples/docs/resources/pc/demo/date-picker/align.vue b/examples/sites/demos/app/date-picker/align.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/align.vue rename to examples/sites/demos/app/date-picker/align.vue diff --git a/examples/sites/demos/app/date-picker/basic-usage-composition-api.vue b/examples/sites/demos/app/date-picker/basic-usage-composition-api.vue new file mode 100644 index 000000000..3f9bb3b7b --- /dev/null +++ b/examples/sites/demos/app/date-picker/basic-usage-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/sites/demos/app/date-picker/basic-usage.spec.ts b/examples/sites/demos/app/date-picker/basic-usage.spec.ts new file mode 100644 index 000000000..2db5db7ad --- /dev/null +++ b/examples/sites/demos/app/date-picker/basic-usage.spec.ts @@ -0,0 +1,87 @@ +import { test, expect } from '@playwright/test' + +test('[DatePicker] 测试日期选择和清除', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/date-picker/basic-usage') + const dateInput = page.getByRole('textbox', { name: '2023-05-20' }) + const dateInput2 = page.getByRole('textbox', { name: '2023-05-21' }) + const clearIcon = page.locator('#preview').getByRole('img').nth(1) + + await page.locator('#preview').getByRole('textbox').fill('2023-05-20') + await page.locator('#preview').getByRole('textbox').press('Enter') + await expect(dateInput).toBeVisible() + + // 测试日期选择 + await dateInput.click() + await page.getByText('21', { exact: true }).click() + await expect(dateInput2).toBeVisible() + + // 测试日期清除 + await dateInput2.hover() + await expect(clearIcon).toBeVisible() + await clearIcon.click() + await expect(dateInput2).not.toBeVisible() +}) + +test('[DatePicker] 测试上一月/下一月/前一年/后一年', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/date-picker/basic-usage') + const dateInputNextMonth = page.getByRole('textbox', { name: '2023-06-04' }) + const dateInputNextYear = page.getByRole('textbox', { name: '2024-06-01' }) + const dateInputPreMonth = page.getByRole('textbox', { name: '2023-05-14' }) + const dateInputPreYear = page.getByRole('textbox', { name: '2023-06-11' }) + + // 先输入一个日期,确保后续选中的月份、年份正确 + await page.locator('#preview').getByRole('textbox').click() + await page.locator('#preview').getByRole('textbox').fill('2023-05-20') + await page.locator('#preview').getByRole('textbox').press('Enter') + + // 下一月/后一年 + await page.locator('#preview').getByRole('textbox').click() + await page.getByRole('button', { name: '下个月' }).click() + await page.getByRole('row', { name: '4 5 6 7 8 9 10' }).getByText('4').click() + await expect(dateInputNextMonth).toBeVisible() + + await dateInputNextMonth.click() + await page.getByRole('button', { name: '后一年' }).click() + await page.getByRole('row', { name: '26 27 28 29 30 31 1' }).getByText('1', { exact: true }).click() + await expect(dateInputNextYear).toBeVisible() + + // 前一年/上一月 + await dateInputNextYear.click() + await page.getByRole('button', { name: '前一年' }).click() + await page.getByText('11', { exact: true }).click() + await expect(dateInputPreYear).toBeVisible() + + await dateInputPreYear.click() + await page.getByRole('button', { name: '上个月' }).click() + await page.getByText('14').click() + await expect(dateInputPreMonth).toBeVisible() +}) + +test('[DatePicker] 测试月份/年份选择', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/date-picker/basic-usage') + const dateInputMonth = page.getByRole('textbox', { name: '2023-06-04' }) + const dateInputYear = page.getByRole('textbox', { name: '2024-02-07' }) + + // 先输入一个日期,确保后续选中的月份、年份正确 + await page.locator('#preview').getByRole('textbox').click() + await page.locator('#preview').getByRole('textbox').fill('2023-04-20') + await page.locator('#preview').getByRole('textbox').press('Enter') + + // 选择月份 + await page.locator('#preview').getByRole('textbox').click() + await page.getByRole('button', { name: '4 月' }).click() + await page.getByText('六月').click() + await page.getByRole('row', { name: '4 5 6 7 8 9 10' }).getByText('4').click() + await expect(dateInputMonth).toBeVisible() + + // 选择年份 + await dateInputMonth.click() + await page.getByRole('button', { name: '2023 年' }).click() + await page.getByText('2024').click() + await page.getByText('二月', { exact: true }).click() + await page.getByRole('row', { name: '4 5 6 7 8 9 10' }).getByText('7').click() + await expect(dateInputYear).toBeVisible() +}) diff --git a/examples/docs/resources/pc/demo/date-picker/basic-usage.vue b/examples/sites/demos/app/date-picker/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/basic-usage.vue rename to examples/sites/demos/app/date-picker/basic-usage.vue diff --git a/examples/sites/demos/app/date-picker/clearable-composition-api.vue b/examples/sites/demos/app/date-picker/clearable-composition-api.vue new file mode 100644 index 000000000..204ce567d --- /dev/null +++ b/examples/sites/demos/app/date-picker/clearable-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/clearable.vue b/examples/sites/demos/app/date-picker/clearable.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/clearable.vue rename to examples/sites/demos/app/date-picker/clearable.vue diff --git a/examples/sites/demos/app/date-picker/custom-range-composition-api.vue b/examples/sites/demos/app/date-picker/custom-range-composition-api.vue new file mode 100644 index 000000000..fa5aedd39 --- /dev/null +++ b/examples/sites/demos/app/date-picker/custom-range-composition-api.vue @@ -0,0 +1,16 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/custom-range.spec.ts b/examples/sites/demos/app/date-picker/custom-range.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/custom-range.spec.ts rename to examples/sites/demos/app/date-picker/custom-range.spec.ts diff --git a/examples/docs/resources/pc/demo/date-picker/custom-range.vue b/examples/sites/demos/app/date-picker/custom-range.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/custom-range.vue rename to examples/sites/demos/app/date-picker/custom-range.vue diff --git a/examples/sites/demos/app/date-picker/custom-suffix-icon-composition-api.vue b/examples/sites/demos/app/date-picker/custom-suffix-icon-composition-api.vue new file mode 100644 index 000000000..6d128d76e --- /dev/null +++ b/examples/sites/demos/app/date-picker/custom-suffix-icon-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/sites/demos/app/date-picker/custom-suffix-icon.spec.ts b/examples/sites/demos/app/date-picker/custom-suffix-icon.spec.ts new file mode 100644 index 000000000..0200de109 --- /dev/null +++ b/examples/sites/demos/app/date-picker/custom-suffix-icon.spec.ts @@ -0,0 +1,11 @@ +import { expect, test } from '@playwright/test' + +test('[DatePicker] 测试自定义后置图标', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/date-picker/custom-suffix-icon') + const svgPathDom = page.locator('i path') + await expect(svgPathDom).toHaveAttribute( + 'd', + 'M19.1 13H4.9c-.5 0-.9-.4-.9-1s.4-1 .9-1h14.2c.5 0 .9.4.9 1s-.4 1-.9 1z' + ) +}) diff --git a/examples/docs/resources/pc/demo/date-picker/custom-suffix-icon.vue b/examples/sites/demos/app/date-picker/custom-suffix-icon.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/custom-suffix-icon.vue rename to examples/sites/demos/app/date-picker/custom-suffix-icon.vue diff --git a/examples/sites/demos/app/date-picker/custom-weeks-composition-api.vue b/examples/sites/demos/app/date-picker/custom-weeks-composition-api.vue new file mode 100644 index 000000000..6a6827fa4 --- /dev/null +++ b/examples/sites/demos/app/date-picker/custom-weeks-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/sites/demos/app/date-picker/custom-weeks.vue b/examples/sites/demos/app/date-picker/custom-weeks.vue new file mode 100644 index 000000000..2d8511ba5 --- /dev/null +++ b/examples/sites/demos/app/date-picker/custom-weeks.vue @@ -0,0 +1,36 @@ + + + diff --git a/examples/sites/demos/app/date-picker/date-picker-disabled-composition-api.vue b/examples/sites/demos/app/date-picker/date-picker-disabled-composition-api.vue new file mode 100644 index 000000000..e4f082b10 --- /dev/null +++ b/examples/sites/demos/app/date-picker/date-picker-disabled-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/date-picker-disabled.vue b/examples/sites/demos/app/date-picker/date-picker-disabled.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/date-picker-disabled.vue rename to examples/sites/demos/app/date-picker/date-picker-disabled.vue diff --git a/examples/sites/demos/app/date-picker/date-picker-events-composition-api.vue b/examples/sites/demos/app/date-picker/date-picker-events-composition-api.vue new file mode 100644 index 000000000..6f34a6d38 --- /dev/null +++ b/examples/sites/demos/app/date-picker/date-picker-events-composition-api.vue @@ -0,0 +1,43 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/date-picker-events.spec.ts b/examples/sites/demos/app/date-picker/date-picker-events.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/date-picker-events.spec.ts rename to examples/sites/demos/app/date-picker/date-picker-events.spec.ts diff --git a/examples/docs/resources/pc/demo/date-picker/date-picker-events.vue b/examples/sites/demos/app/date-picker/date-picker-events.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/date-picker-events.vue rename to examples/sites/demos/app/date-picker/date-picker-events.vue diff --git a/examples/sites/demos/app/date-picker/date-picker-options-disabledDate-composition-api.vue b/examples/sites/demos/app/date-picker/date-picker-options-disabledDate-composition-api.vue new file mode 100644 index 000000000..a5ca299c6 --- /dev/null +++ b/examples/sites/demos/app/date-picker/date-picker-options-disabledDate-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/date-picker-options-disabledDate.vue b/examples/sites/demos/app/date-picker/date-picker-options-disabledDate.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/date-picker-options-disabledDate.vue rename to examples/sites/demos/app/date-picker/date-picker-options-disabledDate.vue diff --git a/examples/sites/demos/app/date-picker/date-range-composition-api.vue b/examples/sites/demos/app/date-picker/date-range-composition-api.vue new file mode 100644 index 000000000..3791490cf --- /dev/null +++ b/examples/sites/demos/app/date-picker/date-range-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/sites/demos/app/date-picker/date-range-shortcuts-composition-api.vue b/examples/sites/demos/app/date-picker/date-range-shortcuts-composition-api.vue new file mode 100644 index 000000000..646a950f0 --- /dev/null +++ b/examples/sites/demos/app/date-picker/date-range-shortcuts-composition-api.vue @@ -0,0 +1,42 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/date-range-shortcuts.spec.ts b/examples/sites/demos/app/date-picker/date-range-shortcuts.spec.ts similarity index 95% rename from examples/docs/resources/pc/demo/date-picker/date-range-shortcuts.spec.ts rename to examples/sites/demos/app/date-picker/date-range-shortcuts.spec.ts index be793b6ab..272d50a28 100644 --- a/examples/docs/resources/pc/demo/date-picker/date-range-shortcuts.spec.ts +++ b/examples/sites/demos/app/date-picker/date-range-shortcuts.spec.ts @@ -1,13 +1,13 @@ import { test, expect } from '@playwright/test' // 将日期格式化为 YYYY-MM-DD 格式 -const formatDate = date => date.toISOString().slice(0, 10) +const formatDate = (date) => date.toISOString().slice(0, 10) test('[DatePicker] 测试日期范围快捷选项', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/date-range-shortcuts') const dateInputStartDate = page.getByRole('textbox').nth(1) - + // 最近一周 const startDateWeek = new Date() startDateWeek.setTime(startDateWeek.getTime() - 3600 * 1000 * 24 * 7) @@ -31,4 +31,4 @@ test('[DatePicker] 测试日期范围快捷选项', async ({ page }) => { await dateInputStartDate.click() await page.getByRole('button', { name: '最近三个月' }).click() expect(await dateInputStartDate.inputValue()).toBe(formatDate(startDateThreeMonth)) -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/date-range-shortcuts.vue b/examples/sites/demos/app/date-picker/date-range-shortcuts.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/date-range-shortcuts.vue rename to examples/sites/demos/app/date-picker/date-range-shortcuts.vue diff --git a/examples/docs/resources/pc/demo/date-picker/date-range.spec.ts b/examples/sites/demos/app/date-picker/date-range.spec.ts similarity index 99% rename from examples/docs/resources/pc/demo/date-picker/date-range.spec.ts rename to examples/sites/demos/app/date-picker/date-range.spec.ts index 397954e4e..504ab3a1f 100644 --- a/examples/docs/resources/pc/demo/date-picker/date-range.spec.ts +++ b/examples/sites/demos/app/date-picker/date-range.spec.ts @@ -15,4 +15,4 @@ test('测试日期范围选择', async ({ page }) => { await page.locator('#preview').getByRole('img').nth(1).click() expect(await startDateDom.inputValue()).not.toBe('2023-05-14') expect(await endDateDom.inputValue()).not.toBe('2023-05-20') -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/date-range.vue b/examples/sites/demos/app/date-picker/date-range.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/date-range.vue rename to examples/sites/demos/app/date-picker/date-range.vue diff --git a/examples/sites/demos/app/date-picker/date-shortcuts-composition-api.vue b/examples/sites/demos/app/date-picker/date-shortcuts-composition-api.vue new file mode 100644 index 000000000..0f6be43fb --- /dev/null +++ b/examples/sites/demos/app/date-picker/date-shortcuts-composition-api.vue @@ -0,0 +1,42 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/date-shortcuts.spec.ts b/examples/sites/demos/app/date-picker/date-shortcuts.spec.ts similarity index 99% rename from examples/docs/resources/pc/demo/date-picker/date-shortcuts.spec.ts rename to examples/sites/demos/app/date-picker/date-shortcuts.spec.ts index 5480a2ec8..f9eaea21d 100644 --- a/examples/docs/resources/pc/demo/date-picker/date-shortcuts.spec.ts +++ b/examples/sites/demos/app/date-picker/date-shortcuts.spec.ts @@ -13,4 +13,4 @@ test('[DatePicker] 测试选择快捷选项日期:今天/昨天/一周前', as await page.locator('.tiny-date-editor input').click() await page.getByRole('button', { name: '一周前' }).click() await expect(datePickerDom).not.toBeVisible() -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/date-shortcuts.vue b/examples/sites/demos/app/date-picker/date-shortcuts.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/date-shortcuts.vue rename to examples/sites/demos/app/date-picker/date-shortcuts.vue diff --git a/examples/sites/demos/app/date-picker/default-time-of-range-composition-api.vue b/examples/sites/demos/app/date-picker/default-time-of-range-composition-api.vue new file mode 100644 index 000000000..1ea7d4468 --- /dev/null +++ b/examples/sites/demos/app/date-picker/default-time-of-range-composition-api.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/default-time-of-range.spec.ts b/examples/sites/demos/app/date-picker/default-time-of-range.spec.ts similarity index 78% rename from examples/docs/resources/pc/demo/date-picker/default-time-of-range.spec.ts rename to examples/sites/demos/app/date-picker/default-time-of-range.spec.ts index 483623fa5..ef97e65e3 100644 --- a/examples/docs/resources/pc/demo/date-picker/default-time-of-range.spec.ts +++ b/examples/sites/demos/app/date-picker/default-time-of-range.spec.ts @@ -11,11 +11,17 @@ test('[DatePicker] 测试日期范围默认时刻', async ({ page }) => { await page.getByRole('row', { name: '14 15 16 17 18 19 20' }).getByText('20').click() await page.getByPlaceholder('开始时间').click() await page.locator('li:nth-child(2) > span').first().click() - await page.locator('div:nth-child(2) > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(2) > span').first().click() - await page.locator('div:nth-child(3) > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(2) > span').first().click() + await page + .locator('div:nth-child(2) > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(2) > span') + .first() + .click() + await page + .locator('div:nth-child(3) > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(2) > span') + .first() + .click() await page.getByRole('button', { name: '确定' }).first().click() await page.getByPlaceholder('结束时间').click() await page.getByRole('button', { name: '确定' }).last().click() expect(await startDateDom.inputValue()).toBe('2023-05-14 01:01:01') expect(await endDateDom.inputValue()).toBe('2023-05-20 23:59:59') -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/default-time-of-range.vue b/examples/sites/demos/app/date-picker/default-time-of-range.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/default-time-of-range.vue rename to examples/sites/demos/app/date-picker/default-time-of-range.vue diff --git a/examples/sites/demos/app/date-picker/default-value-composition-api.vue b/examples/sites/demos/app/date-picker/default-value-composition-api.vue new file mode 100644 index 000000000..8d95fa92a --- /dev/null +++ b/examples/sites/demos/app/date-picker/default-value-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/default-value.spec.ts b/examples/sites/demos/app/date-picker/default-value.spec.ts similarity index 99% rename from examples/docs/resources/pc/demo/date-picker/default-value.spec.ts rename to examples/sites/demos/app/date-picker/default-value.spec.ts index fc52573a7..7943a8350 100644 --- a/examples/docs/resources/pc/demo/date-picker/default-value.spec.ts +++ b/examples/sites/demos/app/date-picker/default-value.spec.ts @@ -8,4 +8,4 @@ test('[DatePicker] 测试选择器打开时默认时间设置', async ({ page }) await page.getByRole('textbox', { name: '2000-11-10' }).click() await page.getByText('11', { exact: true }).click() await expect(dateInput).toBeVisible() -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/default-value.vue b/examples/sites/demos/app/date-picker/default-value.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/default-value.vue rename to examples/sites/demos/app/date-picker/default-value.vue diff --git a/examples/sites/demos/app/date-picker/disabled-composition-api.vue b/examples/sites/demos/app/date-picker/disabled-composition-api.vue new file mode 100644 index 000000000..fece380ac --- /dev/null +++ b/examples/sites/demos/app/date-picker/disabled-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/disabled.vue b/examples/sites/demos/app/date-picker/disabled.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/disabled.vue rename to examples/sites/demos/app/date-picker/disabled.vue diff --git a/examples/sites/demos/app/date-picker/editable-composition-api.vue b/examples/sites/demos/app/date-picker/editable-composition-api.vue new file mode 100644 index 000000000..4d419e947 --- /dev/null +++ b/examples/sites/demos/app/date-picker/editable-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/editable.spec.ts b/examples/sites/demos/app/date-picker/editable.spec.ts similarity index 99% rename from examples/docs/resources/pc/demo/date-picker/editable.spec.ts rename to examples/sites/demos/app/date-picker/editable.spec.ts index 9077c2481..744a11fd4 100644 --- a/examples/docs/resources/pc/demo/date-picker/editable.spec.ts +++ b/examples/sites/demos/app/date-picker/editable.spec.ts @@ -5,4 +5,4 @@ test('[DatePicker] 测试文本框不可输入', async ({ page }) => { await page.goto('http://localhost:7130/pc/date-picker/editable') const dateInputDom = page.getByRole('textbox').nth(1) await expect(dateInputDom).toHaveAttribute('readonly', '') -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/editable.vue b/examples/sites/demos/app/date-picker/editable.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/editable.vue rename to examples/sites/demos/app/date-picker/editable.vue diff --git a/examples/sites/demos/app/date-picker/filter-mode-composition-api.vue b/examples/sites/demos/app/date-picker/filter-mode-composition-api.vue new file mode 100644 index 000000000..56607b75d --- /dev/null +++ b/examples/sites/demos/app/date-picker/filter-mode-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/sites/demos/app/date-picker/filter-mode-range-composition-api.vue b/examples/sites/demos/app/date-picker/filter-mode-range-composition-api.vue new file mode 100644 index 000000000..9d9900d83 --- /dev/null +++ b/examples/sites/demos/app/date-picker/filter-mode-range-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/sites/demos/app/date-picker/filter-mode-range.vue b/examples/sites/demos/app/date-picker/filter-mode-range.vue new file mode 100644 index 000000000..2be9b4c70 --- /dev/null +++ b/examples/sites/demos/app/date-picker/filter-mode-range.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/sites/demos/app/date-picker/filter-mode.vue b/examples/sites/demos/app/date-picker/filter-mode.vue new file mode 100644 index 000000000..68e6335c6 --- /dev/null +++ b/examples/sites/demos/app/date-picker/filter-mode.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/sites/demos/app/date-picker/focus-composition-api.vue b/examples/sites/demos/app/date-picker/focus-composition-api.vue new file mode 100644 index 000000000..376bbc012 --- /dev/null +++ b/examples/sites/demos/app/date-picker/focus-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/focus.spec.ts b/examples/sites/demos/app/date-picker/focus.spec.ts similarity index 99% rename from examples/docs/resources/pc/demo/date-picker/focus.spec.ts rename to examples/sites/demos/app/date-picker/focus.spec.ts index 129c71920..fb91989bc 100644 --- a/examples/docs/resources/pc/demo/date-picker/focus.spec.ts +++ b/examples/sites/demos/app/date-picker/focus.spec.ts @@ -5,7 +5,7 @@ test('[DatePicker] 测试获取焦点', async ({ page }) => { await page.goto('http://localhost:7130/pc/date-picker/focus') const datePanelDom = page.locator('body > .tiny-picker-panel') - + // 禁用日期输入框之后,无法通过 focus 方法获取焦点 await page.getByRole('button', { name: '启用/禁用' }).click() await page.getByRole('button', { name: '获取焦点' }).click() @@ -15,4 +15,4 @@ test('[DatePicker] 测试获取焦点', async ({ page }) => { await page.getByRole('button', { name: '启用/禁用' }).click() await page.getByRole('button', { name: '获取焦点' }).click() await expect(datePanelDom).toBeVisible() -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/focus.vue b/examples/sites/demos/app/date-picker/focus.vue similarity index 91% rename from examples/docs/resources/pc/demo/date-picker/focus.vue rename to examples/sites/demos/app/date-picker/focus.vue index 6c207eeee..baf642c0e 100644 --- a/examples/docs/resources/pc/demo/date-picker/focus.vue +++ b/examples/sites/demos/app/date-picker/focus.vue @@ -22,7 +22,7 @@ export default { }, methods: { click() { - this.$refs.refFocus.focus() + this.$refs.refFocus.$el.querySelector('input').focus() }, Switchover() { this.disabled = !this.disabled diff --git a/examples/sites/demos/app/date-picker/label-inside-composition-api.vue b/examples/sites/demos/app/date-picker/label-inside-composition-api.vue new file mode 100644 index 000000000..dcc9acc50 --- /dev/null +++ b/examples/sites/demos/app/date-picker/label-inside-composition-api.vue @@ -0,0 +1,21 @@ + + + diff --git a/examples/sites/demos/app/date-picker/label-inside.vue b/examples/sites/demos/app/date-picker/label-inside.vue new file mode 100644 index 000000000..56adf4d80 --- /dev/null +++ b/examples/sites/demos/app/date-picker/label-inside.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/sites/demos/app/date-picker/max-min-composition-api.vue b/examples/sites/demos/app/date-picker/max-min-composition-api.vue new file mode 100644 index 000000000..47bf376a7 --- /dev/null +++ b/examples/sites/demos/app/date-picker/max-min-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/sites/demos/app/date-picker/max-min.spec.ts b/examples/sites/demos/app/date-picker/max-min.spec.ts new file mode 100644 index 000000000..1293f6a2c --- /dev/null +++ b/examples/sites/demos/app/date-picker/max-min.spec.ts @@ -0,0 +1,6 @@ +import { test, expect } from '@playwright/test' + +test('[DatePicker] 测试最大最小值', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/date-picker/max-min') +}) diff --git a/examples/docs/resources/pc/demo/date-picker/max-min.vue b/examples/sites/demos/app/date-picker/max-min.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/max-min.vue rename to examples/sites/demos/app/date-picker/max-min.vue diff --git a/examples/sites/demos/app/date-picker/month-range-composition-api.vue b/examples/sites/demos/app/date-picker/month-range-composition-api.vue new file mode 100644 index 000000000..9ed7e5525 --- /dev/null +++ b/examples/sites/demos/app/date-picker/month-range-composition-api.vue @@ -0,0 +1,15 @@ + + + diff --git a/examples/sites/demos/app/date-picker/month-range-shortcuts-composition-api.vue b/examples/sites/demos/app/date-picker/month-range-shortcuts-composition-api.vue new file mode 100644 index 000000000..0f55300ce --- /dev/null +++ b/examples/sites/demos/app/date-picker/month-range-shortcuts-composition-api.vue @@ -0,0 +1,42 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/month-range-shortcuts.spec.ts b/examples/sites/demos/app/date-picker/month-range-shortcuts.spec.ts similarity index 98% rename from examples/docs/resources/pc/demo/date-picker/month-range-shortcuts.spec.ts rename to examples/sites/demos/app/date-picker/month-range-shortcuts.spec.ts index 9470c3969..0e941aa4d 100644 --- a/examples/docs/resources/pc/demo/date-picker/month-range-shortcuts.spec.ts +++ b/examples/sites/demos/app/date-picker/month-range-shortcuts.spec.ts @@ -3,4 +3,4 @@ import { expect, test } from '@playwright/test' test('[DatePicker] 测试月份范围快捷选项', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/month-range-shortcuts') -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/month-range-shortcuts.vue b/examples/sites/demos/app/date-picker/month-range-shortcuts.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/month-range-shortcuts.vue rename to examples/sites/demos/app/date-picker/month-range-shortcuts.vue diff --git a/examples/docs/resources/pc/demo/date-picker/month-range.spec.ts b/examples/sites/demos/app/date-picker/month-range.spec.ts similarity index 98% rename from examples/docs/resources/pc/demo/date-picker/month-range.spec.ts rename to examples/sites/demos/app/date-picker/month-range.spec.ts index 04923968a..87b4ce592 100644 --- a/examples/docs/resources/pc/demo/date-picker/month-range.spec.ts +++ b/examples/sites/demos/app/date-picker/month-range.spec.ts @@ -3,4 +3,4 @@ import { expect, test } from '@playwright/test' test('[DatePicker] 测试选择月份范围', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/month-range') -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/month-range.vue b/examples/sites/demos/app/date-picker/month-range.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/month-range.vue rename to examples/sites/demos/app/date-picker/month-range.vue diff --git a/examples/sites/demos/app/date-picker/other-picker-type-composition-api.vue b/examples/sites/demos/app/date-picker/other-picker-type-composition-api.vue new file mode 100644 index 000000000..0be9b6d6e --- /dev/null +++ b/examples/sites/demos/app/date-picker/other-picker-type-composition-api.vue @@ -0,0 +1,56 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/other-picker-type.spec.ts b/examples/sites/demos/app/date-picker/other-picker-type.spec.ts similarity index 99% rename from examples/docs/resources/pc/demo/date-picker/other-picker-type.spec.ts rename to examples/sites/demos/app/date-picker/other-picker-type.spec.ts index 97aa04ee8..beed430b9 100644 --- a/examples/docs/resources/pc/demo/date-picker/other-picker-type.spec.ts +++ b/examples/sites/demos/app/date-picker/other-picker-type.spec.ts @@ -26,4 +26,4 @@ test('[DatePicker] 测试其他日期单位', async ({ page }) => { await page.getByRole('cell', { name: '20' }).getByText('20').click() await page.getByRole('button', { name: '确定' }).click() expect(await dateInputMultiDate.inputValue()).toBe('2023-05-16, 2023-05-18, 2023-05-20') -}) \ No newline at end of file +}) diff --git a/examples/sites/demos/app/date-picker/other-picker-type.vue b/examples/sites/demos/app/date-picker/other-picker-type.vue new file mode 100644 index 000000000..f0fbf8b62 --- /dev/null +++ b/examples/sites/demos/app/date-picker/other-picker-type.vue @@ -0,0 +1,67 @@ + + + diff --git a/examples/sites/demos/app/date-picker/readonly-composition-api.vue b/examples/sites/demos/app/date-picker/readonly-composition-api.vue new file mode 100644 index 000000000..d8e75a900 --- /dev/null +++ b/examples/sites/demos/app/date-picker/readonly-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/sites/demos/app/date-picker/readonly.spec.ts b/examples/sites/demos/app/date-picker/readonly.spec.ts new file mode 100644 index 000000000..1d84c1b38 --- /dev/null +++ b/examples/sites/demos/app/date-picker/readonly.spec.ts @@ -0,0 +1,6 @@ +import { expect, test } from '@playwright/test' + +test('[DatePicker] 测试只读状态', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/date-picker/readonly') +}) diff --git a/examples/docs/resources/pc/demo/date-picker/readonly.vue b/examples/sites/demos/app/date-picker/readonly.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/readonly.vue rename to examples/sites/demos/app/date-picker/readonly.vue diff --git a/examples/sites/demos/app/date-picker/set-size-composition-api.vue b/examples/sites/demos/app/date-picker/set-size-composition-api.vue new file mode 100644 index 000000000..d02fe648b --- /dev/null +++ b/examples/sites/demos/app/date-picker/set-size-composition-api.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/set-size.spec.ts b/examples/sites/demos/app/date-picker/set-size.spec.ts similarity index 98% rename from examples/docs/resources/pc/demo/date-picker/set-size.spec.ts rename to examples/sites/demos/app/date-picker/set-size.spec.ts index cbacf0265..f3b46b6c0 100644 --- a/examples/docs/resources/pc/demo/date-picker/set-size.spec.ts +++ b/examples/sites/demos/app/date-picker/set-size.spec.ts @@ -3,4 +3,4 @@ import { expect, test } from '@playwright/test' test('[DatePicker] 测试尺寸设置', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/set-size') -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/set-size.vue b/examples/sites/demos/app/date-picker/set-size.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/set-size.vue rename to examples/sites/demos/app/date-picker/set-size.vue diff --git a/examples/sites/demos/app/date-picker/start-from-end-at-composition-api.vue b/examples/sites/demos/app/date-picker/start-from-end-at-composition-api.vue new file mode 100644 index 000000000..41feaf697 --- /dev/null +++ b/examples/sites/demos/app/date-picker/start-from-end-at-composition-api.vue @@ -0,0 +1,32 @@ + + + diff --git a/examples/sites/demos/app/date-picker/start-from-end-at.vue b/examples/sites/demos/app/date-picker/start-from-end-at.vue new file mode 100644 index 000000000..48474c3e9 --- /dev/null +++ b/examples/sites/demos/app/date-picker/start-from-end-at.vue @@ -0,0 +1,40 @@ + + + diff --git a/examples/sites/demos/app/date-picker/step-composition-api.vue b/examples/sites/demos/app/date-picker/step-composition-api.vue new file mode 100644 index 000000000..62cd3edee --- /dev/null +++ b/examples/sites/demos/app/date-picker/step-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/sites/demos/app/date-picker/step.vue b/examples/sites/demos/app/date-picker/step.vue new file mode 100644 index 000000000..658f00e9c --- /dev/null +++ b/examples/sites/demos/app/date-picker/step.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/sites/demos/app/date-picker/time-arrow-control-composition-api.vue b/examples/sites/demos/app/date-picker/time-arrow-control-composition-api.vue new file mode 100644 index 000000000..6216d99f8 --- /dev/null +++ b/examples/sites/demos/app/date-picker/time-arrow-control-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/time-arrow-control.spec.ts b/examples/sites/demos/app/date-picker/time-arrow-control.spec.ts similarity index 98% rename from examples/docs/resources/pc/demo/date-picker/time-arrow-control.spec.ts rename to examples/sites/demos/app/date-picker/time-arrow-control.spec.ts index 4a17d407a..e4b5913fa 100644 --- a/examples/docs/resources/pc/demo/date-picker/time-arrow-control.spec.ts +++ b/examples/sites/demos/app/date-picker/time-arrow-control.spec.ts @@ -3,4 +3,4 @@ import { expect, test } from '@playwright/test' test('[DatePicker] 测试箭头按钮控制时间选择', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/time-arrow-control') -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/time-arrow-control.vue b/examples/sites/demos/app/date-picker/time-arrow-control.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/time-arrow-control.vue rename to examples/sites/demos/app/date-picker/time-arrow-control.vue diff --git a/examples/sites/demos/app/date-picker/time-format-composition-api.vue b/examples/sites/demos/app/date-picker/time-format-composition-api.vue new file mode 100644 index 000000000..8cbd9b394 --- /dev/null +++ b/examples/sites/demos/app/date-picker/time-format-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/time-format.spec.ts b/examples/sites/demos/app/date-picker/time-format.spec.ts similarity index 98% rename from examples/docs/resources/pc/demo/date-picker/time-format.spec.ts rename to examples/sites/demos/app/date-picker/time-format.spec.ts index 6613eeeaa..51773e43c 100644 --- a/examples/docs/resources/pc/demo/date-picker/time-format.spec.ts +++ b/examples/sites/demos/app/date-picker/time-format.spec.ts @@ -3,4 +3,4 @@ import { expect, test } from '@playwright/test' test('[DatePicker] 测试时间格式化', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/time-format') -}) \ No newline at end of file +}) diff --git a/examples/sites/demos/app/date-picker/time-format.vue b/examples/sites/demos/app/date-picker/time-format.vue new file mode 100644 index 000000000..731cc95ba --- /dev/null +++ b/examples/sites/demos/app/date-picker/time-format.vue @@ -0,0 +1,40 @@ + + + diff --git a/examples/sites/demos/app/date-picker/timezone-composition-api.vue b/examples/sites/demos/app/date-picker/timezone-composition-api.vue new file mode 100644 index 000000000..a7452e816 --- /dev/null +++ b/examples/sites/demos/app/date-picker/timezone-composition-api.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/timezone.spec.ts b/examples/sites/demos/app/date-picker/timezone.spec.ts similarity index 98% rename from examples/docs/resources/pc/demo/date-picker/timezone.spec.ts rename to examples/sites/demos/app/date-picker/timezone.spec.ts index 82c673b2c..db470c62e 100644 --- a/examples/docs/resources/pc/demo/date-picker/timezone.spec.ts +++ b/examples/sites/demos/app/date-picker/timezone.spec.ts @@ -3,4 +3,4 @@ import { expect, test } from '@playwright/test' test('[DatePicker] 测试时区选择', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/timezone') -}) \ No newline at end of file +}) diff --git a/examples/sites/demos/app/date-picker/timezone.vue b/examples/sites/demos/app/date-picker/timezone.vue new file mode 100644 index 000000000..21a01fce8 --- /dev/null +++ b/examples/sites/demos/app/date-picker/timezone.vue @@ -0,0 +1,35 @@ + + + diff --git a/examples/sites/demos/app/date-picker/unlink-panels-composition-api.vue b/examples/sites/demos/app/date-picker/unlink-panels-composition-api.vue new file mode 100644 index 000000000..a5652ad6b --- /dev/null +++ b/examples/sites/demos/app/date-picker/unlink-panels-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/unlink-panels.spec.ts b/examples/sites/demos/app/date-picker/unlink-panels.spec.ts similarity index 98% rename from examples/docs/resources/pc/demo/date-picker/unlink-panels.spec.ts rename to examples/sites/demos/app/date-picker/unlink-panels.spec.ts index dbb716347..36bb23b51 100644 --- a/examples/docs/resources/pc/demo/date-picker/unlink-panels.spec.ts +++ b/examples/sites/demos/app/date-picker/unlink-panels.spec.ts @@ -3,4 +3,4 @@ import { expect, test } from '@playwright/test' test('[DatePicker] 测试范围选择取消面板联动', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/unlink-panels') -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/unlink-panels.vue b/examples/sites/demos/app/date-picker/unlink-panels.vue similarity index 100% rename from examples/docs/resources/pc/demo/date-picker/unlink-panels.vue rename to examples/sites/demos/app/date-picker/unlink-panels.vue diff --git a/examples/sites/demos/app/date-picker/utc8-composition-api.vue b/examples/sites/demos/app/date-picker/utc8-composition-api.vue new file mode 100644 index 000000000..fbdd5397b --- /dev/null +++ b/examples/sites/demos/app/date-picker/utc8-composition-api.vue @@ -0,0 +1,15 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/utc8.spec.ts b/examples/sites/demos/app/date-picker/utc8.spec.ts similarity index 98% rename from examples/docs/resources/pc/demo/date-picker/utc8.spec.ts rename to examples/sites/demos/app/date-picker/utc8.spec.ts index 72e5ddd20..1b71e6e9a 100644 --- a/examples/docs/resources/pc/demo/date-picker/utc8.spec.ts +++ b/examples/sites/demos/app/date-picker/utc8.spec.ts @@ -3,4 +3,4 @@ import { expect, test } from '@playwright/test' test('[DatePicker] 测试设置是否显示为东八区时间', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/utc8') -}) \ No newline at end of file +}) diff --git a/examples/sites/demos/app/date-picker/utc8.vue b/examples/sites/demos/app/date-picker/utc8.vue new file mode 100644 index 000000000..6e0bc4bc0 --- /dev/null +++ b/examples/sites/demos/app/date-picker/utc8.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/sites/demos/app/date-picker/validate-event-composition-api.vue b/examples/sites/demos/app/date-picker/validate-event-composition-api.vue new file mode 100644 index 000000000..d0a154ac7 --- /dev/null +++ b/examples/sites/demos/app/date-picker/validate-event-composition-api.vue @@ -0,0 +1,92 @@ + + + diff --git a/examples/docs/resources/pc/demo/date-picker/validate-event.spec.ts b/examples/sites/demos/app/date-picker/validate-event.spec.ts similarity index 98% rename from examples/docs/resources/pc/demo/date-picker/validate-event.spec.ts rename to examples/sites/demos/app/date-picker/validate-event.spec.ts index 5fa603baa..be70038f1 100644 --- a/examples/docs/resources/pc/demo/date-picker/validate-event.spec.ts +++ b/examples/sites/demos/app/date-picker/validate-event.spec.ts @@ -3,4 +3,4 @@ import { expect, test } from '@playwright/test' test('[DatePicker] 测试不触发表单校验', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('http://localhost:7130/pc/date-picker/validate-event') -}) \ No newline at end of file +}) diff --git a/examples/docs/resources/pc/demo/date-picker/validate-event.vue b/examples/sites/demos/app/date-picker/validate-event.vue similarity index 76% rename from examples/docs/resources/pc/demo/date-picker/validate-event.vue rename to examples/sites/demos/app/date-picker/validate-event.vue index 9341752f5..e7cfab581 100644 --- a/examples/docs/resources/pc/demo/date-picker/validate-event.vue +++ b/examples/sites/demos/app/date-picker/validate-event.vue @@ -1,5 +1,5 @@ @@ -72,8 +77,8 @@ export default { } }, methods: { - submitForm(formName) { - this.$refs[formName].validate((valid) => { + submitForm() { + this.$refs.ruleFormRef.validate((valid) => { if (valid) { Modal.alert('Submitted successfully !') } else { @@ -83,8 +88,8 @@ export default { } }) }, - resetForm(formName) { - this.$refs[formName].resetFields() + resetForm() { + this.$refs.ruleFormRef.resetFields() } } } diff --git a/examples/sites/demos/app/date-picker/webdoc/date-picker.cn.md b/examples/sites/demos/app/date-picker/webdoc/date-picker.cn.md new file mode 100644 index 000000000..62bbfeeb3 --- /dev/null +++ b/examples/sites/demos/app/date-picker/webdoc/date-picker.cn.md @@ -0,0 +1,7 @@ +--- +title: DatePicker 日期选择器 +--- + +# DatePicker 日期选择器 + +
用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式。
diff --git a/examples/sites/demos/app/date-picker/webdoc/date-picker.en.md b/examples/sites/demos/app/date-picker/webdoc/date-picker.en.md new file mode 100644 index 000000000..56c842fb8 --- /dev/null +++ b/examples/sites/demos/app/date-picker/webdoc/date-picker.en.md @@ -0,0 +1,7 @@ +--- +title: DatePicker Date Selector +--- + +# DatePicker Date Selector + +
This command is used to set or select a date, including the date format of year, month, month, day, hour, minute, and second.
diff --git a/examples/sites/demos/app/date-picker/webdoc/date-picker.js b/examples/sites/demos/app/date-picker/webdoc/date-picker.js new file mode 100644 index 000000000..84c18b13e --- /dev/null +++ b/examples/sites/demos/app/date-picker/webdoc/date-picker.js @@ -0,0 +1,708 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'date-shortcuts', + 'name': { 'zh-CN': '选择日带快捷选项', 'en-US': 'Select the shortcut option of the day band' }, + 'desc': { + 'zh-CN': + '

通过 picker-options 属性,该属性是一个对象,在其中指定 shortcuts 对象数组可以设置快捷选项。同时可以根据需要设置 disabledDate 方法禁用日期。

\n', + 'en-US': + '

With the picker-options attribute, which is an object in which you specify an array of shortcuts objects to set shortcut options. In addition, you can set the date when the disabledDate method is disabled as required.

\n' + }, + 'codeFiles': ['date-shortcuts.vue'] + }, + { + 'demoId': 'other-picker-type', + 'name': { 'zh-CN': '其他日期单位', 'en-US': 'Other date units' }, + 'desc': { + 'zh-CN': + '

通过 type 属性可以设置不同的日期单位,如下示例中配置的有 week、year、month、dates。

\n', + 'en-US': + '

You can set different date units through the type attribute. In the following example, the date units are week, year, month, and dates.

\n' + }, + 'codeFiles': ['other-picker-type.vue'] + }, + { + 'demoId': 'timezone', + 'name': { 'zh-CN': '时区选择', 'en-US': 'Time Zone Selection' }, + 'desc': { + 'zh-CN': + '

通过 show-timezone 属性可以设置日期选择面板时区选择,同时需要引入 timezoneData 时区数据

\n', + 'en-US': + '

You can set the time zone of the date selection panel through the show-timezone attribute, and import timezoneData time zone data

\n' + }, + 'codeFiles': ['timezone.vue'] + }, + { + 'demoId': 'date-range', + 'name': { 'zh-CN': '选择日期范围', 'en-US': 'Select Date Range' }, + 'desc': { + 'zh-CN': + '

设置 type 属性为 daterange,可以设置以日期范围的形式进行选择。\n通过 onPick 获取选中日期后会执行的回调,需要与 daterangedatetimerange 才生效,需要配置在 picker-options 中。

\n', + 'en-US': + '

Set type to daterange. You can select a date range. \n Callback that will be executed after the selected date is obtained through onPick. The callback takes effect only when daterange or datetimerange is used. This parameter must be configured in picker-options.

\n' + }, + 'codeFiles': ['date-range.vue'] + }, + { + 'demoId': 'date-range-shortcuts', + 'name': { 'zh-CN': '日期范围快捷选项', 'en-US': 'Date Range Shortcut Options' }, + 'desc': { + 'zh-CN': + '

通过 picker-options 对象设置日期范围快捷选项。\n通过 firstDayOfWeek 周起始日,该属性可选值为 1 到 7,默认值为 7。

\n', + 'en-US': + '

Sets the date range shortcut through the picker-options object. \n firstDayOfWeek. The value ranges from 1 to 7. The default value is 7.

\n' + }, + 'codeFiles': ['date-range-shortcuts.vue'] + }, + { + 'demoId': 'default-time-of-range', + 'name': { 'zh-CN': '日期范围默认时刻', 'en-US': 'Default Time of the Date Range' }, + 'desc': { + 'zh-CN': + '

使用 datetimerange 设置日期范围时,可以通过 default-time 属性设置起始与结束的时刻,默认是选定日期的 00:00:00 作为起始与结束的时刻。default-time 接受一个数组,数组的每一项都为一个字符串,第一项控制起始日期的时刻,第二项控制结束日期的时刻。

\n', + 'en-US': + '

When using datetimerange to set the date range, you can use default-time to set the start and end time. The default time is 00:00 on the selected date. 00 as the start and end time. default-time takes an array. Each item in the array is a string. The first item controls the time of the start date and the second item controls the time of the end date.

\n' + }, + 'codeFiles': ['default-time-of-range.vue'] + }, + { + 'demoId': 'month-range', + 'name': { 'zh-CN': '选择月份范围', 'en-US': 'Select Month Range' }, + 'desc': { + 'zh-CN': '

设置 type 属性为 monthrange,可以设置以月份范围的形式进行选择。

\n', + 'en-US': '

Set the type attribute to monthrange. You can set the value to a month range.

\n' + }, + 'codeFiles': ['month-range.vue'] + }, + { + 'demoId': 'month-range-shortcuts', + 'name': { 'zh-CN': '月份范围快捷选项', 'en-US': 'Month Range Shortcut Options' }, + 'desc': { + 'zh-CN': '

同样通过 picker-options 对象设置月份范围快捷选项。

\n', + 'en-US': + '

Also, the picker-options object is used to set the month range shortcut options.

\n' + }, + 'codeFiles': ['month-range-shortcuts.vue'] + }, + { + 'demoId': 'readonly', + 'name': { 'zh-CN': '只读', 'en-US': 'Read-only' }, + 'desc': { + 'zh-CN': '

通过 readonly 属性设置日历组件是否只读。

\n', + 'en-US': + '

Sets whether the calendar component is read-only through the readonly property.

\n' + }, + 'codeFiles': ['readonly.vue'] + }, + { + 'demoId': 'max-min', + 'name': { 'zh-CN': '最大最小值', 'en-US': 'Maximum/Minimum' }, + 'desc': { + 'zh-CN': + '

配置 picker-options 属性,在对象中的 disabledDate 方法中根据日期进行判断来禁用指定的日期段,通过这种方式来实现最大最小值。

\n', + 'en-US': + '

Configure the picker-options attribute to disable the specified date segment based on the date in the disabledDate method of the object. In this way, the maximum and minimum values are implemented.

\n' + }, + 'codeFiles': ['max-min.vue'] + }, + { + 'demoId': 'align', + 'name': { 'zh-CN': '对齐方式', 'en-US': 'Alignment' }, + 'desc': { + 'zh-CN': + '

通过 align 属性可以设置日期选择面板与输入框之间的对齐方式,可选值有 left、right、center,默认为 left 左对齐。

\n', + 'en-US': + '

You can use the align attribute to set the alignment mode between the date selection panel and the text box. The options are left, right, and center. The default value is left.

\n' + }, + 'codeFiles': ['align.vue'] + }, + { + 'demoId': 'set-size', + 'name': { 'zh-CN': '尺寸设置', 'en-US': 'Size Settings' }, + 'desc': { + 'zh-CN': '

通过 size 属性可以设置日期输入框的尺寸,可选值有 medium、small、mini。

\n', + 'en-US': + '

You can set the size of the date text box through the size attribute. The options are medium, small, and mini.

\n' + }, + 'codeFiles': ['set-size.vue'] + }, + { + 'demoId': 'about-clear', + 'name': { 'zh-CN': '清除输入', 'en-US': 'Clear Input' }, + 'desc': { + 'zh-CN': + '

选择日期后,鼠标悬停在输入框时,默认会显示清除图标,单击图标可以清除输入框内容。设置 clearable 属性为 false 后,则不显示清除图标,不可清除。通过 clear-icon 属性可以自定义清除图标。

\n', + 'en-US': + '

After you select a date, the clear icon is displayed by default when you hover the cursor over the text box. You can click the icon to clear the text box. If clearable is set to false, the clear icon is not displayed and cannot be cleared. The clear-icon property allows you to customize the clear icon.

\n' + }, + 'codeFiles': ['about-clear.vue'] + }, + { + 'demoId': 'about-format', + 'name': { 'zh-CN': '格式化相关', 'en-US': 'Formatting' }, + 'desc': { + 'zh-CN': + '

通过 format 属性设置输入框的格式,value-format 属性设置绑定值的格式。Date Format 属性列表

', + 'en-US': + '

uses the format attribute to set the format of the text box, and the value-format attribute to set the format of the bound value. Date Format Attribute List

' + }, + 'codeFiles': ['about-format.vue'] + }, + { + 'demoId': 'time-format', + 'name': { 'zh-CN': 'timeFormat格式化', 'en-US': 'timeFormat formatting' }, + 'desc': { + 'zh-CN': '

通过 time-format 属性设置日期选择面板的时间显示格式

', + 'en-US': + '

Set the time display format of the date selection panel through the time-format attribute

' + }, + 'codeFiles': ['time-format.vue'] + }, + { + 'demoId': 'custom-suffix-icon', + 'name': { 'zh-CN': '自定义后置图标', 'en-US': 'Customized rear icon' }, + 'desc': { + 'zh-CN': + '

通过 suffix-icon 属性设置日期输入框后置图标,从 @opentiny/vue-icon 中导入一个图标并进行初始化后传给 suffix-icon

\n', + 'en-US': + '

uses the suffix-icon attribute to set the icon behind the date text box. An icon is imported from the @opentiny/vue-icon, initialized, and transferred to the suffix-icon.

\n' + }, + 'codeFiles': ['custom-suffix-icon.vue'] + }, + { + 'demoId': 'custom-suffix-icon1', + 'name': { 'zh-CN': '自定义下拉框的类名', 'en-US': 'Class name of the customized drop-down list box' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['custom-suffix-icon.vue'] + }, + { + 'demoId': 'custom-range', + 'name': { 'zh-CN': '范围选择自定义相关', 'en-US': 'Select Customized' }, + 'desc': { + 'zh-CN': + '

范围选择时,start-placeholderend-placeholder 属性可分别指定开始日期和结束日期输入框的占位符。range-separator 属性指定开始日期和结束日期输入框之间的分隔符。

\n', + 'en-US': + '

When the range is selected, the start-placeholder and end-placeholder attributes can specify the placeholders of the start date and end date text boxes, respectively. The range-separator property specifies the separator between the start date and end date input boxes.

\n' + }, + 'codeFiles': ['custom-range.vue'] + }, + { + 'demoId': 'custom-weeks', + 'name': { 'zh-CN': '自定义周次序号', 'en-US': 'Select a range to cancel panel linkage' }, + 'desc': { + 'zh-CN': + '

通过 show-week-number 属性展示原始周次序号,通过format-weeks属性传入两个参数

参数设置如下:customWeeks:设置自定义周次的序号;weekFirstDays:获取每周次中的首个日期

\n', + 'en-US': + '

When the range is selected, by default, when you click the previous month or previous year arrow icon in the start date panel, the date in the end date panel is also switched to the previous month or previous year. When you switch the next month or the next year in the end date panel, the start date panel is also linked. However, if unlink-panels is set to true, panels are not associated with each other. When the year and month are changed, the change takes effect only for the current panel.

\n' + }, + 'codeFiles': ['custom-weeks.vue'] + }, + { + 'demoId': 'unlink-panels', + 'name': { 'zh-CN': '范围选择取消面板联动', 'en-US': 'Default time setting when the selector is enabled' }, + 'desc': { + 'zh-CN': + '

范围选择时,默认情况下,在开始日期面板中单击上一月或上一年箭头图标时,结束日期面板中日期也联动切换到上一月或上一年。在结束日期面板中切换下一月或下一年时,开始日期面板也随之联动。但若配置 unlink-panels 属性为 true ,面板之间就不再联动,切换年月时只对当前面板生效。

\n', + 'en-US': + '

default-value property specifies the date that is selected by default when the date picker panel opens.

\n' + }, + 'codeFiles': ['unlink-panels.vue'] + }, + { + 'demoId': 'default-value', + 'name': { 'zh-CN': '选择器打开时默认时间设置', 'en-US': 'The text box cannot be entered.' }, + 'desc': { + 'zh-CN': '

default-value 属性指定日期选择器面板打开时默认选中的日期。

\n', + 'en-US': + 'By default, you can enter a date in the

Date text box. If you set editable to false, you cannot enter a date in the

Date text box.

\n' + }, + 'codeFiles': ['default-value.vue'] + }, + { + 'demoId': 'editable', + 'name': { 'zh-CN': '文本框不可输入', 'en-US': 'Event' }, + 'desc': { + 'zh-CN': '

日期输入框默认可以输入日期,设置 editable 为 false 后,将不能输入。

\n', + 'en-US': '

The main events include change, blur, and focus.

\n' + }, + 'codeFiles': ['editable.vue'] + }, + { + 'demoId': 'filter-mode', + 'name': { 'zh-CN': '过滤器模式', 'en-US': 'Focus' }, + 'desc': { + 'zh-CN': + "

通过 shape='filter' 属性切换至过滤器模式。

过滤器模式下可传入 label 显示标题,tip 显示提示信息,clearable 是否显示清除按钮。

\n", + 'en-US': '

Use the focus method to enable the input to obtain the focus.

\n' + }, + 'codeFiles': ['filter-mode.vue'] + }, + { + 'demoId': 'filter-mode-range', + 'name': { 'zh-CN': '日期范围选择器-过滤器模式', 'en-US': 'The arrow button controls the time selection.' }, + 'desc': { + 'zh-CN': + "

通过 shape='filter' 属性切换至过滤器模式。

过滤器模式下可传入 label 显示标题,tip 显示提示信息,clearable 是否显示清除按钮。

\n", + 'en-US': + '

When type is set to datetime or datetimerange, set time-arrow-control to true. The arrow button is displayed on the time panel to control the time selection. By default, the scrolling selection time is selected.

\n' + }, + 'codeFiles': ['filter-mode-range.vue'] + }, + { + 'demoId': 'date-picker-events', + 'name': { 'zh-CN': '事件', 'en-US': 'Do not trigger form validation' }, + 'desc': { + 'zh-CN': '

主要事件有 change、blur、focus。

\n', + 'en-US': + '

The date selector triggers form validation by default. The triggering modes include blur and change. If validate-event is set to false, form validation is not triggered.

\n' + }, + 'codeFiles': ['date-picker-events.vue'] + }, + { + 'demoId': 'focus', + 'name': { 'zh-CN': '获取焦点', 'en-US': 'Set whether to display the GMT+8 time' }, + 'desc': { + 'zh-CN': '

通过 focus 方法设置使 input 获取焦点。

\n', + 'en-US': '

You can use the isutc8 attribute to set whether to display the GMT+8 time.

\n' + }, + 'codeFiles': ['focus.vue'] + }, + { + 'demoId': 'label-inside', + 'name': { 'zh-CN': 'label 内置', 'en-US': '' }, + 'desc': { + 'zh-CN': '

通过 label 属性可以设置日期选择器的 label,使其放置在组件的开始位置。

\n', + 'en-US': '' + }, + 'codeFiles': ['label-inside.vue'] + }, + { + 'demoId': 'start-from-end-at', + 'name': { 'zh-CN': '某日起始、某日为止', 'en-US': '' }, + 'desc': { + 'zh-CN': + "

通过 picker-options 对象设置日期范围快捷选项。

通过设置 type: 'startFrom' 为某日起始,设置 type: 'endAt' 为某日为止,

startDate 属性可设置开始的日期,endDate 属性设置结束日期,startDate 默认为 1970-01-01,endDate 默认为 2099-12-31

设置某日起始、某日为止时不用传入 onClick 函数,因为此函数不会被执行

\n", + 'en-US': '' + }, + 'codeFiles': ['start-from-end-at.vue'] + }, + { + 'demoId': 'step', + 'name': { 'zh-CN': '设置步长', 'en-US': '' }, + 'desc': { + 'zh-CN': + '

通过 step 设置步长,默认值为 { hour: 1, minute: 1, second: 1 },其中 hour 的设置范围是 0-23minutesecond 的设置范围是 0-60。可单独设置其中的一项或多项值,未设置的默认值为 1

\n', + 'en-US': '' + }, + 'codeFiles': ['step.vue'] + }, + { + 'demoId': 'time-arrow-control', + 'name': { 'zh-CN': '箭头按钮控制时间选择', 'en-US': '' }, + 'desc': { + 'zh-CN': + '

type 为 datetime、datetimerange 时,设置 time-arrow-control 属性为 true,在时间面板中将显示箭头按钮,通过箭头按钮控制时间选择。默认为滚动选择时间。

\n', + 'en-US': '' + }, + 'codeFiles': ['time-arrow-control.vue'] + }, + { + 'demoId': 'validate-event', + 'name': { 'zh-CN': '不触发表单校验', 'en-US': '' }, + 'desc': { + 'zh-CN': + '

日期选择器在输入时默认会触发表单校验,触发方式有 blur、change。但若设置 validate-event 属性为 false,将不再触发表单校验。

\n', + 'en-US': '' + }, + 'codeFiles': ['validate-event.vue'] + }, + { + 'demoId': 'utc8', + 'name': { 'zh-CN': '设置是否显示为东八区时间', 'en-US': '' }, + 'desc': { 'zh-CN': '

通过 isutc8 属性可以设置是否显示为东八区时间

\n', 'en-US': '' }, + 'codeFiles': ['utc8.vue'] + }, + { + 'demoId': 'year-type', + 'name': { 'zh-CN': '年份选择器', 'en-US': '' }, + 'desc': { + 'zh-CN': + '

通过 type 属性可以设置为 yearyearsyearrange 分别开启年份选择器单选、多选、范围选择功能。

\n', + 'en-US': '' + }, + 'codeFiles': ['year-type.vue'] + } + ], + apis: [ + { + 'name': 'date-picker', + 'type': 'component', + 'properties': [ + { + 'name': 'modelValue / v-model', + 'type': 'Date / Array', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置日历组件的初始值。;绑定值', + 'en-US': 'Set the initial value of the calendar component. ;Bound Value' + }, + 'demoId': 'basic-usage' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'demoId': 'focus' + }, + { + 'name': 'popper-append-to-body', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': + '是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)', + 'en-US': + 'Indicates whether to insert a pop-up box to the body element. When a fault occurs in the dialog box that is displayed, you can set this attribute to false (for details, see the select component).' + }, + 'demoId': 'popup-style-position' + }, + { + 'name': 'readonly', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '设置日历组件是否只读。', 'en-US': 'Set whether the calendar component is read-only.' }, + 'demoId': 'readonly' + }, + { + 'name': 'editable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '文本框可输入', 'en-US': 'The text box can be entered.' }, + 'demoId': 'editable' + }, + { + 'name': 'clearable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否显示清除按钮', 'en-US': 'Display Clear Button' }, + 'demoId': 'about-clear' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '输入框尺寸;该属性的可选值为 medium,small, mini', + 'en-US': 'Text box size; The values of this attribute are medium, small, and mini' + }, + 'demoId': 'set-size' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '该属性的默认值为 []', + 'desc': { 'zh-CN': '非范围选择时的占位内容', 'en-US': 'Placeholder content for non-range selection' }, + 'demoId': 'other-picker-type' + }, + { + 'name': 'start-placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '范围选择时开始日期的占位内容', + 'en-US': 'Placeholder of the start date when the range is selected' + }, + 'demoId': 'custom-range' + }, + { + 'name': 'end-placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '范围选择时结束日期的占位内容', + 'en-US': 'Placeholder of the end date when the range is selected' + }, + 'demoId': 'custom-range' + }, + { + 'name': 'type', + 'type': 'String', + 'defaultValue': '该属性的默认值为 date', + 'desc': { + 'zh-CN': + '显示类型;该属性的可选值为 year / month / dates / week / daterange / date / datetime / datetimerange / monthrange', + 'en-US': + 'Display type; The optional value of this attribute is year / month / dates / week / daterange / date / datetime / datetimerange / monthrange' + }, + 'demoId': 'other-picker-type' + }, + { + 'name': 'format', + 'type': 'String', + 'defaultValue': '该属性的默认值为 yyyy-MM-dd', + 'desc': { 'zh-CN': '显示在输入框中的格式', 'en-US': 'Display format in the text box' }, + 'demoId': 'about-format' + }, + { + 'name': 'value-format', + 'type': 'String', + 'defaultValue': '该属性的默认值为 Date 对象', + 'desc': { + 'zh-CN': '指定绑定值的格式。不指定则绑定值为 Date 对象', + 'en-US': + 'Specifies the format of the binding value. If this parameter is not specified, the binding value is Date' + }, + 'demoId': 'about-format' + }, + { + 'name': 'time-format', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当自定义的format格式无法自动区分时间与日期时可配置该选项用来辅助确定格式', + 'en-US': + 'If the user-defined format cannot automatically distinguish the time and date, you can set this parameter to assist in determining the format.' + }, + 'demoId': '' + }, + { + 'name': 'isutc8', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '默认值为 false ,设置为 true 时切换系统默认时区,时间依然显示为东八区时间。适用场景为海外地区显示东八区时间', + 'en-US': + 'The default value is false. If this parameter is set to true, the time in GMT+8 is still displayed when the default time zone is switched. Applicable scenario: The GMT+8 time is displayed in regions outside China' + }, + 'demoId': 'utc8' + }, + { + 'name': 'align', + 'type': 'String', + 'defaultValue': '该属性的默认值为 left', + 'desc': { + 'zh-CN': '对齐方式;该属性的可选值为 left / center / right', + 'en-US': 'Alignment mode; The optional values of this attribute are left / center / right' + }, + 'demoId': 'align' + }, + { + 'name': 'show-timezone', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '是否开启设置日期选择面板时区选择', + 'en-US': 'Whether to enable the time zone selection function on the date selection panel' + }, + 'demoId': 'timezone' + }, + { + 'name': 'show-week-number', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否展示周次序号', 'en-US': 'Class name added to the DatePicker drop-down list box' }, + 'demoId': 'custom-weeks' + }, + { + 'name': 'format-weeks', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '格式化周次序号,该回调函数有两个参数,customWeeks 用来设置自定义周次的序号,weekFirstDays 用来获取每周次中的首个日期', + 'en-US': 'The following table lists the options of the current time and date selector.' + }, + 'demoId': 'custom-weeks' + }, + { + 'name': 'shape', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': "通过 shape='filter' 属性切换至过滤器模式。", 'en-US': 'Separator for selecting a range' }, + 'demoId': 'filter-mode' + }, + { + 'name': 'label', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': + "设置 shape='filter' 属性之后,代表过滤器模式下显示的标题,单独设置 label 属性可以使 label 放置在组件的开始位置。", + 'en-US': + 'Optional. When the selected date is empty, the time displayed by default when the selector panel is opened. Set it to a value that can be parsed by new Date().' + }, + 'demoId': 'filter-mode' + }, + { + 'name': 'tip', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '过滤器模式下显示的提示信息。', + 'en-US': + 'The specific time of the current day used by the selected date during range selection; The optional value of this attribute is see date format' + }, + 'demoId': 'filter-mode' + }, + { + 'name': 'step', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': + "设置 type='datetimerange' 属性之后,可以通过 step 配置时间的步长,step 是一个对象,包含三个属性:hour、minute、second,分别用来配置时、分、秒的步长。", + 'en-US': 'Native attribute' + }, + 'demoId': 'step' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '为 DatePicker 下拉弹框添加的 class 类名', + 'en-US': 'Cancel the linkage between two date panels in the range selector.' + }, + 'demoId': 'custom-suffix-icon1' + }, + { + 'name': 'picker-options', + 'type': 'Object', + 'defaultValue': '该属性的默认值为 {}', + 'desc': { 'zh-CN': '当前时间日期选择器特有的选项参考下表', 'en-US': "Custom selector's rear icon" }, + 'demoId': 'date-range-shortcuts' + }, + { + 'name': 'range-separator', + 'type': 'String', + 'defaultValue': '该属性的默认值为 - ', + 'desc': { 'zh-CN': '选择范围时的分隔符', 'en-US': 'Custom Clear Icon' }, + 'demoId': 'custom-range' + }, + { + 'name': 'default-value', + 'type': 'Date', + 'defaultValue': '', + 'desc': { + 'zh-CN': '可选,当选中的日期值为空时,选择器面板打开时默认显示的时间,需设置为可被new Date()解析的值', + 'en-US': + 'Use the arrow button to select the time. This parameter is used when type is set to datetime or datetimerange. By default, the time is selected by scrolling the mouse wheel' + }, + 'demoId': 'default-value' + }, + { + 'name': 'default-time', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '范围选择时选中日期所使用的当日内具体时刻;该属性的可选值为 见日期格式', + 'en-US': + 'Specifies whether the date selector triggers form validation during input. The default value is true.' + }, + 'demoId': 'default-time-of-range' + }, + { + 'name': 'name', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '原生属性', 'en-US': '' }, + 'demoId': 'timezone' + }, + { + 'name': 'unlink-panels', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '在范围选择器里取消两个日期面板之间的联动', 'en-US': '' }, + 'demoId': 'unlink-panels' + }, + { + 'name': 'suffix-icon ', + 'type': 'Object', + 'defaultValue': '该属性的默认值为 IconCalendar,', + 'desc': { 'zh-CN': '自定义选择器的后置图标', 'en-US': '' }, + 'demoId': 'custom-suffix-icon' + }, + { + 'name': 'clear-icon', + 'type': 'String', + 'defaultValue': '该属性的默认值为 IconOperationfaild', + 'desc': { 'zh-CN': '自定义清空图标', 'en-US': '' }, + 'demoId': 'about-clear' + }, + { + 'name': 'time-arrow-control', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '通过箭头按钮控制时间选择,当 type 为 datetime、datetimerange 时使用;默认为 通过鼠标滚轮滚动选择时间', + 'en-US': '' + }, + 'demoId': 'time-arrow-control' + }, + { + 'name': 'validate-event', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置日期选择器在输入时是否会触发表单校验;默认为 true', 'en-US': '' }, + 'demoId': 'validate-event' + } + ], + 'events': [ + { + 'name': 'change', + 'type': 'Function(arg1)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '用户确认选定的值时触发;change(arg1){ // arg1为datepicker改变后的日期或者是日期集}', + 'en-US': + 'This event is triggered when the user confirms the selected value. change (arg1) {//arg1 is the changed date or date set of datepicker}' + }, + 'demoId': 'date-picker-events' + }, + { + 'name': 'blur', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当 input 失去焦点时触发;blur() { \n//do something you want...\n}', + 'en-US': 'This event is triggered when the input loses focus; blur() {\n//do something you want...\n}' + }, + 'demoId': 'date-picker-events' + }, + { + 'name': 'focus', + 'type': 'Function(arg1)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当 input 获得焦点时触发;focus(arg1}{ \n// arg1 = 对组件vue实例 \n//do something you want...\n}', + 'en-US': + 'This event is triggered when the input is focused. focus(arg1}{\n// arg1 = to component vue instance\n//do something you want...\n}' + }, + 'demoId': 'date-picker-events' + } + ], + 'slots': [], + 'methods': [ + { + 'name': 'focus', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '使 input 获取焦点', 'en-US': 'Enable input to focus.' }, + 'demoId': 'focus' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/date-picker/year-type-composition-api.vue b/examples/sites/demos/app/date-picker/year-type-composition-api.vue new file mode 100644 index 000000000..1068fad47 --- /dev/null +++ b/examples/sites/demos/app/date-picker/year-type-composition-api.vue @@ -0,0 +1,39 @@ + + + diff --git a/examples/sites/demos/app/date-picker/year-type.vue b/examples/sites/demos/app/date-picker/year-type.vue new file mode 100644 index 000000000..d2ec01d50 --- /dev/null +++ b/examples/sites/demos/app/date-picker/year-type.vue @@ -0,0 +1,50 @@ + + + diff --git a/examples/sites/demos/app/dept/auto-select-composition-api.vue b/examples/sites/demos/app/dept/auto-select-composition-api.vue new file mode 100644 index 000000000..89a40ddd9 --- /dev/null +++ b/examples/sites/demos/app/dept/auto-select-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/dept/auto-select.vue b/examples/sites/demos/app/dept/auto-select.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/auto-select.vue rename to examples/sites/demos/app/dept/auto-select.vue diff --git a/examples/sites/demos/app/dept/basic-usage-composition-api.vue b/examples/sites/demos/app/dept/basic-usage-composition-api.vue new file mode 100644 index 000000000..3ac9bf7c2 --- /dev/null +++ b/examples/sites/demos/app/dept/basic-usage-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/dept/basic-usage.vue b/examples/sites/demos/app/dept/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/basic-usage.vue rename to examples/sites/demos/app/dept/basic-usage.vue diff --git a/examples/sites/demos/app/dept/before-confirm-composition-api.vue b/examples/sites/demos/app/dept/before-confirm-composition-api.vue new file mode 100644 index 000000000..9cfa3894d --- /dev/null +++ b/examples/sites/demos/app/dept/before-confirm-composition-api.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/dept/before-confirm.vue b/examples/sites/demos/app/dept/before-confirm.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/before-confirm.vue rename to examples/sites/demos/app/dept/before-confirm.vue diff --git a/examples/sites/demos/app/dept/custom-service-composition-api.vue b/examples/sites/demos/app/dept/custom-service-composition-api.vue new file mode 100644 index 000000000..8ba165ccd --- /dev/null +++ b/examples/sites/demos/app/dept/custom-service-composition-api.vue @@ -0,0 +1,276 @@ + + + diff --git a/examples/sites/demos/app/dept/custom-service.spec.ts b/examples/sites/demos/app/dept/custom-service.spec.ts new file mode 100644 index 000000000..2f34a2dc6 --- /dev/null +++ b/examples/sites/demos/app/dept/custom-service.spec.ts @@ -0,0 +1,23 @@ +import { test, expect } from '@playwright/test' + +test('自定义服务数据', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/dept/custom-service') + const iconBox = page.locator('.tiny-input__suffix-inner svg') + await iconBox.first().click() + await page.getByPlaceholder('可输入部门编码或名称').click() + await page.getByText('无线网络业务架构与设计部').click() + await page.locator('.col-xs-9 > .tiny-select > div > .tiny-input > .tiny-input__inner').first().click() + await page.getByRole('listitem').filter({ hasText: 'SZ技术' }).click() + await page.locator('div:nth-child(3) > .col-xs-9 > .tiny-select > div > .tiny-input > .tiny-input__inner').click() + await page.getByRole('listitem').filter({ hasText: '测试数据室XX' }).click() + await page.locator('div:nth-child(7) > .col-xs-9 > .tiny-select > div > .tiny-input > .tiny-input__inner').click() + await page.getByRole('listitem').filter({ hasText: '测试数据室XX' }).click() + await page.waitForTimeout(500) + await page.getByRole('button', { name: '确定' }).click() + // await page.waitForTimeout(500) + const inputBox = page.locator('.tiny-dept .tiny-input input').first() + await expect(inputBox).toHaveValue( + 'SZ技术/测试数据室XX/中央XX测试数据部/XX应用交付部/XX应用实施部/测试数据室XX/中央XX测试数据部/XX应用交付部/XX应用实施部' + ) +}) diff --git a/examples/docs/resources/pc/demo/dept/custom-service.vue b/examples/sites/demos/app/dept/custom-service.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/custom-service.vue rename to examples/sites/demos/app/dept/custom-service.vue diff --git a/examples/sites/demos/app/dept/dept-cancel-composition-api.vue b/examples/sites/demos/app/dept/dept-cancel-composition-api.vue new file mode 100644 index 000000000..08a9ab5fc --- /dev/null +++ b/examples/sites/demos/app/dept/dept-cancel-composition-api.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/dept/dept-cancel.vue b/examples/sites/demos/app/dept/dept-cancel.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/dept-cancel.vue rename to examples/sites/demos/app/dept/dept-cancel.vue diff --git a/examples/sites/demos/app/dept/dept-close-composition-api.vue b/examples/sites/demos/app/dept/dept-close-composition-api.vue new file mode 100644 index 000000000..9d869052d --- /dev/null +++ b/examples/sites/demos/app/dept/dept-close-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/dept/dept-close.vue b/examples/sites/demos/app/dept/dept-close.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/dept-close.vue rename to examples/sites/demos/app/dept/dept-close.vue diff --git a/examples/sites/demos/app/dept/dept-confirm-composition-api.vue b/examples/sites/demos/app/dept/dept-confirm-composition-api.vue new file mode 100644 index 000000000..1535db63a --- /dev/null +++ b/examples/sites/demos/app/dept/dept-confirm-composition-api.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/dept/dept-confirm.vue b/examples/sites/demos/app/dept/dept-confirm.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/dept-confirm.vue rename to examples/sites/demos/app/dept/dept-confirm.vue diff --git a/examples/sites/demos/app/dept/dept-events-composition-api.vue b/examples/sites/demos/app/dept/dept-events-composition-api.vue new file mode 100644 index 000000000..c94dc3cc5 --- /dev/null +++ b/examples/sites/demos/app/dept/dept-events-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/dept/dept-events.vue b/examples/sites/demos/app/dept/dept-events.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/dept-events.vue rename to examples/sites/demos/app/dept/dept-events.vue diff --git a/examples/sites/demos/app/dept/dept-selected-composition-api.vue b/examples/sites/demos/app/dept/dept-selected-composition-api.vue new file mode 100644 index 000000000..40321d8b4 --- /dev/null +++ b/examples/sites/demos/app/dept/dept-selected-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/dept/dept-selected.vue b/examples/sites/demos/app/dept/dept-selected.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/dept-selected.vue rename to examples/sites/demos/app/dept/dept-selected.vue diff --git a/examples/sites/demos/app/dept/dynamic-disable-composition-api.vue b/examples/sites/demos/app/dept/dynamic-disable-composition-api.vue new file mode 100644 index 000000000..60b8e5d37 --- /dev/null +++ b/examples/sites/demos/app/dept/dynamic-disable-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/dept/dynamic-disable.vue b/examples/sites/demos/app/dept/dynamic-disable.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/dynamic-disable.vue rename to examples/sites/demos/app/dept/dynamic-disable.vue diff --git a/examples/sites/demos/app/dept/size-composition-api.vue b/examples/sites/demos/app/dept/size-composition-api.vue new file mode 100644 index 000000000..47526b41b --- /dev/null +++ b/examples/sites/demos/app/dept/size-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/dept/size.vue b/examples/sites/demos/app/dept/size.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/size.vue rename to examples/sites/demos/app/dept/size.vue diff --git a/examples/sites/demos/app/dept/slot-hrapprover-composition-api.vue b/examples/sites/demos/app/dept/slot-hrapprover-composition-api.vue new file mode 100644 index 000000000..85683d4ba --- /dev/null +++ b/examples/sites/demos/app/dept/slot-hrapprover-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/dept/slot-hrapprover.vue b/examples/sites/demos/app/dept/slot-hrapprover.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/slot-hrapprover.vue rename to examples/sites/demos/app/dept/slot-hrapprover.vue diff --git a/examples/sites/demos/app/dept/title-composition-api.vue b/examples/sites/demos/app/dept/title-composition-api.vue new file mode 100644 index 000000000..1e3adc48d --- /dev/null +++ b/examples/sites/demos/app/dept/title-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/dept/title.vue b/examples/sites/demos/app/dept/title.vue similarity index 100% rename from examples/docs/resources/pc/demo/dept/title.vue rename to examples/sites/demos/app/dept/title.vue diff --git a/examples/sites/demos/app/dept/webdoc/dept.cn.md b/examples/sites/demos/app/dept/webdoc/dept.cn.md new file mode 100644 index 000000000..bd4b1add0 --- /dev/null +++ b/examples/sites/demos/app/dept/webdoc/dept.cn.md @@ -0,0 +1,7 @@ +--- +title: Dept 部门 +--- + +# Dept 部门 + +
部门组件用于华为部门查询、选择,可以指定默认值为当前登录用户所在部门。
diff --git a/examples/sites/demos/app/dept/webdoc/dept.en.md b/examples/sites/demos/app/dept/webdoc/dept.en.md new file mode 100644 index 000000000..5fde12906 --- /dev/null +++ b/examples/sites/demos/app/dept/webdoc/dept.en.md @@ -0,0 +1,7 @@ +--- +title: Department +--- + +# Department + +
The department component is used to query and select Huawei departments. The default value is the department to which the current login user belongs.
diff --git a/examples/sites/demos/app/dept/webdoc/dept.js b/examples/sites/demos/app/dept/webdoc/dept.js new file mode 100644 index 000000000..10a48aece --- /dev/null +++ b/examples/sites/demos/app/dept/webdoc/dept.js @@ -0,0 +1,274 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'dept-events', + 'name': { 'zh-CN': 'open 和 change 事件', 'en-US': 'open and change events' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['dept-events.vue'] + }, + { + 'demoId': 'dept-selected', + 'name': { 'zh-CN': 'selected 事件', 'en-US': 'selected event' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['dept-selected.vue'] + }, + { + 'demoId': 'dept-close', + 'name': { 'zh-CN': 'close 事件', 'en-US': 'close event' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['dept-close.vue'] + }, + { + 'demoId': 'dept-confirm', + 'name': { 'zh-CN': 'confirm 事件', 'en-US': 'confirm event' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['dept-confirm.vue'] + }, + { + 'demoId': 'dept-cancel', + 'name': { 'zh-CN': 'cancel 事件', 'en-US': 'cancel event' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['dept-cancel.vue'] + }, + { + 'demoId': 'size', + 'name': { 'zh-CN': '设置组件大小', 'en-US': 'Set Component Size' }, + 'desc': { + 'zh-CN': '

可以设置为:mediumsmallmini

\n', + 'en-US': '

can be set to medium, small, mini

\n' + }, + 'codeFiles': ['size.vue'] + }, + { + 'demoId': 'before-confirm', + 'name': { 'zh-CN': '阻止弹框关闭', 'en-US': 'Prevent pop-up dialog box closing' }, + 'desc': { + 'zh-CN': '

before-confirm(确认前回调事件),方法里面 return true/false,表示是否关闭弹框

\n', + 'en-US': + '

before-confirm (callback event before confirmation). In the method, return true/false indicates whether to close the dialog box.

\n' + }, + 'codeFiles': ['before-confirm.vue'] + }, + { + 'demoId': 'auto-select', + 'name': { 'zh-CN': '部门信息自动选中', 'en-US': 'Department information is automatically selected.' }, + 'desc': { + 'zh-CN': + '

auto-select 默认值为 true,配置该属性为 false 可以阻止当部门信息仅一个时自动补全选中行为。

\n', + 'en-US': + 'The default value of

auto-select is true. If this parameter is set to false, the system automatically supplements the selected information when there is only one department.

\n' + }, + 'codeFiles': ['auto-select.vue'] + }, + { + 'demoId': 'custom-service', + 'name': { 'zh-CN': '自定义服务数据', 'en-US': 'Customized Service Data' }, + 'desc': { + 'zh-CN': + '

提供 fetch-dept-by-valuefetch-deptfetch-dept-list 属性用于自定义部门服务。

\n', + 'en-US': + '

provides the fetch-dept-by-value, fetch-dept, and fetch-dept-list attributes for customizing department services.

\n' + }, + 'codeFiles': ['custom-service.vue'] + }, + { + 'demoId': 'dynamic-disable', + 'name': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'desc': { + 'zh-CN': '

可通过 disabled 设置是否禁用,默认为 fase

\n', + 'en-US': + '

You can use disabled to set whether to disable the function. The default value is fase

\n' + }, + 'codeFiles': ['dynamic-disable.vue'] + }, + { + 'demoId': 'title', + 'name': { 'zh-CN': '设置弹出框标题', 'en-US': 'Set the dialog box title.' }, + 'desc': { + 'zh-CN': '

自定义弹出框标题,该属性默认值为空。

\n', + 'en-US': '

Customized dialog box title. The default value of this attribute is null.

\n' + }, + 'codeFiles': ['title.vue'] + }, + { + 'demoId': 'slot-hrapprover', + 'name': { 'zh-CN': '权签人插槽', 'en-US': 'Approval Slot' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['slot-hrapprover.vue'] + } + ], + apis: [ + { + 'name': 'dept', + 'type': 'component', + 'properties': [ + { + 'name': 'value', + 'type': 'String ', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置部门组件的初始化时的显示值。', + 'en-US': 'Set the display value of the department component during initialization.' + }, + 'demoId': 'size' + }, + { + 'name': 'size', + 'type': 'String ', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置组件大小', 'en-US': 'Set the component size' }, + 'demoId': 'size' + }, + { + 'name': 'title', + 'type': 'String ', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置弹窗标题', 'en-US': 'Set the pop-up window title.' }, + 'demoId': '' + }, + { + 'name': 'disabled', + 'type': 'Boolen', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '禁用', 'en-US': 'Disabled' }, + 'demoId': 'dynamic-disable' + }, + { + 'name': 'autoSelect', + 'type': 'Boolen', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': '设置当部门信息仅一条数据时时自动补全选中', + 'en-US': + 'Specify that when there is only one piece of department information, the system automatically completes the information.' + }, + 'demoId': 'auto-select' + }, + { + 'name': 'fetchDeptList', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义部门列表查询接口,返回一个Promise对象,未使用框架服务时必填', + 'en-US': + 'The interface for querying the customized department list returns a Promise object. This parameter is mandatory when the framework service is not used.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'fetchDeptByValue', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义部门详情查询接口,返回一个Promise对象,未使用框架服务时必填', + 'en-US': + 'The interface for querying customized department details returns a Promise object. This parameter is mandatory when the framework service is not used.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'fetchDept', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义部门搜索查询接口,返回一个Promise对象,未使用框架服务时必填', + 'en-US': + 'The interface for querying customized departments returns a Promise object. This parameter is mandatory when the framework service is not used.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'beforeConfirm', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '确认之前的钩子,若返回 false 或者返回 Promise 且被 reject,则阻止弹框关闭', + 'en-US': 'If false is returned or Promise is returned and rejected, the dialog box is not closed.' + }, + 'demoId': 'before-confirm' + } + ], + 'events': [ + { + 'name': 'confirm', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '点击确认按钮触发的事件。', + 'en-US': 'This event is triggered when the OK button is clicked.' + }, + 'demoId': 'dept-confirm' + }, + { + 'name': 'cancel', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '点击取消按钮触发的事件。', + 'en-US': 'This event is triggered when the Cancel button is clicked.' + }, + 'demoId': 'dept-cancel' + }, + { + 'name': 'selected', + 'type': 'Function(value)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '点击选中部门触发的事件,回调参数为选中的部门编码。', + 'en-US': + 'This event is triggered when you click a selected department. The callback parameter is the selected department code.' + }, + 'demoId': 'dept-selected' + }, + { + 'name': 'open', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '点击弹出弹框触发的事件。', + 'en-US': 'This event is triggered when a user clicks a dialog box that is displayed.' + }, + 'demoId': 'dept-events' + }, + { + 'name': 'change', + 'type': 'Function(value)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '选择的部门值改变时触发,回调参数为改变后的部门编码。;value: 改变后的值', + 'en-US': + 'This event is triggered when the selected department value changes. The callback parameter is the new department code. ; value: changed value' + }, + 'demoId': 'dept-events' + }, + { + 'name': 'close', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '关闭部门弹出框时触发该事件。', + 'en-US': 'This event is triggered when a department dialog box is closed.' + }, + 'demoId': 'dept-close' + } + ], + 'slots': [ + { + 'name': 'hrapprover', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '权签人', 'en-US': 'Approval' }, + 'demoId': 'slot-hrapprover' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/detail-page/basic-usage-composition-api.vue b/examples/sites/demos/app/detail-page/basic-usage-composition-api.vue new file mode 100644 index 000000000..6e48d3765 --- /dev/null +++ b/examples/sites/demos/app/detail-page/basic-usage-composition-api.vue @@ -0,0 +1,32 @@ + + + diff --git a/examples/docs/resources/pc/demo/detail-page/basic-usage.spec.ts b/examples/sites/demos/app/detail-page/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/detail-page/basic-usage.spec.ts rename to examples/sites/demos/app/detail-page/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/detail-page/basic-usage.vue b/examples/sites/demos/app/detail-page/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/detail-page/basic-usage.vue rename to examples/sites/demos/app/detail-page/basic-usage.vue diff --git a/examples/sites/demos/app/detail-page/custom-show-text-composition-api.vue b/examples/sites/demos/app/detail-page/custom-show-text-composition-api.vue new file mode 100644 index 000000000..51515c728 --- /dev/null +++ b/examples/sites/demos/app/detail-page/custom-show-text-composition-api.vue @@ -0,0 +1,42 @@ + + + diff --git a/examples/docs/resources/pc/demo/detail-page/custom-show-text.spec.ts b/examples/sites/demos/app/detail-page/custom-show-text.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/detail-page/custom-show-text.spec.ts rename to examples/sites/demos/app/detail-page/custom-show-text.spec.ts diff --git a/examples/docs/resources/pc/demo/detail-page/custom-show-text.vue b/examples/sites/demos/app/detail-page/custom-show-text.vue similarity index 100% rename from examples/docs/resources/pc/demo/detail-page/custom-show-text.vue rename to examples/sites/demos/app/detail-page/custom-show-text.vue diff --git a/examples/sites/demos/app/detail-page/webdoc/detail-page.cn.md b/examples/sites/demos/app/detail-page/webdoc/detail-page.cn.md new file mode 100644 index 000000000..a2713cb03 --- /dev/null +++ b/examples/sites/demos/app/detail-page/webdoc/detail-page.cn.md @@ -0,0 +1,7 @@ +--- +title: DetailPage 表头详情栏 +--- + +# DetailPage 表头详情栏 + +
DetailPage 带表头的详情栏组件。
diff --git a/examples/sites/demos/app/detail-page/webdoc/detail-page.en.md b/examples/sites/demos/app/detail-page/webdoc/detail-page.en.md new file mode 100644 index 000000000..af57d27c7 --- /dev/null +++ b/examples/sites/demos/app/detail-page/webdoc/detail-page.en.md @@ -0,0 +1,7 @@ +--- +title: DetailPage header details column +--- + +# DetailPage header details column + +
DetailPage detail bar component with a table header.
diff --git a/examples/sites/demos/app/detail-page/webdoc/detail-page.js b/examples/sites/demos/app/detail-page/webdoc/detail-page.js new file mode 100644 index 000000000..457d18352 --- /dev/null +++ b/examples/sites/demos/app/detail-page/webdoc/detail-page.js @@ -0,0 +1,124 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': '

在数据对象中可设置 hidden: true 来指定默认隐藏的数据。

\n', + 'en-US': + '

You can set hidden: true in the data object to specify the data to be hidden by default.

\n' + }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'custom-show-text', + 'name': { 'zh-CN': '自定义展示文本', 'en-US': 'Custom Text' }, + 'desc': { + 'zh-CN': + '

通过 titletext-splitdialog-titlelabel-titlevalue-titletipssave-buttoncancel-button 这些属性可指定表头详情栏组件不同位置的展示文本。

\n', + 'en-US': + '

via title, text-split, dialog-title, label-title, value-title The , tips, save-button, and cancel-button attributes specify the display text in different positions of the header details bar component.

\n' + }, + 'codeFiles': ['custom-show-text.vue'] + } + ], + apis: [ + { + 'name': 'detail-page', + 'type': 'component', + 'properties': [ + { + 'name': 'modelValue / v-model', + 'type': 'Array', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置表头详情栏的数据', 'en-US': 'Set the data in the table header details column' }, + 'demoId': '' + }, + { + 'name': 'title', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': "详情栏标题;默认为 '带表头的详情栏'", + 'en-US': 'Details column title; The default value is Detail Bar with Table Header.' + }, + 'demoId': 'custom-show-text' + }, + { + 'name': 'text-split', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': "详情栏标题分隔符;默认为 ':'", + 'en-US': "Details column title separator; The default value is ':'" + }, + 'demoId': 'custom-show-text' + }, + { + 'name': 'dialog-title', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': "个性化弹窗标题;默认为 '个性化设置'", + 'en-US': "Personalized pop-up window title; Default to'Personalization'" + }, + 'demoId': 'custom-show-text' + }, + { + 'name': 'label-title', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': "个性化弹窗表头文本标题栏字段;默认为 '字段'", + 'en-US': "Personalized pop-up window header text title bar field; The default value is'Field'" + }, + 'demoId': 'custom-show-text' + }, + { + 'name': 'tips', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': "提示不能全部隐藏的提示语;默认为 '至少显示一个'", + 'en-US': "Prompt message that cannot be completely hidden; The default value is'At least one is displayed'" + }, + 'demoId': 'custom-show-text' + }, + { + 'name': 'value-title', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': "个性化弹窗表头文本操作栏字段;默认为 '隐藏'", + 'en-US': "Personalized pop-up window header text operation column field; The default value is'hidden'" + }, + 'demoId': 'custom-show-text' + }, + { + 'name': 'save-button', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': "个性化弹窗确定按钮的文本;默认为 '确 定'", + 'en-US': "Text of the confirmation button in the personalized pop-up window; The default value is'OK'" + }, + 'demoId': 'custom-show-text' + }, + { + 'name': 'cancel-button', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': "个性化弹窗取消按钮的文本;默认为 '取 消'", + 'en-US': "Text of the cancel button in the personalized pop-up window; The default value is'Cancel'" + }, + 'demoId': 'custom-show-text' + } + ], + 'events': [], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/dialog-box/basic-usage-composition-api.vue b/examples/sites/demos/app/dialog-box/basic-usage-composition-api.vue new file mode 100644 index 000000000..ac6f73761 --- /dev/null +++ b/examples/sites/demos/app/dialog-box/basic-usage-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/dialog-box/basic-usage.spec.ts b/examples/sites/demos/app/dialog-box/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/dialog-box/basic-usage.spec.ts rename to examples/sites/demos/app/dialog-box/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/dialog-box/basic-usage.vue b/examples/sites/demos/app/dialog-box/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/dialog-box/basic-usage.vue rename to examples/sites/demos/app/dialog-box/basic-usage.vue diff --git a/examples/sites/demos/app/dialog-box/center-composition-api.vue b/examples/sites/demos/app/dialog-box/center-composition-api.vue new file mode 100644 index 000000000..917691ba4 --- /dev/null +++ b/examples/sites/demos/app/dialog-box/center-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/dialog-box/center.spec.ts b/examples/sites/demos/app/dialog-box/center.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/dialog-box/center.spec.ts rename to examples/sites/demos/app/dialog-box/center.spec.ts diff --git a/examples/docs/resources/pc/demo/dialog-box/center.vue b/examples/sites/demos/app/dialog-box/center.vue similarity index 88% rename from examples/docs/resources/pc/demo/dialog-box/center.vue rename to examples/sites/demos/app/dialog-box/center.vue index 2e9d91ac5..4b5c11b0a 100644 --- a/examples/docs/resources/pc/demo/dialog-box/center.vue +++ b/examples/sites/demos/app/dialog-box/center.vue @@ -1,6 +1,8 @@ + + diff --git a/examples/sites/demos/app/guide/guide-poistion-crossAxis.spec.ts b/examples/sites/demos/app/guide/guide-poistion-crossAxis.spec.ts new file mode 100644 index 000000000..fab85b79c --- /dev/null +++ b/examples/sites/demos/app/guide/guide-poistion-crossAxis.spec.ts @@ -0,0 +1,22 @@ +import { test, expect } from '@playwright/test' + +test('引导框横轴距离', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/guide/guide-poistion-crossAxis') + + const guideBtn1 = page.getByRole('button', { name: '新手引导1' }) + const guideBtn2 = page.getByRole('button', { name: '新手引导2' }) + const guide = page.getByRole('dialog') + const arrow = guide.locator('.shepherd-arrow') + + // 引导1 距离10 + await guideBtn1.click() + await expect(guide).toBeVisible() + await expect(arrow).toHaveCSS('left', '363.5px') + + // 引导2 距离20 + await page.getByRole('button', { name: 'Close Tour' }).click() + await guideBtn2.click() + await expect(guide).toBeVisible() + await expect(arrow).toHaveCSS('left', '353.5px') +}) diff --git a/examples/docs/resources/pc/demo/guide/guide-poistion-crossAxis.vue b/examples/sites/demos/app/guide/guide-poistion-crossAxis.vue similarity index 98% rename from examples/docs/resources/pc/demo/guide/guide-poistion-crossAxis.vue rename to examples/sites/demos/app/guide/guide-poistion-crossAxis.vue index b636c54e2..e04bd70dd 100644 --- a/examples/docs/resources/pc/demo/guide/guide-poistion-crossAxis.vue +++ b/examples/sites/demos/app/guide/guide-poistion-crossAxis.vue @@ -15,6 +15,7 @@ + + diff --git a/examples/sites/demos/app/guide/guide-poistion-mainAxis.spec.ts b/examples/sites/demos/app/guide/guide-poistion-mainAxis.spec.ts new file mode 100644 index 000000000..83d7b327c --- /dev/null +++ b/examples/sites/demos/app/guide/guide-poistion-mainAxis.spec.ts @@ -0,0 +1,25 @@ +import { test, expect } from '@playwright/test' + +test('引导框主轴(纵轴)距离', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/guide/guide-poistion-mainAxis') + + const guideBtn1 = page.getByRole('button', { name: '新手引导1' }) + const guideBtn2 = page.getByRole('button', { name: '新手引导2' }) + const guide = page.getByRole('dialog') + + // 引导1 没有设置 + await guideBtn1.click() + await expect(guide).toBeVisible() + + const guideBox1 = await guide.boundingBox() + + // 引导2 50px + await page.getByRole('button', { name: 'Close Tour' }).click() + await guideBtn2.click() + await expect(guide).toBeVisible() + + const guideBox2 = await guide.boundingBox() + + expect(guideBox1.y).toBeLessThan(guideBox2.y) +}) diff --git a/examples/docs/resources/pc/demo/guide/guide-poistion-mainAxis.vue b/examples/sites/demos/app/guide/guide-poistion-mainAxis.vue similarity index 99% rename from examples/docs/resources/pc/demo/guide/guide-poistion-mainAxis.vue rename to examples/sites/demos/app/guide/guide-poistion-mainAxis.vue index 044790565..eeaca0e08 100644 --- a/examples/docs/resources/pc/demo/guide/guide-poistion-mainAxis.vue +++ b/examples/sites/demos/app/guide/guide-poistion-mainAxis.vue @@ -8,6 +8,7 @@ + + diff --git a/examples/sites/demos/app/guide/title-steps.spec.ts b/examples/sites/demos/app/guide/title-steps.spec.ts new file mode 100644 index 000000000..60baf5ec7 --- /dev/null +++ b/examples/sites/demos/app/guide/title-steps.spec.ts @@ -0,0 +1,23 @@ +import { test, expect } from '@playwright/test' + +test('通过添加多个类名实现用户引导', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/guide/title-steps') + + const showBtn = page.getByRole('button', { name: '多步骤新手引导开始' }) + const step1 = page.getByRole('heading', { name: '新手引导标题1' }) + const step2 = page.getByRole('heading', { name: '新手引导标题2' }) + const step3 = page.getByRole('dialog').locator('div').nth(2) + const next = page.getByRole('button', { name: '下一步' }) + const complate = page.getByRole('button', { name: '完成' }) + const closeBtn = page.getByRole('button', { name: 'Close Tour' }) + + await showBtn.click() + await expect(step1).toBeVisible() + await next.click() + await expect(step2).toBeVisible() + await next.click() + await expect(step3).toBeVisible() + await complate.click() + await expect(step3).toBeHidden() +}) diff --git a/examples/docs/resources/pc/demo/guide/title-steps.vue b/examples/sites/demos/app/guide/title-steps.vue similarity index 97% rename from examples/docs/resources/pc/demo/guide/title-steps.vue rename to examples/sites/demos/app/guide/title-steps.vue index ce8b074ef..554f27ac8 100644 --- a/examples/docs/resources/pc/demo/guide/title-steps.vue +++ b/examples/sites/demos/app/guide/title-steps.vue @@ -10,6 +10,7 @@ + + diff --git a/examples/sites/demos/app/icon/basic-usage.spec.js b/examples/sites/demos/app/icon/basic-usage.spec.js new file mode 100644 index 000000000..040f42b46 --- /dev/null +++ b/examples/sites/demos/app/icon/basic-usage.spec.js @@ -0,0 +1,16 @@ +import { test, expect } from '@playwright/test' + +test('test', async ({ page }) => { + await page.goto('http://localhost:7130/pc/icon/basic-usage') + await page.getByText('基本用法').nth(1).click() + await page.locator('.icon-demo > svg').first().click() + await expect(page.locator('.icon-demo > svg').first()).toHaveClass(/icon-share/) + await page.locator('svg:nth-child(2)').first().click() + await expect(page.locator('svg:nth-child(2)').first()).toHaveClass(/icon-del/) + await page.locator('svg:nth-child(3)').click() + await expect(page.locator('svg:nth-child(3)')).toHaveClass(/icon-writing/) + await page.locator('svg:nth-child(4)').click() + await expect(page.locator('svg:nth-child(4)')).toHaveClass(/icon-ascending/) + await page.locator('.icon').click() + await expect(page.locator('.icon')).toHaveClass(/icon-clockWork/) +}) diff --git a/examples/docs/resources/pc/demo/icon/basic-usage.vue b/examples/sites/demos/app/icon/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/icon/basic-usage.vue rename to examples/sites/demos/app/icon/basic-usage.vue diff --git a/examples/docs/resources/pc/demo/icon/iconGroups.js b/examples/sites/demos/app/icon/iconGroups.js similarity index 100% rename from examples/docs/resources/pc/demo/icon/iconGroups.js rename to examples/sites/demos/app/icon/iconGroups.js diff --git a/examples/sites/demos/app/icon/list-composition-api.vue b/examples/sites/demos/app/icon/list-composition-api.vue new file mode 100644 index 000000000..330eb0b67 --- /dev/null +++ b/examples/sites/demos/app/icon/list-composition-api.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/examples/sites/demos/app/icon/list.spec.js b/examples/sites/demos/app/icon/list.spec.js new file mode 100644 index 000000000..4279d9fa9 --- /dev/null +++ b/examples/sites/demos/app/icon/list.spec.js @@ -0,0 +1,8 @@ +import { test, expect } from '@playwright/test' + +test('test', async ({ page }) => { + await page.goto('http://localhost:7130/pc/icon/show-title') + await page.getByText('显示 Title').nth(1).click() + await page.getByTitle('复制').locator('svg').click() + await expect(page.locator('//*[@id="preview"]/div[2]/div[2]')).toHaveAttribute('title', '复制') +}) diff --git a/examples/docs/resources/pc/demo/icon/list.vue b/examples/sites/demos/app/icon/list.vue similarity index 90% rename from examples/docs/resources/pc/demo/icon/list.vue rename to examples/sites/demos/app/icon/list.vue index 0815aebef..e3566f573 100644 --- a/examples/docs/resources/pc/demo/icon/list.vue +++ b/examples/sites/demos/app/icon/list.vue @@ -10,7 +10,12 @@ {{ groupName }} - diff --git a/examples/docs/resources/pc/demo/popeditor/events.spec.ts b/examples/sites/demos/app/popeditor/events.spec.ts similarity index 93% rename from examples/docs/resources/pc/demo/popeditor/events.spec.ts rename to examples/sites/demos/app/popeditor/events.spec.ts index 83247b941..bdedfac1e 100644 --- a/examples/docs/resources/pc/demo/popeditor/events.spec.ts +++ b/examples/sites/demos/app/popeditor/events.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor change 事件', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/events') + await page.goto('http://localhost:7130/pc/popeditor/events') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') @@ -18,5 +18,4 @@ test('PopEditor change 事件', async ({ page }) => { await expect(dialogBox).not.toBeVisible() await expect(textBox).toHaveValue('GFD科技YX公司') await expect(infoModal).toBeVisible() - }) diff --git a/examples/docs/resources/pc/demo/popeditor/events.vue b/examples/sites/demos/app/popeditor/events.vue similarity index 99% rename from examples/docs/resources/pc/demo/popeditor/events.vue rename to examples/sites/demos/app/popeditor/events.vue index f13398c77..68af35f22 100644 --- a/examples/docs/resources/pc/demo/popeditor/events.vue +++ b/examples/sites/demos/app/popeditor/events.vue @@ -11,7 +11,7 @@ > - diff --git a/examples/sites/demos/app/popeditor/grid.spec.ts b/examples/sites/demos/app/popeditor/grid.spec.ts new file mode 100644 index 000000000..7d23a8508 --- /dev/null +++ b/examples/sites/demos/app/popeditor/grid.spec.ts @@ -0,0 +1,15 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 表格编辑', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/grid') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const dialogBox = page.locator('.tiny-dialog-box') + const grid = dialogBox.locator('.tiny-grid__wrapper') + + await textBox.click() + await expect(dialogBox).toBeVisible() + await expect(grid).toBeVisible() +}) diff --git a/examples/docs/resources/pc/demo/popeditor/grid.vue b/examples/sites/demos/app/popeditor/grid.vue similarity index 99% rename from examples/docs/resources/pc/demo/popeditor/grid.vue rename to examples/sites/demos/app/popeditor/grid.vue index 11da1a25c..a87a31a7c 100644 --- a/examples/docs/resources/pc/demo/popeditor/grid.vue +++ b/examples/sites/demos/app/popeditor/grid.vue @@ -2,7 +2,7 @@ - diff --git a/examples/sites/demos/app/popeditor/icon.spec.ts b/examples/sites/demos/app/popeditor/icon.spec.ts new file mode 100644 index 000000000..49f0c9535 --- /dev/null +++ b/examples/sites/demos/app/popeditor/icon.spec.ts @@ -0,0 +1,15 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 自定义图标', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/icon') + + const preview = page.locator('#preview') + const icon = preview.locator('.tiny-popeditor-readonly svg path') + + // 图标非默认图标 + await expect(icon).not.toHaveAttribute( + 'd', + 'M292.768 449.694c2.491.515 4.99.987 7.469 1.551 28.956 6.587 48.828 32.893 47.59 62.98-1.187 28.85-23.508 53.387-52.383 57.605-.904.132-1.784.433-2.676.655H280.21c-.773-.21-1.536-.498-2.323-.615-26.22-3.891-46.433-23.108-51.662-49.134-.36-1.793-.753-3.579-1.13-5.369V504.81c.233-.992.536-1.973.694-2.977 3.902-24.797 21.983-44.51 46.302-50.418 2.688-.653 5.413-1.151 8.12-1.722 4.185.002 8.371.002 12.557.002zm212.46 122.792c-2.49-.515-4.99-.988-7.469-1.55-28.956-6.589-48.828-32.895-47.59-62.981 1.186-28.85 23.507-53.387 52.383-57.604.905-.132 1.785-.433 2.676-.656h12.557c2.491.515 4.99.987 7.47 1.551 28.956 6.587 48.828 32.893 47.59 62.98-1.186 28.85-23.507 53.387-52.383 57.605-.904.132-1.784.433-2.676.655h-12.558zm224.692 0c-2.491-.515-4.991-.988-7.47-1.55-28.957-6.589-48.829-32.895-47.59-62.981 1.186-28.85 23.507-53.387 52.383-57.604.904-.132 1.784-.433 2.676-.656h12.557c.774.209 1.536.498 2.324.615 26.22 3.89 46.433 23.108 51.661 49.134.361 1.793.753 3.58 1.131 5.368v12.558c-.234.992-.536 1.973-.695 2.977-3.902 24.798-21.983 44.51-46.302 50.418-2.688.654-5.412 1.152-8.12 1.723-4.184-.002-8.369-.002-12.555-.002z' + ) +}) diff --git a/examples/sites/demos/app/popeditor/icon.vue b/examples/sites/demos/app/popeditor/icon.vue new file mode 100644 index 000000000..987130b6c --- /dev/null +++ b/examples/sites/demos/app/popeditor/icon.vue @@ -0,0 +1,111 @@ + + + diff --git a/examples/sites/demos/app/popeditor/multi-composition-api.vue b/examples/sites/demos/app/popeditor/multi-composition-api.vue new file mode 100644 index 000000000..7659929d0 --- /dev/null +++ b/examples/sites/demos/app/popeditor/multi-composition-api.vue @@ -0,0 +1,109 @@ + + + diff --git a/examples/sites/demos/app/popeditor/multi-value-array-composition-api.vue b/examples/sites/demos/app/popeditor/multi-value-array-composition-api.vue new file mode 100644 index 000000000..09f460a5f --- /dev/null +++ b/examples/sites/demos/app/popeditor/multi-value-array-composition-api.vue @@ -0,0 +1,109 @@ + + + diff --git a/examples/docs/resources/pc/demo/popeditor/multi-value-array.spec.ts b/examples/sites/demos/app/popeditor/multi-value-array.spec.ts similarity index 87% rename from examples/docs/resources/pc/demo/popeditor/multi-value-array.spec.ts rename to examples/sites/demos/app/popeditor/multi-value-array.spec.ts index b943534bf..c993b6122 100644 --- a/examples/docs/resources/pc/demo/popeditor/multi-value-array.spec.ts +++ b/examples/sites/demos/app/popeditor/multi-value-array.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 多选且初始数据为数组', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/multi-value-array') + await page.goto('http://localhost:7130/pc/popeditor/multi-value-array') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') @@ -13,5 +13,4 @@ test('PopEditor 多选且初始数据为数组', async ({ page }) => { // 值以数组形式 await expect(textBoxValue).toHaveText(/[ 1, 2 ]/) - }) diff --git a/examples/docs/resources/pc/demo/popeditor/multi-value-array.vue b/examples/sites/demos/app/popeditor/multi-value-array.vue similarity index 99% rename from examples/docs/resources/pc/demo/popeditor/multi-value-array.vue rename to examples/sites/demos/app/popeditor/multi-value-array.vue index c8640e01a..f6b465f38 100644 --- a/examples/docs/resources/pc/demo/popeditor/multi-value-array.vue +++ b/examples/sites/demos/app/popeditor/multi-value-array.vue @@ -14,7 +14,7 @@ - diff --git a/examples/docs/resources/pc/demo/popeditor/pager.spec.ts b/examples/sites/demos/app/popeditor/pager.spec.ts similarity index 88% rename from examples/docs/resources/pc/demo/popeditor/pager.spec.ts rename to examples/sites/demos/app/popeditor/pager.spec.ts index 4776e23d6..21701076b 100644 --- a/examples/docs/resources/pc/demo/popeditor/pager.spec.ts +++ b/examples/sites/demos/app/popeditor/pager.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 分页', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/pager') + await page.goto('http://localhost:7130/pc/popeditor/pager') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') diff --git a/examples/docs/resources/pc/demo/popeditor/pager.vue b/examples/sites/demos/app/popeditor/pager.vue similarity index 99% rename from examples/docs/resources/pc/demo/popeditor/pager.vue rename to examples/sites/demos/app/popeditor/pager.vue index 0a05f0ec1..86f843cb9 100644 --- a/examples/docs/resources/pc/demo/popeditor/pager.vue +++ b/examples/sites/demos/app/popeditor/pager.vue @@ -10,7 +10,7 @@ > - diff --git a/examples/sites/demos/app/popeditor/readonly-composition-api.vue b/examples/sites/demos/app/popeditor/readonly-composition-api.vue new file mode 100644 index 000000000..2fafda066 --- /dev/null +++ b/examples/sites/demos/app/popeditor/readonly-composition-api.vue @@ -0,0 +1,103 @@ + + + diff --git a/examples/sites/demos/app/popeditor/readonly.spec.ts b/examples/sites/demos/app/popeditor/readonly.spec.ts new file mode 100644 index 000000000..240457dd2 --- /dev/null +++ b/examples/sites/demos/app/popeditor/readonly.spec.ts @@ -0,0 +1,13 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 只读', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/readonly') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const dialogBox = page.locator('.tiny-dialog-box') + + await textBox.click() + await expect(dialogBox).not.toBeVisible() +}) diff --git a/examples/docs/resources/pc/demo/popeditor/readonly.vue b/examples/sites/demos/app/popeditor/readonly.vue similarity index 92% rename from examples/docs/resources/pc/demo/popeditor/readonly.vue rename to examples/sites/demos/app/popeditor/readonly.vue index 432d9225e..f8337207a 100644 --- a/examples/docs/resources/pc/demo/popeditor/readonly.vue +++ b/examples/sites/demos/app/popeditor/readonly.vue @@ -1,8 +1,14 @@ - diff --git a/examples/docs/resources/pc/demo/popeditor/remote-search.spec.ts b/examples/sites/demos/app/popeditor/remote-search.spec.ts similarity index 90% rename from examples/docs/resources/pc/demo/popeditor/remote-search.spec.ts rename to examples/sites/demos/app/popeditor/remote-search.spec.ts index 7b0ebe379..939e59bd7 100644 --- a/examples/docs/resources/pc/demo/popeditor/remote-search.spec.ts +++ b/examples/sites/demos/app/popeditor/remote-search.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 远程搜索', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/remote-search') + await page.goto('http://localhost:7130/pc/popeditor/remote-search') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') diff --git a/examples/sites/demos/app/popeditor/remote-search.vue b/examples/sites/demos/app/popeditor/remote-search.vue new file mode 100644 index 000000000..3011af38e --- /dev/null +++ b/examples/sites/demos/app/popeditor/remote-search.vue @@ -0,0 +1,81 @@ + + + diff --git a/examples/sites/demos/app/popeditor/render-text-composition-api.vue b/examples/sites/demos/app/popeditor/render-text-composition-api.vue new file mode 100644 index 000000000..6665f1c6a --- /dev/null +++ b/examples/sites/demos/app/popeditor/render-text-composition-api.vue @@ -0,0 +1,81 @@ + + + diff --git a/examples/docs/resources/pc/demo/popeditor/render-text.spec.ts b/examples/sites/demos/app/popeditor/render-text.spec.ts similarity index 90% rename from examples/docs/resources/pc/demo/popeditor/render-text.spec.ts rename to examples/sites/demos/app/popeditor/render-text.spec.ts index a071fcf59..cdb9e582f 100644 --- a/examples/docs/resources/pc/demo/popeditor/render-text.spec.ts +++ b/examples/sites/demos/app/popeditor/render-text.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 渲染反查', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/render-text') + await page.goto('http://localhost:7130/pc/popeditor/render-text') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') diff --git a/examples/docs/resources/pc/demo/popeditor/render-text.vue b/examples/sites/demos/app/popeditor/render-text.vue similarity index 99% rename from examples/docs/resources/pc/demo/popeditor/render-text.vue rename to examples/sites/demos/app/popeditor/render-text.vue index bcadb399b..3dab5d5f9 100644 --- a/examples/docs/resources/pc/demo/popeditor/render-text.vue +++ b/examples/sites/demos/app/popeditor/render-text.vue @@ -12,7 +12,7 @@ > - diff --git a/examples/sites/demos/app/popeditor/resize.spec.ts b/examples/sites/demos/app/popeditor/resize.spec.ts new file mode 100644 index 000000000..41e712e60 --- /dev/null +++ b/examples/sites/demos/app/popeditor/resize.spec.ts @@ -0,0 +1,17 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 全屏展示', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/resize') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const dialogBox = page.locator('.tiny-dialog-box') + const resizeBtn = dialogBox.getByRole('button', { name: 'Resize' }) + + await textBox.click() + await expect(dialogBox).toBeVisible() + await expect(dialogBox).not.toHaveClass(/is-fullscreen/) + await resizeBtn.click() + await expect(dialogBox).toHaveClass(/is-fullscreen/) +}) diff --git a/examples/docs/resources/pc/demo/popeditor/resize.vue b/examples/sites/demos/app/popeditor/resize.vue similarity index 99% rename from examples/docs/resources/pc/demo/popeditor/resize.vue rename to examples/sites/demos/app/popeditor/resize.vue index 8ca1a9f56..a88efeb76 100644 --- a/examples/docs/resources/pc/demo/popeditor/resize.vue +++ b/examples/sites/demos/app/popeditor/resize.vue @@ -2,7 +2,7 @@ - diff --git a/examples/sites/demos/app/popeditor/selected-box.spec.ts b/examples/sites/demos/app/popeditor/selected-box.spec.ts new file mode 100644 index 000000000..3d99e83c8 --- /dev/null +++ b/examples/sites/demos/app/popeditor/selected-box.spec.ts @@ -0,0 +1,17 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 已选表格显示为已选栏', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/selected-box') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const dialogBox = page.locator('.tiny-dialog-box') + const grid = dialogBox.locator('.tiny-grid__wrapper') + const selectedBox = dialogBox.locator('.tiny-selected-box') + + await textBox.click() + await expect(dialogBox).toBeVisible() + await expect(grid).toBeVisible() + await expect(selectedBox).toBeVisible() +}) diff --git a/examples/sites/demos/app/popeditor/selected-box.vue b/examples/sites/demos/app/popeditor/selected-box.vue new file mode 100644 index 000000000..5ca0879c6 --- /dev/null +++ b/examples/sites/demos/app/popeditor/selected-box.vue @@ -0,0 +1,127 @@ + + + diff --git a/examples/sites/demos/app/popeditor/show-history-composition-api.vue b/examples/sites/demos/app/popeditor/show-history-composition-api.vue new file mode 100644 index 000000000..d95fbed74 --- /dev/null +++ b/examples/sites/demos/app/popeditor/show-history-composition-api.vue @@ -0,0 +1,95 @@ + + + diff --git a/examples/docs/resources/pc/demo/popeditor/show-history.spec.ts b/examples/sites/demos/app/popeditor/show-history.spec.ts similarity index 89% rename from examples/docs/resources/pc/demo/popeditor/show-history.spec.ts rename to examples/sites/demos/app/popeditor/show-history.spec.ts index 54f41639e..57d79a3a6 100644 --- a/examples/docs/resources/pc/demo/popeditor/show-history.spec.ts +++ b/examples/sites/demos/app/popeditor/show-history.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 设置历史记录标签页', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/show-history') + await page.goto('http://localhost:7130/pc/popeditor/show-history') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') diff --git a/examples/docs/resources/pc/demo/popeditor/show-history.vue b/examples/sites/demos/app/popeditor/show-history.vue similarity index 99% rename from examples/docs/resources/pc/demo/popeditor/show-history.vue rename to examples/sites/demos/app/popeditor/show-history.vue index 0282bd4b3..bf2f86189 100644 --- a/examples/docs/resources/pc/demo/popeditor/show-history.vue +++ b/examples/sites/demos/app/popeditor/show-history.vue @@ -2,7 +2,7 @@ - diff --git a/examples/docs/resources/pc/demo/popeditor/showClearBtn.spec.ts b/examples/sites/demos/app/popeditor/showClearBtn.spec.ts similarity index 87% rename from examples/docs/resources/pc/demo/popeditor/showClearBtn.spec.ts rename to examples/sites/demos/app/popeditor/showClearBtn.spec.ts index 9b77ce054..089aade60 100644 --- a/examples/docs/resources/pc/demo/popeditor/showClearBtn.spec.ts +++ b/examples/sites/demos/app/popeditor/showClearBtn.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 是否可清除', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/showClearBtn') + await page.goto('http://localhost:7130/pc/popeditor/showClearBtn') const preview = page.locator('#preview') const textBox = preview.locator('.tiny-popeditor-readonly') diff --git a/examples/docs/resources/pc/demo/popeditor/showClearBtn.vue b/examples/sites/demos/app/popeditor/showClearBtn.vue similarity index 92% rename from examples/docs/resources/pc/demo/popeditor/showClearBtn.vue rename to examples/sites/demos/app/popeditor/showClearBtn.vue index 00e3a0b4e..42bbf559f 100644 --- a/examples/docs/resources/pc/demo/popeditor/showClearBtn.vue +++ b/examples/sites/demos/app/popeditor/showClearBtn.vue @@ -1,8 +1,14 @@ - diff --git a/examples/sites/demos/app/popeditor/showOverflow.spec.ts b/examples/sites/demos/app/popeditor/showOverflow.spec.ts new file mode 100644 index 000000000..d107bfee3 --- /dev/null +++ b/examples/sites/demos/app/popeditor/showOverflow.spec.ts @@ -0,0 +1,23 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 数据超出隐藏', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/showOverflow') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const dialogBox = page.locator('.tiny-dialog-box') + const overflowDate = dialogBox.getByRole('cell', { + name: 'GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司' + }) + const tooltip = page.getByRole('tooltip', { + name: 'GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司' + }) + + // 数据超出隐藏,tooltips显示全部内容 + await textBox.click() + await expect(dialogBox).toBeVisible() + await expect(tooltip).not.toBeVisible() + await overflowDate.hover() + await expect(tooltip).toBeVisible() +}) diff --git a/examples/docs/resources/pc/demo/popeditor/showOverflow.vue b/examples/sites/demos/app/popeditor/showOverflow.vue similarity index 92% rename from examples/docs/resources/pc/demo/popeditor/showOverflow.vue rename to examples/sites/demos/app/popeditor/showOverflow.vue index e497afd47..98407b5b1 100644 --- a/examples/docs/resources/pc/demo/popeditor/showOverflow.vue +++ b/examples/sites/demos/app/popeditor/showOverflow.vue @@ -1,11 +1,18 @@ - diff --git a/examples/sites/demos/app/popeditor/single-select-radio.spec.ts b/examples/sites/demos/app/popeditor/single-select-radio.spec.ts new file mode 100644 index 000000000..b2a2d79b3 --- /dev/null +++ b/examples/sites/demos/app/popeditor/single-select-radio.spec.ts @@ -0,0 +1,18 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 树模式单选', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/single-select-radio') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const dialogBox = page.locator('.tiny-dialog-box') + const tree = dialogBox.locator('.tiny-tree') + const treeNode = tree.locator('label') + + // 单选tree模式 + await textBox.click() + await expect(dialogBox).toBeVisible() + await expect(tree).toBeVisible() + await expect(treeNode.locator('.is-checked')).toHaveCount(1) +}) diff --git a/examples/sites/demos/app/popeditor/single-select-radio.vue b/examples/sites/demos/app/popeditor/single-select-radio.vue new file mode 100644 index 000000000..0ec8f9eb4 --- /dev/null +++ b/examples/sites/demos/app/popeditor/single-select-radio.vue @@ -0,0 +1,83 @@ + + + diff --git a/examples/sites/demos/app/popeditor/size-composition-api.vue b/examples/sites/demos/app/popeditor/size-composition-api.vue new file mode 100644 index 000000000..35e11ee95 --- /dev/null +++ b/examples/sites/demos/app/popeditor/size-composition-api.vue @@ -0,0 +1,108 @@ + + + diff --git a/examples/sites/demos/app/popeditor/size.spec.ts b/examples/sites/demos/app/popeditor/size.spec.ts new file mode 100644 index 000000000..cc60a0483 --- /dev/null +++ b/examples/sites/demos/app/popeditor/size.spec.ts @@ -0,0 +1,11 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 编辑框大小', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/size') + + const preview = page.locator('#preview') + const textBox = preview.locator('.tiny-popeditor') + + await expect(textBox).toHaveCSS('height', '40px') +}) diff --git a/examples/sites/demos/app/popeditor/size.vue b/examples/sites/demos/app/popeditor/size.vue new file mode 100644 index 000000000..a08c7e230 --- /dev/null +++ b/examples/sites/demos/app/popeditor/size.vue @@ -0,0 +1,116 @@ + + + diff --git a/examples/sites/demos/app/popeditor/slot-composition-api.vue b/examples/sites/demos/app/popeditor/slot-composition-api.vue new file mode 100644 index 000000000..12d99af35 --- /dev/null +++ b/examples/sites/demos/app/popeditor/slot-composition-api.vue @@ -0,0 +1,122 @@ + + + diff --git a/examples/sites/demos/app/popeditor/slot-footer-composition-api.vue b/examples/sites/demos/app/popeditor/slot-footer-composition-api.vue new file mode 100644 index 000000000..19d4f01e0 --- /dev/null +++ b/examples/sites/demos/app/popeditor/slot-footer-composition-api.vue @@ -0,0 +1,107 @@ + + + diff --git a/examples/sites/demos/app/popeditor/slot-footer.spec.ts b/examples/sites/demos/app/popeditor/slot-footer.spec.ts new file mode 100644 index 000000000..7ac4b50f3 --- /dev/null +++ b/examples/sites/demos/app/popeditor/slot-footer.spec.ts @@ -0,0 +1,19 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 自定义弹出框底部', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/slot-footer') + + const preview = page.locator('#preview') + const textBox = preview.getByPlaceholder('请选择') + const dialogBox = page.locator('.tiny-dialog-box') + const confirmBtn = dialogBox.getByRole('button', { name: 'Confirm' }) + const cancelBtn = dialogBox.getByRole('button', { name: 'Cancel' }) + + // 自定义弹出框底部按钮 + await expect(textBox).toBeVisible() + await textBox.click() + await expect(dialogBox).toBeVisible() + await expect(confirmBtn).toBeVisible() + await expect(cancelBtn).toBeVisible() +}) diff --git a/examples/sites/demos/app/popeditor/slot-footer.vue b/examples/sites/demos/app/popeditor/slot-footer.vue new file mode 100644 index 000000000..da577ee5c --- /dev/null +++ b/examples/sites/demos/app/popeditor/slot-footer.vue @@ -0,0 +1,117 @@ + + + diff --git a/examples/docs/resources/pc/demo/popeditor/slot.spec.ts b/examples/sites/demos/app/popeditor/slot.spec.ts similarity index 90% rename from examples/docs/resources/pc/demo/popeditor/slot.spec.ts rename to examples/sites/demos/app/popeditor/slot.spec.ts index 5be693e27..67cbc600b 100644 --- a/examples/docs/resources/pc/demo/popeditor/slot.spec.ts +++ b/examples/sites/demos/app/popeditor/slot.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 组件查询条件插槽', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/slot') + await page.goto('http://localhost:7130/pc/popeditor/slot') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') diff --git a/examples/sites/demos/app/popeditor/slot.vue b/examples/sites/demos/app/popeditor/slot.vue new file mode 100644 index 000000000..ea37bee98 --- /dev/null +++ b/examples/sites/demos/app/popeditor/slot.vue @@ -0,0 +1,132 @@ + + + diff --git a/examples/sites/demos/app/popeditor/suggest-composition-api.vue b/examples/sites/demos/app/popeditor/suggest-composition-api.vue new file mode 100644 index 000000000..0b8a0357b --- /dev/null +++ b/examples/sites/demos/app/popeditor/suggest-composition-api.vue @@ -0,0 +1,131 @@ + + + diff --git a/examples/sites/demos/app/popeditor/suggest.spec.ts b/examples/sites/demos/app/popeditor/suggest.spec.ts new file mode 100644 index 000000000..bd3d548a2 --- /dev/null +++ b/examples/sites/demos/app/popeditor/suggest.spec.ts @@ -0,0 +1,14 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 联想查询', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/suggest') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const grid = page.locator('.tiny-grid__wrapper') + + await textBox.fill('科技') + await page.waitForTimeout(500) + await expect(grid).toBeVisible() +}) diff --git a/examples/docs/resources/pc/demo/popeditor/suggest.vue b/examples/sites/demos/app/popeditor/suggest.vue similarity index 90% rename from examples/docs/resources/pc/demo/popeditor/suggest.vue rename to examples/sites/demos/app/popeditor/suggest.vue index 383baf874..35e87340f 100644 --- a/examples/docs/resources/pc/demo/popeditor/suggest.vue +++ b/examples/sites/demos/app/popeditor/suggest.vue @@ -12,8 +12,9 @@ > - + + diff --git a/examples/docs/resources/pc/demo/popeditor/tabindex.spec.ts b/examples/sites/demos/app/popeditor/tabindex.spec.ts similarity index 86% rename from examples/docs/resources/pc/demo/popeditor/tabindex.spec.ts rename to examples/sites/demos/app/popeditor/tabindex.spec.ts index d8c619aea..202fe6591 100644 --- a/examples/docs/resources/pc/demo/popeditor/tabindex.spec.ts +++ b/examples/sites/demos/app/popeditor/tabindex.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 输入框的 tabindex', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/tabindex') + await page.goto('http://localhost:7130/pc/popeditor/tabindex') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') diff --git a/examples/docs/resources/pc/demo/popeditor/tabindex.vue b/examples/sites/demos/app/popeditor/tabindex.vue similarity index 85% rename from examples/docs/resources/pc/demo/popeditor/tabindex.vue rename to examples/sites/demos/app/popeditor/tabindex.vue index c71bbe43a..54b7b4587 100644 --- a/examples/docs/resources/pc/demo/popeditor/tabindex.vue +++ b/examples/sites/demos/app/popeditor/tabindex.vue @@ -1,11 +1,25 @@ - diff --git a/examples/docs/resources/pc/demo/popeditor/textField.spec.ts b/examples/sites/demos/app/popeditor/textField.spec.ts similarity index 91% rename from examples/docs/resources/pc/demo/popeditor/textField.spec.ts rename to examples/sites/demos/app/popeditor/textField.spec.ts index 5dacaed7e..80139d02e 100644 --- a/examples/docs/resources/pc/demo/popeditor/textField.spec.ts +++ b/examples/sites/demos/app/popeditor/textField.spec.ts @@ -2,19 +2,18 @@ import { test, expect } from '@playwright/test' test('PopEditor 显示字段映射', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/textField') + await page.goto('http://localhost:7130/pc/popeditor/textField') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') const dialogBox = page.locator('.tiny-dialog-box') const confirmBtn = dialogBox.getByRole('button', { name: '确 认' }) const seletItem = dialogBox.getByRole('row', { name: '1 GFD科技YX公司 福建 福州' }).locator('span') - + // 显示城市的字段映射 await textBox.click() await expect(dialogBox).toBeVisible() await seletItem.nth(0).check() await confirmBtn.click() await expect(textBox).toHaveValue('福州') - }) diff --git a/examples/docs/resources/pc/demo/popeditor/textField.vue b/examples/sites/demos/app/popeditor/textField.vue similarity index 99% rename from examples/docs/resources/pc/demo/popeditor/textField.vue rename to examples/sites/demos/app/popeditor/textField.vue index 922b3b3ab..2661936bc 100644 --- a/examples/docs/resources/pc/demo/popeditor/textField.vue +++ b/examples/sites/demos/app/popeditor/textField.vue @@ -2,7 +2,7 @@ - diff --git a/examples/sites/demos/app/popeditor/title.spec.ts b/examples/sites/demos/app/popeditor/title.spec.ts new file mode 100644 index 000000000..7a7c5be65 --- /dev/null +++ b/examples/sites/demos/app/popeditor/title.spec.ts @@ -0,0 +1,36 @@ +import { test, expect } from '@playwright/test' + +test.describe('PopEditor 自定义标题和提交字段映射', () => { + test('PopEditor 自定义标题', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/title') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const dialogBox = page.locator('.tiny-dialog-box') + const customTitle = dialogBox.getByText('自定义弹窗标题') + + // 自定义标题 + await textBox.click() + await expect(dialogBox).toBeVisible() + await expect(customTitle).toBeVisible() + }) + + test('PopEditor 提交字段映射', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/title1') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const dialogBox = page.locator('.tiny-dialog-box') + const confirmBtn = dialogBox.getByRole('button', { name: '确 认' }) + const seletItem = dialogBox.getByRole('row', { name: '1 GFD科技YX公司 福建 福州' }).locator('span') + + // 显示公司的字段映射 + await textBox.click() + await expect(dialogBox).toBeVisible() + await seletItem.nth(0).check() + await confirmBtn.click() + await expect(textBox).toHaveValue('GFD科技YX公司') + }) +}) diff --git a/examples/docs/resources/pc/demo/popeditor/title.vue b/examples/sites/demos/app/popeditor/title.vue similarity index 92% rename from examples/docs/resources/pc/demo/popeditor/title.vue rename to examples/sites/demos/app/popeditor/title.vue index 2009181dd..37eb52e05 100644 --- a/examples/docs/resources/pc/demo/popeditor/title.vue +++ b/examples/sites/demos/app/popeditor/title.vue @@ -1,8 +1,14 @@ - diff --git a/examples/docs/resources/pc/demo/popeditor/tree.spec.ts b/examples/sites/demos/app/popeditor/tree.spec.ts similarity index 88% rename from examples/docs/resources/pc/demo/popeditor/tree.spec.ts rename to examples/sites/demos/app/popeditor/tree.spec.ts index 9d59cf071..ac30e5d04 100644 --- a/examples/docs/resources/pc/demo/popeditor/tree.spec.ts +++ b/examples/sites/demos/app/popeditor/tree.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 开启树模式', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/tree') + await page.goto('http://localhost:7130/pc/popeditor/tree') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') @@ -13,6 +13,4 @@ test('PopEditor 开启树模式', async ({ page }) => { await textBox.click() await expect(dialogBox).toBeVisible() await expect(tree).toBeVisible() - - }) diff --git a/examples/docs/resources/pc/demo/popeditor/tree.vue b/examples/sites/demos/app/popeditor/tree.vue similarity index 98% rename from examples/docs/resources/pc/demo/popeditor/tree.vue rename to examples/sites/demos/app/popeditor/tree.vue index bf1af5444..3b72ffb26 100644 --- a/examples/docs/resources/pc/demo/popeditor/tree.vue +++ b/examples/sites/demos/app/popeditor/tree.vue @@ -2,7 +2,7 @@ - diff --git a/examples/docs/resources/pc/demo/popeditor/trigger.spec.ts b/examples/sites/demos/app/popeditor/trigger.spec.ts similarity index 91% rename from examples/docs/resources/pc/demo/popeditor/trigger.spec.ts rename to examples/sites/demos/app/popeditor/trigger.spec.ts index 92853253e..5e126e447 100644 --- a/examples/docs/resources/pc/demo/popeditor/trigger.spec.ts +++ b/examples/sites/demos/app/popeditor/trigger.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' test('PopEditor 单选时触发勾选的方式', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) - await page.goto('http://localhost:7130/pc/pop-editor/trigger') + await page.goto('http://localhost:7130/pc/popeditor/trigger') const preview = page.locator('#preview') const textBox = preview.getByRole('textbox') @@ -17,6 +17,4 @@ test('PopEditor 单选时触发勾选的方式', async ({ page }) => { await confirmBtn.click() await expect(dialogBox).not.toBeVisible() await expect(textBox).toHaveValue('WWW科技YX公司') - - }) diff --git a/examples/sites/demos/app/popeditor/trigger.vue b/examples/sites/demos/app/popeditor/trigger.vue new file mode 100644 index 000000000..e290dff2b --- /dev/null +++ b/examples/sites/demos/app/popeditor/trigger.vue @@ -0,0 +1,116 @@ + + + diff --git a/examples/sites/demos/app/popeditor/webdoc/popeditor.cn.md b/examples/sites/demos/app/popeditor/webdoc/popeditor.cn.md new file mode 100644 index 000000000..19ed83de1 --- /dev/null +++ b/examples/sites/demos/app/popeditor/webdoc/popeditor.cn.md @@ -0,0 +1,7 @@ +--- +title: PopEditor 弹出编辑 +--- + +# PopEditor 弹出编辑 + +
该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件。
diff --git a/examples/sites/demos/app/popeditor/webdoc/popeditor.en.md b/examples/sites/demos/app/popeditor/webdoc/popeditor.en.md new file mode 100644 index 000000000..138be9b6b --- /dev/null +++ b/examples/sites/demos/app/popeditor/webdoc/popeditor.en.md @@ -0,0 +1,7 @@ +--- +title: PopEditor pop-up editing +--- + +# PopEditor pop-up editing + +
This component can only select data in the pop-up panel. Data cannot be manually entered. The tree or grid component is displayed in the pop-up panel.
diff --git a/examples/sites/demos/app/popeditor/webdoc/popeditor.js b/examples/sites/demos/app/popeditor/webdoc/popeditor.js new file mode 100644 index 000000000..1cf1c20cc --- /dev/null +++ b/examples/sites/demos/app/popeditor/webdoc/popeditor.js @@ -0,0 +1,754 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'base', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['base.vue'] + }, + { + 'demoId': 'conditions', + 'name': { 'zh-CN': '自定义查询条件', 'en-US': 'Customized Query Criteria' }, + 'desc': { + 'zh-CN': + '

通过 conditions 属性可以自定义查询条件,组件内置的输入框支持按回车触发搜索的功能。

\n', + 'en-US': + '

The conditions attribute can be used to customize search criteria. The built-in text box of the gadget supports the function of pressing Enter to trigger search.

\n' + }, + 'codeFiles': ['conditions.vue'] + }, + { + 'demoId': 'condition-layout', + 'name': { 'zh-CN': '布局与配置', 'en-US': 'Layout and Configuration' }, + 'desc': { + 'zh-CN': + '

通过 conditions 项目里属性里的span配置栅格,labelWidth 配置label宽度。 component配置自定义组件,并通过 attrs配置组件属性

\n', + 'en-US': + '

Set span in the attributes of the condition project to configure the grid and labelWidth to configure the label width. componentConfigure custom components and set component attributes through attrs

\n' + }, + 'codeFiles': ['condition-layout.vue'] + }, + { + 'demoId': 'condition-form', + 'name': { 'zh-CN': 'Form 表单中使用并开启表单校验', 'en-US': 'Used in a form and enabled form validation' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['condition-form.vue'] + }, + { + 'demoId': 'draggable', + 'name': { 'zh-CN': '拖动窗口', 'en-US': 'Drag Window' }, + 'desc': { + 'zh-CN': + '

通过 draggable 属性设置弹出窗口拖动特性。默认为 true 表示可在标题栏按住鼠标左键拖动窗口,设置为 false 则固定窗口位置不可拖动。

\n', + 'en-US': + '

Sets the drag feature of the pop-up window through the draggable property. The default value is true, indicating that you can drag the window on the title bar. If this parameter is set to false, the window cannot be dragged.

\n' + }, + 'codeFiles': ['draggable.vue'] + }, + { + 'demoId': 'showClearBtn', + 'name': { 'zh-CN': '不可清除', 'en-US': 'Cannot be cleared' }, + 'desc': { + 'zh-CN': '

通过 show-clear-btn 属性设置是否可以清除。

\n', + 'en-US': + '

The show-clear-btn attribute is used to set whether the content can be cleared.

\n' + }, + 'codeFiles': ['showClearBtn.vue'] + }, + { + 'demoId': 'resize', + 'name': { 'zh-CN': '全屏展示', 'en-US': 'Full-screen display' }, + 'desc': { + 'zh-CN': '

通过配置 resize 控制是否全屏展示

\n', + 'en-US': '

You can set resize to determine whether to display the content in full screen.

\n' + }, + 'codeFiles': ['resize.vue'] + }, + { + 'demoId': 'grid', + 'name': { 'zh-CN': '表格编辑', 'en-US': 'Table Edit' }, + 'desc': { + 'zh-CN': + '

gridOp 当 popseletor 为 grid 时生效,目前支持配置 columns 表格列 和 data 数据源,详细配置项参考 Grid 表格组件,需同时配置 textField、valueField 字段。

\n', + 'en-US': + '

gridOp: This parameter is valid only when popseletor is set to grid. Currently, columns and data data sources can be configured. For details about the configuration items, see the Grid table component. The textField and valueField fields must be configured at the same time.

\n' + }, + 'codeFiles': ['grid.vue'] + }, + { + 'demoId': 'selected-box', + 'name': { 'zh-CN': '已选表格显示为已选栏', 'en-US': 'Width' }, + 'desc': { + 'zh-CN': + '

多选场景,设置属性 show-selected-box 为 true,且通过属性 selected-box-op 指定 SelectedBox 组件配置,可以把已选表格显示为已选栏;组件 SelectedBox 的所有插槽也已经透传

\n', + 'en-US': + '

The width are configured through the width attribute. \n Use dialog-class to customize the pop-up window class name

\n' + }, + 'codeFiles': ['selected-box.vue'] + }, + { + 'demoId': 'width', + 'name': { 'zh-CN': '宽度', 'en-US': 'Custom Icon' }, + 'desc': { + 'zh-CN': '

通过 width 属性配置宽。\n通过 dialog-class 自定义配置弹窗类名

\n', + 'en-US': + '

You can use the icon attribute to customize the component icon. You need to import the corresponding svg icon.

\n' + }, + 'codeFiles': ['width.vue'] + }, + { + 'demoId': 'icon', + 'name': { 'zh-CN': '自定义图标', 'en-US': 'Multiple Choices' }, + 'desc': { + 'zh-CN': '

通过 icon 属性可以自定义组件图标,需引入对应的 svg 图标。

\n', + 'en-US': + '

You can set multi to true to implement multiple selections. \nSet show-history to set whether to display tables on the History tab page when tables are configured on the pop-up panel. The default value is false.

\n' + }, + 'codeFiles': ['icon.vue'] + }, + { + 'demoId': 'multi', + 'name': { 'zh-CN': '多选', 'en-US': 'Multiple choices. The initial data is an array.' }, + 'desc': { + 'zh-CN': + '

通过设置 multi 属性为 true 实现多选。\n通过设置 show-history 当弹出面板配置的是表格时,设置历史记录标签页是否显示表格,默认为 false。

\n', + 'en-US': 'For details, see the following example.' + }, + 'codeFiles': ['multi.vue'] + }, + { + 'demoId': 'multi-value-array', + 'name': { 'zh-CN': '多选且初始数据为数组', 'en-US': 'change event' }, + 'desc': { + 'zh-CN': '详细用法参考如下示例', + 'en-US': + 'Change event of the input box of the

change Popeditor component. page-changeThe table mode of the Popeditor component is switched by page.

\n' + }, + 'codeFiles': ['multi-value-array.vue'] + }, + { + 'demoId': 'events', + 'name': { 'zh-CN': 'change 事件', 'en-US': 'close event' }, + 'desc': { + 'zh-CN': + '

change Popeditor 组件 Input 框的 change 事件。 page-change Popeditor 组件表格模式带分页切换事件。

\n', + 'en-US': 'Event triggered when the

close dialog box is closed.

\n' + }, + 'codeFiles': ['events.vue'] + }, + { + 'demoId': 'close-event', + 'name': { 'zh-CN': 'close 事件', 'en-US': 'Read-only' }, + 'desc': { + 'zh-CN': '

close 弹框关闭时触发的事件。

\n', + 'en-US': '

The readonly attribute is used to set whether to read only.

\n' + }, + 'codeFiles': ['close-event.vue'] + }, + { + 'demoId': 'before-close', + 'name': { 'zh-CN': '拦截弹窗关闭', 'en-US': 'tabindex of the text box' }, + 'desc': { + 'zh-CN': + '通过 before-close 属性可以配置一个拦截弹窗关闭的方法。如果方法返回 false 值,则拦截弹窗关闭;否则不拦截。
可以通过该拦截方法传入的参数获取关闭的操作类型 confirm 弹窗有以下关闭类型:
confirm :点击确认时关闭
cancel :点击取消时关闭
close :点击关闭按钮时关闭

\n', + 'en-US': + '

The tabindex attribute is used to determine whether the focus can be obtained by pressing Tab and the focus sequence. This parameter is valid only when the readonly attribute is set to false.

\n' + }, + 'codeFiles': ['before-close.vue'] + }, + { + 'demoId': 'readonly', + 'name': { 'zh-CN': '只读', 'en-US': 'Reset' }, + 'desc': { + 'zh-CN': '

通过 readonly 属性设置为是否只读。

\n', + 'en-US': '

Use the before-reset attribute to set the hook function before reset.

\n' + }, + 'codeFiles': ['readonly.vue'] + }, + { + 'demoId': 'tabindex', + 'name': { 'zh-CN': '输入框的 tabindex', 'en-US': 'Component Query Condition Slot' }, + 'desc': { + 'zh-CN': + '

通过 tabindex 属性置是否可通过 Tab 键获焦及获焦顺序(readonly 属性设置为 false 时有效)。

\n', + 'en-US': '

Customize the pop-up panel query structure by slot search.

\n' + }, + 'codeFiles': ['tabindex.vue'] + }, + { + 'demoId': 'before-reset', + 'name': { 'zh-CN': '重置', 'en-US': 'Disabled' }, + 'desc': { + 'zh-CN': '

通过 before-reset 属性设置重置前的钩子函数。

\n', + 'en-US': '

is set to read-only through the disabled attribute.

\n' + }, + 'codeFiles': ['before-reset.vue'] + }, + { + 'demoId': 'slot', + 'name': { 'zh-CN': '组件查询条件插槽', 'en-US': 'The filter criteria in the pop-up window can be cleared.' }, + 'desc': { + 'zh-CN': '

通过插槽 search 自定义弹出面板查询结构。

\n', + 'en-US': + 'The

clearable Popeditor component supports the configuration of the Clear button in the search form.

\n' + }, + 'codeFiles': ['slot.vue'] + }, + { + 'demoId': 'slot-footer', + 'name': { 'zh-CN': '自定义弹出框底部', 'en-US': 'Display Field Mapping' }, + 'desc': { + 'zh-CN': '

通过插槽 footer 自定义弹出面板底部按钮栏结构。

\n', + 'en-US': '

Use the text-field attribute to set the fields displayed by the widget.

\n' + }, + 'codeFiles': ['slot-footer.vue'] + }, + { + 'demoId': 'disabled', + 'name': { 'zh-CN': '禁用', 'en-US': 'Submit Field Mapping' }, + 'desc': { + 'zh-CN': '

通过 disabled 属性设置为是否只读。

\n', + 'en-US': + '

The value-field attribute is used to set the fields submitted by the component to the background.

\n' + }, + 'codeFiles': ['disabled.vue'] + }, + { + 'demoId': 'clearable', + 'name': { 'zh-CN': '弹出窗筛选条件支持可清空', 'en-US': 'Custom Title' }, + 'desc': { + 'zh-CN': '

clearable Popeditor 组件 支持在搜索表单配置清除按钮。

\n', + 'en-US': + '

The title attribute is used to set the title of the pop-up window. The internationalization information is supported.

\n' + }, + 'codeFiles': ['clearable.vue'] + }, + { + 'demoId': 'textField', + 'name': { 'zh-CN': '显示字段映射', 'en-US': 'Remote Search' }, + 'desc': { + 'zh-CN': '

通过 text-field 属性设置组件显示的字段。

\n', + 'en-US': + '

The remote-search attribute is used to configure remote search. In the remoteSearch method, the conditions search conditions can be sent to the background. After the background processes the data, the data can be properly displayed on the page.

\n' + }, + 'codeFiles': ['textField.vue'] + }, + { + 'demoId': 'title1', + 'name': { 'zh-CN': '提交字段映射', 'en-US': 'Paging' }, + 'desc': { + 'zh-CN': '

通过 value-field 属性设置组件提交给后台的字段。

\n', + 'en-US': + 'The

showPager attribute is valid only when popseletor is set to grid. The default value is false. Pagination is not enabled. If this parameter is set to true, you need to configure the pagerOp attribute. In addition, you need to listen to the page-change event to change the data data source

\n of the gridOp' + }, + 'codeFiles': ['title.vue'] + }, + { + 'demoId': 'title', + 'name': { 'zh-CN': '自定义标题', 'en-US': 'Rendering Query' }, + 'desc': { + 'zh-CN': '

通过 title 属性设置弹出窗口标题,支持国际化信息配置。

\n', + 'en-US': + '

If the first batch of data loaded by the component does not contain the data corresponding to the currently set value, You can set text-render-source to perform reverse query

\n' + }, + 'codeFiles': ['title.vue'] + }, + { + 'demoId': 'remote-search', + 'name': { 'zh-CN': '远程搜索', 'en-US': 'Enabling Tree Mode' }, + 'desc': { + 'zh-CN': + '

通过 remote-search 属性配置远程搜索,在 remoteSearch 方法里可以把 conditions 搜索条件传给后台,后台处理好数据后就能正常的显示在页面上。

\n', + 'en-US': + '

Enable the tree mode through the popseletor attribute. Then the tree-op attribute is the op configuration mode of the Tree component.

\n' + }, + 'codeFiles': ['remote-search.vue'] + }, + { + 'demoId': 'pager', + 'name': { 'zh-CN': '分页', 'en-US': 'Single choice in tree mode' }, + 'desc': { + 'zh-CN': + '

showPager 属性只有当 popseletorgrid 时才能生效,默认值为 false 不启用分页,配置为 true 后还需配置 pagerOp 属性;并且需要监听 page-change 事件改变 gridOpdata 数据源

\n', + 'en-US': + '

Enable the tree mode through the popseletor attribute. Then the tree-op attribute is the op configuration mode of the Tree component.

\n' + }, + 'codeFiles': ['pager.vue'] + }, + { + 'demoId': 'render-text', + 'name': { 'zh-CN': '渲染反查', 'en-US': 'Edit box size' }, + 'desc': { + 'zh-CN': + '

在组件加载的第一批数据中不含有当前所设置的 value 对应的数据时,可以设置 text-render-source 进行反查

\n', + 'en-US': + '

Sets the size of the PopEditor edit box through the size attribute. The options are medium, small, and mini.

\n' + }, + 'codeFiles': ['render-text.vue'] + }, + { + 'demoId': 'tree', + 'name': { 'zh-CN': '开启树模式', 'en-US': 'Data beyond hidden' }, + 'desc': { + 'zh-CN': + '

通过 popseletor 属性开启树模式,然后 tree-op 属性是 Tree 组件的 op 配置方式

\n', + 'en-US': + '

Configure the showOverflow attribute on the data column to set the display and hiding of the data when the data exceeds the column width. Values can be of type Boolean or String, with three values to choose from, as shown below. By default, all content is displayed in a new line.

\n

optional value description

\n

tooltip: The extra part is displayed...., and all information is displayed on the left or right. \ntitle: The value is the same as the title attribute of the native tag. \nellipsis: \'...\' is displayed, and no message is displayed. \ntrue: If the value is true, the effect is the same as that of the tooltip.

\n
\n' + }, + 'codeFiles': ['tree.vue'] + }, + { + 'demoId': 'single-select-radio', + 'name': { 'zh-CN': '树模式单选', 'en-US': 'Mode of triggering a single selection' }, + 'desc': { + 'zh-CN': + '

通过 popseletor 属性开启树模式,然后 tree-op 属性是 Tree 组件的 op 配置方式

\n', + 'en-US': + '

When a single option is selected, you can only click the option button to select it by default. You can also set trigger to row to select any position in the row. Alternatively, set trigger to cell and click any position in the Operation column to select it.

\n' + }, + 'codeFiles': ['single-select-radio.vue'] + }, + { + 'demoId': 'size', + 'name': { 'zh-CN': '编辑框大小', 'en-US': 'Set History tab' }, + 'desc': { + 'zh-CN': + '

通过 size 属性设置 PopEditor 编辑框大小,可选值有 mediumsmallmini

\n', + 'en-US': + '

When a table is configured on the pop-up panel, configure show-history to set whether to display the table on the History tab page. The default value is false.

\n' + }, + 'codeFiles': ['size.vue'] + }, + { + 'demoId': 'showOverflow', + 'name': { 'zh-CN': '数据超出隐藏', 'en-US': 'Remote Data Request' }, + 'desc': { + 'zh-CN': + '

在数据的列上配置 showOverflow 属性用于设置数据超出列宽时的显示和隐藏。值的类型可以为 Boolean 和 String,有三个值可以选择,如下所示。默认为换行显示全部内容。

\n

可选值说明

\n

tooltip:内容超出部分显示 ...,左侧/右侧弹出提示层显示全部信息。\ntitle:和原生标签的 title 属性一致。\nellipsis:内容超出部分显示 ...,没有提示。\ntrue:为 true 时,效果和 tooltip 一致。

\n
\n', + 'en-US': + '

Configure the auto-lookup to false, set initialization to not request data, or call this $ref.popuptor.handleSearch() Proactively calls the request method

\n' + }, + 'codeFiles': ['showOverflow.vue'] + }, + { + 'demoId': 'trigger', + 'name': { 'zh-CN': '单选时触发勾选的方式', 'en-US': 'Associative query' }, + 'desc': { + 'zh-CN': + '

弹出编辑为单选时,默认只能通过单击单选按钮进行勾选。但也可以通过设置属性 triggerrow 实现单击行中任意位置进行勾选。或者设置 triggercell,单击操作列的单元格上任意位置进行勾选。

\n', + 'en-US': + '

Configure the suggest to enable the association function, automatically triggering association queries after input in the input box; This function needs to be used in conjunction with remoteSearch.

\n' + }, + 'codeFiles': ['trigger.vue'] + }, + { + 'demoId': 'show-history', + 'name': { 'zh-CN': '设置历史记录标签页', 'en-US': '' }, + 'desc': { + 'zh-CN': + '

当弹出面板配置的是表格时,通过配置 show-history 设置历史记录标签页是否显示表格,该值默认为false。

\n', + 'en-US': '' + }, + 'codeFiles': ['show-history.vue'] + }, + { + 'demoId': 'auto-lookup', + 'name': { 'zh-CN': '远程数据请求', 'en-US': '' }, + 'desc': { + 'zh-CN': + '

配置 auto-lookup 为false,设置初始化不请求数据,也可以调用 this.$refs.popeditor.handleSearch() 主动调用请求方法

\n', + 'en-US': '' + }, + 'codeFiles': ['auto-lookup.vue'] + }, + { + 'demoId': 'suggest', + 'name': { 'zh-CN': '联想查询', 'en-US': '' }, + 'desc': { + 'zh-CN': + '

配置 suggest 开启联想功能,输入框输入后自动触发联想查询;该功能需要联合 remoteSearch使用\n', + 'en-US': '' + }, + 'codeFiles': ['suggest.vue'] + } + ], + apis: [ + { + 'name': 'popeditor', + 'type': 'component', + 'properties': [ + { + 'name': 'modelValue / v-model', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '绑定值', 'en-US': 'Bound Value' }, + 'demoId': 'base' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '占位符', 'en-US': 'Placeholder' }, + 'demoId': 'base' + }, + { + 'name': 'tabindex', + 'type': 'String', + 'defaultValue': '该属性的默认值为 1', + 'desc': { + 'zh-CN': '设置是否可通过 Tab 键获焦及获焦顺序(readonly 属性设置为 false 时有效)', + 'en-US': + 'Sets whether focus can be obtained by pressing Tab and the focus sequence. This parameter is valid only when readonly is set to false.' + }, + 'demoId': 'tabindex' + }, + { + 'name': 'remote-search', + 'type': 'Function({ page, conditions })', + 'defaultValue': '', + 'desc': { 'zh-CN': '配置远程搜索', 'en-US': 'Configure remote search' }, + 'demoId': 'remote-search' + }, + { + 'name': 'before-reset', + 'type': 'Function', + 'defaultValue': '', + 'desc': { 'zh-CN': '重置前的钩子函数', 'en-US': 'Hook function before reset' }, + 'demoId': 'before-reset' + }, + { + 'name': 'resize', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '是否显示弹框全屏按钮', + 'en-US': 'Whether to display the full-screen button in the pop-up box' + }, + 'demoId': 'resize' + }, + { + 'name': 'draggable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '设置弹出窗口是否可拖动', 'en-US': 'Set whether the pop-up window can be dragged.' }, + 'demoId': 'draggable' + }, + { + 'name': 'showOverflow', + 'type': 'String,Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '(popeditor 嵌套 grid 表格时,配置在gridOp属性的columns中)设置表格数据过长出现的展示问题,值可为:tooltip,title,ellipsis;①tooltip:内容超出部分显示 ...,左侧/右侧弹出提示层显示全部信息。②title:和原生标签的 title 属性一致。③ellipsis:内容超出部分显示 ...,没有提示。④true:为 true 时,效果和 tooltip 一致。', + 'en-US': + ' (When a grid table is nested in popeditor, it is configured in columns of the gridOp attribute.) Sets the display problem caused by excessively long table data. The value can be tooltip, title, or ellipsis;1tooltip: The extra part is displayed.... The prompt layer on the left or right displays all information. 2title: The value is the same as the title attribute of the native tag. 3ellipsis: The part that exceeds the content is displayed as..., and no prompt is displayed. 4true: If the value is true, the effect is the same as that of the tooltip.' + }, + 'demoId': 'showOverflow' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置组件的size大小,三种类型可以选择:medium,small,mini', + 'en-US': 'Set the component size. The options are medium, small, and mini.' + }, + 'demoId': 'size' + }, + { + 'name': 'trigger', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '弹框表格中为单选时radio的选中配置,可配置:default(默认), cell(点击单元格触发), row(点击行触发)', + 'en-US': + 'In the table in the dialog box that is displayed, the radio is selected. The options are as follows: default (default), cell (clicking a cell), and row (clicking a row)' + }, + 'demoId': 'trigger' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '设置组件是否为禁用状态。', 'en-US': 'Sets whether a component is disabled.' }, + 'demoId': 'disabled' + }, + { + 'name': 'conditions', + 'type': 'Array', + 'defaultValue': '', + 'desc': { + 'zh-CN': '当弹出面板配置的是表格时,设置弹出面板中的表单查询项。', + 'en-US': 'When a table is configured on the pop-up panel, set the table query items in the pop-up panel.' + }, + 'demoId': 'conditions' + }, + { + 'name': 'grid-op', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置弹出面板中表格组件的配置信息。', + 'en-US': 'Set the configuration information of the table component in the pop-up panel.' + }, + 'demoId': 'grid' + }, + { + 'name': 'pager-op', + 'type': 'Object', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置分页配置', 'en-US': 'Setting Pagination Configuration' }, + 'demoId': 'pager' + }, + { + 'name': 'icon', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'popEditor 组件的 Icon 图标设置。默认为 svg 组件', + 'en-US': 'Set the icon of the popEditor component. The default value is svg component' + }, + 'demoId': 'icon' + }, + { + 'name': 'multi', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '设置弹出面板中的数据是否可多选。', + 'en-US': 'Specifies whether multiple data can be selected in the pop-up panel.' + }, + 'demoId': 'multi' + }, + { + 'name': 'popseletor', + 'type': 'String', + 'defaultValue': '该属性的默认值为 grid', + 'desc': { + 'zh-CN': '设置弹出面板中可显示的树或者表格组件。', + 'en-US': 'Set the tree or table components that can be displayed in the pop-up panel.' + }, + 'demoId': 'tree' + }, + { + 'name': 'readonly', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': '设置是否只读,【3.0】设置为 false 后点击 Ipunt 框可以弹出选择框', + 'en-US': + 'Set [3.0] to read-only. If [3.0] is set to false, click the Ipunt box to display the selection box.' + }, + 'demoId': 'readonly' + }, + { + 'name': 'show-clear-btn', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': '设置输入框中右侧是否显示清除按钮。', + 'en-US': 'Specifies whether to display the Clear button on the right of the text box.' + }, + 'demoId': 'showClearBtn' + }, + { + 'name': 'show-pager', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '展示分页', 'en-US': 'Paging' }, + 'demoId': 'pager' + }, + { + 'name': 'show-history', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '当弹出面板配置的是表格时,设置历史记录标签页是否显示表格。', + 'en-US': + 'Specifies whether to display tables on the History tab page when tables are configured on the pop-up panel.' + }, + 'demoId': 'show-history' + }, + { + 'name': 'text-field', + 'type': 'String', + 'defaultValue': '该属性的默认值为 label', + 'desc': { + 'zh-CN': '设置输入框中显示文本的字段,提交数据时,不提交该显示文本。', + 'en-US': 'Set the text field in the text box. When data is submitted, the text is not submitted.' + }, + 'demoId': 'textField' + }, + { + 'name': 'text-split', + 'type': 'String', + 'defaultValue': '该属性的默认值为 /', + 'desc': { + 'zh-CN': '在多选的情况下,设置输入框中要显示多个数据时的分隔符。', + 'en-US': 'Separator for displaying multiple records in the text box when multiple records are selected.' + }, + 'demoId': 'multi' + }, + { + 'name': 'title', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置弹出面板的标题,并且支持国际化。', + 'en-US': 'Set the title of the pop-up panel and support internationalization.' + }, + 'demoId': 'title' + }, + { + 'name': 'value-field', + 'type': 'String', + 'defaultValue': '该属性的默认值为 id', + 'desc': { + 'zh-CN': '设置输入框要提交数据的字段。', + 'en-US': 'Set the field to which data is to be submitted in the text box.' + }, + 'demoId': 'title' + }, + { + 'name': 'value-split', + 'type': 'String', + 'defaultValue': '该属性的默认值为 ;', + 'desc': { + 'zh-CN': '在多选的情况下,设置输入框要提交多个数据时的分隔符。', + 'en-US': + 'Separator for submitting multiple pieces of data in the text box when multiple pieces of data are selected.' + }, + 'demoId': 'multi' + }, + { + 'name': 'width', + 'type': 'Number , String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置弹出面板的宽度(单位像素)。当组件的 multi = true 时,宽度最小为900px;否则宽度最小为600px;', + 'en-US': + 'Wide of the pop-up panel, in pixels.When multi of a component is set to true, the minimum width is 900px. Otherwise, the minimum width is 600px.' + }, + 'demoId': 'width' + }, + { + 'name': 'dialog-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义配置弹窗类名', 'en-US': 'Customized configuration pop-up window class name' }, + 'demoId': 'width' + }, + { + 'name': 'auto-lookup', + 'type': 'Boolean', + 'defaultValue': 'true', + 'desc': { 'zh-CN': '设置初始化不请求数据', 'en-US': 'Set initialization not to request data' }, + 'demoId': 'auto-lookup' + }, + { + 'name': 'suggest', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '配置suggest 开启联想功能,输入框输入后自动触发联想查询;该功能需要联合 remoteSearch 使用', + 'en-US': + 'Configure the suggest to enable the association function, and automatically trigger the association query after entering the input box; This function needs to be used in conjunction with remoteSearch' + }, + 'demoId': 'suggest' + }, + { + 'name': 'before-close', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '可以配置一个拦截弹窗关闭的方法。如果方法返回 false 值,则拦截弹窗关闭;否则不拦截', + 'en-US': '' + }, + 'demoId': 'before-close' + }, + { + 'name': 'show-selected-box', + 'type': 'Boolean', + 'defaultValue': 'false', + 'desc': { 'zh-CN': '多选场景,是否将已选表格显示为已选栏,默认值为false', 'en-US': '' }, + 'demoId': 'show-selected-box' + }, + { + 'name': 'selected-box-op', + 'type': 'Object', + 'defaultValue': '', + 'desc': { + 'zh-CN': '通过属性 selected-box-op 指定 SelectedBox 组件配置,可以把已选表格显示为已选栏', + 'en-US': '' + }, + 'demoId': 'selected-box-op' + } + ], + 'events': [ + { + 'name': 'change', + 'type': 'Function(arg1,arg2)', + 'defaultValue': '', + 'desc': { + 'zh-CN': + 'Popeditor 组件 Input 框的 change 事件。;onChange(arg1,arg2){\n// arg1 = state.commitValue arg1为提交信息索引\n// arg2 = state.selectedDatas arg2为提交信息数据\n// do something you want... }', + 'en-US': + 'Change event in the input box of the Popeditor component. ; onChange(arg1, arg2){\n// arg1 = state.commitValue arg1 is the index of the submitted information. \n// arg2 = state.selectedDatas arg2 is the data of the submitted information. \n// do something you want...}' + }, + 'demoId': 'events' + }, + { + 'name': 'close', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'Popeditor 组件弹框关闭时触发的事件。', + 'en-US': 'Event triggered when the pop-up dialog box of the Popeditor component is closed.' + }, + 'demoId': 'close-event' + }, + { + "name": "popup", + "type": "Function", + "defaultValue": "", + "desc": { + 'zh-CN': "Popeditor 组件弹框打开时触发的事件。", + 'en-US': "The event that is triggered when the Popeditor component pop-up box is opened." + }, + "demoId": "popup-event" + }, + { + 'name': 'page-change', + 'type': 'Function(arg1)', + 'defaultValue': '', + 'desc': { + 'zh-CN': + 'Popeditor 组件表格模式带分页切换事件。;onPageChange(arg1){// arg1 = val arg1为分页切换页码// do something you want... }', + 'en-US': + 'Indicates that the table mode of the Popeditor component is switched by page. ; onPageChange (arg1) {// arg1 = val arg1 is the page number. // do something you want...}' + }, + 'demoId': 'events' + } + ], + 'slots': [ + { + 'name': 'search', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '查询条件插槽', 'en-US': 'Query Condition Slot' }, + 'demoId': 'slot' + }, + { + 'name': 'footer', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '查询条件插槽', 'en-US': '' }, + 'demoId': 'slot-footer' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/popeditor/width-composition-api.vue b/examples/sites/demos/app/popeditor/width-composition-api.vue new file mode 100644 index 000000000..21f480d1d --- /dev/null +++ b/examples/sites/demos/app/popeditor/width-composition-api.vue @@ -0,0 +1,105 @@ + + + diff --git a/examples/sites/demos/app/popeditor/width.spec.ts b/examples/sites/demos/app/popeditor/width.spec.ts new file mode 100644 index 000000000..8917df48a --- /dev/null +++ b/examples/sites/demos/app/popeditor/width.spec.ts @@ -0,0 +1,14 @@ +import { test, expect } from '@playwright/test' + +test('PopEditor 弹窗宽度', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('http://localhost:7130/pc/popeditor/width') + + const preview = page.locator('#preview') + const textBox = preview.getByRole('textbox') + const dialogBox = page.locator('.tiny-dialog-box') + + await textBox.click() + await expect(dialogBox).toBeVisible() + await expect(dialogBox).toHaveCSS('width', '800px') +}) diff --git a/examples/sites/demos/app/popeditor/width.vue b/examples/sites/demos/app/popeditor/width.vue new file mode 100644 index 000000000..7120f65cf --- /dev/null +++ b/examples/sites/demos/app/popeditor/width.vue @@ -0,0 +1,113 @@ + + + diff --git a/examples/sites/demos/app/popover/arrow-offset-composition-api.vue b/examples/sites/demos/app/popover/arrow-offset-composition-api.vue new file mode 100644 index 000000000..f6c30d44b --- /dev/null +++ b/examples/sites/demos/app/popover/arrow-offset-composition-api.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/popover/arrow-offset.spec.js b/examples/sites/demos/app/popover/arrow-offset.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/popover/arrow-offset.spec.js rename to examples/sites/demos/app/popover/arrow-offset.spec.js diff --git a/examples/docs/resources/pc/demo/popover/arrow-offset.vue b/examples/sites/demos/app/popover/arrow-offset.vue similarity index 100% rename from examples/docs/resources/pc/demo/popover/arrow-offset.vue rename to examples/sites/demos/app/popover/arrow-offset.vue diff --git a/examples/sites/demos/app/popover/basic-usage-composition-api.vue b/examples/sites/demos/app/popover/basic-usage-composition-api.vue new file mode 100644 index 000000000..84610c05a --- /dev/null +++ b/examples/sites/demos/app/popover/basic-usage-composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/popover/basic-usage.spec.js b/examples/sites/demos/app/popover/basic-usage.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/popover/basic-usage.spec.js rename to examples/sites/demos/app/popover/basic-usage.spec.js diff --git a/examples/docs/resources/pc/demo/popover/basic-usage.vue b/examples/sites/demos/app/popover/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/popover/basic-usage.vue rename to examples/sites/demos/app/popover/basic-usage.vue diff --git a/examples/sites/demos/app/popover/close-delay-composition-api.vue b/examples/sites/demos/app/popover/close-delay-composition-api.vue new file mode 100644 index 000000000..af724b9ee --- /dev/null +++ b/examples/sites/demos/app/popover/close-delay-composition-api.vue @@ -0,0 +1,21 @@ + + + diff --git a/examples/docs/resources/pc/demo/popover/close-delay.spec.js b/examples/sites/demos/app/popover/close-delay.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/popover/close-delay.spec.js rename to examples/sites/demos/app/popover/close-delay.spec.js diff --git a/examples/docs/resources/pc/demo/popover/close-delay.vue b/examples/sites/demos/app/popover/close-delay.vue similarity index 100% rename from examples/docs/resources/pc/demo/popover/close-delay.vue rename to examples/sites/demos/app/popover/close-delay.vue diff --git a/examples/sites/demos/app/popover/custom-tip-text-composition-api.vue b/examples/sites/demos/app/popover/custom-tip-text-composition-api.vue new file mode 100644 index 000000000..c56217443 --- /dev/null +++ b/examples/sites/demos/app/popover/custom-tip-text-composition-api.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/popover/custom-tip-text.spec.js b/examples/sites/demos/app/popover/custom-tip-text.spec.js similarity index 100% rename from examples/docs/resources/pc/demo/popover/custom-tip-text.spec.js rename to examples/sites/demos/app/popover/custom-tip-text.spec.js diff --git a/examples/docs/resources/pc/demo/popover/custom-tip-text.vue b/examples/sites/demos/app/popover/custom-tip-text.vue similarity index 84% rename from examples/docs/resources/pc/demo/popover/custom-tip-text.vue rename to examples/sites/demos/app/popover/custom-tip-text.vue index fbaeae107..f1c17d10c 100644 --- a/examples/docs/resources/pc/demo/popover/custom-tip-text.vue +++ b/examples/sites/demos/app/popover/custom-tip-text.vue @@ -8,7 +8,14 @@

- +
这是一段内容,这是一段内容,这是一段内容,这是一段内容。
diff --git a/examples/sites/demos/app/progress/format-text-composition-api.vue b/examples/sites/demos/app/progress/format-text-composition-api.vue new file mode 100644 index 000000000..8f667f42b --- /dev/null +++ b/examples/sites/demos/app/progress/format-text-composition-api.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/progress/format-text.spec.ts b/examples/sites/demos/app/progress/format-text.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/progress/format-text.spec.ts rename to examples/sites/demos/app/progress/format-text.spec.ts diff --git a/examples/docs/resources/pc/demo/progress/format-text.vue b/examples/sites/demos/app/progress/format-text.vue similarity index 100% rename from examples/docs/resources/pc/demo/progress/format-text.vue rename to examples/sites/demos/app/progress/format-text.vue diff --git a/examples/sites/demos/app/progress/progress-status-composition-api.vue b/examples/sites/demos/app/progress/progress-status-composition-api.vue new file mode 100644 index 000000000..d1efa0ec6 --- /dev/null +++ b/examples/sites/demos/app/progress/progress-status-composition-api.vue @@ -0,0 +1,40 @@ + + + diff --git a/examples/docs/resources/pc/demo/progress/progress-status.spec.ts b/examples/sites/demos/app/progress/progress-status.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/progress/progress-status.spec.ts rename to examples/sites/demos/app/progress/progress-status.spec.ts diff --git a/examples/docs/resources/pc/demo/progress/progress-status.vue b/examples/sites/demos/app/progress/progress-status.vue similarity index 100% rename from examples/docs/resources/pc/demo/progress/progress-status.vue rename to examples/sites/demos/app/progress/progress-status.vue diff --git a/examples/sites/demos/app/progress/progress-type-circle-composition-api.vue b/examples/sites/demos/app/progress/progress-type-circle-composition-api.vue new file mode 100644 index 000000000..51202fb88 --- /dev/null +++ b/examples/sites/demos/app/progress/progress-type-circle-composition-api.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/progress/progress-type-circle.spec.ts b/examples/sites/demos/app/progress/progress-type-circle.spec.ts similarity index 87% rename from examples/docs/resources/pc/demo/progress/progress-type-circle.spec.ts rename to examples/sites/demos/app/progress/progress-type-circle.spec.ts index 1220bdfe3..40ee16432 100644 --- a/examples/docs/resources/pc/demo/progress/progress-type-circle.spec.ts +++ b/examples/sites/demos/app/progress/progress-type-circle.spec.ts @@ -12,11 +12,11 @@ test.describe('circle 类型', () => { await expect(progress.locator('div.tiny-progress-circle')).toBeVisible() await expect(circleTrack).toHaveAttribute('stroke-width', '4.0') await expect(circleTrack).toHaveAttribute('stroke', '#e5e9f2') - await expect(circleTrack).toHaveCSS('d', 'path(\"M 50 50 M 50 2 A 48 48 0 1 1 50 98 A 48 48 0 1 1 50 2\")') + await expect(circleTrack).toHaveCSS('d', 'path("M 50 50 M 50 2 A 48 48 0 1 1 50 98 A 48 48 0 1 1 50 2")') await expect(cirlePath).toHaveAttribute('stroke-width', '4.0') await expect(cirlePath).toHaveAttribute('stroke', '#ff4949') await expect(cirlePath).toHaveAttribute('stroke-linecap', 'round') - await expect(cirlePath).toHaveCSS('d', 'path(\"M 50 50 M 50 2 A 48 48 0 1 1 50 98 A 48 48 0 1 1 50 2\")') + await expect(cirlePath).toHaveCSS('d', 'path("M 50 50 M 50 2 A 48 48 0 1 1 50 98 A 48 48 0 1 1 50 2")') }) test('点击值增加', async ({ page }) => { diff --git a/examples/sites/demos/app/progress/progress-type-circle.vue b/examples/sites/demos/app/progress/progress-type-circle.vue new file mode 100644 index 000000000..cfafe88d7 --- /dev/null +++ b/examples/sites/demos/app/progress/progress-type-circle.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/examples/sites/demos/app/progress/progress-type-composition-api.vue b/examples/sites/demos/app/progress/progress-type-composition-api.vue new file mode 100644 index 000000000..eb8a9a309 --- /dev/null +++ b/examples/sites/demos/app/progress/progress-type-composition-api.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/examples/sites/demos/app/progress/progress-type-dashboard-composition-api.vue b/examples/sites/demos/app/progress/progress-type-dashboard-composition-api.vue new file mode 100644 index 000000000..cb30ef845 --- /dev/null +++ b/examples/sites/demos/app/progress/progress-type-dashboard-composition-api.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/docs/resources/pc/demo/progress/progress-type-dashboard.spec.ts b/examples/sites/demos/app/progress/progress-type-dashboard.spec.ts similarity index 82% rename from examples/docs/resources/pc/demo/progress/progress-type-dashboard.spec.ts rename to examples/sites/demos/app/progress/progress-type-dashboard.spec.ts index daa716758..ea7dedad6 100644 --- a/examples/docs/resources/pc/demo/progress/progress-type-dashboard.spec.ts +++ b/examples/sites/demos/app/progress/progress-type-dashboard.spec.ts @@ -13,10 +13,10 @@ test('dashboard类型', async ({ page }) => { await expect(progress.locator('div.tiny-progress__text')).toBeVisible() await expect(circleTrack).toHaveAttribute('stroke-width', '2.0') await expect(circleTrack).toHaveAttribute('stroke', '#e5e9f2') - await expect(circleTrack).toHaveCSS('d', 'path(\"M 50 50 M 50 99 A 49 49 0 1 1 50 1 A 49 49 0 1 1 50 99\")') + await expect(circleTrack).toHaveCSS('d', 'path("M 50 50 M 50 99 A 49 49 0 1 1 50 1 A 49 49 0 1 1 50 99")') await expect(cirlePath).toHaveAttribute('stroke-width', '2.0') await expect(cirlePath).toHaveAttribute('stroke', '#e6a23c') await expect(cirlePath).toHaveAttribute('stroke-linecap', 'round') - await expect(cirlePath).toHaveCSS('d', 'path(\"M 50 50 M 50 99 A 49 49 0 1 1 50 1 A 49 49 0 1 1 50 99\")') + await expect(cirlePath).toHaveCSS('d', 'path("M 50 50 M 50 99 A 49 49 0 1 1 50 1 A 49 49 0 1 1 50 99")') await expect(cirlePath).toHaveCSS('stroke-dasharray', '46.1814px, 307.876px') }) diff --git a/examples/docs/resources/pc/demo/progress/progress-type-dashboard.vue b/examples/sites/demos/app/progress/progress-type-dashboard.vue similarity index 100% rename from examples/docs/resources/pc/demo/progress/progress-type-dashboard.vue rename to examples/sites/demos/app/progress/progress-type-dashboard.vue diff --git a/examples/docs/resources/pc/demo/progress/progress-type.spec.ts b/examples/sites/demos/app/progress/progress-type.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/progress/progress-type.spec.ts rename to examples/sites/demos/app/progress/progress-type.spec.ts diff --git a/examples/docs/resources/pc/demo/progress/progress-type.vue b/examples/sites/demos/app/progress/progress-type.vue similarity index 100% rename from examples/docs/resources/pc/demo/progress/progress-type.vue rename to examples/sites/demos/app/progress/progress-type.vue diff --git a/examples/sites/demos/app/progress/progress-width-composition-api.vue b/examples/sites/demos/app/progress/progress-width-composition-api.vue new file mode 100644 index 000000000..605cedbec --- /dev/null +++ b/examples/sites/demos/app/progress/progress-width-composition-api.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/progress/progress-width.spec.ts b/examples/sites/demos/app/progress/progress-width.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/progress/progress-width.spec.ts rename to examples/sites/demos/app/progress/progress-width.spec.ts diff --git a/examples/docs/resources/pc/demo/progress/progress-width.vue b/examples/sites/demos/app/progress/progress-width.vue similarity index 84% rename from examples/docs/resources/pc/demo/progress/progress-width.vue rename to examples/sites/demos/app/progress/progress-width.vue index f5b85d352..0de971780 100644 --- a/examples/docs/resources/pc/demo/progress/progress-width.vue +++ b/examples/sites/demos/app/progress/progress-width.vue @@ -2,9 +2,7 @@
-
- 努力加载中,请稍后... -
+
努力加载中,请稍后...
@@ -13,7 +11,7 @@ import { Progress } from '@opentiny/vue' export default { components: { - TinyProgress: Progress, + TinyProgress: Progress }, data() { return { diff --git a/examples/sites/demos/app/progress/text-inside-or-no-text-composition-api.vue b/examples/sites/demos/app/progress/text-inside-or-no-text-composition-api.vue new file mode 100644 index 000000000..c62d10cc6 --- /dev/null +++ b/examples/sites/demos/app/progress/text-inside-or-no-text-composition-api.vue @@ -0,0 +1,16 @@ + + + diff --git a/examples/docs/resources/pc/demo/progress/text-inside-or-no-text.spec.ts b/examples/sites/demos/app/progress/text-inside-or-no-text.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/progress/text-inside-or-no-text.spec.ts rename to examples/sites/demos/app/progress/text-inside-or-no-text.spec.ts diff --git a/examples/docs/resources/pc/demo/progress/text-inside-or-no-text.vue b/examples/sites/demos/app/progress/text-inside-or-no-text.vue similarity index 100% rename from examples/docs/resources/pc/demo/progress/text-inside-or-no-text.vue rename to examples/sites/demos/app/progress/text-inside-or-no-text.vue diff --git a/examples/sites/demos/app/progress/webdoc/progress.cn.md b/examples/sites/demos/app/progress/webdoc/progress.cn.md new file mode 100644 index 000000000..07bb17556 --- /dev/null +++ b/examples/sites/demos/app/progress/webdoc/progress.cn.md @@ -0,0 +1,7 @@ +--- +title: Progress 进度条 +--- + +# Progress 进度条 + +
用于展示操作进度,告知用户当前状态和预期。
diff --git a/examples/sites/demos/app/progress/webdoc/progress.en.md b/examples/sites/demos/app/progress/webdoc/progress.en.md new file mode 100644 index 000000000..7a5207c05 --- /dev/null +++ b/examples/sites/demos/app/progress/webdoc/progress.en.md @@ -0,0 +1,7 @@ +--- +title: Progress +--- + +# Progress + +
Displays the operation progress and informs users of the current status and expectations.
diff --git a/examples/sites/demos/app/progress/webdoc/progress.js b/examples/sites/demos/app/progress/webdoc/progress.js new file mode 100644 index 000000000..1f938f118 --- /dev/null +++ b/examples/sites/demos/app/progress/webdoc/progress.js @@ -0,0 +1,193 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'progress-type', + 'name': { 'zh-CN': 'line 类型', 'en-US': 'line type' }, + 'desc': { + 'zh-CN': '

type="line" 显示为 line 类型

\n', + 'en-US': '

type="line" is displayed as line

\n' + }, + 'codeFiles': ['progress-type.vue'] + }, + { + 'demoId': 'progress-type-circle', + 'name': { 'zh-CN': 'circle 类型', 'en-US': 'circle type' }, + 'desc': { + 'zh-CN': + '

type="circle" 显示为 circle 类型。width可以调整环形进度条画布宽度,默认值为126px。

\n', + 'en-US': + 'The

type="circle" is of the circle type. widthYou can adjust the width of the ring progress bar canvas. The default value is 126px.

\n' + }, + 'codeFiles': ['progress-type-circle.vue'] + }, + { + 'demoId': 'progress-type-dashboard', + 'name': { 'zh-CN': 'dashboard 类型', 'en-US': 'Dashboard Type' }, + 'desc': { + 'zh-CN': + '

type="dashboard" 显示为 dashboard 类型。width可以调整环形进度条画布宽度,默认值为126px。

\n', + 'en-US': + 'The

type="dashboard" is displayed as a dashboard. widthYou can adjust the width of the ring progress bar canvas. The default value is 126px.

\n' + }, + 'codeFiles': ['progress-type-dashboard.vue'] + }, + { + 'demoId': 'progress-width', + 'name': { 'zh-CN': '宽度', 'en-US': 'Width' }, + 'desc': { + 'zh-CN': '

stroke-width进度条的宽度,单位 px

\n', + 'en-US': 'Width of the

stroke-width progress bar, in px

\n' + }, + 'codeFiles': ['progress-width.vue'] + }, + { + 'demoId': 'progress-status', + 'name': { 'zh-CN': '状态', 'en-US': 'Status' }, + 'desc': { + 'zh-CN': '

status 进度条当前状态(success/exception/warning)

\n', + 'en-US': 'Current status of the

status progress bar: (success/exception/warning)

\n' + }, + 'codeFiles': ['progress-status.vue'] + }, + { + 'demoId': 'text-inside-or-no-text', + 'name': { 'zh-CN': '文字内显或不显', 'en-US': 'Text displayed or not displayed' }, + 'desc': { + 'zh-CN': '

show-text 是否显示进度条文字内容

\n', + 'en-US': '

show-text Whether to display progress bar text

\n' + }, + 'codeFiles': ['text-inside-or-no-text.vue'] + }, + { + 'demoId': 'custom-color', + 'name': { 'zh-CN': '自定义颜色', 'en-US': 'Custom Color' }, + 'desc': { + 'zh-CN': '

通过 color 设置进度条颜色。color 进度条背景色(会覆盖 status 状态颜色)

\n', + 'en-US': + '

Set the color of the progress bar through color. color: background color of the progress bar (overwrites the status color)

\n' + }, + 'codeFiles': ['custom-color.vue'] + }, + { + 'demoId': 'format-text', + 'name': { 'zh-CN': '自定义显示文字', 'en-US': 'Custom Text' }, + 'desc': { + 'zh-CN': + '

text-inside 进度条显示文字内置在进度条内(只在 type=line 时可用),format自定义进度条的文字

\n', + 'en-US': + 'The

text-inside progress bar text is embedded in the progress bar (available only when type is set to line). formatCustomize the progress bar text

\n' + }, + 'codeFiles': ['format-text.vue'] + }, + { + 'demoId': 'dynamic-control-changes', + 'name': { 'zh-CN': '动态控制进度条变化', 'en-US': 'Dynamic control progress bar change' }, + 'desc': { + 'zh-CN': '

通过设置 percentage 动态控制进度条变化

\n', + 'en-US': '

Dynamic control of the progress bar by setting percentage

\n' + }, + 'codeFiles': ['dynamic-control-changes.vue'] + } + ], + apis: [ + { + 'name': 'progress', + 'type': 'component', + 'properties': [ + { + 'name': 'percentage', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 0', + 'desc': { + 'zh-CN': '百分比(必填);该属性的可选值为 0-100', + 'en-US': 'Percentage (mandatory) The optional values for this property are 0 - 100' + }, + 'demoId': 'basic-usage' + }, + { + 'name': 'type', + 'type': 'String', + 'defaultValue': '该属性的默认值为 line', + 'desc': { + 'zh-CN': '进度条类型;该属性的可选值为 line / circle / dashboard', + 'en-US': 'Progress bar type; The value of this attribute can be line, circle, or dashboard' + }, + 'demoId': 'progress-type' + }, + { + 'name': 'stroke-width', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 6', + 'desc': { 'zh-CN': '进度条的宽度,单位 px', 'en-US': 'Progress bar width, in px' }, + 'demoId': 'progress-width' + }, + { + 'name': 'text-inside', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '进度条显示文字内置在进度条内(只在 type=line 时可用)', + 'en-US': + 'The text displayed on the progress bar is embedded in the progress bar. This parameter is available only when type is set to line.' + }, + 'demoId': 'progress-width' + }, + { + 'name': 'status', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '进度条当前状态;该属性的可选值为 success / exception / warning', + 'en-US': + 'Current status of the progress bar; The value of this attribute can be success, exception, or warning' + }, + 'demoId': 'progress-status' + }, + { + 'name': 'color', + 'type': 'String , Function , Array', + 'defaultValue': '', + 'desc': { + 'zh-CN': '进度条背景色(会覆盖 status 状态颜色)', + 'en-US': 'Background color of the progress bar (overwrites the status color).' + }, + 'demoId': 'custom-color' + }, + { + 'name': 'width', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 126', + 'desc': { + 'zh-CN': '环形进度条画布宽度(只在 type 为 circle 或 dashboard 时可用)', + 'en-US': 'Circular progress bar canvas width (available only when type is circle or dashboard)' + }, + 'demoId': 'progress-width' + }, + { + 'name': 'show-text', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否显示进度条文字内容', 'en-US': 'Display progress bar text' }, + 'demoId': 'text-inside-or-no-text' + }, + { + 'name': 'format', + 'type': 'Function', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义进度条的文字', 'en-US': 'Customize the text of the progress bar' }, + 'demoId': 'format-text' + } + ], + 'events': [], + 'slots': [] + } + ] +} diff --git a/examples/sites/demos/app/radio/active-color-composition-api.vue b/examples/sites/demos/app/radio/active-color-composition-api.vue new file mode 100644 index 000000000..774c361a7 --- /dev/null +++ b/examples/sites/demos/app/radio/active-color-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/radio/active-color.spec.ts b/examples/sites/demos/app/radio/active-color.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/radio/active-color.spec.ts rename to examples/sites/demos/app/radio/active-color.spec.ts diff --git a/examples/docs/resources/pc/demo/radio/active-color.vue b/examples/sites/demos/app/radio/active-color.vue similarity index 100% rename from examples/docs/resources/pc/demo/radio/active-color.vue rename to examples/sites/demos/app/radio/active-color.vue diff --git a/examples/sites/demos/app/radio/basic-usage-composition-api.vue b/examples/sites/demos/app/radio/basic-usage-composition-api.vue new file mode 100644 index 000000000..e4581c543 --- /dev/null +++ b/examples/sites/demos/app/radio/basic-usage-composition-api.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/docs/resources/pc/demo/radio/basic-usage.spec.ts b/examples/sites/demos/app/radio/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/radio/basic-usage.spec.ts rename to examples/sites/demos/app/radio/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/radio/basic-usage.vue b/examples/sites/demos/app/radio/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/radio/basic-usage.vue rename to examples/sites/demos/app/radio/basic-usage.vue diff --git a/examples/sites/demos/app/radio/dynamic-disable-composition-api.vue b/examples/sites/demos/app/radio/dynamic-disable-composition-api.vue new file mode 100644 index 000000000..ce9905048 --- /dev/null +++ b/examples/sites/demos/app/radio/dynamic-disable-composition-api.vue @@ -0,0 +1,30 @@ + + + diff --git a/examples/docs/resources/pc/demo/radio/dynamic-disable.spec.ts b/examples/sites/demos/app/radio/dynamic-disable.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/radio/dynamic-disable.spec.ts rename to examples/sites/demos/app/radio/dynamic-disable.spec.ts diff --git a/examples/docs/resources/pc/demo/radio/dynamic-disable.vue b/examples/sites/demos/app/radio/dynamic-disable.vue similarity index 100% rename from examples/docs/resources/pc/demo/radio/dynamic-disable.vue rename to examples/sites/demos/app/radio/dynamic-disable.vue diff --git a/examples/sites/demos/app/radio/group-options-composition-api.vue b/examples/sites/demos/app/radio/group-options-composition-api.vue new file mode 100644 index 000000000..b1a12a86e --- /dev/null +++ b/examples/sites/demos/app/radio/group-options-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/radio/group-options.spec.ts b/examples/sites/demos/app/radio/group-options.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/radio/group-options.spec.ts rename to examples/sites/demos/app/radio/group-options.spec.ts diff --git a/examples/docs/resources/pc/demo/radio/group-options.vue b/examples/sites/demos/app/radio/group-options.vue similarity index 100% rename from examples/docs/resources/pc/demo/radio/group-options.vue rename to examples/sites/demos/app/radio/group-options.vue diff --git a/examples/sites/demos/app/radio/radio-button-composition-api.vue b/examples/sites/demos/app/radio/radio-button-composition-api.vue new file mode 100644 index 000000000..851c25acf --- /dev/null +++ b/examples/sites/demos/app/radio/radio-button-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/radio/radio-button.spec.ts b/examples/sites/demos/app/radio/radio-button.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/radio/radio-button.spec.ts rename to examples/sites/demos/app/radio/radio-button.spec.ts diff --git a/examples/docs/resources/pc/demo/radio/radio-button.vue b/examples/sites/demos/app/radio/radio-button.vue similarity index 100% rename from examples/docs/resources/pc/demo/radio/radio-button.vue rename to examples/sites/demos/app/radio/radio-button.vue diff --git a/examples/sites/demos/app/radio/radio-default-composition-api.vue b/examples/sites/demos/app/radio/radio-default-composition-api.vue new file mode 100644 index 000000000..d7c5e4125 --- /dev/null +++ b/examples/sites/demos/app/radio/radio-default-composition-api.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/radio/radio-default.spec.ts b/examples/sites/demos/app/radio/radio-default.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/radio/radio-default.spec.ts rename to examples/sites/demos/app/radio/radio-default.spec.ts diff --git a/examples/docs/resources/pc/demo/radio/radio-default.vue b/examples/sites/demos/app/radio/radio-default.vue similarity index 99% rename from examples/docs/resources/pc/demo/radio/radio-default.vue rename to examples/sites/demos/app/radio/radio-default.vue index cb83fc8f2..b209ee4a8 100644 --- a/examples/docs/resources/pc/demo/radio/radio-default.vue +++ b/examples/sites/demos/app/radio/radio-default.vue @@ -25,6 +25,7 @@ export default { } } + diff --git a/examples/docs/resources/pc/demo/scroll-text/custom-text-style.spec.ts b/examples/sites/demos/app/scroll-text/custom-text-style.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/custom-text-style.spec.ts rename to examples/sites/demos/app/scroll-text/custom-text-style.spec.ts diff --git a/examples/docs/resources/pc/demo/scroll-text/custom-text-style.vue b/examples/sites/demos/app/scroll-text/custom-text-style.vue similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/custom-text-style.vue rename to examples/sites/demos/app/scroll-text/custom-text-style.vue diff --git a/examples/sites/demos/app/scroll-text/hover-stop-composition-api.vue b/examples/sites/demos/app/scroll-text/hover-stop-composition-api.vue new file mode 100644 index 000000000..a4854292a --- /dev/null +++ b/examples/sites/demos/app/scroll-text/hover-stop-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/scroll-text/hover-stop.spec.ts b/examples/sites/demos/app/scroll-text/hover-stop.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/hover-stop.spec.ts rename to examples/sites/demos/app/scroll-text/hover-stop.spec.ts diff --git a/examples/docs/resources/pc/demo/scroll-text/hover-stop.vue b/examples/sites/demos/app/scroll-text/hover-stop.vue similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/hover-stop.vue rename to examples/sites/demos/app/scroll-text/hover-stop.vue diff --git a/examples/sites/demos/app/scroll-text/scroll-direction-composition-api.vue b/examples/sites/demos/app/scroll-text/scroll-direction-composition-api.vue new file mode 100644 index 000000000..55ba76edd --- /dev/null +++ b/examples/sites/demos/app/scroll-text/scroll-direction-composition-api.vue @@ -0,0 +1,15 @@ + + + diff --git a/examples/docs/resources/pc/demo/scroll-text/scroll-direction.spec.ts b/examples/sites/demos/app/scroll-text/scroll-direction.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/scroll-direction.spec.ts rename to examples/sites/demos/app/scroll-text/scroll-direction.spec.ts diff --git a/examples/docs/resources/pc/demo/scroll-text/scroll-direction.vue b/examples/sites/demos/app/scroll-text/scroll-direction.vue similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/scroll-direction.vue rename to examples/sites/demos/app/scroll-text/scroll-direction.vue diff --git a/examples/sites/demos/app/scroll-text/scroll-time-composition-api.vue b/examples/sites/demos/app/scroll-text/scroll-time-composition-api.vue new file mode 100644 index 000000000..0635e8712 --- /dev/null +++ b/examples/sites/demos/app/scroll-text/scroll-time-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/scroll-text/scroll-time.spec.ts b/examples/sites/demos/app/scroll-text/scroll-time.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/scroll-time.spec.ts rename to examples/sites/demos/app/scroll-text/scroll-time.spec.ts diff --git a/examples/docs/resources/pc/demo/scroll-text/scroll-time.vue b/examples/sites/demos/app/scroll-text/scroll-time.vue similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/scroll-time.vue rename to examples/sites/demos/app/scroll-text/scroll-time.vue diff --git a/examples/sites/demos/app/scroll-text/slots-composition-api.vue b/examples/sites/demos/app/scroll-text/slots-composition-api.vue new file mode 100644 index 000000000..0686bf8b3 --- /dev/null +++ b/examples/sites/demos/app/scroll-text/slots-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/docs/resources/pc/demo/scroll-text/slots.spec.ts b/examples/sites/demos/app/scroll-text/slots.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/slots.spec.ts rename to examples/sites/demos/app/scroll-text/slots.spec.ts diff --git a/examples/docs/resources/pc/demo/scroll-text/slots.vue b/examples/sites/demos/app/scroll-text/slots.vue similarity index 100% rename from examples/docs/resources/pc/demo/scroll-text/slots.vue rename to examples/sites/demos/app/scroll-text/slots.vue diff --git a/examples/sites/demos/app/scroll-text/webdoc/scroll-text.cn.md b/examples/sites/demos/app/scroll-text/webdoc/scroll-text.cn.md new file mode 100644 index 000000000..cfbfc2b8b --- /dev/null +++ b/examples/sites/demos/app/scroll-text/webdoc/scroll-text.cn.md @@ -0,0 +1,7 @@ +--- +title: ScrollText 文字滚动 +--- + +# ScrollText 文字滚动 + +
常用于文字提示信息滚动轮播显示。
diff --git a/examples/sites/demos/app/scroll-text/webdoc/scroll-text.en.md b/examples/sites/demos/app/scroll-text/webdoc/scroll-text.en.md new file mode 100644 index 000000000..7d1f751a0 --- /dev/null +++ b/examples/sites/demos/app/scroll-text/webdoc/scroll-text.en.md @@ -0,0 +1,7 @@ +--- +title: ScrollText +--- + +# ScrollText + +
This command is used to display text messages in scrolling mode.
diff --git a/examples/sites/demos/app/scroll-text/webdoc/scroll-text.js b/examples/sites/demos/app/scroll-text/webdoc/scroll-text.js new file mode 100644 index 000000000..22b80752a --- /dev/null +++ b/examples/sites/demos/app/scroll-text/webdoc/scroll-text.js @@ -0,0 +1,122 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'scroll-direction', + 'name': { 'zh-CN': '文字滚动方向', 'en-US': 'Text scrolling direction' }, + 'desc': { + 'zh-CN': '

可通过 direction 设置文字滚动方向。

\n', + 'en-US': '

You can use direction to set the text scrolling direction.

\n' + }, + 'codeFiles': ['scroll-direction.vue'] + }, + { + 'demoId': 'hover-stop', + 'name': { 'zh-CN': '鼠标悬停时文本停止滚动', 'en-US': 'The text stops scrolling when the mouse is hovered.' }, + 'desc': { + 'zh-CN': '

可通过 hover-stop 设鼠标悬停时文本是否停止滚动。

\n', + 'en-US': + '

You can use hover-stop to set whether the text stops scrolling when the mouse is hovered.

\n' + }, + 'codeFiles': ['hover-stop.vue'] + }, + { + 'demoId': 'custom-scroll-text', + 'name': { 'zh-CN': '自定义文本内容', 'en-US': 'Custom Text Content' }, + 'desc': { + 'zh-CN': '

可通过 text 自定义文本内容。

\n', + 'en-US': '

You can use text to customize the text content.

\n' + }, + 'codeFiles': ['custom-scroll-text.vue'] + }, + { + 'demoId': 'slots', + 'name': { 'zh-CN': '通过 solt 插槽自定义文本内容', 'en-US': 'Customize the text content through the Solt slot' }, + 'desc': { + 'zh-CN': '

可通过 solt 插槽自定义文本内容。

\n', + 'en-US': '

You can customize the text content through the solt slot.

\n' + }, + 'codeFiles': ['slots.vue'] + }, + { + 'demoId': 'scroll-time', + 'name': { 'zh-CN': '滚动时间间隔', 'en-US': 'Scrolling Interval' }, + 'desc': { + 'zh-CN': '

可通过 time 设置滚动时间间隔。

\n', + 'en-US': '

You can use time to set the scrolling interval.

\n' + }, + 'codeFiles': ['scroll-time.vue'] + }, + { + 'demoId': 'custom-text-style', + 'name': { 'zh-CN': '自定义文本样式', 'en-US': 'Custom Text Style' }, + 'desc': { + 'zh-CN': '

可通过 class 自定义文本样式。

\n', + 'en-US': '

You can use class to customize the text style.

\n' + }, + 'codeFiles': ['custom-text-style.vue'] + } + ], + apis: [ + { + 'name': 'scroll-text', + 'type': 'component', + 'properties': [ + { + 'name': 'direction', + 'type': 'String', + 'defaultValue': '该属性的默认值为 left', + 'desc': { + 'zh-CN': '滚动的方向;该属性的可选值为 up / left / down / right', + 'en-US': 'Scrolling direction; The optional values of this attribute are up / left / down / right' + }, + 'demoId': 'scroll-direction' + }, + { + 'name': 'hover-stop', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': 'hover 滚动是否停止,可选值为 false 或 true;默认值true。', + 'en-US': 'Whether to stop scrolling. The value can be false or true. The default value is true.' + }, + 'demoId': 'hover-stop' + }, + { + 'name': 'time', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 5', + 'desc': { + 'zh-CN': '整个滚动过程所用的时间,默认值 5s 。', + 'en-US': 'Time taken for scrolling. The default value is 5s.' + }, + 'demoId': 'scroll-time' + }, + { + 'name': 'text', + 'type': 'String', + 'defaultValue': '该属性的默认值为 ScrollText', + 'desc': { 'zh-CN': '滚动的文本内容', 'en-US': 'Scrolled text content' }, + 'demoId': 'custom-scroll-text' + } + ], + 'events': [], + 'slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认插槽', 'en-US': 'Default slot' }, + 'demoId': 'custom-scroll-text' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/search/basic-usage-composition-api.vue b/examples/sites/demos/app/search/basic-usage-composition-api.vue new file mode 100644 index 000000000..a8c992aed --- /dev/null +++ b/examples/sites/demos/app/search/basic-usage-composition-api.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/basic-usage.spec.ts b/examples/sites/demos/app/search/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/basic-usage.spec.ts rename to examples/sites/demos/app/search/basic-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/search/basic-usage.vue b/examples/sites/demos/app/search/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/basic-usage.vue rename to examples/sites/demos/app/search/basic-usage.vue diff --git a/examples/sites/demos/app/search/change-events-composition-api.vue b/examples/sites/demos/app/search/change-events-composition-api.vue new file mode 100644 index 000000000..204ab35e8 --- /dev/null +++ b/examples/sites/demos/app/search/change-events-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/change-events.spec.ts b/examples/sites/demos/app/search/change-events.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/change-events.spec.ts rename to examples/sites/demos/app/search/change-events.spec.ts diff --git a/examples/docs/resources/pc/demo/search/change-events.vue b/examples/sites/demos/app/search/change-events.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/change-events.vue rename to examples/sites/demos/app/search/change-events.vue diff --git a/examples/sites/demos/app/search/clearable-composition-api.vue b/examples/sites/demos/app/search/clearable-composition-api.vue new file mode 100644 index 000000000..f1c35851a --- /dev/null +++ b/examples/sites/demos/app/search/clearable-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/clearable.spec.ts b/examples/sites/demos/app/search/clearable.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/clearable.spec.ts rename to examples/sites/demos/app/search/clearable.spec.ts diff --git a/examples/docs/resources/pc/demo/search/clearable.vue b/examples/sites/demos/app/search/clearable.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/clearable.vue rename to examples/sites/demos/app/search/clearable.vue diff --git a/examples/sites/demos/app/search/custom-search-types-composition-api.vue b/examples/sites/demos/app/search/custom-search-types-composition-api.vue new file mode 100644 index 000000000..07f9374b5 --- /dev/null +++ b/examples/sites/demos/app/search/custom-search-types-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/custom-search-types.spec.ts b/examples/sites/demos/app/search/custom-search-types.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/custom-search-types.spec.ts rename to examples/sites/demos/app/search/custom-search-types.spec.ts diff --git a/examples/docs/resources/pc/demo/search/custom-search-types.vue b/examples/sites/demos/app/search/custom-search-types.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/custom-search-types.vue rename to examples/sites/demos/app/search/custom-search-types.vue diff --git a/examples/sites/demos/app/search/default-value-composition-api.vue b/examples/sites/demos/app/search/default-value-composition-api.vue new file mode 100644 index 000000000..6296fafb4 --- /dev/null +++ b/examples/sites/demos/app/search/default-value-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/default-value.spec.ts b/examples/sites/demos/app/search/default-value.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/default-value.spec.ts rename to examples/sites/demos/app/search/default-value.spec.ts diff --git a/examples/docs/resources/pc/demo/search/default-value.vue b/examples/sites/demos/app/search/default-value.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/default-value.vue rename to examples/sites/demos/app/search/default-value.vue diff --git a/examples/sites/demos/app/search/mini-mode-composition-api.vue b/examples/sites/demos/app/search/mini-mode-composition-api.vue new file mode 100644 index 000000000..115786f0e --- /dev/null +++ b/examples/sites/demos/app/search/mini-mode-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/mini-mode.spec.ts b/examples/sites/demos/app/search/mini-mode.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/mini-mode.spec.ts rename to examples/sites/demos/app/search/mini-mode.spec.ts diff --git a/examples/sites/demos/app/search/mini-mode.vue b/examples/sites/demos/app/search/mini-mode.vue new file mode 100644 index 000000000..eb49fb76c --- /dev/null +++ b/examples/sites/demos/app/search/mini-mode.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/sites/demos/app/search/search-events-composition-api.vue b/examples/sites/demos/app/search/search-events-composition-api.vue new file mode 100644 index 000000000..45a0d579c --- /dev/null +++ b/examples/sites/demos/app/search/search-events-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/search-events.spec.ts b/examples/sites/demos/app/search/search-events.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/search-events.spec.ts rename to examples/sites/demos/app/search/search-events.spec.ts diff --git a/examples/docs/resources/pc/demo/search/search-events.vue b/examples/sites/demos/app/search/search-events.vue similarity index 77% rename from examples/docs/resources/pc/demo/search/search-events.vue rename to examples/sites/demos/app/search/search-events.vue index bf313b489..c5772ca83 100644 --- a/examples/docs/resources/pc/demo/search/search-events.vue +++ b/examples/sites/demos/app/search/search-events.vue @@ -1,5 +1,5 @@ diff --git a/examples/docs/resources/pc/demo/search/search-types.spec.ts b/examples/sites/demos/app/search/search-types.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/search-types.spec.ts rename to examples/sites/demos/app/search/search-types.spec.ts diff --git a/examples/docs/resources/pc/demo/search/search-types.vue b/examples/sites/demos/app/search/search-types.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/search-types.vue rename to examples/sites/demos/app/search/search-types.vue diff --git a/examples/sites/demos/app/search/select-events-composition-api.vue b/examples/sites/demos/app/search/select-events-composition-api.vue new file mode 100644 index 000000000..6a3f3337f --- /dev/null +++ b/examples/sites/demos/app/search/select-events-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/select-events.spec.ts b/examples/sites/demos/app/search/select-events.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/select-events.spec.ts rename to examples/sites/demos/app/search/select-events.spec.ts diff --git a/examples/docs/resources/pc/demo/search/select-events.vue b/examples/sites/demos/app/search/select-events.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/select-events.vue rename to examples/sites/demos/app/search/select-events.vue diff --git a/examples/sites/demos/app/search/show-selected-types-composition-api.vue b/examples/sites/demos/app/search/show-selected-types-composition-api.vue new file mode 100644 index 000000000..1c1c71a84 --- /dev/null +++ b/examples/sites/demos/app/search/show-selected-types-composition-api.vue @@ -0,0 +1,29 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/show-selected-types.spec.ts b/examples/sites/demos/app/search/show-selected-types.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/show-selected-types.spec.ts rename to examples/sites/demos/app/search/show-selected-types.spec.ts diff --git a/examples/docs/resources/pc/demo/search/show-selected-types.vue b/examples/sites/demos/app/search/show-selected-types.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/show-selected-types.vue rename to examples/sites/demos/app/search/show-selected-types.vue diff --git a/examples/sites/demos/app/search/slot-prefix-composition-api.vue b/examples/sites/demos/app/search/slot-prefix-composition-api.vue new file mode 100644 index 000000000..6b3b34791 --- /dev/null +++ b/examples/sites/demos/app/search/slot-prefix-composition-api.vue @@ -0,0 +1,20 @@ + + + diff --git a/examples/docs/resources/pc/demo/search/slot-prefix.spec.ts b/examples/sites/demos/app/search/slot-prefix.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/slot-prefix.spec.ts rename to examples/sites/demos/app/search/slot-prefix.spec.ts diff --git a/examples/docs/resources/pc/demo/search/slot-prefix.vue b/examples/sites/demos/app/search/slot-prefix.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/slot-prefix.vue rename to examples/sites/demos/app/search/slot-prefix.vue diff --git a/examples/sites/demos/app/search/transparent-mode-composition-api.vue b/examples/sites/demos/app/search/transparent-mode-composition-api.vue new file mode 100644 index 000000000..68ba4e648 --- /dev/null +++ b/examples/sites/demos/app/search/transparent-mode-composition-api.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/search/transparent-mode.spec.ts b/examples/sites/demos/app/search/transparent-mode.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/search/transparent-mode.spec.ts rename to examples/sites/demos/app/search/transparent-mode.spec.ts diff --git a/examples/docs/resources/pc/demo/search/transparent-mode.vue b/examples/sites/demos/app/search/transparent-mode.vue similarity index 100% rename from examples/docs/resources/pc/demo/search/transparent-mode.vue rename to examples/sites/demos/app/search/transparent-mode.vue diff --git a/examples/sites/demos/app/search/webdoc/search.cn.md b/examples/sites/demos/app/search/webdoc/search.cn.md new file mode 100644 index 000000000..e34087ebc --- /dev/null +++ b/examples/sites/demos/app/search/webdoc/search.cn.md @@ -0,0 +1,7 @@ +--- +title: Search 搜索 +--- + +# Search 搜索 + +
指定条件对象进行搜索数据。
diff --git a/examples/sites/demos/app/search/webdoc/search.en.md b/examples/sites/demos/app/search/webdoc/search.en.md new file mode 100644 index 000000000..83bd6c2b9 --- /dev/null +++ b/examples/sites/demos/app/search/webdoc/search.en.md @@ -0,0 +1,7 @@ +--- +title: Search +--- + +# Search + +
Specify a condition object to search for data.
diff --git a/examples/sites/demos/app/search/webdoc/search.js b/examples/sites/demos/app/search/webdoc/search.js new file mode 100644 index 000000000..5713cc134 --- /dev/null +++ b/examples/sites/demos/app/search/webdoc/search.js @@ -0,0 +1,258 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'clearable', + 'name': { 'zh-CN': '可清除', 'en-US': 'Can be cleared' }, + 'desc': { + 'zh-CN': '

可通过 clearable 属性设置显示清空图标按钮。

\n', + 'en-US': + '

You can use the clearable attribute to set the display of the clear icon button.

\n' + }, + 'codeFiles': ['clearable.vue'] + }, + { + 'demoId': 'mini-mode', + 'name': { 'zh-CN': '迷你模式', 'en-US': 'Mini mode' }, + 'desc': { + 'zh-CN': '

可通过 mini 设置组件为mini模式。

\n', + 'en-US': '

You can use mini to set the component to the mini mode.

\n' + }, + 'codeFiles': ['mini-mode.vue'] + }, + { + 'demoId': 'transparent-mode', + 'name': { 'zh-CN': '透明模式', 'en-US': 'Transparent mode' }, + 'desc': { + 'zh-CN': '

可通过 transparent 设置组件为透明模式(mini模式下有效)。搜索类型

\n', + 'en-US': + '

You can use transparent to set the component to the transparent mode (valid in mini mode). Search Type

\n' + }, + 'codeFiles': ['transparent-mode.vue'] + }, + { + 'demoId': 'default-value', + 'name': { 'zh-CN': '默认值搜索', 'en-US': 'Default Search' }, + 'desc': { + 'zh-CN': '

可通过 v-model 配置组件默认搜索条件。

\n', + 'en-US': '

You can use v-model to configure the default search criteria of the component.

\n' + }, + 'codeFiles': ['default-value.vue'] + }, + { + 'demoId': 'search-types', + 'name': { 'zh-CN': '搜索类型', 'en-US': 'Search Type' }, + 'desc': { + 'zh-CN': '

可通过 search-types 配置组件可选的搜索类型。

\n', + 'en-US': + '

You can use search-types to configure the search types available for the component.

\n' + }, + 'codeFiles': ['search-types.vue'] + }, + { + 'demoId': 'custom-search-types', + 'name': { 'zh-CN': '自定义搜索类型的内容', 'en-US': 'Content of the user-defined search type' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['custom-search-types.vue'] + }, + { + 'demoId': 'show-selected-types', + 'name': { 'zh-CN': '自定义搜索类型', 'en-US': 'Customized search type' }, + 'desc': { 'zh-CN': '

搜索类型

\n', 'en-US': '

Search Type

\n' }, + 'codeFiles': ['show-selected-types.vue'] + }, + { + 'demoId': 'slot-prefix', + 'name': { 'zh-CN': '左侧插槽', 'en-US': 'Left slot' }, + 'desc': { + 'zh-CN': '

可通过prefix插入左侧插槽

\n', + 'en-US': '

can be inserted into the left slot through prefix

\n' + }, + 'codeFiles': ['slot-prefix.vue'] + }, + { + 'demoId': 'search-events', + 'name': { 'zh-CN': '自定义 search 事件', 'en-US': 'Customized search event' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['search-events.vue'] + }, + { + 'demoId': 'change-events', + 'name': { 'zh-CN': '自定义 change 事件', 'en-US': 'Customized change event' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['change-events.vue'] + }, + { + 'demoId': 'select-events', + 'name': { 'zh-CN': '自定义 select 事件', 'en-US': 'Customized select event' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['select-events.vue'] + } + ], + apis: [ + { + 'name': 'search', + 'type': 'component', + 'properties': [ + { + 'name': 'default-value', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置搜索输入框内的默认搜索值。', + 'en-US': 'Set the default search value in the search text box.' + }, + 'demoId': '' + }, + { + 'name': 'clearable', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': ' 属性设置显示清空图标按钮', + 'en-US': 'The clear icon is displayed in attribute settings.' + }, + 'demoId': 'clearable' + }, + { + 'name': 'v-model', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置绑定的值。', 'en-US': 'Set the bound value.' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'mini', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '迷你模式,配置为true时,搜索默认显示为一个带图标的圆形按钮,点击后展开,默认 false 。', + 'en-US': + 'Mini mode. If this parameter is set to true, a round button with an icon is displayed by default. After you click the button, the button is displayed. The default value is false.' + }, + 'demoId': 'mini-mode' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '设置搜索输入框内的提示占位文本 。', + 'en-US': 'Set the placeholder text in the search box.' + }, + 'demoId': 'basic-usage' + }, + { + 'name': 'search-types', + 'type': 'Array', + 'defaultValue': '', + 'desc': { + 'zh-CN': "搜索的类型选项,格式为[{text:'文档',value:1},...],不配置时类型选择固定显示为All 。", + 'en-US': + "Search type. The format is [{text:'Document', value:1}, ...]. If this parameter is not specified, All is displayed." + }, + 'demoId': 'search-types' + }, + { + 'name': 'is-enter-search', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { + 'zh-CN': '是否在按下键盘Enter键的时候触发search事件', + 'en-US': + 'Transparent mode. If this parameter is set to true, the border becomes transparent and is displayed semi-transparently after being collapsed. Generally, this parameter is used in scenarios with a background. The default value is false.' + }, + 'demoId': 'search-events' + }, + { + 'name': 'transparent', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': + '设置为透明模式,配置为true时,边框变为透明且收缩后半透明显示,一般用在带有背景的场景,默认 false 。', + 'en-US': '' + }, + 'demoId': 'transparent-mode' + } + ], + 'events': [ + { + 'name': 'change', + 'type': 'Function(arg1,arg2)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '在 input 框中输入完成时触发的回调函数;arg1:{Object 搜索类型},arg2:{String 当前input框中值}', + 'en-US': + 'Callback function triggered when input is complete in the input box; arg1:{Object search type}, arg2:{String value in the current input box}' + }, + 'demoId': 'change-events' + }, + { + 'name': 'search', + 'type': 'Function(arg1,arg2)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '在展开状态点击搜索按钮时触发的回调函数;arg1:{Object 搜索类型},arg2:{String 当前input框中值}', + 'en-US': + 'Callback function triggered when the search button is clicked in the expanded state; arg1:{Object search type}, arg2:{String value in the current input box}' + }, + 'demoId': 'search-events' + }, + { + 'name': 'select', + 'type': 'Function(arg1)', + 'defaultValue': '', + 'desc': { + 'zh-CN': '在search组件切换类型时触发的回调函数;arg1:{Object 搜索类型}', + 'en-US': + 'Callback function triggered when the type of the search component is switched; arg1:{Object search type}' + }, + 'demoId': 'select-events' + }, + { + 'name': 'input', + 'type': 'Function(arg1,arg2)', + 'defaultValue': '', + 'desc': { + 'zh-CN': + '在search组件输入实时触发的回调函数;arg1:{String 当前input框中值},arg2:{Object 搜索类型}【3.9.1新增】', + 'en-US': + 'Enter the callback function triggered in real time in the search component. arg1:{String value in the current input box}, arg2:{Object search type} [added in 3.9.1]' + }, + 'demoId': '' + } + ], + 'slots': [ + { + 'name': 'poplist', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '搜索的弹出列表插槽', 'en-US': 'Slot in the search pop-up list' }, + 'demoId': 'custom-search-types' + }, + { + 'name': 'text', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '默认搜索类型插槽', 'en-US': 'Default search type slot' }, + 'demoId': 'show-selected-types' + }, + { + 'name': 'prefix', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '左侧插槽', 'en-US': 'Left slot' }, + 'demoId': 'slot-prefix' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/select/allow-create-composition-api.vue b/examples/sites/demos/app/select/allow-create-composition-api.vue new file mode 100644 index 000000000..cc6b32b38 --- /dev/null +++ b/examples/sites/demos/app/select/allow-create-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/allow-create.spec.ts b/examples/sites/demos/app/select/allow-create.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/allow-create.spec.ts rename to examples/sites/demos/app/select/allow-create.spec.ts diff --git a/examples/docs/resources/pc/demo/select/allow-create.vue b/examples/sites/demos/app/select/allow-create.vue similarity index 92% rename from examples/docs/resources/pc/demo/select/allow-create.vue rename to examples/sites/demos/app/select/allow-create.vue index 6a5d16808..323916945 100644 --- a/examples/docs/resources/pc/demo/select/allow-create.vue +++ b/examples/sites/demos/app/select/allow-create.vue @@ -1,7 +1,6 @@ diff --git a/examples/sites/demos/app/select/automatic-dropdown-composition-api.vue b/examples/sites/demos/app/select/automatic-dropdown-composition-api.vue new file mode 100644 index 000000000..6afb7a174 --- /dev/null +++ b/examples/sites/demos/app/select/automatic-dropdown-composition-api.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/automatic-dropdown.spec.ts b/examples/sites/demos/app/select/automatic-dropdown.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/automatic-dropdown.spec.ts rename to examples/sites/demos/app/select/automatic-dropdown.spec.ts diff --git a/examples/docs/resources/pc/demo/select/automatic-dropdown.vue b/examples/sites/demos/app/select/automatic-dropdown.vue similarity index 83% rename from examples/docs/resources/pc/demo/select/automatic-dropdown.vue rename to examples/sites/demos/app/select/automatic-dropdown.vue index b2f833d47..bf018acd3 100644 --- a/examples/docs/resources/pc/demo/select/automatic-dropdown.vue +++ b/examples/sites/demos/app/select/automatic-dropdown.vue @@ -1,11 +1,8 @@ diff --git a/examples/sites/demos/app/select/basic-usage-composition-api.vue b/examples/sites/demos/app/select/basic-usage-composition-api.vue new file mode 100644 index 000000000..b12a02a64 --- /dev/null +++ b/examples/sites/demos/app/select/basic-usage-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/basic-usage.spec.ts b/examples/sites/demos/app/select/basic-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/basic-usage.spec.ts rename to examples/sites/demos/app/select/basic-usage.spec.ts diff --git a/examples/sites/demos/app/select/basic-usage.vue b/examples/sites/demos/app/select/basic-usage.vue new file mode 100644 index 000000000..6463b1869 --- /dev/null +++ b/examples/sites/demos/app/select/basic-usage.vue @@ -0,0 +1,28 @@ + + + diff --git a/examples/sites/demos/app/select/binding-obj-composition-api.vue b/examples/sites/demos/app/select/binding-obj-composition-api.vue new file mode 100644 index 000000000..4f1020ed8 --- /dev/null +++ b/examples/sites/demos/app/select/binding-obj-composition-api.vue @@ -0,0 +1,24 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/binding-obj.spec.ts b/examples/sites/demos/app/select/binding-obj.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/binding-obj.spec.ts rename to examples/sites/demos/app/select/binding-obj.spec.ts diff --git a/examples/docs/resources/pc/demo/select/binding-obj.vue b/examples/sites/demos/app/select/binding-obj.vue similarity index 93% rename from examples/docs/resources/pc/demo/select/binding-obj.vue rename to examples/sites/demos/app/select/binding-obj.vue index b9b8557d0..0d2452d87 100644 --- a/examples/docs/resources/pc/demo/select/binding-obj.vue +++ b/examples/sites/demos/app/select/binding-obj.vue @@ -1,8 +1,7 @@ diff --git a/examples/sites/demos/app/select/is-drop-inherit-width-composition-api.vue b/examples/sites/demos/app/select/is-drop-inherit-width-composition-api.vue new file mode 100644 index 000000000..487249349 --- /dev/null +++ b/examples/sites/demos/app/select/is-drop-inherit-width-composition-api.vue @@ -0,0 +1,30 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/is-drop-inherit-width.spec.ts b/examples/sites/demos/app/select/is-drop-inherit-width.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/is-drop-inherit-width.spec.ts rename to examples/sites/demos/app/select/is-drop-inherit-width.spec.ts diff --git a/examples/sites/demos/app/select/is-drop-inherit-width.vue b/examples/sites/demos/app/select/is-drop-inherit-width.vue new file mode 100644 index 000000000..dc8bf3cb9 --- /dev/null +++ b/examples/sites/demos/app/select/is-drop-inherit-width.vue @@ -0,0 +1,39 @@ + + + diff --git a/examples/sites/demos/app/select/manual-focus-blur-composition-api.vue b/examples/sites/demos/app/select/manual-focus-blur-composition-api.vue new file mode 100644 index 000000000..108c7c582 --- /dev/null +++ b/examples/sites/demos/app/select/manual-focus-blur-composition-api.vue @@ -0,0 +1,36 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/manual-focus-blur.spec.ts b/examples/sites/demos/app/select/manual-focus-blur.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/manual-focus-blur.spec.ts rename to examples/sites/demos/app/select/manual-focus-blur.spec.ts diff --git a/examples/docs/resources/pc/demo/select/manual-focus-blur.vue b/examples/sites/demos/app/select/manual-focus-blur.vue similarity index 95% rename from examples/docs/resources/pc/demo/select/manual-focus-blur.vue rename to examples/sites/demos/app/select/manual-focus-blur.vue index 8a5665d57..3af1fc0a4 100644 --- a/examples/docs/resources/pc/demo/select/manual-focus-blur.vue +++ b/examples/sites/demos/app/select/manual-focus-blur.vue @@ -7,8 +7,7 @@ 单击按钮 Select 将失去焦点 - - +
diff --git a/examples/sites/demos/app/select/memoize-usage-composition-api.vue b/examples/sites/demos/app/select/memoize-usage-composition-api.vue new file mode 100644 index 000000000..a8b2db6cf --- /dev/null +++ b/examples/sites/demos/app/select/memoize-usage-composition-api.vue @@ -0,0 +1,41 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/memoize-usage.spec.ts b/examples/sites/demos/app/select/memoize-usage.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/memoize-usage.spec.ts rename to examples/sites/demos/app/select/memoize-usage.spec.ts diff --git a/examples/docs/resources/pc/demo/select/memoize-usage.vue b/examples/sites/demos/app/select/memoize-usage.vue similarity index 80% rename from examples/docs/resources/pc/demo/select/memoize-usage.vue rename to examples/sites/demos/app/select/memoize-usage.vue index 6c42ed9dd..1ebfcd946 100644 --- a/examples/docs/resources/pc/demo/select/memoize-usage.vue +++ b/examples/sites/demos/app/select/memoize-usage.vue @@ -1,8 +1,14 @@ diff --git a/examples/sites/demos/app/select/set-input-value-composition-api.vue b/examples/sites/demos/app/select/set-input-value-composition-api.vue new file mode 100644 index 000000000..725b71a66 --- /dev/null +++ b/examples/sites/demos/app/select/set-input-value-composition-api.vue @@ -0,0 +1,26 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/set-input-value.spec.ts b/examples/sites/demos/app/select/set-input-value.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/set-input-value.spec.ts rename to examples/sites/demos/app/select/set-input-value.spec.ts diff --git a/examples/docs/resources/pc/demo/select/set-input-value.vue b/examples/sites/demos/app/select/set-input-value.vue similarity index 83% rename from examples/docs/resources/pc/demo/select/set-input-value.vue rename to examples/sites/demos/app/select/set-input-value.vue index d5dd55479..372c998f8 100644 --- a/examples/docs/resources/pc/demo/select/set-input-value.vue +++ b/examples/sites/demos/app/select/set-input-value.vue @@ -1,11 +1,8 @@ diff --git a/examples/sites/demos/app/select/show-alloption-composition-api.vue b/examples/sites/demos/app/select/show-alloption-composition-api.vue new file mode 100644 index 000000000..568cc6ab9 --- /dev/null +++ b/examples/sites/demos/app/select/show-alloption-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/show-alloption.spec.ts b/examples/sites/demos/app/select/show-alloption.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/show-alloption.spec.ts rename to examples/sites/demos/app/select/show-alloption.spec.ts diff --git a/examples/docs/resources/pc/demo/select/show-alloption.vue b/examples/sites/demos/app/select/show-alloption.vue similarity index 92% rename from examples/docs/resources/pc/demo/select/show-alloption.vue rename to examples/sites/demos/app/select/show-alloption.vue index 9983be0a4..1e765facf 100644 --- a/examples/docs/resources/pc/demo/select/show-alloption.vue +++ b/examples/sites/demos/app/select/show-alloption.vue @@ -1,7 +1,6 @@ diff --git a/examples/sites/demos/app/select/show-tip-composition-api.vue b/examples/sites/demos/app/select/show-tip-composition-api.vue new file mode 100644 index 000000000..637b44c51 --- /dev/null +++ b/examples/sites/demos/app/select/show-tip-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/show-tip.spec.ts b/examples/sites/demos/app/select/show-tip.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/show-tip.spec.ts rename to examples/sites/demos/app/select/show-tip.spec.ts diff --git a/examples/docs/resources/pc/demo/select/show-tip.vue b/examples/sites/demos/app/select/show-tip.vue similarity index 92% rename from examples/docs/resources/pc/demo/select/show-tip.vue rename to examples/sites/demos/app/select/show-tip.vue index 68a897b94..45c78547c 100644 --- a/examples/docs/resources/pc/demo/select/show-tip.vue +++ b/examples/sites/demos/app/select/show-tip.vue @@ -1,7 +1,6 @@ diff --git a/examples/sites/demos/app/select/size-medium-composition-api.vue b/examples/sites/demos/app/select/size-medium-composition-api.vue new file mode 100644 index 000000000..8cba02fdf --- /dev/null +++ b/examples/sites/demos/app/select/size-medium-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/size-medium.spec.ts b/examples/sites/demos/app/select/size-medium.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/size-medium.spec.ts rename to examples/sites/demos/app/select/size-medium.spec.ts diff --git a/examples/docs/resources/pc/demo/select/size-medium.vue b/examples/sites/demos/app/select/size-medium.vue similarity index 100% rename from examples/docs/resources/pc/demo/select/size-medium.vue rename to examples/sites/demos/app/select/size-medium.vue diff --git a/examples/sites/demos/app/select/size-mini-composition-api.vue b/examples/sites/demos/app/select/size-mini-composition-api.vue new file mode 100644 index 000000000..dac4b8215 --- /dev/null +++ b/examples/sites/demos/app/select/size-mini-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/size-mini.spec.ts b/examples/sites/demos/app/select/size-mini.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/size-mini.spec.ts rename to examples/sites/demos/app/select/size-mini.spec.ts diff --git a/examples/docs/resources/pc/demo/select/size-mini.vue b/examples/sites/demos/app/select/size-mini.vue similarity index 92% rename from examples/docs/resources/pc/demo/select/size-mini.vue rename to examples/sites/demos/app/select/size-mini.vue index e50eed8aa..ee1ac6bac 100644 --- a/examples/docs/resources/pc/demo/select/size-mini.vue +++ b/examples/sites/demos/app/select/size-mini.vue @@ -1,7 +1,6 @@ diff --git a/examples/sites/demos/app/select/size-small-composition-api.vue b/examples/sites/demos/app/select/size-small-composition-api.vue new file mode 100644 index 000000000..eb9ee69aa --- /dev/null +++ b/examples/sites/demos/app/select/size-small-composition-api.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/size-small.spec.ts b/examples/sites/demos/app/select/size-small.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/size-small.spec.ts rename to examples/sites/demos/app/select/size-small.spec.ts diff --git a/examples/docs/resources/pc/demo/select/size-small.vue b/examples/sites/demos/app/select/size-small.vue similarity index 92% rename from examples/docs/resources/pc/demo/select/size-small.vue rename to examples/sites/demos/app/select/size-small.vue index eb046f1ee..784634601 100644 --- a/examples/docs/resources/pc/demo/select/size-small.vue +++ b/examples/sites/demos/app/select/size-small.vue @@ -1,7 +1,6 @@ diff --git a/examples/sites/demos/app/select/slot-default-composition-api.vue b/examples/sites/demos/app/select/slot-default-composition-api.vue new file mode 100644 index 000000000..17de22544 --- /dev/null +++ b/examples/sites/demos/app/select/slot-default-composition-api.vue @@ -0,0 +1,22 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/slot-default.spec.ts b/examples/sites/demos/app/select/slot-default.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/slot-default.spec.ts rename to examples/sites/demos/app/select/slot-default.spec.ts diff --git a/examples/docs/resources/pc/demo/select/slot-default.vue b/examples/sites/demos/app/select/slot-default.vue similarity index 100% rename from examples/docs/resources/pc/demo/select/slot-default.vue rename to examples/sites/demos/app/select/slot-default.vue diff --git a/examples/sites/demos/app/select/slot-empty-composition-api.vue b/examples/sites/demos/app/select/slot-empty-composition-api.vue new file mode 100644 index 000000000..630cad1b0 --- /dev/null +++ b/examples/sites/demos/app/select/slot-empty-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/slot-empty.spec.ts b/examples/sites/demos/app/select/slot-empty.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/slot-empty.spec.ts rename to examples/sites/demos/app/select/slot-empty.spec.ts diff --git a/examples/docs/resources/pc/demo/select/slot-empty.vue b/examples/sites/demos/app/select/slot-empty.vue similarity index 100% rename from examples/docs/resources/pc/demo/select/slot-empty.vue rename to examples/sites/demos/app/select/slot-empty.vue diff --git a/examples/sites/demos/app/select/slot-footer-composition-api.vue b/examples/sites/demos/app/select/slot-footer-composition-api.vue new file mode 100644 index 000000000..4019c0a9d --- /dev/null +++ b/examples/sites/demos/app/select/slot-footer-composition-api.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/examples/docs/resources/pc/demo/select/slot-footer.spec.ts b/examples/sites/demos/app/select/slot-footer.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/slot-footer.spec.ts rename to examples/sites/demos/app/select/slot-footer.spec.ts diff --git a/examples/sites/demos/app/select/slot-footer.vue b/examples/sites/demos/app/select/slot-footer.vue new file mode 100644 index 000000000..a37d8f90a --- /dev/null +++ b/examples/sites/demos/app/select/slot-footer.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/examples/sites/demos/app/select/tag-copy-all-composition-api.vue b/examples/sites/demos/app/select/tag-copy-all-composition-api.vue new file mode 100644 index 000000000..30d8ed037 --- /dev/null +++ b/examples/sites/demos/app/select/tag-copy-all-composition-api.vue @@ -0,0 +1,45 @@ + + + diff --git a/examples/docs/resources/pc/demo/select/tag-copy-all.spec.ts b/examples/sites/demos/app/select/tag-copy-all.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/select/tag-copy-all.spec.ts rename to examples/sites/demos/app/select/tag-copy-all.spec.ts diff --git a/examples/docs/resources/pc/demo/select/tag-copy-all.vue b/examples/sites/demos/app/select/tag-copy-all.vue similarity index 86% rename from examples/docs/resources/pc/demo/select/tag-copy-all.vue rename to examples/sites/demos/app/select/tag-copy-all.vue index 07615a110..d8058504e 100644 --- a/examples/docs/resources/pc/demo/select/tag-copy-all.vue +++ b/examples/sites/demos/app/select/tag-copy-all.vue @@ -1,8 +1,13 @@ diff --git a/examples/sites/demos/app/user-head/round-user-head-composition-api.vue b/examples/sites/demos/app/user-head/round-user-head-composition-api.vue new file mode 100644 index 000000000..4385cf029 --- /dev/null +++ b/examples/sites/demos/app/user-head/round-user-head-composition-api.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/docs/resources/pc/demo/user-head/round-user-head.spec.ts b/examples/sites/demos/app/user-head/round-user-head.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/user-head/round-user-head.spec.ts rename to examples/sites/demos/app/user-head/round-user-head.spec.ts diff --git a/examples/docs/resources/pc/demo/user-head/round-user-head.vue b/examples/sites/demos/app/user-head/round-user-head.vue similarity index 100% rename from examples/docs/resources/pc/demo/user-head/round-user-head.vue rename to examples/sites/demos/app/user-head/round-user-head.vue diff --git a/examples/sites/demos/app/user-head/webdoc/user-head.cn.md b/examples/sites/demos/app/user-head/webdoc/user-head.cn.md new file mode 100644 index 000000000..962259a04 --- /dev/null +++ b/examples/sites/demos/app/user-head/webdoc/user-head.cn.md @@ -0,0 +1,7 @@ +--- +title: UserHead 用户头像 +--- + +# UserHead 用户头像 + +
UserHead 用户头像组件,用来代表用户或事物,支持图片、图标或字符展示。
diff --git a/examples/sites/demos/app/user-head/webdoc/user-head.en.md b/examples/sites/demos/app/user-head/webdoc/user-head.en.md new file mode 100644 index 000000000..058f641bb --- /dev/null +++ b/examples/sites/demos/app/user-head/webdoc/user-head.en.md @@ -0,0 +1,7 @@ +--- +title: UserHead User avatar +--- + +# UserHead User avatar + +
UserHead user avatar component, which is used to represent users or things. Images, icons, and characters can be displayed.
diff --git a/examples/sites/demos/app/user-head/webdoc/user-head.js b/examples/sites/demos/app/user-head/webdoc/user-head.js new file mode 100644 index 000000000..5d4eb780c --- /dev/null +++ b/examples/sites/demos/app/user-head/webdoc/user-head.js @@ -0,0 +1,202 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'min-user-head', + 'name': { 'zh-CN': '小头像', 'en-US': 'Avatar' }, + 'desc': { + 'zh-CN': '

可通过 min 设置小头像。

\n', + 'en-US': '

You can use min to set a small avatar.

\n' + }, + 'codeFiles': ['min-user-head.vue'] + }, + { + 'demoId': 'round-user-head', + 'name': { 'zh-CN': '圆形头像', 'en-US': 'Round Head' }, + 'desc': { + 'zh-CN': '

可通过 round 设置圆形头像。

\n', + 'en-US': '

You can use round to set a round avatar.

\n' + }, + 'codeFiles': ['round-user-head.vue'] + }, + { + 'demoId': 'label-user-head', + 'name': { 'zh-CN': '文字头像', 'en-US': 'Avatar' }, + 'desc': { + 'zh-CN': '

可通过 type="label" 设置文字头像。

\n', + 'en-US': '

You can use type="label" to set the text avatar.

\n' + }, + 'codeFiles': ['label-user-head.vue'] + }, + { + 'demoId': 'icon-user-head', + 'name': { 'zh-CN': '图标头像', 'en-US': 'Icon avatar' }, + 'desc': { + 'zh-CN': '

可通过 type="icon" 设置图标头像。

\n', + 'en-US': '

You can use type="icon" to set the icon avatar.

\n' + }, + 'codeFiles': ['icon-user-head.vue'] + }, + { + 'demoId': 'image-user-head', + 'name': { 'zh-CN': '图片头像', 'en-US': 'Avatar' }, + 'desc': { + 'zh-CN': '

可通过 type="image" 设置图片头像。

\n', + 'en-US': '

You can use type="image" to set the picture avatar.

\n' + }, + 'codeFiles': ['image-user-head.vue'] + }, + { + 'demoId': 'message-count-total', + 'name': { 'zh-CN': '头像消息计数', 'en-US': 'Avatar Message Count' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['message-count-total.vue'] + }, + { + 'demoId': 'message-count-type', + 'name': { 'zh-CN': '使用小红点代替具体数值', 'en-US': 'Use a red dot instead of a specific value.' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['message-count-type.vue'] + }, + { + 'demoId': 'message-count-limit', + 'name': { 'zh-CN': '消息计数上限', 'en-US': 'Maximum number of messages' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['message-count-limit.vue'] + }, + { + 'demoId': 'color', + 'name': { 'zh-CN': '自定义颜色', 'en-US': 'Custom Color' }, + 'desc': { + 'zh-CN': + '

可通过 color 自定义颜色,图标或文字类型(type属性值为 icon 或 label )的情况下,设置字体颜色和背景色。

\n', + 'en-US': + '

You can use color to customize the color. If the icon or text type is set to icon or label, set the font color and background color.

\n' + }, + 'codeFiles': ['color.vue'] + }, + { + 'demoId': 'custom-background-color', + 'name': { 'zh-CN': '自定义背景颜色', 'en-US': 'Custom background color' }, + 'desc': { + 'zh-CN': '

可通过 background-color 自定义背景颜色。

\n', + 'en-US': '

You can use background-color to customize the background color.

\n' + }, + 'codeFiles': ['custom-background-color.vue'] + }, + { + 'demoId': 'custom-user-head-content', + 'name': { 'zh-CN': '自定义图像内容', 'en-US': 'Custom Image Content' }, + 'desc': { + 'zh-CN': '

通过插槽自定义图像内容。

\n', + 'en-US': '

Customize the image content by slot.

\n' + }, + 'codeFiles': ['custom-user-head-content.vue'] + }, + { + 'demoId': 'render-user-head-in-grid', + 'name': { 'zh-CN': 'Grid 单元格展示头像', 'en-US': 'Avatar Displayed in Grid Cells' }, + 'desc': { 'zh-CN': '详细用法参考如下示例', 'en-US': 'For details, see the following example.' }, + 'codeFiles': ['render-user-head-in-grid.vue'] + } + ], + apis: [ + { + 'name': 'user-head', + 'type': 'component', + 'properties': [ + { + 'name': 'background-color', + 'type': 'String', + 'defaultValue': '该属性的默认值为 #d9d9d9', + 'desc': { 'zh-CN': '背景色 。', 'en-US': 'Background color.' }, + 'demoId': 'custom-background-color' + }, + { + 'name': 'color', + 'type': 'String', + 'defaultValue': '该属性的默认值为 #ffffff', + 'desc': { 'zh-CN': '文字颜色 。', 'en-US': 'Text color.' }, + 'demoId': 'color' + }, + { + 'name': 'message-total', + 'type': 'Number', + 'defaultValue': '', + 'desc': { 'zh-CN': '消息计数 。', 'en-US': 'Number of messages.' }, + 'demoId': 'message-count-total' + }, + { + 'name': 'message-type', + 'type': 'String', + 'defaultValue': '该属性的默认值为 details', + 'desc': { + 'zh-CN': '消息类型 details|basic 可选 。;该属性的可选值为 details / basic', + 'en-US': 'Message type details|basic is optional. ;The value of this attribute can be details or basic' + }, + 'demoId': 'message-count-type' + }, + { + 'name': 'message-upper-limit', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 0', + 'desc': { 'zh-CN': '消息显示上限 。', 'en-US': 'Maximum number of displayed messages.' }, + 'demoId': 'message-count-limit' + }, + { + 'name': 'min', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '小尺寸模式 。', 'en-US': 'Small size mode.' }, + 'demoId': 'min-user-head' + }, + { + 'name': 'round', + 'type': 'Boolean', + 'defaultValue': '', + 'desc': { 'zh-CN': '圆形模式 。', 'en-US': 'Circular mode.' }, + 'demoId': 'round-user-head' + }, + { + 'name': 'type', + 'type': 'String', + 'defaultValue': '该属性的默认值为 label', + 'desc': { + 'zh-CN': '头像类型,icon|image|label 可选。;该属性的可选值为 icon / image / label', + 'en-US': + 'Avatar type. The options are icon, image, and label. ;The value of this attribute can be icon / image / label' + }, + 'demoId': 'image-user-head' + }, + { + 'name': 'value', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': 'type=icon 时为图标类名,type=label时为字体串,type=image时为资源路径', + 'en-US': + 'If type is set to icon, it indicates the icon class name. If type is set to label, it indicates the font string. If type is set to image, it indicates the resource path.' + }, + 'demoId': 'icon-user-head' + } + ], + 'events': [], + 'slots': [ + { + 'name': 'default', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义图像内容', 'en-US': 'Customized image content' }, + 'demoId': 'custom-user-head-content' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/user-link/basic-usage-composition-api.vue b/examples/sites/demos/app/user-link/basic-usage-composition-api.vue new file mode 100644 index 000000000..6c6be51bb --- /dev/null +++ b/examples/sites/demos/app/user-link/basic-usage-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user-link/basic-usage.vue b/examples/sites/demos/app/user-link/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/user-link/basic-usage.vue rename to examples/sites/demos/app/user-link/basic-usage.vue diff --git a/examples/sites/demos/app/user-link/cache-users-composition-api.vue b/examples/sites/demos/app/user-link/cache-users-composition-api.vue new file mode 100644 index 000000000..3a4cb2ccc --- /dev/null +++ b/examples/sites/demos/app/user-link/cache-users-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user-link/cache-users.vue b/examples/sites/demos/app/user-link/cache-users.vue similarity index 100% rename from examples/docs/resources/pc/demo/user-link/cache-users.vue rename to examples/sites/demos/app/user-link/cache-users.vue diff --git a/examples/sites/demos/app/user-link/custom-service-composition-api.vue b/examples/sites/demos/app/user-link/custom-service-composition-api.vue new file mode 100644 index 000000000..56f811039 --- /dev/null +++ b/examples/sites/demos/app/user-link/custom-service-composition-api.vue @@ -0,0 +1,89 @@ + + + diff --git a/examples/docs/resources/pc/demo/user-link/custom-service.spec.ts b/examples/sites/demos/app/user-link/custom-service.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/user-link/custom-service.spec.ts rename to examples/sites/demos/app/user-link/custom-service.spec.ts diff --git a/examples/sites/demos/app/user-link/custom-service.vue b/examples/sites/demos/app/user-link/custom-service.vue new file mode 100644 index 000000000..3de34b0c8 --- /dev/null +++ b/examples/sites/demos/app/user-link/custom-service.vue @@ -0,0 +1,103 @@ + + + diff --git a/examples/sites/demos/app/user-link/text-field-composition-api.vue b/examples/sites/demos/app/user-link/text-field-composition-api.vue new file mode 100644 index 000000000..69d82b1f5 --- /dev/null +++ b/examples/sites/demos/app/user-link/text-field-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user-link/text-field.vue b/examples/sites/demos/app/user-link/text-field.vue similarity index 100% rename from examples/docs/resources/pc/demo/user-link/text-field.vue rename to examples/sites/demos/app/user-link/text-field.vue diff --git a/examples/sites/demos/app/user-link/text-split-composition-api.vue b/examples/sites/demos/app/user-link/text-split-composition-api.vue new file mode 100644 index 000000000..4edd4dc1c --- /dev/null +++ b/examples/sites/demos/app/user-link/text-split-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user-link/text-split.vue b/examples/sites/demos/app/user-link/text-split.vue similarity index 100% rename from examples/docs/resources/pc/demo/user-link/text-split.vue rename to examples/sites/demos/app/user-link/text-split.vue diff --git a/examples/sites/demos/app/user-link/value-composition-api.vue b/examples/sites/demos/app/user-link/value-composition-api.vue new file mode 100644 index 000000000..9bd6e65d5 --- /dev/null +++ b/examples/sites/demos/app/user-link/value-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/sites/demos/app/user-link/value-field-composition-api.vue b/examples/sites/demos/app/user-link/value-field-composition-api.vue new file mode 100644 index 000000000..5a541f489 --- /dev/null +++ b/examples/sites/demos/app/user-link/value-field-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user-link/value-field.vue b/examples/sites/demos/app/user-link/value-field.vue similarity index 100% rename from examples/docs/resources/pc/demo/user-link/value-field.vue rename to examples/sites/demos/app/user-link/value-field.vue diff --git a/examples/sites/demos/app/user-link/value-split-composition-api.vue b/examples/sites/demos/app/user-link/value-split-composition-api.vue new file mode 100644 index 000000000..f66a5cd0c --- /dev/null +++ b/examples/sites/demos/app/user-link/value-split-composition-api.vue @@ -0,0 +1,9 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/basic-usage.vue b/examples/sites/demos/app/user/basic-usage.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/basic-usage.vue rename to examples/sites/demos/app/user/basic-usage.vue diff --git a/examples/sites/demos/app/user/cache-users-composition-api.vue b/examples/sites/demos/app/user/cache-users-composition-api.vue new file mode 100644 index 000000000..6edda50f7 --- /dev/null +++ b/examples/sites/demos/app/user/cache-users-composition-api.vue @@ -0,0 +1,22 @@ + + + diff --git a/examples/sites/demos/app/user/cache-users.vue b/examples/sites/demos/app/user/cache-users.vue new file mode 100644 index 000000000..adba865fc --- /dev/null +++ b/examples/sites/demos/app/user/cache-users.vue @@ -0,0 +1,30 @@ + + + diff --git a/examples/sites/demos/app/user/collapse-show-overflow-tooltip-composition-api.vue b/examples/sites/demos/app/user/collapse-show-overflow-tooltip-composition-api.vue new file mode 100644 index 000000000..988e17ead --- /dev/null +++ b/examples/sites/demos/app/user/collapse-show-overflow-tooltip-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/collapse-show-overflow-tooltip.vue b/examples/sites/demos/app/user/collapse-show-overflow-tooltip.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/collapse-show-overflow-tooltip.vue rename to examples/sites/demos/app/user/collapse-show-overflow-tooltip.vue diff --git a/examples/sites/demos/app/user/collapse-tags -composition-api.vue b/examples/sites/demos/app/user/collapse-tags -composition-api.vue new file mode 100644 index 000000000..be8ff3a3b --- /dev/null +++ b/examples/sites/demos/app/user/collapse-tags -composition-api.vue @@ -0,0 +1,18 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/collapse-tags .vue b/examples/sites/demos/app/user/collapse-tags .vue similarity index 100% rename from examples/docs/resources/pc/demo/user/collapse-tags .vue rename to examples/sites/demos/app/user/collapse-tags .vue diff --git a/examples/sites/demos/app/user/custom-placeholder-composition-api.vue b/examples/sites/demos/app/user/custom-placeholder-composition-api.vue new file mode 100644 index 000000000..0e0c62413 --- /dev/null +++ b/examples/sites/demos/app/user/custom-placeholder-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/custom-placeholder.vue b/examples/sites/demos/app/user/custom-placeholder.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/custom-placeholder.vue rename to examples/sites/demos/app/user/custom-placeholder.vue diff --git a/examples/sites/demos/app/user/custom-service-composition-api.vue b/examples/sites/demos/app/user/custom-service-composition-api.vue new file mode 100644 index 000000000..911aae376 --- /dev/null +++ b/examples/sites/demos/app/user/custom-service-composition-api.vue @@ -0,0 +1,152 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/custom-service.spec.ts b/examples/sites/demos/app/user/custom-service.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/user/custom-service.spec.ts rename to examples/sites/demos/app/user/custom-service.spec.ts diff --git a/examples/docs/resources/pc/demo/user/custom-service.vue b/examples/sites/demos/app/user/custom-service.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/custom-service.vue rename to examples/sites/demos/app/user/custom-service.vue diff --git a/examples/sites/demos/app/user/custom-sort-composition-api.vue b/examples/sites/demos/app/user/custom-sort-composition-api.vue new file mode 100644 index 000000000..a7362566d --- /dev/null +++ b/examples/sites/demos/app/user/custom-sort-composition-api.vue @@ -0,0 +1,11 @@ + + + diff --git a/examples/sites/demos/app/user/custom-sort.vue b/examples/sites/demos/app/user/custom-sort.vue new file mode 100644 index 000000000..40e191a06 --- /dev/null +++ b/examples/sites/demos/app/user/custom-sort.vue @@ -0,0 +1,183 @@ + + + diff --git a/examples/sites/demos/app/user/delay-load-composition-api.vue b/examples/sites/demos/app/user/delay-load-composition-api.vue new file mode 100644 index 000000000..b6061ba5a --- /dev/null +++ b/examples/sites/demos/app/user/delay-load-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/delay-load.vue b/examples/sites/demos/app/user/delay-load.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/delay-load.vue rename to examples/sites/demos/app/user/delay-load.vue diff --git a/examples/sites/demos/app/user/dynamic-disable-composition-api.vue b/examples/sites/demos/app/user/dynamic-disable-composition-api.vue new file mode 100644 index 000000000..0f904a5f9 --- /dev/null +++ b/examples/sites/demos/app/user/dynamic-disable-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/dynamic-disable.vue b/examples/sites/demos/app/user/dynamic-disable.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/dynamic-disable.vue rename to examples/sites/demos/app/user/dynamic-disable.vue diff --git a/examples/sites/demos/app/user/event-change-composition-api.vue b/examples/sites/demos/app/user/event-change-composition-api.vue new file mode 100644 index 000000000..c10d3f4eb --- /dev/null +++ b/examples/sites/demos/app/user/event-change-composition-api.vue @@ -0,0 +1,14 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/event-change.vue b/examples/sites/demos/app/user/event-change.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/event-change.vue rename to examples/sites/demos/app/user/event-change.vue diff --git a/examples/sites/demos/app/user/event-error-composition-api.vue b/examples/sites/demos/app/user/event-error-composition-api.vue new file mode 100644 index 000000000..27780b7b4 --- /dev/null +++ b/examples/sites/demos/app/user/event-error-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/event-error.vue b/examples/sites/demos/app/user/event-error.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/event-error.vue rename to examples/sites/demos/app/user/event-error.vue diff --git a/examples/sites/demos/app/user/load-after-input-the-length-composition-api.vue b/examples/sites/demos/app/user/load-after-input-the-length-composition-api.vue new file mode 100644 index 000000000..43e43a8fc --- /dev/null +++ b/examples/sites/demos/app/user/load-after-input-the-length-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/load-after-input-the-length.vue b/examples/sites/demos/app/user/load-after-input-the-length.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/load-after-input-the-length.vue rename to examples/sites/demos/app/user/load-after-input-the-length.vue diff --git a/examples/sites/demos/app/user/multiple-users-composition-api.vue b/examples/sites/demos/app/user/multiple-users-composition-api.vue new file mode 100644 index 000000000..33f238e1b --- /dev/null +++ b/examples/sites/demos/app/user/multiple-users-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/sites/demos/app/user/multiple-users-tag-composition-api.vue b/examples/sites/demos/app/user/multiple-users-tag-composition-api.vue new file mode 100644 index 000000000..a0649d737 --- /dev/null +++ b/examples/sites/demos/app/user/multiple-users-tag-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/multiple-users-tag.vue b/examples/sites/demos/app/user/multiple-users-tag.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/multiple-users-tag.vue rename to examples/sites/demos/app/user/multiple-users-tag.vue diff --git a/examples/docs/resources/pc/demo/user/multiple-users.vue b/examples/sites/demos/app/user/multiple-users.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/multiple-users.vue rename to examples/sites/demos/app/user/multiple-users.vue diff --git a/examples/sites/demos/app/user/tag-copy-all-composition-api.vue b/examples/sites/demos/app/user/tag-copy-all-composition-api.vue new file mode 100644 index 000000000..148183f33 --- /dev/null +++ b/examples/sites/demos/app/user/tag-copy-all-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/tag-copy-all.vue b/examples/sites/demos/app/user/tag-copy-all.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/tag-copy-all.vue rename to examples/sites/demos/app/user/tag-copy-all.vue diff --git a/examples/sites/demos/app/user/tag-copy-composition-api.vue b/examples/sites/demos/app/user/tag-copy-composition-api.vue new file mode 100644 index 000000000..2ae598e49 --- /dev/null +++ b/examples/sites/demos/app/user/tag-copy-composition-api.vue @@ -0,0 +1,12 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/tag-copy.vue b/examples/sites/demos/app/user/tag-copy.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/tag-copy.vue rename to examples/sites/demos/app/user/tag-copy.vue diff --git a/examples/sites/demos/app/user/text-field-composition-api.vue b/examples/sites/demos/app/user/text-field-composition-api.vue new file mode 100644 index 000000000..db87ba15c --- /dev/null +++ b/examples/sites/demos/app/user/text-field-composition-api.vue @@ -0,0 +1,10 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/text-field.vue b/examples/sites/demos/app/user/text-field.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/text-field.vue rename to examples/sites/demos/app/user/text-field.vue diff --git a/examples/sites/demos/app/user/user-options-composition-api.vue b/examples/sites/demos/app/user/user-options-composition-api.vue new file mode 100644 index 000000000..5b6ace34c --- /dev/null +++ b/examples/sites/demos/app/user/user-options-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/user-options.vue b/examples/sites/demos/app/user/user-options.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/user-options.vue rename to examples/sites/demos/app/user/user-options.vue diff --git a/examples/sites/demos/app/user/user-select-size-composition-api.vue b/examples/sites/demos/app/user/user-select-size-composition-api.vue new file mode 100644 index 000000000..926772c3d --- /dev/null +++ b/examples/sites/demos/app/user/user-select-size-composition-api.vue @@ -0,0 +1,17 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/user-select-size.vue b/examples/sites/demos/app/user/user-select-size.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/user-select-size.vue rename to examples/sites/demos/app/user/user-select-size.vue diff --git a/examples/sites/demos/app/user/value-field-composition-api.vue b/examples/sites/demos/app/user/value-field-composition-api.vue new file mode 100644 index 000000000..79308b7c6 --- /dev/null +++ b/examples/sites/demos/app/user/value-field-composition-api.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/value-field.vue b/examples/sites/demos/app/user/value-field.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/value-field.vue rename to examples/sites/demos/app/user/value-field.vue diff --git a/examples/sites/demos/app/user/value-split-composition-api.vue b/examples/sites/demos/app/user/value-split-composition-api.vue new file mode 100644 index 000000000..a9ccbebec --- /dev/null +++ b/examples/sites/demos/app/user/value-split-composition-api.vue @@ -0,0 +1,13 @@ + + + diff --git a/examples/docs/resources/pc/demo/user/value-split.vue b/examples/sites/demos/app/user/value-split.vue similarity index 100% rename from examples/docs/resources/pc/demo/user/value-split.vue rename to examples/sites/demos/app/user/value-split.vue diff --git a/examples/sites/demos/app/user/webdoc/user.cn.md b/examples/sites/demos/app/user/webdoc/user.cn.md new file mode 100644 index 000000000..c94238e65 --- /dev/null +++ b/examples/sites/demos/app/user/webdoc/user.cn.md @@ -0,0 +1,7 @@ +--- +title: User 用户 +--- + +# User 用户 + +
通过 Select 选择器组件实现对用户的查询,包括 单用户 和 多用户 两种形式。
diff --git a/examples/sites/demos/app/user/webdoc/user.en.md b/examples/sites/demos/app/user/webdoc/user.en.md new file mode 100644 index 000000000..ae74d853a --- /dev/null +++ b/examples/sites/demos/app/user/webdoc/user.en.md @@ -0,0 +1,7 @@ +--- +title: User +--- + +# User + +
The Select selector component is used to query users, including single-user query and multi-user query.
diff --git a/examples/sites/demos/app/user/webdoc/user.js b/examples/sites/demos/app/user/webdoc/user.js new file mode 100644 index 000000000..640a9b2a4 --- /dev/null +++ b/examples/sites/demos/app/user/webdoc/user.js @@ -0,0 +1,431 @@ +export default { + column: '2', + owner: '', + demos: [ + { + 'demoId': 'basic-usage', + 'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' }, + 'desc': { + 'zh-CN': '

注意 User 组件请求的是 mock 数据,其他用户查询不了,开发时请用真实服务。

\n', + 'en-US': + '

Note that the User component requests mock data, which cannot be queried by other users. Use the real service during development.

\n' + }, + 'codeFiles': ['basic-usage.vue'] + }, + { + 'demoId': 'multiple-users', + 'name': { 'zh-CN': '多用户', 'en-US': 'Multi-User' }, + 'desc': { + 'zh-CN': '

设置 multiple 属性即可启用多用户形式。

\n', + 'en-US': '

Set the multiple property to enable the multi-user mode.

\n' + }, + 'codeFiles': ['multiple-users.vue'] + }, + { + 'demoId': 'multiple-users-tag', + 'name': { 'zh-CN': '折叠 Tag', 'en-US': 'Collapse Tag' }, + 'desc': { + 'zh-CN': + '

设置 multiple 属性即可启用多用户形式。\n通过 collapse-tags 配置多用户模式下是否展示折叠标签,默认为 false。

\n', + 'en-US': + '

Set the multiple property to enable the multi-user mode. \n Use collapse-tags to configure whether to display collapsed tags in multi-user mode. The default value is false.

\n' + }, + 'codeFiles': ['multiple-users-tag.vue'] + }, + { + 'demoId': 'tag-copy', + 'name': { 'zh-CN': 'user选择器选项可复制', 'en-US': 'User selector options can be copied' }, + 'desc': { + 'zh-CN': + '

通过 tag-selectable 输入框中已选择的选项可通过鼠标选择,然后按 Ctrl + C 或右键进行复制。

\n', + 'en-US': + '

You can select an option in the tag-selectable text box with the mouse, and then press Ctrl + C or right-click to copy it.

\n' + }, + 'codeFiles': ['tag-copy.vue'] + }, + { + 'demoId': 'tag-copy-all', + 'name': { 'zh-CN': 'user选择器选项可复制', 'en-US': 'User selector options can be copied' }, + 'desc': { + 'zh-CN': '

设置 copyable 属性后,可以复制所有的 tag 文本内容以逗号分隔

\n', + 'en-US': + '

After the copyable attribute is set, all tag text contents can be copied and separated by commas.

\n' + }, + 'codeFiles': ['tag-copy-all.vue'] + }, + { + 'demoId': 'dynamic-disable', + 'name': { 'zh-CN': '禁用状态', 'en-US': 'Disabled' }, + 'desc': { + 'zh-CN': '

设置 disabled 属性可禁用 User 组件。

\n', + 'en-US': '

Set the disabled property to disable the User component.

\n' + }, + 'codeFiles': ['dynamic-disable.vue'] + }, + { + 'demoId': 'collapse-show-overflow-tooltip', + 'name': { 'zh-CN': '超出提示', 'en-US': 'Exceeding prompt' }, + 'desc': { + 'zh-CN': + '

设置 collapse-show-overflow-tooltip 此属性必须设置缓存 cachetrue 时才会生效。

\n', + 'en-US': + '

Set collapse-show-overflow-tooltip This attribute takes effect only when cache is set to true.

\n' + }, + 'codeFiles': ['collapse-show-overflow-tooltip.vue'] + }, + { + 'demoId': 'value-split', + 'name': { 'zh-CN': '值分隔符', 'en-US': 'Value Separator' }, + 'desc': { + 'zh-CN': + '

通过 value-split 属性可指定多用户下获取到的 value 值中不同用户之间的分隔符,默认为 ,。\n通过 text-split 属性可指定多用户模式下输入匹配的文本分隔符,默认为 , ,可选值为 !~%(=+^{/}).!]<->[\\,:*#;

\n', + 'en-US': + '

You can use the value-split attribute to specify the separator between different users in the value obtained for multiple users. The default value is ,. \n You can use the text-split attribute to specify the text separator that matches the input in multi-user mode. The default value is ,, and the value can be !~%(=+^{/}).!]<->[\\,:*#; .

\n' + }, + 'codeFiles': ['value-split.vue'] + }, + { + 'demoId': 'value-field', + 'name': { 'zh-CN': '取值字段映射', 'en-US': 'Value Field Mapping' }, + 'desc': { + 'zh-CN': + '

通过 value-field 属性可指定获取到的 value 值的形式,默认为 userId,还包括 userAccount。

\n', + 'en-US': + '

The value-field attribute specifies the format of the obtained value. The default value is userId and userAccount are also included.

\n' + }, + 'codeFiles': ['value-field.vue'] + }, + { + 'demoId': 'text-field', + 'name': { 'zh-CN': '显示字段映射', 'en-US': 'Display Field Mapping' }, + 'desc': { + 'zh-CN': '

通过 text-field 属性可指定显示用户的哪个字段信息。

\n', + 'en-US': + '

You can use the text-field attribute to specify the field of the user to be displayed.

\n' + }, + 'codeFiles': ['text-field.vue'] + }, + { + 'demoId': 'cache-users', + 'name': { 'zh-CN': '缓存用户', 'en-US': 'Cache User' }, + 'desc': { + 'zh-CN': + '

通过 cache 属性指定用户数据是否缓存,默认为缓存。\n\ncache-key 属性可以自定义缓存的 key 值,默认为 tiny-user 。\n\ncache-fields 属性用于指定缓存哪些用户数据。

\n', + 'en-US': + '

The cache attribute specifies whether user data is cached. The default value is cached. The \n\ncache-key attribute can be used to customize the cache key value. The default value is tiny-user. The \n\ncache-fields property is used to specify which user data is cached.

\n' + }, + 'codeFiles': ['cache-users.vue'] + }, + { + 'demoId': 'delay-load', + 'name': { 'zh-CN': '延时加载', 'en-US': 'Delayed loading' }, + 'desc': { + 'zh-CN': '

通过 delay 属性指定延时加载的时间,单位是毫秒。

\n', + 'en-US': '

The delay attribute specifies the loading delay, in milliseconds.

\n' + }, + 'codeFiles': ['delay-load.vue'] + }, + { + 'demoId': 'load-after-input-the-length', + 'name': { 'zh-CN': '输入完指定长度后加载', 'en-US': 'Load after the specified length is entered.' }, + 'desc': { + 'zh-CN': '

通过 suggest-length 属性可指定输入多少个字符后开始请求服务。

\n', + 'en-US': + '

You can use the suggest-length attribute to specify the number of characters to start requesting services.

\n' + }, + 'codeFiles': ['load-after-input-the-length.vue'] + }, + { + 'demoId': 'event-change', + 'name': { 'zh-CN': '值改变事件', 'en-US': 'Value change event' }, + 'desc': { + 'zh-CN': '

通过 change 事件能获取用户类型。

\n', + 'en-US': '

The user type can be obtained through the change event.

\n' + }, + 'codeFiles': ['event-change.vue'] + }, + { + 'demoId': 'event-error', + 'name': { 'zh-CN': '用户查询错误提示', 'en-US': 'User query error message' }, + 'desc': { + 'zh-CN': '

通过 error 事件能获取查询失败的输入。

\n', + 'en-US': '

The error event can be used to obtain the input that fails to be queried.

\n' + }, + 'codeFiles': ['event-error.vue'] + }, + { + 'demoId': 'user-options', + 'name': { 'zh-CN': '自定义选项文本', 'en-US': 'Custom Option Text' }, + 'desc': { + 'zh-CN': '

通过 options 插槽设置自定义下拉选项文本。

\n', + 'en-US': '

Sets the custom drop-down option text through the options slot.

\n' + }, + 'codeFiles': ['user-options.vue'] + }, + { + 'demoId': 'custom-service', + 'name': { 'zh-CN': '自定义服务', 'en-US': 'Custom Service' }, + 'desc': { + 'zh-CN': + '

通过 service 属性可自定义用户服务,当用户在文本框中输入准确的账号时,会在下拉菜单中出现此用户。\n通过 sort-by-fetch-data 联想时下拉框的数据顺序和接口返回的数据顺序一致

\n', + 'en-US': + '

You can customize the user service through the service attribute. When a user enters an accurate account in the text box, the user is displayed in the drop-down menu. \nThe data sequence in the drop-down list box during sort-by-fetch-data association is the same as that returned by the interface.

\n' + }, + 'codeFiles': ['custom-service.vue'] + }, + { + 'demoId': 'custom-sort', + 'name': { 'zh-CN': '自定义排序', 'en-US': 'Custom Sorting' }, + 'desc': { + 'zh-CN': '

通过 sortable 属性引用 sortablejs 进行排序。

\n', + 'en-US': '

uses the sortable attribute to reference sortablejs for sorting.

\n' + }, + 'codeFiles': ['custom-sort.vue'] + }, + { + 'demoId': 'user-select-size', + 'name': { 'zh-CN': '尺寸设置', 'en-US': 'Size Settings' }, + 'desc': { + 'zh-CN': '

通过 size 属性可指定用户输入框的尺寸,包括 medium、small、mini 三个选项。

\n', + 'en-US': + '

You can use the size attribute to specify the size of the text box, including medium, small, and mini.

\n' + }, + 'codeFiles': ['user-select-size.vue'] + } + ], + apis: [ + { + 'name': 'user', + 'type': 'component', + 'properties': [ + { + 'name': 'value', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '配置默认值', 'en-US': 'Default value' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'tag-selectable', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '是否开启输入框中已选择的选项可复制', + 'en-US': 'Whether to enable copying of selected options in the text box' + }, + 'demoId': 'tag-copy' + }, + { + 'name': 'multiple', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '是否开启多用户形式,默认为 false ', + 'en-US': 'Whether to enable the multi-user mode. The default value is false.' + }, + 'demoId': 'multiple-users' + }, + { + 'name': 'disabled', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { 'zh-CN': '是否禁用户组件', 'en-US': 'Whether to disable the user component' }, + 'demoId': 'dynamic-disable' + }, + { + 'name': 'value-split', + 'type': 'String', + 'defaultValue': '该属性的默认值为 ,', + 'desc': { 'zh-CN': '值分隔符', 'en-US': 'Value Separator' }, + 'demoId': 'value-split' + }, + { + 'name': 'popper-class', + 'type': 'String', + 'defaultValue': '', + 'desc': { + 'zh-CN': '为 popper 添加类名(可参考 popover 组件)', + 'en-US': 'Add a class name for the popper. For details, see the popover component.' + }, + 'demoId': '' + }, + { + 'name': 'popper-append-to-body', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': + '是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)', + 'en-US': + 'Indicates whether to insert a pop-up box to the body element. When a fault occurs in the dialog box that is displayed, you can set this attribute to false (for details, see the select component).' + }, + 'demoId': '' + }, + { + 'name': 'sort-by-fetch-data', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '联想时下拉框的数据顺序和接口返回的数据顺序一致', + 'en-US': + 'The data sequence in the drop-down list box during association is the same as that returned by the interface.' + }, + 'demoId': 'custom-service' + }, + { + 'name': 'textSplit', + 'type': 'String', + 'defaultValue': '文本粘贴复制查询时的分割符,该属性的默认值为 ,', + 'desc': { 'zh-CN': '文本分隔符', 'en-US': 'Text separator' }, + 'demoId': 'value-split' + }, + { + 'name': 'value-field', + 'type': 'String', + 'defaultValue': '该属性的默认值为 userId', + 'desc': { 'zh-CN': '取值字段映射', 'en-US': 'Value Field Mapping' }, + 'demoId': 'value-field' + }, + { + 'name': 'text-field', + 'type': 'String', + 'defaultValue': '该属性的默认值为 userCN', + 'desc': { 'zh-CN': '显示字段映射', 'en-US': 'Display field mapping' }, + 'demoId': 'text-field' + }, + { + 'name': 'cache', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { 'zh-CN': '是否缓存用户数据', 'en-US': 'Whether to cache user data' }, + 'demoId': 'cache-users' + }, + { + 'name': 'cache-key', + 'type': 'String', + 'defaultValue': '该属性的默认值为 tiny-user', + 'desc': { 'zh-CN': '设置缓存数据的 key 值', 'en-US': 'Set the key value of cached data.' }, + 'demoId': 'cache-users' + }, + { + 'name': 'delay', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 600 毫秒', + 'desc': { 'zh-CN': '设置延时加载的时间', 'en-US': 'Set the loading delay time.' }, + 'demoId': 'delay-load' + }, + { + 'name': 'suggest-length', + 'type': 'Number', + 'defaultValue': '该属性的默认值为 3', + 'desc': { 'zh-CN': '设置输入指定长度完成后进行加载', 'en-US': 'Load after the input length is set.' }, + 'demoId': 'load-after-input-the-length' + }, + { + 'name': 'cache-fields', + 'type': 'Array', + 'defaultValue': '该属性的默认值为 []', + 'desc': { 'zh-CN': '设置需要缓存的用户数据', 'en-US': 'Set the user data to be cached.' }, + 'demoId': 'cache-users' + }, + { + 'name': 'fetchW3Accounts', + 'type': 'Function', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义批量查询用户服务', 'en-US': 'User-defined batch query service' }, + 'demoId': 'custom-service' + }, + { + 'name': 'fetchSuggestUser', + 'type': 'Function', + 'defaultValue': '', + 'desc': { 'zh-CN': '自定义输入查询服务', 'en-US': 'Customized input query service' }, + 'demoId': 'custom-service' + }, + { + 'name': 'placeholder', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置输入框占位文本', 'en-US': 'Set the placeholder text in the text box' }, + 'demoId': 'basic-usage' + }, + { + 'name': 'collapse-tags', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false', + 'desc': { + 'zh-CN': '多用户时是否折叠标签', + 'en-US': 'Whether to collapse tags when there are multiple users' + }, + 'demoId': 'multiple-users-tag' + }, + { + 'name': 'collapse-show-overflow-tooltip', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 true', + 'desc': { + 'zh-CN': '是否省略显示超出一行的数据并有tooltip提示', + 'en-US': 'Whether to omit the data that exceeds one line and display a tooltip.' + }, + 'demoId': 'collapse-show-overflow-tooltip' + }, + { + 'name': 'sortable', + 'type': 'Function', + 'defaultValue': '', + 'desc': { + 'zh-CN': '自定义用户拖拽排序,该属性引用 sortablejs 插件进行排序', + 'en-US': 'User-defined drag-and-drop sorting. This attribute references the sortablejs plug-in for sorting.' + }, + 'demoId': 'custom-sort' + }, + { + 'name': 'size', + 'type': 'String', + 'defaultValue': '', + 'desc': { 'zh-CN': '设置用户组件尺寸', 'en-US': 'Set the user component size' }, + 'demoId': 'user-select-size' + }, + { + 'name': 'allow-copy', + 'type': 'Boolean', + 'defaultValue': '该属性的默认值为 false,表示不能复制', + 'desc': { + 'zh-CN': '搜索单选场景,是否允许复制输入框的内容;属性会透传给内部的 Select 组件,参考 Select 示例', + 'en-US': + 'Indicates whether content in the text box can be copied in the single-choice search scenario. The attribute is transparently transferred to the internal Select component. For details, see the Select example.' + }, + 'demoId': '' + } + ], + 'events': [ + { + 'name': 'error', + 'type': '', + 'defaultValue': '', + 'desc': { + 'zh-CN': '输入未匹配到用户信息时触发', + 'en-US': 'This event is triggered when no user information is matched.' + }, + 'demoId': 'event-error' + }, + { + 'name': 'change', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '值发生变化时触发', 'en-US': 'This event is triggered when the value changes.' }, + 'demoId': 'event-change' + } + ], + 'slots': [ + { + 'name': 'options', + 'type': '', + 'defaultValue': '', + 'desc': { 'zh-CN': '选项文本', 'en-US': 'Option Text' }, + 'demoId': 'user-options' + } + ] + } + ] +} diff --git a/examples/sites/demos/app/wizard/base-flow-composition-api.vue b/examples/sites/demos/app/wizard/base-flow-composition-api.vue new file mode 100644 index 000000000..5282a2819 --- /dev/null +++ b/examples/sites/demos/app/wizard/base-flow-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/wizard/base-flow.spec.ts b/examples/sites/demos/app/wizard/base-flow.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/wizard/base-flow.spec.ts rename to examples/sites/demos/app/wizard/base-flow.spec.ts diff --git a/examples/docs/resources/pc/demo/wizard/base-flow.vue b/examples/sites/demos/app/wizard/base-flow.vue similarity index 90% rename from examples/docs/resources/pc/demo/wizard/base-flow.vue rename to examples/sites/demos/app/wizard/base-flow.vue index 23bd6b379..8c9407725 100644 --- a/examples/docs/resources/pc/demo/wizard/base-flow.vue +++ b/examples/sites/demos/app/wizard/base-flow.vue @@ -1,5 +1,5 @@ diff --git a/examples/sites/demos/app/wizard/basic-usage.vue b/examples/sites/demos/app/wizard/basic-usage.vue new file mode 100644 index 000000000..8c9407725 --- /dev/null +++ b/examples/sites/demos/app/wizard/basic-usage.vue @@ -0,0 +1,39 @@ + + + diff --git a/examples/sites/demos/app/wizard/page-guide-composition-api.vue b/examples/sites/demos/app/wizard/page-guide-composition-api.vue new file mode 100644 index 000000000..2d2b553e8 --- /dev/null +++ b/examples/sites/demos/app/wizard/page-guide-composition-api.vue @@ -0,0 +1,31 @@ + + + diff --git a/examples/docs/resources/pc/demo/wizard/page-guide.spec.ts b/examples/sites/demos/app/wizard/page-guide.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/wizard/page-guide.spec.ts rename to examples/sites/demos/app/wizard/page-guide.spec.ts diff --git a/examples/docs/resources/pc/demo/wizard/page-guide.vue b/examples/sites/demos/app/wizard/page-guide.vue similarity index 90% rename from examples/docs/resources/pc/demo/wizard/page-guide.vue rename to examples/sites/demos/app/wizard/page-guide.vue index 024e295fd..c4dfc50ad 100644 --- a/examples/docs/resources/pc/demo/wizard/page-guide.vue +++ b/examples/sites/demos/app/wizard/page-guide.vue @@ -1,5 +1,5 @@ diff --git a/examples/docs/resources/pc/demo/wizard/slot-base.spec.ts b/examples/sites/demos/app/wizard/slot-base.spec.ts similarity index 100% rename from examples/docs/resources/pc/demo/wizard/slot-base.spec.ts rename to examples/sites/demos/app/wizard/slot-base.spec.ts diff --git a/examples/docs/resources/pc/demo/wizard/slot-base.vue b/examples/sites/demos/app/wizard/slot-base.vue similarity index 94% rename from examples/docs/resources/pc/demo/wizard/slot-base.vue rename to examples/sites/demos/app/wizard/slot-base.vue index 111290bbc..326dbc841 100644 --- a/examples/docs/resources/pc/demo/wizard/slot-base.vue +++ b/examples/sites/demos/app/wizard/slot-base.vue @@ -1,5 +1,5 @@