king-design-analyzer 2.1.9 → 2.2.1

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 (327) hide show
  1. package/components/actions.json +109 -0
  2. package/components/advancedset.json +128 -0
  3. package/components/affix.json +8 -0
  4. package/components/aksk.json +172 -0
  5. package/components/anchor.json +220 -0
  6. package/components/anchorlink.json +111 -0
  7. package/components/az.json +15 -2
  8. package/components/badge.json +8 -0
  9. package/components/billtypes.json +14 -2
  10. package/components/breadcrumb.json +9 -1
  11. package/components/button.json +192 -0
  12. package/components/buttonlink.json +74 -0
  13. package/components/card.json +14 -4
  14. package/components/cardcol.json +142 -0
  15. package/components/cardcols.json +121 -0
  16. package/components/cardcontent.json +20 -3
  17. package/components/cardtabs.json +172 -0
  18. package/components/carousel.json +7 -0
  19. package/components/cascader.json +576 -368
  20. package/components/checkbox.json +51 -4
  21. package/components/cidrinput.json +140 -0
  22. package/components/code.json +8 -1
  23. package/components/collapse.json +335 -341
  24. package/components/colorpicker.json +217 -0
  25. package/components/configprovider.json +96 -0
  26. package/components/copy.json +7 -0
  27. package/components/copyhover.json +111 -0
  28. package/components/copyrow.json +125 -0
  29. package/components/datepicker.json +656 -524
  30. package/components/description.json +98 -0
  31. package/components/descriptions.json +10 -3
  32. package/components/diagram.json +295 -0
  33. package/components/dialog.json +526 -455
  34. package/components/divider.json +9 -1
  35. package/components/drawer.json +603 -558
  36. package/components/dropdown.json +464 -384
  37. package/components/duration.json +125 -0
  38. package/components/editable.json +66 -0
  39. package/components/ellipsis.json +34 -1
  40. package/components/filtertablefieldsdialog.json +128 -0
  41. package/components/flex.json +152 -0
  42. package/components/form.json +143 -3
  43. package/components/formiteminput.json +214 -0
  44. package/components/formitemspinner.json +213 -0
  45. package/components/formitemswitch.json +185 -0
  46. package/components/formitemtableconfigs.json +210 -0
  47. package/components/grid.json +7 -0
  48. package/components/header.json +165 -0
  49. package/components/icon.json +13 -1
  50. package/components/icontooltip.json +19 -1
  51. package/components/input.json +196 -8
  52. package/components/instancelist.json +194 -0
  53. package/components/instancenum.json +196 -0
  54. package/components/ipinput.json +117 -0
  55. package/components/kspstatus.json +205 -0
  56. package/components/kvcode.json +120 -0
  57. package/components/layoutcontent.json +24 -3
  58. package/components/layoutlistcontent.json +157 -0
  59. package/components/layoutpermissioncontent.json +156 -0
  60. package/components/layoutstandardlist.json +276 -0
  61. package/components/layouttabs.json +168 -0
  62. package/components/lazymount.json +87 -0
  63. package/components/lazyteleport.json +119 -0
  64. package/components/menu.json +11 -3
  65. package/components/notification.json +351 -0
  66. package/components/pagination.json +12 -0
  67. package/components/paginationplus.json +30 -3
  68. package/components/password.json +121 -0
  69. package/components/popover.json +457 -437
  70. package/components/projects.json +129 -0
  71. package/components/protable.json +99 -8
  72. package/components/queuevisualrange.json +110 -0
  73. package/components/radio.json +82 -2
  74. package/components/rate.json +200 -0
  75. package/components/region.json +14 -2
  76. package/components/scrollselect.json +140 -0
  77. package/components/search.json +221 -0
  78. package/components/searchinput.json +132 -0
  79. package/components/searchitems.json +215 -0
  80. package/components/searchselect.json +195 -0
  81. package/components/select.json +749 -666
  82. package/components/sidebar.json +198 -0
  83. package/components/skeleton.json +234 -0
  84. package/components/slider.json +12 -2
  85. package/components/spin.json +10 -2
  86. package/components/spinner.json +419 -429
  87. package/components/split.json +263 -0
  88. package/components/sshkeys.json +138 -0
  89. package/components/status.json +60 -3
  90. package/components/steps.json +7 -0
  91. package/components/switch.json +12 -3
  92. package/components/table.json +24 -2
  93. package/components/tablecolumnid.json +14 -2
  94. package/components/tabs.json +14 -2
  95. package/components/tag.json +8 -5
  96. package/components/timeline.json +215 -0
  97. package/components/timepicker.json +147 -3
  98. package/components/timerange.json +262 -0
  99. package/components/tip.json +27 -0
  100. package/components/tooltip.json +492 -395
  101. package/components/tour.json +418 -372
  102. package/components/transfer.json +79 -8
  103. package/components/tree.json +28 -5
  104. package/components/treeselect.json +612 -475
  105. package/components/upload.json +474 -473
  106. package/components/vdialog.json +309 -0
  107. package/components/vdrawer.json +335 -0
  108. package/components/virtuallist.json +7 -0
  109. package/dist/ast/index.d.mts +65 -2
  110. package/dist/ast/index.d.ts +65 -2
  111. package/dist/ast/index.js +4 -3
  112. package/dist/ast/index.mjs +2 -1
  113. package/dist/chunk-4OTQAQ6J.mjs +341 -0
  114. package/dist/{chunk-F26GUCGG.js → chunk-4WXOYU2N.js} +32 -9
  115. package/dist/chunk-6HOIRUQB.mjs +409 -0
  116. package/dist/chunk-DHLWNT53.js +364 -0
  117. package/dist/{chunk-H2ET6MMM.mjs → chunk-IPJJMPOO.mjs} +155 -66
  118. package/dist/{chunk-WYSRJVX4.js → chunk-JJ6AB4ZH.js} +2 -2
  119. package/dist/{chunk-2W6OCG2S.js → chunk-JNRGUR3O.js} +155 -67
  120. package/dist/chunk-KF5YBEM5.js +143 -0
  121. package/dist/{chunk-OJOHB64C.mjs → chunk-LRTDTFFQ.mjs} +28 -5
  122. package/dist/{chunk-DSWKLUIX.mjs → chunk-NZL6T22V.mjs} +1 -1
  123. package/dist/chunk-QC6VTSA3.mjs +117 -0
  124. package/dist/chunk-V5N65MRP.js +411 -0
  125. package/dist/full/index.d.mts +2 -0
  126. package/dist/full/index.d.ts +2 -0
  127. package/dist/full/index.js +7 -6
  128. package/dist/full/index.mjs +5 -4
  129. package/dist/index.d.mts +1 -0
  130. package/dist/index.d.ts +1 -0
  131. package/dist/index.js +14 -13
  132. package/dist/index.mjs +6 -5
  133. package/dist/metadata/index.d.mts +38 -3
  134. package/dist/metadata/index.d.ts +38 -3
  135. package/dist/metadata/index.js +26 -16
  136. package/dist/metadata/index.mjs +26 -15
  137. package/dist/resolve-BsLBxlBi.d.mts +24 -0
  138. package/dist/resolve-BsLBxlBi.d.ts +24 -0
  139. package/dist/runtime/index.d.mts +2 -0
  140. package/dist/runtime/index.d.ts +2 -0
  141. package/dist/runtime/index.js +4 -4
  142. package/dist/runtime/index.mjs +2 -2
  143. package/dist/shared/index.d.mts +10 -0
  144. package/dist/shared/index.d.ts +10 -0
  145. package/dist/shared/index.js +23 -0
  146. package/dist/shared/index.mjs +2 -0
  147. package/dist/static/index.js +5 -5
  148. package/dist/static/index.mjs +2 -2
  149. package/docs_for_llm/actions.doc.md +87 -0
  150. package/docs_for_llm/advancedset.doc.md +98 -0
  151. package/docs_for_llm/affix.doc.md +20 -7
  152. package/docs_for_llm/aksk.doc.md +111 -0
  153. package/docs_for_llm/anchor.doc.md +155 -0
  154. package/docs_for_llm/anchorlink.doc.md +75 -0
  155. package/docs_for_llm/az.doc.md +17 -11
  156. package/docs_for_llm/badge.doc.md +11 -5
  157. package/docs_for_llm/billtypes.doc.md +17 -11
  158. package/docs_for_llm/breadcrumb.doc.md +80 -4
  159. package/docs_for_llm/button.doc.md +91 -18
  160. package/docs_for_llm/buttonlink.doc.md +64 -0
  161. package/docs_for_llm/card.doc.md +58 -8
  162. package/docs_for_llm/cardcol.doc.md +78 -0
  163. package/docs_for_llm/cardcols.doc.md +84 -0
  164. package/docs_for_llm/cardcontent.doc.md +31 -10
  165. package/docs_for_llm/cardtabs.doc.md +106 -0
  166. package/docs_for_llm/carousel.doc.md +79 -7
  167. package/docs_for_llm/cascader.doc.md +106 -23
  168. package/docs_for_llm/checkbox.doc.md +25 -13
  169. package/docs_for_llm/cidrinput.doc.md +83 -0
  170. package/docs_for_llm/code.doc.md +22 -11
  171. package/docs_for_llm/collapse.doc.md +147 -14
  172. package/docs_for_llm/colorpicker.doc.md +104 -0
  173. package/docs_for_llm/configprovider.doc.md +77 -0
  174. package/docs_for_llm/copy.doc.md +15 -13
  175. package/docs_for_llm/copyhover.doc.md +59 -0
  176. package/docs_for_llm/copyrow.doc.md +80 -0
  177. package/docs_for_llm/datepicker.doc.md +66 -35
  178. package/docs_for_llm/description.doc.md +75 -0
  179. package/docs_for_llm/descriptions.doc.md +122 -10
  180. package/docs_for_llm/diagram.doc.md +343 -0
  181. package/docs_for_llm/dialog.doc.md +97 -77
  182. package/docs_for_llm/divider.doc.md +14 -7
  183. package/docs_for_llm/drawer.doc.md +114 -69
  184. package/docs_for_llm/dropdown.doc.md +290 -22
  185. package/docs_for_llm/duration.doc.md +76 -0
  186. package/docs_for_llm/editable.doc.md +36 -14
  187. package/docs_for_llm/ellipsis.doc.md +10 -5
  188. package/docs_for_llm/filtertablefieldsdialog.doc.md +99 -0
  189. package/docs_for_llm/flex.doc.md +83 -0
  190. package/docs_for_llm/form.doc.md +196 -18
  191. package/docs_for_llm/formiteminput.doc.md +128 -0
  192. package/docs_for_llm/formitemspinner.doc.md +105 -0
  193. package/docs_for_llm/formitemswitch.doc.md +113 -0
  194. package/docs_for_llm/formitemtableconfigs.doc.md +95 -0
  195. package/docs_for_llm/grid.doc.md +78 -5
  196. package/docs_for_llm/header.doc.md +114 -0
  197. package/docs_for_llm/icon.doc.md +12 -8
  198. package/docs_for_llm/icontooltip.doc.md +121 -0
  199. package/docs_for_llm/input.doc.md +199 -41
  200. package/docs_for_llm/instancelist.doc.md +113 -0
  201. package/docs_for_llm/instancenum.doc.md +95 -0
  202. package/docs_for_llm/ipinput.doc.md +77 -0
  203. package/docs_for_llm/kspstatus.doc.md +82 -0
  204. package/docs_for_llm/kvcode.doc.md +76 -0
  205. package/docs_for_llm/layoutcontent.doc.md +54 -17
  206. package/docs_for_llm/layoutlistcontent.doc.md +168 -0
  207. package/docs_for_llm/layoutpermissioncontent.doc.md +93 -0
  208. package/docs_for_llm/layoutstandardlist.doc.md +129 -0
  209. package/docs_for_llm/layouttabs.doc.md +101 -0
  210. package/docs_for_llm/lazymount.doc.md +82 -0
  211. package/docs_for_llm/lazyteleport.doc.md +85 -0
  212. package/docs_for_llm/menu.doc.md +139 -14
  213. package/docs_for_llm/message.doc.md +93 -10
  214. package/docs_for_llm/notification.doc.md +214 -0
  215. package/docs_for_llm/pagination.doc.md +30 -17
  216. package/docs_for_llm/paginationplus.doc.md +31 -10
  217. package/docs_for_llm/password.doc.md +86 -0
  218. package/docs_for_llm/popover.doc.md +24 -55
  219. package/docs_for_llm/progress.doc.md +13 -10
  220. package/docs_for_llm/projects.doc.md +91 -0
  221. package/docs_for_llm/protable.doc.md +98 -15
  222. package/docs_for_llm/queuevisualrange.doc.md +78 -0
  223. package/docs_for_llm/radio.doc.md +23 -8
  224. package/docs_for_llm/rate.doc.md +127 -0
  225. package/docs_for_llm/region.doc.md +25 -13
  226. package/docs_for_llm/scrollselect.doc.md +90 -0
  227. package/docs_for_llm/search.doc.md +120 -0
  228. package/docs_for_llm/searchinput.doc.md +111 -0
  229. package/docs_for_llm/searchitems.doc.md +116 -0
  230. package/docs_for_llm/searchselect.doc.md +126 -0
  231. package/docs_for_llm/select.doc.md +208 -49
  232. package/docs_for_llm/sidebar.doc.md +133 -0
  233. package/docs_for_llm/skeleton.doc.md +152 -0
  234. package/docs_for_llm/slider.doc.md +42 -22
  235. package/docs_for_llm/spin.doc.md +18 -6
  236. package/docs_for_llm/spinner.doc.md +28 -18
  237. package/docs_for_llm/split.doc.md +170 -0
  238. package/docs_for_llm/sshkeys.doc.md +88 -0
  239. package/docs_for_llm/status.doc.md +14 -9
  240. package/docs_for_llm/steps.doc.md +81 -7
  241. package/docs_for_llm/switch.doc.md +32 -16
  242. package/docs_for_llm/table.doc.md +317 -55
  243. package/docs_for_llm/tablecolumnid.doc.md +36 -16
  244. package/docs_for_llm/tabs.doc.md +117 -12
  245. package/docs_for_llm/tag.doc.md +167 -15
  246. package/docs_for_llm/timeline.doc.md +187 -0
  247. package/docs_for_llm/timepicker.doc.md +74 -36
  248. package/docs_for_llm/timerange.doc.md +157 -0
  249. package/docs_for_llm/tip.doc.md +50 -11
  250. package/docs_for_llm/tooltip.doc.md +99 -27
  251. package/docs_for_llm/tour.doc.md +125 -28
  252. package/docs_for_llm/transfer.doc.md +99 -33
  253. package/docs_for_llm/tree.doc.md +129 -24
  254. package/docs_for_llm/treeselect.doc.md +101 -44
  255. package/docs_for_llm/upload.doc.md +63 -32
  256. package/docs_for_llm/useCRUD.doc.md +49 -0
  257. package/docs_for_llm/useCountdown.doc.md +43 -0
  258. package/docs_for_llm/useDetail.doc.md +48 -0
  259. package/docs_for_llm/useDialog.doc.md +46 -0
  260. package/docs_for_llm/useEntity.doc.md +45 -0
  261. package/docs_for_llm/useEventListener.doc.md +44 -0
  262. package/docs_for_llm/useFalseUntilTruthy.doc.md +41 -0
  263. package/docs_for_llm/useGetCopyAuthText.doc.md +35 -0
  264. package/docs_for_llm/useGetUserPermission.doc.md +43 -0
  265. package/docs_for_llm/useGroup.doc.md +48 -0
  266. package/docs_for_llm/useIdEntities.doc.md +48 -0
  267. package/docs_for_llm/useIdEntity.doc.md +103 -0
  268. package/docs_for_llm/useInterval.doc.md +43 -0
  269. package/docs_for_llm/useLayoutStandardList.doc.md +38 -0
  270. package/docs_for_llm/useMessage.doc.md +46 -0
  271. package/docs_for_llm/useModifyCache.doc.md +37 -0
  272. package/docs_for_llm/useOpenDialog.doc.md +41 -0
  273. package/docs_for_llm/usePagination.doc.md +60 -0
  274. package/docs_for_llm/usePersist.doc.md +54 -0
  275. package/docs_for_llm/usePoll.doc.md +41 -0
  276. package/docs_for_llm/useRoutePlus.doc.md +34 -0
  277. package/docs_for_llm/useRouterPlus.doc.md +34 -0
  278. package/docs_for_llm/useSearch.doc.md +68 -0
  279. package/docs_for_llm/useShell.doc.md +43 -0
  280. package/docs_for_llm/useSkip.doc.md +41 -0
  281. package/docs_for_llm/useStorageIdEntity.doc.md +46 -0
  282. package/docs_for_llm/useStore.doc.md +34 -0
  283. package/docs_for_llm/useTable.doc.md +57 -0
  284. package/docs_for_llm/useTableGroup.doc.md +47 -0
  285. package/docs_for_llm/useTableSort.doc.md +40 -0
  286. package/docs_for_llm/useToState.doc.md +112 -0
  287. package/docs_for_llm/useUser.doc.md +38 -0
  288. package/docs_for_llm/useValidForm.doc.md +41 -0
  289. package/docs_for_llm/vdialog.doc.md +154 -0
  290. package/docs_for_llm/vdrawer.doc.md +148 -0
  291. package/docs_for_llm/virtuallist.doc.md +157 -3
  292. package/hooks/useCRUD.json +61 -0
  293. package/hooks/useCountdown.json +49 -0
  294. package/hooks/useDetail.json +67 -0
  295. package/hooks/useDialog.json +49 -0
  296. package/hooks/useEntity.json +61 -0
  297. package/hooks/useEventListener.json +61 -0
  298. package/hooks/useFalseUntilTruthy.json +43 -0
  299. package/hooks/useGetCopyAuthText.json +36 -0
  300. package/hooks/useGetUserPermission.json +55 -0
  301. package/hooks/useGroup.json +49 -0
  302. package/hooks/useIdEntities.json +61 -0
  303. package/hooks/useInterval.json +55 -0
  304. package/hooks/useLayoutStandardList.json +36 -0
  305. package/hooks/useMessage.json +73 -0
  306. package/hooks/useModifyCache.json +36 -0
  307. package/hooks/useOpenDialog.json +43 -0
  308. package/hooks/usePagination.json +49 -0
  309. package/hooks/usePersist.json +61 -0
  310. package/hooks/usePoll.json +43 -0
  311. package/hooks/useRoutePlus.json +36 -0
  312. package/hooks/useRouterPlus.json +36 -0
  313. package/hooks/useSearch.json +56 -0
  314. package/hooks/useShell.json +49 -0
  315. package/hooks/useSkip.json +43 -0
  316. package/hooks/useStorageIdEntity.json +67 -0
  317. package/hooks/useStore.json +36 -0
  318. package/hooks/useTable.json +49 -0
  319. package/hooks/useTableGroup.json +43 -0
  320. package/hooks/useTableSort.json +43 -0
  321. package/hooks/useUser.json +36 -0
  322. package/hooks/useValidForm.json +43 -0
  323. package/package.json +14 -8
  324. package/dist/chunk-D3Y6FGWA.js +0 -153
  325. package/dist/chunk-HPAUCD5I.js +0 -156
  326. package/dist/chunk-L4DS3EXI.mjs +0 -133
  327. package/dist/chunk-NZ6TLWMD.mjs +0 -151
