@robot-admin/naive-ui-components 0.11.7 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +146 -29
- package/README_EN.md +146 -29
- package/SECURITY.md +1 -0
- package/dist/C_ActionBar.cjs +1 -1
- package/dist/C_ActionBar.css +53 -53
- package/dist/C_ActionBar.d.cts +2 -2
- package/dist/C_ActionBar.d.ts +2 -2
- package/dist/C_ActionBar.js +1 -1
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_AntV.css +67 -67
- package/dist/C_AntV2.cjs +3 -3
- package/dist/C_AntV2.js +3 -3
- package/dist/C_AudioPlayer.d.cts +1 -1
- package/dist/C_AudioPlayer.d.ts +1 -1
- package/dist/C_AvatarGroup.d.cts +1 -1
- package/dist/C_AvatarGroup.d.ts +1 -1
- package/dist/C_Barcode.d.cts +1 -1
- package/dist/C_Barcode.d.ts +1 -1
- package/dist/C_Breadcrumb.d.cts +1 -1
- package/dist/C_Breadcrumb.d.ts +1 -1
- package/dist/C_Captcha.cjs +1 -1
- package/dist/C_Captcha.css +193 -51
- package/dist/C_Captcha.d.cts +2 -3
- package/dist/C_Captcha.d.ts +2 -3
- package/dist/C_Captcha.js +1 -1
- package/dist/C_Captcha2.cjs +1 -1
- package/dist/C_Captcha2.js +1 -1
- 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_Date.d.cts +1 -1
- package/dist/C_Date.d.ts +1 -1
- package/dist/C_Editor.d.cts +1 -1
- package/dist/C_Editor.d.ts +1 -1
- package/dist/C_FormModal.cjs +1 -0
- package/dist/C_FormModal.css +41 -0
- package/dist/C_FormModal.d.cts +2 -0
- package/dist/C_FormModal.d.ts +3 -0
- package/dist/C_FormModal.js +1 -0
- package/dist/C_FormModal2.cjs +1 -0
- package/dist/C_FormModal2.js +1 -0
- package/dist/C_Login.css +210 -127
- package/dist/C_Login2.cjs +1 -1
- package/dist/C_Login2.js +1 -1
- package/dist/C_Map.css +3 -3
- package/dist/C_Map2.cjs +1 -1
- package/dist/C_Map2.js +1 -1
- package/dist/C_Menu.d.cts +1 -1
- package/dist/C_Table.base.css +86 -86
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +86 -86
- package/dist/C_Table.d.ts +4 -3
- package/dist/C_Table.js +1 -1
- package/dist/C_Tabs.cjs +1 -0
- package/dist/C_Tabs.css +1 -0
- package/dist/C_Tabs.d.cts +2 -0
- package/dist/C_Tabs.d.ts +2 -0
- package/dist/C_Tabs.js +1 -0
- package/dist/C_TagsView.css +38 -38
- package/dist/C_TagsView2.cjs +1 -1
- package/dist/C_TagsView2.js +1 -1
- package/dist/C_VtableGantt.css +19 -19
- package/dist/C_VtableGantt2.cjs +1 -1
- package/dist/C_VtableGantt2.js +1 -1
- package/dist/constants.d.cts +2 -2
- package/dist/constants.d.ts +2 -2
- package/dist/constants2.d.cts +2 -2
- package/dist/constants2.d.ts +2 -2
- package/dist/constants3.d.cts +2 -2
- package/dist/constants3.d.ts +2 -2
- package/dist/constants4.d.cts +4 -4
- package/dist/constants4.d.ts +4 -4
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data.d.cts +108 -0
- package/dist/data.d.ts +108 -0
- package/dist/data2.cjs +1 -0
- package/dist/data2.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +49 -48
- package/dist/index.d.ts +51 -49
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +72 -69
- package/dist/index.vue.d.ts +72 -69
- package/dist/index10.vue.d.cts +80 -39
- package/dist/index10.vue.d.ts +68 -77
- package/dist/index11.vue.d.cts +68 -77
- package/dist/index11.vue.d.ts +53 -68
- package/dist/index12.vue.d.cts +53 -68
- package/dist/index12.vue.d.ts +52 -58
- package/dist/index13.vue.d.cts +52 -58
- package/dist/index13.vue.d.ts +3 -3
- package/dist/index14.vue.d.cts +3 -3
- package/dist/index14.vue.d.ts +5 -5
- package/dist/index15.vue.d.cts +5 -5
- package/dist/index15.vue.d.ts +2 -2
- package/dist/index16.vue.d.cts +2 -2
- package/dist/index16.vue.d.ts +14 -11
- package/dist/index17.vue.d.cts +14 -11
- package/dist/index17.vue.d.ts +4 -4
- package/dist/index18.vue.d.cts +4 -4
- package/dist/index18.vue.d.ts +3 -3
- package/dist/index19.vue.d.cts +2 -2
- package/dist/index19.vue.d.ts +2 -2
- package/dist/index2.vue.d.cts +70 -65
- package/dist/index2.vue.d.ts +70 -65
- package/dist/index20.vue.d.cts +1 -1
- package/dist/index20.vue.d.ts +1 -1
- package/dist/index21.vue.d.cts +2 -2
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index22.vue.d.cts +1 -1
- package/dist/index22.vue.d.ts +1 -1
- package/dist/index24.vue.d.cts +2 -2
- package/dist/index24.vue.d.ts +2 -2
- package/dist/index25.vue.d.cts +1 -1
- package/dist/index25.vue.d.ts +1 -1
- package/dist/index27.vue.d.cts +2 -2
- package/dist/index27.vue.d.ts +2 -2
- package/dist/index3.vue.d.cts +30 -80
- package/dist/index3.vue.d.ts +30 -80
- package/dist/index4.vue.d.cts +130 -30
- package/dist/index4.vue.d.ts +22 -30
- package/dist/index5.vue.d.cts +18 -126
- package/dist/index5.vue.d.ts +22 -19
- package/dist/index6.vue.d.cts +22 -19
- package/dist/index6.vue.d.ts +117 -22
- package/dist/index7.vue.d.cts +117 -22
- package/dist/index7.vue.d.ts +17 -110
- package/dist/index8.vue.d.cts +17 -110
- package/dist/index8.vue.d.ts +37 -24
- package/dist/index9.vue.d.cts +37 -24
- package/dist/index9.vue.d.ts +80 -39
- package/dist/mapUtils.d.cts +4 -4
- package/dist/mapUtils.d.ts +4 -4
- package/dist/presets.d.cts +96 -0
- package/dist/presets.d.ts +96 -0
- 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/style.css +520 -393
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +8 -8
- package/dist/useCollapsePanel.d.ts +8 -8
- package/dist/useCropperCore.d.cts +9 -9
- package/dist/useCropperCore.d.ts +9 -9
- package/dist/useDraggableLayout.d.cts +2 -2
- package/dist/useDraggableLayout.d.ts +2 -2
- package/dist/useEdgeInteraction.d.cts +3 -2
- package/dist/useEdgeInteraction.d.ts +3 -2
- package/dist/useInfiniteScroll.d.cts +1 -1
- package/dist/useInfiniteScroll.d.ts +1 -1
- package/dist/useQRCode.d.cts +4 -4
- package/dist/useQRCode.d.ts +4 -4
- package/dist/useSearchState.d.cts +6 -6
- package/dist/useSearchState.d.ts +6 -6
- package/dist/useSignatureHistory.d.cts +4 -4
- package/dist/useSignatureHistory.d.ts +4 -4
- package/dist/useSplitResize.d.cts +6 -6
- package/dist/useSplitResize.d.ts +6 -6
- package/dist/useTableQuery.cjs +3 -3
- package/dist/useTableQuery.d.cts +10 -0
- package/dist/useTableQuery.d.ts +10 -0
- package/dist/useTableQuery.js +3 -3
- package/dist/useTimeSelection.d.cts +5 -5
- package/dist/useTimeSelection.d.ts +5 -5
- package/dist/useTreeOperations.d.cts +8 -8
- package/dist/useTreeOperations.d.ts +8 -8
- package/dist/useWorkflowValidation.d.cts +4 -4
- package/dist/useWorkflowValidation.d.ts +4 -4
- package/dist/verification.d.cts +70 -5
- package/dist/verification.d.ts +70 -5
- package/package.json +2 -1
- package/dist/types.d.ts +0 -58
- package/dist/types2.d.cts +0 -58
package/dist/index3.vue.d.cts
CHANGED
|
@@ -1,87 +1,37 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
tooltip?: string;
|
|
18
|
-
/** 在线状态 */
|
|
19
|
-
status?: 'online' | 'offline' | 'busy' | 'away';
|
|
20
|
-
/** 额外数据 */
|
|
21
|
-
extra?: Record<string, unknown>;
|
|
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;
|
|
22
17
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/** 最多显示数量(超出 +N) */
|
|
28
|
-
max?: number;
|
|
29
|
-
/** 头像尺寸 (px) */
|
|
30
|
-
size?: number;
|
|
31
|
-
/** 头像间重叠偏移量 (px),负值表示堆叠 */
|
|
32
|
-
overlap?: number;
|
|
33
|
-
/** 形状 */
|
|
34
|
-
shape?: 'circle' | 'square';
|
|
35
|
-
/** 是否显示状态指示点 */
|
|
36
|
-
showStatus?: boolean;
|
|
37
|
-
/** 是否显示悬浮提示 */
|
|
38
|
-
showTooltip?: boolean;
|
|
39
|
-
/** 是否可点击 */
|
|
40
|
-
clickable?: boolean;
|
|
41
|
-
/** +N 溢出按钮是否可点击 */
|
|
42
|
-
overflowClickable?: boolean;
|
|
43
|
-
/** 堆叠方向 */
|
|
44
|
-
direction?: 'ltr' | 'rtl';
|
|
45
|
-
}
|
|
46
|
-
/** 默认 Props */
|
|
47
|
-
declare const DEFAULT_AVATAR_GROUP_PROPS: Partial<AvatarGroupProps>;
|
|
48
|
-
/** 状态颜色映射 */
|
|
49
|
-
declare const STATUS_COLOR_MAP: Record<string, string>;
|
|
50
|
-
/** 从名字中提取首字母 */
|
|
51
|
-
declare function getInitials(name: string): string;
|
|
52
|
-
/** 根据名字生成稳定的背景色 */
|
|
53
|
-
declare function nameToColor(name: string): string;
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region src/components/C_AvatarGroup/index.vue.d.ts
|
|
56
|
-
type __VLS_Props = {
|
|
57
|
-
items: AvatarGroupProps['items'];
|
|
58
|
-
max?: number;
|
|
59
|
-
size?: number;
|
|
60
|
-
overlap?: number;
|
|
61
|
-
shape?: AvatarGroupProps['shape'];
|
|
62
|
-
showStatus?: boolean;
|
|
63
|
-
showTooltip?: boolean;
|
|
64
|
-
clickable?: boolean;
|
|
65
|
-
overflowClickable?: boolean;
|
|
66
|
-
direction?: AvatarGroupProps['direction'];
|
|
67
|
-
};
|
|
68
|
-
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
69
|
-
itemClick: (item: AvatarItem) => any;
|
|
70
|
-
overflowClick: (hiddenItems: AvatarItem[]) => any;
|
|
71
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
72
|
-
onItemClick?: ((item: AvatarItem) => any) | undefined;
|
|
73
|
-
onOverflowClick?: ((hiddenItems: AvatarItem[]) => 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;
|
|
74
22
|
}>, {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
23
|
+
format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
showText: boolean;
|
|
27
|
+
fontSize: number;
|
|
28
|
+
textPosition: "bottom" | "top";
|
|
29
|
+
lineColor: string;
|
|
30
|
+
background: string;
|
|
31
|
+
showBorder: boolean;
|
|
32
|
+
label: string;
|
|
33
|
+
showLabel: boolean;
|
|
84
34
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
85
35
|
declare const _default: typeof __VLS_export;
|
|
86
36
|
//#endregion
|
|
87
|
-
export {
|
|
37
|
+
export { _default as t };
|
package/dist/index3.vue.d.ts
CHANGED
|
@@ -1,87 +1,37 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
tooltip?: string;
|
|
18
|
-
/** 在线状态 */
|
|
19
|
-
status?: 'online' | 'offline' | 'busy' | 'away';
|
|
20
|
-
/** 额外数据 */
|
|
21
|
-
extra?: Record<string, unknown>;
|
|
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;
|
|
22
17
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/** 最多显示数量(超出 +N) */
|
|
28
|
-
max?: number;
|
|
29
|
-
/** 头像尺寸 (px) */
|
|
30
|
-
size?: number;
|
|
31
|
-
/** 头像间重叠偏移量 (px),负值表示堆叠 */
|
|
32
|
-
overlap?: number;
|
|
33
|
-
/** 形状 */
|
|
34
|
-
shape?: 'circle' | 'square';
|
|
35
|
-
/** 是否显示状态指示点 */
|
|
36
|
-
showStatus?: boolean;
|
|
37
|
-
/** 是否显示悬浮提示 */
|
|
38
|
-
showTooltip?: boolean;
|
|
39
|
-
/** 是否可点击 */
|
|
40
|
-
clickable?: boolean;
|
|
41
|
-
/** +N 溢出按钮是否可点击 */
|
|
42
|
-
overflowClickable?: boolean;
|
|
43
|
-
/** 堆叠方向 */
|
|
44
|
-
direction?: 'ltr' | 'rtl';
|
|
45
|
-
}
|
|
46
|
-
/** 默认 Props */
|
|
47
|
-
declare const DEFAULT_AVATAR_GROUP_PROPS: Partial<AvatarGroupProps>;
|
|
48
|
-
/** 状态颜色映射 */
|
|
49
|
-
declare const STATUS_COLOR_MAP: Record<string, string>;
|
|
50
|
-
/** 从名字中提取首字母 */
|
|
51
|
-
declare function getInitials(name: string): string;
|
|
52
|
-
/** 根据名字生成稳定的背景色 */
|
|
53
|
-
declare function nameToColor(name: string): string;
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region src/components/C_AvatarGroup/index.vue.d.ts
|
|
56
|
-
type __VLS_Props = {
|
|
57
|
-
items: AvatarGroupProps['items'];
|
|
58
|
-
max?: number;
|
|
59
|
-
size?: number;
|
|
60
|
-
overlap?: number;
|
|
61
|
-
shape?: AvatarGroupProps['shape'];
|
|
62
|
-
showStatus?: boolean;
|
|
63
|
-
showTooltip?: boolean;
|
|
64
|
-
clickable?: boolean;
|
|
65
|
-
overflowClickable?: boolean;
|
|
66
|
-
direction?: AvatarGroupProps['direction'];
|
|
67
|
-
};
|
|
68
|
-
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
69
|
-
itemClick: (item: AvatarItem) => any;
|
|
70
|
-
overflowClick: (hiddenItems: AvatarItem[]) => any;
|
|
71
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
72
|
-
onItemClick?: ((item: AvatarItem) => any) | undefined;
|
|
73
|
-
onOverflowClick?: ((hiddenItems: AvatarItem[]) => 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;
|
|
74
22
|
}>, {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
23
|
+
format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
showText: boolean;
|
|
27
|
+
fontSize: number;
|
|
28
|
+
textPosition: "bottom" | "top";
|
|
29
|
+
lineColor: string;
|
|
30
|
+
background: string;
|
|
31
|
+
showBorder: boolean;
|
|
32
|
+
label: string;
|
|
33
|
+
showLabel: boolean;
|
|
84
34
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
85
35
|
declare const _default: typeof __VLS_export;
|
|
86
36
|
//#endregion
|
|
87
|
-
export {
|
|
37
|
+
export { _default as t };
|
package/dist/index4.vue.d.cts
CHANGED
|
@@ -1,37 +1,137 @@
|
|
|
1
|
+
import { n as RouteItem } from "./types.cjs";
|
|
1
2
|
import * as vue from "vue";
|
|
3
|
+
import { Ref, VNode } from "vue";
|
|
4
|
+
import * as naive_ui0 from "naive-ui";
|
|
5
|
+
import { DropdownProps, MenuInst, MenuOption } from "naive-ui";
|
|
6
|
+
import * as naive_ui_es_menu_src_interface0 from "naive-ui/es/menu/src/interface";
|
|
2
7
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
//#region src/components/_shared/menuAdapter.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* 菜单适配器配置
|
|
11
|
+
*/
|
|
12
|
+
interface MenuAdapterConfig {
|
|
13
|
+
/**
|
|
14
|
+
* 标签文本格式化函数(用于 i18n)
|
|
15
|
+
* 默认:原样返回 title
|
|
16
|
+
*/
|
|
17
|
+
labelFormatter?: (title: string) => string;
|
|
18
|
+
/**
|
|
19
|
+
* 获取菜单项的唯一 key
|
|
20
|
+
* 默认:`normalizePath(route.path)`
|
|
21
|
+
*/
|
|
22
|
+
getKey?: (route: RouteItem) => string;
|
|
23
|
+
/**
|
|
24
|
+
* 获取显示文本
|
|
25
|
+
* 默认:`route.meta?.title || route.name || ''`
|
|
26
|
+
*/
|
|
27
|
+
getLabel?: (route: RouteItem) => string;
|
|
28
|
+
/**
|
|
29
|
+
* 路由过滤器 — return false 排除该项
|
|
30
|
+
* 默认:排除 `meta.hidden === true`
|
|
31
|
+
*/
|
|
32
|
+
filter?: (route: RouteItem) => boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 自定义图标渲染
|
|
35
|
+
* 默认:字符串 → Iconify Icon;函数 → 直接调用
|
|
36
|
+
*/
|
|
37
|
+
renderIcon?: (icon: string | (() => VNode) | undefined) => (() => VNode) | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* 是否递归处理 children
|
|
40
|
+
* 默认:true
|
|
41
|
+
*/
|
|
42
|
+
recursive?: boolean;
|
|
17
43
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
44
|
+
/**
|
|
45
|
+
* 将路由数据转换为 NMenu 的 MenuOption[]
|
|
46
|
+
*
|
|
47
|
+
* 支持的输入格式:
|
|
48
|
+
* 1. **Vue Router RouteRecordRaw** — 直接传 `router.getRoutes()` 或手写路由表
|
|
49
|
+
* 2. **后端 JSON 路由表** — `{ path, meta: { title, icon }, children }`
|
|
50
|
+
* 3. **自定义格式** — 通过 config 完全自定义 key/label/icon 的取值逻辑
|
|
51
|
+
*
|
|
52
|
+
* @param routes 路由数据数组
|
|
53
|
+
* @param config 适配器配置
|
|
54
|
+
* @returns NMenu 可直接使用的 MenuOption[]
|
|
55
|
+
*/
|
|
56
|
+
declare function createMenuOptions(routes: RouteItem[], config?: MenuAdapterConfig): MenuOption[];
|
|
57
|
+
/**
|
|
58
|
+
* 将路由树扁平化为一维数组(常用于搜索、快捷导航)
|
|
59
|
+
*
|
|
60
|
+
* @param routes 路由数据数组
|
|
61
|
+
* @param filter 过滤器(默认排除 hidden)
|
|
62
|
+
* @returns 扁平化后的路由数组
|
|
63
|
+
*/
|
|
64
|
+
declare function flattenRoutes(routes: RouteItem[], filter?: (route: RouteItem) => boolean): RouteItem[];
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/C_Menu/types.d.ts
|
|
67
|
+
type MenuValue = string | null;
|
|
68
|
+
interface MenuProps {
|
|
69
|
+
options?: MenuOption[];
|
|
70
|
+
routes?: RouteItem[];
|
|
71
|
+
adapterConfig?: MenuAdapterConfig;
|
|
72
|
+
labelFormatter?: (label: string) => string;
|
|
73
|
+
/** @deprecated Use modelValue. */
|
|
74
|
+
value?: MenuValue;
|
|
75
|
+
modelValue?: MenuValue;
|
|
76
|
+
expandedKeys?: string[];
|
|
77
|
+
defaultExpandedKeys?: string[];
|
|
78
|
+
mode?: 'vertical' | 'horizontal';
|
|
79
|
+
collapsed?: boolean;
|
|
80
|
+
collapsedWidth?: number;
|
|
81
|
+
collapsedIconSize?: number;
|
|
82
|
+
inverted?: boolean;
|
|
83
|
+
themeOverrides?: Record<string, any>;
|
|
84
|
+
indent?: number;
|
|
85
|
+
rootIndent?: number;
|
|
86
|
+
dropdownProps?: DropdownProps;
|
|
87
|
+
}
|
|
88
|
+
interface MenuEmits {
|
|
89
|
+
select: [key: string];
|
|
90
|
+
/** 鼠标或键盘聚焦叶子项时触发,可用于无副作用的路由预取。 */
|
|
91
|
+
intent: [key: string];
|
|
92
|
+
'update:modelValue': [key: MenuValue];
|
|
93
|
+
/** @deprecated Use update:modelValue. */
|
|
94
|
+
'update:value': [key: MenuValue];
|
|
95
|
+
'update:expandedKeys': [keys: string[]];
|
|
96
|
+
}
|
|
97
|
+
interface MenuExpose {
|
|
98
|
+
showOption: (key: string) => void;
|
|
99
|
+
menuRef: Ref<MenuInst | null>;
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/components/C_Menu/index.vue.d.ts
|
|
103
|
+
declare const __VLS_export: vue.DefineComponent<MenuProps, {
|
|
104
|
+
showOption: (key: string) => void | undefined;
|
|
105
|
+
menuRef: vue.Ref<{
|
|
106
|
+
showOption: (key?: naive_ui_es_menu_src_interface0.Key) => void;
|
|
107
|
+
deriveResponsiveState: () => void;
|
|
108
|
+
} | null, MenuInst | {
|
|
109
|
+
showOption: (key?: naive_ui_es_menu_src_interface0.Key) => void;
|
|
110
|
+
deriveResponsiveState: () => void;
|
|
111
|
+
} | null>;
|
|
112
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
113
|
+
select: (key: string) => any;
|
|
114
|
+
"update:modelValue": (key: MenuValue) => any;
|
|
115
|
+
intent: (key: string) => any;
|
|
116
|
+
"update:value": (key: MenuValue) => any;
|
|
117
|
+
"update:expandedKeys": (keys: string[]) => any;
|
|
118
|
+
}, string, vue.PublicProps, Readonly<MenuProps> & Readonly<{
|
|
119
|
+
onSelect?: ((key: string) => any) | undefined;
|
|
120
|
+
"onUpdate:modelValue"?: ((key: MenuValue) => any) | undefined;
|
|
121
|
+
onIntent?: ((key: string) => any) | undefined;
|
|
122
|
+
"onUpdate:value"?: ((key: MenuValue) => any) | undefined;
|
|
123
|
+
"onUpdate:expandedKeys"?: ((keys: string[]) => any) | undefined;
|
|
22
124
|
}>, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
showBorder: boolean;
|
|
33
|
-
showLabel: boolean;
|
|
125
|
+
mode: "vertical" | "horizontal";
|
|
126
|
+
defaultExpandedKeys: string[];
|
|
127
|
+
collapsed: boolean;
|
|
128
|
+
collapsedWidth: number;
|
|
129
|
+
collapsedIconSize: number;
|
|
130
|
+
inverted: boolean;
|
|
131
|
+
indent: number;
|
|
132
|
+
rootIndent: number;
|
|
133
|
+
dropdownProps: naive_ui0.DropdownProps;
|
|
34
134
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
35
135
|
declare const _default: typeof __VLS_export;
|
|
36
136
|
//#endregion
|
|
37
|
-
export { _default as t };
|
|
137
|
+
export { MenuValue as a, flattenRoutes as c, MenuProps as i, MenuEmits as n, MenuAdapterConfig as o, MenuExpose as r, createMenuOptions as s, _default as t };
|
package/dist/index4.vue.d.ts
CHANGED
|
@@ -1,36 +1,28 @@
|
|
|
1
|
+
import { i as BreadcrumbItem } from "./public.js";
|
|
1
2
|
import * as vue from "vue";
|
|
2
3
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
declare const __VLS_export: vue.DefineComponent<
|
|
19
|
-
|
|
20
|
-
}, string, vue.PublicProps, Readonly<
|
|
21
|
-
|
|
4
|
+
//#region src/components/C_Breadcrumb/index.vue.d.ts
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
/**
|
|
7
|
+
* 手动传入面包屑数据
|
|
8
|
+
* 不传时自动从 `route.matched` 生成(零配置)
|
|
9
|
+
*/
|
|
10
|
+
items?: BreadcrumbItem[]; /** 是否显示图标 */
|
|
11
|
+
showIcon?: boolean; /** 图标大小 (px),默认 16 */
|
|
12
|
+
iconSize?: number;
|
|
13
|
+
/**
|
|
14
|
+
* 标签文本格式化函数(用于 i18n)
|
|
15
|
+
* 仅在自动模式下生效
|
|
16
|
+
*/
|
|
17
|
+
labelFormatter?: (label: string) => string;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
20
|
+
select: (path: string) => any;
|
|
21
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
onSelect?: ((path: string) => any) | undefined;
|
|
22
23
|
}>, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
label: string;
|
|
26
|
-
width: number;
|
|
27
|
-
fontSize: number;
|
|
28
|
-
showText: boolean;
|
|
29
|
-
textPosition: "bottom" | "top";
|
|
30
|
-
lineColor: string;
|
|
31
|
-
background: string;
|
|
32
|
-
showBorder: boolean;
|
|
33
|
-
showLabel: boolean;
|
|
24
|
+
showIcon: boolean;
|
|
25
|
+
iconSize: number;
|
|
34
26
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
35
27
|
declare const _default: typeof __VLS_export;
|
|
36
28
|
//#endregion
|
package/dist/index5.vue.d.cts
CHANGED
|
@@ -1,137 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as BreadcrumbItem } from "./types.cjs";
|
|
2
2
|
import * as vue from "vue";
|
|
3
|
-
import { Ref, VNode } from "vue";
|
|
4
|
-
import * as naive_ui0 from "naive-ui";
|
|
5
|
-
import { DropdownProps, MenuInst, MenuOption } from "naive-ui";
|
|
6
|
-
import * as naive_ui_es_menu_src_interface0 from "naive-ui/es/menu/src/interface";
|
|
7
3
|
|
|
8
|
-
//#region src/components/
|
|
9
|
-
|
|
10
|
-
* 菜单适配器配置
|
|
11
|
-
*/
|
|
12
|
-
interface MenuAdapterConfig {
|
|
4
|
+
//#region src/components/C_Breadcrumb/index.vue.d.ts
|
|
5
|
+
type __VLS_Props = {
|
|
13
6
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
labelFormatter?: (title: string) => string;
|
|
18
|
-
/**
|
|
19
|
-
* 获取菜单项的唯一 key
|
|
20
|
-
* 默认:`normalizePath(route.path)`
|
|
21
|
-
*/
|
|
22
|
-
getKey?: (route: RouteItem) => string;
|
|
23
|
-
/**
|
|
24
|
-
* 获取显示文本
|
|
25
|
-
* 默认:`route.meta?.title || route.name || ''`
|
|
26
|
-
*/
|
|
27
|
-
getLabel?: (route: RouteItem) => string;
|
|
28
|
-
/**
|
|
29
|
-
* 路由过滤器 — return false 排除该项
|
|
30
|
-
* 默认:排除 `meta.hidden === true`
|
|
31
|
-
*/
|
|
32
|
-
filter?: (route: RouteItem) => boolean;
|
|
33
|
-
/**
|
|
34
|
-
* 自定义图标渲染
|
|
35
|
-
* 默认:字符串 → Iconify Icon;函数 → 直接调用
|
|
7
|
+
* 手动传入面包屑数据
|
|
8
|
+
* 不传时自动从 `route.matched` 生成(零配置)
|
|
36
9
|
*/
|
|
37
|
-
|
|
10
|
+
items?: BreadcrumbItem[]; /** 是否显示图标 */
|
|
11
|
+
showIcon?: boolean; /** 图标大小 (px),默认 16 */
|
|
12
|
+
iconSize?: number;
|
|
38
13
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
14
|
+
* 标签文本格式化函数(用于 i18n)
|
|
15
|
+
* 仅在自动模式下生效
|
|
41
16
|
*/
|
|
42
|
-
recursive?: boolean;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* 将路由数据转换为 NMenu 的 MenuOption[]
|
|
46
|
-
*
|
|
47
|
-
* 支持的输入格式:
|
|
48
|
-
* 1. **Vue Router RouteRecordRaw** — 直接传 `router.getRoutes()` 或手写路由表
|
|
49
|
-
* 2. **后端 JSON 路由表** — `{ path, meta: { title, icon }, children }`
|
|
50
|
-
* 3. **自定义格式** — 通过 config 完全自定义 key/label/icon 的取值逻辑
|
|
51
|
-
*
|
|
52
|
-
* @param routes 路由数据数组
|
|
53
|
-
* @param config 适配器配置
|
|
54
|
-
* @returns NMenu 可直接使用的 MenuOption[]
|
|
55
|
-
*/
|
|
56
|
-
declare function createMenuOptions(routes: RouteItem[], config?: MenuAdapterConfig): MenuOption[];
|
|
57
|
-
/**
|
|
58
|
-
* 将路由树扁平化为一维数组(常用于搜索、快捷导航)
|
|
59
|
-
*
|
|
60
|
-
* @param routes 路由数据数组
|
|
61
|
-
* @param filter 过滤器(默认排除 hidden)
|
|
62
|
-
* @returns 扁平化后的路由数组
|
|
63
|
-
*/
|
|
64
|
-
declare function flattenRoutes(routes: RouteItem[], filter?: (route: RouteItem) => boolean): RouteItem[];
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region src/components/C_Menu/types.d.ts
|
|
67
|
-
type MenuValue = string | null;
|
|
68
|
-
interface MenuProps {
|
|
69
|
-
options?: MenuOption[];
|
|
70
|
-
routes?: RouteItem[];
|
|
71
|
-
adapterConfig?: MenuAdapterConfig;
|
|
72
17
|
labelFormatter?: (label: string) => string;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
mode?: 'vertical' | 'horizontal';
|
|
79
|
-
collapsed?: boolean;
|
|
80
|
-
collapsedWidth?: number;
|
|
81
|
-
collapsedIconSize?: number;
|
|
82
|
-
inverted?: boolean;
|
|
83
|
-
themeOverrides?: Record<string, any>;
|
|
84
|
-
indent?: number;
|
|
85
|
-
rootIndent?: number;
|
|
86
|
-
dropdownProps?: DropdownProps;
|
|
87
|
-
}
|
|
88
|
-
interface MenuEmits {
|
|
89
|
-
select: [key: string];
|
|
90
|
-
/** 鼠标或键盘聚焦叶子项时触发,可用于无副作用的路由预取。 */
|
|
91
|
-
intent: [key: string];
|
|
92
|
-
'update:modelValue': [key: MenuValue];
|
|
93
|
-
/** @deprecated Use update:modelValue. */
|
|
94
|
-
'update:value': [key: MenuValue];
|
|
95
|
-
'update:expandedKeys': [keys: string[]];
|
|
96
|
-
}
|
|
97
|
-
interface MenuExpose {
|
|
98
|
-
showOption: (key: string) => void;
|
|
99
|
-
menuRef: Ref<MenuInst | null>;
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/components/C_Menu/index.vue.d.ts
|
|
103
|
-
declare const __VLS_export: vue.DefineComponent<MenuProps, {
|
|
104
|
-
showOption: (key: string) => void | undefined;
|
|
105
|
-
menuRef: vue.Ref<{
|
|
106
|
-
showOption: (key?: naive_ui_es_menu_src_interface0.Key) => void;
|
|
107
|
-
deriveResponsiveState: () => void;
|
|
108
|
-
} | null, MenuInst | {
|
|
109
|
-
showOption: (key?: naive_ui_es_menu_src_interface0.Key) => void;
|
|
110
|
-
deriveResponsiveState: () => void;
|
|
111
|
-
} | null>;
|
|
112
|
-
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
113
|
-
"update:modelValue": (key: MenuValue) => any;
|
|
114
|
-
select: (key: string) => any;
|
|
115
|
-
intent: (key: string) => any;
|
|
116
|
-
"update:value": (key: MenuValue) => any;
|
|
117
|
-
"update:expandedKeys": (keys: string[]) => any;
|
|
118
|
-
}, string, vue.PublicProps, Readonly<MenuProps> & Readonly<{
|
|
119
|
-
"onUpdate:modelValue"?: ((key: MenuValue) => any) | undefined;
|
|
120
|
-
onSelect?: ((key: string) => any) | undefined;
|
|
121
|
-
onIntent?: ((key: string) => any) | undefined;
|
|
122
|
-
"onUpdate:value"?: ((key: MenuValue) => any) | undefined;
|
|
123
|
-
"onUpdate:expandedKeys"?: ((keys: string[]) => any) | undefined;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
20
|
+
select: (path: string) => any;
|
|
21
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
onSelect?: ((path: string) => any) | undefined;
|
|
124
23
|
}>, {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
defaultExpandedKeys: string[];
|
|
128
|
-
collapsed: boolean;
|
|
129
|
-
collapsedWidth: number;
|
|
130
|
-
collapsedIconSize: number;
|
|
131
|
-
inverted: boolean;
|
|
132
|
-
rootIndent: number;
|
|
133
|
-
dropdownProps: naive_ui0.DropdownProps;
|
|
24
|
+
showIcon: boolean;
|
|
25
|
+
iconSize: number;
|
|
134
26
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
135
27
|
declare const _default: typeof __VLS_export;
|
|
136
28
|
//#endregion
|
|
137
|
-
export {
|
|
29
|
+
export { _default as t };
|
package/dist/index5.vue.d.ts
CHANGED
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { i as BreadcrumbItem } from "./public.js";
|
|
2
1
|
import * as vue from "vue";
|
|
3
2
|
|
|
4
|
-
//#region src/components/
|
|
3
|
+
//#region src/components/C_Cascade/types.d.ts
|
|
4
|
+
interface CascadeItem {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
children?: CascadeItem[];
|
|
8
|
+
}
|
|
9
|
+
interface CascadeValue {
|
|
10
|
+
primary?: Pick<CascadeItem, 'label' | 'value'> | null;
|
|
11
|
+
secondary?: Pick<CascadeItem, 'label' | 'value'> | null;
|
|
12
|
+
tertiary?: Pick<CascadeItem, 'label' | 'value'> | null;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/C_Cascade/index.vue.d.ts
|
|
5
16
|
type __VLS_Props = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
items?: BreadcrumbItem[]; /** 是否显示图标 */
|
|
11
|
-
showIcon?: boolean; /** 图标大小 (px),默认 16 */
|
|
12
|
-
iconSize?: number;
|
|
13
|
-
/**
|
|
14
|
-
* 标签文本格式化函数(用于 i18n)
|
|
15
|
-
* 仅在自动模式下生效
|
|
16
|
-
*/
|
|
17
|
-
labelFormatter?: (label: string) => string;
|
|
17
|
+
data: CascadeItem[];
|
|
18
|
+
placeholders?: string[];
|
|
19
|
+
modelValue?: CascadeValue;
|
|
18
20
|
};
|
|
19
21
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
20
|
-
|
|
22
|
+
change: (value: CascadeValue) => any;
|
|
23
|
+
"update:modelValue": (value: CascadeValue) => any;
|
|
21
24
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
-
|
|
25
|
+
onChange?: ((value: CascadeValue) => any) | undefined;
|
|
26
|
+
"onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
|
|
23
27
|
}>, {
|
|
24
|
-
|
|
25
|
-
iconSize: number;
|
|
28
|
+
placeholders: string[];
|
|
26
29
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
27
30
|
declare const _default: typeof __VLS_export;
|
|
28
31
|
//#endregion
|
|
29
|
-
export { _default as t };
|
|
32
|
+
export { CascadeItem as n, CascadeValue as r, _default as t };
|