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,416 @@
1
+ {
2
+ "id": "tooltip",
3
+ "name": "Tooltip",
4
+ "displayName": "提示弹层",
5
+ "category": "feedback",
6
+ "description": "提示弹层组件,用于在鼠标悬停或点击时显示额外的提示信息。支持多种触发方式、位置、主题等配置。",
7
+ "importStatement": "import { Tooltip } from '@king-design/vue';",
8
+ "props": [
9
+ {
10
+ "name": "content",
11
+ "description": "提示的内容",
12
+ "type": {
13
+ "raw": "string | VNode",
14
+ "kind": "union"
15
+ },
16
+ "required": false,
17
+ "default": "undefined",
18
+ "usageExample": "<Tooltip content=\"提示内容\">"
19
+ },
20
+ {
21
+ "name": "trigger",
22
+ "description": "触发方式",
23
+ "type": {
24
+ "raw": "\"hover\" | \"click\" | \"focus\"",
25
+ "kind": "union",
26
+ "unionTypes": [
27
+ "hover",
28
+ "click",
29
+ "focus"
30
+ ]
31
+ },
32
+ "required": false,
33
+ "default": "\"hover\"",
34
+ "allowedValues": [
35
+ {
36
+ "value": "hover",
37
+ "label": "悬停触发",
38
+ "isDefault": true
39
+ },
40
+ {
41
+ "value": "click",
42
+ "label": "点击触发"
43
+ },
44
+ {
45
+ "value": "focus",
46
+ "label": "聚焦触发"
47
+ }
48
+ ],
49
+ "usageExample": "<Tooltip trigger=\"click\">"
50
+ },
51
+ {
52
+ "name": "value",
53
+ "description": "是否展示弹层,可用 v-model 双向绑定",
54
+ "type": {
55
+ "raw": "boolean",
56
+ "kind": "boolean"
57
+ },
58
+ "required": false,
59
+ "default": "false",
60
+ "usageExample": "<Tooltip v-model=\"visible\">"
61
+ },
62
+ {
63
+ "name": "disabled",
64
+ "description": "是否禁用提示",
65
+ "type": {
66
+ "raw": "boolean",
67
+ "kind": "boolean"
68
+ },
69
+ "required": false,
70
+ "default": "false",
71
+ "usageExample": "<Tooltip disabled>"
72
+ },
73
+ {
74
+ "name": "position",
75
+ "description": "弹层弹出的位置,默认在触发器正上方",
76
+ "type": {
77
+ "raw": "Position | \"left\" | \"bottom\" | \"right\" | \"top\"",
78
+ "kind": "union",
79
+ "unionTypes": [
80
+ "left",
81
+ "bottom",
82
+ "right",
83
+ "top"
84
+ ]
85
+ },
86
+ "required": false,
87
+ "default": "{my: 'center bottom-10', at: 'center top', collision: 'flipfit'}",
88
+ "allowedValues": [
89
+ {
90
+ "value": "top",
91
+ "label": "上方显示",
92
+ "isDefault": true
93
+ },
94
+ {
95
+ "value": "bottom",
96
+ "label": "下方显示"
97
+ },
98
+ {
99
+ "value": "left",
100
+ "label": "左侧显示"
101
+ },
102
+ {
103
+ "value": "right",
104
+ "label": "右侧显示"
105
+ }
106
+ ],
107
+ "usageExample": "<Tooltip position=\"bottom\">"
108
+ },
109
+ {
110
+ "name": "theme",
111
+ "description": "主题",
112
+ "type": {
113
+ "raw": "\"dark\" | \"light\"",
114
+ "kind": "union",
115
+ "unionTypes": [
116
+ "dark",
117
+ "light"
118
+ ]
119
+ },
120
+ "required": false,
121
+ "default": "\"dark\"",
122
+ "allowedValues": [
123
+ {
124
+ "value": "dark",
125
+ "label": "深色主题",
126
+ "isDefault": true
127
+ },
128
+ {
129
+ "value": "light",
130
+ "label": "浅色主题"
131
+ }
132
+ ],
133
+ "usageExample": "<Tooltip theme=\"light\">"
134
+ },
135
+ {
136
+ "name": "showArrow",
137
+ "description": "弹层是否展示箭头",
138
+ "type": {
139
+ "raw": "boolean",
140
+ "kind": "boolean"
141
+ },
142
+ "required": false,
143
+ "default": "true",
144
+ "usageExample": "<Tooltip :showArrow=\"false\">"
145
+ },
146
+ {
147
+ "name": "hoverable",
148
+ "description": "对于悬浮触发方式,提示弹层是否在鼠标悬浮时仍然展示",
149
+ "type": {
150
+ "raw": "boolean",
151
+ "kind": "boolean"
152
+ },
153
+ "required": false,
154
+ "default": "false",
155
+ "usageExample": "<Tooltip hoverable>"
156
+ },
157
+ {
158
+ "name": "always",
159
+ "description": "是否一直保持当前展示/隐藏状态",
160
+ "type": {
161
+ "raw": "boolean",
162
+ "kind": "boolean"
163
+ },
164
+ "required": false,
165
+ "default": "false",
166
+ "usageExample": "<Tooltip always>"
167
+ },
168
+ {
169
+ "name": "size",
170
+ "description": "弹层尺寸",
171
+ "type": {
172
+ "raw": "\"default\" | \"small\"",
173
+ "kind": "union",
174
+ "unionTypes": [
175
+ "default",
176
+ "small"
177
+ ]
178
+ },
179
+ "required": false,
180
+ "default": "\"default\"",
181
+ "allowedValues": [
182
+ {
183
+ "value": "default",
184
+ "label": "默认尺寸",
185
+ "isDefault": true
186
+ },
187
+ {
188
+ "value": "small",
189
+ "label": "小尺寸"
190
+ }
191
+ ],
192
+ "usageExample": "<Tooltip size=\"small\">"
193
+ },
194
+ {
195
+ "name": "of",
196
+ "description": "弹出菜单的位置是相对当前触发元素还是父元素",
197
+ "type": {
198
+ "raw": "\"self\" | \"parent\" | Event",
199
+ "kind": "union",
200
+ "unionTypes": [
201
+ "self",
202
+ "parent"
203
+ ]
204
+ },
205
+ "required": false,
206
+ "default": "\"self\"",
207
+ "usageExample": "<Tooltip of=\"parent\">"
208
+ },
209
+ {
210
+ "name": "container",
211
+ "description": "指定弹出菜单追加的位置",
212
+ "type": {
213
+ "raw": "string | ((parentDom: Element, anchor: Node | null) => Element)",
214
+ "kind": "union"
215
+ },
216
+ "required": false,
217
+ "default": "undefined",
218
+ "usageExample": "<Tooltip :container=\"() => document.body\">"
219
+ }
220
+ ],
221
+ "events": [
222
+ {
223
+ "name": "show",
224
+ "vueEventName": "@show",
225
+ "description": "弹层展示时触发",
226
+ "payload": [],
227
+ "usageExample": "<Tooltip @show=\"handleShow\">",
228
+ "handlerExample": "const handleShow = () => {\n console.log('Tooltip 已展示');\n};"
229
+ },
230
+ {
231
+ "name": "hide",
232
+ "vueEventName": "@hide",
233
+ "description": "弹层隐藏时触发",
234
+ "payload": [],
235
+ "usageExample": "<Tooltip @hide=\"handleHide\">",
236
+ "handlerExample": "const handleHide = () => {\n console.log('Tooltip 已隐藏');\n};"
237
+ }
238
+ ],
239
+ "slots": [
240
+ {
241
+ "name": "content",
242
+ "description": "自定义提示内容"
243
+ }
244
+ ],
245
+ "methods": [],
246
+ "typeDefinitions": [
247
+ {
248
+ "name": "Position",
249
+ "definition": "type Position = {\n my?: string | [string, string]\n at?: string | [string, string]\n collision?: Collision | [Collision, Collision]\n collisionDirection?: ['left'] | ['top'] | ['left', 'top']\n}",
250
+ "description": "弹层位置配置"
251
+ },
252
+ {
253
+ "name": "Collision",
254
+ "definition": "type Collision = 'fit' | 'flip' | 'flipfit' | 'none'",
255
+ "description": "碰撞检测行为"
256
+ }
257
+ ],
258
+ "examples": [
259
+ {
260
+ "id": "tooltip_basic",
261
+ "title": "基础用法",
262
+ "description": "基本的悬浮提示",
263
+ "difficulty": "easy",
264
+ "code": "<script setup lang=\"ts\">\nimport { Tooltip, Button } from '@king-design/vue';\n</script>\n<template>\n <Tooltip content=\"这是一个提示\">\n <Button>悬浮查看</Button>\n </Tooltip>\n</template>",
265
+ "tags": [
266
+ "basic",
267
+ "hover"
268
+ ],
269
+ "usedProps": [
270
+ "content"
271
+ ],
272
+ "usedEvents": [],
273
+ "usedMethods": [],
274
+ "scenario": "创建一个基本的悬浮提示"
275
+ },
276
+ {
277
+ "id": "tooltip_position",
278
+ "title": "不同位置",
279
+ "description": "在不同方向显示提示",
280
+ "difficulty": "easy",
281
+ "code": "<script setup lang=\"ts\">\nimport { Tooltip, Button } from '@king-design/vue';\n</script>\n<template>\n <Tooltip content=\"上方提示\" position=\"top\">\n <Button>上</Button>\n </Tooltip>\n <Tooltip content=\"下方提示\" position=\"bottom\">\n <Button>下</Button>\n </Tooltip>\n <Tooltip content=\"左侧提示\" position=\"left\">\n <Button>左</Button>\n </Tooltip>\n <Tooltip content=\"右侧提示\" position=\"right\">\n <Button>右</Button>\n </Tooltip>\n</template>",
282
+ "tags": [
283
+ "position",
284
+ "direction"
285
+ ],
286
+ "usedProps": [
287
+ "content",
288
+ "position"
289
+ ],
290
+ "usedEvents": [],
291
+ "usedMethods": [],
292
+ "scenario": "设置提示显示的位置"
293
+ },
294
+ {
295
+ "id": "tooltip_theme",
296
+ "title": "主题切换",
297
+ "description": "深色和浅色主题",
298
+ "difficulty": "easy",
299
+ "code": "<script setup lang=\"ts\">\nimport { Tooltip, Button } from '@king-design/vue';\n</script>\n<template>\n <Tooltip content=\"深色主题\" theme=\"dark\">\n <Button>深色</Button>\n </Tooltip>\n <Tooltip content=\"浅色主题\" theme=\"light\">\n <Button>浅色</Button>\n </Tooltip>\n</template>",
300
+ "tags": [
301
+ "theme",
302
+ "dark",
303
+ "light"
304
+ ],
305
+ "usedProps": [
306
+ "content",
307
+ "theme"
308
+ ],
309
+ "usedEvents": [],
310
+ "usedMethods": [],
311
+ "scenario": "使用不同主题的提示"
312
+ },
313
+ {
314
+ "id": "tooltip_trigger",
315
+ "title": "触发方式",
316
+ "description": "不同的触发方式",
317
+ "difficulty": "easy",
318
+ "code": "<script setup lang=\"ts\">\nimport { Tooltip, Button, Input } from '@king-design/vue';\n</script>\n<template>\n <Tooltip content=\"悬浮触发\" trigger=\"hover\">\n <Button>悬浮</Button>\n </Tooltip>\n <Tooltip content=\"点击触发\" trigger=\"click\">\n <Button>点击</Button>\n </Tooltip>\n <Tooltip content=\"聚焦触发\" trigger=\"focus\">\n <Input placeholder=\"聚焦查看\" />\n </Tooltip>\n</template>",
319
+ "tags": [
320
+ "trigger",
321
+ "click",
322
+ "focus"
323
+ ],
324
+ "usedProps": [
325
+ "content",
326
+ "trigger"
327
+ ],
328
+ "usedEvents": [],
329
+ "usedMethods": [],
330
+ "scenario": "使用不同的触发方式"
331
+ },
332
+ {
333
+ "id": "tooltip_hoverable",
334
+ "title": "可交互内容",
335
+ "description": "提示内容可悬浮交互",
336
+ "difficulty": "medium",
337
+ "code": "<script setup lang=\"ts\">\nimport { Tooltip, Button } from '@king-design/vue';\n</script>\n<template>\n <Tooltip hoverable>\n <Button>悬浮查看</Button>\n <template #content>\n <a href=\"#\">可点击的链接</a>\n </template>\n </Tooltip>\n</template>",
338
+ "tags": [
339
+ "hoverable",
340
+ "interactive"
341
+ ],
342
+ "usedProps": [
343
+ "hoverable"
344
+ ],
345
+ "usedEvents": [],
346
+ "usedMethods": [],
347
+ "scenario": "提示内容中包含可交互元素"
348
+ },
349
+ {
350
+ "id": "tooltip_icon",
351
+ "title": "图标提示",
352
+ "description": "图标配合提示",
353
+ "difficulty": "easy",
354
+ "code": "<script setup lang=\"ts\">\nimport { Tooltip, Icon } from '@king-design/vue';\n</script>\n<template>\n <span>价格 <Tooltip content=\"含税价格\"><Icon class=\"k-icon-question\" /></Tooltip></span>\n</template>",
355
+ "tags": [
356
+ "icon",
357
+ "help"
358
+ ],
359
+ "usedProps": [
360
+ "content"
361
+ ],
362
+ "usedEvents": [],
363
+ "usedMethods": [],
364
+ "scenario": "图标配合提示说明"
365
+ }
366
+ ],
367
+ "commonMistakes": [
368
+ {
369
+ "id": "tooltip_missing_trigger",
370
+ "description": "未提供触发元素",
371
+ "wrongCode": "<Tooltip content=\"提示\" />",
372
+ "correctCode": "<Tooltip content=\"提示\">\n <Button>触发器</Button>\n</Tooltip>",
373
+ "explanation": "Tooltip 需要包裹一个子元素作为触发器",
374
+ "relatedProps": []
375
+ },
376
+ {
377
+ "id": "tooltip_position_typo",
378
+ "description": "position 值拼写错误",
379
+ "wrongCode": "<Tooltip position=\"buttom\">",
380
+ "correctCode": "<Tooltip position=\"bottom\">",
381
+ "explanation": "position 只支持 top, bottom, left, right,注意拼写",
382
+ "relatedProps": [
383
+ "position"
384
+ ]
385
+ },
386
+ {
387
+ "id": "tooltip_hoverable_content",
388
+ "description": "使用 hoverable 但 content 不可交互",
389
+ "wrongCode": "<Tooltip hoverable content=\"纯文本\" /> <!-- hoverable 无意义 -->",
390
+ "correctCode": "<Tooltip hoverable>\n <Button>触发</Button>\n <template #content>\n <a href=\"#\">可点击链接</a>\n </template>\n</Tooltip>",
391
+ "explanation": "hoverable 通常用于提示内容中有可交互元素的场景",
392
+ "relatedProps": [
393
+ "hoverable"
394
+ ]
395
+ }
396
+ ],
397
+ "searchKeywords": [
398
+ "提示",
399
+ "tooltip",
400
+ "悬浮提示",
401
+ "气泡",
402
+ "帮助提示",
403
+ "hover"
404
+ ],
405
+ "useCases": [
406
+ "按钮功能说明",
407
+ "图标含义解释",
408
+ "表单字段提示",
409
+ "禁用原因说明",
410
+ "截断文本完整展示"
411
+ ],
412
+ "relatedComponents": [
413
+ "Popover",
414
+ "Ellipsis"
415
+ ]
416
+ }