king-design-analyzer 2.1.7 → 2.2.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 (311) hide show
  1. package/components/actions.json +101 -0
  2. package/components/advancedset.json +127 -0
  3. package/components/affix.json +7 -0
  4. package/components/aksk.json +172 -0
  5. package/components/az.json +15 -2
  6. package/components/badge.json +7 -0
  7. package/components/billtypes.json +14 -2
  8. package/components/breadcrumb.json +7 -0
  9. package/components/button.json +191 -0
  10. package/components/buttonlink.json +73 -0
  11. package/components/card.json +8 -1
  12. package/components/cardcol.json +142 -0
  13. package/components/cardcols.json +121 -0
  14. package/components/cardcontent.json +15 -3
  15. package/components/cardtabs.json +172 -0
  16. package/components/carousel.json +7 -0
  17. package/components/cascader.json +520 -368
  18. package/components/checkbox.json +51 -4
  19. package/components/cidrinput.json +140 -0
  20. package/components/code.json +8 -1
  21. package/components/collapse.json +7 -0
  22. package/components/colorpicker.json +217 -0
  23. package/components/copy.json +7 -0
  24. package/components/copyhover.json +111 -0
  25. package/components/copyrow.json +124 -0
  26. package/components/datepicker.json +656 -524
  27. package/components/description.json +98 -0
  28. package/components/dialog.json +522 -455
  29. package/components/divider.json +8 -1
  30. package/components/drawer.json +571 -558
  31. package/components/dropdown.json +464 -384
  32. package/components/duration.json +125 -0
  33. package/components/editable.json +66 -0
  34. package/components/ellipsis.json +34 -1
  35. package/components/filtertablefieldsdialog.json +128 -0
  36. package/components/flex.json +151 -0
  37. package/components/form.json +131 -0
  38. package/components/formiteminput.json +214 -0
  39. package/components/formitemspinner.json +213 -0
  40. package/components/formitemswitch.json +185 -0
  41. package/components/formitemtableconfigs.json +210 -0
  42. package/components/grid.json +7 -0
  43. package/components/header.json +161 -0
  44. package/components/icon.json +13 -1
  45. package/components/icontooltip.json +19 -1
  46. package/components/input.json +188 -4
  47. package/components/instancelist.json +194 -0
  48. package/components/instancenum.json +196 -0
  49. package/components/ipinput.json +117 -0
  50. package/components/kspstatus.json +205 -0
  51. package/components/kvcode.json +120 -0
  52. package/components/layoutcontent.json +15 -3
  53. package/components/layoutlistcontent.json +148 -0
  54. package/components/layoutpermissioncontent.json +155 -0
  55. package/components/layoutstandardlist.json +275 -0
  56. package/components/layouttabs.json +168 -0
  57. package/components/lazymount.json +86 -0
  58. package/components/lazyteleport.json +118 -0
  59. package/components/menu.json +7 -0
  60. package/components/pagination.json +12 -0
  61. package/components/paginationplus.json +30 -3
  62. package/components/password.json +121 -0
  63. package/components/popover.json +457 -437
  64. package/components/projects.json +129 -0
  65. package/components/protable.json +97 -8
  66. package/components/queuevisualrange.json +110 -0
  67. package/components/radio.json +82 -2
  68. package/components/rate.json +199 -0
  69. package/components/region.json +14 -2
  70. package/components/search.json +221 -0
  71. package/components/searchinput.json +132 -0
  72. package/components/searchitems.json +215 -0
  73. package/components/searchselect.json +195 -0
  74. package/components/select.json +686 -666
  75. package/components/sidebar.json +198 -0
  76. package/components/skeleton.json +233 -0
  77. package/components/spin.json +8 -1
  78. package/components/split.json +260 -0
  79. package/components/sshkeys.json +138 -0
  80. package/components/status.json +60 -3
  81. package/components/steps.json +7 -0
  82. package/components/switch.json +8 -1
  83. package/components/table.json +18 -1
  84. package/components/tablecolumnid.json +14 -2
  85. package/components/tabs.json +12 -0
  86. package/components/timeline.json +213 -0
  87. package/components/timepicker.json +147 -3
  88. package/components/timerange.json +262 -0
  89. package/components/tip.json +7 -0
  90. package/components/tooltip.json +484 -395
  91. package/components/tour.json +418 -372
  92. package/components/transfer.json +27 -3
  93. package/components/tree.json +6 -4
  94. package/components/treeselect.json +556 -475
  95. package/components/upload.json +474 -473
  96. package/components/vdialog.json +308 -0
  97. package/components/vdrawer.json +331 -0
  98. package/components/virtuallist.json +7 -0
  99. package/dist/ast/index.d.mts +35 -1
  100. package/dist/ast/index.d.ts +35 -1
  101. package/dist/ast/index.js +5 -3
  102. package/dist/ast/index.mjs +3 -1
  103. package/dist/{chunk-DSWKLUIX.mjs → chunk-3LYQ5XFM.mjs} +1 -1
  104. package/dist/chunk-BI5TIQID.mjs +330 -0
  105. package/dist/{chunk-6QS5IGS6.js → chunk-CJGGFVQJ.js} +8 -8
  106. package/dist/chunk-CR3GC4H3.js +353 -0
  107. package/dist/{chunk-NZ6TLWMD.mjs → chunk-D2SXGGTX.mjs} +28 -17
  108. package/dist/{chunk-D3Y6FGWA.js → chunk-EYKZY2F3.js} +29 -18
  109. package/dist/chunk-JSBRDJBE.js +30 -0
  110. package/dist/chunk-KF5YBEM5.js +143 -0
  111. package/dist/chunk-KMIDURUR.mjs +33324 -0
  112. package/dist/chunk-QC6VTSA3.mjs +117 -0
  113. package/dist/chunk-SZYVGYKK.js +33350 -0
  114. package/dist/{chunk-WYSRJVX4.js → chunk-TA3SV4SP.js} +2 -2
  115. package/dist/chunk-UJCSKKID.mjs +27 -0
  116. package/dist/{chunk-FVSQ6BU6.mjs → chunk-XGPHQHLR.mjs} +4 -4
  117. package/dist/docs/index.js +1 -1
  118. package/dist/docs/index.mjs +1 -1
  119. package/dist/full/index.js +8 -6
  120. package/dist/full/index.mjs +6 -4
  121. package/dist/index.d.mts +1 -0
  122. package/dist/index.d.ts +1 -0
  123. package/dist/index.js +15 -13
  124. package/dist/index.mjs +7 -5
  125. package/dist/metadata/index.d.mts +22 -2
  126. package/dist/metadata/index.d.ts +22 -2
  127. package/dist/metadata/index.js +27 -17
  128. package/dist/metadata/index.mjs +27 -16
  129. package/dist/resolve-BsLBxlBi.d.mts +24 -0
  130. package/dist/resolve-BsLBxlBi.d.ts +24 -0
  131. package/dist/runtime/index.js +5 -4
  132. package/dist/runtime/index.mjs +3 -2
  133. package/dist/shared/index.d.mts +10 -0
  134. package/dist/shared/index.d.ts +10 -0
  135. package/dist/shared/index.js +23 -0
  136. package/dist/shared/index.mjs +2 -0
  137. package/dist/static/index.js +6 -5
  138. package/dist/static/index.mjs +3 -2
  139. package/docs_for_llm/actions.doc.md +77 -0
  140. package/docs_for_llm/advancedset.doc.md +89 -0
  141. package/docs_for_llm/affix.doc.md +15 -7
  142. package/docs_for_llm/aksk.doc.md +111 -0
  143. package/docs_for_llm/az.doc.md +17 -11
  144. package/docs_for_llm/badge.doc.md +6 -5
  145. package/docs_for_llm/billtypes.doc.md +17 -11
  146. package/docs_for_llm/breadcrumb.doc.md +6 -3
  147. package/docs_for_llm/button.doc.md +34 -18
  148. package/docs_for_llm/buttonlink.doc.md +55 -0
  149. package/docs_for_llm/card.doc.md +8 -5
  150. package/docs_for_llm/cardcol.doc.md +78 -0
  151. package/docs_for_llm/cardcols.doc.md +84 -0
  152. package/docs_for_llm/cardcontent.doc.md +10 -10
  153. package/docs_for_llm/cardtabs.doc.md +106 -0
  154. package/docs_for_llm/carousel.doc.md +8 -7
  155. package/docs_for_llm/cascader.doc.md +46 -25
  156. package/docs_for_llm/checkbox.doc.md +25 -13
  157. package/docs_for_llm/cidrinput.doc.md +83 -0
  158. package/docs_for_llm/code.doc.md +22 -11
  159. package/docs_for_llm/collapse.doc.md +9 -6
  160. package/docs_for_llm/colorpicker.doc.md +104 -0
  161. package/docs_for_llm/copy.doc.md +15 -13
  162. package/docs_for_llm/copyhover.doc.md +59 -0
  163. package/docs_for_llm/copyrow.doc.md +71 -0
  164. package/docs_for_llm/datepicker.doc.md +51 -39
  165. package/docs_for_llm/description.doc.md +75 -0
  166. package/docs_for_llm/descriptions.doc.md +9 -6
  167. package/docs_for_llm/dialog.doc.md +48 -77
  168. package/docs_for_llm/divider.doc.md +9 -7
  169. package/docs_for_llm/drawer.doc.md +43 -84
  170. package/docs_for_llm/dropdown.doc.md +52 -21
  171. package/docs_for_llm/duration.doc.md +76 -0
  172. package/docs_for_llm/editable.doc.md +36 -14
  173. package/docs_for_llm/ellipsis.doc.md +10 -5
  174. package/docs_for_llm/filtertablefieldsdialog.doc.md +99 -0
  175. package/docs_for_llm/flex.doc.md +74 -0
  176. package/docs_for_llm/form.doc.md +33 -14
  177. package/docs_for_llm/formiteminput.doc.md +128 -0
  178. package/docs_for_llm/formitemspinner.doc.md +105 -0
  179. package/docs_for_llm/formitemswitch.doc.md +113 -0
  180. package/docs_for_llm/formitemtableconfigs.doc.md +95 -0
  181. package/docs_for_llm/grid.doc.md +7 -5
  182. package/docs_for_llm/header.doc.md +85 -0
  183. package/docs_for_llm/icon.doc.md +12 -8
  184. package/docs_for_llm/icontooltip.doc.md +121 -0
  185. package/docs_for_llm/input.doc.md +90 -39
  186. package/docs_for_llm/instancelist.doc.md +113 -0
  187. package/docs_for_llm/instancenum.doc.md +95 -0
  188. package/docs_for_llm/ipinput.doc.md +77 -0
  189. package/docs_for_llm/kspstatus.doc.md +82 -0
  190. package/docs_for_llm/kvcode.doc.md +76 -0
  191. package/docs_for_llm/layoutcontent.doc.md +17 -17
  192. package/docs_for_llm/layoutlistcontent.doc.md +95 -0
  193. package/docs_for_llm/layoutpermissioncontent.doc.md +84 -0
  194. package/docs_for_llm/layoutstandardlist.doc.md +120 -0
  195. package/docs_for_llm/layouttabs.doc.md +101 -0
  196. package/docs_for_llm/lazymount.doc.md +73 -0
  197. package/docs_for_llm/lazyteleport.doc.md +76 -0
  198. package/docs_for_llm/menu.doc.md +14 -11
  199. package/docs_for_llm/message.doc.md +48 -10
  200. package/docs_for_llm/pagination.doc.md +30 -17
  201. package/docs_for_llm/paginationplus.doc.md +31 -10
  202. package/docs_for_llm/password.doc.md +86 -0
  203. package/docs_for_llm/popover.doc.md +24 -55
  204. package/docs_for_llm/progress.doc.md +13 -10
  205. package/docs_for_llm/projects.doc.md +91 -0
  206. package/docs_for_llm/protable.doc.md +89 -15
  207. package/docs_for_llm/queuevisualrange.doc.md +78 -0
  208. package/docs_for_llm/radio.doc.md +23 -8
  209. package/docs_for_llm/rate.doc.md +122 -0
  210. package/docs_for_llm/region.doc.md +25 -13
  211. package/docs_for_llm/search.doc.md +120 -0
  212. package/docs_for_llm/searchinput.doc.md +111 -0
  213. package/docs_for_llm/searchitems.doc.md +116 -0
  214. package/docs_for_llm/searchselect.doc.md +126 -0
  215. package/docs_for_llm/select.doc.md +40 -55
  216. package/docs_for_llm/sidebar.doc.md +133 -0
  217. package/docs_for_llm/skeleton.doc.md +117 -0
  218. package/docs_for_llm/slider.doc.md +31 -21
  219. package/docs_for_llm/spin.doc.md +8 -5
  220. package/docs_for_llm/spinner.doc.md +28 -18
  221. package/docs_for_llm/split.doc.md +157 -0
  222. package/docs_for_llm/sshkeys.doc.md +88 -0
  223. package/docs_for_llm/status.doc.md +14 -9
  224. package/docs_for_llm/steps.doc.md +10 -7
  225. package/docs_for_llm/switch.doc.md +17 -14
  226. package/docs_for_llm/table.doc.md +118 -51
  227. package/docs_for_llm/tablecolumnid.doc.md +36 -16
  228. package/docs_for_llm/tabs.doc.md +19 -10
  229. package/docs_for_llm/tag.doc.md +19 -10
  230. package/docs_for_llm/timeline.doc.md +109 -0
  231. package/docs_for_llm/timepicker.doc.md +57 -38
  232. package/docs_for_llm/timerange.doc.md +157 -0
  233. package/docs_for_llm/tip.doc.md +20 -11
  234. package/docs_for_llm/tooltip.doc.md +55 -29
  235. package/docs_for_llm/tour.doc.md +48 -29
  236. package/docs_for_llm/transfer.doc.md +40 -29
  237. package/docs_for_llm/tree.doc.md +65 -23
  238. package/docs_for_llm/treeselect.doc.md +37 -48
  239. package/docs_for_llm/upload.doc.md +56 -32
  240. package/docs_for_llm/useCRUD.doc.md +49 -0
  241. package/docs_for_llm/useCountdown.doc.md +43 -0
  242. package/docs_for_llm/useDetail.doc.md +48 -0
  243. package/docs_for_llm/useDialog.doc.md +46 -0
  244. package/docs_for_llm/useEntity.doc.md +45 -0
  245. package/docs_for_llm/useEventListener.doc.md +44 -0
  246. package/docs_for_llm/useFalseUntilTruthy.doc.md +41 -0
  247. package/docs_for_llm/useGetCopyAuthText.doc.md +35 -0
  248. package/docs_for_llm/useGetUserPermission.doc.md +43 -0
  249. package/docs_for_llm/useGroup.doc.md +48 -0
  250. package/docs_for_llm/useIdEntities.doc.md +48 -0
  251. package/docs_for_llm/useIdEntity.doc.md +103 -0
  252. package/docs_for_llm/useInterval.doc.md +43 -0
  253. package/docs_for_llm/useLayoutStandardList.doc.md +38 -0
  254. package/docs_for_llm/useMessage.doc.md +46 -0
  255. package/docs_for_llm/useModifyCache.doc.md +37 -0
  256. package/docs_for_llm/useOpenDialog.doc.md +41 -0
  257. package/docs_for_llm/usePagination.doc.md +60 -0
  258. package/docs_for_llm/usePersist.doc.md +54 -0
  259. package/docs_for_llm/usePoll.doc.md +41 -0
  260. package/docs_for_llm/useRoutePlus.doc.md +34 -0
  261. package/docs_for_llm/useRouterPlus.doc.md +34 -0
  262. package/docs_for_llm/useSearch.doc.md +68 -0
  263. package/docs_for_llm/useShell.doc.md +43 -0
  264. package/docs_for_llm/useSkip.doc.md +41 -0
  265. package/docs_for_llm/useStorageIdEntity.doc.md +46 -0
  266. package/docs_for_llm/useStore.doc.md +34 -0
  267. package/docs_for_llm/useTable.doc.md +57 -0
  268. package/docs_for_llm/useTableGroup.doc.md +47 -0
  269. package/docs_for_llm/useTableSort.doc.md +40 -0
  270. package/docs_for_llm/useToState.doc.md +112 -0
  271. package/docs_for_llm/useUser.doc.md +38 -0
  272. package/docs_for_llm/useValidForm.doc.md +41 -0
  273. package/docs_for_llm/vdialog.doc.md +129 -0
  274. package/docs_for_llm/vdrawer.doc.md +119 -0
  275. package/docs_for_llm/virtuallist.doc.md +6 -3
  276. package/hooks/useCRUD.json +61 -0
  277. package/hooks/useCountdown.json +49 -0
  278. package/hooks/useDetail.json +67 -0
  279. package/hooks/useDialog.json +49 -0
  280. package/hooks/useEntity.json +61 -0
  281. package/hooks/useEventListener.json +61 -0
  282. package/hooks/useFalseUntilTruthy.json +43 -0
  283. package/hooks/useGetCopyAuthText.json +36 -0
  284. package/hooks/useGetUserPermission.json +55 -0
  285. package/hooks/useGroup.json +49 -0
  286. package/hooks/useIdEntities.json +61 -0
  287. package/hooks/useInterval.json +55 -0
  288. package/hooks/useLayoutStandardList.json +36 -0
  289. package/hooks/useMessage.json +73 -0
  290. package/hooks/useModifyCache.json +36 -0
  291. package/hooks/useOpenDialog.json +43 -0
  292. package/hooks/usePagination.json +49 -0
  293. package/hooks/usePersist.json +61 -0
  294. package/hooks/usePoll.json +43 -0
  295. package/hooks/useRoutePlus.json +36 -0
  296. package/hooks/useRouterPlus.json +36 -0
  297. package/hooks/useSearch.json +56 -0
  298. package/hooks/useShell.json +49 -0
  299. package/hooks/useSkip.json +43 -0
  300. package/hooks/useStorageIdEntity.json +67 -0
  301. package/hooks/useStore.json +36 -0
  302. package/hooks/useTable.json +49 -0
  303. package/hooks/useTableGroup.json +43 -0
  304. package/hooks/useTableSort.json +43 -0
  305. package/hooks/useUser.json +36 -0
  306. package/hooks/useValidForm.json +43 -0
  307. package/package.json +12 -6
  308. package/dist/chunk-HDV7ETXE.mjs +0 -1055
  309. package/dist/chunk-HPAUCD5I.js +0 -156
  310. package/dist/chunk-L4DS3EXI.mjs +0 -133
  311. package/dist/chunk-YWY3D4J7.js +0 -1082
