@robot-admin/naive-ui-components 0.31.5 → 0.33.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 (285) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +11 -5
  3. package/README_EN.md +11 -5
  4. package/dist/C_AutoComplete.cjs +1 -0
  5. package/dist/C_AutoComplete.css +36 -0
  6. package/dist/C_AutoComplete.d.cts +4 -0
  7. package/dist/C_AutoComplete.d.ts +4 -0
  8. package/dist/C_AutoComplete.js +1 -0
  9. package/dist/C_AutoComplete2.cjs +1 -0
  10. package/dist/C_AutoComplete2.js +1 -0
  11. package/dist/C_AvatarGroup.d.cts +1 -1
  12. package/dist/C_AvatarGroup.d.ts +1 -1
  13. package/dist/C_Barcode.d.cts +1 -1
  14. package/dist/C_Barcode.d.ts +1 -1
  15. package/dist/C_BatchResult.d.cts +1 -1
  16. package/dist/C_BatchResult.d.ts +1 -1
  17. package/dist/C_Breadcrumb.d.cts +2 -2
  18. package/dist/C_Breadcrumb.d.ts +1 -1
  19. package/dist/C_Cascade.d.cts +1 -1
  20. package/dist/C_Cascade.d.ts +1 -1
  21. package/dist/C_Chat.d.cts +1 -1
  22. package/dist/C_Chat.d.ts +1 -1
  23. package/dist/C_City.d.cts +1 -1
  24. package/dist/C_City.d.ts +1 -1
  25. package/dist/C_Code.d.cts +1 -1
  26. package/dist/C_Code.d.ts +1 -1
  27. package/dist/C_ContextMenu.d.cts +1 -1
  28. package/dist/C_ContextMenu.d.ts +1 -1
  29. package/dist/C_DataPicker.css +235 -31
  30. package/dist/C_DataPicker.d.cts +2 -2
  31. package/dist/C_DataPicker.d.ts +2 -2
  32. package/dist/C_Date.d.cts +1 -1
  33. package/dist/C_Date.d.ts +1 -1
  34. package/dist/C_Density.d.cts +1 -1
  35. package/dist/C_Density.d.ts +1 -1
  36. package/dist/C_Editor.d.cts +1 -1
  37. package/dist/C_Editor.d.ts +1 -1
  38. package/dist/C_ErrorSummary.d.cts +1 -1
  39. package/dist/C_ErrorSummary.d.ts +1 -1
  40. package/dist/C_Form.base.css +68 -1
  41. package/dist/C_Form.cjs +1 -1
  42. package/dist/C_Form.css +68 -1
  43. package/dist/C_Form.d.cts +3 -3
  44. package/dist/C_Form.d.ts +5 -3
  45. package/dist/C_Form.js +1 -1
  46. package/dist/C_FormModal.cjs +1 -1
  47. package/dist/C_FormModal.d.cts +1 -1
  48. package/dist/C_FormModal.d.ts +3 -1
  49. package/dist/C_FormModal.js +1 -1
  50. package/dist/C_FormModal2.cjs +1 -1
  51. package/dist/C_FormModal2.js +1 -1
  52. package/dist/C_FormSearch.css +160 -72
  53. package/dist/C_FormSearch.d.cts +3 -3
  54. package/dist/C_FormSearch.d.ts +3 -3
  55. package/dist/C_GlobalSearch2.cjs +1 -1
  56. package/dist/C_GlobalSearch2.js +1 -1
  57. package/dist/C_Guide.d.cts +1 -1
  58. package/dist/C_Guide.d.ts +1 -1
  59. package/dist/C_Icon.d.cts +1 -1
  60. package/dist/C_Icon.d.ts +1 -1
  61. package/dist/C_Language.d.cts +1 -1
  62. package/dist/C_Language.d.ts +1 -1
  63. package/dist/C_Loading.d.cts +1 -1
  64. package/dist/C_Loading.d.ts +1 -1
  65. package/dist/C_Login.d.cts +1 -1
  66. package/dist/C_Login.d.ts +1 -1
  67. package/dist/C_Markdown.d.cts +1 -1
  68. package/dist/C_Markdown.d.ts +1 -1
  69. package/dist/C_Menu.d.cts +2 -2
  70. package/dist/C_Menu.d.ts +1 -1
  71. package/dist/C_OrgChart.d.cts +1 -1
  72. package/dist/C_OrgChart.d.ts +1 -1
  73. package/dist/C_Progress.d.cts +1 -1
  74. package/dist/C_Progress.d.ts +1 -1
  75. package/dist/C_SectionNav.d.cts +1 -1
  76. package/dist/C_SectionNav.d.ts +1 -1
  77. package/dist/C_Select.css +32 -1
  78. package/dist/C_Select.d.cts +4 -2
  79. package/dist/C_Select.d.ts +4 -2
  80. package/dist/C_Select2.cjs +1 -1
  81. package/dist/C_Select2.js +1 -1
  82. package/dist/C_Skeleton.d.cts +1 -1
  83. package/dist/C_Skeleton.d.ts +1 -1
  84. package/dist/C_Steps.d.cts +1 -1
  85. package/dist/C_Steps.d.ts +1 -1
  86. package/dist/C_Table.base.css +214 -147
  87. package/dist/C_Table.cjs +1 -1
  88. package/dist/C_Table.css +146 -146
  89. package/dist/C_Table.d.cts +3 -3
  90. package/dist/C_Table.d.ts +13 -10
  91. package/dist/C_Table.js +1 -1
  92. package/dist/C_Table2.cjs +4 -3
  93. package/dist/C_Table2.js +4 -3
  94. package/dist/C_TagsView.css +51 -51
  95. package/dist/C_TagsView.d.cts +2 -2
  96. package/dist/C_TagsView.d.ts +1 -1
  97. package/dist/C_TagsView2.cjs +1 -1
  98. package/dist/C_TagsView2.js +1 -1
  99. package/dist/C_Theme.d.cts +1 -1
  100. package/dist/C_Theme.d.ts +1 -1
  101. package/dist/C_Timeline.d.cts +1 -1
  102. package/dist/C_Timeline.d.ts +1 -1
  103. package/dist/C_Transfer.d.cts +1 -1
  104. package/dist/C_Transfer.d.ts +1 -1
  105. package/dist/C_Tree.cjs +1 -1
  106. package/dist/C_Tree.css +60 -23
  107. package/dist/C_Tree.d.cts +2 -2
  108. package/dist/C_Tree.d.ts +12 -9
  109. package/dist/C_Tree.js +1 -1
  110. package/dist/C_Tree2.cjs +1 -1
  111. package/dist/C_Tree2.js +1 -1
  112. package/dist/OptionStatus.cjs +1 -0
  113. package/dist/OptionStatus.js +1 -0
  114. package/dist/SearchFieldSettings.cjs +1 -0
  115. package/dist/SearchFieldSettings.js +1 -0
  116. package/dist/constants4.d.cts +9 -9
  117. package/dist/constants4.d.ts +9 -9
  118. package/dist/constants5.d.cts +2 -2
  119. package/dist/constants5.d.ts +2 -2
  120. package/dist/data.d.cts +2 -1
  121. package/dist/data.d.ts +2 -1
  122. package/dist/data2.d.cts +7 -7
  123. package/dist/data2.d.ts +7 -7
  124. package/dist/dateRange.d.cts +52 -7
  125. package/dist/dateRange.d.ts +52 -7
  126. package/dist/editors.cjs +1 -0
  127. package/dist/{useTableQuery.d.cts → editors.d.cts} +120 -13
  128. package/dist/{useTableQuery.d.ts → editors.d.ts} +120 -13
  129. package/dist/editors.js +1 -0
  130. package/dist/fieldRenderers.cjs +1 -0
  131. package/dist/fieldRenderers.js +1 -0
  132. package/dist/formField.cjs +1 -1
  133. package/dist/formField.d.cts +79 -29
  134. package/dist/formField.d.ts +79 -29
  135. package/dist/formField.js +1 -1
  136. package/dist/helpers.cjs +1 -1
  137. package/dist/helpers.js +1 -1
  138. package/dist/index.cjs +1 -1
  139. package/dist/index.d.cts +63 -59
  140. package/dist/index.d.ts +63 -58
  141. package/dist/index.js +1 -1
  142. package/dist/index.vue.d.cts +5 -5
  143. package/dist/index.vue.d.ts +5 -5
  144. package/dist/index10.vue.d.cts +27 -35
  145. package/dist/index10.vue.d.ts +37 -80
  146. package/dist/index11.vue.d.cts +37 -80
  147. package/dist/index11.vue.d.ts +83 -16
  148. package/dist/index12.vue.d.cts +83 -16
  149. package/dist/index12.vue.d.ts +16 -59
  150. package/dist/index13.vue.d.cts +16 -59
  151. package/dist/index13.vue.d.ts +57 -17
  152. package/dist/index14.vue.d.cts +57 -17
  153. package/dist/index14.vue.d.ts +18 -55
  154. package/dist/index15.vue.d.cts +18 -55
  155. package/dist/index15.vue.d.ts +53 -124
  156. package/dist/index16.vue.d.cts +53 -124
  157. package/dist/index16.vue.d.ts +123 -51
  158. package/dist/index17.vue.d.cts +123 -51
  159. package/dist/index17.vue.d.ts +52 -25
  160. package/dist/index18.vue.d.cts +52 -25
  161. package/dist/index18.vue.d.ts +25 -12
  162. package/dist/index19.vue.d.cts +25 -12
  163. package/dist/index19.vue.d.ts +13 -129
  164. package/dist/index2.vue.d.cts +26 -82
  165. package/dist/index2.vue.d.ts +26 -82
  166. package/dist/index20.vue.d.cts +13 -129
  167. package/dist/index20.vue.d.ts +129 -76
  168. package/dist/index21.vue.d.cts +129 -76
  169. package/dist/index21.vue.d.ts +78 -72
  170. package/dist/index22.vue.d.cts +75 -97
  171. package/dist/index22.vue.d.ts +68 -96
  172. package/dist/index23.vue.d.cts +91 -40
  173. package/dist/index23.vue.d.ts +91 -40
  174. package/dist/index24.vue.d.cts +49 -23
  175. package/dist/index24.vue.d.ts +49 -23
  176. package/dist/index25.vue.d.cts +19 -46
  177. package/dist/index25.vue.d.ts +19 -46
  178. package/dist/index26.vue.d.cts +25 -98
  179. package/dist/index26.vue.d.ts +25 -98
  180. package/dist/index27.vue.d.cts +95 -37
  181. package/dist/index27.vue.d.ts +95 -37
  182. package/dist/index28.vue.d.cts +34 -8
  183. package/dist/index28.vue.d.ts +34 -8
  184. package/dist/index29.vue.d.cts +9 -86
  185. package/dist/index29.vue.d.ts +9 -86
  186. package/dist/index3.vue.d.cts +80 -30
  187. package/dist/index3.vue.d.ts +80 -30
  188. package/dist/index30.vue.d.cts +85 -99
  189. package/dist/index30.vue.d.ts +85 -99
  190. package/dist/index31.vue.d.cts +94 -63
  191. package/dist/index31.vue.d.ts +94 -63
  192. package/dist/index32.vue.d.cts +79 -0
  193. package/dist/index32.vue.d.ts +79 -0
  194. package/dist/index4.vue.d.cts +30 -19
  195. package/dist/index4.vue.d.ts +30 -19
  196. package/dist/index5.vue.d.cts +19 -128
  197. package/dist/index5.vue.d.ts +17 -34
  198. package/dist/index6.vue.d.cts +127 -35
  199. package/dist/index6.vue.d.ts +30 -22
  200. package/dist/index7.vue.d.cts +30 -22
  201. package/dist/index7.vue.d.ts +25 -118
  202. package/dist/index8.vue.d.cts +25 -118
  203. package/dist/index8.vue.d.ts +112 -21
  204. package/dist/index9.vue.d.cts +112 -21
  205. package/dist/index9.vue.d.ts +27 -35
  206. package/dist/mapUtils.d.cts +3 -3
  207. package/dist/mapUtils.d.ts +3 -3
  208. package/dist/optionSource.d.cts +30 -0
  209. package/dist/optionSource.d.ts +30 -0
  210. package/dist/public.d.ts +2 -0
  211. package/dist/resolver.cjs +1 -1
  212. package/dist/resolver.d.cts +1 -1
  213. package/dist/resolver.d.ts +1 -1
  214. package/dist/resolver.js +1 -1
  215. package/dist/selectPresentation.cjs +1 -1
  216. package/dist/selectPresentation.js +1 -1
  217. package/dist/serializeSearch.cjs +1 -1
  218. package/dist/serializeSearch.js +1 -1
  219. package/dist/sourceControls.cjs +1 -0
  220. package/dist/sourceControls.js +1 -0
  221. package/dist/style.css +513 -324
  222. package/dist/types2.d.cts +29 -103
  223. package/dist/types2.d.ts +30 -55
  224. package/dist/types3.d.cts +106 -55
  225. package/dist/types3.d.ts +60 -0
  226. package/dist/types4.d.cts +60 -0
  227. package/dist/types4.d.ts +50 -0
  228. package/dist/types5.d.cts +50 -0
  229. package/dist/useCalendarEvents.d.cts +1 -1
  230. package/dist/useCalendarEvents.d.ts +1 -1
  231. package/dist/useCollapsePanel.d.cts +3 -3
  232. package/dist/useCollapsePanel.d.ts +3 -3
  233. package/dist/useComponentLocale.cjs +1 -1
  234. package/dist/useComponentLocale.js +1 -1
  235. package/dist/useCropperCore.d.cts +9 -9
  236. package/dist/useCropperCore.d.ts +9 -9
  237. package/dist/useDataResource.cjs +1 -1
  238. package/dist/useDataResource.js +1 -1
  239. package/dist/useDraggableLayout.d.cts +2 -2
  240. package/dist/useDraggableLayout.d.ts +2 -2
  241. package/dist/useDynamicFormState.d.cts +17 -3
  242. package/dist/useDynamicFormState.d.ts +17 -3
  243. package/dist/useEdgeInteraction.d.cts +2 -2
  244. package/dist/useEdgeInteraction.d.ts +2 -2
  245. package/dist/useFormConfig.d.cts +5 -2
  246. package/dist/useFormConfig.d.ts +5 -2
  247. package/dist/useFormRenderer.d.cts +1 -1
  248. package/dist/useFormRenderer.d.ts +1 -1
  249. package/dist/useFullscreen.d.cts +2 -2
  250. package/dist/useFullscreen.d.ts +2 -2
  251. package/dist/useGlobalSearch.d.cts +8 -0
  252. package/dist/useGlobalSearch.d.ts +8 -0
  253. package/dist/useInfiniteScroll.d.cts +2 -2
  254. package/dist/useInfiniteScroll.d.ts +2 -2
  255. package/dist/useQRCode.d.cts +3 -3
  256. package/dist/useQRCode.d.ts +3 -3
  257. package/dist/useSignatureHistory.d.cts +4 -4
  258. package/dist/useSignatureHistory.d.ts +4 -4
  259. package/dist/useSplitResize.d.cts +7 -7
  260. package/dist/useSplitResize.d.ts +7 -7
  261. package/dist/useWorkflowValidation.d.cts +4 -4
  262. package/dist/useWorkflowValidation.d.ts +4 -4
  263. package/dist/verification.d.cts +6 -6
  264. package/dist/verification.d.ts +6 -6
  265. package/docs/architecture.md +3 -1
  266. package/docs/components.en.md +2 -1
  267. package/docs/components.md +2 -1
  268. package/docs/engineering.en.md +11 -1
  269. package/docs/engineering.md +11 -1
  270. package/docs/guides/component-contracts.md +72 -0
  271. package/docs/guides/data-picker.md +37 -1
  272. package/docs/guides/remote-options.md +117 -0
  273. package/docs/guides/search-workflows.md +162 -2
  274. package/docs/guides/table-editing.md +79 -0
  275. package/docs/guides/tree.en.md +41 -0
  276. package/docs/guides/tree.md +80 -1
  277. package/docs/search-selection-coverage.md +59 -0
  278. package/docs/wl-ui-produce-coverage.md +2 -0
  279. package/package.json +6 -3
  280. package/dist/helpers2.cjs +0 -1
  281. package/dist/helpers2.js +0 -1
  282. package/dist/temporalField.cjs +0 -1
  283. package/dist/temporalField.js +0 -1
  284. package/dist/useTableQuery.cjs +0 -1
  285. package/dist/useTableQuery.js +0 -1
