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,125 @@
1
+ {
2
+ "id": "duration",
3
+ "name": "Duration",
4
+ "displayName": "时长选择",
5
+ "category": "data",
6
+ "description": "用于购买、续费和策略配置场景的时长选择器,支持按月或按小时切换,并可配合内置刻度快速选择常用周期。",
7
+ "importStatement": "import { Duration } from '@ksyun-internal/versatile';",
8
+ "props": [
9
+ {
10
+ "name": "modelValue",
11
+ "description": "当前选中的时长值",
12
+ "type": {
13
+ "raw": "number",
14
+ "kind": "number"
15
+ },
16
+ "required": false,
17
+ "default": "undefined"
18
+ },
19
+ {
20
+ "name": "marksType",
21
+ "description": "刻度类型,控制内置 marks 的生成方式",
22
+ "type": {
23
+ "raw": "string",
24
+ "kind": "string"
25
+ },
26
+ "required": false,
27
+ "default": "\"month\""
28
+ },
29
+ {
30
+ "name": "type",
31
+ "description": "时长类型,通常为 month 或 hour",
32
+ "type": {
33
+ "raw": "string",
34
+ "kind": "string"
35
+ },
36
+ "required": false,
37
+ "default": "\"month\""
38
+ }
39
+ ],
40
+ "events": [
41
+ {
42
+ "name": "update:modelValue",
43
+ "vueEventName": "@update:modelValue",
44
+ "description": "用户选择新的时长后触发,通常用于联动价格或到期时间计算。",
45
+ "params": [
46
+ {
47
+ "name": "value",
48
+ "type": "number",
49
+ "description": "当前选中的时长值。",
50
+ "optional": true
51
+ }
52
+ ]
53
+ }
54
+ ],
55
+ "slots": [],
56
+ "methods": [],
57
+ "examples": [
58
+ {
59
+ "id": "duration_renew",
60
+ "title": "续费时长选择",
61
+ "description": "按月展示常用刻度,并把结果同步到续费表单。",
62
+ "difficulty": "easy",
63
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Duration } from '@ksyun-internal/versatile';\n\nconst duration = ref(3);\n</script>\n\n<template>\n <Duration v-model=\"duration\" type=\"month\" marks-type=\"month\" />\n</template>",
64
+ "tags": [
65
+ "duration",
66
+ "renew"
67
+ ],
68
+ "usedProps": [
69
+ "modelValue",
70
+ "type",
71
+ "marksType"
72
+ ],
73
+ "usedEvents": [
74
+ "update:modelValue"
75
+ ],
76
+ "usedMethods": [],
77
+ "scenario": "在购买或续费流程中选择资源有效时长。"
78
+ },
79
+ {
80
+ "id": "duration_hour_mode",
81
+ "title": "按小时选择时长",
82
+ "description": "在临时资源场景中切换到按小时的时长选择。",
83
+ "difficulty": "medium",
84
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Duration } from '@ksyun-internal/versatile';\n\nconst duration = ref(12);\n</script>\n\n<template>\n <Duration v-model=\"duration\" type=\"hour\" marks-type=\"hour\" />\n</template>",
85
+ "tags": [
86
+ "duration",
87
+ "hour"
88
+ ],
89
+ "usedProps": [
90
+ "modelValue",
91
+ "type",
92
+ "marksType"
93
+ ],
94
+ "usedEvents": [
95
+ "update:modelValue"
96
+ ],
97
+ "usedMethods": [],
98
+ "scenario": "在临时测试机或弹性资源场景中按小时设置有效时长。"
99
+ }
100
+ ],
101
+ "searchKeywords": [
102
+ "duration",
103
+ "period",
104
+ "时长选择",
105
+ "购买时长",
106
+ "按小时时长",
107
+ "续费周期"
108
+ ],
109
+ "useCases": [
110
+ "购买链路时长选择",
111
+ "资源续费时长选择",
112
+ "按小时设置临时资源周期"
113
+ ],
114
+ "typeDefinitions": [
115
+ {
116
+ "name": "DurationValue",
117
+ "definition": "type DurationValue = string | number",
118
+ "description": "时长值类型,可用于表达月、年或小时等周期值。"
119
+ }
120
+ ],
121
+ "relatedComponents": [
122
+ "Slider",
123
+ "TimeRange"
124
+ ]
125
+ }
@@ -61,6 +61,28 @@
61
61
  "default": "false",
