qy-better-lib 0.0.1
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/.vscode/extensions.json +3 -0
- package/LICENSE +24 -0
- package/README.md +2 -0
- package/index.html +13 -0
- package/package.json +37 -0
- package/packages/core/DOCUMENTATION.md +2681 -0
- package/packages/core/LICENSE +24 -0
- package/packages/core/package.json +67 -0
- package/packages/core/types/index.d.ts +39 -0
- package/packages/core/types/json.d.ts +4 -0
- package/packages/core/types/vue.shim.d.ts +5 -0
- package/packages/core/vitest.config.ts +15 -0
- package/packages/core/yarn.lock +1233 -0
- package/packages/hooks/DOCUMENTATION.md +634 -0
- package/packages/hooks/LICENSE +24 -0
- package/packages/hooks/__tests__/use-chart/index.test.ts +287 -0
- package/packages/hooks/__tests__/use-emit/index.test.ts +248 -0
- package/packages/hooks/__tests__/use-fullscreen/index.test.ts +162 -0
- package/packages/hooks/__tests__/use-image/index.test.ts +230 -0
- package/packages/hooks/__tests__/use-layout-flow/index.test.ts +382 -0
- package/packages/hooks/__tests__/use-mqtt/index.test.ts +392 -0
- package/packages/hooks/__tests__/use-print/index.test.ts +378 -0
- package/packages/hooks/__tests__/use-watermark/index.test.ts +277 -0
- package/packages/hooks/__tests__/use-websocket/index.test.ts +402 -0
- package/packages/hooks/package.json +104 -0
- package/packages/hooks/types/index.d.ts +1 -0
- package/packages/hooks/types/json.d.ts +4 -0
- package/packages/hooks/types/vue.shim.d.ts +5 -0
- package/packages/hooks/yarn.lock +1832 -0
- package/packages/lowcode/core/package.json +60 -0
- package/packages/lowcode/core/types/index.d.ts +1 -0
- package/packages/lowcode/core/types/json.d.ts +4 -0
- package/packages/lowcode/core/types/vue.shim.d.ts +5 -0
- package/packages/lowcode/core/vite.dist.min.config.js +40 -0
- package/packages/lowcode/core/vite.dist.min.config.js.map +1 -0
- package/packages/lowcode/core/vite.lib.config.js +74 -0
- package/packages/lowcode/core/vite.lib.config.js.map +1 -0
- package/packages/lowcode/core/yarn.lock +1132 -0
- package/packages/lowcode/mobile/package.json +63 -0
- package/packages/lowcode/mobile/types/index.d.ts +1 -0
- package/packages/lowcode/mobile/types/json.d.ts +4 -0
- package/packages/lowcode/mobile/types/vue.shim.d.ts +77 -0
- package/packages/lowcode/mobile/vite.config.js +11 -0
- package/packages/lowcode/mobile/vite.config.js.map +1 -0
- package/packages/lowcode/mobile/vite.dist.min.config.js +71 -0
- package/packages/lowcode/mobile/vite.dist.min.config.js.map +1 -0
- package/packages/lowcode/mobile/vite.lib.config.js +137 -0
- package/packages/lowcode/mobile/vite.lib.config.js.map +1 -0
- package/packages/lowcode/mobile/yarn.lock +3888 -0
- package/packages/lowcode/pc/package.json +64 -0
- package/packages/lowcode/pc/vite.config.js +11 -0
- package/packages/lowcode/pc/vite.config.js.map +1 -0
- package/packages/lowcode/pc/vite.dist.min.config.js +71 -0
- package/packages/lowcode/pc/vite.dist.min.config.js.map +1 -0
- package/packages/lowcode/pc/vite.lib.config.js +137 -0
- package/packages/lowcode/pc/vite.lib.config.js.map +1 -0
- package/packages/lowcode/pc/yarn.lock +4026 -0
- package/packages/pc_components/DOCUMENTATION.md +566 -0
- package/packages/pc_components/LICENSE +24 -0
- package/packages/pc_components/lib/commDialog/index.d.ts +3 -0
- package/packages/pc_components/lib/commDialog/index.js +8 -0
- package/packages/pc_components/lib/commDialog/src/index.vue.d.ts +102 -0
- package/packages/pc_components/lib/commDialog/src/index.vue.js +43 -0
- package/packages/pc_components/lib/commDialog/src/index.vue2.js +4 -0
- package/packages/pc_components/lib/commDialog/src/props.d.ts +49 -0
- package/packages/pc_components/lib/commDialog/src/props.js +48 -0
- package/packages/pc_components/lib/commDialog/src/type.d.ts +39 -0
- package/packages/pc_components/lib/commForm/index.d.ts +3 -0
- package/packages/pc_components/lib/commForm/index.js +8 -0
- package/packages/pc_components/lib/commForm/src/index.vue.d.ts +95 -0
- package/packages/pc_components/lib/commForm/src/index.vue.js +50 -0
- package/packages/pc_components/lib/commForm/src/index.vue2.js +4 -0
- package/packages/pc_components/lib/commForm/src/props.d.ts +49 -0
- package/packages/pc_components/lib/commForm/src/props.js +47 -0
- package/packages/pc_components/lib/commForm/src/type.d.ts +8 -0
- package/packages/pc_components/lib/contextMenu/index.d.ts +5 -0
- package/packages/pc_components/lib/contextMenu/index.js +8 -0
- package/packages/pc_components/lib/contextMenu/src/index.vue.d.ts +91 -0
- package/packages/pc_components/lib/contextMenu/src/index.vue.js +153 -0
- package/packages/pc_components/lib/contextMenu/src/index.vue2.js +4 -0
- package/packages/pc_components/lib/contextMenu/src/props.d.ts +32 -0
- package/packages/pc_components/lib/contextMenu/src/props.js +27 -0
- package/packages/pc_components/lib/contextMenu/src/type.d.ts +11 -0
- package/packages/pc_components/lib/describeView/index.d.ts +2 -0
- package/packages/pc_components/lib/describeView/index.js +7 -0
- package/packages/pc_components/lib/describeView/src/index.vue.d.ts +61 -0
- package/packages/pc_components/lib/describeView/src/index.vue.js +84 -0
- package/packages/pc_components/lib/describeView/src/index.vue2.js +4 -0
- package/packages/pc_components/lib/describeView/src/props.d.ts +35 -0
- package/packages/pc_components/lib/describeView/src/props.js +33 -0
- package/packages/pc_components/lib/describeView/src/type.d.ts +10 -0
- package/packages/pc_components/lib/index.d.ts +18 -0
- package/packages/pc_components/lib/index.js +40 -0
- package/packages/pc_components/lib/simpleVirtualList/index.d.ts +2 -0
- package/packages/pc_components/lib/simpleVirtualList/index.js +7 -0
- package/packages/pc_components/lib/simpleVirtualList/src/index.vue.d.ts +28 -0
- package/packages/pc_components/lib/simpleVirtualList/src/index.vue.js +101 -0
- package/packages/pc_components/lib/simpleVirtualList/src/index.vue2.js +4 -0
- package/packages/pc_components/lib/simpleVirtualList/src/type.d.ts +12 -0
- package/packages/pc_components/lib/styles/comm-form.scss +4 -0
- package/packages/pc_components/lib/styles/context-menu.scss +47 -0
- package/packages/pc_components/lib/styles/describe-view.scss +25 -0
- package/packages/pc_components/lib/styles/index.scss +6 -0
- package/packages/pc_components/lib/styles/simple-virtual-list.scss +25 -0
- package/packages/pc_components/lib/styles/table-extend.scss +100 -0
- package/packages/pc_components/lib/styles/text-button.scss +71 -0
- package/packages/pc_components/lib/tableExtend/index.d.ts +3 -0
- package/packages/pc_components/lib/tableExtend/index.js +7 -0
- package/packages/pc_components/lib/tableExtend/props.d.ts +130 -0
- package/packages/pc_components/lib/tableExtend/props.js +128 -0
- package/packages/pc_components/lib/tableExtend/src/colVisible.vue.d.ts +3 -0
- package/packages/pc_components/lib/tableExtend/src/colVisible.vue.js +128 -0
- package/packages/pc_components/lib/tableExtend/src/colVisible.vue2.js +4 -0
- package/packages/pc_components/lib/tableExtend/src/index.vue.d.ts +186 -0
- package/packages/pc_components/lib/tableExtend/src/index.vue.js +234 -0
- package/packages/pc_components/lib/tableExtend/src/index.vue2.js +4 -0
- package/packages/pc_components/lib/tableExtend/src/valueCol.vue.d.ts +24 -0
- package/packages/pc_components/lib/tableExtend/src/valueCol.vue.js +29 -0
- package/packages/pc_components/lib/tableExtend/src/valueCol.vue2.js +4 -0
- package/packages/pc_components/lib/tableExtend/type.d.ts +165 -0
- package/packages/pc_components/lib/tableExtend/type.js +9 -0
- package/packages/pc_components/lib/tableExtend/useTable.d.ts +27 -0
- package/packages/pc_components/lib/tableExtend/useTable.js +115 -0
- package/packages/pc_components/lib/textButton/index.d.ts +2 -0
- package/packages/pc_components/lib/textButton/index.js +7 -0
- package/packages/pc_components/lib/textButton/src/index.vue.d.ts +42 -0
- package/packages/pc_components/lib/textButton/src/index.vue.js +44 -0
- package/packages/pc_components/lib/textButton/src/index.vue2.js +4 -0
- package/packages/pc_components/lib/textButton/src/props.d.ts +23 -0
- package/packages/pc_components/lib/textButton/src/props.js +30 -0
- package/packages/pc_components/lib/textButton/src/type.d.ts +30 -0
- package/packages/pc_components/lib/utils/index.d.ts +77 -0
- package/packages/pc_components/lib/utils/index.js +124 -0
- package/packages/pc_components/package.json +73 -0
- package/packages/pc_components/types/index.d.ts +9 -0
- package/packages/pc_components/types/json.d.ts +4 -0
- package/packages/pc_components/types/vue.shim.d.ts +5 -0
- package/packages/pc_components/yarn.lock +1641 -0
- package/postcss.config.js +19 -0
- package/public/vite.svg +1 -0
- package/src/App.vue +37 -0
- package/src/api/index.ts +42 -0
- package/src/assets/vue.svg +1 -0
- package/src/document/core.md +2680 -0
- package/src/document/hooks.md +632 -0
- package/src/document/pc_components.md +566 -0
- package/src/locales/en.json +1 -0
- package/src/locales/zh-cn.json +1 -0
- package/src/main.ts +13 -0
- package/src/plugins/element-plus.ts +16 -0
- package/src/plugins/i18n.ts +17 -0
- package/src/plugins/index.ts +13 -0
- package/src/plugins/store.ts +12 -0
- package/src/router/index.ts +20 -0
- package/src/shared/chartType.ts +279 -0
- package/src/shared/const.ts +160 -0
- package/src/shared/lib.ts +129 -0
- package/src/shared/request.ts +255 -0
- package/src/shared/type.ts +48 -0
- package/src/shared/utils/date.ts +83 -0
- package/src/shared/utils/utils.ts +85 -0
- package/src/store/index.ts +22 -0
- package/src/store/modules/app.ts +17 -0
- package/src/store/modules/shared.ts +21 -0
- package/src/styles/index.scss +169 -0
- package/src/types/app.d.ts +23 -0
- package/src/types/echarts.d.ts +5 -0
- package/src/types/index.d.ts +1 -0
- package/src/types/json.d.ts +4 -0
- package/src/types/scss.d.ts +9 -0
- package/src/types/vue.shim.d.ts +5 -0
- package/src/views/docs/docs-content.vue +379 -0
- package/src/views/docs/docs-header.vue +130 -0
- package/src/views/docs/docs-sidebar.vue +76 -0
- package/src/views/docs/hooks.ts +600 -0
- package/src/views/docs/index.vue +30 -0
- package/src/views/docs/styles/docs-content.scss +106 -0
- package/src/views/docs/styles/docs-header.scss +20 -0
- package/src/views/docs/styles/docs-sidebar.scss +182 -0
- package/src/views/docs/styles/index.scss +14 -0
- package/src/views/docs/type.ts +101 -0
- package/src/views/index.vue +34 -0
- package/tsconfig.json +37 -0
- package/tsconfig.node.json +8 -0
- package/vite.config.ts +54 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// Docs Content Styles
|
|
2
|
+
.docs-main {
|
|
3
|
+
flex: 1;
|
|
4
|
+
background-color: var(--el-bg-color);
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
box-shadow: var(--el-box-shadow-dark);
|
|
7
|
+
padding: 16px;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
|
|
12
|
+
.doc-header {
|
|
13
|
+
padding-bottom: 16px;
|
|
14
|
+
border-bottom: 1px solid var(--el-border-color);
|
|
15
|
+
|
|
16
|
+
h2 {
|
|
17
|
+
font-size: 22px;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
color: var(--el-text-color-primary);
|
|
20
|
+
line-height: 1.3;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.doc-content {
|
|
25
|
+
flex: 1 0 0;
|
|
26
|
+
padding: 16px 0;
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
scrollbar-width: none;
|
|
29
|
+
|
|
30
|
+
&::-webkit-scrollbar {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
h3 {
|
|
35
|
+
font-size: 18px;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
color: var(--el-text-color-regular);
|
|
38
|
+
padding-bottom: 10px;
|
|
39
|
+
border-bottom: 1px solid var(--el-border-color);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
p {
|
|
43
|
+
color: var(--el-text-color-secondary);
|
|
44
|
+
line-height: 1.6;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
ul,
|
|
48
|
+
ol {
|
|
49
|
+
color: var(--el-text-color-secondary);
|
|
50
|
+
line-height: 1.5;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
li{
|
|
54
|
+
margin: 12px 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
code {
|
|
58
|
+
background-color: var(--el-fill-color-light);
|
|
59
|
+
color: var(--el-color-danger);
|
|
60
|
+
padding: 2px 4px;
|
|
61
|
+
border-radius: 3px;
|
|
62
|
+
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
pre {
|
|
66
|
+
background-color: var(--el-fill-color) !important;
|
|
67
|
+
border-radius: 8px !important;
|
|
68
|
+
padding: 16px !important;
|
|
69
|
+
margin: 16px 0 !important;
|
|
70
|
+
overflow-x: auto !important;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
pre code {
|
|
74
|
+
background-color: transparent;
|
|
75
|
+
color: var(--el-text-color-regular);
|
|
76
|
+
padding: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.doc-empty {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
justify-content: center;
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
background-color: var(--el-bg-color);
|
|
86
|
+
border-radius: 8px;
|
|
87
|
+
|
|
88
|
+
.empty-content {
|
|
89
|
+
text-align: center;
|
|
90
|
+
color: var(--el-text-color-placeholder);
|
|
91
|
+
|
|
92
|
+
p {
|
|
93
|
+
margin: 0;
|
|
94
|
+
font-size: 16px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 添加一个简单的图标
|
|
98
|
+
&::before {
|
|
99
|
+
content: '📄';
|
|
100
|
+
font-size: 48px;
|
|
101
|
+
display: block;
|
|
102
|
+
margin-bottom: 16px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Docs Header Styles
|
|
2
|
+
.docs-header {
|
|
3
|
+
background-color: var(--el-bg-color);
|
|
4
|
+
padding: 20px 40px;
|
|
5
|
+
box-shadow: var(--el-box-shadow-dark);
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
align-items: center;
|
|
9
|
+
|
|
10
|
+
h1 {
|
|
11
|
+
margin: 0;
|
|
12
|
+
color: var(--el-color-primary);
|
|
13
|
+
font-size: 20px;
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.search-box {
|
|
18
|
+
width: 400px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// Docs Sidebar Styles
|
|
2
|
+
.docs-sidebar {
|
|
3
|
+
width: 300px;
|
|
4
|
+
background-color: var(--el-bg-color);
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
box-shadow: var(--el-box-shadow-dark);
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
|
|
9
|
+
.sidebar-header {
|
|
10
|
+
padding: 16px;
|
|
11
|
+
border-bottom: 1px solid var(--el-border-color);
|
|
12
|
+
|
|
13
|
+
h2 {
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
color: var(--el-text-color-primary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.filter-buttons {
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: 8px;
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
|
|
24
|
+
.filter-btn {
|
|
25
|
+
padding: 4px 12px;
|
|
26
|
+
border: 1px solid var(--el-border-color);
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
background-color: var(--el-fill-color);
|
|
29
|
+
color: var(--el-text-color-secondary);
|
|
30
|
+
font-size: 12px;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
transition: all 0.3s;
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
border-color: var(--el-color-primary);
|
|
36
|
+
color: var(--el-color-primary);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.primary {
|
|
40
|
+
background-color: var(--el-color-primary);
|
|
41
|
+
border-color: var(--el-color-primary);
|
|
42
|
+
color: #fff;
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
background-color: var(--el-color-primary-light-3);
|
|
46
|
+
border-color: var(--el-color-primary-light-3);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.active {
|
|
51
|
+
background-color: var(--el-color-primary-light-9);
|
|
52
|
+
border-color: var(--el-color-primary);
|
|
53
|
+
color: var(--el-color-primary);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.docs-list {
|
|
60
|
+
max-height: calc(100vh - 200px);
|
|
61
|
+
overflow-y: auto;
|
|
62
|
+
|
|
63
|
+
.doc-tree {
|
|
64
|
+
list-style: none;
|
|
65
|
+
padding: 0;
|
|
66
|
+
margin: 0;
|
|
67
|
+
|
|
68
|
+
.module-item {
|
|
69
|
+
border-bottom: 1px solid var(--el-border-color);
|
|
70
|
+
|
|
71
|
+
.module-label {
|
|
72
|
+
padding: 16px 20px;
|
|
73
|
+
font-weight: 500;
|
|
74
|
+
font-size: 14px;
|
|
75
|
+
color: var(--el-text-color-primary);
|
|
76
|
+
background-color: var(--el-fill-color);
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
transition: all 0.3s;
|
|
79
|
+
border-left: 3px solid transparent;
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
background-color: var(--el-fill-color-light);
|
|
83
|
+
border-left-color: var(--el-color-primary);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.doc-items {
|
|
88
|
+
list-style: none;
|
|
89
|
+
padding: 12px;
|
|
90
|
+
margin: 0;
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-wrap: wrap;
|
|
93
|
+
gap: 12px;
|
|
94
|
+
|
|
95
|
+
.doc-item {
|
|
96
|
+
flex: 0 0 calc(50% - 6px);
|
|
97
|
+
padding: 12px;
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
color: var(--el-text-color-secondary);
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
transition: all 0.3s;
|
|
102
|
+
border: 1px solid var(--el-border-color);
|
|
103
|
+
background-color: var(--el-fill-color);
|
|
104
|
+
border-radius: 4px;
|
|
105
|
+
position: relative;
|
|
106
|
+
box-sizing: border-box;
|
|
107
|
+
|
|
108
|
+
&:hover {
|
|
109
|
+
background-color: var(--el-fill-color-light);
|
|
110
|
+
color: var(--el-color-primary);
|
|
111
|
+
border-color: var(--el-color-primary);
|
|
112
|
+
transform: translateY(-2px);
|
|
113
|
+
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&.active {
|
|
117
|
+
background-color: var(--el-color-primary-light-9);
|
|
118
|
+
color: var(--el-color-primary);
|
|
119
|
+
border-color: var(--el-color-primary);
|
|
120
|
+
font-weight: 600;
|
|
121
|
+
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
|
|
122
|
+
position: relative;
|
|
123
|
+
transform: translateY(-2px);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&::-webkit-scrollbar {
|
|
129
|
+
width: 6px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&::-webkit-scrollbar-track {
|
|
133
|
+
background: var(--el-fill-color);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&::-webkit-scrollbar-thumb {
|
|
137
|
+
background: var(--el-border-color);
|
|
138
|
+
border-radius: 3px;
|
|
139
|
+
|
|
140
|
+
&:hover {
|
|
141
|
+
background: var(--el-border-color-light);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.last-menu-item {
|
|
150
|
+
height: auto !important;
|
|
151
|
+
line-height: 1 !important;
|
|
152
|
+
padding-top: 12px;
|
|
153
|
+
padding-bottom: 12px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.menu-item-content {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
gap: 8px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.menu-item-name {
|
|
163
|
+
font-size: 14px;
|
|
164
|
+
font-weight: 500;
|
|
165
|
+
color: var(--el-text-color-primary);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.menu-item-desc {
|
|
169
|
+
font-size: 12px;
|
|
170
|
+
color: var(--el-text-color-secondary);
|
|
171
|
+
line-height: 1.2;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.el-menu-item.is-active {
|
|
175
|
+
.menu-item-name {
|
|
176
|
+
color: inherit;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.menu-item-desc {
|
|
180
|
+
color: inherit;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 文档类型定义
|
|
3
|
+
*/
|
|
4
|
+
export interface DocItem {
|
|
5
|
+
/**
|
|
6
|
+
* 文档ID
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* 文档名称
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* 文档描述
|
|
15
|
+
*/
|
|
16
|
+
description: string;
|
|
17
|
+
/**
|
|
18
|
+
* 所属模块
|
|
19
|
+
*/
|
|
20
|
+
module: string;
|
|
21
|
+
/**
|
|
22
|
+
* 文档类型
|
|
23
|
+
*/
|
|
24
|
+
type: 'function' | 'component' | 'hook';
|
|
25
|
+
/**
|
|
26
|
+
* 文档内容
|
|
27
|
+
*/
|
|
28
|
+
content: string;
|
|
29
|
+
/**
|
|
30
|
+
* 文档路径
|
|
31
|
+
*/
|
|
32
|
+
path: string;
|
|
33
|
+
/**
|
|
34
|
+
* 父级菜单ID
|
|
35
|
+
*/
|
|
36
|
+
parentId?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 模块子项类型
|
|
41
|
+
*/
|
|
42
|
+
export interface ModuleChild {
|
|
43
|
+
/**
|
|
44
|
+
* 子项ID
|
|
45
|
+
*/
|
|
46
|
+
id: string;
|
|
47
|
+
/**
|
|
48
|
+
* 子项标签
|
|
49
|
+
*/
|
|
50
|
+
label: string;
|
|
51
|
+
/**
|
|
52
|
+
* 子项描述
|
|
53
|
+
*/
|
|
54
|
+
description: string;
|
|
55
|
+
/**
|
|
56
|
+
* 子项的子项(用于嵌套菜单)
|
|
57
|
+
*/
|
|
58
|
+
children?: ModuleChild[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 模块数据类型
|
|
63
|
+
*/
|
|
64
|
+
export interface ModuleData {
|
|
65
|
+
/**
|
|
66
|
+
* 模块标签
|
|
67
|
+
*/
|
|
68
|
+
label: string;
|
|
69
|
+
/**
|
|
70
|
+
* 模块子项
|
|
71
|
+
*/
|
|
72
|
+
children: ModuleChild[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
// 类型定义
|
|
77
|
+
type DocContentMap = Record<string, string>;
|
|
78
|
+
|
|
79
|
+
// 状态接口
|
|
80
|
+
export interface DocsState {
|
|
81
|
+
/**
|
|
82
|
+
* 搜索查询
|
|
83
|
+
*/
|
|
84
|
+
search_query: string;
|
|
85
|
+
/**
|
|
86
|
+
* 所有文档列表
|
|
87
|
+
*/
|
|
88
|
+
all_docs: DocItem[];
|
|
89
|
+
/**
|
|
90
|
+
* 选中的文档
|
|
91
|
+
*/
|
|
92
|
+
selected_doc: DocItem | null;
|
|
93
|
+
/**
|
|
94
|
+
* 默认展开的菜单
|
|
95
|
+
*/
|
|
96
|
+
default_openeds: string[];
|
|
97
|
+
/**
|
|
98
|
+
* 文档内容映射
|
|
99
|
+
*/
|
|
100
|
+
doc_content_map: DocContentMap;
|
|
101
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted } from 'vue';
|
|
3
|
+
import { useRouter } from 'vue-router';
|
|
4
|
+
|
|
5
|
+
const router = useRouter();
|
|
6
|
+
|
|
7
|
+
onMounted(() => {
|
|
8
|
+
// 重定向到 docs 路径
|
|
9
|
+
router.push('/docs');
|
|
10
|
+
});
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div class="page-container">
|
|
15
|
+
<h1>正在跳转到文档页面...</h1>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<style lang="scss" scoped>
|
|
20
|
+
.page-container {
|
|
21
|
+
height: 100vh;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex: 1 0 0%;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
background-color: var(--el-bg-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
h1 {
|
|
31
|
+
font-size: 18px;
|
|
32
|
+
color: var(--el-text-color-secondary);
|
|
33
|
+
}
|
|
34
|
+
</style>
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"jsx": "preserve",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"lib": ["esnext", "dom"],
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"baseUrl": "./",
|
|
16
|
+
"paths": {
|
|
17
|
+
"@packages/*": ["./packages/*"],
|
|
18
|
+
"@/router/*": ["./src/router/*"],
|
|
19
|
+
"@/plugins/*": ["./src/plugins/*"],
|
|
20
|
+
},
|
|
21
|
+
"declaration": true,
|
|
22
|
+
"declarationDir": "./dist/types",
|
|
23
|
+
"types": ["node", "./src/types"]
|
|
24
|
+
},
|
|
25
|
+
"include": [
|
|
26
|
+
"src/**/*",
|
|
27
|
+
"./src/**/*.ts",
|
|
28
|
+
"./src/**/*.tsx",
|
|
29
|
+
"./src/**/*.js",
|
|
30
|
+
"./src/**/*.vue",
|
|
31
|
+
"packages/**/*",
|
|
32
|
+
"packages/**/*.vue",
|
|
33
|
+
"packages/**/*.ts",
|
|
34
|
+
"packages/**/*.d.ts"
|
|
35
|
+
],
|
|
36
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
37
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import vue from "@vitejs/plugin-vue";
|
|
3
|
+
import AutoImport from "unplugin-auto-import/vite";
|
|
4
|
+
import Components from "unplugin-vue-components/vite";
|
|
5
|
+
import vueJsx from "@vitejs/plugin-vue-jsx";
|
|
6
|
+
import {
|
|
7
|
+
ElementPlusResolver,
|
|
8
|
+
VantResolver,
|
|
9
|
+
} from "unplugin-vue-components/resolvers";
|
|
10
|
+
import { resolve } from "path";
|
|
11
|
+
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
plugins: [
|
|
14
|
+
vue(),
|
|
15
|
+
vueJsx(),
|
|
16
|
+
AutoImport({
|
|
17
|
+
include: [/\.[tj]sx?$/, /\.vue$/],
|
|
18
|
+
imports: ["vue", "vue-router", "vue-i18n"],
|
|
19
|
+
resolvers: [ElementPlusResolver(), VantResolver()],
|
|
20
|
+
dts: "./src/types/auto-imports.d.ts",
|
|
21
|
+
}),
|
|
22
|
+
Components({
|
|
23
|
+
dirs: [],
|
|
24
|
+
dts: "./src/types/components.d.ts",
|
|
25
|
+
resolvers: [ElementPlusResolver({ importStyle: false }), VantResolver()],
|
|
26
|
+
}),
|
|
27
|
+
],
|
|
28
|
+
resolve: {
|
|
29
|
+
alias: {
|
|
30
|
+
"@": resolve(__dirname, "src"),
|
|
31
|
+
"vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js", //解决i8n警告
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
server: {
|
|
35
|
+
port: 13045,
|
|
36
|
+
proxy: {
|
|
37
|
+
// "/api/": {
|
|
38
|
+
// target: "http://36.134.137.215:19100/",
|
|
39
|
+
// changeOrigin: true,
|
|
40
|
+
// rewrite: (path) => path.replace(/^\/api/, "/api"),
|
|
41
|
+
// }
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
build: {
|
|
45
|
+
rollupOptions: {
|
|
46
|
+
output: [
|
|
47
|
+
{
|
|
48
|
+
format: "es",
|
|
49
|
+
preserveModules: true,
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
});
|