@@ -0,0 +1,79 @@
1
+ import * as vue from "vue";
2
+
3
+ //#region src/components/C_Transfer/types.d.ts
4
+ /**
5
+ * @Description: 穿梭框组件类型定义
6
+ */
7
+ /** 穿梭框数据项 */
8
+ interface TransferItem<K extends string | number = string | number> {
9
+ /** 唯一标识 */
10
+ key: K;
11
+ /** 显示标签 */
12
+ label: string;
13
+ /** 是否禁用 */
14
+ disabled?: boolean;
15
+ /** 分组名称 */
16
+ group?: string;
17
+ /** 描述信息(用于详细模式) */
18
+ description?: string;
19
+ /** 图标(Iconify) */
20
+ icon?: string;
21
+ /** 额外数据 */
22
+ extra?: Record<string, unknown>;
23
+ }
24
+ /** 组件 Props */
25
+ interface TransferProps<T extends TransferItem = TransferItem> {
26
+ /** 数据源 */
27
+ data: readonly T[];
28
+ /** 右侧已选 key 列表 (v-model) */
29
+ modelValue: readonly NoInfer<T['key']>[];
30
+ /** 左右栏标题 */
31
+ titles?: readonly [string, string];
32
+ /** 是否可搜索 */
33
+ filterable?: boolean;
34
+ /** 禁止操作,搜索输入也随组件禁用。 */
35
+ disabled?: boolean;
36
+ /** 保留列表浏览与筛选,禁止勾选和转移。 */
37
+ readonly?: boolean;
38
+ /** 搜索占位符 */
39
+ filterPlaceholder?: string;
40
+ /** 自定义筛选函数 */
41
+ filterMethod?: (query: string, item: T) => boolean;
42
+ /** 是否显示全选复选框 */
43
+ showSelectAll?: boolean;
44
+ /** 左侧空状态描述 */
45
+ sourceEmptyText?: string;
46
+ /** 右侧空状态描述 */
47
+ targetEmptyText?: string;
48
+ /** 尺寸 */
49
+ size?: 'small' | 'medium' | 'large';
50
+ /** 大列表自动使用虚拟滚动;自定义可变行高或需要完整 DOM 时可关闭。默认 true,100 项起启用。 */
51
+ virtualScroll?: boolean;
52
+ }
53
+ /** 事件保留数据源的键类型,例如纯数字键仍为 number[]。 */
54
+ interface TransferEmits<T extends TransferItem = TransferItem> {
55
+ 'update:modelValue': [value: Array<T['key']>];
56
+ change: [targetKeys: Array<T['key']>, direction: 'left' | 'right', moveKeys: Array<T['key']>];
57
+ }
58
+ /** 默认 Props */
59
+ declare const DEFAULT_TRANSFER_PROPS: Partial<TransferProps>;
60
+ //#endregion
61
+ //#region src/components/C_Transfer/index.vue.d.ts
62
+ declare const __VLS_export: <T extends TransferItem = TransferItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
63
+ props: vue.PublicProps & __VLS_PrettifyLocal<TransferProps<T> & {
64
+ onChange?: ((targetKeys: T["key"][], direction: "left" | "right", moveKeys: T["key"][]) => any) | undefined;
65
+ "onUpdate:modelValue"?: ((value: T["key"][]) => any) | undefined;
66
+ }> & (typeof globalThis extends {
67
+ __VLS_PROPS_FALLBACK: infer P;
68
+ } ? P : {});
69
+ expose: (exposed: {}) => void;
70
+ attrs: any;
71
+ slots: {};
72
+ emit: ((evt: "change", targetKeys: T["key"][], direction: "left" | "right", moveKeys: T["key"][]) => void) & ((evt: "update:modelValue", value: T["key"][]) => void);
73
+ }>) => vue.VNode & {
74
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
75
+ };
76
+ declare const _default: typeof __VLS_export;
77
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
78
+ //#endregion
79
+ export { TransferProps as a, TransferItem as i, DEFAULT_TRANSFER_PROPS as n, TransferEmits as r, _default as t };
@@ -1,26 +1,37 @@
1
- import { n as BatchOperationResult } from "./batchPatch.cjs";
2
- import { n as ComponentLocale } from "./contracts.cjs";
3
1
  import * as vue from "vue";