@@ -0,0 +1,213 @@
1
+ {
2
+ "id": "timeline",
3
+ "name": "Timeline",
4
+ "displayName": "时间轴",
5
+ "category": "data",
6
+ "description": "时间轴组件,用于按时间顺序展示事件或流程记录。配合 TimelineItem 子组件使用,支持不同状态类型和自定义节点。",
7
+ "importStatement": "import { Timeline, TimelineItem } from '@king-design/vue';",
8
+ "props": [],
9
+ "events": [],
10
+ "slots": [
11
+ {
12
+ "name": "default",
13
+ "description": "时间轴内容,通常由多个 TimelineItem 组成。",
14
+ "vueTemplate": "<Timeline>...</Timeline>",
15
+ "usageExample": "<Timeline><TimelineItem>创建完成</TimelineItem><TimelineItem>审核通过</TimelineItem></Timeline>"
16
+ }
17
+ ],
18
+ "methods": [],
19
+ "subComponents": [
20
+ {
21
+ "name": "TimelineItem",
22
+ "description": "时间轴节点项。",
23
+ "props": [
24
+ {
25
+ "name": "type",
26
+ "description": "节点状态类型。",
27
+ "type": {
28
+ "raw": "\"primary\" | \"warning\" | \"danger\" | \"success\"",
29
+ "kind": "union",
30
+ "unionTypes": [
31
+ "primary",
32
+ "warning",
33
+ "danger",
34
+ "success"
35
+ ]
36
+ },
37
+ "required": false,
38
+ "default": "\"primary\"",
39
+ "allowedValues": [
40
+ {
41
+ "value": "primary",
42
+ "label": "默认状态",
43
+ "isDefault": true
44
+ },
45
+ {
46
+ "value": "warning",
47
+ "label": "警告状态"
48
+ },
49
+ {
50
+ "value": "danger",
51
+ "label": "错误状态"
52
+ },
53
+ {
54
+ "value": "success",
55
+ "label": "成功状态"
56
+ }
57
+ ],
58
+ "usageExample": "<TimelineItem type=\"success\">发布成功</TimelineItem>"
59
+ },
60
+ {
61
+ "name": "size",
62
+ "description": "节点尺寸。",
63
+ "type": {
64
+ "raw": "\"large\" | \"default\" | \"small\" | \"mini\"",
65
+ "kind": "union",
66
+ "unionTypes": [
67
+ "large",
68
+ "default",
69
+ "small",
70
+ "mini"
71
+ ]
72
+ },
73
+ "required": false,
74
+ "default": "\"default\"",
75
+ "allowedValues": [
76
+ {
77
+ "value": "large",
78
+ "label": "大尺寸"
79
+ },
80
+ {
81
+ "value": "default",
82
+ "label": "默认尺寸",
83
+ "isDefault": true
84
+ },
85
+ {
86
+ "value": "small",
87
+ "label": "小尺寸"
88
+ },
89
+ {
90
+ "value": "mini",
91
+ "label": "迷你尺寸"
92
+ }
93
+ ],
94
+ "usageExample": "<TimelineItem size=\"small\">日志记录</TimelineItem>"
95
+ }
96
+ ],
97
+ "slots": [
98
+ {
99
+ "name": "dot",
100
+ "description": "自定义时间轴节点圆点。",
101
+ "vueTemplate": "<template #dot>...</template>",
102
+ "usageExample": "<TimelineItem><template #dot><Icon class=\"k-icon-check\" /></template>发布完成</TimelineItem>"
103
+ }
104
+ ]
105
+ }
106
+ ],
107
+ "typeDefinitions": [
108
+ {
109
+ "name": "TimelineItemType",
110
+ "definition": "type TimelineItemType = 'primary' | 'warning' | 'danger' | 'success'",
111
+ "description": "TimelineItem 的状态类型"
112
+ }
113
+ ],
114
+ "examples": [
115
+ {
116
+ "id": "timeline_basic",
117
+ "title": "基础用法",
118
+ "description": "按时间顺序展示操作记录。",
119
+ "difficulty": "easy",
120
+ "code": "<template>\n <Timeline>\n <TimelineItem>2026-04-20 10:00 创建任务</TimelineItem>\n <TimelineItem>2026-04-20 10:10 分配负责人</TimelineItem>\n <TimelineItem type=\"success\">2026-04-20 10:30 处理完成</TimelineItem>\n </Timeline>\n</template>",
121
+ "tags": [
122
+ "basic",
123
+ "log"
124
+ ],
125
+ "usedProps": [
126
+ "type"
127
+ ],
128
+ "usedEvents": [],
129
+ "usedSlots": [
130
+ "default"
131
+ ],
132
+ "usedMethods": [],
133
+ "scenario": "展示任务处理过程"
134
+ },
135
+ {
136
+ "id": "timeline_status",
137
+ "title": "不同状态节点",
138
+ "description": "用颜色区分不同阶段。",
139
+ "difficulty": "easy",
140
+ "code": "<template>\n <Timeline>\n <TimelineItem type=\"primary\">等待执行</TimelineItem>\n <TimelineItem type=\"warning\">处理中</TimelineItem>\n <TimelineItem type=\"danger\">执行失败</TimelineItem>\n <TimelineItem type=\"success\">重新执行成功</TimelineItem>\n </Timeline>\n</template>",
141
+ "tags": [
142
+ "status",
143
+ "type"
144
+ ],
145
+ "usedProps": [
146
+ "type"
147
+ ],
148
+ "usedEvents": [],
149
+ "usedSlots": [
150
+ "default"
151
+ ],
152
+ "usedMethods": [],
153
+ "scenario": "用时间轴展示状态变更"
154
+ },
155
+ {
156
+ "id": "timeline_custom_dot",
157
+ "title": "自定义节点",
158
+ "description": "通过 dot 插槽渲染图标或编号。",
159
+ "difficulty": "medium",
160
+ "code": "<script setup lang=\"ts\">\nimport { Icon, Timeline, TimelineItem } from '@king-design/vue';\n</script>\n<template>\n <Timeline>\n <TimelineItem>\n <template #dot>\n <Icon class=\"k-icon-play-circle\" />\n </template>\n 服务启动\n </TimelineItem>\n <TimelineItem type=\"success\">\n <template #dot>\n <Icon class=\"k-icon-check\" />\n </template>\n 健康检查通过\n </TimelineItem>\n </Timeline>\n</template>",
161
+ "tags": [
162
+ "dot",
163
+ "icon"
164
+ ],
165
+ "usedProps": [
166
+ "type"
167
+ ],
168
+ "usedEvents": [],
169
+ "usedSlots": [
170
+ "dot"
171
+ ],
172
+ "usedMethods": [],
173
+ "scenario": "用图标增强时间轴状态表达"
174
+ }
175
+ ],
176
+ "commonMistakes": [
177
+ {
178
+ "id": "timeline_plain_children",
179
+ "description": "在 Timeline 中直接写普通 div,而不是 TimelineItem",
180
+ "wrongCode": "<Timeline><div>创建成功</div><div>发布完成</div></Timeline>",
181
+ "correctCode": "<Timeline><TimelineItem>创建成功</TimelineItem><TimelineItem>发布完成</TimelineItem></Timeline>",
182
+ "explanation": "Timeline 负责整体容器结构,具体节点应使用 TimelineItem 渲染,才能获得连线、圆点和状态样式。",
183
+ "relatedProps": []
184
+ },
185
+ {
186
+ "id": "timeline_dot_outside_item",
187
+ "description": "把 dot 插槽写在 Timeline 上",
188
+ "wrongCode": "<Timeline><template #dot>1</template></Timeline>",
189
+ "correctCode": "<Timeline><TimelineItem><template #dot>1</template>步骤一</TimelineItem></Timeline>",
190
+ "explanation": "dot 是 TimelineItem 的插槽,不属于 Timeline 容器本身。",
191
+ "relatedProps": []
192
+ }
193
+ ],
194
+ "searchKeywords": [
195
+ "timeline",
196
+ "时间轴",
197
+ "操作记录",
198
+ "流程日志",
199
+ "TimelineItem",
200
+ "dot"
201
+ ],
202
+ "useCases": [
203
+ "操作日志",
204
+ "订单轨迹",
205
+ "发布流程",
206
+ "任务执行记录"
207
+ ],
208
+ "relatedComponents": [
209
+ "Steps",
210
+ "Tag",
211
+ "Icon"
212
+ ]
213
+ }
@@ -39,6 +39,28 @@
39
39
  "default": "false",