@@ -0,0 +1,217 @@
1
+ {
2
+ "id": "colorpicker",
3
+ "name": "Colorpicker",
4
+ "displayName": "颜色选择器",
5
+ "category": "form",
6
+ "description": "颜色选择器组件,用于选择纯色或带透明度的颜色值。点击触发器后会弹出调色面板,支持预设颜色、自定义弹出容器和弹层定位。",
7
+ "importStatement": "import { Colorpicker } from '@king-design/vue';",
8
+ "props": [
9
+ {
10
+ "name": "value",
11
+ "description": "当前颜色值,必填。支持十六进制颜色或 rgba 字符串,可用 v-model 双向绑定。",
12
+ "type": {
13
+ "raw": "string",
14
+ "kind": "string"
15
+ },
16
+ "required": true,
17
+ "usageExample": "<Colorpicker v-model=\"color\" />"
18
+ },
19
+ {
20
+ "name": "presets",
21
+ "description": "预设颜色列表,展示在面板底部,便于快速选择常用颜色。",
22
+ "type": {
23
+ "raw": "string[]",
24
+ "kind": "array"
25
+ },
26
+ "required": false,
27
+ "default": "[\"#D0021B\", \"#F5A623\", \"#F8E71C\", \"#8B572A\", \"#7ED321\", \"#417505\", \"#BD10E0\", \"#9013FE\", \"#4A90E2\", \"#50E3C2\", \"#B8E986\", \"#000000\", \"#4A4A4A\", \"#9B9B9B\", \"#FFFFFF\"]",
28
+ "usageExample": "<Colorpicker v-model=\"color\" :presets=\"['#1677ff', '#52c41a', '#faad14']\" />"
29
+ },
30
+ {
31
+ "name": "size",
32
+ "description": "尺寸。",
33
+ "type": {
34
+ "raw": "\"large\" | \"default\" | \"small\" | \"mini\"",
35
+ "kind": "union",
36
+ "unionTypes": [
37
+ "large",
38
+ "default",
39
+ "small",
40
+ "mini"
41
+ ]
42
+ },
43
+ "required": false,
44
+ "default": "\"default\"",
45
+ "allowedValues": [
46
+ {
47
+ "value": "large",
48
+ "label": "大尺寸"
49
+ },
50
+ {
51
+ "value": "default",
52
+ "label": "默认尺寸",
53
+ "isDefault": true
54
+ },
55
+ {
56
+ "value": "small",
57
+ "label": "小尺寸"
58
+ },
59
+ {
60
+ "value": "mini",
61
+ "label": "迷你尺寸"
62
+ }
63
+ ],
64
+ "usageExample": "<Colorpicker v-model=\"color\" size=\"small\" />"
65
+ },
66
+ {
67
+ "name": "disabled",
68
+ "description": "是否禁用,禁用后无法打开面板和修改颜色。",
69
+ "type": {
70
+ "raw": "boolean",
71
+ "kind": "boolean"
72
+ },
73
+ "required": false,
74
+ "default": "false",
75
+ "usageExample": "<Colorpicker v-model=\"color\" disabled />"
76
+ },
77
+ {
78
+ "name": "container",
79
+ "description": "指定弹出层挂载位置。通常在 Dialog、Drawer 等容器中需要显式指定,避免层级或定位异常。",
80
+ "type": {
81
+ "raw": "string | ((parentDom: Element, anchor: Node | null) => Element)",
82
+ "kind": "union"
83
+ },
84
+ "required": false,
85
+ "default": "undefined",
86
+ "usageExample": "<Colorpicker v-model=\"color\" :container=\"() => document.body\" />"
87
+ },
88
+ {
89
+ "name": "show",
90
+ "description": "是否展示颜色面板,可用于受控显示。",
91
+ "type": {
92
+ "raw": "boolean",
93
+ "kind": "boolean"
94
+ },
95
+ "required": false,
96
+ "default": "undefined",
97
+ "usageExample": "<Colorpicker v-model=\"color\" :show=\"visible\" />"
98
+ },
99
+ {
100
+ "name": "position",
101
+ "description": "下拉面板定位配置,继承 Dropdown 的 position 能力。",
102
+ "type": {
103
+ "raw": "DropdownProps['position']",
104
+ "kind": "object"
105
+ },
106
+ "required": false,
107
+ "default": "{ collision: 'fit' }",
108
+ "usageExample": "<Colorpicker v-model=\"color\" :position=\"{ placement: 'bottom-start', collision: 'fit' }\" />"
109
+ }
110
+ ],
111
+ "events": [],
112
+ "methods": [],
113
+ "examples": [
114
+ {
115
+ "id": "colorpicker_basic",
116
+ "title": "基础用法",
117
+ "description": "选择主题色并实时预览。",
118
+ "difficulty": "easy",
119
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Colorpicker } from '@king-design/vue';\n\nconst color = ref('#1677ff');\n</script>\n<template>\n <div style=\"display: flex; align-items: center; gap: 12px;\">\n <Colorpicker v-model=\"color\" />\n <span>当前颜色:{{ color }}</span>\n </div>\n</template>",
120
+ "tags": [
121
+ "basic",
122
+ "v-model"
123
+ ],
124
+ "usedProps": [
125
+ "value"
126
+ ],
127
+ "usedEvents": [],
128
+ "usedMethods": [],
129
+ "scenario": "选择品牌主色或主题色"
130
+ },
131
+ {
132
+ "id": "colorpicker_presets",
133
+ "title": "预设颜色",
134
+ "description": "通过 presets 提供常用颜色快捷选择。",
135
+ "difficulty": "easy",
136
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Colorpicker } from '@king-design/vue';\n\nconst color = ref('#52c41a');\nconst presets = ['#1677ff', '#52c41a', '#faad14', '#f5222d', '#722ed1'];\n</script>\n<template>\n <Colorpicker v-model=\"color\" :presets=\"presets\" />\n</template>",
137
+ "tags": [
138
+ "preset",
139
+ "theme"
140
+ ],
141
+ "usedProps": [
142
+ "value",
143
+ "presets"
144
+ ],
145
+ "usedEvents": [],
146
+ "usedMethods": [],
147
+ "scenario": "为运营后台提供固定品牌色"
148
+ },
149
+ {
150
+ "id": "colorpicker_in_dialog",
151
+ "title": "弹窗内使用",
152
+ "description": "在弹窗中显式指定挂载容器,避免弹层错位。",
153
+ "difficulty": "medium",
154
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Button, Colorpicker, Dialog } from '@king-design/vue';\n\nconst visible = ref(false);\nconst color = ref('rgba(22, 119, 255, 0.8)');\n</script>\n<template>\n <Button @click=\"visible = true\">编辑颜色</Button>\n <Dialog v-model=\"visible\" title=\"颜色设置\">\n <Colorpicker v-model=\"color\" :container=\"() => document.body\" />\n </Dialog>\n</template>",
155
+ "tags": [
156
+ "dialog",
157
+ "container"
158
+ ],
159
+ "usedProps": [
160
+ "value",
161
+ "container"
162
+ ],
163
+ "usedEvents": [],
164
+ "usedMethods": [],
165
+ "scenario": "在弹窗中配置颜色字段"
166
+ }
167
+ ],
168
+ "commonMistakes": [
169
+ {
170
+ "id": "colorpicker_missing_value",
171
+ "description": "未传入有效颜色字符串",
172
+ "wrongCode": "<Colorpicker :value=\"undefined\" />",
173
+ "correctCode": "<Colorpicker v-model=\"color\" />",
174
+ "explanation": "Colorpicker 的 value 是必填项,应提供合法的颜色字符串并通过 v-model 维护状态。",
175
+ "relatedProps": [
176
+ "value"
177
+ ]
178
+ },
179
+ {
180
+ "id": "colorpicker_no_container_in_popup",
181
+ "description": "在弹层容器内使用时未指定 container",
182
+ "wrongCode": "<Dialog v-model=\"visible\"><Colorpicker v-model=\"color\" /></Dialog>",
183
+ "correctCode": "<Dialog v-model=\"visible\"><Colorpicker v-model=\"color\" :container=\"() => document.body\" /></Dialog>",
184
+ "explanation": "Colorpicker 内部会渲染下拉面板,在 Dialog、Drawer 等场景中建议显式设置挂载容器,避免遮挡和定位问题。",
185
+ "relatedProps": [
186
+ "container"
187
+ ]
188
+ }
189
+ ],
190
+ "searchKeywords": [
191
+ "colorpicker",
192
+ "颜色选择器",
193
+ "颜色",
194
+ "主题色",
195
+ "rgba",
196
+ "hex",
197
+ "预设颜色"
198
+ ],
199
+ "useCases": [
200
+ "主题颜色配置",
201
+ "图表颜色设置",
202
+ "标签颜色自定义",
203
+ "运营后台品牌色选择"
204
+ ],
205
+ "typeDefinitions": [
206
+ {
207
+ "name": "ColorValue",
208
+ "definition": "type ColorValue = string",
209
+ "description": "颜色值类型,通常支持 hex、rgb(a) 等字符串格式。"
210
+ }
211
+ ],
212
+ "relatedComponents": [
213
+ "Input",
214
+ "Dropdown",
215
+ "Dialog"
216
+ ]
217
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "id": "configprovider",
3
+ "name": "ConfigProvider",
4
+ "displayName": "全局配置提供器",
5
+ "category": "general",
6
+ "description": "配置上下文提供器,用于向包裹区域内的组件统一注入类名前缀和波纹动画配置。适合在局部区域隔离样式命名空间或关闭交互波纹效果。",
7
+ "importStatement": "import { ConfigProvider } from '@king-design/vue';",
8
+ "props": [
9
+ {
10
+ "name": "value",
11
+ "description": "传递给内部组件的配置对象",
12
+ "type": {
13
+ "raw": "{ classNamePrefix?: string; disableWave?: boolean }",
14
+ "kind": "object"
15
+ },
16
+ "required": false,
17
+ "default": "{}",
18
+ "usageExample": "<ConfigProvider :value=\"{ classNamePrefix: 'my', disableWave: true }\"></ConfigProvider>"
19
+ }
20
+ ],
21
+ "events": [],
22
+ "slots": [
23
+ {
24
+ "name": "default",
25
+ "description": "需要继承配置的子组件内容",
26
+ "bindingType": "none",
27
+ "vueTemplate": "#default",
28
+ "usageExample": "<ConfigProvider :value=\"config\"><Button>按钮</Button></ConfigProvider>"
29
+ }
30
+ ],
31
+ "methods": [],
32
+ "examples": [
33
+ {
34
+ "id": "configprovider_prefix",
35
+ "title": "自定义类名前缀",
36
+ "description": "为局部组件树设置独立类名前缀。",
37
+ "difficulty": "easy",
38
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Button, ButtonGroup, ConfigProvider } from '@king-design/vue';\n\nconst config = ref({ classNamePrefix: 'custom' });\n</script>\n<template>\n <ConfigProvider :value=\"config\">\n <ButtonGroup>\n <Button>默认按钮</Button>\n <Button type=\"primary\">主要按钮</Button>\n </ButtonGroup>\n </ConfigProvider>\n</template>",
39
+ "tags": [
40
+ "classNamePrefix",
41
+ "scope"
42
+ ],
43
+ "usedProps": [
44
+ "value"
45
+ ],
46
+ "usedEvents": [],
47
+ "usedSlots": [
48
+ "default"
49
+ ],
50
+ "usedMethods": [],
51
+ "scenario": "在微前端或局部主题隔离场景中定制组件类名前缀。"
52
+ },
53
+ {
54
+ "id": "configprovider_disable_wave",
55
+ "title": "关闭波纹效果",
56
+ "description": "统一禁用子组件的波纹动画效果。",
57
+ "difficulty": "easy",
58
+ "code": "<script setup lang=\"ts\">\nimport { Button, ConfigProvider } from '@king-design/vue';\n</script>\n<template>\n <ConfigProvider :value=\"{ disableWave: true }\">\n <div style=\"display: flex; gap: 8px;\">\n <Button>普通按钮</Button>\n <Button type=\"primary\">无波纹按钮</Button>\n </div>\n </ConfigProvider>\n</template>",
59
+ "tags": [
60
+ "disableWave",
61
+ "interaction"
62
+ ],
63
+ "usedProps": [
64
+ "value"
65
+ ],
66
+ "usedEvents": [],
67
+ "usedSlots": [
68
+ "default"
69
+ ],
70
+ "usedMethods": [],
71
+ "scenario": "在需要弱化交互动画或统一交互体验时关闭波纹效果。"
72
+ }
73
+ ],
74
+ "searchKeywords": [
75
+ "configprovider",
76
+ "配置提供器",
77
+ "classNamePrefix",
78
+ "disableWave"
79
+ ],
80
+ "useCases": [
81
+ "局部样式前缀隔离",
82
+ "统一关闭波纹动画",
83
+ "子树级组件配置注入"
84
+ ],
85
+ "typeDefinitions": [
86
+ {
87
+ "name": "ConfigProviderValue",
88
+ "definition": "type ConfigProviderValue = { classNamePrefix?: string; disableWave?: boolean }",
89
+ "description": "ConfigProvider 支持的配置项。"
90
+ }
91
+ ],
92
+ "relatedComponents": [
93
+ "Button",
94
+ "Notification"
95
+ ]
96
+ }
@@ -212,6 +212,13 @@
212
212
  "复制收货地址",
