king-design-analyzer 2.1.9 → 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 (305) 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 +4 -3
  102. package/dist/ast/index.mjs +2 -1
  103. package/dist/{chunk-DSWKLUIX.mjs → chunk-3LYQ5XFM.mjs} +1 -1
  104. package/dist/chunk-BI5TIQID.mjs +330 -0
  105. package/dist/{chunk-F26GUCGG.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-KF5YBEM5.js +143 -0
  110. package/dist/{chunk-H2ET6MMM.mjs → chunk-KMIDURUR.mjs} +42 -47
  111. package/dist/chunk-QC6VTSA3.mjs +117 -0
  112. package/dist/{chunk-2W6OCG2S.js → chunk-SZYVGYKK.js} +42 -48
  113. package/dist/{chunk-WYSRJVX4.js → chunk-TA3SV4SP.js} +2 -2
  114. package/dist/{chunk-OJOHB64C.mjs → chunk-XGPHQHLR.mjs} +4 -4
  115. package/dist/full/index.js +7 -6
  116. package/dist/full/index.mjs +5 -4
  117. package/dist/index.d.mts +1 -0
  118. package/dist/index.d.ts +1 -0
  119. package/dist/index.js +14 -13
  120. package/dist/index.mjs +6 -5
  121. package/dist/metadata/index.d.mts +22 -2
  122. package/dist/metadata/index.d.ts +22 -2
  123. package/dist/metadata/index.js +26 -16
  124. package/dist/metadata/index.mjs +26 -15
  125. package/dist/resolve-BsLBxlBi.d.mts +24 -0
  126. package/dist/resolve-BsLBxlBi.d.ts +24 -0
  127. package/dist/runtime/index.js +4 -4
  128. package/dist/runtime/index.mjs +2 -2
  129. package/dist/shared/index.d.mts +10 -0
  130. package/dist/shared/index.d.ts +10 -0
  131. package/dist/shared/index.js +23 -0
  132. package/dist/shared/index.mjs +2 -0
  133. package/dist/static/index.js +5 -5
  134. package/dist/static/index.mjs +2 -2
  135. package/docs_for_llm/actions.doc.md +77 -0
  136. package/docs_for_llm/advancedset.doc.md +89 -0
  137. package/docs_for_llm/affix.doc.md +15 -7
  138. package/docs_for_llm/aksk.doc.md +111 -0
  139. package/docs_for_llm/az.doc.md +17 -11
  140. package/docs_for_llm/badge.doc.md +6 -5
  141. package/docs_for_llm/billtypes.doc.md +17 -11
  142. package/docs_for_llm/breadcrumb.doc.md +6 -3
  143. package/docs_for_llm/button.doc.md +34 -18
  144. package/docs_for_llm/buttonlink.doc.md +55 -0
  145. package/docs_for_llm/card.doc.md +8 -5
  146. package/docs_for_llm/cardcol.doc.md +78 -0
  147. package/docs_for_llm/cardcols.doc.md +84 -0
  148. package/docs_for_llm/cardcontent.doc.md +10 -10
  149. package/docs_for_llm/cardtabs.doc.md +106 -0
  150. package/docs_for_llm/carousel.doc.md +8 -7
  151. package/docs_for_llm/cascader.doc.md +46 -25
  152. package/docs_for_llm/checkbox.doc.md +25 -13
  153. package/docs_for_llm/cidrinput.doc.md +83 -0
  154. package/docs_for_llm/code.doc.md +22 -11
  155. package/docs_for_llm/collapse.doc.md +9 -6
  156. package/docs_for_llm/colorpicker.doc.md +104 -0
  157. package/docs_for_llm/copy.doc.md +15 -13
  158. package/docs_for_llm/copyhover.doc.md +59 -0
  159. package/docs_for_llm/copyrow.doc.md +71 -0
  160. package/docs_for_llm/datepicker.doc.md +51 -39
  161. package/docs_for_llm/description.doc.md +75 -0
  162. package/docs_for_llm/descriptions.doc.md +9 -6
  163. package/docs_for_llm/dialog.doc.md +48 -77
  164. package/docs_for_llm/divider.doc.md +9 -7
  165. package/docs_for_llm/drawer.doc.md +43 -84
  166. package/docs_for_llm/dropdown.doc.md +52 -21
  167. package/docs_for_llm/duration.doc.md +76 -0
  168. package/docs_for_llm/editable.doc.md +36 -14
  169. package/docs_for_llm/ellipsis.doc.md +10 -5
  170. package/docs_for_llm/filtertablefieldsdialog.doc.md +99 -0
  171. package/docs_for_llm/flex.doc.md +74 -0
  172. package/docs_for_llm/form.doc.md +33 -14
  173. package/docs_for_llm/formiteminput.doc.md +128 -0
  174. package/docs_for_llm/formitemspinner.doc.md +105 -0
  175. package/docs_for_llm/formitemswitch.doc.md +113 -0
  176. package/docs_for_llm/formitemtableconfigs.doc.md +95 -0
  177. package/docs_for_llm/grid.doc.md +7 -5
  178. package/docs_for_llm/header.doc.md +85 -0
  179. package/docs_for_llm/icon.doc.md +12 -8
  180. package/docs_for_llm/icontooltip.doc.md +121 -0
  181. package/docs_for_llm/input.doc.md +90 -39
  182. package/docs_for_llm/instancelist.doc.md +113 -0
  183. package/docs_for_llm/instancenum.doc.md +95 -0
  184. package/docs_for_llm/ipinput.doc.md +77 -0
  185. package/docs_for_llm/kspstatus.doc.md +82 -0
  186. package/docs_for_llm/kvcode.doc.md +76 -0
  187. package/docs_for_llm/layoutcontent.doc.md +17 -17
  188. package/docs_for_llm/layoutlistcontent.doc.md +95 -0
  189. package/docs_for_llm/layoutpermissioncontent.doc.md +84 -0
  190. package/docs_for_llm/layoutstandardlist.doc.md +120 -0
  191. package/docs_for_llm/layouttabs.doc.md +101 -0
  192. package/docs_for_llm/lazymount.doc.md +73 -0
  193. package/docs_for_llm/lazyteleport.doc.md +76 -0
  194. package/docs_for_llm/menu.doc.md +14 -11
  195. package/docs_for_llm/message.doc.md +48 -10
  196. package/docs_for_llm/pagination.doc.md +30 -17
  197. package/docs_for_llm/paginationplus.doc.md +31 -10
  198. package/docs_for_llm/password.doc.md +86 -0
  199. package/docs_for_llm/popover.doc.md +24 -55
  200. package/docs_for_llm/progress.doc.md +13 -10
  201. package/docs_for_llm/projects.doc.md +91 -0
  202. package/docs_for_llm/protable.doc.md +89 -15
  203. package/docs_for_llm/queuevisualrange.doc.md +78 -0
  204. package/docs_for_llm/radio.doc.md +23 -8
  205. package/docs_for_llm/rate.doc.md +122 -0
  206. package/docs_for_llm/region.doc.md +25 -13
  207. package/docs_for_llm/search.doc.md +120 -0
  208. package/docs_for_llm/searchinput.doc.md +111 -0
  209. package/docs_for_llm/searchitems.doc.md +116 -0
  210. package/docs_for_llm/searchselect.doc.md +126 -0
  211. package/docs_for_llm/select.doc.md +40 -55
  212. package/docs_for_llm/sidebar.doc.md +133 -0
  213. package/docs_for_llm/skeleton.doc.md +117 -0
  214. package/docs_for_llm/slider.doc.md +31 -21
  215. package/docs_for_llm/spin.doc.md +8 -5
  216. package/docs_for_llm/spinner.doc.md +28 -18
  217. package/docs_for_llm/split.doc.md +157 -0
  218. package/docs_for_llm/sshkeys.doc.md +88 -0
  219. package/docs_for_llm/status.doc.md +14 -9
  220. package/docs_for_llm/steps.doc.md +10 -7
  221. package/docs_for_llm/switch.doc.md +17 -14
  222. package/docs_for_llm/table.doc.md +118 -51
  223. package/docs_for_llm/tablecolumnid.doc.md +36 -16
  224. package/docs_for_llm/tabs.doc.md +19 -10
  225. package/docs_for_llm/tag.doc.md +19 -10
  226. package/docs_for_llm/timeline.doc.md +109 -0
  227. package/docs_for_llm/timepicker.doc.md +57 -38
  228. package/docs_for_llm/timerange.doc.md +157 -0
  229. package/docs_for_llm/tip.doc.md +20 -11
  230. package/docs_for_llm/tooltip.doc.md +55 -29
  231. package/docs_for_llm/tour.doc.md +48 -29
  232. package/docs_for_llm/transfer.doc.md +40 -29
  233. package/docs_for_llm/tree.doc.md +65 -23
  234. package/docs_for_llm/treeselect.doc.md +37 -48
  235. package/docs_for_llm/upload.doc.md +56 -32
  236. package/docs_for_llm/useCRUD.doc.md +49 -0
  237. package/docs_for_llm/useCountdown.doc.md +43 -0
  238. package/docs_for_llm/useDetail.doc.md +48 -0
  239. package/docs_for_llm/useDialog.doc.md +46 -0
  240. package/docs_for_llm/useEntity.doc.md +45 -0
  241. package/docs_for_llm/useEventListener.doc.md +44 -0
  242. package/docs_for_llm/useFalseUntilTruthy.doc.md +41 -0
  243. package/docs_for_llm/useGetCopyAuthText.doc.md +35 -0
  244. package/docs_for_llm/useGetUserPermission.doc.md +43 -0
  245. package/docs_for_llm/useGroup.doc.md +48 -0
  246. package/docs_for_llm/useIdEntities.doc.md +48 -0
  247. package/docs_for_llm/useIdEntity.doc.md +103 -0
  248. package/docs_for_llm/useInterval.doc.md +43 -0
  249. package/docs_for_llm/useLayoutStandardList.doc.md +38 -0
  250. package/docs_for_llm/useMessage.doc.md +46 -0
  251. package/docs_for_llm/useModifyCache.doc.md +37 -0
  252. package/docs_for_llm/useOpenDialog.doc.md +41 -0
  253. package/docs_for_llm/usePagination.doc.md +60 -0
  254. package/docs_for_llm/usePersist.doc.md +54 -0
  255. package/docs_for_llm/usePoll.doc.md +41 -0
  256. package/docs_for_llm/useRoutePlus.doc.md +34 -0
  257. package/docs_for_llm/useRouterPlus.doc.md +34 -0
  258. package/docs_for_llm/useSearch.doc.md +68 -0
  259. package/docs_for_llm/useShell.doc.md +43 -0
  260. package/docs_for_llm/useSkip.doc.md +41 -0
  261. package/docs_for_llm/useStorageIdEntity.doc.md +46 -0
  262. package/docs_for_llm/useStore.doc.md +34 -0
  263. package/docs_for_llm/useTable.doc.md +57 -0
  264. package/docs_for_llm/useTableGroup.doc.md +47 -0
  265. package/docs_for_llm/useTableSort.doc.md +40 -0
  266. package/docs_for_llm/useToState.doc.md +112 -0
  267. package/docs_for_llm/useUser.doc.md +38 -0
  268. package/docs_for_llm/useValidForm.doc.md +41 -0
  269. package/docs_for_llm/vdialog.doc.md +129 -0
  270. package/docs_for_llm/vdrawer.doc.md +119 -0
  271. package/docs_for_llm/virtuallist.doc.md +6 -3
  272. package/hooks/useCRUD.json +61 -0
  273. package/hooks/useCountdown.json +49 -0
  274. package/hooks/useDetail.json +67 -0
  275. package/hooks/useDialog.json +49 -0
  276. package/hooks/useEntity.json +61 -0
  277. package/hooks/useEventListener.json +61 -0
  278. package/hooks/useFalseUntilTruthy.json +43 -0
  279. package/hooks/useGetCopyAuthText.json +36 -0
  280. package/hooks/useGetUserPermission.json +55 -0
  281. package/hooks/useGroup.json +49 -0
  282. package/hooks/useIdEntities.json +61 -0
  283. package/hooks/useInterval.json +55 -0
  284. package/hooks/useLayoutStandardList.json +36 -0
  285. package/hooks/useMessage.json +73 -0
  286. package/hooks/useModifyCache.json +36 -0
  287. package/hooks/useOpenDialog.json +43 -0
  288. package/hooks/usePagination.json +49 -0
  289. package/hooks/usePersist.json +61 -0
  290. package/hooks/usePoll.json +43 -0
  291. package/hooks/useRoutePlus.json +36 -0
  292. package/hooks/useRouterPlus.json +36 -0
  293. package/hooks/useSearch.json +56 -0
  294. package/hooks/useShell.json +49 -0
  295. package/hooks/useSkip.json +43 -0
  296. package/hooks/useStorageIdEntity.json +67 -0
  297. package/hooks/useStore.json +36 -0
  298. package/hooks/useTable.json +49 -0
  299. package/hooks/useTableGroup.json +43 -0
  300. package/hooks/useTableSort.json +43 -0
  301. package/hooks/useUser.json +36 -0
  302. package/hooks/useValidForm.json +43 -0
  303. package/package.json +12 -6
  304. package/dist/chunk-HPAUCD5I.js +0 -156
  305. package/dist/chunk-L4DS3EXI.mjs +0 -133
@@ -0,0 +1,214 @@
1
+ {
2
+ "id": "formiteminput",
3
+ "name": "FormItemInput",
4
+ "displayName": "输入框表单项",
5
+ "category": "form",
6
+ "description": "带标题、必填、规则校验和辅助说明的输入框表单项,适合业务表单中承载实例名称、域名、备注等字段。",
7
+ "importStatement": "import { FormItemInput } from '@ksyun-internal/versatile';",
8
+ "inherits": [
9
+ {
10
+ "component": "Input",
11
+ "include": [
12
+ "props"
13
+ ],
14
+ "exclude": [
15
+ "value",
16
+ "defaultValue",
17
+ "placeholder"
18
+ ]
19
+ }
20
+ ],
21
+ "props": [
22
+ {
23
+ "name": "modelValue",
24
+ "description": "当前输入值",
25
+ "type": {
26
+ "raw": "string | null",
27
+ "kind": "union"
28
+ },
29
+ "required": false
30
+ },
31
+ {
32
+ "name": "hideLabel",
33
+ "description": "是否隐藏 label 区域",
34
+ "type": {
35
+ "raw": "boolean",
36
+ "kind": "boolean"
37
+ },
38
+ "required": false
39
+ },
40
+ {
41
+ "name": "label",
42
+ "description": "表单项标题",
43
+ "type": {
44
+ "raw": "string",
45
+ "kind": "string"
46
+ },
47
+ "required": false,
48
+ "default": "\"\""
49
+ },
50
+ {
51
+ "name": "placeholder",
52
+ "description": "输入框占位文案",
53
+ "type": {
54
+ "raw": "string",
55
+ "kind": "string"
56
+ },
57
+ "required": false
58
+ },
59
+ {
60
+ "name": "tip",
61
+ "description": "输入框下方提示文案",
62
+ "type": {
63
+ "raw": "string",
64
+ "kind": "string"
65
+ },
66
+ "required": false
67
+ },
68
+ {
69
+ "name": "warnTip",
70
+ "description": "警告提示文案",
71
+ "type": {
72
+ "raw": "string",
73
+ "kind": "string"
74
+ },
75
+ "required": false
76
+ },
77
+ {
78
+ "name": "helper",
79
+ "description": "辅助说明文案",
80
+ "type": {
81
+ "raw": "string",
82
+ "kind": "string"
83
+ },
84
+ "required": false
85
+ },
86
+ {
87
+ "name": "required",
88
+ "description": "是否必填",
89
+ "type": {
90
+ "raw": "boolean",
91
+ "kind": "boolean"
92
+ },
93
+ "required": false,
94
+ "default": "false"
95
+ },
96
+ {
97
+ "name": "rules",
98
+ "description": "表单校验规则",
99
+ "type": {
100
+ "raw": "Record<string, any>",
101
+ "kind": "object"
102
+ },
103
+ "required": false,
104
+ "default": "{}"
105
+ },
106
+ {
107
+ "name": "info",
108
+ "description": "信息提示文案",
109
+ "type": {
110
+ "raw": "string",
111
+ "kind": "string"
112
+ },
113
+ "required": false
114
+ }
115
+ ],
116
+ "events": [
117
+ {
118
+ "name": "update:modelValue",
119
+ "vueEventName": "@update:modelValue",
120
+ "description": "输入框值实时变化时触发,适合双向绑定表单字段。",
121
+ "params": [
122
+ {
123
+ "name": "value",
124
+ "type": "string | null",
125
+ "description": "当前输入框中的值。",
126
+ "optional": true
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "name": "change:value",
132
+ "vueEventName": "@change:value",
133
+ "description": "输入值完成一次确认变更时触发,通常用于失焦校验或联动查询。",
134
+ "params": [
135
+ {
136
+ "name": "value",
137
+ "type": "string | null",
138
+ "description": "本次确认后的输入值。",
139
+ "optional": true
140
+ }
141
+ ]
142
+ }
143
+ ],
144
+ "slots": [],
145
+ "methods": [],
146
+ "examples": [
147
+ {
148
+ "id": "formiteminput_name",
149
+ "title": "实例名称输入项",
150
+ "description": "结合 label、placeholder 和 tip 构造标准业务表单项。",
151
+ "difficulty": "easy",
152
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { FormItemInput } from '@ksyun-internal/versatile';\n\nconst instanceName = ref('web-prod-01');\n</script>\n\n<template>\n <FormItemInput\n v-model=\"instanceName\"\n label=\"实例名称\"\n placeholder=\"请输入实例名称\"\n tip=\"长度 2 到 63 个字符,支持字母、数字和中划线\"\n :required=\"true\"\n />\n</template>",
153
+ "tags": [
154
+ "form",
155
+ "input"
156
+ ],
157
+ "usedProps": [
158
+ "modelValue",
159
+ "label",
160
+ "placeholder",
161
+ "tip",
162
+ "required"
163
+ ],
164
+ "usedEvents": [
165
+ "update:modelValue"
166
+ ],
167
+ "usedMethods": [],
168
+ "scenario": "在创建实例表单中录入资源名称。"
169
+ },
170
+ {
171
+ "id": "formiteminput_warning_tip",
172
+ "title": "带警告提示的输入项",
173
+ "description": "在输入可能影响线上流量的字段时补充警告说明。",
174
+ "difficulty": "medium",
175
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { FormItemInput } from '@ksyun-internal/versatile';\n\nconst domain = ref('api.example.com');\n</script>\n\n<template>\n <FormItemInput\n v-model=\"domain\"\n label=\"回源域名\"\n warn-tip=\"修改后可能影响现网回源路径\"\n info=\"请确保 DNS 已正确解析\"\n />\n</template>",
176
+ "tags": [
177
+ "form",
178
+ "warning"
179
+ ],
180
+ "usedProps": [
181
+ "modelValue",
182
+ "label",
183
+ "warnTip",
184
+ "info"
185
+ ],
186
+ "usedEvents": [],
187
+ "usedMethods": [],
188
+ "scenario": "在高风险配置项旁直接展示风险和补充说明。"
189
+ }
190
+ ],
191
+ "searchKeywords": [
192
+ "form item input",
193
+ "business input",
194
+ "输入框表单项",
195
+ "表单输入",
196
+ "名称输入"
197
+ ],
198
+ "useCases": [
199
+ "常规文本输入",
200
+ "业务表单字段录入",
201
+ "高风险字段提示输入"
202
+ ],
203
+ "typeDefinitions": [
204
+ {
205
+ "name": "FormItemInputValue",
206
+ "definition": "type FormItemInputValue = string | number",
207
+ "description": "业务输入表单项绑定值类型。"
208
+ }
209
+ ],
210
+ "relatedComponents": [
211
+ "Input",
212
+ "FormItemSpinner"
213
+ ]
214
+ }
@@ -0,0 +1,213 @@
1
+ {
2
+ "id": "formitemspinner",
3
+ "name": "FormItemSpinner",
4
+ "displayName": "数字步进表单项",
5
+ "category": "form",
6
+ "description": "把数字步进器和表单项包装在一起的业务组件,适合 CPU 核数、带宽、节点数等带单位和范围限制的数值输入。",
7
+ "importStatement": "import { FormItemSpinner } from '@ksyun-internal/versatile';",
8
+ "inherits": [
9
+ {
10
+ "component": "Spinner",
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 | null",
25
+ "kind": "union"
26
+ },
27
+ "required": false
28
+ },
29
+ {
30
+ "name": "step",
31
+ "description": "步长",
32
+ "type": {
33
+ "raw": "number",
34
+ "kind": "number"
35
+ },
36
+ "required": false,
37
+ "default": "1"
38
+ },
39
+ {
40
+ "name": "min",
41
+ "description": "最小值",
42
+ "type": {
43
+ "raw": "number",
44
+ "kind": "number"
45
+ },
46
+ "required": false,
47
+ "default": "0"
48
+ },
49
+ {
50
+ "name": "max",
51
+ "description": "最大值",
52
+ "type": {
53
+ "raw": "number",
54
+ "kind": "number"
55
+ },
56
+ "required": false,
57
+ "default": "Infinity"
58
+ },
59
+ {
60
+ "name": "precision",
61
+ "description": "保留小数位数",
62
+ "type": {
63
+ "raw": "number",
64
+ "kind": "number"
65
+ },
66
+ "required": false,
67
+ "default": "0"
68
+ },
69
+ {
70
+ "name": "label",
71
+ "description": "表单项标题",
72
+ "type": {
73
+ "raw": "string",
74
+ "kind": "string"
75
+ },
76
+ "required": false
77
+ },
78
+ {
79
+ "name": "required",
80
+ "description": "是否必填",
81
+ "type": {
82
+ "raw": "boolean",
83
+ "kind": "boolean"
84
+ },
85
+ "required": false,
86
+ "default": "false"
87
+ },
88
+ {
89
+ "name": "rules",
90
+ "description": "表单校验规则",
91
+ "type": {
92
+ "raw": "Record<string, any>",
93
+ "kind": "object"
94
+ },
95
+ "required": false,
96
+ "default": "{}"
97
+ },
98
+ {
99
+ "name": "helper",
100
+ "description": "辅助说明文案",
101
+ "type": {
102
+ "raw": "string",
103
+ "kind": "string"
104
+ },
105
+ "required": false
106
+ },
107
+ {
108
+ "name": "info",
109
+ "description": "信息提示文案",
110
+ "type": {
111
+ "raw": "string",
112
+ "kind": "string"
113
+ },
114
+ "required": false
115
+ },
116
+ {
117
+ "name": "unit",
118
+ "description": "数值单位",
119
+ "type": {
120
+ "raw": "string",
121
+ "kind": "string"
122
+ },
123
+ "required": false
124
+ }
125
+ ],
126
+ "events": [
127
+ {
128
+ "name": "update:modelValue",
129
+ "vueEventName": "@update:modelValue",
130
+ "description": "数值变化时触发,可用于实时计算价格、配额或资源总量。",
131
+ "params": [
132
+ {
133
+ "name": "value",
134
+ "type": "number | null",
135
+ "description": "当前数值输入结果。",
136
+ "optional": true
137
+ }
138
+ ]
139
+ }
140
+ ],
141
+ "slots": [],
142
+ "methods": [],
143
+ "examples": [
144
+ {
145
+ "id": "formitemspinner_bandwidth",
146
+ "title": "带宽数值表单项",
147
+ "description": "通过最小值、最大值和单位控制业务数值输入。",
148
+ "difficulty": "easy",
149
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { FormItemSpinner } from '@ksyun-internal/versatile';\n\nconst bandwidth = ref(20);\n</script>\n\n<template>\n <FormItemSpinner\n v-model=\"bandwidth\"\n label=\"带宽峰值\"\n :min=\"1\"\n :max=\"200\"\n unit=\"Mbps\"\n />\n</template>",
150
+ "tags": [
151
+ "form",
152
+ "number"
153
+ ],
154
+ "usedProps": [
155
+ "modelValue",
156
+ "label",
157
+ "min",
158
+ "max",
159
+ "unit"
160
+ ],
161
+ "usedEvents": [
162
+ "update:modelValue"
163
+ ],
164
+ "usedMethods": [],
165
+ "scenario": "在购买页中配置带宽大小并联动价格。"
166
+ },
167
+ {
168
+ "id": "formitemspinner_precision",
169
+ "title": "带精度控制的数值输入",
170
+ "description": "使用 step 和 precision 录入带小数的资源规格。",
171
+ "difficulty": "medium",
172
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { FormItemSpinner } from '@ksyun-internal/versatile';\n\nconst bandwidth = ref(1.5);\n</script>\n\n<template>\n <FormItemSpinner\n v-model=\"bandwidth\"\n label=\"弹性带宽\"\n :step=\"0.5\"\n :precision=\"1\"\n unit=\"Gbps\"\n />\n</template>",
173
+ "tags": [
174
+ "form",
175
+ "precision"
176
+ ],
177
+ "usedProps": [
178
+ "modelValue",
179
+ "label",
180
+ "step",
181
+ "precision",
182
+ "unit"
183
+ ],
184
+ "usedEvents": [],
185
+ "usedMethods": [],
186
+ "scenario": "在高精度资源配置场景中输入支持小数的指标值。"
187
+ }
188
+ ],
189
+ "searchKeywords": [
190
+ "form item spinner",
191
+ "number input",
192
+ "数字步进",
193
+ "表单项",
194
+ "带单位输入"
195
+ ],
196
+ "useCases": [
197
+ "数量输入",
198
+ "规格和配额设置",
199
+ "带精度控制的数值输入"
200
+ ],
201
+ "typeDefinitions": [
202
+ {
203
+ "name": "FormItemSpinnerValue",
204
+ "definition": "type FormItemSpinnerValue = number",
205
+ "description": "数字步进表单项绑定值类型。"
206
+ }
207
+ ],
208
+ "relatedComponents": [
209
+ "Spinner",
210
+ "FormItemInput",
211
+ "InstanceNum"
212
+ ]
213
+ }
@@ -0,0 +1,185 @@
1
+ {
2
+ "id": "formitemswitch",
3
+ "name": "FormItemSwitch",
4
+ "displayName": "开关表单项",
5
+ "category": "form",
6
+ "description": "用于业务表单中录入布尔配置的开关表单项组件,补齐了 label、辅助说明和状态切换提示。",
7
+ "importStatement": "import { FormItemSwitch } from '@ksyun-internal/versatile';",
8
+ "inherits": [
9
+ {
10
+ "component": "Switch",
11
+ "include": [
12
+ "props"
13
+ ],
14
+ "exclude": [
15
+ "value"
16
+ ]
17
+ }
18
+ ],
19
+ "props": [
20
+ {
21
+ "name": "modelValue",
22
+ "description": "当前开关值",
23
+ "type": {
24
+ "raw": "boolean | string",
25
+ "kind": "union"
26
+ },
27
+ "required": false
28
+ },
29
+ {
30
+ "name": "hideLabel",
31
+ "description": "是否隐藏 label 区域",
32
+ "type": {
33
+ "raw": "boolean",
34
+ "kind": "boolean"
35
+ },
36
+ "required": false
37
+ },
38
+ {
39
+ "name": "label",
40
+ "description": "表单项标题",
41
+ "type": {
42
+ "raw": "string",
43
+ "kind": "string"
44
+ },
45
+ "required": false,
46
+ "default": "\"\""
47
+ },
48
+ {
49
+ "name": "tip",
50
+ "description": "辅助提示文案",
51
+ "type": {
52
+ "raw": "string",
53
+ "kind": "string"
54
+ },
55
+ "required": false
56
+ },
57
+ {
58
+ "name": "helper",
59
+ "description": "说明文案",
60
+ "type": {
61
+ "raw": "string",
62
+ "kind": "string"
63
+ },
64
+ "required": false
65
+ },
66
+ {
67
+ "name": "appendTip",
68
+ "description": "右侧追加提示文案",
69
+ "type": {
70
+ "raw": "string",
71
+ "kind": "string"
72
+ },
73
+ "required": false
74
+ }
75
+ ],
76
+ "events": [
77
+ {
78
+ "name": "update:modelValue",
79
+ "vueEventName": "@update:modelValue",
80
+ "description": "开关值变化时触发,适合直接同步布尔型配置。",
81
+ "params": [
82
+ {
83
+ "name": "value",
84
+ "type": "boolean | string",
85
+ "description": "当前开关值,可为布尔值或业务自定义值。",
86
+ "optional": true
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ "name": "change:value",
92
+ "vueEventName": "@change:value",
93
+ "description": "用户完成一次有效切换后触发,可用于触发联动逻辑。",
94
+ "params": [
95
+ {
96
+ "name": "value",
97
+ "type": "boolean | string",
98
+ "description": "本次切换后的最终值。",
99
+ "optional": true
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ "name": "change:op",
105
+ "vueEventName": "@change:op",
106
+ "description": "组件内部操作态变化时触发,适合跟踪启停类动作的执行过程。",
107
+ "params": [
108
+ {
109
+ "name": "value",
110
+ "type": "string",
111
+ "description": "当前操作态标识,例如启用、关闭或处理中等业务态。",
112
+ "optional": true
113
+ }
114
+ ]
115
+ }
116
+ ],
117
+ "slots": [],
118
+ "methods": [],
119
+ "examples": [
120
+ {
121
+ "id": "formitemswitch_public_ip",
122
+ "title": "公网访问开关",
123
+ "description": "在表单中配置一个带说明文案的布尔开关项。",
124
+ "difficulty": "easy",
125
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { FormItemSwitch } from '@ksyun-internal/versatile';\n\nconst enablePublicIp = ref(true);\n</script>\n\n<template>\n <FormItemSwitch\n v-model=\"enablePublicIp\"\n label=\"开启公网访问\"\n helper=\"关闭后实例将无法从公网直接访问\"\n />\n</template>",
126
+ "tags": [
127
+ "form",
128
+ "switch"
129
+ ],
130
+ "usedProps": [
131
+ "modelValue",
132
+ "label",
133
+ "helper"
134
+ ],
135
+ "usedEvents": [
136
+ "update:modelValue"
137
+ ],
138
+ "usedMethods": [],
139
+ "scenario": "在网络配置表单中控制是否开启公网能力。"
140
+ },
141
+ {
142
+ "id": "formitemswitch_hide_label",
143
+ "title": "隐藏标题的开关项",
144
+ "description": "在紧凑型表单里隐藏 label,仅保留辅助说明。",
145
+ "difficulty": "medium",
146
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { FormItemSwitch } from '@ksyun-internal/versatile';\n\nconst autoBackup = ref(false);\n</script>\n\n<template>\n <FormItemSwitch\n v-model=\"autoBackup\"\n :hide-label=\"true\"\n helper=\"开启后每天凌晨自动执行备份\"\n append-tip=\"将占用少量存储空间\"\n />\n</template>",
147
+ "tags": [
148
+ "form",
149
+ "compact"
150
+ ],
151
+ "usedProps": [
152
+ "modelValue",
153
+ "hideLabel",
154
+ "helper",
155
+ "appendTip"
156
+ ],
157
+ "usedEvents": [],
158
+ "usedMethods": [],
159
+ "scenario": "在配置卡片中以更紧凑的方式呈现布尔选项。"
160
+ }
161
+ ],
162
+ "searchKeywords": [
163
+ "form item switch",
164
+ "switch item",
165
+ "开关表单项",
166
+ "状态开关",
167
+ "布尔配置"
168
+ ],
169
+ "useCases": [
170
+ "启停开关",
171
+ "布尔配置项录入",
172
+ "紧凑型开关表单"
173
+ ],
174
+ "typeDefinitions": [
175
+ {
176
+ "name": "FormItemSwitchValue",
177
+ "definition": "type FormItemSwitchValue = boolean | string | number",
178
+ "description": "开关表单项绑定值类型,可兼容布尔值和业务自定义值。"
179
+ }
180
+ ],
181
+ "relatedComponents": [
182
+ "Switch",
183
+ "FormItemInput"
184
+ ]
185
+ }