40
40
  "usageExample": "<Timepicker multiple />"
41
41
  },
42
+ {
43
+ "name": "filterable",
44
+ "description": "是否支持筛选输入",
45
+ "type": {
46
+ "raw": "boolean",
47
+ "kind": "boolean"
48
+ },
49
+ "required": false,
50
+ "default": "false",
51
+ "usageExample": "<Timepicker filterable />"
52
+ },
53
+ {
54
+ "name": "loading",
55
+ "description": "数据加载状态",
56
+ "type": {
57
+ "raw": "boolean",
58
+ "kind": "boolean"
59
+ },
60
+ "required": false,
61
+ "default": "false",
62
+ "usageExample": "<Timepicker :loading=\"loading\" />"
63
+ },
42
64
  {
43
65
  "name": "disabled",
44
66
  "description": "是否禁用",
@@ -50,6 +72,17 @@
50
72
  "default": "false",
51
73
  "usageExample": "<Timepicker disabled />"
52
74
  },
75
+ {
76
+ "name": "name",
77
+ "description": "表单元素的 name 属性",
78
+ "type": {
79
+ "raw": "string",
80
+ "kind": "string"
81
+ },
82
+ "required": false,
83
+ "default": "undefined",
84
+ "usageExample": "<Timepicker name=\"startTime\" />"
85
+ },
53
86
  {
54
87
  "name": "clearable",
55
88
  "description": "是否可清空",
@@ -174,6 +207,18 @@
174
207
  "default": "undefined",
175
208
  "usageExample": "<Timepicker max=\"18:00:00\" />"
176
209
  },
