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,334 @@
1
+ {
2
+ "id": "card",
3
+ "name": "Card",
4
+ "displayName": "卡片",
5
+ "category": "data",
6
+ "description": "卡片容器组件,用于展示内容和操作。支持多种类型(阴影、边框、无边框)、尺寸,以及自定义头部和多列布局。配合 CardColumn 子组件使用可实现多列布局。",
7
+ "importStatement": "import { Card, CardColumn } from '@king-design/vue';",
8
+ "props": [
9
+ {
10
+ "name": "title",
11
+ "description": "卡片标题",
12
+ "type": {
13
+ "raw": "string | VNode",
14
+ "kind": "union"
15
+ },
16
+ "required": false,
17
+ "default": "undefined",
18
+ "usageExample": "<Card title=\"卡片标题\">内容</Card>"
19
+ },
20
+ {
21
+ "name": "type",
22
+ "description": "卡片类型,决定卡片的视觉样式",
23
+ "type": {
24
+ "raw": "\"shadow\" | \"border\" | \"none\"",
25
+ "kind": "union",
26
+ "unionTypes": [
27
+ "shadow",
28
+ "border",
29
+ "none"
30
+ ]
31
+ },
32
+ "required": false,
33
+ "default": "\"shadow\"",
34
+ "allowedValues": [
35
+ {
36
+ "value": "shadow",
37
+ "label": "阴影样式",
38
+ "isDefault": true
39
+ },
40
+ {
41
+ "value": "border",
42
+ "label": "边框样式"
43
+ },
44
+ {
45
+ "value": "none",
46
+ "label": "无边框样式"
47
+ }
48
+ ],
49
+ "usageExample": "<Card type=\"border\" title=\"边框卡片\">内容</Card>"
50
+ },
51
+ {
52
+ "name": "size",
53
+ "description": "卡片尺寸",
54
+ "type": {
55
+ "raw": "\"default\" | \"small\" | \"mini\"",
56
+ "kind": "union",
57
+ "unionTypes": [
58
+ "default",
59
+ "small",
60
+ "mini"
61
+ ]
62
+ },
63
+ "required": false,
64
+ "default": "\"default\"",
65
+ "allowedValues": [
66
+ {
67
+ "value": "default",
68
+ "label": "默认尺寸",
69
+ "isDefault": true
70
+ },
71
+ {
72
+ "value": "small",
73
+ "label": "小尺寸"
74
+ },
75
+ {
76
+ "value": "mini",
77
+ "label": "迷你尺寸"
78
+ }
79
+ ],
80
+ "usageExample": "<Card size=\"small\" title=\"小卡片\">内容</Card>"
81
+ }
82
+ ],
83
+ "events": [],
84
+ "slots": [
85
+ {
86
+ "name": "header",
87
+ "description": "扩展整个头部内容"
88
+ },
89
+ {
90
+ "name": "title",
91
+ "description": "扩展头部标题内容"
92
+ },
93
+ {
94
+ "name": "extra",
95
+ "description": "扩展头部附加内容"
96
+ }
97
+ ],
98
+ "methods": [],
99
+ "subComponents": [
100
+ {
101
+ "name": "CardColumn",
102
+ "description": "卡片列组件,用于实现卡片内的多列布局",
103
+ "props": [
104
+ {
105
+ "name": "width",
106
+ "description": "列宽,必须带单位",
107
+ "type": {
108
+ "raw": "string",
109
+ "kind": "string"
110
+ },
111
+ "required": false,
112
+ "default": "undefined",
113
+ "usageExample": "<CardColumn width=\"100px\">内容</CardColumn>"
114
+ },
115
+ {
116
+ "name": "center",
117
+ "description": "该列内容是否居中",
118
+ "type": {
119
+ "raw": "boolean",
120
+ "kind": "boolean"
121
+ },
122
+ "required": false,
123
+ "default": "false",
124
+ "usageExample": "<CardColumn center>居中内容</CardColumn>"
125
+ }
126
+ ]
127
+ }
128
+ ],
129
+ "examples": [
130
+ {
131
+ "id": "card_basic",
132
+ "title": "基础用法",
133
+ "description": "基本的卡片",
134
+ "difficulty": "easy",
135
+ "code": "<script setup lang=\"ts\">\nimport { Card } from '@king-design/vue';\n</script>\n<template>\n <Card title=\"卡片标题\">\n <p>卡片内容</p>\n <p>这是一段详细的描述文字</p>\n </Card>\n</template>",
136
+ "tags": [
137
+ "basic"
138
+ ],
139
+ "usedProps": [
140
+ "title"
141
+ ],
142
+ "usedEvents": [],
143
+ "usedMethods": [],
144
+ "scenario": "创建一个基本的卡片"
145
+ },
146
+ {
147
+ "id": "card_types",
148
+ "title": "不同类型",
149
+ "description": "阴影、边框、无边框三种类型",
150
+ "difficulty": "easy",
151
+ "code": "<script setup lang=\"ts\">\nimport { Card } from '@king-design/vue';\n</script>\n<template>\n <Card title=\"阴影卡片\" type=\"shadow\">\n 阴影样式\n </Card>\n <Card title=\"边框卡片\" type=\"border\">\n 边框样式\n </Card>\n <Card title=\"无边框卡片\" type=\"none\">\n 无边框样式\n </Card>\n</template>",
152
+ "tags": [
153
+ "type",
154
+ "shadow",
155
+ "border"
156
+ ],
157
+ "usedProps": [
158
+ "title",
159
+ "type"
160
+ ],
161
+ "usedEvents": [],
162
+ "usedMethods": [],
163
+ "scenario": "展示不同类型的卡片样式"
164
+ },
165
+ {
166
+ "id": "card_sizes",
167
+ "title": "不同尺寸",
168
+ "description": "不同尺寸的卡片",
169
+ "difficulty": "easy",
170
+ "code": "<script setup lang=\"ts\">\nimport { Card } from '@king-design/vue';\n</script>\n<template>\n <Card title=\"默认尺寸\" size=\"default\">默认尺寸卡片</Card>\n <Card title=\"小尺寸\" size=\"small\">小尺寸卡片</Card>\n <Card title=\"迷你尺寸\" size=\"mini\">迷你尺寸卡片</Card>\n</template>",
171
+ "tags": [
172
+ "size",
173
+ "small",
174
+ "mini"
175
+ ],
176
+ "usedProps": [
177
+ "title",
178
+ "size"
179
+ ],
180
+ "usedEvents": [],
181
+ "usedMethods": [],
182
+ "scenario": "展示不同尺寸的卡片"
183
+ },
184
+ {
185
+ "id": "card_extra",
186
+ "title": "头部额外操作",
187
+ "description": "在卡片头部添加操作按钮",
188
+ "difficulty": "easy",
189
+ "code": "<script setup lang=\"ts\">\nimport { Card, Button } from '@king-design/vue';\n</script>\n<template>\n <Card title=\"操作卡片\">\n <template #extra>\n <Button type=\"link\">更多</Button>\n </template>\n <p>卡片内容</p>\n </Card>\n</template>",
190
+ "tags": [
191
+ "extra",
192
+ "slot",
193
+ "action"
194
+ ],
195
+ "usedProps": [
196
+ "title"
197
+ ],
198
+ "usedEvents": [],
199
+ "usedSlots": [
200
+ "extra"
201
+ ],
202
+ "usedMethods": [],
203
+ "scenario": "在卡片头部添加操作按钮"
204
+ },
205
+ {
206
+ "id": "card_custom_title",
207
+ "title": "自定义标题",
208
+ "description": "使用插槽自定义标题内容",
209
+ "difficulty": "easy",
210
+ "code": "<script setup lang=\"ts\">\nimport { Card, Icon } from '@king-design/vue';\n</script>\n<template>\n <Card>\n <template #title>\n <Icon class=\"k-icon-heart\" color=\"danger\" /> 自定义标题\n </template>\n <p>卡片内容</p>\n </Card>\n</template>",
211
+ "tags": [
212
+ "title",
213
+ "slot",
214
+ "icon"
215
+ ],
216
+ "usedProps": [],
217
+ "usedEvents": [],
218
+ "usedSlots": [
219
+ "title"
220
+ ],
221
+ "usedMethods": [],
222
+ "scenario": "使用图标自定义卡片标题"
223
+ },
224
+ {
225
+ "id": "card_column",
226
+ "title": "多列布局",
227
+ "description": "使用 CardColumn 实现多列布局",
228
+ "difficulty": "medium",
229
+ "code": "<script setup lang=\"ts\">\nimport { Card, CardColumn } from '@king-design/vue';\n</script>\n<template>\n <Card title=\"用户信息\">\n <CardColumn width=\"100px\" center>\n <img src=\"avatar.png\" style=\"width: 80px; height: 80px; border-radius: 50%;\" />\n </CardColumn>\n <CardColumn>\n <h4>用户名称</h4>\n <p>这是用户的详细描述信息</p>\n </CardColumn>\n </Card>\n</template>",
230
+ "tags": [
231
+ "CardColumn",
232
+ "column",
233
+ "layout"
234
+ ],
235
+ "usedProps": [
236
+ "title",
237
+ "width",
238
+ "center"
239
+ ],
240
+ "usedEvents": [],
241
+ "usedMethods": [],
242
+ "scenario": "创建带有头像和信息的多列卡片"
243
+ },
244
+ {
245
+ "id": "card_no_title",
246
+ "title": "无标题卡片",
247
+ "description": "不设置标题的简洁卡片",
248
+ "difficulty": "easy",
249
+ "code": "<script setup lang=\"ts\">\nimport { Card } from '@king-design/vue';\n</script>\n<template>\n <Card>\n <p>这是一个没有标题的卡片</p>\n <p>适用于简单内容展示</p>\n </Card>\n</template>",
250
+ "tags": [
251
+ "simple",
252
+ "no-title"
253
+ ],
254
+ "usedProps": [],
255
+ "usedEvents": [],
256
+ "usedMethods": [],
257
+ "scenario": "创建无标题的简洁卡片"
258
+ },
259
+ {
260
+ "id": "card_list",
261
+ "title": "卡片列表",
262
+ "description": "展示多个卡片的列表",
263
+ "difficulty": "medium",
264
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Card, Button } from '@king-design/vue';\n\nconst items = ref([\n { id: 1, title: '项目一', desc: '项目一的描述' },\n { id: 2, title: '项目二', desc: '项目二的描述' },\n { id: 3, title: '项目三', desc: '项目三的描述' }\n]);\n</script>\n<template>\n <div style=\"display: flex; gap: 16px;\">\n <Card v-for=\"item in items\" :key=\"item.id\" :title=\"item.title\" type=\"border\">\n <template #extra>\n <Button type=\"link\" size=\"mini\">详情</Button>\n </template>\n <p>{{ item.desc }}</p>\n </Card>\n </div>\n</template>",
265
+ "tags": [
266
+ "list",
267
+ "v-for",
268
+ "grid"
269
+ ],
270
+ "usedProps": [
271
+ "title",
272
+ "type"
273
+ ],
274
+ "usedEvents": [],
275
+ "usedSlots": [
276
+ "extra"
277
+ ],
278
+ "usedMethods": [],
279
+ "scenario": "展示多个卡片组成的列表"
280
+ }
281
+ ],
282
+ "commonMistakes": [
283
+ {
284
+ "id": "card_type_typo",
285
+ "description": "使用不存在的 type 值",
286
+ "wrongCode": "<Card type=\"bordered\">内容</Card>",
287
+ "correctCode": "<Card type=\"border\">内容</Card>",
288
+ "explanation": "Card 的 type 只支持 shadow, border, none,注意 border 不是 bordered",
289
+ "relatedProps": [
290
+ "type"
291
+ ]
292
+ },
293
+ {
294
+ "id": "card_column_width_no_unit",
295
+ "description": "CardColumn width 未带单位",
296
+ "wrongCode": "<CardColumn width=\"100\">内容</CardColumn>",
297
+ "correctCode": "<CardColumn width=\"100px\">内容</CardColumn>",
298
+ "explanation": "CardColumn 的 width 必须带单位,如 px、em、%",
299
+ "relatedProps": [
300
+ "width"
301
+ ]
302
+ },
303
+ {
304
+ "id": "card_size_typo",
305
+ "description": "使用不存在的 size 值 (Card)",
306
+ "wrongCode": "<Card size=\"large\">内容</Card>",
307
+ "correctCode": "<Card size=\"default\">内容</Card>",
308
+ "explanation": "Card 的 size 只支持 default, small, mini。Card 组件目前不支持 large 尺寸。",
309
+ "relatedProps": [
310
+ "size"
311
+ ]
312
+ }
313
+ ],
314
+ "searchKeywords": [
315
+ "卡片",
316
+ "card",
317
+ "容器",
318
+ "面板",
319
+ "panel",
320
+ "内容区"
321
+ ],
322
+ "useCases": [
323
+ "信息展示卡片",
324
+ "用户信息卡片",
325
+ "商品卡片",
326
+ "统计数据卡片",
327
+ "设置面板",
328
+ "内容分组展示"
329
+ ],
330
+ "relatedComponents": [
331
+ "CardColumn",
332
+ "Collapse"
333
+ ]
334
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "id": "cardcontent",
3
+ "name": "CardContent",
4
+ "displayName": "卡片内容容器",
5
+ "category": "layout",
6
+ "description": "LayoutContent 内部使用的卡片容器,通常用于包裹具体业务内容。",
7
+ "importStatement": "import { CardContent } from '@ksyun-internal/versatile';",
8
+ "props": [
9
+ {
10
+ "name": "title",
11
+ "description": "卡片标题",
12
+ "type": {
13
+ "raw": "string | VNode",
14
+ "kind": "union"
15
+ },
16
+ "required": false,
17
+ "default": "\"\""
18
+ },
19
+ {
20
+ "name": "type",
21
+ "description": "卡片类型",
22
+ "type": {
23
+ "raw": "\"shadow\" | \"border\" | \"none\"",
24
+ "kind": "union"
25
+ },
26
+ "required": false,
27
+ "default": "\"none\"",
28
+ "allowedValues": [
29
+ {
30
+ "value": "shadow",
31
+ "label": "阴影样式"
32
+ },
33
+ {
34
+ "value": "border",
35
+ "label": "边框样式"
36
+ },
37
+ {
38
+ "value": "none",
39
+ "label": "无样式",
40
+ "isDefault": true
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "size",
46
+ "description": "卡片尺寸",
47
+ "type": {
48
+ "raw": "\"default\" | \"small\" | \"mini\"",
49
+ "kind": "union"
50
+ },
51
+ "required": false,
52
+ "default": "\"default\"",
53
+ "allowedValues": [
54
+ {
55
+ "value": "default",
56
+ "label": "默认尺寸",
57
+ "isDefault": true
58
+ },
59
+ {
60
+ "value": "small",
61
+ "label": "小尺寸"
62
+ },
63
+ {
64
+ "value": "mini",
65
+ "label": "迷你尺寸"
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "name": "scroll",
71
+ "description": "是否支持滚动条",
72
+ "type": {
73
+ "raw": "boolean",
74
+ "kind": "boolean"
75
+ },
76
+ "required": false,
77
+ "default": "false"
78
+ },
79
+ {
80
+ "name": "halfRadius",
81
+ "description": "卡片顶部是否支持平角,默认支持圆角样式",
82
+ "type": {
83
+ "raw": "boolean",
84
+ "kind": "boolean"
85
+ },
86
+ "required": false,
87
+ "default": "false"
88
+ },
89
+ {
90
+ "name": "loading",
91
+ "description": "是否为加载中状态",
92
+ "type": {
93
+ "raw": "boolean",
94
+ "kind": "boolean"
95
+ },
96
+ "required": false,
97
+ "default": "false"
98
+ }
99
+ ],
100
+ "slots": [
101
+ {
102
+ "name": "default",
103
+ "description": "默认内容区域",
104
+ "vueTemplate": "<CardContent>内容</CardContent>",
105
+ "usageExample": "<CardContent>...</CardContent>"
106
+ },
107
+ {
108
+ "name": "opLeft",
109
+ "description": "扩展卡片操作栏左侧内容",
110
+ "vueTemplate": "<template #opLeft>...</template>",
111
+ "usageExample": "<CardContent><template #opLeft><Button>操作</Button></template></CardContent>"
112
+ },
113
+ {
114
+ "name": "opRight",
115
+ "description": "扩展卡片操作栏右侧内容",
116
+ "vueTemplate": "<template #opRight>...</template>",
117
+ "usageExample": "<CardContent><template #opRight><Button>更多</Button></template></CardContent>"
118
+ },
119
+ {
120
+ "name": "prepend",
121
+ "description": "扩展卡片操作栏上面部分内容",
122
+ "vueTemplate": "<template #prepend>...</template>",
123
+ "usageExample": "<CardContent><template #prepend><Alert>提示信息</Alert></template></CardContent>"
124
+ },
125
+ {
126
+ "name": "extra",
127
+ "description": "扩展头部附加内容",
128
+ "vueTemplate": "<template #extra>...</template>",
129
+ "usageExample": "<CardContent title=\"标题\"><template #extra><Link>查看更多</Link></template></CardContent>"
130
+ }
131
+ ],
132
+ "events": [],
133
+ "methods": [],
134
+ "examples": [],
135
+ "searchKeywords": [
136
+ "card",
137
+ "panel",
138
+ "container",
139
+ "卡片"
140
+ ],
141
+ "useCases": [
142
+ "页面主体内容包裹"
143
+ ]
144
+ }