@jetlinks-web/components 2.0.0 → 2.0.2-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,87 +1,87 @@
1
- import type { VNode } from 'vue';
2
- import type { BreadcrumbProps } from './RouteContext';
3
- import type { VueNode } from 'ant-design-vue/lib/_util/type';
4
-
5
- export type Theme = 'dark' | 'light';
6
- export type LayoutType = 'side' | 'top' | 'mix';
7
- export type TargetType = '_blank' | '_self' | unknown;
8
- export type ProProps = Record<never, never>;
9
- export type ContentWidth = 'Fluid' | 'Fixed';
10
-
11
- export interface MetaRecord {
12
- /**
13
- * @name 菜单的icon
14
- */
15
- icon?: string | VNode;
16
- /**
17
- * @name 自定义菜单的国际化 key,如果没有则返回自身
18
- */
19
- title?: string;
20
- /**
21
- * @name 打开目标位置 '_blank' | '_self' | null | undefined
22
- */
23
- target?: TargetType;
24
- /**
25
- * @name 在菜单中隐藏子节点
26
- */
27
- hideChildInMenu?: boolean;
28
- /**
29
- * @name 在菜单中隐藏自己和子节点
30
- */
31
- hideInMenu?: boolean;
32
- /**
33
- * @name disable 菜单选项
34
- */
35
- disabled?: boolean;
36
- /**
37
- * @name 隐藏自己,并且将子节点提升到与自己平级
38
- */
39
- flatMenu?: boolean;
40
-
41
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
- [key: string]: any;
43
- }
44
-
45
- export interface MenuDataItem {
46
- /**
47
- * @name 用于标定选中的值,默认是 path
48
- */
49
- path: string;
50
- name?: string | symbol;
51
- meta?: MetaRecord;
52
- /**
53
- * @name 子菜单
54
- */
55
- children?: MenuDataItem[];
56
- }
57
-
58
- export type WithFalse<T> = T | false;
59
-
60
- export type FormatMessage = (message?: string) => string;
61
-
62
- export type BreadcrumbRender = BreadcrumbProps['itemRender'];
63
- export type HeaderContentRender = WithFalse<() => VueNode>;
64
- export type HeaderRender = WithFalse<(props: ProProps) => VueNode>;
65
- export type RightContentRender = WithFalse<(props: ProProps) => VueNode>;
66
- export type MenuItemRender = WithFalse<
67
- (args: {
68
- item: MenuDataItem;
69
- title?: JSX.Element;
70
- icon?: JSX.Element;
71
- }) => VueNode
72
- >;
73
- export type SubMenuItemRender = WithFalse<
74
- (args: { item: MenuDataItem; children?: VueNode[] }) => VueNode
75
- >;
76
- export type MenuHeaderRender = WithFalse<
77
- (logo: VueNode, title: VueNode, props?: ProProps) => VueNode
78
- >;
79
- export type MenuContentRender = WithFalse<
80
- (props: ProProps, defaultDom: VueNode) => VueNode
81
- >;
82
- export type MenuExtraRender = WithFalse<(props?: ProProps) => VueNode>;
83
- export type LogoRender = WithFalse<VueNode>;
84
-
85
- export type CollapsedButtonRender = WithFalse<(collapsed?: boolean) => VueNode>;
86
- export type DefaultPropRender = WithFalse<VueNode>;
87
- export type PageHeaderRender = WithFalse<(props?: ProProps) => VueNode>;
1
+ import type { VNode } from 'vue';
2
+ import type { BreadcrumbProps } from './RouteContext';
3
+ import type { VueNode } from 'ant-design-vue/es/_util/type';
4
+
5
+ export type Theme = 'dark' | 'light';
6
+ export type LayoutType = 'side' | 'top' | 'mix';
7
+ export type TargetType = '_blank' | '_self' | unknown;
8
+ export type ProProps = Record<never, never>;
9
+ export type ContentWidth = 'Fluid' | 'Fixed';
10
+
11
+ export interface MetaRecord {
12
+ /**
13
+ * @name 菜单的icon
14
+ */
15
+ icon?: string | VNode;
16
+ /**
17
+ * @name 自定义菜单的国际化 key,如果没有则返回自身
18
+ */
19
+ title?: string;
20
+ /**
21
+ * @name 打开目标位置 '_blank' | '_self' | null | undefined
22
+ */
23
+ target?: TargetType;
24
+ /**
25
+ * @name 在菜单中隐藏子节点
26
+ */
27
+ hideChildInMenu?: boolean;
28
+ /**
29
+ * @name 在菜单中隐藏自己和子节点
30
+ */
31
+ hideInMenu?: boolean;
32
+ /**
33
+ * @name disable 菜单选项
34
+ */
35
+ disabled?: boolean;
36
+ /**
37
+ * @name 隐藏自己,并且将子节点提升到与自己平级
38
+ */
39
+ flatMenu?: boolean;
40
+
41
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
+ [key: string]: any;
43
+ }
44
+
45
+ export interface MenuDataItem {
46
+ /**
47
+ * @name 用于标定选中的值,默认是 path
48
+ */
49
+ path: string;
50
+ name?: string | symbol;
51
+ meta?: MetaRecord;
52
+ /**
53
+ * @name 子菜单
54
+ */
55
+ children?: MenuDataItem[];
56
+ }
57
+
58
+ export type WithFalse<T> = T | false;
59
+
60
+ export type FormatMessage = (message?: string) => string;
61
+
62
+ export type BreadcrumbRender = BreadcrumbProps['itemRender'];
63
+ export type HeaderContentRender = WithFalse<() => VueNode>;
64
+ export type HeaderRender = WithFalse<(props: ProProps) => VueNode>;
65
+ export type RightContentRender = WithFalse<(props: ProProps) => VueNode>;
66
+ export type MenuItemRender = WithFalse<
67
+ (args: {
68
+ item: MenuDataItem;
69
+ title?: JSX.Element;
70
+ icon?: JSX.Element;
71
+ }) => VueNode
72
+ >;
73
+ export type SubMenuItemRender = WithFalse<
74
+ (args: { item: MenuDataItem; children?: VueNode[] }) => VueNode
75
+ >;
76
+ export type MenuHeaderRender = WithFalse<
77
+ (logo: VueNode, title: VueNode, props?: ProProps) => VueNode
78
+ >;
79
+ export type MenuContentRender = WithFalse<
80
+ (props: ProProps, defaultDom: VueNode) => VueNode
81
+ >;
82
+ export type MenuExtraRender = WithFalse<(props?: ProProps) => VueNode>;
83
+ export type LogoRender = WithFalse<VueNode>;
84
+
85
+ export type CollapsedButtonRender = WithFalse<(collapsed?: boolean) => VueNode>;
86
+ export type DefaultPropRender = WithFalse<VueNode>;
87
+ export type PageHeaderRender = WithFalse<(props?: ProProps) => VueNode>;