@robot-admin/naive-ui-components 0.22.0 → 0.23.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.
- package/CHANGELOG.md +18 -0
- package/README.md +9 -5
- package/README_EN.md +9 -5
- package/dist/C_ActionBar.d.cts +2 -1
- package/dist/C_ActionBar.d.ts +2 -1
- package/dist/C_AntV2.cjs +3 -3
- package/dist/C_AntV2.js +3 -3
- package/dist/C_BatchResult.cjs +1 -0
- package/dist/C_BatchResult.css +32 -0
- package/dist/C_BatchResult.d.cts +2 -0
- package/dist/C_BatchResult.d.ts +2 -0
- package/dist/C_BatchResult.js +1 -0
- package/dist/C_BatchResult2.cjs +1 -0
- package/dist/C_BatchResult2.js +1 -0
- package/dist/C_Breadcrumb.d.cts +2 -2
- package/dist/C_Breadcrumb.d.ts +1 -1
- package/dist/C_Captcha.d.ts +2 -0
- package/dist/C_Cascade.d.cts +1 -1
- package/dist/C_Cascade.d.ts +1 -1
- package/dist/C_Chat.d.cts +1 -1
- package/dist/C_Chat.d.ts +1 -1
- package/dist/C_City.d.cts +1 -1
- package/dist/C_City.d.ts +1 -1
- package/dist/C_Code.d.cts +1 -1
- package/dist/C_Code.d.ts +1 -1
- package/dist/C_ContextMenu.d.cts +1 -1
- package/dist/C_ContextMenu.d.ts +1 -1
- package/dist/C_DataPicker.cjs +1 -0
- package/dist/C_DataPicker.css +54 -0
- package/dist/C_DataPicker.d.cts +2 -0
- package/dist/C_DataPicker.d.ts +5 -0
- package/dist/C_DataPicker.js +1 -0
- package/dist/C_DataPicker2.cjs +1 -0
- package/dist/C_DataPicker2.js +1 -0
- package/dist/C_Date.d.cts +1 -1
- package/dist/C_Date.d.ts +1 -1
- package/dist/C_Density.cjs +1 -0
- package/dist/C_Density.css +1 -0
- package/dist/C_Density.d.cts +3 -0
- package/dist/C_Density.d.ts +3 -0
- package/dist/C_Density.js +1 -0
- package/dist/C_Density2.cjs +1 -0
- package/dist/C_Density2.js +1 -0
- package/dist/C_Editor.d.cts +1 -1
- package/dist/C_Editor.d.ts +1 -1
- package/dist/C_ErrorSummary.cjs +1 -0
- package/dist/C_ErrorSummary.css +29 -0
- package/dist/C_ErrorSummary.d.cts +3 -0
- package/dist/C_ErrorSummary.d.ts +3 -0
- package/dist/C_ErrorSummary.js +1 -0
- package/dist/C_ErrorSummary2.cjs +1 -0
- package/dist/C_ErrorSummary2.js +1 -0
- package/dist/C_Form.base.css +150 -148
- package/dist/C_Form.cjs +1 -1
- package/dist/C_Form.css +151 -253
- package/dist/C_Form.d.cts +3 -1
- package/dist/C_Form.d.ts +19 -1
- package/dist/C_Form.js +1 -1
- package/dist/C_FormModal.css +11 -12
- package/dist/C_FormModal.d.cts +1 -1
- package/dist/C_FormModal.d.ts +18 -2
- package/dist/C_FormModal2.cjs +1 -1
- package/dist/C_FormModal2.js +1 -1
- package/dist/C_FormSearch.cjs +1 -1
- package/dist/C_FormSearch.css +128 -56
- package/dist/C_FormSearch.d.cts +3 -3
- package/dist/C_FormSearch.d.ts +5 -3
- package/dist/C_FormSearch.js +1 -1
- package/dist/C_FormulaEditor.d.cts +1 -1
- package/dist/C_FormulaEditor.d.ts +1 -1
- package/dist/C_Guide.d.cts +1 -1
- package/dist/C_Guide.d.ts +1 -1
- package/dist/C_Icon.d.cts +1 -1
- package/dist/C_Icon.d.ts +1 -1
- package/dist/C_Language.d.cts +1 -1
- package/dist/C_Language.d.ts +1 -1
- package/dist/C_Loading.d.cts +1 -1
- package/dist/C_Loading.d.ts +1 -1
- package/dist/C_Login.d.cts +1 -1
- package/dist/C_Login.d.ts +4 -1
- package/dist/C_Markdown.d.cts +1 -1
- package/dist/C_Markdown.d.ts +1 -1
- package/dist/C_Menu.d.cts +2 -2
- package/dist/C_Menu.d.ts +1 -1
- package/dist/C_OrgChart.d.cts +1 -1
- package/dist/C_OrgChart.d.ts +1 -1
- package/dist/C_Progress.d.cts +1 -1
- package/dist/C_Progress.d.ts +1 -1
- package/dist/C_SectionNav.cjs +1 -0
- package/dist/C_SectionNav.css +46 -0
- package/dist/C_SectionNav.d.cts +2 -0
- package/dist/C_SectionNav.d.ts +2 -0
- package/dist/C_SectionNav.js +1 -0
- package/dist/C_SectionNav2.cjs +1 -0
- package/dist/C_SectionNav2.js +1 -0
- package/dist/C_Skeleton.d.cts +1 -1
- package/dist/C_Skeleton.d.ts +1 -1
- package/dist/C_Steps.d.cts +1 -1
- package/dist/C_Steps.d.ts +1 -1
- package/dist/C_Table.base.css +258 -256
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +109 -1283
- package/dist/C_Table.d.cts +2 -1
- package/dist/C_Table.d.ts +11 -7
- package/dist/C_Table.js +1 -1
- package/dist/C_Table2.cjs +3 -0
- package/dist/C_Table2.js +3 -0
- package/dist/C_Tabs.cjs +1 -1
- package/dist/C_Tabs.d.cts +1 -1
- package/dist/C_Tabs.d.ts +1 -1
- package/dist/C_Tabs.js +1 -1
- package/dist/C_TagsView.d.cts +1 -1
- package/dist/C_Theme.d.cts +1 -1
- package/dist/C_Theme.d.ts +1 -1
- package/dist/C_Timeline.d.cts +1 -1
- package/dist/C_Timeline.d.ts +1 -1
- package/dist/C_Transfer.d.cts +1 -1
- package/dist/C_Transfer.d.ts +1 -1
- package/dist/C_Tree.d.cts +1 -1
- package/dist/C_Tree.d.ts +10 -6
- package/dist/C_Upload.d.cts +1 -1
- package/dist/C_Upload.d.ts +1 -1
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/Card.cjs +1 -1
- package/dist/Card.js +1 -1
- package/dist/Steps.cjs +1 -1
- package/dist/Steps.js +1 -1
- package/dist/Tabs.cjs +1 -1
- package/dist/Tabs.js +1 -1
- package/dist/batchPatch.cjs +1 -0
- package/dist/batchPatch.d.cts +26 -0
- package/dist/batchPatch.d.ts +26 -0
- package/dist/batchPatch.js +1 -0
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +7 -1
- package/dist/config.d.ts +7 -1
- package/dist/config.js +1 -1
- package/dist/config2.d.ts +14 -0
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants2.d.cts +402 -173
- package/dist/constants2.d.ts +402 -173
- package/dist/constants3.d.cts +3 -3
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.cts +173 -402
- package/dist/constants4.d.ts +173 -402
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data.cjs +1 -1
- package/dist/data.d.cts +5 -108
- package/dist/data.d.ts +5 -108
- package/dist/data.js +1 -1
- package/dist/data2.cjs +1 -1
- package/dist/data2.d.cts +108 -0
- package/dist/data2.d.ts +108 -0
- package/dist/data2.js +1 -1
- package/dist/data3.cjs +1 -0
- package/dist/data3.js +1 -0
- package/dist/dateRange.d.cts +108 -13
- package/dist/dateRange.d.ts +108 -13
- package/dist/density.cjs +1 -1
- package/dist/density.js +1 -1
- package/dist/dictionary.cjs +1 -0
- package/dist/dictionary.d.cts +38 -0
- package/dist/dictionary.d.ts +38 -0
- package/dist/dictionary.js +1 -0
- package/dist/helpers.cjs +1 -1
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +65 -53
- package/dist/index.d.ts +73 -57
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +1 -1
- package/dist/index.vue.d.ts +1 -1
- package/dist/index10.vue.d.cts +37 -80
- package/dist/index10.vue.d.ts +77 -53
- package/dist/index11.vue.d.cts +77 -53
- package/dist/index11.vue.d.ts +1117 -45
- package/dist/index12.vue.d.cts +1117 -45
- package/dist/index12.vue.d.ts +17 -128
- package/dist/index13.vue.d.cts +17 -128
- package/dist/index13.vue.d.ts +57 -53
- package/dist/index14.vue.d.cts +57 -53
- package/dist/index14.vue.d.ts +16 -25
- package/dist/index15.vue.d.cts +16 -25
- package/dist/index15.vue.d.ts +52 -12
- package/dist/index16.vue.d.cts +52 -12
- package/dist/index16.vue.d.ts +13 -129
- package/dist/index17.vue.d.cts +13 -129
- package/dist/index17.vue.d.ts +123 -74
- package/dist/index18.vue.d.cts +123 -74
- package/dist/index18.vue.d.ts +48 -71
- package/dist/index19.vue.d.cts +40 -91
- package/dist/index19.vue.d.ts +36 -96
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +38 -47
- package/dist/index20.vue.d.ts +13 -48
- package/dist/index21.vue.d.cts +12 -96
- package/dist/index21.vue.d.ts +25 -95
- package/dist/index22.vue.d.cts +20 -32
- package/dist/index22.vue.d.ts +75 -37
- package/dist/index23.vue.d.cts +77 -13
- package/dist/index23.vue.d.ts +71 -13
- package/dist/index24.vue.d.cts +2 -2
- package/dist/index24.vue.d.ts +1 -1
- package/dist/index25.vue.d.cts +116 -90
- package/dist/index25.vue.d.ts +116 -90
- package/dist/index26.vue.d.cts +94 -59
- package/dist/index26.vue.d.ts +94 -59
- package/dist/index27.vue.d.cts +75 -0
- package/dist/index27.vue.d.ts +75 -0
- package/dist/index28.vue.d.cts +103 -0
- package/dist/index28.vue.d.ts +103 -0
- package/dist/index29.vue.d.cts +105 -0
- package/dist/index29.vue.d.ts +105 -0
- package/dist/index3.vue.d.cts +4 -4
- package/dist/index3.vue.d.ts +4 -4
- package/dist/index30.vue.d.cts +28 -0
- package/dist/index30.vue.d.ts +28 -0
- package/dist/index4.vue.d.cts +19 -128
- package/dist/index4.vue.d.ts +17 -34
- package/dist/index5.vue.d.cts +127 -35
- package/dist/index5.vue.d.ts +30 -19
- package/dist/index6.vue.d.cts +30 -19
- package/dist/index6.vue.d.ts +22 -118
- package/dist/index7.vue.d.cts +22 -118
- package/dist/index7.vue.d.ts +112 -18
- package/dist/index8.vue.d.cts +112 -18
- package/dist/index8.vue.d.ts +24 -35
- package/dist/index9.vue.d.cts +24 -35
- package/dist/index9.vue.d.ts +37 -80
- package/dist/mapUtils.d.cts +4 -4
- package/dist/mapUtils.d.ts +4 -4
- package/dist/numberCodec.cjs +1 -0
- package/dist/numberCodec.d.cts +25 -0
- package/dist/numberCodec.d.ts +25 -0
- package/dist/numberCodec.js +1 -0
- package/dist/observer.cjs +1 -0
- package/dist/observer.js +1 -0
- package/dist/presets.d.cts +3 -66
- package/dist/presets.d.ts +3 -66
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.d.cts +1 -1
- package/dist/resolver.d.ts +1 -1
- package/dist/resolver.js +1 -1
- package/dist/serializeSearch.cjs +1 -0
- package/dist/serializeSearch.js +1 -0
- package/dist/style.css +561 -322
- package/dist/types.d.cts +60 -103
- package/dist/types.d.ts +62 -52
- package/dist/types2.d.cts +104 -51
- package/dist/types2.d.ts +56 -0
- package/dist/types3.d.cts +56 -0
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +6 -6
- package/dist/useCollapsePanel.d.ts +6 -6
- package/dist/useComponentLocale.cjs +1 -1
- package/dist/useComponentLocale.js +1 -1
- package/dist/useCropperCore.d.cts +13 -13
- package/dist/useCropperCore.d.ts +13 -13
- package/dist/useDataResource.cjs +1 -0
- package/dist/useDataResource.js +1 -0
- package/dist/useDictionary.cjs +1 -0
- package/dist/useDictionary.js +1 -0
- package/dist/useDynamicFormState.d.cts +959 -582
- package/dist/useDynamicFormState.d.ts +951 -584
- package/dist/useEdgeInteraction.d.cts +3 -3
- package/dist/useEdgeInteraction.d.ts +3 -3
- package/dist/useFormArray.cjs +1 -0
- package/dist/useFormArray.d.cts +69 -0
- package/dist/useFormArray.d.ts +69 -0
- package/dist/useFormArray.js +1 -0
- package/dist/useFormConfig.cjs +1 -0
- package/dist/useFormConfig.d.cts +590 -0
- package/dist/useFormConfig.d.ts +590 -0
- package/dist/useFormConfig.js +1 -0
- package/dist/useFullscreen.d.cts +3 -3
- package/dist/useFullscreen.d.ts +3 -3
- package/dist/useGridWidth.cjs +1 -0
- package/dist/useGridWidth.js +1 -0
- package/dist/useInfiniteScroll.d.cts +2 -2
- package/dist/useInfiniteScroll.d.ts +2 -2
- package/dist/useQRCode.d.cts +3 -3
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSignatureHistory.d.cts +4 -4
- package/dist/useSignatureHistory.d.ts +4 -4
- package/dist/useSplitResize.d.cts +5 -5
- package/dist/useSplitResize.d.ts +5 -5
- package/dist/useTableGlobalConfig.cjs +1 -0
- package/dist/useTableGlobalConfig.js +1 -0
- package/dist/useTableQuery.cjs +1 -3
- package/dist/useTableQuery.js +1 -3
- package/dist/useWorkflowValidation.d.cts +6 -6
- package/dist/useWorkflowValidation.d.ts +6 -6
- package/dist/validation.cjs +1 -0
- package/dist/validation.d.cts +18 -0
- package/dist/validation.d.ts +18 -0
- package/dist/validation.js +1 -0
- package/dist/verification.d.cts +4 -4
- package/dist/verification.d.ts +4 -4
- package/dist/workflows.cjs +1 -0
- package/dist/workflows.d.cts +2 -0
- package/dist/workflows.d.ts +2 -0
- package/dist/workflows.js +1 -0
- package/docs/components.en.md +13 -1
- package/docs/components.md +13 -1
- package/docs/guides/batch-results.md +47 -0
- package/docs/guides/data-picker.md +65 -0
- package/docs/guides/data-workflows.md +123 -0
- package/docs/guides/form-density.en.md +56 -3
- package/docs/guides/form-density.md +56 -3
- package/docs/guides/search-workflows.md +164 -0
- package/docs/guides/usage.en.md +1 -1
- package/package.json +21 -1
- package/dist/C_FormSearch2.cjs +0 -1
- package/dist/C_FormSearch2.js +0 -1
- package/dist/useTableQuery.d.cts +0 -1957
- package/dist/useTableQuery.d.ts +0 -1957
package/dist/index4.vue.d.cts
CHANGED
|
@@ -1,135 +1,26 @@
|
|
|
1
|
-
import { n as
|
|
1
|
+
import { n as BatchOperationResult } from "./batchPatch.cjs";
|
|
2
|
+
import { n as ComponentLocale } from "./contracts.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/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
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/
|
|
112
|
-
declare const __VLS_export: <
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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 {
|
|
26
|
+
export { BatchResultEmits as n, BatchResultProps as r, _default as t };
|
package/dist/index4.vue.d.ts
CHANGED
|
@@ -1,43 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as BatchOperationResult } from "./batchPatch.js";
|
|
2
|
+
import { n as ComponentLocale } from "./contracts.js";
|
|
2
3
|
import * as vue from "vue";
|
|
3
4
|
|
|
4
|
-
//#region src/components/
|
|
5
|
-
interface
|
|
6
|
-
|
|
7
|
-
title?:
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
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 {
|
|
26
|
+
export { BatchResultEmits as n, BatchResultProps as r, _default as t };
|
package/dist/index5.vue.d.cts
CHANGED
|
@@ -1,43 +1,135 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as RouteItem } from "./types2.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/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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/
|
|
26
|
-
type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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 {
|
|
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 };
|
package/dist/index5.vue.d.ts
CHANGED
|
@@ -1,32 +1,43 @@
|
|
|
1
|
+
import { i as BreadcrumbItem } from "./public.js";
|
|
1
2
|
import * as vue from "vue";
|
|
2
3
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
interface
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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/
|
|
25
|
+
//#region src/components/C_Breadcrumb/index.vue.d.ts
|
|
16
26
|
type __VLS_Props = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
/** 手动路径,标签沿用传入值。 */items?: readonly BreadcrumbItem[]; /** 授权后的菜单树;提供时(含空数组)作为目录的唯一数据来源。 */
|
|
28
|
+
menus?: readonly BreadcrumbMenuItem[];
|
|
29
|
+
showIcon?: boolean;
|
|
30
|
+
iconSize?: number; /** 自动路径和菜单标签的翻译函数。 */
|
|
31
|
+
labelFormatter?: (label: string) => string;
|
|
20
32
|
};
|
|
21
33
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
22
|
-
|
|
23
|
-
change: (value: CascadeValue) => any;
|
|
34
|
+
select: (path: string) => any;
|
|
24
35
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
-
|
|
26
|
-
onChange?: ((value: CascadeValue) => any) | undefined;
|
|
36
|
+
onSelect?: ((path: string) => any) | undefined;
|
|
27
37
|
}>, {
|
|
28
|
-
|
|
38
|
+
showIcon: boolean;
|
|
39
|
+
iconSize: number;
|
|
29
40
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
30
41
|
declare const _default: typeof __VLS_export;
|
|
31
42
|
//#endregion
|
|
32
|
-
export {
|
|
43
|
+
export { BreadcrumbMenuItem as n, _default as t };
|
package/dist/index6.vue.d.cts
CHANGED
|
@@ -1,32 +1,43 @@
|
|
|
1
|
+
import { t as BreadcrumbItem } from "./types2.cjs";
|
|
1
2
|
import * as vue from "vue";
|
|
2
3
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
interface
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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/
|
|
25
|
+
//#region src/components/C_Breadcrumb/index.vue.d.ts
|
|
16
26
|
type __VLS_Props = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
/** 手动路径,标签沿用传入值。 */items?: readonly BreadcrumbItem[]; /** 授权后的菜单树;提供时(含空数组)作为目录的唯一数据来源。 */
|
|
28
|
+
menus?: readonly BreadcrumbMenuItem[];
|
|
29
|
+
showIcon?: boolean;
|
|
30
|
+
iconSize?: number; /** 自动路径和菜单标签的翻译函数。 */
|
|
31
|
+
labelFormatter?: (label: string) => string;
|
|
20
32
|
};
|
|
21
33
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
22
|
-
|
|
23
|
-
change: (value: CascadeValue) => any;
|
|
34
|
+
select: (path: string) => any;
|
|
24
35
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
-
|
|
26
|
-
onChange?: ((value: CascadeValue) => any) | undefined;
|
|
36
|
+
onSelect?: ((path: string) => any) | undefined;
|
|
27
37
|
}>, {
|
|
28
|
-
|
|
38
|
+
showIcon: boolean;
|
|
39
|
+
iconSize: number;
|
|
29
40
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
30
41
|
declare const _default: typeof __VLS_export;
|
|
31
42
|
//#endregion
|
|
32
|
-
export {
|
|
43
|
+
export { BreadcrumbMenuItem as n, _default as t };
|