213
213
  "一键复制命令"
214
214
  ],
215
+ "typeDefinitions": [
216
+ {
217
+ "name": "CopyText",
218
+ "definition": "type CopyText = string",
219
+ "description": "待复制内容的文本类型。"
220
+ }
221
+ ],
215
222
  "relatedComponents": [
216
223
  "Button",
217
224
  "Icon",
@@ -0,0 +1,111 @@
1
+ {
2
+ "id": "copyhover",
3
+ "name": "CopyHover",
4
+ "displayName": "悬浮复制",
5
+ "category": "feedback",
6
+ "description": "在文本悬停时才露出复制图标的轻量组件,适合详情字段、表格单元格等需要降低视觉噪音的复制场景。",
7
+ "importStatement": "import { CopyHover } from '@ksyun-internal/versatile';",
8
+ "inherits": [
9
+ {
10
+ "component": "Copy",
11
+ "include": [
12
+ "props"
13
+ ]
14
+ }
15
+ ],
16
+ "props": [
17
+ {
18
+ "name": "text",
19
+ "description": "待复制文本",
20
+ "type": {
21
+ "raw": "string",
22
+ "kind": "string"
23
+ },
24
+ "required": false,
25
+ "default": "\"\""
26
+ },
27
+ {
28
+ "name": "tooltipText",
29
+ "description": "复制按钮提示文案",
30
+ "type": {
31
+ "raw": "string",
32
+ "kind": "string"
33
+ },
34
+ "required": false
35
+ },
36
+ {
37
+ "name": "disabled",
38
+ "description": "是否禁用复制",
39
+ "type": {
40
+ "raw": "boolean",
41
+ "kind": "boolean"
42
+ },
43
+ "required": false
44
+ }
45
+ ],
46
+ "events": [],
47
+ "slots": [],
48
+ "methods": [],
49
+ "examples": [
50
+ {
51
+ "id": "copyhover_instance_id",
52
+ "title": "详情字段悬浮复制",
53
+ "description": "只在悬停时显示复制图标,适合长 ID、Token 等字段。",
54
+ "difficulty": "easy",
55
+ "code": "<script setup lang=\"ts\">\nimport { CopyHover } from '@ksyun-internal/versatile';\n</script>\n\n<template>\n <CopyHover text=\"i-2ze7x5a4a92b\" tooltip-text=\"复制实例 ID\" />\n</template>",
56
+ "tags": [
57
+ "copy",
58
+ "hover"
59
+ ],
60
+ "usedProps": [
61
+ "text",
62
+ "tooltipText"
63
+ ],
64
+ "usedEvents": [],
65
+ "usedMethods": [],
66
+ "scenario": "在详情页展示实例 ID,同时保持界面简洁。"
67
+ },
68
+ {
69
+ "id": "copyhover_disabled_secret",
70
+ "title": "敏感字段禁止复制",
71
+ "description": "对脱敏后的内容保留展示但关闭复制。",
72
+ "difficulty": "medium",
73
+ "code": "<script setup lang=\"ts\">\nimport { CopyHover } from '@ksyun-internal/versatile';\n</script>\n\n<template>\n <CopyHover text=\"sk-******\" tooltip-text=\"敏感信息不可复制\" :disabled=\"true\" />\n</template>",
74
+ "tags": [
75
+ "copy",
76
+ "security"
77
+ ],
78
+ "usedProps": [
79
+ "text",
80
+ "tooltipText",
81
+ "disabled"
82
+ ],
83
+ "usedEvents": [],
84
+ "usedMethods": [],
85
+ "scenario": "在脱敏展示 SecretKey 等敏感内容时显式禁用复制。"
86
+ }
87
+ ],
88
+ "searchKeywords": [
89
+ "copy hover",
90
+ "hover copy",
91
+ "复制悬浮",
92
+ "悬停复制",
93
+ "轻量复制按钮"
94
+ ],
95
+ "useCases": [
96
+ "详情字段快速复制",
97
+ "列表项悬浮复制",
98
+ "敏感信息禁用复制"
99
+ ],
100
+ "typeDefinitions": [
101
+ {
102
+ "name": "CopyHoverText",
103
+ "definition": "type CopyHoverText = string",
104
+ "description": "悬浮复制组件展示和复制的文本内容类型。"
105
+ }
106
+ ],
107
+ "relatedComponents": [
108
+ "Copy",
109
+ "CopyRow"
110
+ ]
111
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "id": "copyrow",
3
+ "name": "CopyRow",
4
+ "displayName": "复制行",
5
+ "category": "feedback",
6
+ "description": "用于展示并复制一整行文本的业务组件,适合实例 ID、API 地址、回源域名等长文本信息。",
7
+ "importStatement": "import { CopyRow } from '@ksyun-internal/versatile';",
8
+ "props": [
9
+ {
10
+ "name": "text",
11
+ "description": "待展示和复制的文本内容",
12
+ "type": {
13
+ "raw": "string",
14
+ "kind": "string"
15
+ },
16
+ "required": false
17
+ },
18
+ {
19
+ "name": "maxLines",
20
+ "description": "最大展示行数",
21
+ "type": {
22
+ "raw": "number",
23
+ "kind": "number"
24
+ },
25
+ "required": false
26
+ },
27
+ {
28
+ "name": "position",
29
+ "description": "复制提示弹出位置",
30
+ "type": {
31
+ "raw": "any",
32
+ "kind": "custom"
33
+ },
34
+ "required": false
35
+ },
36
+ {
37
+ "name": "disabled",
38
+ "description": "是否禁用复制",
39
+ "type": {
40
+ "raw": "boolean",
41
+ "kind": "boolean"
42
+ },
43
+ "required": false
44
+ },
45
+ {
46
+ "name": "disabledTooltip",
47
+ "description": "禁用时是否显示 tooltip",
48
+ "type": {
49
+ "raw": "boolean",
50
+ "kind": "boolean"
51
+ },
52
+ "required": false
53
+ }
54
+ ],
55
+ "events": [],
56
+ "slots": [
57
+ {
58
+ "name": "default",
59
+ "description": "自定义行内容",
60
+ "bindingType": "none",
61
+ "vueTemplate": "<CopyRow>...</CopyRow>"
62
+ }
63
+ ],
64
+ "methods": [],
65
+ "examples": [
66
+ {
67
+ "id": "copyrow_endpoint",
68
+ "title": "接口地址一键复制",
69
+ "description": "在单行文本中集成复制能力和超长内容省略。",
70
+ "difficulty": "easy",
71
+ "code": "<script setup lang=\"ts\">\nimport { CopyRow } from '@ksyun-internal/versatile';\n</script>\n\n<template>\n <CopyRow\n text=\"https://api.ksyun.com/v1/instance/describe\"\n :max-lines=\"1\"\n />\n</template>",
72
+ "tags": [
73
+ "copy",
74
+ "text"
75
+ ],
76
+ "usedProps": [
77
+ "text",
78
+ "maxLines"
79
+ ],
80
+ "usedEvents": [],
81
+ "usedMethods": [],
82
+ "scenario": "在详情页展示并复制较长的接口地址或资源标识。"
83
+ },
84
+ {
85
+ "id": "copyrow_slot_content",
86
+ "title": "自定义复制行内容",
87
+ "description": "通过默认插槽自定义展示样式,同时保留复制能力。",
88
+ "difficulty": "medium",
89
+ "code": "<script setup lang=\"ts\">\nimport { CopyRow } from '@ksyun-internal/versatile';\n</script>\n\n<template>\n <CopyRow text=\"bucket-logs-001\">\n <strong>日志桶:</strong>\n <span>bucket-logs-001</span>\n </CopyRow>\n</template>",
90
+ "tags": [
91
+ "copy",
92
+ "slot"
93
+ ],
94
+ "usedProps": [
95
+ "text"
96
+ ],
97
+ "usedEvents": [],
98
+ "usedMethods": [],
99
+ "scenario": "在详情页用自定义文案组合显示可复制字段。"
100
+ }
101
+ ],
102
+ "searchKeywords": [
103
+ "copy row",
104
+ "copy text row",
105
+ "复制行",
106
+ "文本复制",
107
+ "长文本复制"
108
+ ],
109
+ "useCases": [
110
+ "详情页字段复制",
111
+ "表格文本复制",
112
+ "自定义内容的复制展示行"
113
+ ],
114
+ "typeDefinitions": [
115
+ {
116
+ "name": "CopyRowText",
117
+ "definition": "type CopyRowText = string",
118
+ "description": "复制行组件中主文本内容的类型。"
119
+ }
120
+ ],
121
+ "relatedComponents": [
122
+ "CopyHover",
123
+ "TableColumnId"
124
+ ]
125
+ }