62
62
  "usageExample": "<Editable disabled />"
63
63
  },
64
+ {
65
+ "name": "placeholder",
66
+ "description": "编辑态输入框的占位提示文本",
67
+ "type": {
68
+ "raw": "string",
69
+ "kind": "string"
70
+ },
71
+ "required": false,
72
+ "default": "undefined",
73
+ "usageExample": "<Editable placeholder=\"请输入内容\" />"
74
+ },
75
+ {
76
+ "name": "title",
77
+ "description": "编辑按钮或输入区域的标题提示文本",
78
+ "type": {
79
+ "raw": "string",
80
+ "kind": "string"
81
+ },
82
+ "required": false,
83
+ "default": "\"编辑\"",
84
+ "usageExample": "<Editable title=\"修改名称\" />"
85
+ },
64
86
  {
65
87
  "name": "tip",
66
88
  "description": "编辑按钮提示文案",
@@ -94,6 +116,50 @@
94
116
  "default": "false",
95
117
  "usageExample": "<Editable :invalid=\"hasError\" />"
96
118
  },
119
+ {
120
+ "name": "errorTip",
121
+ "description": "验证失败时显示的错误提示文案",
122
+ "type": {
123
+ "raw": "string",
124
+ "kind": "string"
125
+ },
126
+ "required": false,
127
+ "default": "\"输入有误\"",
128
+ "usageExample": "<Editable error-tip=\"名称格式不正确\" />"
129
+ },
130
+ {
131
+ "name": "okText",
132
+ "description": "确认按钮文案",
133
+ "type": {
134
+ "raw": "string",
135
+ "kind": "string"
136
+ },
137
+ "required": false,
138
+ "default": "\"确定\"",
139
+ "usageExample": "<Editable ok-text=\"保存\" />"
140
+ },
141
+ {
142
+ "name": "cancelText",
143
+ "description": "取消按钮文案",
144
+ "type": {
145
+ "raw": "string",
146
+ "kind": "string"
147
+ },
148
+ "required": false,
149
+ "default": "\"取消\"",
150
+ "usageExample": "<Editable cancel-text=\"放弃\" />"
151
+ },
152
+ {
153
+ "name": "type",
154
+ "description": "编辑输入框类型,通常用于切换单行或其他输入模式",
155
+ "type": {
156
+ "raw": "string",
157
+ "kind": "string"
158
+ },
159
+ "required": false,
160
+ "default": "undefined",
161
+ "usageExample": "<Editable type=\"textarea\" />"
162
+ },
97
163
  {
98
164
  "name": "rows",
99
165
  "description": "是否自动折行及行数控制,可为数字、'auto' 或包含 min/max 的对象",
@@ -53,6 +53,32 @@
53
53
  ],
54
54
  "usageExample": "<Ellipsis position=\"bottom\">长文本</Ellipsis>"
55
55
  },
56
+ {
57
+ "name": "theme",
58
+ "description": "Tooltip 主题",
59
+ "type": {
60
+ "raw": "\"dark\" | \"light\"",
61
+ "kind": "union",
62
+ "unionTypes": [
63
+ "dark",
64
+ "light"
65
+ ]
66
+ },
67
+ "required": false,
68
+ "default": "\"light\"",
69
+ "usageExample": "<Ellipsis theme=\"dark\">长文本</Ellipsis>"
70
+ },
71
+ {
72
+ "name": "hoverable",
73
+ "description": "悬浮提示层是否在鼠标移入 Tooltip 内容时仍然保持显示",
74
+ "type": {
75
+ "raw": "boolean",
76
+ "kind": "boolean"
77
+ },
78
+ "required": false,
79
+ "default": "false",
80
+ "usageExample": "<Ellipsis hoverable>长文本</Ellipsis>"
81
+ },
56
82
  {
57
83
  "name": "disabled",
58
84
  "description": "是否禁用 Tooltip 提示(禁用后悬停不会显示完整内容)",
@@ -212,7 +238,14 @@
212
238
  "文章摘要展示",
213
239
  "商品名称省略"
214
240
  ],