210
+ {
211
+ "name": "disabledDate",
212
+ "description": "禁用日期的函数,返回 true 表示禁用该日期",
213
+ "type": {
214
+ "raw": "(v: Dayjs) => boolean",
215
+ "kind": "function",
216
+ "functionSignature": "(v: Dayjs) => boolean"
217
+ },
218
+ "required": false,
219
+ "default": "undefined",
220
+ "usageExample": "<Timepicker :disabledDate=\"(d) => d.day() === 0\" />"
221
+ },
177
222
  {
178
223
  "name": "hideIcon",
179
224
  "description": "是否隐藏后面的图标",
@@ -228,6 +273,78 @@
228
273
  "required": false,
229
274
  "default": "undefined",
230
275
  "usageExample": "<Timepicker :width=\"150\" />"
276
+ },
277
+ {
278
+ "name": "container",
279
+ "description": "指定弹出菜单追加的位置,默认 Dialog 组件会追加到 Dialog 中,其他追加到 body",
280
+ "type": {
281
+ "raw": "string | ((parentDom: Element, anchor: Node | null) => Element)",
282
+ "kind": "union"
283
+ },
284
+ "required": false,
285
+ "default": "undefined",
286
+ "usageExample": "<Timepicker :container=\"() => document.body\" />"
287
+ },
288
+ {
289
+ "name": "show",
290
+ "description": "是否展示菜单项(受控模式)",
291
+ "type": {
292
+ "raw": "boolean",
293
+ "kind": "boolean"
294
+ },
295
+ "required": false,
296
+ "default": "false",
297
+ "usageExample": "<Timepicker :show=\"visible\" />"
298
+ },
299
+ {
300
+ "name": "position",
301
+ "description": "菜单弹出的位置",
302
+ "type": {
303
+ "raw": "Position | \"left\" | \"bottom\" | \"right\" | \"top\"",
304
+ "kind": "union",
305
+ "unionTypes": [
306
+ "left",
307
+ "bottom",
308
+ "right",
309
+ "top"
310
+ ]
311
+ },
312
+ "required": false,
313
+ "default": "{my: 'left top+8', at: 'left bottom'}",
314
+ "usageExample": "<Timepicker position=\"top\" />"
315
+ },
316
+ {
317
+ "name": "nowrap",
318
+ "description": "选中值区域是否不换行展示,适合单行紧凑布局",
319
+ "type": {
320
+ "raw": "boolean",
321
+ "kind": "boolean"
322
+ },
323
+ "required": false,
324
+ "default": "false",
325
+ "usageExample": "<Timepicker nowrap />"
326
+ },
327
+ {
328
+ "name": "draggable",
329
+ "description": "多选值是否支持拖动排序",
330
+ "type": {
331
+ "raw": "boolean",
332
+ "kind": "boolean"
333
+ },
334
+ "required": false,
335
+ "default": "false",
336
+ "usageExample": "<Timepicker multiple draggable />"
337
+ },
338
+ {
339
+ "name": "virtual",
340
+ "description": "是否开启虚拟列表,用于大数据量场景",
341
+ "type": {
342
+ "raw": "boolean",
343
+ "kind": "boolean"
344
+ },
345
+ "required": false,
346
+ "default": "false",
347
+ "usageExample": "<Timepicker virtual />"
231
348
  }
