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,447 @@
1
+ {
2
+ "id": "timepicker",
3
+ "name": "Timepicker",
4
+ "displayName": "时间选择",
5
+ "category": "form",
6
+ "description": "时间选择组件,用于选择时间。支持单选、多选、范围选择,支持设置时间步长、限制可选时间范围等功能。",
7
+ "importStatement": "import { Timepicker } from '@king-design/vue';",
8
+ "props": [
9
+ {
10
+ "name": "value",
11
+ "description": "当前选中的时间,可用 v-model 双向绑定。范围选择时为 [Value, Value]",
12
+ "type": {
13
+ "raw": "Value | Value[] | [Value, Value] | [Value, Value][]",
14
+ "kind": "union"
15
+ },
16
+ "required": false,
17
+ "default": "\"\"",
18
+ "usageExample": "<Timepicker v-model=\"time\" />"
19
+ },
20
+ {
21
+ "name": "range",
22
+ "description": "是否选择时间范围",
23
+ "type": {
24
+ "raw": "boolean",
25
+ "kind": "boolean"
26
+ },
27
+ "required": false,
28
+ "default": "false",
29
+ "usageExample": "<Timepicker range />"
30
+ },
31
+ {
32
+ "name": "multiple",
33
+ "description": "是否支持多选",
34
+ "type": {
35
+ "raw": "boolean",
36
+ "kind": "boolean"
37
+ },
38
+ "required": false,
39
+ "default": "false",
40
+ "usageExample": "<Timepicker multiple />"
41
+ },
42
+ {
43
+ "name": "disabled",
44
+ "description": "是否禁用",
45
+ "type": {
46
+ "raw": "boolean",
47
+ "kind": "boolean"
48
+ },
49
+ "required": false,
50
+ "default": "false",
51
+ "usageExample": "<Timepicker disabled />"
52
+ },
53
+ {
54
+ "name": "clearable",
55
+ "description": "是否可清空",
56
+ "type": {
57
+ "raw": "boolean",
58
+ "kind": "boolean"
59
+ },
60
+ "required": false,
61
+ "default": "false",
62
+ "usageExample": "<Timepicker clearable />"
63
+ },
64
+ {
65
+ "name": "size",
66
+ "description": "尺寸",
67
+ "type": {
68
+ "raw": "\"large\" | \"default\" | \"small\" | \"mini\"",
69
+ "kind": "union",
70
+ "unionTypes": [
71
+ "large",
72
+ "default",
73
+ "small",
74
+ "mini"
75
+ ]
76
+ },
77
+ "required": false,
78
+ "default": "\"default\"",
79
+ "allowedValues": [
80
+ {
81
+ "value": "large",
82
+ "label": "大尺寸"
83
+ },
84
+ {
85
+ "value": "default",
86
+ "label": "默认尺寸",
87
+ "isDefault": true
88
+ },
89
+ {
90
+ "value": "small",
91
+ "label": "小尺寸"
92
+ },
93
+ {
94
+ "value": "mini",
95
+ "label": "迷你尺寸"
96
+ }
97
+ ],
98
+ "usageExample": "<Timepicker size=\"small\" />"
99
+ },
100
+ {
101
+ "name": "placeholder",
102
+ "description": "占位文案",
103
+ "type": {
104
+ "raw": "string",
105
+ "kind": "string"
106
+ },
107
+ "required": false,
108
+ "default": "\"请选择时间\"",
109
+ "usageExample": "<Timepicker placeholder=\"选择开始时间\" />"
110
+ },
111
+ {
112
+ "name": "format",
113
+ "description": "时间格式化字符串",
114
+ "type": {
115
+ "raw": "string",
116
+ "kind": "string"
117
+ },
118
+ "required": false,
119
+ "default": "\"YYYY-MM-DD HH:mm:ss\"",
120
+ "usageExample": "<Timepicker format=\"HH:mm\" />"
121
+ },
122
+ {
123
+ "name": "valueFormat",
124
+ "description": "value 值的格式化字符串",
125
+ "type": {
126
+ "raw": "string",
127
+ "kind": "string"
128
+ },
129
+ "required": false,
130
+ "default": "undefined",
131
+ "usageExample": "<Timepicker valueFormat=\"HH:mm:ss\" />"
132
+ },
133
+ {
134
+ "name": "showFormat",
135
+ "description": "展示的格式化字符串",
136
+ "type": {
137
+ "raw": "string",
138
+ "kind": "string"
139
+ },
140
+ "required": false,
141
+ "default": "undefined",
142
+ "usageExample": "<Timepicker showFormat=\"HH时mm分\" />"
143
+ },
144
+ {
145
+ "name": "step",
146
+ "description": "固定时间点的步长,如 \"00:30\" 表示每 30 分钟一个选项",
147
+ "type": {
148
+ "raw": "string",
149
+ "kind": "string"
150
+ },
151
+ "required": false,
152
+ "default": "undefined",
153
+ "usageExample": "<Timepicker step=\"00:30\" />"
154
+ },
155
+ {
156
+ "name": "min",
157
+ "description": "最小可选时间",
158
+ "type": {
159
+ "raw": "Value",
160
+ "kind": "custom"
161
+ },
162
+ "required": false,
163
+ "default": "undefined",
164
+ "usageExample": "<Timepicker min=\"09:00:00\" />"
165
+ },
166
+ {
167
+ "name": "max",
168
+ "description": "最大可选时间",
169
+ "type": {
170
+ "raw": "Value",
171
+ "kind": "custom"
172
+ },
173
+ "required": false,
174
+ "default": "undefined",
175
+ "usageExample": "<Timepicker max=\"18:00:00\" />"
176
+ },
177
+ {
178
+ "name": "hideIcon",
179
+ "description": "是否隐藏后面的图标",
180
+ "type": {
181
+ "raw": "boolean",
182
+ "kind": "boolean"
183
+ },
184
+ "required": false,
185
+ "default": "false",
186
+ "usageExample": "<Timepicker hideIcon />"
187
+ },
188
+ {
189
+ "name": "fluid",
190
+ "description": "是否宽度 100%",
191
+ "type": {
192
+ "raw": "boolean",
193
+ "kind": "boolean"
194
+ },
195
+ "required": false,
196
+ "default": "false",
197
+ "usageExample": "<Timepicker fluid />"
198
+ },
199
+ {
200
+ "name": "inline",
201
+ "description": "是否展示内联模式",
202
+ "type": {
203
+ "raw": "boolean",
204
+ "kind": "boolean"
205
+ },
206
+ "required": false,
207
+ "default": "false",
208
+ "usageExample": "<Timepicker inline />"
209
+ },
210
+ {
211
+ "name": "flat",
212
+ "description": "是否展示扁平样式",
213
+ "type": {
214
+ "raw": "boolean",
215
+ "kind": "boolean"
216
+ },
217
+ "required": false,
218
+ "default": "false",
219
+ "usageExample": "<Timepicker flat />"
220
+ },
221
+ {
222
+ "name": "width",
223
+ "description": "指定宽度,自动添加单位 px",
224
+ "type": {
225
+ "raw": "number | string",
226
+ "kind": "union"
227
+ },
228
+ "required": false,
229
+ "default": "undefined",
230
+ "usageExample": "<Timepicker :width=\"150\" />"
231
+ }
232
+ ],
233
+ "events": [
234
+ {
235
+ "name": "show",
236
+ "vueEventName": "@show",
237
+ "description": "菜单弹出时触发",
238
+ "payload": [],
239
+ "usageExample": "<Timepicker @show=\"handleShow\" />",
240
+ "handlerExample": "const handleShow = () => {\n console.log('时间选择器已打开');\n};"
241
+ },
242
+ {
243
+ "name": "hide",
244
+ "vueEventName": "@hide",
245
+ "description": "菜单隐藏时触发",
246
+ "payload": [],
247
+ "usageExample": "<Timepicker @hide=\"handleHide\" />",
248
+ "handlerExample": "const handleHide = () => {\n console.log('时间选择器已关闭');\n};"
249
+ },
250
+ {
251
+ "name": "change",
252
+ "vueEventName": "@change",
253
+ "description": "用户操作完成且值变化时触发",
254
+ "payload": [
255
+ {
256
+ "name": "value",
257
+ "type": "string",
258
+ "description": "当前选择的时间值"
259
+ }
260
+ ],
261
+ "usageExample": "<Timepicker @change=\"handleChange\" />",
262
+ "handlerExample": "const handleChange = (value: string) => {\n console.log('选择的时间:', value);\n};"
263
+ },
264
+ {
265
+ "name": "selecting",
266
+ "vueEventName": "@selecting",
267
+ "description": "范围选择时,用户正在操作选择时触发",
268
+ "payload": [
269
+ {
270
+ "name": "value",
271
+ "type": "[Dayjs, Dayjs?]",
272
+ "description": "当前选择的值"
273
+ }
274
+ ],
275
+ "usageExample": "<Timepicker range @selecting=\"handleSelecting\" />",
276
+ "handlerExample": "const handleSelecting = (value) => {\n console.log('正在选择:', value);\n};"
277
+ }
278
+ ],
279
+ "methods": [],
280
+ "typeDefinitions": [
281
+ {
282
+ "name": "Value",
283
+ "definition": "type Value = string | Date | number | Dayjs",
284
+ "description": "时间值类型,支持字符串、Date 对象、时间戳或 Dayjs 对象"
285
+ }
286
+ ],
287
+ "examples": [
288
+ {
289
+ "id": "timepicker_basic",
290
+ "title": "基础用法",
291
+ "description": "基本的时间选择",
292
+ "difficulty": "easy",
293
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Timepicker } from '@king-design/vue';\n\nconst time = ref('');\n</script>\n<template>\n <Timepicker v-model=\"time\" />\n</template>",
294
+ "tags": [
295
+ "basic"
296
+ ],
297
+ "usedProps": [
298
+ "value"
299
+ ],
300
+ "usedEvents": [],
301
+ "usedMethods": [],
302
+ "scenario": "创建一个基本的时间选择器"
303
+ },
304
+ {
305
+ "id": "timepicker_range",
306
+ "title": "范围选择",
307
+ "description": "选择时间范围",
308
+ "difficulty": "medium",
309
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Timepicker } from '@king-design/vue';\n\nconst timeRange = ref<[string, string]>(['', '']);\n</script>\n<template>\n <Timepicker v-model=\"timeRange\" range />\n</template>",
310
+ "tags": [
311
+ "range"
312
+ ],
313
+ "usedProps": [
314
+ "value",
315
+ "range"
316
+ ],
317
+ "usedEvents": [],
318
+ "usedMethods": [],
319
+ "scenario": "选择开始时间和结束时间"
320
+ },
321
+ {
322
+ "id": "timepicker_step",
323
+ "title": "时间步长",
324
+ "description": "设置固定时间步长",
325
+ "difficulty": "easy",
326
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Timepicker } from '@king-design/vue';\n\nconst time = ref('');\n</script>\n<template>\n <!-- 每 30 分钟一个选项 -->\n <Timepicker v-model=\"time\" step=\"00:30\" />\n</template>",
327
+ "tags": [
328
+ "step",
329
+ "interval"
330
+ ],
331
+ "usedProps": [
332
+ "value",
333
+ "step"
334
+ ],
335
+ "usedEvents": [],
336
+ "usedMethods": [],
337
+ "scenario": "设置固定的时间间隔"
338
+ },
339
+ {
340
+ "id": "timepicker_min_max",
341
+ "title": "限制时间范围",
342
+ "description": "限制可选时间的最小和最大值",
343
+ "difficulty": "easy",
344
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Timepicker } from '@king-design/vue';\n\nconst time = ref('');\n</script>\n<template>\n <Timepicker v-model=\"time\" min=\"09:00:00\" max=\"18:00:00\" />\n</template>",
345
+ "tags": [
346
+ "min",
347
+ "max",
348
+ "limit"
349
+ ],
350
+ "usedProps": [
351
+ "value",
352
+ "min",
353
+ "max"
354
+ ],
355
+ "usedEvents": [],
356
+ "usedMethods": [],
357
+ "scenario": "限制工作时间范围"
358
+ },
359
+ {
360
+ "id": "timepicker_clearable",
361
+ "title": "可清空",
362
+ "description": "可清空的时间选择器",
363
+ "difficulty": "easy",
364
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Timepicker } from '@king-design/vue';\n\nconst time = ref('12:00:00');\n</script>\n<template>\n <Timepicker v-model=\"time\" clearable />\n</template>",
365
+ "tags": [
366
+ "clearable"
367
+ ],
368
+ "usedProps": [
369
+ "value",
370
+ "clearable"
371
+ ],
372
+ "usedEvents": [],
373
+ "usedMethods": [],
374
+ "scenario": "允许清空已选时间"
375
+ },
376
+ {
377
+ "id": "timepicker_format",
378
+ "title": "自定义格式",
379
+ "description": "自定义时间显示格式",
380
+ "difficulty": "easy",
381
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Timepicker } from '@king-design/vue';\n\nconst time = ref('');\n</script>\n<template>\n <Timepicker v-model=\"time\" showFormat=\"HH时mm分\" />\n</template>",
382
+ "tags": [
383
+ "format",
384
+ "custom"
385
+ ],
386
+ "usedProps": [
387
+ "value",
388
+ "showFormat"
389
+ ],
390
+ "usedEvents": [],
391
+ "usedMethods": [],
392
+ "scenario": "自定义时间的显示格式"
393
+ }
394
+ ],
395
+ "commonMistakes": [
396
+ {
397
+ "id": "timepicker_range_value_type",
398
+ "description": "范围选择时 value 类型错误",
399
+ "wrongCode": "const time = ref('');\n<Timepicker v-model=\"time\" range />",
400
+ "correctCode": "const timeRange = ref<[string, string]>(['', '']);\n<Timepicker v-model=\"timeRange\" range />",
401
+ "explanation": "当 range 为 true 时,value 必须是 [string, string] 数组",
402
+ "relatedProps": [
403
+ "value",
404
+ "range"
405
+ ]
406
+ },
407
+ {
408
+ "id": "timepicker_step_format",
409
+ "description": "step 格式错误",
410
+ "wrongCode": "<Timepicker step=\"30\" /> <!-- 期望 30 分钟 -->",
411
+ "correctCode": "<Timepicker step=\"00:30\" />",
412
+ "explanation": "step 应使用时间格式字符串,如 \"00:30\" 表示 30 分钟",
413
+ "relatedProps": [
414
+ "step"
415
+ ]
416
+ },
417
+ {
418
+ "id": "timepicker_min_max_format",
419
+ "description": "min/max 格式与 format 不匹配",
420
+ "wrongCode": "<Timepicker min=\"9:00\" max=\"18:00\" /> <!-- 缺少秒 -->",
421
+ "correctCode": "<Timepicker min=\"09:00:00\" max=\"18:00:00\" />",
422
+ "explanation": "min/max 应使用完整的时间格式",
423
+ "relatedProps": [
424
+ "min",
425
+ "max"
426
+ ]
427
+ }
428
+ ],
429
+ "searchKeywords": [
430
+ "时间",
431
+ "timepicker",
432
+ "时间选择",
433
+ "time",
434
+ "时分秒",
435
+ "时间范围"
436
+ ],
437
+ "useCases": [
438
+ "表单时间输入",
439
+ "预约时间选择",
440
+ "工作时间设置",
441
+ "营业时间配置",
442
+ "定时任务设置"
443
+ ],
444
+ "relatedComponents": [
445
+ "Datepicker"
446
+ ]
447
+ }