241
+ "typeDefinitions": [
242
+ {
243
+ "name": "EllipsisLines",
244
+ "definition": "type EllipsisLines = number",
245
+ "description": "文本省略最大行数类型,用于控制多行截断。"
246
+ }
247
+ ],
215
248
  "relatedComponents": [
216
249
  "Tooltip"
217
250
  ]
218
- }
251
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "id": "filtertablefieldsdialog",
3
+ "name": "FilterTableFieldsDialog",
4
+ "displayName": "表格字段筛选弹窗",
5
+ "category": "feedback",
6
+ "description": "用于自定义表格可见列的配置弹窗,常与 ProTable、标准列表页联动,让用户自行决定展示哪些字段。",
7
+ "importStatement": "import { FilterTableFieldsDialog } from '@ksyun-internal/versatile';",
8
+ "props": [
9
+ {
10
+ "name": "modelValue",
11
+ "description": "弹窗显示状态",
12
+ "type": {
13
+ "raw": "boolean",
14
+ "kind": "boolean"
15
+ },
16
+ "required": false
17
+ },
18
+ {
19
+ "name": "fields",
20
+ "description": "可配置字段列表",
21
+ "type": {
22
+ "raw": "TableFieldItem[]",
23
+ "kind": "array"
24
+ },
25
+ "required": true
26
+ }
27
+ ],
28
+ "events": [
29
+ {
30
+ "name": "update:modelValue",
31
+ "vueEventName": "@update:modelValue",
32
+ "description": "弹窗开关状态变化时触发,用于控制列设置面板显隐。",
33
+ "params": [
34
+ {
35
+ "name": "value",
36
+ "type": "boolean",
37
+ "description": "当前列设置弹窗是否显示。",
38
+ "optional": true
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "name": "change:noCheckedColFields",
44
+ "vueEventName": "@change:noCheckedColFields",
45
+ "description": "未勾选列集合变化时触发,便于把列配置持久化到本地或服务端。",
46
+ "params": [
47
+ {
48
+ "name": "value",
49
+ "type": "string[]",
50
+ "description": "当前未勾选字段的 key 列表。",
51
+ "optional": true
52
+ }
53
+ ]
54
+ }
55
+ ],
56
+ "slots": [],
57
+ "methods": [],
58
+ "examples": [
59
+ {
60
+ "id": "filtertablefieldsdialog_columns",
61
+ "title": "列表列展示配置",
62
+ "description": "通过字段列表控制表格哪些列默认展示。",
63
+ "difficulty": "easy",
64
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { FilterTableFieldsDialog } from '@ksyun-internal/versatile';\n\nconst visible = ref(true);\nconst fields = [\n { key: 'id', label: '实例 ID', checked: true },\n { key: 'name', label: '实例名称', checked: true },\n { key: 'privateIp', label: '内网 IP', checked: false },\n];\n</script>\n\n<template>\n <FilterTableFieldsDialog v-model=\"visible\" :fields=\"fields\" />\n</template>",
65
+ "tags": [
66
+ "table",
67
+ "fields"
68
+ ],
69
+ "usedProps": [
70
+ "modelValue",
71
+ "fields"
72
+ ],
73
+ "usedEvents": [
74
+ "update:modelValue",
75
+ "change:noCheckedColFields"
76
+ ],
77
+ "usedMethods": [],
78
+ "scenario": "让用户自主配置列表页中要显示的列。"
79
+ },
80
+ {
81
+ "id": "filtertablefieldsdialog_persist",
82
+ "title": "持久化隐藏列配置",
83
+ "description": "监听未勾选字段变化并保存到本地缓存。",
84
+ "difficulty": "medium",
85
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { FilterTableFieldsDialog } from '@ksyun-internal/versatile';\n\nconst visible = ref(true);\nconst fields = [\n { key: 'id', label: '实例 ID', checked: true },\n { key: 'zone', label: '可用区', checked: true },\n { key: 'privateIp', label: '内网 IP', checked: false },\n];\nconst handleChange = (hiddenFields: string[]) => {\n localStorage.setItem('instance-hidden-fields', JSON.stringify(hiddenFields));\n};\n</script>\n\n<template>\n <FilterTableFieldsDialog\n v-model=\"visible\"\n :fields=\"fields\"\n @change:noCheckedColFields=\"handleChange\"\n />\n</template>",
86
+ "tags": [
87
+ "table",
88
+ "persist"
89
+ ],
90
+ "usedProps": [
91
+ "modelValue",
92
+ "fields"
93
+ ],
94
+ "usedEvents": [
95
+ "change:noCheckedColFields"
96
+ ],
97
+ "usedMethods": [],
98
+ "scenario": "让用户的列显示偏好在刷新页面后仍然保留。"
99
+ }
100
+ ],
101
+ "searchKeywords": [
102
+ "filter table fields dialog",
103
+ "column settings",
104
+ "列筛选弹窗",
105
+ "字段配置",
106
+ "列展示设置",
107
+ "column chooser",
108
+ "表格列管理",
109
+ "隐藏列"
110
+ ],
111
+ "useCases": [
112
+ "表格字段自定义",
113
+ "列表列设置",
114
+ "列显示偏好持久化",
115
+ "用户自定义列表展示字段"
116
+ ],
117
+ "relatedComponents": [
118
+ "ProTable",
119
+ "LayoutStandardList"
120
+ ],
121
+ "typeDefinitions": [
122
+ {
123
+ "name": "TableFieldItem",
124
+ "definition": "type TableFieldItem = {\n key: string\n label: string\n checked?: boolean\n}",
125
+ "description": "可配置表格列项,描述字段 key、显示名称和默认勾选状态。"
126
+ }
127
+ ]
128
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "id": "flex",
3
+ "name": "Flex",
4
+ "displayName": "弹性布局",
5
+ "category": "layout",
6
+ "description": "对 Flexbox 的业务友好封装,适合快速实现工具栏、卡片头部、表单辅助区等横向或纵向弹性布局。",
7
+ "importStatement": "import { Flex } from '@ksyun-internal/versatile';",
8
+ "props": [
9
+ {
10
+ "name": "align",
11
+ "description": "交叉轴对齐方式",
12
+ "type": {
13
+ "raw": "'normal' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch'",
14
+ "kind": "union"
15
+ },
16
+ "required": false,
17
+ "default": "'normal'"
18
+ },
19
+ {
20
+ "name": "justify",
21
+ "description": "主轴对齐方式",
22
+ "type": {
23
+ "raw": "'normal' | 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around'",
24
+ "kind": "union"
25
+ },
26
+ "required": false,
27
+ "default": "'normal'"
28
+ },
29
+ {
30
+ "name": "wrap",
31
+ "description": "换行方式",
32
+ "type": {
33
+ "raw": "'nowrap' | 'wrap' | 'wrap-reverse' | boolean",
34
+ "kind": "union"
35
+ },
36
+ "required": false,
37
+ "default": "'nowrap'"
38
+ },
39
+ {
40
+ "name": "inline",
41
+ "description": "是否以行内 flex 容器渲染",
42
+ "type": {
43
+ "raw": "boolean",
44
+ "kind": "boolean"
45
+ },
46
+ "required": false,
47
+ "default": "false"
48
+ },
49
+ {
50
+ "name": "vertical",
51
+ "description": "是否启用纵向布局",
52
+ "type": {
53
+ "raw": "boolean",
54
+ "kind": "boolean"
55
+ },
56
+ "required": false,
57
+ "default": "false"
58
+ },
59
+ {
60
+ "name": "gap",
61
+ "description": "子元素间距,支持预设值或自定义字符串",
62
+ "type": {
63
+ "raw": "'small' | 'middle' | 'large' | string",
64
+ "kind": "union"
65
+ },
66
+ "required": false,
67
+ "default": "'small'"
68
+ },
69
+ {
70
+ "name": "component",
71
+ "description": "容器渲染的标签或组件类型",
72
+ "type": {
73
+ "raw": "string | Component",
74
+ "kind": "union"
75
+ },
76
+ "required": false,
77
+ "default": "'div'"
78
+ }
79
+ ],
80
+ "events": [],
81
+ "slots": [
82
+ {
83
+ "name": "default",
84
+ "description": "Flex 容器内容",
85
+ "vueTemplate": "<Flex>...</Flex>"
86
+ }
87
+ ],
88
+ "methods": [],
89
+ "examples": [
90
+ {
91
+ "id": "flex_toolbar",
92
+ "title": "工具栏左右分布布局",
93
+ "description": "用 Flex 快速搭建常见的左右两端对齐工具栏。",
94
+ "difficulty": "easy",
95
+ "code": "<script setup lang=\"ts\">\nimport { Flex } from '@ksyun-internal/versatile';\n</script>\n\n<template>\n <Flex justify=\"space-between\" align=\"center\" gap=\"middle\">\n <div>实例列表</div>\n <div>刷新 / 导出 / 新建</div>\n </Flex>\n</template>",
96
+ "tags": [
97
+ "layout",
98
+ "toolbar"
99
+ ],
100
+ "usedProps": [
101
+ "justify",
102
+ "align",
103
+ "gap"
104
+ ],
105
+ "usedEvents": [],
106
+ "usedMethods": [],
107
+ "scenario": "搭建列表页顶部的标题和操作区。"
108
+ },
109
+ {
110
+ "id": "flex_vertical_stack",
111
+ "title": "纵向信息堆叠",
112
+ "description": "使用 vertical 和 gap 快速搭建纵向信息区。",
113
+ "difficulty": "medium",
114
+ "code": "<script setup lang=\"ts\">\nimport { Flex } from '@ksyun-internal/versatile';\n</script>\n\n<template>\n <Flex vertical gap=\"large\">\n <div>实例规格:4C8G</div>\n <div>系统盘:100GB SSD</div>\n <div>网络:经典网络</div>\n </Flex>\n</template>",
115
+ "tags": [
116
+ "layout",
117
+ "vertical"
118
+ ],
119
+ "usedProps": [
120
+ "vertical",
121
+ "gap"
122
+ ],
123
+ "usedEvents": [],
124
+ "usedMethods": [],
125
+ "scenario": "在详情摘要区纵向排列多条关键信息。"
126
+ }
127
+ ],
128
+ "searchKeywords": [
129
+ "flex",
130
+ "layout",
131
+ "弹性布局",
132
+ "对齐",
133
+ "gap"
134
+ ],
135
+ "useCases": [
136
+ "工具栏布局",
137
+ "信息块横向或纵向排列",
138
+ "纵向摘要区排版"
139
+ ],
140
+ "typeDefinitions": [
141
+ {
142
+ "name": "FlexJustify",
143
+ "definition": "type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around'",
144
+ "description": "弹性布局主轴对齐方式枚举。"
145
+ }
146
+ ],
147
+ "relatedComponents": [
148
+ "LayoutContent",
149
+ "LayoutListContent"
150
+ ]
151
+ }
@@ -89,6 +89,137 @@
89
89
  }
