@opentiny/vue-docs 3.26.7 → 3.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demos/apis/base-select.js +13 -0
- package/demos/apis/calendar-view.js +12 -0
- package/demos/apis/color-picker.js +16 -0
- package/demos/apis/color-select-panel.js +14 -0
- package/demos/apis/config-provider.js +2 -1
- package/demos/apis/date-picker.js +52 -0
- package/demos/apis/dialog-box.js +16 -4
- package/demos/apis/drawer.js +22 -0
- package/demos/apis/exception.js +43 -27
- package/demos/apis/grid.js +38 -3
- package/demos/apis/guide.js +14 -0
- package/demos/apis/pager.js +3 -3
- package/demos/apis/query-builder.js +346 -1
- package/demos/apis/select.js +41 -0
- package/demos/apis/space.js +99 -0
- package/demos/apis/steps.js +15 -0
- package/demos/apis/time-picker.js +28 -0
- package/demos/apis/time-select.js +30 -0
- package/demos/apis/tree-menu.js +14 -0
- package/demos/mobile-first/app/calendar-view/basic-usage.vue +1 -1
- package/demos/mobile-first/app/exception/webdoc/exception.js +4 -4
- package/demos/mobile-first/app/load-list/webdoc/load-list.en.md +1 -1
- package/demos/mobile-first/app/space/basic-usage-composition-api.vue +41 -0
- package/demos/mobile-first/app/space/basic-usage.spec.ts +37 -0
- package/demos/mobile-first/app/space/basic-usage.vue +37 -0
- package/demos/mobile-first/app/space/space-align-composition-api.vue +37 -0
- package/demos/mobile-first/app/space/space-align.spec.ts +24 -0
- package/demos/mobile-first/app/space/space-align.vue +37 -0
- package/demos/mobile-first/app/space/space-direction-composition-api.vue +32 -0
- package/demos/mobile-first/app/space/space-direction.spec.ts +17 -0
- package/demos/mobile-first/app/space/space-direction.vue +32 -0
- package/demos/mobile-first/app/space/space-justify-composition-api.vue +44 -0
- package/demos/mobile-first/app/space/space-justify.spec.ts +18 -0
- package/demos/mobile-first/app/space/space-justify.vue +39 -0
- package/demos/mobile-first/app/space/space-order-composition-api.vue +14 -0
- package/demos/mobile-first/app/space/space-order.spec.ts +13 -0
- package/demos/mobile-first/app/space/space-order.vue +14 -0
- package/demos/mobile-first/app/space/space-size-composition-api.vue +39 -0
- package/demos/mobile-first/app/space/space-size.spec.ts +37 -0
- package/demos/mobile-first/app/space/space-size.vue +39 -0
- package/demos/mobile-first/app/space/space-wrap-composition-api.vue +31 -0
- package/demos/mobile-first/app/space/space-wrap.spec.ts +25 -0
- package/demos/mobile-first/app/space/space-wrap.vue +31 -0
- package/demos/mobile-first/app/space/webdoc/space.cn.md +9 -0
- package/demos/mobile-first/app/space/webdoc/space.en.md +9 -0
- package/demos/mobile-first/app/space/webdoc/space.js +98 -0
- package/demos/mobile-first/menus.js +3 -1
- package/demos/pc/app/calendar-view/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/calendar-view/basic-usage.vue +1 -1
- package/demos/pc/app/carousel/webdoc/carousel.js +2 -1
- package/demos/pc/app/color-picker/linear-gradient-composition-api.vue +20 -0
- package/demos/pc/app/color-picker/linear-gradient.spec.ts +10 -0
- package/demos/pc/app/color-picker/linear-gradient.vue +28 -0
- package/demos/pc/app/color-picker/webdoc/color-picker.js +27 -0
- package/demos/pc/app/color-select-panel/linear-gradient-composition-api.vue +38 -0
- package/demos/pc/app/color-select-panel/linear-gradient.spec.ts +71 -0
- package/demos/pc/app/color-select-panel/linear-gradient.vue +45 -0
- package/demos/pc/app/color-select-panel/webdoc/color-select-panel.js +12 -0
- package/demos/pc/app/config-provider/webdoc/config-provider.js +2 -1
- package/demos/pc/app/date-panel/basic-usage.vue +19 -8
- package/demos/pc/app/date-panel/custom-weeks.vue +19 -9
- package/demos/pc/app/date-panel/disabled-date.vue +29 -19
- package/demos/pc/app/date-panel/event.vue +38 -31
- package/demos/pc/app/date-panel/format.vue +15 -5
- package/demos/pc/app/date-panel/readonly.vue +19 -8
- package/demos/pc/app/date-panel/shortcuts.vue +182 -176
- package/demos/pc/app/date-panel/unlink-panels.vue +15 -5
- package/demos/pc/app/date-picker/now-composition-api.vue +4 -1
- package/demos/pc/app/date-picker/now.vue +6 -2
- package/demos/pc/app/date-picker/slot-composition-api.vue +112 -0
- package/demos/pc/app/date-picker/slot.spec.ts +41 -0
- package/demos/pc/app/date-picker/slot.vue +119 -0
- package/demos/pc/app/date-picker/webdoc/date-picker.js +12 -0
- package/demos/pc/app/dialog-box/before-close-composition-api.vue +65 -0
- package/demos/pc/app/dialog-box/before-close.spec.ts +6 -0
- package/demos/pc/app/dialog-box/before-close.vue +71 -0
- package/demos/pc/app/dialog-box/webdoc/dialog-box.js +16 -0
- package/demos/pc/app/dialog-select/nest-tree-single.spec.ts +4 -7
- package/demos/pc/app/drawer/webdoc/drawer.js +2 -1
- package/demos/pc/app/exception/basic-usage-composition-api.vue +15 -0
- package/demos/pc/app/exception/basic-usage.vue +21 -0
- package/demos/pc/app/exception/button-text-composition-api.vue +13 -0
- package/demos/pc/app/exception/button-text.vue +21 -0
- package/demos/pc/app/exception/component-page-composition-api.vue +44 -0
- package/demos/pc/app/exception/component-page.vue +55 -0
- package/demos/pc/app/exception/page-empty-composition-api.vue +7 -0
- package/demos/pc/app/exception/page-empty.vue +13 -0
- package/demos/pc/app/exception/slot-composition-api.vue +29 -0
- package/demos/pc/app/exception/slot.vue +23 -0
- package/demos/pc/app/exception/sub-message-composition-api.vue +7 -0
- package/demos/pc/app/exception/sub-message.vue +13 -0
- package/demos/pc/app/exception/webdoc/exception.cn.md +5 -0
- package/demos/pc/app/exception/webdoc/exception.en.md +5 -0
- package/demos/pc/app/exception/webdoc/exception.js +84 -0
- package/demos/pc/app/grid/custom/default-customs-composition-api.vue +66 -0
- package/demos/pc/app/grid/custom/default-customs.spec.ts +9 -0
- package/demos/pc/app/grid/custom/default-customs.vue +75 -0
- package/demos/pc/app/grid/mouse-keyboard/mouse-config-hover-composition-api.vue +70 -0
- package/demos/pc/app/grid/mouse-keyboard/mouse-config-hover.vue +79 -0
- package/demos/pc/app/grid/validation/highlight-error-composition-api.vue +183 -0
- package/demos/pc/app/grid/validation/highlight-error.vue +192 -0
- package/demos/pc/app/grid/webdoc/grid-custom.js +11 -0
- package/demos/pc/app/grid/webdoc/grid-editor.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-mouse-keyboard.js +9 -0
- package/demos/pc/app/grid/webdoc/grid-validation.js +9 -0
- package/demos/pc/app/guide/mask-composition-api.vue +31 -0
- package/demos/pc/app/guide/mask.spec.ts +13 -0
- package/demos/pc/app/guide/mask.vue +41 -0
- package/demos/pc/app/guide/webdoc/guide.js +12 -0
- package/demos/pc/app/input/resize.spec.ts +1 -1
- package/demos/pc/app/notify/manual-close-composition-api.vue +9 -11
- package/demos/pc/app/notify/manual-close.spec.ts +1 -1
- package/demos/pc/app/notify/manual-close.vue +9 -11
- package/demos/pc/app/notify/verticalOffset.spec.ts +3 -1
- package/demos/pc/app/query-builder/handle.vue +558 -0
- package/demos/pc/app/query-builder/limit.vue +555 -0
- package/demos/pc/app/query-builder/webdoc/query-builder.js +29 -1
- package/demos/pc/app/radio/dynamic-disable.vue +1 -1
- package/demos/pc/app/space/basic-usage-composition-api.vue +41 -0
- package/demos/pc/app/space/basic-usage.spec.ts +37 -0
- package/demos/pc/app/space/basic-usage.vue +37 -0
- package/demos/pc/app/space/space-align-composition-api.vue +37 -0
- package/demos/pc/app/space/space-align.spec.ts +24 -0
- package/demos/pc/app/space/space-align.vue +37 -0
- package/demos/pc/app/space/space-direction-composition-api.vue +32 -0
- package/demos/pc/app/space/space-direction.spec.ts +17 -0
- package/demos/pc/app/space/space-direction.vue +32 -0
- package/demos/pc/app/space/space-justify-composition-api.vue +44 -0
- package/demos/pc/app/space/space-justify.spec.ts +18 -0
- package/demos/pc/app/space/space-justify.vue +39 -0
- package/demos/pc/app/space/space-order-composition-api.vue +14 -0
- package/demos/pc/app/space/space-order.spec.ts +13 -0
- package/demos/pc/app/space/space-order.vue +14 -0
- package/demos/pc/app/space/space-size-composition-api.vue +39 -0
- package/demos/pc/app/space/space-size.spec.ts +37 -0
- package/demos/pc/app/space/space-size.vue +39 -0
- package/demos/pc/app/space/space-wrap-composition-api.vue +31 -0
- package/demos/pc/app/space/space-wrap.spec.ts +25 -0
- package/demos/pc/app/space/space-wrap.vue +31 -0
- package/demos/pc/app/space/webdoc/space.cn.md +9 -0
- package/demos/pc/app/space/webdoc/space.en.md +9 -0
- package/demos/pc/app/space/webdoc/space.js +98 -0
- package/demos/pc/app/steps/slot-icon-composition-api.vue +46 -0
- package/demos/pc/app/steps/slot-icon.vue +54 -0
- package/demos/pc/app/steps/webdoc/steps.js +12 -0
- package/demos/pc/app/tree-menu/events-composition-api.vue +4 -0
- package/demos/pc/app/tree-menu/events.vue +4 -0
- package/demos/pc/app/tree-menu/webdoc/tree-menu.js +2 -2
- package/demos/pc/app/tree-menu/with-icon-composition-api.vue +149 -24
- package/demos/pc/app/tree-menu/with-icon.spec.ts +1 -1
- package/demos/pc/app/tree-menu/with-icon.vue +149 -24
- package/demos/pc/menus.js +16 -0
- package/demos/pc/webdoc/changelog.md +209 -177
- package/env/.env.saas +1 -1
- package/env/.env.saaspages +9 -0
- package/package.json +20 -19
- package/playground/App.vue +2 -2
- package/src/App.vue +2 -1
- package/src/components/anchor.vue +20 -74
- package/src/const.ts +2 -0
- package/src/main.js +2 -5
- package/src/menus.js +2 -1
- package/src/tools/docsearch.js +3 -2
- package/src/tools/useTemplateMode.js +2 -1
- package/src/tools/useTheme.js +2 -2
- package/src/views/components-doc/cmp-config.js +2 -1
- package/src/views/components-doc/common.vue +76 -12
- /package/demos/pc/app/user/{nodata-text-composition-api.vue → no-data-text-composition-api.vue} +0 -0
- /package/demos/pc/app/user/{nodata-text.vue → no-data-text.vue} +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
column: '2',
|
|
3
|
+
owner: '',
|
|
4
|
+
demos: [
|
|
5
|
+
{
|
|
6
|
+
demoId: 'basic-space',
|
|
7
|
+
name: {
|
|
8
|
+
'zh-CN': '基本用法',
|
|
9
|
+
'en-US': 'Basic Usage'
|
|
10
|
+
},
|
|
11
|
+
desc: {
|
|
12
|
+
'zh-CN': '<p>默认采用横向布局(row),自动为插槽内容添加间距。</p>',
|
|
13
|
+
'en-US': '<p>Uses horizontal layout (row) by default, automatically adding spacing between slot content.</p>'
|
|
14
|
+
},
|
|
15
|
+
codeFiles: ['basic-usage.vue']
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
demoId: 'space-size',
|
|
19
|
+
name: {
|
|
20
|
+
'zh-CN': '间距尺寸',
|
|
21
|
+
'en-US': 'Spacing Size'
|
|
22
|
+
},
|
|
23
|
+
desc: {
|
|
24
|
+
'zh-CN':
|
|
25
|
+
'<p>通过 <code>size</code> 属性设置间距大小,支持 small、medium、large 预定义值或自定义数值/数组。</p>',
|
|
26
|
+
'en-US':
|
|
27
|
+
'<p>Use the <code>size</code> prop to set spacing size. Supports predefined values (small, medium, large) or custom values/arrays.</p>'
|
|
28
|
+
},
|
|
29
|
+
codeFiles: ['space-size.vue']
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
demoId: 'space-direction',
|
|
33
|
+
name: {
|
|
34
|
+
'zh-CN': '排列方向',
|
|
35
|
+
'en-US': 'Layout Direction'
|
|
36
|
+
},
|
|
37
|
+
desc: {
|
|
38
|
+
'zh-CN': '<p>通过 <code>direction</code> 属性设置布局方向,支持 row(横向)或 column(纵向)。</p>',
|
|
39
|
+
'en-US':
|
|
40
|
+
'<p>Use the <code>direction</code> prop to set layout direction: row (horizontal) or column (vertical).</p>'
|
|
41
|
+
},
|
|
42
|
+
codeFiles: ['space-direction.vue']
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
demoId: 'space-wrap',
|
|
46
|
+
name: {
|
|
47
|
+
'zh-CN': '换行显示',
|
|
48
|
+
'en-US': 'Content Wrapping'
|
|
49
|
+
},
|
|
50
|
+
desc: {
|
|
51
|
+
'zh-CN': '<p>通过 <code>wrap</code> 属性控制子项内容是否换行显示。</p>',
|
|
52
|
+
'en-US': '<p>Use the <code>wrap</code> prop to control whether child items wrap to multiple lines.</p>'
|
|
53
|
+
},
|
|
54
|
+
codeFiles: ['space-wrap.vue']
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
demoId: 'space-align',
|
|
58
|
+
name: {
|
|
59
|
+
'zh-CN': '交叉轴对齐',
|
|
60
|
+
'en-US': 'Cross Axis Alignment'
|
|
61
|
+
},
|
|
62
|
+
desc: {
|
|
63
|
+
'zh-CN': '<p>通过 <code>align</code> 属性设置交叉轴对齐方式,支持 start、center、end、baseline 等值。</p>',
|
|
64
|
+
'en-US':
|
|
65
|
+
'<p>Use the <code>align</code> prop to define alignment on the cross axis, supporting values like start, center, end, and baseline.</p>'
|
|
66
|
+
},
|
|
67
|
+
codeFiles: ['space-align.vue']
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
demoId: 'space-justify',
|
|
71
|
+
name: {
|
|
72
|
+
'zh-CN': '主轴对齐',
|
|
73
|
+
'en-US': 'Main Axis Justification'
|
|
74
|
+
},
|
|
75
|
+
desc: {
|
|
76
|
+
'zh-CN':
|
|
77
|
+
'<p>通过 <code>justify</code> 属性设置主轴对齐方式,支持 start、center、end、space-between、space-around、space-evenly。</p>',
|
|
78
|
+
'en-US':
|
|
79
|
+
'<p>Use the <code>justify</code> prop to set main axis alignment, supporting start, center, end, space-between, space-around, and space-evenly.</p>'
|
|
80
|
+
},
|
|
81
|
+
codeFiles: ['space-justify.vue']
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
demoId: 'space-order',
|
|
85
|
+
name: {
|
|
86
|
+
'zh-CN': '自定义排序',
|
|
87
|
+
'en-US': 'Custom Ordering'
|
|
88
|
+
},
|
|
89
|
+
desc: {
|
|
90
|
+
'zh-CN':
|
|
91
|
+
'<p>通过 <code>order</code> 属性传入 key 数组来自定义子元素的渲染顺序,未设置 key 的子元素将自动排列在最后。</p>',
|
|
92
|
+
'en-US':
|
|
93
|
+
'<p>Use the <code>order</code> prop with an array of keys to customize the rendering order of child elements. Children without defined keys are automatically arranged at the end.</p>'
|
|
94
|
+
},
|
|
95
|
+
codeFiles: ['space-order.vue']
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tiny-steps line :data="data" :active="active">
|
|
3
|
+
<template #icon="{ node, index }">
|
|
4
|
+
<div v-if="index === 1" class="tiny-steps-icon active">
|
|
5
|
+
<TinyIconPagelink class="link-svg"></TinyIconPagelink>
|
|
6
|
+
</div>
|
|
7
|
+
<div v-else-if="index === 3" class="tiny-steps-icon">
|
|
8
|
+
<TinyIconVersiontree></TinyIconVersiontree>
|
|
9
|
+
</div>
|
|
10
|
+
<div v-else-if="index === 4" class="tiny-steps-icon">
|
|
11
|
+
<TinyIconCheckedTrue></TinyIconCheckedTrue>
|
|
12
|
+
</div>
|
|
13
|
+
<div v-else-if="node.name === '网站备案'" class="tiny-steps-icon">
|
|
14
|
+
<TinyIconFileupload></TinyIconFileupload>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
</tiny-steps>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup>
|
|
21
|
+
import { reactive, ref } from 'vue'
|
|
22
|
+
import { TinySteps } from '@opentiny/vue'
|
|
23
|
+
import { iconPagelink, iconFileupload, iconVersiontree, iconCheckedTrue } from '@opentiny/vue-icon'
|
|
24
|
+
|
|
25
|
+
const TinyIconPagelink = iconPagelink()
|
|
26
|
+
const TinyIconFileupload = iconFileupload()
|
|
27
|
+
const TinyIconVersiontree = iconVersiontree()
|
|
28
|
+
const TinyIconCheckedTrue = iconCheckedTrue()
|
|
29
|
+
const active = ref(1)
|
|
30
|
+
const data = reactive([
|
|
31
|
+
{
|
|
32
|
+
name: '网站搭建',
|
|
33
|
+
status: 'done'
|
|
34
|
+
},
|
|
35
|
+
{ name: '域名注册', status: 'doing' },
|
|
36
|
+
{ name: '网站备案', status: 'doing' },
|
|
37
|
+
{ name: '域名解析(可选填)', status: 'doing' },
|
|
38
|
+
{ name: 'SSL证书', status: 'disabled' }
|
|
39
|
+
])
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style scoped>
|
|
43
|
+
.link-svg {
|
|
44
|
+
fill: #fff;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tiny-steps line :data="data" :active="active">
|
|
3
|
+
<template #icon="{ node, index }">
|
|
4
|
+
<div v-if="index === 1" class="tiny-steps-icon active">
|
|
5
|
+
<TinyIconPagelink class="link-svg"></TinyIconPagelink>
|
|
6
|
+
</div>
|
|
7
|
+
<div v-else-if="index === 3" class="tiny-steps-icon">
|
|
8
|
+
<TinyIconVersiontree></TinyIconVersiontree>
|
|
9
|
+
</div>
|
|
10
|
+
<div v-else-if="index === 4" class="tiny-steps-icon">
|
|
11
|
+
<TinyIconCheckedTrue></TinyIconCheckedTrue>
|
|
12
|
+
</div>
|
|
13
|
+
<div v-else-if="node.name === '网站备案'" class="tiny-steps-icon">
|
|
14
|
+
<TinyIconFileupload></TinyIconFileupload>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
</tiny-steps>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
import { TinySteps } from '@opentiny/vue'
|
|
22
|
+
import { iconPagelink, iconFileupload, iconVersiontree, iconCheckedTrue } from '@opentiny/vue-icon'
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
components: {
|
|
26
|
+
TinySteps,
|
|
27
|
+
TinyIconPagelink: iconPagelink(),
|
|
28
|
+
TinyIconFileupload: iconFileupload(),
|
|
29
|
+
TinyIconVersiontree: iconVersiontree(),
|
|
30
|
+
TinyIconCheckedTrue: iconCheckedTrue()
|
|
31
|
+
},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
active: 1,
|
|
35
|
+
data: [
|
|
36
|
+
{
|
|
37
|
+
name: '网站搭建',
|
|
38
|
+
status: 'done'
|
|
39
|
+
},
|
|
40
|
+
{ name: '域名注册', status: 'doing' },
|
|
41
|
+
{ name: '网站备案', status: 'doing' },
|
|
42
|
+
{ name: '域名解析(可选填)', status: 'doing' },
|
|
43
|
+
{ name: 'SSL证书', status: 'disabled' }
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style scoped>
|
|
51
|
+
.link-svg {
|
|
52
|
+
fill: #fff;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -123,6 +123,18 @@ export default {
|
|
|
123
123
|
},
|
|
124
124
|
codeFiles: ['custom-steps-item.vue']
|
|
125
125
|
},
|
|
126
|
+
{
|
|
127
|
+
demoId: 'slot-icon',
|
|
128
|
+
name: {
|
|
129
|
+
'zh-CN': '图标插槽',
|
|
130
|
+
'en-US': 'Icon slot'
|
|
131
|
+
},
|
|
132
|
+
desc: {
|
|
133
|
+
'zh-CN': '<p>通过插槽 <code>icon</code> 自定义单链型节点图标。</p>\n',
|
|
134
|
+
'en-US': 'Customize a single chain node icon through the slot<code>icon</code>.'
|
|
135
|
+
},
|
|
136
|
+
codeFiles: ['slot-icon.vue']
|
|
137
|
+
},
|
|
126
138
|
{
|
|
127
139
|
demoId: 'slot-item',
|
|
128
140
|
name: {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@current-change="currentChange"
|
|
8
8
|
@node-expand="nodeExpand"
|
|
9
9
|
@node-collapse="nodeCollapse"
|
|
10
|
+
@input-change="inputChange"
|
|
10
11
|
></tiny-tree-menu>
|
|
11
12
|
</template>
|
|
12
13
|
|
|
@@ -184,6 +185,9 @@ const nodeExpand = (data) => {
|
|
|
184
185
|
const nodeCollapse = (data) => {
|
|
185
186
|
TinyModal.message({ message: `节点 - ${data.label}被关闭了`, status: 'info' })
|
|
186
187
|
}
|
|
188
|
+
const inputChange = (data) => {
|
|
189
|
+
TinyModal.message({ message: `输入框的内容是 ${data}`, status: 'info' })
|
|
190
|
+
}
|
|
187
191
|
|
|
188
192
|
const checkChange = (node, newVal) => {
|
|
189
193
|
let state = newVal ? '选中' : '取消'
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@current-change="currentChange"
|
|
8
8
|
@node-expand="nodeExpand"
|
|
9
9
|
@node-collapse="nodeCollapse"
|
|
10
|
+
@input-change="inputChange"
|
|
10
11
|
></tiny-tree-menu>
|
|
11
12
|
</template>
|
|
12
13
|
|
|
@@ -192,6 +193,9 @@ export default {
|
|
|
192
193
|
nodeCollapse(data) {
|
|
193
194
|
TinyModal.message({ message: `节点 - ${data.label}被关闭了`, status: 'info' })
|
|
194
195
|
},
|
|
196
|
+
inputChange(data) {
|
|
197
|
+
TinyModal.message({ message: `输入框的内容是 ${data}`, status: 'info' })
|
|
198
|
+
},
|
|
195
199
|
checkChange(node, newVal) {
|
|
196
200
|
let state = newVal ? '选中' : '取消'
|
|
197
201
|
TinyModal.message({
|
|
@@ -343,9 +343,9 @@ export default {
|
|
|
343
343
|
},
|
|
344
344
|
desc: {
|
|
345
345
|
'zh-CN':
|
|
346
|
-
'<div class="tip custom-block"><p class="custom-block-title">事件说明</p>\n<p>node-click:监听节点被点击时的事件。</p>\n<p>current-change:监听当前选中节点发生变化的事件。</p>\n<p>node-expand:监听节点展开的事件。</p>\n<p>node-collapse:监听节点收起的事件。</p>\n<p>check-change:可勾选时,监听勾选节点变化的事件。</p>\n
|
|
346
|
+
'<div class="tip custom-block"><p class="custom-block-title">事件说明</p>\n<p>node-click:监听节点被点击时的事件。</p>\n<p>current-change:监听当前选中节点发生变化的事件。</p>\n<p>node-expand:监听节点展开的事件。</p>\n<p>node-collapse:监听节点收起的事件。</p>\n<p>check-change:可勾选时,监听勾选节点变化的事件。</p>\n<p>input-change:输入框输入值时触发的事件。</p></div>\n',
|
|
347
347
|
'en-US':
|
|
348
|
-
'<div class="tip custom-block"><p class="custom-block-title">Event description</p>\n<p>node-click: Listen for events when a node is clicked.</p>\n<p>current-change: Listen for events where the currently selected node changes.</p>\n<p>node-expand: Listen for events that node expands.</p>\n<p>node-collapse: Listen for events when a node is folded up.</p>\n<p>check-change: When checked, listen for events related to changes in checked nodes.</p>\n
|
|
348
|
+
'<div class="tip custom-block"><p class="custom-block-title">Event description</p>\n<p>node-click: Listen for events when a node is clicked.</p>\n<p>current-change: Listen for events where the currently selected node changes.</p>\n<p>node-expand: Listen for events that node expands.</p>\n<p>node-collapse: Listen for events when a node is folded up.</p>\n<p>check-change: When checked, listen for events related to changes in checked nodes.</p>\n<p>input-change:Event triggered when a value is entered into the input box.</p></div>\n'
|
|
349
349
|
},
|
|
350
350
|
codeFiles: ['events.vue']
|
|
351
351
|
},
|
|
@@ -9,47 +9,172 @@ import { IconPlusCircle, IconPlusSquare, IconPreChecked, IconNode, IconNew } fro
|
|
|
9
9
|
|
|
10
10
|
const treeData = reactive([
|
|
11
11
|
{
|
|
12
|
-
id:
|
|
13
|
-
label: '
|
|
12
|
+
id: 100,
|
|
13
|
+
label: '组件总览',
|
|
14
14
|
customIcon: IconPlusCircle()
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
id:
|
|
18
|
-
label: '
|
|
19
|
-
customIcon: IconPlusSquare()
|
|
17
|
+
id: 200,
|
|
18
|
+
label: '使用指南',
|
|
19
|
+
customIcon: IconPlusSquare(),
|
|
20
|
+
children: [
|
|
21
|
+
{
|
|
22
|
+
id: 201,
|
|
23
|
+
label: '更新日志'
|
|
24
|
+
},
|
|
25
|
+
{ id: 202, label: '环境准备' },
|
|
26
|
+
{ id: 203, label: '安装' },
|
|
27
|
+
{
|
|
28
|
+
id: 204,
|
|
29
|
+
label: '引入组件',
|
|
30
|
+
children: [
|
|
31
|
+
{ id: 20401, label: '按需引入' },
|
|
32
|
+
{ id: 20402, label: '完整引入' }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{ id: 205, label: '开发示例' },
|
|
36
|
+
{ id: 206, label: '国际化' },
|
|
37
|
+
{ id: 207, label: '主题配置' },
|
|
38
|
+
{ id: 208, label: '表单校验配置' },
|
|
39
|
+
{ id: 209, label: '常见问题' }
|
|
40
|
+
]
|
|
20
41
|
},
|
|
21
42
|
{
|
|
22
|
-
id:
|
|
23
|
-
label: '
|
|
24
|
-
customIcon: IconPreChecked()
|
|
43
|
+
id: 300,
|
|
44
|
+
label: '框架风格',
|
|
45
|
+
customIcon: IconPreChecked(),
|
|
46
|
+
children: [
|
|
47
|
+
{
|
|
48
|
+
id: 301,
|
|
49
|
+
label: 'Color 色彩'
|
|
50
|
+
},
|
|
51
|
+
{ id: 302, label: 'Container 版型' },
|
|
52
|
+
{ id: 303, label: 'Font 字体' },
|
|
53
|
+
{ id: 304, label: 'Icon 图标' },
|
|
54
|
+
{ id: 305, label: 'Layout 布局' }
|
|
55
|
+
]
|
|
25
56
|
},
|
|
26
57
|
{
|
|
27
|
-
id:
|
|
28
|
-
label: '
|
|
29
|
-
customIcon: IconNode()
|
|
58
|
+
id: 400,
|
|
59
|
+
label: '导航组件',
|
|
60
|
+
customIcon: IconNode(),
|
|
61
|
+
children: [
|
|
62
|
+
{
|
|
63
|
+
id: 401,
|
|
64
|
+
label: 'Anchor 锚点'
|
|
65
|
+
},
|
|
66
|
+
{ id: 402, label: 'Guide 引导' },
|
|
67
|
+
{ id: 403, label: 'Breadcrumb 面包屑' }
|
|
68
|
+
]
|
|
30
69
|
},
|
|
31
70
|
{
|
|
32
|
-
id:
|
|
33
|
-
label: '
|
|
34
|
-
customIcon: IconNew()
|
|
71
|
+
id: 500,
|
|
72
|
+
label: '容器组件',
|
|
73
|
+
customIcon: IconNew(),
|
|
74
|
+
children: [
|
|
75
|
+
{
|
|
76
|
+
id: 501,
|
|
77
|
+
label: 'Carousel 走马灯'
|
|
78
|
+
},
|
|
79
|
+
{ id: 502, label: 'Collapse 折叠面板' },
|
|
80
|
+
{ id: 503, label: 'DialogBox 对话框' }
|
|
81
|
+
]
|
|
35
82
|
},
|
|
36
83
|
{
|
|
37
|
-
id:
|
|
38
|
-
label: '
|
|
84
|
+
id: 600,
|
|
85
|
+
label: '表单组件',
|
|
39
86
|
customIcon: IconNew(),
|
|
40
87
|
children: [
|
|
41
88
|
{
|
|
42
|
-
id:
|
|
43
|
-
label: '
|
|
44
|
-
|
|
89
|
+
id: 60101,
|
|
90
|
+
label: 'Button 按钮',
|
|
91
|
+
url: 'button'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 60102,
|
|
95
|
+
label: 'DatePicker 日期选择器',
|
|
96
|
+
url: 'date-picker'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 60103,
|
|
100
|
+
label: 'Select 选择器',
|
|
101
|
+
url: 'select'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: 60104,
|
|
105
|
+
label: 'DropTimes 下拉时间',
|
|
106
|
+
url: 'drop-times'
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: 60105,
|
|
110
|
+
label: 'Input 输入框',
|
|
111
|
+
url: 'input'
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 700,
|
|
117
|
+
label: '业务组件',
|
|
118
|
+
children: [
|
|
119
|
+
{
|
|
120
|
+
id: 701,
|
|
121
|
+
label: 'Amount 金额'
|
|
122
|
+
},
|
|
123
|
+
{ id: 702, label: 'Area 片区' },
|
|
124
|
+
{ id: 703, label: 'Company 公司' }
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: 800,
|
|
129
|
+
label: '其他组件',
|
|
130
|
+
children: [
|
|
131
|
+
{
|
|
132
|
+
id: 801,
|
|
133
|
+
label: '废弃组件',
|
|
45
134
|
children: [
|
|
46
|
-
{
|
|
47
|
-
|
|
135
|
+
{
|
|
136
|
+
id: 80101,
|
|
137
|
+
label: 'CreditCardForm 信用卡表单',
|
|
138
|
+
url: 'credit-card-form'
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: 80102,
|
|
142
|
+
label: 'DetailPage 表头详情栏',
|
|
143
|
+
url: 'detail-page'
|
|
144
|
+
}
|
|
48
145
|
]
|
|
49
146
|
},
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
147
|
+
{
|
|
148
|
+
id: 802,
|
|
149
|
+
label: '新增组件',
|
|
150
|
+
children: [
|
|
151
|
+
{
|
|
152
|
+
id: 80201,
|
|
153
|
+
label: 'QrCode 二维码',
|
|
154
|
+
url: 'qr-code'
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: 80202,
|
|
158
|
+
label: 'Watermark 水印',
|
|
159
|
+
url: 'watermark'
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 80203,
|
|
163
|
+
label: 'MindMap 脑图',
|
|
164
|
+
url: 'mind-map'
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: 80204,
|
|
168
|
+
label: 'Skeleton 骨架屏',
|
|
169
|
+
url: 'skeleton'
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: 803,
|
|
175
|
+
label: 'BulletinBoard 公告牌'
|
|
176
|
+
},
|
|
177
|
+
{ id: 804, label: 'Calendar 日历' }
|
|
53
178
|
]
|
|
54
179
|
}
|
|
55
180
|
])
|
|
@@ -7,6 +7,6 @@ test('节点配置带图标', async ({ page }) => {
|
|
|
7
7
|
const treeMenu = page.locator('#with-icon .tiny-tree-menu')
|
|
8
8
|
const treeMenuSvg = page.locator('.tree-node-name svg')
|
|
9
9
|
|
|
10
|
-
await expect(treeMenu.getByText('
|
|
10
|
+
await expect(treeMenu.getByText('组件总览')).toBeVisible()
|
|
11
11
|
await expect(treeMenuSvg.nth(0)).toBeVisible()
|
|
12
12
|
})
|
|
@@ -27,47 +27,172 @@ export default {
|
|
|
27
27
|
return new Promise((resolve) => {
|
|
28
28
|
resolve([
|
|
29
29
|
{
|
|
30
|
-
id:
|
|
31
|
-
label: '
|
|
30
|
+
id: 100,
|
|
31
|
+
label: '组件总览',
|
|
32
32
|
customIcon: IconPlusCircle()
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
id:
|
|
36
|
-
label: '
|
|
37
|
-
customIcon: IconPlusSquare()
|
|
35
|
+
id: 200,
|
|
36
|
+
label: '使用指南',
|
|
37
|
+
customIcon: IconPlusSquare(),
|
|
38
|
+
children: [
|
|
39
|
+
{
|
|
40
|
+
id: 201,
|
|
41
|
+
label: '更新日志'
|
|
42
|
+
},
|
|
43
|
+
{ id: 202, label: '环境准备' },
|
|
44
|
+
{ id: 203, label: '安装' },
|
|
45
|
+
{
|
|
46
|
+
id: 204,
|
|
47
|
+
label: '引入组件',
|
|
48
|
+
children: [
|
|
49
|
+
{ id: 20401, label: '按需引入' },
|
|
50
|
+
{ id: 20402, label: '完整引入' }
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{ id: 205, label: '开发示例' },
|
|
54
|
+
{ id: 206, label: '国际化' },
|
|
55
|
+
{ id: 207, label: '主题配置' },
|
|
56
|
+
{ id: 208, label: '表单校验配置' },
|
|
57
|
+
{ id: 209, label: '常见问题' }
|
|
58
|
+
]
|
|
38
59
|
},
|
|
39
60
|
{
|
|
40
|
-
id:
|
|
41
|
-
label: '
|
|
42
|
-
customIcon: IconPreChecked()
|
|
61
|
+
id: 300,
|
|
62
|
+
label: '框架风格',
|
|
63
|
+
customIcon: IconPreChecked(),
|
|
64
|
+
children: [
|
|
65
|
+
{
|
|
66
|
+
id: 301,
|
|
67
|
+
label: 'Color 色彩'
|
|
68
|
+
},
|
|
69
|
+
{ id: 302, label: 'Container 版型' },
|
|
70
|
+
{ id: 303, label: 'Font 字体' },
|
|
71
|
+
{ id: 304, label: 'Icon 图标' },
|
|
72
|
+
{ id: 305, label: 'Layout 布局' }
|
|
73
|
+
]
|
|
43
74
|
},
|
|
44
75
|
{
|
|
45
|
-
id:
|
|
46
|
-
label: '
|
|
47
|
-
customIcon: IconNode()
|
|
76
|
+
id: 400,
|
|
77
|
+
label: '导航组件',
|
|
78
|
+
customIcon: IconNode(),
|
|
79
|
+
children: [
|
|
80
|
+
{
|
|
81
|
+
id: 401,
|
|
82
|
+
label: 'Anchor 锚点'
|
|
83
|
+
},
|
|
84
|
+
{ id: 402, label: 'Guide 引导' },
|
|
85
|
+
{ id: 403, label: 'Breadcrumb 面包屑' }
|
|
86
|
+
]
|
|
48
87
|
},
|
|
49
88
|
{
|
|
50
|
-
id:
|
|
51
|
-
label: '
|
|
52
|
-
customIcon: IconNew()
|
|
89
|
+
id: 500,
|
|
90
|
+
label: '容器组件',
|
|
91
|
+
customIcon: IconNew(),
|
|
92
|
+
children: [
|
|
93
|
+
{
|
|
94
|
+
id: 501,
|
|
95
|
+
label: 'Carousel 走马灯'
|
|
96
|
+
},
|
|
97
|
+
{ id: 502, label: 'Collapse 折叠面板' },
|
|
98
|
+
{ id: 503, label: 'DialogBox 对话框' }
|
|
99
|
+
]
|
|
53
100
|
},
|
|
54
101
|
{
|
|
55
|
-
id:
|
|
56
|
-
label: '
|
|
102
|
+
id: 600,
|
|
103
|
+
label: '表单组件',
|
|
57
104
|
customIcon: IconNew(),
|
|
58
105
|
children: [
|
|
59
106
|
{
|
|
60
|
-
id:
|
|
61
|
-
label: '
|
|
62
|
-
|
|
107
|
+
id: 60101,
|
|
108
|
+
label: 'Button 按钮',
|
|
109
|
+
url: 'button'
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: 60102,
|
|
113
|
+
label: 'DatePicker 日期选择器',
|
|
114
|
+
url: 'date-picker'
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: 60103,
|
|
118
|
+
label: 'Select 选择器',
|
|
119
|
+
url: 'select'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: 60104,
|
|
123
|
+
label: 'DropTimes 下拉时间',
|
|
124
|
+
url: 'drop-times'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: 60105,
|
|
128
|
+
label: 'Input 输入框',
|
|
129
|
+
url: 'input'
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: 700,
|
|
135
|
+
label: '业务组件',
|
|
136
|
+
children: [
|
|
137
|
+
{
|
|
138
|
+
id: 701,
|
|
139
|
+
label: 'Amount 金额'
|
|
140
|
+
},
|
|
141
|
+
{ id: 702, label: 'Area 片区' },
|
|
142
|
+
{ id: 703, label: 'Company 公司' }
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 800,
|
|
147
|
+
label: '其他组件',
|
|
148
|
+
children: [
|
|
149
|
+
{
|
|
150
|
+
id: 801,
|
|
151
|
+
label: '废弃组件',
|
|
63
152
|
children: [
|
|
64
|
-
{
|
|
65
|
-
|
|
153
|
+
{
|
|
154
|
+
id: 80101,
|
|
155
|
+
label: 'CreditCardForm 信用卡表单',
|
|
156
|
+
url: 'credit-card-form'
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: 80102,
|
|
160
|
+
label: 'DetailPage 表头详情栏',
|
|
161
|
+
url: 'detail-page'
|
|
162
|
+
}
|
|
66
163
|
]
|
|
67
164
|
},
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
165
|
+
{
|
|
166
|
+
id: 802,
|
|
167
|
+
label: '新增组件',
|
|
168
|
+
children: [
|
|
169
|
+
{
|
|
170
|
+
id: 80201,
|
|
171
|
+
label: 'QrCode 二维码',
|
|
172
|
+
url: 'qr-code'
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: 80202,
|
|
176
|
+
label: 'Watermark 水印',
|
|
177
|
+
url: 'watermark'
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: 80203,
|
|
181
|
+
label: 'MindMap 脑图',
|
|
182
|
+
url: 'mind-map'
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: 80204,
|
|
186
|
+
label: 'Skeleton 骨架屏',
|
|
187
|
+
url: 'skeleton'
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: 803,
|
|
193
|
+
label: 'BulletinBoard 公告牌'
|
|
194
|
+
},
|
|
195
|
+
{ id: 804, label: 'Calendar 日历' }
|
|
71
196
|
]
|
|
72
197
|
}
|
|
73
198
|
])
|