king-design-analyzer 1.0.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.
Files changed (92) hide show
  1. package/README.md +151 -0
  2. package/components/affix.json +178 -0
  3. package/components/az.json +86 -0
  4. package/components/badge.json +162 -0
  5. package/components/billtypes.json +90 -0
  6. package/components/breadcrumb.json +220 -0
  7. package/components/button.json +511 -0
  8. package/components/card.json +334 -0
  9. package/components/cardcontent.json +144 -0
  10. package/components/carousel.json +207 -0
  11. package/components/cascader.json +373 -0
  12. package/components/checkbox.json +298 -0
  13. package/components/code.json +318 -0
  14. package/components/collapse.json +358 -0
  15. package/components/copy.json +220 -0
  16. package/components/datepicker.json +529 -0
  17. package/components/descriptions.json +309 -0
  18. package/components/dialog.json +460 -0
  19. package/components/divider.json +287 -0
  20. package/components/drawer.json +563 -0
  21. package/components/dropdown.json +407 -0
  22. package/components/editable.json +331 -0
  23. package/components/ellipsis.json +218 -0
  24. package/components/form.json +638 -0
  25. package/components/grid.json +377 -0
  26. package/components/icon.json +442 -0
  27. package/components/input.json +821 -0
  28. package/components/layoutcontent.json +210 -0
  29. package/components/menu.json +482 -0
  30. package/components/message.json +345 -0
  31. package/components/pagination.json +444 -0
  32. package/components/paginationplus.json +74 -0
  33. package/components/popover.json +456 -0
  34. package/components/progress.json +354 -0
  35. package/components/protable.json +132 -0
  36. package/components/radio.json +246 -0
  37. package/components/region.json +115 -0
  38. package/components/select.json +676 -0
  39. package/components/slider.json +422 -0
  40. package/components/spin.json +232 -0
  41. package/components/spinner.json +441 -0
  42. package/components/status.json +75 -0
  43. package/components/steps.json +292 -0
  44. package/components/switch.json +357 -0
  45. package/components/table.json +1057 -0
  46. package/components/tablecolumnid.json +217 -0
  47. package/components/tabs.json +363 -0
  48. package/components/tag.json +504 -0
  49. package/components/timepicker.json +447 -0
  50. package/components/tip.json +322 -0
  51. package/components/tooltip.json +416 -0
  52. package/components/tour.json +395 -0
  53. package/components/transfer.json +414 -0
  54. package/components/tree.json +480 -0
  55. package/components/treeselect.json +478 -0
  56. package/components/upload.json +499 -0
  57. package/components/virtuallist.json +178 -0
  58. package/dist/ast/index.d.mts +71 -0
  59. package/dist/ast/index.d.ts +71 -0
  60. package/dist/ast/index.js +15 -0
  61. package/dist/ast/index.mjs +2 -0
  62. package/dist/chunk-4BUGNH4F.mjs +62 -0
  63. package/dist/chunk-5H7N2A5X.mjs +1 -0
  64. package/dist/chunk-5IF32MBB.js +603 -0
  65. package/dist/chunk-ARWRNWDW.js +219 -0
  66. package/dist/chunk-C3L4IXJC.mjs +577 -0
  67. package/dist/chunk-GNVCC37B.js +102 -0
  68. package/dist/chunk-N4UIA6DN.js +68 -0
  69. package/dist/chunk-RAMIBZAU.mjs +216 -0
  70. package/dist/chunk-RNQHI7YG.js +64 -0
  71. package/dist/chunk-TB6BF5TJ.mjs +99 -0
  72. package/dist/chunk-UX7KGX45.mjs +66 -0
  73. package/dist/chunk-YTEYDSDW.js +2 -0
  74. package/dist/full/index.d.mts +29 -0
  75. package/dist/full/index.d.ts +29 -0
  76. package/dist/full/index.js +16 -0
  77. package/dist/full/index.mjs +3 -0
  78. package/dist/index.d.mts +5 -0
  79. package/dist/index.d.ts +5 -0
  80. package/dist/index.js +43 -0
  81. package/dist/index.mjs +6 -0
  82. package/dist/runtime/index.d.mts +14 -0
  83. package/dist/runtime/index.d.ts +14 -0
  84. package/dist/runtime/index.js +15 -0
  85. package/dist/runtime/index.mjs +2 -0
  86. package/dist/sfcCompiler-m51JOfWs.d.mts +22 -0
  87. package/dist/sfcCompiler-m51JOfWs.d.ts +22 -0
  88. package/dist/static/index.d.mts +14 -0
  89. package/dist/static/index.d.ts +14 -0
  90. package/dist/static/index.js +19 -0
  91. package/dist/static/index.mjs +2 -0
  92. package/package.json +88 -0
