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
@@ -1,7 +1,10 @@
1
+ import { C as ComponentInheritance } from '../resolve-BsLBxlBi.mjs';
2
+
1
3
  /**
2
4
  * Components 元数据模块入口
3
5
  * 提供对 components 目录中 JSON 元数据的访问
4
6
  */
7
+
5
8
  /**
6
9
  * 组件元数据类型定义
7
10
  */
@@ -15,11 +18,13 @@ interface ComponentProp {
15
18
  required?: boolean;
16
19
  default?: string;
17
20
  usageExample?: string;
21
+ tags?: string[];
18
22
  }
19
23
  interface ComponentEvent {
20
24
  name: string;
21
25
  vueEventName?: string;
22
26
  description: string;
27
+ params?: ComponentActionParam[];
23
28
  payload?: {
24
29
  name: string;
25
30
  type: string;
@@ -27,6 +32,20 @@ interface ComponentEvent {
27
32
  }[];
28
33
  usageExample?: string;
29
34
  }
35
+ interface ComponentActionParam {
36
+ name: string;
37
+ type: string;
38
+ description: string;
39
+ optional?: boolean;
40
+ default?: string;
41
+ }
42
+ interface ComponentMethod {
43
+ name: string;
44
+ description: string;
45
+ params?: ComponentActionParam[];
46
+ returnType?: string;
47
+ usageExample?: string;
48
+ }
30
49
  interface ComponentSlot {
31
50
  name: string;
32
51
  description: string;
@@ -43,13 +62,14 @@ interface ComponentMetadata {
43
62
  props: ComponentProp[];
44
63
  events: ComponentEvent[];
45
64
  slots: ComponentSlot[];
46
- methods?: any[];
65
+ methods?: ComponentMethod[];
47
66
  examples?: any[];
48
67
  subComponents?: any[];
49
68
  commonMistakes?: any[];
50
69
  searchKeywords?: string[];
51
70
  useCases?: string[];
52
71
  relatedComponents?: string[];
72
+ inherits?: ComponentInheritance[];
53
73
  }
54
74
  /**
55
75
  * 获取所有可用的组件名称列表
@@ -74,4 +94,4 @@ declare function getComponentsDir(): string;
74
94
  */
75
95
  declare function getComponentPath(componentName: string): string;
76
96
 
77
- export { type ComponentEvent, type ComponentMetadata, type ComponentProp, type ComponentSlot, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };
97
+ export { type ComponentActionParam, type ComponentEvent, type ComponentMetadata, type ComponentMethod, type ComponentProp, type ComponentSlot, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };
@@ -1,7 +1,10 @@
1
+ import { C as ComponentInheritance } from '../resolve-BsLBxlBi.js';
2
+
1
3
  /**
2
4
  * Components 元数据模块入口
3
5
  * 提供对 components 目录中 JSON 元数据的访问
4
6
  */
7
+
5
8
  /**
6
9
  * 组件元数据类型定义
7
10
  */
@@ -15,11 +18,13 @@ interface ComponentProp {
15
18
  required?: boolean;
16
19
  default?: string;
17
20
  usageExample?: string;
21
+ tags?: string[];
18
22
  }
19
23
  interface ComponentEvent {
20
24
  name: string;
21
25
  vueEventName?: string;
22
26
  description: string;
27
+ params?: ComponentActionParam[];
23
28
  payload?: {
24
29
  name: string;
25
30
  type: string;
@@ -27,6 +32,20 @@ interface ComponentEvent {
27
32
  }[];
28
33
  usageExample?: string;
29
34
  }
35
+ interface ComponentActionParam {
36
+ name: string;
37
+ type: string;
38
+ description: string;
39
+ optional?: boolean;
40
+ default?: string;
41
+ }
42
+ interface ComponentMethod {
43
+ name: string;
44
+ description: string;
45
+ params?: ComponentActionParam[];
46
+ returnType?: string;
47
+ usageExample?: string;
48
+ }
30
49
  interface ComponentSlot {
31
50
  name: string;
32
51
  description: string;
@@ -43,13 +62,14 @@ interface ComponentMetadata {
43
62
  props: ComponentProp[];
44
63
  events: ComponentEvent[];
45
64
  slots: ComponentSlot[];
46
- methods?: any[];
65
+ methods?: ComponentMethod[];
47
66
  examples?: any[];
48
67
  subComponents?: any[];
49
68
  commonMistakes?: any[];
50
69
  searchKeywords?: string[];
51
70
  useCases?: string[];
52
71
  relatedComponents?: string[];
72
+ inherits?: ComponentInheritance[];
53
73
  }
54
74
  /**
55
75
  * 获取所有可用的组件名称列表
@@ -74,4 +94,4 @@ declare function getComponentsDir(): string;
74
94
  */
75
95
  declare function getComponentPath(componentName: string): string;
76
96
 
77
- export { type ComponentEvent, type ComponentMetadata, type ComponentProp, type ComponentSlot, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };
97
+ export { type ComponentActionParam, type ComponentEvent, type ComponentMetadata, type ComponentMethod, type ComponentProp, type ComponentSlot, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };
@@ -1,11 +1,10 @@
1
1
  'use strict';
2
2
 
3
+ var chunkKF5YBEM5_js = require('../chunk-KF5YBEM5.js');
3
4
  require('../chunk-JSBRDJBE.js');
4
5
  var fs = require('fs');
5
6
  var path = require('path');
6
- var url = require('url');
7
7
 
8
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
9
8
  function _interopNamespace(e) {
10
9
  if (e && e.__esModule) return e;
11
10
  var n = Object.create(null);
@@ -27,9 +26,21 @@ function _interopNamespace(e) {
27
26
  var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
28
27
  var path__namespace = /*#__PURE__*/_interopNamespace(path);
29
28
 
30
- var __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href)));
31
- var __dirname$1 = path__namespace.dirname(__filename$1);
32
- var COMPONENTS_DIR = path__namespace.resolve(__dirname$1, "../components");
29
+ var COMPONENTS_DIR = chunkKF5YBEM5_js.resolvePackageResourceDir("components");
30
+ function loadAllRawComponents() {
31
+ const metadata = {};
32
+ try {
33
+ const files = fs__namespace.readdirSync(COMPONENTS_DIR).filter((f) => f.endsWith(".json"));
34
+ for (const file of files) {
35
+ const content = fs__namespace.readFileSync(path__namespace.join(COMPONENTS_DIR, file), "utf-8");
36
+ const data = JSON.parse(content);
37
+ metadata[data.name] = data;
38
+ }
39
+ } catch {
40
+ return {};
41
+ }
42
+ return metadata;
43
+ }
33
44
  function getComponentsList() {
34
45
  try {
35
46
  return fs__namespace.readdirSync(COMPONENTS_DIR).filter((f) => f.endsWith(".json")).map((f) => f.replace(".json", ""));
@@ -39,23 +50,22 @@ function getComponentsList() {
39
50
  }
40
51
  function getComponentMetadata(componentName) {
41
52
  try {
42
- const filePath = path__namespace.join(COMPONENTS_DIR, `${componentName}.json`);
43
- const content = fs__namespace.readFileSync(filePath, "utf-8");
44
- return JSON.parse(content);
53
+ const rawMetadata = loadAllRawComponents();
54
+ const target = Object.values(rawMetadata).find(
55
+ (component) => component.name === componentName || component.id === componentName
56
+ );
57
+ return target ? chunkKF5YBEM5_js.resolveMetadataInheritance(target, rawMetadata) : null;
45
58
  } catch {
46
59
  return null;
47
60
  }
48
61
  }
49
62
  function getAllComponentsMetadata() {
50
- const metadata = {};
51
- const list = getComponentsList();
52
- for (const name of list) {
53
- const data = getComponentMetadata(name);
54
- if (data) {
55
- metadata[name] = data;
56
- }
63
+ const rawMetadata = loadAllRawComponents();
64
+ const resolvedMetadata = {};
65
+ for (const component of Object.values(rawMetadata)) {
66
+ resolvedMetadata[component.name] = chunkKF5YBEM5_js.resolveMetadataInheritance(component, rawMetadata);
57
67
  }
58
- return metadata;
68
+ return resolvedMetadata;
59
69
  }
60
70
  function getComponentsDir() {
61
71
  return COMPONENTS_DIR;
@@ -1,11 +1,23 @@
1
+ import { resolvePackageResourceDir, resolveMetadataInheritance } from '../chunk-QC6VTSA3.mjs';
1
2
  import '../chunk-UJCSKKID.mjs';
2
3
  import * as fs from 'fs';
3
4
  import * as path from 'path';
4
- import { fileURLToPath } from 'url';
5
5
 
6
- var __filename$1 = fileURLToPath(import.meta.url);
7
- var __dirname$1 = path.dirname(__filename$1);
8
- var COMPONENTS_DIR = path.resolve(__dirname$1, "../components");
6
+ var COMPONENTS_DIR = resolvePackageResourceDir("components");
7
+ function loadAllRawComponents() {
8
+ const metadata = {};
9
+ try {
10
+ const files = fs.readdirSync(COMPONENTS_DIR).filter((f) => f.endsWith(".json"));
11
+ for (const file of files) {
12
+ const content = fs.readFileSync(path.join(COMPONENTS_DIR, file), "utf-8");
13
+ const data = JSON.parse(content);
14
+ metadata[data.name] = data;
15
+ }
16
+ } catch {
17
+ return {};
18
+ }
19
+ return metadata;
20
+ }
9
21
  function getComponentsList() {
10
22
  try {
11
23
  return fs.readdirSync(COMPONENTS_DIR).filter((f) => f.endsWith(".json")).map((f) => f.replace(".json", ""));
@@ -15,23 +27,22 @@ function getComponentsList() {
15
27
  }
16
28
  function getComponentMetadata(componentName) {
17
29
  try {
18
- const filePath = path.join(COMPONENTS_DIR, `${componentName}.json`);
19
- const content = fs.readFileSync(filePath, "utf-8");
20
- return JSON.parse(content);
30
+ const rawMetadata = loadAllRawComponents();
31
+ const target = Object.values(rawMetadata).find(
32
+ (component) => component.name === componentName || component.id === componentName
33
+ );
34
+ return target ? resolveMetadataInheritance(target, rawMetadata) : null;
21
35
  } catch {
22
36
  return null;
23
37
  }
24
38
  }
25
39
  function getAllComponentsMetadata() {
26
- const metadata = {};
27
- const list = getComponentsList();
28
- for (const name of list) {
29
- const data = getComponentMetadata(name);
30
- if (data) {
31
- metadata[name] = data;
32
- }
40
+ const rawMetadata = loadAllRawComponents();
41
+ const resolvedMetadata = {};
42
+ for (const component of Object.values(rawMetadata)) {
43
+ resolvedMetadata[component.name] = resolveMetadataInheritance(component, rawMetadata);
33
44
  }
34
- return metadata;
45
+ return resolvedMetadata;
35
46
  }
36
47
  function getComponentsDir() {
37
48
  return COMPONENTS_DIR;
@@ -0,0 +1,24 @@
1
+ interface ComponentInheritance {
2
+ component: string;
3
+ include?: Array<'props' | 'events' | 'slots' | 'methods'>;
4
+ exclude?: string[];
5
+ }
6
+ type NamedItem = {
7
+ name: string;
8
+ tags?: string[];
9
+ [key: string]: any;
10
+ };
11
+ interface ResolvableComponentMetadata {
12
+ id?: string;
13
+ name: string;
14
+ props?: NamedItem[];
15
+ events?: NamedItem[];
16
+ slots?: NamedItem[];
17
+ methods?: NamedItem[];
18
+ inherits?: ComponentInheritance[];
19
+ [key: string]: any;
20
+ }
21
+ declare function normalizeMetadataName(value: string): string;
22
+ declare function resolveMetadataInheritance<T extends ResolvableComponentMetadata>(metadata: T, lookup: Record<string, T>, visited?: Set<string>): T;
23
+
24
+ export { type ComponentInheritance as C, type ResolvableComponentMetadata as R, normalizeMetadataName as n, resolveMetadataInheritance as r };
@@ -0,0 +1,24 @@
1
+ interface ComponentInheritance {
2
+ component: string;
3
+ include?: Array<'props' | 'events' | 'slots' | 'methods'>;
4
+ exclude?: string[];
5
+ }
6
+ type NamedItem = {
7
+ name: string;
8
+ tags?: string[];
9
+ [key: string]: any;
10
+ };
11
+ interface ResolvableComponentMetadata {
12
+ id?: string;
13
+ name: string;
14
+ props?: NamedItem[];
15
+ events?: NamedItem[];
16
+ slots?: NamedItem[];
17
+ methods?: NamedItem[];
18
+ inherits?: ComponentInheritance[];
19
+ [key: string]: any;
20
+ }
21
+ declare function normalizeMetadataName(value: string): string;
22
+ declare function resolveMetadataInheritance<T extends ResolvableComponentMetadata>(metadata: T, lookup: Record<string, T>, visited?: Set<string>): T;
23
+
24
+ export { type ComponentInheritance as C, type ResolvableComponentMetadata as R, normalizeMetadataName as n, resolveMetadataInheritance as r };
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkD3Y6FGWA_js = require('../chunk-D3Y6FGWA.js');
4
- var chunkHPAUCD5I_js = require('../chunk-HPAUCD5I.js');
3
+ var chunkEYKZY2F3_js = require('../chunk-EYKZY2F3.js');
4
+ var chunkCR3GC4H3_js = require('../chunk-CR3GC4H3.js');
5
5
  require('../chunk-JSBRDJBE.js');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "validateRuntimePrecheck", {
10
10
  enumerable: true,
11
- get: function () { return chunkD3Y6FGWA_js.validateRuntimePrecheck; }
11
+ get: function () { return chunkEYKZY2F3_js.validateRuntimePrecheck; }
12
12
  });
13
13
  Object.defineProperty(exports, "compileSFC", {
14
14
  enumerable: true,
15
- get: function () { return chunkHPAUCD5I_js.compileSFC; }
15
+ get: function () { return chunkCR3GC4H3_js.compileSFC; }
16
16
  });
@@ -1,3 +1,3 @@
1
- export { validateRuntimePrecheck } from '../chunk-NZ6TLWMD.mjs';
2
- export { compileSFC } from '../chunk-L4DS3EXI.mjs';
1
+ export { validateRuntimePrecheck } from '../chunk-D2SXGGTX.mjs';
2
+ export { compileSFC } from '../chunk-BI5TIQID.mjs';
3
3
  import '../chunk-UJCSKKID.mjs';
@@ -0,0 +1,10 @@
1
+ export { C as ComponentInheritance, R as ResolvableComponentMetadata, n as normalizeMetadataName, r as resolveMetadataInheritance } from '../resolve-BsLBxlBi.mjs';
2
+
3
+ interface ResolvePackagePathOptions {
4
+ cwd?: string;
5
+ packageName?: string;
6
+ }
7
+ declare function resolvePackageRoot(options?: ResolvePackagePathOptions): string | null;
8
+ declare function resolvePackageResourceDir(resourceDirName: string, options?: ResolvePackagePathOptions): string;
9
+
10
+ export { type ResolvePackagePathOptions, resolvePackageResourceDir, resolvePackageRoot };
@@ -0,0 +1,10 @@
1
+ export { C as ComponentInheritance, R as ResolvableComponentMetadata, n as normalizeMetadataName, r as resolveMetadataInheritance } from '../resolve-BsLBxlBi.js';
2
+
3
+ interface ResolvePackagePathOptions {
4
+ cwd?: string;
5
+ packageName?: string;
6
+ }
7
+ declare function resolvePackageRoot(options?: ResolvePackagePathOptions): string | null;
8
+ declare function resolvePackageResourceDir(resourceDirName: string, options?: ResolvePackagePathOptions): string;
9
+
10
+ export { type ResolvePackagePathOptions, resolvePackageResourceDir, resolvePackageRoot };
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var chunkKF5YBEM5_js = require('../chunk-KF5YBEM5.js');
4
+ require('../chunk-JSBRDJBE.js');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "normalizeMetadataName", {
9
+ enumerable: true,
10
+ get: function () { return chunkKF5YBEM5_js.normalizeMetadataName; }
11
+ });
12
+ Object.defineProperty(exports, "resolveMetadataInheritance", {
13
+ enumerable: true,
14
+ get: function () { return chunkKF5YBEM5_js.resolveMetadataInheritance; }
15
+ });
16
+ Object.defineProperty(exports, "resolvePackageResourceDir", {
17
+ enumerable: true,
18
+ get: function () { return chunkKF5YBEM5_js.resolvePackageResourceDir; }
19
+ });
20
+ Object.defineProperty(exports, "resolvePackageRoot", {
21
+ enumerable: true,
22
+ get: function () { return chunkKF5YBEM5_js.resolvePackageRoot; }
23
+ });
@@ -0,0 +1,2 @@
1
+ export { normalizeMetadataName, resolveMetadataInheritance, resolvePackageResourceDir, resolvePackageRoot } from '../chunk-QC6VTSA3.mjs';
2
+ import '../chunk-UJCSKKID.mjs';
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkWYSRJVX4_js = require('../chunk-WYSRJVX4.js');
4
- var chunkHPAUCD5I_js = require('../chunk-HPAUCD5I.js');
3
+ var chunkTA3SV4SP_js = require('../chunk-TA3SV4SP.js');
4
+ var chunkCR3GC4H3_js = require('../chunk-CR3GC4H3.js');
5
5
  require('../chunk-JSBRDJBE.js');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "validateCompilation", {
10
10
  enumerable: true,
11
- get: function () { return chunkWYSRJVX4_js.validateCompilation; }
11
+ get: function () { return chunkTA3SV4SP_js.validateCompilation; }
12
12
  });
13
13
  Object.defineProperty(exports, "compileSFC", {
14
14
  enumerable: true,
15
- get: function () { return chunkHPAUCD5I_js.compileSFC; }
15
+ get: function () { return chunkCR3GC4H3_js.compileSFC; }
16
16
  });
17
17
  Object.defineProperty(exports, "scopeStyles", {
18
18
  enumerable: true,
19
- get: function () { return chunkHPAUCD5I_js.scopeStyles; }
19
+ get: function () { return chunkCR3GC4H3_js.scopeStyles; }
20
20
  });
@@ -1,3 +1,3 @@
1
- export { validateCompilation } from '../chunk-DSWKLUIX.mjs';
2
- export { compileSFC, scopeStyles } from '../chunk-L4DS3EXI.mjs';
1
+ export { validateCompilation } from '../chunk-3LYQ5XFM.mjs';
2
+ export { compileSFC, scopeStyles } from '../chunk-BI5TIQID.mjs';
3
3
  import '../chunk-UJCSKKID.mjs';
@@ -0,0 +1,77 @@
1
+ # 操作按钮集 (Actions)
2
+
3
+ 用于组织主操作和次操作的按钮集合组件,常放在表格操作列、详情页头部和工具栏右侧,避免页面出现过多平铺按钮。
4
+
5
+ **关键词**: actions, action buttons, 操作按钮集, 更多操作, 主次操作, 操作列按钮
6
+
7
+ **使用场景**: 表格操作列、页面头部操作区、主次操作分层展示
8
+
9
+ ## 导入语句
10
+ ```typescript
11
+ import { Actions } from '@ksyun-internal/versatile';
12
+ ```
13
+
14
+ ## 属性 (Props)
15
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 | 标签 | 示例 |
16
+ | --- | --- | --- | --- | --- | --- | --- |
17
+ | primaries | `ActionConfig[]` | `[]` | 否 | 一级操作按钮列表 | - | - |
18
+ | secondaries | `ActionConfig[]` | `[]` | 否 | 二级操作按钮列表,通常展示在“更多”菜单中 | - | - |
19
+
20
+ ## 插槽 (Slots)
21
+ | 插槽名 | 说明 | 模板写法 | 示例 |
22
+ | --- | --- | --- | --- |
23
+ | btnText | 自定义按钮文案渲染 | `<template #btnText="{ action }">...</template>` | - |
24
+
25
+ ## 使用示例
26
+ ### 表格操作列中的主次操作
27
+ **场景**: 在列表行内同时承载高频与低频操作,减少操作列拥挤。
28
+
29
+ 将高频操作直接展示,低频操作折叠到更多菜单中。
30
+
31
+ **使用的 API**: 属性: primaries, secondaries
32
+
33
+ ```vue
34
+ <script setup lang="ts">
35
+ import { Actions } from '@ksyun-internal/versatile';
36
+
37
+ const primaries = [
38
+ { text: '重启', type: 'primary', onClick: () => console.log('restart') },
39
+ ];
40
+ const secondaries = [
41
+ { text: '续费', onClick: () => console.log('renew') },
42
+ { text: '释放', danger: true, onClick: () => console.log('delete') },
43
+ ];
44
+ </script>
45
+
46
+ <template>
47
+ <Actions :primaries="primaries" :secondaries="secondaries" />
48
+ </template>
49
+ ```
50
+
51
+ ### 自定义操作按钮文案
52
+ **场景**: 在操作区给危险动作补充更明确的文案提示。
53
+
54
+ 使用 btnText 插槽为危险操作补充风险提示。
55
+
56
+ **使用的 API**: 属性: primaries, secondaries
57
+
58
+ ```vue
59
+ <script setup lang="ts">
60
+ import { Actions } from '@ksyun-internal/versatile';
61
+
62
+ const primaries = [{ text: '启动', onClick: () => console.log('start') }];
63
+ const secondaries = [{ text: '释放', danger: true, onClick: () => console.log('release') }];
64
+ </script>
65
+
66
+ <template>
67
+ <Actions :primaries="primaries" :secondaries="secondaries">
68
+ <template #btnText="{ action }">
69
+ {{ action.danger ? action.text + '(高风险)' : action.text }}
70
+ </template>
71
+ </Actions>
72
+ </template>
73
+ ```
74
+
75
+ ## 相关组件
76
+ ButtonLink, IconTooltip
77
+
@@ -0,0 +1,89 @@
1
+ # 高级设置开关 (AdvancedSet)
2
+
3
+ 用于折叠和展开高级配置区域的业务组件,适合购买页、创建页中把非高频参数收进“高级设置”。
4
+
5
+ **关键词**: advanced set, advanced options, 高级设置, 折叠配置区, 高级参数
6
+
7
+ **使用场景**: 高级参数开关、可折叠配置区、编辑页默认展开高级设置
8
+
9
+ ## 导入语句
10
+ ```typescript
11
+ import { AdvancedSet } from '@ksyun-internal/versatile';
12
+ ```
13
+
14
+ ## 属性 (Props)
15
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 | 标签 | 示例 |
16
+ | --- | --- | --- | --- | --- | --- | --- |
17
+ | modelValue | `boolean` | `undefined` | 否 | 是否展开高级设置 | - | - |
18
+ | label | `string` | `undefined` | 否 | 标题文案 | - | - |
19
+ | appendTip | `string` | `undefined` | 否 | 追加提示文案 | - | - |
20
+
21
+ ## 事件 (Events)
22
+ | 事件名 | Vue事件名 | 说明 | 回调参数 | 示例 |
23
+ | --- | --- | --- | --- | --- |
24
+ | update:modelValue | `@update:modelValue` | 用户展开或收起高级设置区域时触发,可用于同步表单状态或埋点。 | `value?: boolean` | - |
25
+
26
+ ### 事件参数说明
27
+ **update:modelValue**
28
+
29
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
30
+ | --- | --- | --- | --- | --- |
31
+ | value | `boolean` | 否 | - | 当前高级设置区域的展开状态。 |
32
+
33
+ ## 插槽 (Slots)
34
+ | 插槽名 | 说明 | 模板写法 | 示例 |
35
+ | --- | --- | --- | --- |
36
+ | default | 高级设置内容区域 | `<AdvancedSet>...</AdvancedSet>` | - |
37
+
38
+ ## 使用示例
39
+ ### 购买页中的高级设置折叠区
40
+ **场景**: 创建实例时把网络、命名等低频参数收纳到高级设置区。
41
+
42
+ 默认收起高级参数,只在用户主动展开后展示额外配置。
43
+
44
+ **使用的 API**: 属性: modelValue, label, appendTip | 事件: update:modelValue
45
+
46
+ ```vue
47
+ <script setup lang="ts">
48
+ import { ref } from 'vue';
49
+ import { AdvancedSet, FormItemInput, FormItemSpinner } from '@ksyun-internal/versatile';
50
+
51
+ const advanced = ref(false);
52
+ const hostname = ref('web-01');
53
+ const bandwidth = ref(20);
54
+ </script>
55
+
56
+ <template>
57
+ <AdvancedSet v-model="advanced" label="高级设置" append-tip="修改后将影响实例网络配置">
58
+ <FormItemInput v-model="hostname" label="主机名" />
59
+ <FormItemSpinner v-model="bandwidth" label="带宽峰值" unit="Mbps" />
60
+ </AdvancedSet>
61
+ </template>
62
+ ```
63
+
64
+ ### 默认展开高级设置
65
+ **场景**: 在编辑页面中默认展开高级参数,方便用户快速核对设置。
66
+
67
+ 在编辑已有配置时直接展开高级区域,减少额外点击。
68
+
69
+ **使用的 API**: 属性: modelValue, label, appendTip | 事件: update:modelValue
70
+
71
+ ```vue
72
+ <script setup lang="ts">
73
+ import { ref } from 'vue';
74
+ import { AdvancedSet, FormItemSwitch } from '@ksyun-internal/versatile';
75
+
76
+ const advanced = ref(true);
77
+ const enableMonitor = ref(false);
78
+ </script>
79
+
80
+ <template>
81
+ <AdvancedSet v-model="advanced" label="高级设置" append-tip="修改后即时生效">
82
+ <FormItemSwitch v-model="enableMonitor" label="开启监控增强" />
83
+ </AdvancedSet>
84
+ </template>
85
+ ```
86
+
87
+ ## 相关组件
88
+ FormItemInput, FormItemSpinner
89
+
@@ -12,25 +12,33 @@ import { Affix } from '@king-design/vue';
12
12
  ```
13
13
 
14
14
  ## 属性 (Props)
15
- | 属性名 | 类型 | 默认值 | 必填 | 说明 | 示例 |
16
- | --- | --- | --- | --- | --- | --- |
17
- | top | `number` | `undefined` | 否 | 距离窗口顶部的偏移量,设置为 undefined 则不生效 | `<Affix :top="100"></Affix>` |
18
- | bottom | `number` | `undefined` | 否 | 距离窗口底部的偏移量,设置为 undefined 则不生效 | `<Affix :bottom="50"></Affix>` |
19
- | shouldFix | `Function` | `undefined` | 否 | 自定义是否需要固定的函数,返回 boolean | `<Affix :shouldFix="checkFix"></Affix>` |
20
- | exclude | `Function` | `undefined` | 否 | 自定义排除固定的函数,返回 boolean 表示不固定 | `<Affix :exclude="checkExclude"></Affix>` |
21
- | disabled | `boolean` | `false` | 否 | 是否禁用固定功能 | `<Affix disabled></Affix>` |
15
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 | 标签 | 示例 |
16
+ | --- | --- | --- | --- | --- | --- | --- |
17
+ | top | `number` | `undefined` | 否 | 距离窗口顶部的偏移量,设置为 undefined 则不生效 | - | `<Affix :top="100"></Affix>` |
18
+ | bottom | `number` | `undefined` | 否 | 距离窗口底部的偏移量,设置为 undefined 则不生效 | - | `<Affix :bottom="50"></Affix>` |
19
+ | shouldFix | `Function` | `undefined` | 否 | 自定义是否需要固定的函数,返回 boolean | - | `<Affix :shouldFix="checkFix"></Affix>` |
20
+ | exclude | `Function` | `undefined` | 否 | 自定义排除固定的函数,返回 boolean 表示不固定 | - | `<Affix :exclude="checkExclude"></Affix>` |
21
+ | disabled | `boolean` | `false` | 否 | 是否禁用固定功能 | - | `<Affix disabled></Affix>` |
22
22
 
23
23
  ## 事件 (Events)
24
24
  | 事件名 | Vue事件名 | 说明 | 回调参数 | 示例 |
25
25
  | --- | --- | --- | --- | --- |
26
26
  | change | `@change` | 固定状态改变时触发 | `isFixed: boolean` | `<Affix @change="handleChange"></Affix>` |
27
27
 
28
+ ### 事件参数说明
29
+ **change**
30
+
31
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
32
+ | --- | --- | --- | --- | --- |
33
+ | isFixed | `boolean` | 是 | - | 当前是否处于固定状态 |
34
+
28
35
  ## 插槽 (Slots)
29
36
  | 插槽名 | 说明 | 模板写法 | 示例 |
30
37
  | --- | --- | --- | --- |
31
38
  | default | 需要被固定的元素 | `#default` | `<Affix><Button>Fixed Button</Button></Affix>` |
32
39
 
33
40
  ## 常见错误与正确用法 (Anti-Hallucination)
41
+ ### 父容器滚动问题
34
42
  > **错误用法**: `<div style="overflow: auto; height: 200px;">
35
43
  <Affix :top="10">...</Affix>
36
44
  </div>`