232
349
  ],
233
350
  "events": [
@@ -270,13 +387,40 @@
270
387
  "name": "value",
271
388
  "type": "[Dayjs, Dayjs?]",
272
389
  "description": "当前选择的值"
390
+ },
391
+ {
392
+ "name": "confirmed",
393
+ "type": "boolean",
394
+ "description": "当前这次 selecting 是否已经进入确认完成态;常见交互过程中通常为 `false`。"
273
395
  }
274
396
  ],
275
397
  "usageExample": "<Timepicker range @selecting=\"handleSelecting\" />",
276
- "handlerExample": "const handleSelecting = (value) => {\n console.log('正在选择:', value);\n};"
398
+ "handlerExample": "const handleSelecting = (value, confirmed) => {\n console.log('正在选择:', value, confirmed);\n};"
399
+ }
400
+ ],
401
+ "methods": [
402
+ {
403
+ "name": "show",
404
+ "description": "主动展开时间选择面板。",
405
+ "params": [],
406
+ "returnType": "void",
407
+ "usageExample": "timepickerRef.value?.show();"
408
+ },
409
+ {
410
+ "name": "hide",
411
+ "description": "主动关闭时间选择面板。",
412
+ "params": [],
413
+ "returnType": "void",
414
+ "usageExample": "timepickerRef.value?.hide();"
415
+ },
416
+ {
417
+ "name": "position",
418
+ "description": "重新计算时间选择面板的位置。",
419
+ "params": [],
420
+ "returnType": "void",
421
+ "usageExample": "timepickerRef.value?.position();"
277
422
  }
278
423
  ],