90
90
  ],
91
91
  "usageExample": "<Form size=\"small\"></Form>"
92
+ },
93
+ {
94
+ "name": "acceptcharset",
95
+ "description": "原生 acceptcharset 属性,指定服务器可处理的字符编码",
96
+ "type": {
97
+ "raw": "string",
98
+ "kind": "string"
99
+ },
100
+ "required": false,
101
+ "default": "undefined",
102
+ "usageExample": "<Form acceptcharset=\"UTF-8\"></Form>",
103
+ "tags": [
104
+ "native"
105
+ ]
106
+ },
107
+ {
108
+ "name": "autocomplete",
109
+ "description": "原生 autocomplete 属性,指定表单自动补全行为",
110
+ "type": {
111
+ "raw": "string",
112
+ "kind": "string"
113
+ },
114
+ "required": false,
115
+ "default": "undefined",
116
+ "usageExample": "<Form autocomplete=\"off\"></Form>",
117
+ "tags": [
118
+ "native"
119
+ ]
120
+ },
121
+ {
122
+ "name": "name",
123
+ "description": "原生 name 属性",
124
+ "type": {
125
+ "raw": "string",
126
+ "kind": "string"
127
+ },
128
+ "required": false,
129
+ "default": "undefined",
130
+ "usageExample": "<Form name=\"loginForm\"></Form>",
131
+ "tags": [
132
+ "native"
133
+ ]
134
+ },
135
+ {
136
+ "name": "rel",
137
+ "description": "原生 rel 属性,指定表单与目标资源的关系",
138
+ "type": {
139
+ "raw": "string",
140
+ "kind": "string"
141
+ },
142
+ "required": false,
143
+ "default": "undefined",
144
+ "usageExample": "<Form rel=\"external\"></Form>",
145
+ "tags": [
146
+ "native"
147
+ ]
148
+ },
149
+ {
150
+ "name": "action",
151
+ "description": "原生 action 属性,指定表单提交地址",
152
+ "type": {
153
+ "raw": "string",
154
+ "kind": "string"
155
+ },
156
+ "required": false,
157
+ "default": "undefined",
158
+ "usageExample": "<Form action=\"/api/submit\"></Form>",
159
+ "tags": [
160
+ "native"
161
+ ]
162
+ },
163
+ {
164
+ "name": "enctype",
165
+ "description": "原生 enctype 属性,指定表单提交编码类型",
166
+ "type": {
167
+ "raw": "string",
168
+ "kind": "string"
169
+ },
170
+ "required": false,
171
+ "default": "undefined",
172
+ "usageExample": "<Form enctype=\"multipart/form-data\"></Form>",
173
+ "tags": [
174
+ "native"
175
+ ]
176
+ },
177
+ {
178
+ "name": "method",
179
+ "description": "原生 method 属性,指定表单提交方法",
180
+ "type": {
181
+ "raw": "\"post\" | \"get\" | \"dialog\"",
182
+ "kind": "union",
183
+ "unionTypes": [
184
+ "post",
185
+ "get",
186
+ "dialog"
187
+ ]
188
+ },
189
+ "required": false,
190
+ "default": "undefined",
191
+ "usageExample": "<Form method=\"post\"></Form>",
192
+ "tags": [
193
+ "native"
194
+ ]
195
+ },
196
+ {
197
+ "name": "novalidate",
198
+ "description": "原生 novalidate 属性,提交时跳过原生表单校验",
199
+ "type": {
200
+ "raw": "boolean",
201
+ "kind": "boolean"
202
+ },
203
+ "required": false,
204
+ "default": "undefined",
205
+ "usageExample": "<Form novalidate></Form>",
206
+ "tags": [
207
+ "native"
208
+ ]
209
+ },
210
+ {
211
+ "name": "target",
212
+ "description": "原生 target 属性,指定表单响应的打开位置",
213
+ "type": {
214
+ "raw": "string",
215
+ "kind": "string"
216
+ },
217
+ "required": false,
218
+ "default": "undefined",
219
+ "usageExample": "<Form target=\"_blank\"></Form>",
220
+ "tags": [
221
+ "native"
222
+ ]
92
223
  }
93
224
  ],
94
225
  "events": [