@@ -0,0 +1,354 @@
1
+ {
2
+ "id": "progress",
3
+ "name": "Progress",
4
+ "displayName": "进度条",
5
+ "category": "feedback",
6
+ "description": "进度条组件,用于展示操作进度或任务完成状态。支持条形和圆形两种类型、多种状态颜色、自定义颜色配置等功能。",
7
+ "importStatement": "import { Progress } from '@king-design/vue';",
8
+ "props": [
9
+ {
10
+ "name": "percent",
11
+ "description": "当前百分比 (0-100)",
12
+ "type": {
13
+ "raw": "number | string",
14
+ "kind": "union"
15
+ },
16
+ "required": false,
17
+ "default": "0",
18
+ "usageExample": "<Progress :percent=\"50\" />"
19
+ },
20
+ {
21
+ "name": "type",
22
+ "description": "进度条类型",
23
+ "type": {
24
+ "raw": "\"bar\" | \"circle\"",
25
+ "kind": "union",
26
+ "unionTypes": [
27
+ "bar",
28
+ "circle"
29
+ ]
30
+ },
31
+ "required": false,
32
+ "default": "\"bar\"",
33
+ "allowedValues": [
34
+ {
35
+ "value": "bar",
36
+ "label": "条形进度条",
37
+ "isDefault": true
38
+ },
39
+ {
40
+ "value": "circle",
41
+ "label": "圆形进度条"
42
+ }
43
+ ],
44
+ "usageExample": "<Progress type=\"circle\" :percent=\"75\" />"
45
+ },
46
+ {
47
+ "name": "status",
48
+ "description": "进度条状态,决定颜色",
49
+ "type": {
50
+ "raw": "\"success\" | \"error\" | \"active\" | \"normal\" | \"warning\"",
51
+ "kind": "union",
52
+ "unionTypes": [
53
+ "success",
54
+ "error",
55
+ "active",
56
+ "normal",
57
+ "warning"
58
+ ]
59
+ },
60
+ "required": false,
61
+ "default": "\"active\"",
62
+ "allowedValues": [
63
+ {
64
+ "value": "active",
65
+ "label": "活动状态(蓝色动画)",
66
+ "isDefault": true
67
+ },
68
+ {
69
+ "value": "normal",
70
+ "label": "正常状态"
71
+ },
72
+ {
73
+ "value": "success",
74
+ "label": "成功状态(绿色)"
75
+ },
76
+ {
77
+ "value": "warning",
78
+ "label": "警告状态(橙色)"
79
+ },
80
+ {
81
+ "value": "error",
82
+ "label": "错误状态(红色)"
83
+ }
84
+ ],
85
+ "usageExample": "<Progress :percent=\"100\" status=\"success\" />"
86
+ },
87
+ {
88
+ "name": "size",
89
+ "description": "进度条尺寸",
90
+ "type": {
91
+ "raw": "\"default\" | \"small\" | \"mini\"",
92
+ "kind": "union",
93
+ "unionTypes": [
94
+ "default",
95
+ "small",
96
+ "mini"
97
+ ]
98
+ },
99
+ "required": false,
100
+ "default": "\"default\"",
101
+ "allowedValues": [
102
+ {
103
+ "value": "default",
104
+ "label": "默认尺寸",
105
+ "isDefault": true
106
+ },
107
+ {
108
+ "value": "small",
109
+ "label": "小尺寸"
110
+ },
111
+ {
112
+ "value": "mini",
113
+ "label": "迷你尺寸"
114
+ }
115
+ ],
116
+ "usageExample": "<Progress :percent=\"50\" size=\"small\" />"
117
+ },
118
+ {
119
+ "name": "showOuterText",
120
+ "description": "是否展示进度条后面的百分比文字",
121
+ "type": {
122
+ "raw": "boolean",
123
+ "kind": "boolean"
124
+ },
125
+ "required": false,
126
+ "default": "true",
127
+ "usageExample": "<Progress :percent=\"50\" :showOuterText=\"false\" />"
128
+ },
129
+ {
130
+ "name": "showInnerText",
131
+ "description": "是否展示进度条上面的百分比文字",
132
+ "type": {
133
+ "raw": "boolean",
134
+ "kind": "boolean"
135
+ },
136
+ "required": false,
137
+ "default": "false",
138
+ "usageExample": "<Progress :percent=\"50\" showInnerText />"
139
+ },
140
+ {
141
+ "name": "strokeWidth",
142
+ "description": "圆形进度条的线条宽度,单位 px,只对 type=\"circle\" 有效",
143
+ "type": {
144
+ "raw": "number",
145
+ "kind": "number"
146
+ },
147
+ "required": false,
148
+ "default": "10",
149
+ "usageExample": "<Progress type=\"circle\" :percent=\"50\" :strokeWidth=\"8\" />"
150
+ },
151
+ {
152
+ "name": "color",
153
+ "description": "进度条背景颜色,支持固定颜色、根据百分比的颜色数组或函数。会覆盖 status 设置的颜色",
154
+ "type": {
155
+ "raw": "string | Color[] | ((percent: number) => string)",
156
+ "kind": "union"
157
+ },
158
+ "required": false,
159
+ "default": "undefined",
160
+ "usageExample": "<Progress :percent=\"50\" color=\"#8e44ad\" />"
161
+ }
162
+ ],
163
+ "events": [],
164
+ "methods": [],
165
+ "typeDefinitions": [
166
+ {
167
+ "name": "Color",
168
+ "definition": "type Color = {\n percent: string | number\n color: string\n}",
169
+ "description": "根据百分比设置的颜色配置"
170
+ }
171
+ ],
172
+ "examples": [
173
+ {
174
+ "id": "progress_basic",
175
+ "title": "基础用法",
176
+ "description": "基本的条形进度条",
177
+ "difficulty": "easy",
178
+ "code": "<script setup lang=\"ts\">\nimport { Progress } from '@king-design/vue';\n</script>\n<template>\n <Progress :percent=\"30\" />\n <Progress :percent=\"60\" />\n <Progress :percent=\"100\" />\n</template>",
179
+ "tags": [
180
+ "basic",
181
+ "bar"
182
+ ],
183
+ "usedProps": [
184
+ "percent"
185
+ ],
186
+ "usedEvents": [],
187
+ "usedMethods": [],
188
+ "scenario": "展示不同进度的条形进度条"
189
+ },
190
+ {
191
+ "id": "progress_status",
192
+ "title": "不同状态",
193
+ "description": "不同状态的进度条",
194
+ "difficulty": "easy",
195
+ "code": "<script setup lang=\"ts\">\nimport { Progress } from '@king-design/vue';\n</script>\n<template>\n <Progress :percent=\"30\" status=\"active\" />\n <Progress :percent=\"70\" status=\"success\" />\n <Progress :percent=\"50\" status=\"error\" />\n <Progress :percent=\"60\" status=\"warning\" />\n</template>",
196
+ "tags": [
197
+ "status",
198
+ "success",
199
+ "error",
200
+ "warning"
201
+ ],
202
+ "usedProps": [
203
+ "percent",
204
+ "status"
205
+ ],
206
+ "usedEvents": [],
207
+ "usedMethods": [],
208
+ "scenario": "展示不同状态的进度条"
209
+ },
210
+ {
211
+ "id": "progress_circle",
212
+ "title": "圆形进度条",
213
+ "description": "环形进度展示",
214
+ "difficulty": "easy",
215
+ "code": "<script setup lang=\"ts\">\nimport { Progress } from '@king-design/vue';\n</script>\n<template>\n <Progress type=\"circle\" :percent=\"75\" />\n <Progress type=\"circle\" :percent=\"100\" status=\"success\" />\n <Progress type=\"circle\" :percent=\"50\" status=\"error\" />\n</template>",
216
+ "tags": [
217
+ "circle",
218
+ "ring"
219
+ ],
220
+ "usedProps": [
221
+ "type",
222
+ "percent",
223
+ "status"
224
+ ],
225
+ "usedEvents": [],
226
+ "usedMethods": [],
227
+ "scenario": "创建圆形进度条"
228
+ },
229
+ {
230
+ "id": "progress_inner_text",
231
+ "title": "内部显示百分比",
232
+ "description": "在进度条内部显示百分比文字",
233
+ "difficulty": "easy",
234
+ "code": "<script setup lang=\"ts\">\nimport { Progress } from '@king-design/vue';\n</script>\n<template>\n <Progress :percent=\"60\" showInnerText :showOuterText=\"false\" />\n</template>",
235
+ "tags": [
236
+ "innerText",
237
+ "text"
238
+ ],
239
+ "usedProps": [
240
+ "percent",
241
+ "showInnerText",
242
+ "showOuterText"
243
+ ],
244
+ "usedEvents": [],
245
+ "usedMethods": [],
246
+ "scenario": "在进度条内部显示百分比"
247
+ },
248
+ {
249
+ "id": "progress_custom_color",
250
+ "title": "自定义颜色",
251
+ "description": "自定义进度条颜色",
252
+ "difficulty": "medium",
253
+ "code": "<script setup lang=\"ts\">\nimport { Progress } from '@king-design/vue';\n</script>\n<template>\n <!-- 固定颜色 -->\n <Progress :percent=\"50\" color=\"#8e44ad\" />\n \n <!-- 根据百分比渐变 -->\n <Progress :percent=\"80\" :color=\"[\n {percent: 30, color: '#f56c6c'},\n {percent: 60, color: '#e6a23c'},\n {percent: 100, color: '#67c23a'}\n ]\" />\n</template>",
254
+ "tags": [
255
+ "color",
256
+ "custom",
257
+ "gradient"
258
+ ],
259
+ "usedProps": [
260
+ "percent",
261
+ "color"
262
+ ],
263
+ "usedEvents": [],
264
+ "usedMethods": [],
265
+ "scenario": "自定义进度条颜色"
266
+ },
267
+ {
268
+ "id": "progress_dynamic",
269
+ "title": "动态进度",
270
+ "description": "动态控制进度值",
271
+ "difficulty": "medium",
272
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Progress, Button } from '@king-design/vue';\n\nconst percent = ref(0);\n\nconst increase = () => {\n if (percent.value < 100) percent.value += 10;\n};\n\nconst decrease = () => {\n if (percent.value > 0) percent.value -= 10;\n};\n</script>\n<template>\n <Progress :percent=\"percent\" />\n <Button @click=\"decrease\">-</Button>\n <Button @click=\"increase\">+</Button>\n</template>",
273
+ "tags": [
274
+ "dynamic",
275
+ "reactive"
276
+ ],
277
+ "usedProps": [
278
+ "percent"
279
+ ],
280
+ "usedEvents": [],
281
+ "usedMethods": [],
282
+ "scenario": "动态控制进度条的进度值"
283
+ },
284
+ {
285
+ "id": "progress_upload",
286
+ "title": "文件上传场景",
287
+ "description": "文件上传进度展示",
288
+ "difficulty": "medium",
289
+ "code": "<script setup lang=\"ts\">\nimport { ref, computed } from 'vue';\nimport { Progress } from '@king-design/vue';\n\nconst uploadProgress = ref(0);\n\nconst status = computed(() => {\n if (uploadProgress.value >= 100) return 'success';\n if (uploadProgress.value > 0) return 'active';\n return 'normal';\n});\n</script>\n<template>\n <div>\n <p>文件上传中...</p>\n <Progress :percent=\"uploadProgress\" :status=\"status\" />\n </div>\n</template>",
290
+ "tags": [
291
+ "upload",
292
+ "file"
293
+ ],
294
+ "usedProps": [
295
+ "percent",
296
+ "status"
297
+ ],
298
+ "usedEvents": [],
299
+ "usedMethods": [],
300
+ "scenario": "展示文件上传进度"
301
+ }
302
+ ],
303
+ "commonMistakes": [
304
+ {
305
+ "id": "progress_percent_type",
306
+ "description": "percent 使用字符串而非数字",
307
+ "wrongCode": "<Progress percent=\"50\" />",
308
+ "correctCode": "<Progress :percent=\"50\" />",
309
+ "explanation": "percent 是数字类型,需要使用 v-bind 语法 (:percent)",
310
+ "relatedProps": [
311
+ "percent"
312
+ ]
313
+ },
314
+ {
315
+ "id": "progress_percent_range",
316
+ "description": "percent 超出 0-100 范围",
317
+ "wrongCode": "<Progress :percent=\"150\" />",
318
+ "correctCode": "<Progress :percent=\"100\" />",
319
+ "explanation": "percent 的有效范围是 0-100",
320
+ "relatedProps": [
321
+ "percent"
322
+ ]
323
+ },
324
+ {
325
+ "id": "progress_strokewidth_bar",
326
+ "description": "在条形进度条上使用 strokeWidth",
327
+ "wrongCode": "<Progress type=\"bar\" :percent=\"50\" :strokeWidth=\"5\" /> <!-- strokeWidth 无效 -->",
328
+ "correctCode": "<Progress type=\"circle\" :percent=\"50\" :strokeWidth=\"5\" />",
329
+ "explanation": "strokeWidth 只对 type=\"circle\" 圆形进度条有效",
330
+ "relatedProps": [
331
+ "strokeWidth",
332
+ "type"
333
+ ]
334
+ }
335
+ ],
336
+ "searchKeywords": [
337
+ "进度条",
338
+ "progress",
339
+ "百分比",
340
+ "圆形进度",
341
+ "加载进度",
342
+ "上传进度"
343
+ ],
344
+ "useCases": [
345
+ "文件上传进度",
346
+ "任务完成进度",
347
+ "加载进度展示",
348
+ "步骤进度指示",
349
+ "容量使用展示"
350
+ ],
351
+ "relatedComponents": [
352
+ "Spin"
353
+ ]
354
+ }
@@ -0,0 +1,132 @@
1
+ {
2
+ "id": "protable",
3
+ "name": "ProTable",
4
+ "displayName": "高级表格",
5
+ "category": "data",
6
+ "description": "集成了搜索、筛选、排序、分页、工具栏等功能的高级表格组件。",
7
+ "importStatement": "import { ProTable } from '@ksyun-internal/versatile';",
8
+ "props": [
9
+ {
10
+ "name": "data",
11
+ "description": "表格数据",
12
+ "type": {
13
+ "raw": "Array",
14
+ "kind": "array"
15
+ },
16
+ "required": true
17
+ },
18
+ {
19
+ "name": "loading",
20
+ "description": "加载状态",
21
+ "type": {
22
+ "raw": "boolean",
23
+ "kind": "boolean"
24
+ },
25
+ "required": false
26
+ },
27
+ {
28
+ "name": "tableHeaderProps",
29
+ "description": "头部工具栏配置对象。包含以下子属性:\n- show: Boolean (默认 true) - 是否显示\n- toolbar: TableToolbar - 表格功能区配置\n - show: Boolean (默认 true) - 是否显示\n - refresh: { show: Boolean } (默认 { show: true }) - 刷新按钮配置\n - export: { show: Boolean, title: string, exportRangeList: ExportRange[] } - 导出按钮配置\n - setting: { show: Boolean, title: string, onColumnsChange: (keys: string[]) => void } - 设置按钮配置\n- search: TableSearch - 表格搜索区配置\n - show: Boolean (默认 true) - 是否显示\n - searchKey: string (默认 '') - 继承 Search 组件的 searchKey 属性\n - searches: string (默认 '') - 继承 Search 组件的 searches 属性\n - searchGroups: TableFilter - 继承 Search 组件的 searchGroups 属性\n- filter: TableFilter - 表格检索区配置\n - show: Boolean (默认 true) - 是否显示",
30
+ "type": {
31
+ "raw": "TableHeaderProps",
32
+ "kind": "object"
33
+ },
34
+ "required": false,
35
+ "default": "{ show: true }",
36
+ "usageExample": ":tableHeaderProps=\"{\n show: true,\n toolbar: {\n show: true,\n refresh: { show: true },\n export: { show: true, title: '导出' },\n setting: { show: true, title: '列设置' }\n },\n search: {\n show: true,\n searchKey: 'name',\n searches: '请输入名称'\n },\n filter: { show: true }\n}\""
37
+ },
38
+ {
39
+ "name": "searchKey",
40
+ "description": "搜索关键词绑定",
41
+ "type": {
42
+ "raw": "string",
43
+ "kind": "string"
44
+ },
45
+ "required": false,
46
+ "usageExample": "v-model:searchKey=\"key\""
47
+ },
48
+ {
49
+ "name": "searchValue",
50
+ "description": "搜索值绑定",
51
+ "type": {
52
+ "raw": "string",
53
+ "kind": "string"
54
+ },
55
+ "required": false,
56
+ "usageExample": "v-model:searchValue=\"val\""
57
+ },
58
+ {
59
+ "name": "searchItems",
60
+ "description": "同 SearchItems 组件的 modelValue,可用 v-model 双向绑定",
61
+ "type": {
62
+ "raw": "object",
63
+ "kind": "object"
64
+ },
65
+ "required": false,
66
+ "default": "{}",
67
+ "usageExample": "v-model:searchItems=\"searchParams\""
68
+ }
69
+ ],
70
+ "events": [
71
+ {
72
+ "name": "refresh",
73
+ "vueEventName": "@refresh",
74
+ "description": "点击刷新按钮时触发",
75
+ "payload": [],
76
+ "usageExample": "<ProTable @refresh=\"loadData\" />"
77
+ },
78
+ {
79
+ "name": "change:searchValue",
80
+ "vueEventName": "@change:searchValue",
81
+ "description": "搜索框内容变更时触发"
82
+ },
83
+ {
84
+ "name": "change:searchKey",
85
+ "vueEventName": "@change:searchKey",
86
+ "description": "搜索 Key 变更时触发"
87
+ },
88
+ {
89
+ "name": "change:columns",
90
+ "vueEventName": "@change:columns",
91
+ "description": "列设置变更时触发"
92
+ },
93
+ {
94
+ "name": "change:filters",
95
+ "vueEventName": "@change:filters",
96
+ "description": "筛选条件变更时触发"
97
+ },
98
+ {
99
+ "name": "change:export",
100
+ "vueEventName": "@change:export",
101
+ "description": "导出配置变更时触发,payload 包含 selectedKeys 和 exportRange"
102
+ }
103
+ ],
104
+ "slots": [
105
+ {
106
+ "name": "actions",
107
+ "description": "表格的左上角操作区",
108
+ "vueTemplate": "<template #actions>...</template>",
109
+ "usageExample": "<ProTable><template #actions><Button type=\"primary\">新建</Button></template></ProTable>"
110
+ },
111
+ {
112
+ "name": "toolbar",
113
+ "description": "表格的右上角功能区",
114
+ "vueTemplate": "<template #toolbar>...</template>",
115
+ "usageExample": "<ProTable><template #toolbar><Button>自定义操作</Button></template></ProTable>"
116
+ }
117
+ ],
118
+ "methods": [],
119
+ "examples": [],
120
+ "searchKeywords": [
121
+ "table",
122
+ "search",
123
+ "filter",
124
+ "list",
125
+ "表格",
126
+ "pro"
127
+ ],
128
+ "useCases": [
129
+ "资源列表页",
130
+ "复杂数据展示"
131
+ ]
132
+ }