279
- "methods": [],
280
424
  "typeDefinitions": [
281
425
  {
282
426
  "name": "Value",
@@ -444,4 +588,4 @@
444
588
  "relatedComponents": [
445
589
  "Datepicker"
446
590
  ]
447
- }
591
+ }
@@ -0,0 +1,262 @@
1
+ {
2
+ "id": "timerange",
3
+ "name": "TimeRange",
4
+ "displayName": "时间范围",
5
+ "category": "data",
6
+ "description": "面向报表、监控和日志场景的时间范围选择组件,支持快捷区间、自定义起止时间以及时间戳格式输出。",
7
+ "importStatement": "import { TimeRange } from '@ksyun-internal/versatile';",
8
+ "inherits": [
9
+ {
10
+ "component": "Datepicker",
11
+ "include": [
12
+ "props"
13
+ ],
14
+ "exclude": [
15
+ "value"
16
+ ]
17
+ }
18
+ ],
19
+ "props": [
20
+ {
21
+ "name": "modelValue",
22
+ "description": "当前选中的时间范围",
23
+ "type": {
24
+ "raw": "[number, number] | [string, string]",
25
+ "kind": "union"
26
+ },
27
+ "required": false,
28
+ "default": "undefined"
29
+ },
30
+ {
31
+ "name": "startTime",
32
+ "description": "当前时间范围的开始时间",
33
+ "type": {
34
+ "raw": "string | number",
35
+ "kind": "union"
36
+ },
37
+ "required": false,
38
+ "default": "undefined"
39
+ },
40
+ {
41
+ "name": "endTime",
42
+ "description": "当前时间范围的结束时间",
43
+ "type": {
44
+ "raw": "string | number",
45
+ "kind": "union"
46
+ },
47
+ "required": false,
48
+ "default": "undefined"
49
+ },
50
+ {
51
+ "name": "label",
52
+ "description": "组件标题文案",
53
+ "type": {
54
+ "raw": "string",
55
+ "kind": "string"
56
+ },
57
+ "required": false,
58
+ "default": "\"\""
59
+ },
60
+ {
61
+ "name": "times",
62
+ "description": "快捷时间范围配置,支持分钟数或 today / yesterday 等枚举",
63
+ "type": {
64
+ "raw": "(Time | number | 'today' | 'yesterday')[]",
65
+ "kind": "array"
66
+ },
67
+ "required": false,
68
+ "default": "undefined"
69
+ },
70
+ {
71
+ "name": "defaultValue",
72
+ "description": "首次渲染时使用的默认快捷值",
73
+ "type": {
74
+ "raw": "number | 'today' | 'yesterday'",
75
+ "kind": "union"
76
+ },
77
+ "required": false,
78
+ "default": "undefined"
79
+ },
80
+ {
81
+ "name": "timestamp",
82
+ "description": "是否以时间戳格式返回值",
83
+ "type": {
84
+ "raw": "boolean",
85
+ "kind": "boolean"
86
+ },
87
+ "required": false,
88
+ "default": "false"
89
+ },
90
+ {
91
+ "name": "container",
92
+ "description": "弹出层挂载容器",
93
+ "type": {
94
+ "raw": "Container",
95
+ "kind": "custom"
96
+ },
97
+ "required": false,
98
+ "default": "undefined"
99
+ },
100
+ {
101
+ "name": "format",
102
+ "description": "日期格式化字符串",
103
+ "type": {
104
+ "raw": "string",
105
+ "kind": "string"
106
+ },
107
+ "required": false,
108
+ "default": "\"YYYY-MM-DD HH:mm:ss\""
109
+ }
110
+ ],
111
+ "events": [
112
+ {
113
+ "name": "update:modelValue",
114
+ "vueEventName": "@update:modelValue",
115
+ "description": "整个时间范围值变化时触发,适合直接驱动查询参数。",
116
+ "params": [
117
+ {
118
+ "name": "value",
119
+ "type": "TimeModelType",
120
+ "description": "当前完整时间范围,可能是时间戳元组或格式化后的字符串元组。",
121
+ "optional": true
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ "name": "update:startTime",
127
+ "vueEventName": "@update:startTime",
128
+ "description": "开始时间变化时触发,可用于单独记录查询区间起点。",
129
+ "params": [
130
+ {
131
+ "name": "value",
132
+ "type": "string | number",
133
+ "description": "当前开始时间值;`timestamp=true` 时通常是时间戳,否则为格式化字符串。",
134
+ "optional": true
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ "name": "update:endTime",
140
+ "vueEventName": "@update:endTime",
141
+ "description": "结束时间变化时触发,可用于单独记录查询区间终点。",
142
+ "params": [
143
+ {
144
+ "name": "value",
145
+ "type": "string | number",
146
+ "description": "当前结束时间值;`timestamp=true` 时通常是时间戳,否则为格式化字符串。",
147
+ "optional": true
148
+ }
149
+ ]
150
+ }
151
+ ],
152
+ "slots": [],
153
+ "methods": [
154
+ {
155
+ "name": "setTimeValue",
156
+ "description": "按快捷值主动切换时间范围",
157
+ "params": [
158
+ {
159
+ "name": "value",
160
+ "type": "number | 'today' | 'yesterday'",
161
+ "description": "目标快捷值,可传分钟数或 `today`、`yesterday` 这类内置快捷标识。"
162
+ }
163
+ ],
164
+ "returnType": "void"
165
+ },
166
+ {
167
+ "name": "refetch",
168
+ "description": "刷新当前时间范围到最新时间",
169
+ "params": [
170
+ {
171
+ "name": "value",
172
+ "type": "number | 'today' | 'yesterday'",
173
+ "description": "可选的快捷值;传入后会先切换到该快捷区间,再把结束时间刷新到当前最新时刻。",
174
+ "optional": true
175
+ }
176
+ ],
177
+ "returnType": "void"
178
+ }
179
+ ],
180
+ "examples": [
181
+ {
182
+ "id": "timerange_monitor",
183
+ "title": "监控页时间筛选",
184
+ "description": "提供最近 1 小时、最近 24 小时等快捷时间范围。",
185
+ "difficulty": "easy",
186
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { TimeRange } from '@ksyun-internal/versatile';\n\nconst timeRange = ref<[number, number] | undefined>();\n</script>\n\n<template>\n <TimeRange\n v-model=\"timeRange\"\n label=\"统计周期\"\n :times=\"[60, 360, 'today']\"\n :timestamp=\"true\"\n />\n</template>",
187
+ "tags": [
188
+ "time",
189
+ "monitor"
190
+ ],
191
+ "usedProps": [
192
+ "modelValue",
193
+ "label",
194
+ "times",
195
+ "timestamp"
196
+ ],
197
+ "usedEvents": [
198
+ "update:modelValue",
199
+ "update:startTime",
200
+ "update:endTime"
201
+ ],
202
+ "usedMethods": [],
203
+ "scenario": "在监控和报表页面中切换查询时间范围。"
204
+ },
205
+ {
206
+ "id": "timerange_refetch_latest",
207
+ "title": "刷新到最新时间窗口",
208
+ "description": "通过组件方法把当前时间范围刷新到最新时刻,适合日志和监控实时查看场景。",
209
+ "difficulty": "medium",
210
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { TimeRange } from '@ksyun-internal/versatile';\n\nconst rangeRef = ref<InstanceType<typeof TimeRange>>();\nconst timeRange = ref<[number, number] | undefined>();\nconst refreshLatest = () => {\n rangeRef.value?.refetch(60);\n};\n</script>\n\n<template>\n <button @click=\"refreshLatest\">刷新最近 1 小时</button>\n <TimeRange\n ref=\"rangeRef\"\n v-model=\"timeRange\"\n :times=\"[60, 360, 1440]\"\n :default-value=\"60\"\n :timestamp=\"true\"\n />\n</template>",
211
+ "tags": [
212
+ "time",
213
+ "methods"
214
+ ],
215
+ "usedProps": [
216
+ "modelValue",
217
+ "times",
218
+ "defaultValue",
219
+ "timestamp"
220
+ ],
221
+ "usedEvents": [
222
+ "update:modelValue"
223
+ ],
224
+ "usedMethods": [
225
+ "refetch"
226
+ ],
227
+ "scenario": "在日志和监控页面中一键把查询区间重置到最新时间窗口。"
228
+ }
229
+ ],
230
+ "searchKeywords": [
231
+ "time range",
232
+ "date range",
233
+ "time filter",
234
+ "时间范围",
235
+ "时间筛选",
236
+ "快捷时间",
237
+ "监控时间段",
238
+ "日志时间查询"
239
+ ],
240
+ "useCases": [
241
+ "监控页时间筛选",
242
+ "报表页时间范围选择",
243
+ "日志页最近时间窗口查询",
244
+ "按快捷区间切换统计周期"
245
+ ],
246
+ "relatedComponents": [
247
+ "Datepicker",
248
+ "Duration"
249
+ ],
250
+ "typeDefinitions": [
251
+ {
252
+ "name": "TimeShortcut",
253
+ "definition": "type TimeShortcut = number | 'today' | 'yesterday'",
254
+ "description": "快捷时间范围值,支持分钟数以及 today、yesterday 等内置枚举。"
255
+ },
256
+ {
257
+ "name": "TimeModelType",
258
+ "definition": "type TimeModelType = [number, number] | [string, string]",
259
+ "description": "时间范围模型值类型,表示开始和结束时间组成的二元组。"
260
+ }
261
+ ]
262
+ }
@@ -315,6 +315,13 @@
315
315
  "重要信息提示",
316
316
  "页面公告"
317
317
  ],
318
+ "typeDefinitions": [
319
+ {
320
+ "name": "TipType",
321
+ "definition": "type TipType = 'default' | 'primary' | 'success' | 'warning' | 'danger'",
322
+ "description": "提示条语义类型枚举。"
323
+ }
324
+ ],
318
325
  "relatedComponents": [
319
326
  "Tag",
320
327
  "Message"