4
2
 
5
- //#region src/components/C_BatchResult/types.d.ts
6
- interface BatchResultProps {
7
- results: readonly BatchOperationResult[];
8
- title?: string;
9
- pageSize?: number;
10
- locale?: ComponentLocale;
3
+ //#region src/components/C_Barcode/index.vue.d.ts
4
+ interface Props {
5
+ value: string;
6
+ format?: 'CODE128' | 'CODE39' | 'EAN13' | 'EAN8' | 'UPC' | 'ITF14' | 'MSI' | 'pharmacode';
7
+ width?: number;
8
+ height?: number;
9
+ showText?: boolean;
10
+ fontSize?: number;
11
+ textPosition?: 'bottom' | 'top';
12
+ lineColor?: string;
13
+ background?: string;
14
+ showBorder?: boolean;
15
+ label?: string;
16
+ showLabel?: boolean;
11
17
  }
12
- interface BatchResultEmits {
13
- retry: [keys: (string | number)[]];
14
- }
15
- //#endregion
16
- //#region src/components/C_BatchResult/index.vue.d.ts
17
- declare const __VLS_export: vue.DefineComponent<BatchResultProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
18
- retry: (keys: (string | number)[]) => any;
19
- }, string, vue.PublicProps, Readonly<BatchResultProps> & Readonly<{
20
- onRetry?: ((keys: (string | number)[]) => any) | undefined;
18
+ declare const __VLS_export: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
19
+ error: (error: Error) => any;
20
+ }, string, vue.PublicProps, Readonly<Props> & Readonly<{
21
+ onError?: ((error: Error) => any) | undefined;
21
22
  }>, {
22
- pageSize: number;
23
+ label: string;
24
+ width: number;
25
+ fontSize: number;
26
+ lineColor: string;
27
+ format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
28
+ height: number;
29
+ showBorder: boolean;
30
+ showLabel: boolean;
31
+ background: string;
32
+ showText: boolean;
33
+ textPosition: "bottom" | "top";
23
34
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  //#endregion
26
- export { BatchResultEmits as n, BatchResultProps as r, _default as t };
37
+ export { _default as t };
@@ -1,26 +1,37 @@
1
- import { n as BatchOperationResult } from "./batchPatch.js";
2
- import { n as ComponentLocale } from "./contracts.js";
3
1
  import * as vue from "vue";
4
2
 
5
- //#region src/components/C_BatchResult/types.d.ts
6
- interface BatchResultProps {
7
- results: readonly BatchOperationResult[];
8
- title?: string;
9
- pageSize?: number;
10
- locale?: ComponentLocale;
3
+ //#region src/components/C_Barcode/index.vue.d.ts
4
+ interface Props {
5
+ value: string;
6
+ format?: 'CODE128' | 'CODE39' | 'EAN13' | 'EAN8' | 'UPC' | 'ITF14' | 'MSI' | 'pharmacode';
7
+ width?: number;
8
+ height?: number;
9
+ showText?: boolean;
10
+ fontSize?: number;
11
+ textPosition?: 'bottom' | 'top';
12
+ lineColor?: string;
13
+ background?: string;
14
+ showBorder?: boolean;
15
+ label?: string;
16
+ showLabel?: boolean;
11
17
  }
12
- interface BatchResultEmits {
13
- retry: [keys: (string | number)[]];
14
- }
15
- //#endregion
16
- //#region src/components/C_BatchResult/index.vue.d.ts
17
- declare const __VLS_export: vue.DefineComponent<BatchResultProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
18
- retry: (keys: (string | number)[]) => any;
19
- }, string, vue.PublicProps, Readonly<BatchResultProps> & Readonly<{
20
- onRetry?: ((keys: (string | number)[]) => any) | undefined;
18
+ declare const __VLS_export: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
19
+ error: (error: Error) => any;
20
+ }, string, vue.PublicProps, Readonly<Props> & Readonly<{
21
+ onError?: ((error: Error) => any) | undefined;
21
22
  }>, {
22
- pageSize: number;
23
+ label: string;
24
+ width: number;
25
+ fontSize: number;
26
+ lineColor: string;
27
+ format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
28
+ height: number;
29
+ showBorder: boolean;
30
+ showLabel: boolean;
31
+ background: string;
32
+ showText: boolean;
33
+ textPosition: "bottom" | "top";
23
34
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  //#endregion
26
- export { BatchResultEmits as n, BatchResultProps as r, _default as t };
37
+ export { _default as t };
@@ -1,135 +1,26 @@
1
- import { n as RouteItem } from "./types2.cjs";
1
+ import { n as ComponentLocale } from "./contracts.cjs";
2
+ import { n as BatchOperationResult } from "./batchPatch.cjs";
2
3
  import * as vue from "vue";
3
- import { Ref, VNode } from "vue";
4
- import { DropdownProps, MenuInst, MenuOption } from "naive-ui";
5
4
 
6
- //#region src/components/_shared/menuAdapter.d.ts
7
- /**
8
- * 菜单适配器配置
9
- */
10
- interface MenuAdapterConfig {
11
- /**
12
- * 标签文本格式化函数(用于 i18n)
13
- * 默认:原样返回 title
14
- */
15
- labelFormatter?: (title: string) => string;
16
- /**
17
- * 获取菜单项的唯一 key
18
- * 默认:`normalizePath(route.path)`
19
- */
20
- getKey?: (route: RouteItem) => string;
21
- /**
22
- * 获取显示文本
23
- * 默认:`route.meta?.title || route.name || ''`
24
- */
25
- getLabel?: (route: RouteItem) => string;
26
- /**
27
- * 路由过滤器 — return false 排除该项
28
- * 默认:排除 `meta.hidden === true`
29
- */
30
- filter?: (route: RouteItem) => boolean;
31
- /**
32
- * 自定义图标渲染
33
- * 默认:字符串 → Iconify Icon;函数 → 直接调用
34
- */
35
- renderIcon?: (icon: string | (() => VNode) | undefined) => (() => VNode) | undefined;
36
- /**
37
- * 是否递归处理 children
38
- * 默认:true
39
- */
40
- recursive?: boolean;
5
+ //#region src/components/C_BatchResult/types.d.ts
6
+ interface BatchResultProps {
7
+ results: readonly BatchOperationResult[];
8
+ title?: string;
9
+ pageSize?: number;
10
+ locale?: ComponentLocale;
41
11
  }
42
- /**
43
- * 将路由数据转换为 NMenu 的 MenuOption[]
44
- *
45
- * 支持的输入格式:
46
- * 1. **Vue Router RouteRecordRaw** — 直接传 `router.getRoutes()` 或手写路由表
47
- * 2. **后端 JSON 路由表** — `{ path, meta: { title, icon }, children }`
48
- * 3. **自定义格式** — 通过 config 完全自定义 key/label/icon 的取值逻辑
49
- *
50
- * @param routes 路由数据数组
51
- * @param config 适配器配置
52
- * @returns NMenu 可直接使用的 MenuOption[]
53
- */
54
- declare function createMenuOptions(routes: RouteItem[], config?: MenuAdapterConfig): MenuOption[];
55
- /**
56
- * 将路由树扁平化为一维数组(常用于搜索、快捷导航)
57
- *
58
- * @param routes 路由数据数组
59
- * @param filter 过滤器(默认排除 hidden)
60
- * @returns 扁平化后的路由数组
61
- */
62
- declare function flattenRoutes(routes: RouteItem[], filter?: (route: RouteItem) => boolean): RouteItem[];
63
- //#endregion
64
- //#region src/components/C_Menu/types.d.ts
65
- type MenuKey = string | number;
66
- type MenuValue = MenuKey | null;
67
- type OwnMenuKey<Option> = Option extends {
68
- key?: infer Key;
69
- } ? Extract<Key, MenuKey> : never;
70
- /** 已遇到的递归业务类型或原生完整键类型均停止展开,内联配置包含子节点。 */
71
- type MenuOptionKeys<Option, Seen = never> = Option extends Seen ? OwnMenuKey<Option> : MenuKey extends OwnMenuKey<Option> ? MenuKey : OwnMenuKey<Option> | (Option extends {
72
- children?: infer Children;
73
- } ? Children extends readonly unknown[] ? MenuOptionKeys<Children[number], Seen | Option> : never : never);
74
- type WidenMenuKey<Key> = Key extends string ? string : Key extends number ? number : never;
75
- type MenuSelectionKey<O extends MenuOption[] | undefined> = O extends MenuOption[] ? [MenuOptionKeys<O[number]>] extends [never] ? MenuKey : WidenMenuKey<MenuOptionKeys<O[number]>> : string;
76
- interface MenuProps<O extends MenuOption[] | undefined = MenuOption[] | undefined> {
77
- options?: O;
78
- routes?: RouteItem[];
79
- adapterConfig?: MenuAdapterConfig;
80
- labelFormatter?: (label: string) => string;
81
- /** @deprecated Use modelValue. */
82
- value?: MenuValue;
83
- modelValue?: MenuValue;
84
- expandedKeys?: MenuKey[];
85
- defaultExpandedKeys?: MenuKey[];
86
- mode?: 'vertical' | 'horizontal';
87
- collapsed?: boolean;
88
- collapsedWidth?: number;
89
- collapsedIconSize?: number;
90
- inverted?: boolean;
91
- themeOverrides?: Record<string, any>;
92
- indent?: number;
93
- rootIndent?: number;
94
- dropdownProps?: DropdownProps;
95
- }
96
- interface MenuEmits<O extends MenuOption[] | undefined = MenuOption[] | undefined> {
97
- select: [key: MenuSelectionKey<O>];
98
- /** 鼠标或键盘聚焦叶子项时触发,可用于无副作用的路由预取。 */
99
- intent: [key: MenuSelectionKey<O>];
100
- 'update:modelValue': [key: MenuSelectionKey<O> | null];
101
- /** @deprecated Use update:modelValue. */
102
- 'update:value': [key: MenuSelectionKey<O> | null];
103
- 'update:expandedKeys': [keys: MenuSelectionKey<O>[]];
104
- }
105
- interface MenuExpose {
106
- showOption: (key: MenuKey) => void;
107
- /** Vue 公开实例会解包顶层 Ref。 */
108
- menuRef: MenuInst | null;
12
+ interface BatchResultEmits {
13
+ retry: [keys: (string | number)[]];
109
14
  }
110
15
  //#endregion
111
- //#region src/components/C_Menu/index.vue.d.ts
112
- declare const __VLS_export: <Options extends MenuOption[] | undefined = undefined>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
113
- props: vue.PublicProps & __VLS_PrettifyLocal<MenuProps<Options> & {
114
- "onUpdate:modelValue"?: ((key: MenuSelectionKey<Options> | null) => any) | undefined;
115
- onSelect?: ((key: MenuSelectionKey<Options>) => any) | undefined;
116
- onIntent?: ((key: MenuSelectionKey<Options>) => any) | undefined;
117
- "onUpdate:value"?: ((key: MenuSelectionKey<Options> | null) => any) | undefined;
118
- "onUpdate:expandedKeys"?: ((keys: MenuSelectionKey<Options>[]) => any) | undefined;
119
- }> & (typeof globalThis extends {
120
- __VLS_PROPS_FALLBACK: infer P;
121
- } ? P : {});
122
- expose: (exposed: vue.ShallowUnwrapRef<{
123
- showOption: (key: MenuKey) => void | undefined;
124
- menuRef: Ref<MenuInst | null, MenuInst | null>;
125
- }>) => void;
126
- attrs: any;
127
- slots: {};
128
- emit: ((evt: "update:modelValue", key: MenuSelectionKey<Options> | null) => void) & ((evt: "select", key: MenuSelectionKey<Options>) => void) & ((evt: "intent", key: MenuSelectionKey<Options>) => void) & ((evt: "update:value", key: MenuSelectionKey<Options> | null) => void) & ((evt: "update:expandedKeys", keys: MenuSelectionKey<Options>[]) => void);
129
- }>) => vue.VNode & {
130
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
131
- };
16
+ //#region src/components/C_BatchResult/index.vue.d.ts
17
+ declare const __VLS_export: vue.DefineComponent<BatchResultProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
18
+ retry: (keys: (string | number)[]) => any;
19
+ }, string, vue.PublicProps, Readonly<BatchResultProps> & Readonly<{
20
+ onRetry?: ((keys: (string | number)[]) => any) | undefined;
21
+ }>, {
22
+ pageSize: number;
23
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
132
24
  declare const _default: typeof __VLS_export;
133
- type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
134
25
  //#endregion
135
- export { MenuProps as a, createMenuOptions as c, MenuKey as i, flattenRoutes as l, MenuEmits as n, MenuValue as o, MenuExpose as r, MenuAdapterConfig as s, _default as t };
26
+ export { BatchResultEmits as n, BatchResultProps as r, _default as t };
@@ -1,43 +1,26 @@
1
- import { i as BreadcrumbItem } from "./public.js";
1
+ import { n as ComponentLocale } from "./contracts.js";
2
+ import { n as BatchOperationResult } from "./batchPatch.js";
2
3
  import * as vue from "vue";
3
4
 
4
- //#region src/components/C_Breadcrumb/types.d.ts
5
- interface BreadcrumbRouteMeta {
6
- [key: string]: unknown;
7
- title?: unknown;
8
- icon?: unknown;
9
- hidden?: unknown;
10
- breadcrumb?: unknown;
5
+ //#region src/components/C_BatchResult/types.d.ts
6
+ interface BatchResultProps {
7
+ results: readonly BatchOperationResult[];
8
+ title?: string;
9
+ pageSize?: number;
10
+ locale?: ComponentLocale;
11
11
  }
12
- /** 可直接接收应用提供的授权菜单,非字符串图标由组件安全忽略。 */
13
- interface BreadcrumbMenuItem {
14
- path?: string;
15
- key?: string | number;
16
- name?: string | symbol | null;
17
- label?: string;
18
- icon?: unknown;
19
- meta?: BreadcrumbRouteMeta;
20
- children?: readonly BreadcrumbMenuItem[];
21
- disabled?: boolean;
22
- type?: string;
12
+ interface BatchResultEmits {
13
+ retry: [keys: (string | number)[]];
23
14
  }
24
15
  //#endregion
25
- //#region src/components/C_Breadcrumb/index.vue.d.ts
26
- type __VLS_Props = {
27
- /** 手动路径,标签沿用传入值。 */items?: readonly BreadcrumbItem[]; /** 授权后的菜单树;提供时(含空数组)作为目录的唯一数据来源。 */
28
- menus?: readonly BreadcrumbMenuItem[];
29
- showIcon?: boolean;
30
- iconSize?: number; /** 自动路径和菜单标签的翻译函数。 */
31
- labelFormatter?: (label: string) => string;
32
- };
33
- declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
34
- select: (path: string) => any;
35
- }, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
36
- onSelect?: ((path: string) => any) | undefined;
16
+ //#region src/components/C_BatchResult/index.vue.d.ts
17
+ declare const __VLS_export: vue.DefineComponent<BatchResultProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
18
+ retry: (keys: (string | number)[]) => any;
19
+ }, string, vue.PublicProps, Readonly<BatchResultProps> & Readonly<{
20
+ onRetry?: ((keys: (string | number)[]) => any) | undefined;
37
21
  }>, {
38
- showIcon: boolean;
39
- iconSize: number;
22
+ pageSize: number;
40
23
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
41
24
  declare const _default: typeof __VLS_export;
42
25
  //#endregion
43
- export { BreadcrumbMenuItem as n, _default as t };
26
+ export { BatchResultEmits as n, BatchResultProps as r, _default as t };
@@ -1,43 +1,135 @@
1
- import { t as BreadcrumbItem } from "./types2.cjs";
1
+ import { n as RouteItem } from "./types3.cjs";
2
2
  import * as vue from "vue";
3
+ import { Ref, VNode } from "vue";
4
+ import { DropdownProps, MenuInst, MenuOption } from "naive-ui";
3
5
 
4
- //#region src/components/C_Breadcrumb/types.d.ts
5
- interface BreadcrumbRouteMeta {
6
- [key: string]: unknown;
7
- title?: unknown;
8
- icon?: unknown;
9
- hidden?: unknown;
10
- breadcrumb?: unknown;
11
- }
12
- /** 可直接接收应用提供的授权菜单,非字符串图标由组件安全忽略。 */
13
- interface BreadcrumbMenuItem {
14
- path?: string;
15
- key?: string | number;
16
- name?: string | symbol | null;
17
- label?: string;
18
- icon?: unknown;
19
- meta?: BreadcrumbRouteMeta;
20
- children?: readonly BreadcrumbMenuItem[];
21
- disabled?: boolean;
22
- type?: string;
6
+ //#region src/components/_shared/menuAdapter.d.ts
7
+ /**
8
+ * 菜单适配器配置
9
+ */
10
+ interface MenuAdapterConfig {
11
+ /**
12
+ * 标签文本格式化函数(用于 i18n)
13
+ * 默认:原样返回 title
14
+ */
15
+ labelFormatter?: (title: string) => string;
16
+ /**
17
+ * 获取菜单项的唯一 key
18
+ * 默认:`normalizePath(route.path)`
19
+ */
20
+ getKey?: (route: RouteItem) => string;
21
+ /**
22
+ * 获取显示文本
23
+ * 默认:`route.meta?.title || route.name || ''`
24
+ */
25
+ getLabel?: (route: RouteItem) => string;
26
+ /**
27
+ * 路由过滤器 — return false 排除该项
28
+ * 默认:排除 `meta.hidden === true`
29
+ */
30
+ filter?: (route: RouteItem) => boolean;
31
+ /**
32
+ * 自定义图标渲染
33
+ * 默认:字符串 → Iconify Icon;函数 → 直接调用
34
+ */
35
+ renderIcon?: (icon: string | (() => VNode) | undefined) => (() => VNode) | undefined;
36
+ /**
37
+ * 是否递归处理 children
38
+ * 默认:true
39
+ */
40
+ recursive?: boolean;
23
41
  }
42
+ /**
43
+ * 将路由数据转换为 NMenu 的 MenuOption[]
44
+ *
45
+ * 支持的输入格式:
46
+ * 1. **Vue Router RouteRecordRaw** — 直接传 `router.getRoutes()` 或手写路由表
47
+ * 2. **后端 JSON 路由表** — `{ path, meta: { title, icon }, children }`
48
+ * 3. **自定义格式** — 通过 config 完全自定义 key/label/icon 的取值逻辑
49
+ *
50
+ * @param routes 路由数据数组
51
+ * @param config 适配器配置
52
+ * @returns NMenu 可直接使用的 MenuOption[]
53
+ */
54
+ declare function createMenuOptions(routes: RouteItem[], config?: MenuAdapterConfig): MenuOption[];
55
+ /**
56
+ * 将路由树扁平化为一维数组(常用于搜索、快捷导航)
57
+ *
58
+ * @param routes 路由数据数组
59
+ * @param filter 过滤器(默认排除 hidden)
60
+ * @returns 扁平化后的路由数组
61
+ */
62
+ declare function flattenRoutes(routes: RouteItem[], filter?: (route: RouteItem) => boolean): RouteItem[];
24
63
  //#endregion
25
- //#region src/components/C_Breadcrumb/index.vue.d.ts
26
- type __VLS_Props = {
27
- /** 手动路径,标签沿用传入值。 */items?: readonly BreadcrumbItem[]; /** 授权后的菜单树;提供时(含空数组)作为目录的唯一数据来源。 */
28
- menus?: readonly BreadcrumbMenuItem[];
29
- showIcon?: boolean;
30
- iconSize?: number; /** 自动路径和菜单标签的翻译函数。 */
64
+ //#region src/components/C_Menu/types.d.ts
65
+ type MenuKey = string | number;
66
+ type MenuValue = MenuKey | null;
67
+ type OwnMenuKey<Option> = Option extends {
68
+ key?: infer Key;
69
+ } ? Extract<Key, MenuKey> : never;
70
+ /** 已遇到的递归业务类型或原生完整键类型均停止展开,内联配置包含子节点。 */
71
+ type MenuOptionKeys<Option, Seen = never> = Option extends Seen ? OwnMenuKey<Option> : MenuKey extends OwnMenuKey<Option> ? MenuKey : OwnMenuKey<Option> | (Option extends {
72
+ children?: infer Children;
73
+ } ? Children extends readonly unknown[] ? MenuOptionKeys<Children[number], Seen | Option> : never : never);
74
+ type WidenMenuKey<Key> = Key extends string ? string : Key extends number ? number : never;
75
+ type MenuSelectionKey<O extends MenuOption[] | undefined> = O extends MenuOption[] ? [MenuOptionKeys<O[number]>] extends [never] ? MenuKey : WidenMenuKey<MenuOptionKeys<O[number]>> : string;
76
+ interface MenuProps<O extends MenuOption[] | undefined = MenuOption[] | undefined> {
77
+ options?: O;
78
+ routes?: RouteItem[];
79
+ adapterConfig?: MenuAdapterConfig;
31
80
  labelFormatter?: (label: string) => string;
81
+ /** @deprecated Use modelValue. */
82
+ value?: MenuValue;
83
+ modelValue?: MenuValue;
84
+ expandedKeys?: MenuKey[];
85
+ defaultExpandedKeys?: MenuKey[];
86
+ mode?: 'vertical' | 'horizontal';
87
+ collapsed?: boolean;
88
+ collapsedWidth?: number;
89
+ collapsedIconSize?: number;
90
+ inverted?: boolean;
91
+ themeOverrides?: Record<string, any>;
92
+ indent?: number;
93
+ rootIndent?: number;
94
+ dropdownProps?: DropdownProps;
95
+ }
96
+ interface MenuEmits<O extends MenuOption[] | undefined = MenuOption[] | undefined> {
97
+ select: [key: MenuSelectionKey<O>];
98
+ /** 鼠标或键盘聚焦叶子项时触发,可用于无副作用的路由预取。 */
99
+ intent: [key: MenuSelectionKey<O>];
100
+ 'update:modelValue': [key: MenuSelectionKey<O> | null];
101
+ /** @deprecated Use update:modelValue. */
102
+ 'update:value': [key: MenuSelectionKey<O> | null];
103
+ 'update:expandedKeys': [keys: MenuSelectionKey<O>[]];
104
+ }
105
+ interface MenuExpose {
106
+ showOption: (key: MenuKey) => void;
107
+ /** Vue 公开实例会解包顶层 Ref。 */
108
+ menuRef: MenuInst | null;
109
+ }
110
+ //#endregion
111
+ //#region src/components/C_Menu/index.vue.d.ts
112
+ declare const __VLS_export: <Options extends MenuOption[] | undefined = undefined>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
113
+ props: vue.PublicProps & __VLS_PrettifyLocal<MenuProps<Options> & {
114
+ onSelect?: ((key: MenuSelectionKey<Options>) => any) | undefined;
115
+ "onUpdate:modelValue"?: ((key: MenuSelectionKey<Options> | null) => any) | undefined;
116
+ onIntent?: ((key: MenuSelectionKey<Options>) => any) | undefined;
117
+ "onUpdate:value"?: ((key: MenuSelectionKey<Options> | null) => any) | undefined;
118
+ "onUpdate:expandedKeys"?: ((keys: MenuSelectionKey<Options>[]) => any) | undefined;
119
+ }> & (typeof globalThis extends {
120
+ __VLS_PROPS_FALLBACK: infer P;
121
+ } ? P : {});
122
+ expose: (exposed: vue.ShallowUnwrapRef<{
123
+ showOption: (key: MenuKey) => void | undefined;
124
+ menuRef: Ref<MenuInst | null, MenuInst | null>;
125
+ }>) => void;
126
+ attrs: any;
127
+ slots: {};
128
+ emit: ((evt: "select", key: MenuSelectionKey<Options>) => void) & ((evt: "update:modelValue", key: MenuSelectionKey<Options> | null) => void) & ((evt: "intent", key: MenuSelectionKey<Options>) => void) & ((evt: "update:value", key: MenuSelectionKey<Options> | null) => void) & ((evt: "update:expandedKeys", keys: MenuSelectionKey<Options>[]) => void);
129
+ }>) => vue.VNode & {
130
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
32
131
  };
33
- declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
34
- select: (path: string) => any;
35
- }, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
36
- onSelect?: ((path: string) => any) | undefined;
37
- }>, {
38
- showIcon: boolean;
39
- iconSize: number;
40
- }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
41
132
  declare const _default: typeof __VLS_export;
133
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
42
134
  //#endregion
43
- export { BreadcrumbMenuItem as n, _default as t };
135
+ export { MenuProps as a, createMenuOptions as c, MenuKey as i, flattenRoutes as l, MenuEmits as n, MenuValue as o, MenuExpose as r, MenuAdapterConfig as s, _default as t };
@@ -1,35 +1,43 @@
1
+ import { i as BreadcrumbItem } from "./public.js";
1
2
  import * as vue from "vue";
2
3
 
3
- //#region src/components/C_Cascade/types.d.ts
4
- interface CascadeItem {
5
- label: string;
6
- value: string | number;
7
- children?: CascadeItem[];
4
+ //#region src/components/C_Breadcrumb/types.d.ts
5
+ interface BreadcrumbRouteMeta {
6
+ [key: string]: unknown;
7
+ title?: unknown;
8
+ icon?: unknown;
9
+ hidden?: unknown;
10
+ breadcrumb?: unknown;
8
11
  }
9
- interface CascadeValue {
10
- primary?: Pick<CascadeItem, 'label' | 'value'> | null;
11
- secondary?: Pick<CascadeItem, 'label' | 'value'> | null;
12
- tertiary?: Pick<CascadeItem, 'label' | 'value'> | null;
12
+ /** 可直接接收应用提供的授权菜单,非字符串图标由组件安全忽略。 */
13
+ interface BreadcrumbMenuItem {
14
+ path?: string;
15
+ key?: string | number;
16
+ name?: string | symbol | null;
17
+ label?: string;
18
+ icon?: unknown;
19
+ meta?: BreadcrumbRouteMeta;
20
+ children?: readonly BreadcrumbMenuItem[];
21
+ disabled?: boolean;
22
+ type?: string;
13
23
  }
14
24
  //#endregion
15
- //#region src/components/C_Cascade/index.vue.d.ts
25
+ //#region src/components/C_Breadcrumb/index.vue.d.ts
16
26
  type __VLS_Props = {
17
- data: CascadeItem[];
18
- placeholders?: string[];
19
- modelValue?: CascadeValue;
20
- disabled?: boolean;
21
- readonly?: boolean;
22
- size?: 'small' | 'medium' | 'large';
27
+ /** 手动路径,标签沿用传入值。 */items?: readonly BreadcrumbItem[]; /** 授权后的菜单树;提供时(含空数组)作为目录的唯一数据来源。 */
28
+ menus?: readonly BreadcrumbMenuItem[];
29
+ showIcon?: boolean;
30
+ iconSize?: number; /** 自动路径和菜单标签的翻译函数。 */
31
+ labelFormatter?: (label: string) => string;
23
32
  };
24
33
  declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
25
- change: (value: CascadeValue) => any;
26
- "update:modelValue": (value: CascadeValue) => any;
34
+ select: (path: string) => any;
27
35
  }, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
28
- onChange?: ((value: CascadeValue) => any) | undefined;
29
- "onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
36
+ onSelect?: ((path: string) => any) | undefined;
30
37
  }>, {
31
- placeholders: string[];
38
+ showIcon: boolean;
39
+ iconSize: number;
32
40
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
33
41
  declare const _default: typeof __VLS_export;
34
42
  //#endregion
35
- export { CascadeItem as n, CascadeValue as r, _default as t };
43
+ export { BreadcrumbMenuItem as n, _default as t };