@keyblade/pro-components 1.13.8-alpha.8 → 1.14.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/es/components.d.ts +7 -0
- package/es/global-props.d.ts +21 -2
- package/es/global-props.js +6 -2
- package/es/index.d.ts +7 -0
- package/es/index.js +47 -28
- package/es/inerface.d.ts +5 -1
- package/es/pro-calendar/calendar.vue.d.ts +75 -0
- package/es/pro-calendar/calendar.vue.js +159 -0
- package/es/pro-calendar/calendar.vue3.js +5 -0
- package/es/pro-calendar/enum.d.ts +6 -0
- package/es/pro-calendar/enum.js +4 -0
- package/es/pro-calendar/header.vue.d.ts +35 -0
- package/es/pro-calendar/header.vue.js +146 -0
- package/es/pro-calendar/header.vue2.js +4 -0
- package/es/pro-calendar/hooks/useCellClassName.d.ts +12 -0
- package/es/pro-calendar/hooks/useCellClassName.js +40 -0
- package/es/pro-calendar/index.d.ts +117 -0
- package/es/pro-calendar/index.js +12 -0
- package/es/pro-calendar/interface.d.ts +89 -0
- package/es/pro-calendar/month.d.ts +5 -0
- package/es/pro-calendar/month.js +53 -0
- package/es/pro-calendar/month.vue.d.ts +22 -0
- package/es/pro-calendar/month.vue.js +126 -0
- package/es/pro-calendar/month.vue2.js +4 -0
- package/es/pro-calendar/week.vue.d.ts +3 -0
- package/es/pro-calendar/week.vue.js +34 -0
- package/es/pro-calendar/week.vue2.js +4 -0
- package/es/pro-calendar/year.vue.d.ts +3 -0
- package/es/pro-calendar/year.vue.js +123 -0
- package/es/pro-calendar/year.vue2.js +4 -0
- package/es/pro-date-range-picker/index.d.ts +183 -13
- package/es/pro-date-range-picker/index.js +6 -7
- package/es/pro-date-range-picker/interface.d.ts +38 -0
- package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +173 -6
- package/es/pro-date-range-picker/pro-date-range-picker.vue.js +1 -1
- package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +127 -97
- package/es/pro-dates-picker/index.d.ts +49 -0
- package/es/pro-dates-picker/index.js +11 -0
- package/es/pro-dates-picker/index.vue.d.ts +29 -0
- package/es/pro-dates-picker/index.vue.js +135 -0
- package/es/pro-dates-picker/index.vue3.js +5 -0
- package/es/pro-dates-picker/interface.d.ts +38 -0
- package/es/pro-dates-picker/util.d.ts +12 -0
- package/es/pro-dates-picker/util.js +9 -0
- package/es/pro-find-password/enum.d.ts +8 -0
- package/es/pro-find-password/enum.js +4 -0
- package/es/pro-find-password/index.d.ts +11 -0
- package/es/pro-find-password/index.js +11 -0
- package/es/pro-find-password/index.vue.d.ts +4459 -0
- package/es/pro-find-password/index.vue.js +176 -0
- package/es/pro-find-password/index.vue3.js +5 -0
- package/es/pro-find-password/interface.d.ts +45 -0
- package/es/pro-find-password/reset-password.vue.d.ts +591 -0
- package/es/pro-find-password/reset-password.vue.js +179 -0
- package/es/pro-find-password/reset-password.vue2.js +4 -0
- package/es/pro-find-password/verify-user-name.vue.d.ts +795 -0
- package/es/pro-find-password/verify-user-name.vue.js +112 -0
- package/es/pro-find-password/verify-user-name.vue3.js +5 -0
- package/es/pro-footer-bar/index.d.ts +6 -3
- package/es/pro-footer-bar/index.js +6 -7
- package/es/pro-footer-bar/index.vue.d.ts +1 -1
- package/es/pro-footer-bar/index.vue.js +2 -2
- package/es/pro-footer-bar/index.vue2.js +24 -26
- package/es/pro-footer-bar/{inerface.d.ts → interface.d.ts} +1 -0
- package/es/pro-form-group/index.d.ts +7 -6
- package/es/pro-form-group/index.js +6 -8
- package/es/pro-form-group/index.vue.d.ts +2 -2
- package/es/pro-form-group/index.vue.js +1 -1
- package/es/pro-form-group/index.vue2.js +31 -32
- package/es/pro-image-upload/cropper.vue.js +2 -2
- package/es/pro-image-upload/cropper.vue2.js +200 -190
- package/es/pro-image-upload/image-upload.vue.d.ts +1124 -371
- package/es/pro-image-upload/image-upload.vue.js +178 -144
- package/es/pro-image-upload/index.d.ts +1727 -1001
- package/es/pro-image-upload/index.js +6 -8
- package/es/pro-keep-alive-router-view/index.d.ts +1 -0
- package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.js +17 -18
- package/es/pro-layout/hooks.d.ts +80 -1
- package/es/pro-layout/hooks.js +133 -84
- package/es/pro-layout/index.d.ts +9 -6
- package/es/pro-layout/index.js +6 -11
- package/es/pro-layout/pro-layout.vue.d.ts +4 -2
- package/es/pro-layout/pro-layout.vue.js +220 -208
- package/es/pro-loader/index.d.ts +43 -0
- package/es/pro-loader/index.js +11 -0
- package/es/pro-loader/index.vue.d.ts +28 -0
- package/es/pro-loader/index.vue.js +112 -0
- package/es/pro-loader/index.vue3.js +5 -0
- package/es/pro-loader/interface.d.ts +16 -0
- package/es/pro-login/enum.d.ts +6 -0
- package/es/pro-login/enum.js +4 -0
- package/es/pro-login/form-mobile.vue.d.ts +797 -0
- package/es/pro-login/form-mobile.vue.js +146 -0
- package/es/pro-login/form-mobile.vue2.js +4 -0
- package/es/pro-login/form-password.vue.d.ts +584 -0
- package/es/pro-login/form-password.vue.js +99 -0
- package/es/pro-login/form-password.vue2.js +4 -0
- package/es/pro-login/index.d.ts +11 -0
- package/es/pro-login/index.js +11 -0
- package/es/pro-login/index.vue.d.ts +4429 -0
- package/es/pro-login/index.vue.js +105 -0
- package/es/pro-login/index.vue3.js +5 -0
- package/es/pro-login/interface.d.ts +72 -0
- package/es/pro-login/regexp.d.ts +17 -0
- package/es/pro-login/regexp.js +28 -0
- package/es/pro-menu/index.d.ts +18 -80
- package/es/pro-menu/index.js +6 -7
- package/es/pro-menu/interface.d.ts +31 -0
- package/es/pro-menu/menu-item.vue.d.ts +27 -0
- package/es/pro-menu/menu-item.vue.js +35 -0
- package/es/pro-menu/menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu-item.vue.d.ts +9 -0
- package/es/pro-menu/pro-menu-item.vue.js +63 -0
- package/es/pro-menu/pro-menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu.vue.d.ts +9 -55
- package/es/pro-menu/pro-menu.vue.js +36 -119
- package/es/pro-menu/sub-menu.vue.d.ts +22 -0
- package/es/pro-menu/sub-menu.vue.js +55 -0
- package/es/pro-menu/sub-menu.vue2.js +4 -0
- package/es/pro-menu/util.d.ts +9 -0
- package/es/pro-menu/util.js +7 -0
- package/es/pro-page-container/constant.d.ts +2 -0
- package/es/pro-page-container/constant.js +9 -0
- package/es/pro-page-container/index.d.ts +7 -21
- package/es/pro-page-container/index.js +6 -8
- package/es/pro-page-container/interface.d.ts +12 -0
- package/es/pro-page-container/pro-page-container.vue.d.ts +4 -15
- package/es/pro-page-container/pro-page-container.vue.js +58 -38
- package/es/pro-page-header/constant.d.ts +2 -0
- package/es/pro-page-header/constant.js +13 -0
- package/es/pro-page-header/index.d.ts +12 -146
- package/es/pro-page-header/index.js +6 -8
- package/es/pro-page-header/interface.d.ts +21 -0
- package/es/pro-page-header/pro-page-header.vue.d.ts +18 -103
- package/es/pro-page-header/pro-page-header.vue.js +141 -124
- package/es/pro-reuse-tabs/index.d.ts +8 -6
- package/es/pro-reuse-tabs/index.js +6 -7
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +2 -2
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.js +33 -35
- package/es/pro-table/index.d.ts +18 -18
- package/es/pro-table/index.js +6 -7
- package/es/pro-table/index.vue.d.ts +6 -6
- package/es/pro-table/index.vue.js +94 -39
- package/es/pro-table/interface.d.ts +73 -65
- package/es/pro-textarea/index.d.ts +7 -5
- package/es/pro-textarea/index.js +5 -6
- package/es/pro-textarea/index.vue.d.ts +1 -1
- package/es/pro-textarea/index.vue.js +1 -1
- package/es/pro-textarea/index.vue2.js +14 -16
- package/es/pro-textarea/{inerface.d.ts → interface.d.ts} +19 -18
- package/es/style.css +1 -1
- package/es/utils.d.ts +6 -0
- package/es/utils.js +7 -0
- package/package.json +5 -4
- package/es/pro-date-range-picker/type.d.ts +0 -22
- package/es/pro-page-container/inerface.d.ts +0 -12
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
install: (o) => {
|
|
6
|
-
o.use(s), o.use(t), o.use(n), o.use(u), o.use(m), o.use(c), o.use(i), o.use(r), o.use(l), o.use(I), o.use(f), o.use(d), o.component("KbProImageUpload", e);
|
|
1
|
+
import o from "./image-upload.vue.js";
|
|
2
|
+
const e = Object.assign(o, {
|
|
3
|
+
install: (a) => {
|
|
4
|
+
a.component("KbProImageUpload", o);
|
|
7
5
|
}
|
|
8
6
|
});
|
|
9
7
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
e as ProImageUpload,
|
|
9
|
+
e as default
|
|
12
10
|
};
|
|
@@ -74,5 +74,6 @@ declare const ProKeepAliveRouterView: {
|
|
|
74
74
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
75
75
|
install: (app: App) => void;
|
|
76
76
|
};
|
|
77
|
+
/** 导出组件 */
|
|
77
78
|
export { ProKeepAliveRouterView };
|
|
78
79
|
export default ProKeepAliveRouterView;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
const I = /* @__PURE__ */ f({
|
|
1
|
+
import { defineComponent as o, inject as s, computed as v, resolveComponent as k, createBlock as p, openBlock as i, withCtx as A, KeepAlive as y, resolveDynamicComponent as x } from "vue";
|
|
2
|
+
const _ = /* @__PURE__ */ o({
|
|
4
3
|
__name: "pro-keep-alive-router-view",
|
|
5
4
|
props: {
|
|
6
5
|
/** 包含 */
|
|
@@ -23,35 +22,35 @@ const I = /* @__PURE__ */ f({
|
|
|
23
22
|
}
|
|
24
23
|
},
|
|
25
24
|
setup(d) {
|
|
26
|
-
const
|
|
27
|
-
var
|
|
28
|
-
if ((
|
|
25
|
+
const u = (e) => {
|
|
26
|
+
var t, n, c, a;
|
|
27
|
+
if ((t = e == null ? void 0 : e.meta) != null && t.componentKey) {
|
|
29
28
|
if (((c = e == null ? void 0 : e.meta) == null ? void 0 : c.componentKey) === "path")
|
|
30
29
|
return e.path;
|
|
31
30
|
if (((a = e == null ? void 0 : e.meta) == null ? void 0 : a.componentKey) === "fullPath")
|
|
32
31
|
return e.fullPath;
|
|
33
32
|
} else
|
|
34
33
|
return (n = e == null ? void 0 : e.meta) != null && n.ignoreCache ? e.path : e.fullPath;
|
|
35
|
-
}, l = d,
|
|
36
|
-
return (e,
|
|
37
|
-
const n =
|
|
38
|
-
return
|
|
39
|
-
default:
|
|
40
|
-
(
|
|
41
|
-
include:
|
|
42
|
-
exclude:
|
|
34
|
+
}, l = d, m = s("ProKeepAliveInclude", []), r = v(() => l.keepAliveInclude instanceof Array && l.keepAliveInclude.length === 0 || !l.keepAliveInclude ? m.value : l.keepAliveInclude || []), f = v(() => l.keepAliveExclude || []);
|
|
35
|
+
return (e, t) => {
|
|
36
|
+
const n = k("router-view");
|
|
37
|
+
return r.value.length > 0 ? (i(), p(n, { key: 0 }, {
|
|
38
|
+
default: A(({ Component: c, route: a }) => [
|
|
39
|
+
(i(), p(y, {
|
|
40
|
+
include: r.value,
|
|
41
|
+
exclude: f.value,
|
|
43
42
|
max: d.keepAliveMax
|
|
44
43
|
}, [
|
|
45
|
-
(
|
|
46
|
-
key:
|
|
44
|
+
(i(), p(x(c), {
|
|
45
|
+
key: u(a)
|
|
47
46
|
}))
|
|
48
47
|
], 1032, ["include", "exclude", "max"]))
|
|
49
48
|
]),
|
|
50
49
|
_: 1
|
|
51
|
-
});
|
|
50
|
+
})) : (i(), p(n, { key: 1 }));
|
|
52
51
|
};
|
|
53
52
|
}
|
|
54
53
|
});
|
|
55
54
|
export {
|
|
56
|
-
|
|
55
|
+
_ as default
|
|
57
56
|
};
|
package/es/pro-layout/hooks.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { IProMenuItem } from '../pro-menu';
|
|
|
2
2
|
import { IProTab } from '../pro-reuse-tabs';
|
|
3
3
|
import { ProLayoutMenuType } from './enum.ts';
|
|
4
4
|
import { IProLayoutProps } from './type.ts';
|
|
5
|
-
export declare
|
|
5
|
+
export declare const useHooks: (props: IProLayoutProps) => {
|
|
6
6
|
topMenuItems: import('vue').Ref<{
|
|
7
7
|
name: string;
|
|
8
8
|
path: string;
|
|
@@ -12,6 +12,8 @@ export declare function useHooks(props: IProLayoutProps): {
|
|
|
12
12
|
activatedKeys?: string[] | undefined;
|
|
13
13
|
icon?: string | undefined;
|
|
14
14
|
selectedIcon?: string | undefined;
|
|
15
|
+
order?: number | undefined;
|
|
16
|
+
fixed?: boolean | undefined;
|
|
15
17
|
hideInMenu?: boolean | undefined;
|
|
16
18
|
hideChildrenInMenu?: boolean | undefined;
|
|
17
19
|
noAffix?: boolean | undefined;
|
|
@@ -22,6 +24,23 @@ export declare function useHooks(props: IProLayoutProps): {
|
|
|
22
24
|
ignoreCache?: boolean | undefined;
|
|
23
25
|
componentKey?: "path" | "fullPath" | undefined;
|
|
24
26
|
children?: /*elided*/ any[] | undefined;
|
|
27
|
+
redirect?: string | ((to: import('vue-router').RouteLocation) => import('vue-router').RouteLocationRaw) | {
|
|
28
|
+
name?: import('vue-router').RouteRecordNameGeneric;
|
|
29
|
+
params?: import('vue-router').RouteParamsRawGeneric | undefined;
|
|
30
|
+
path?: undefined | undefined;
|
|
31
|
+
query?: import('vue-router').LocationQueryRaw | undefined;
|
|
32
|
+
hash?: string | undefined;
|
|
33
|
+
replace?: boolean | undefined;
|
|
34
|
+
force?: boolean | undefined;
|
|
35
|
+
state?: import('vue-router').HistoryState | undefined;
|
|
36
|
+
} | {
|
|
37
|
+
path: string;
|
|
38
|
+
query?: import('vue-router').LocationQueryRaw | undefined;
|
|
39
|
+
hash?: string | undefined;
|
|
40
|
+
replace?: boolean | undefined;
|
|
41
|
+
force?: boolean | undefined;
|
|
42
|
+
state?: import('vue-router').HistoryState | undefined;
|
|
43
|
+
} | undefined;
|
|
25
44
|
}[], IProMenuItem[] | {
|
|
26
45
|
name: string;
|
|
27
46
|
path: string;
|
|
@@ -31,6 +50,8 @@ export declare function useHooks(props: IProLayoutProps): {
|
|
|
31
50
|
activatedKeys?: string[] | undefined;
|
|
32
51
|
icon?: string | undefined;
|
|
33
52
|
selectedIcon?: string | undefined;
|
|
53
|
+
order?: number | undefined;
|
|
54
|
+
fixed?: boolean | undefined;
|
|
34
55
|
hideInMenu?: boolean | undefined;
|
|
35
56
|
hideChildrenInMenu?: boolean | undefined;
|
|
36
57
|
noAffix?: boolean | undefined;
|
|
@@ -41,6 +62,23 @@ export declare function useHooks(props: IProLayoutProps): {
|
|
|
41
62
|
ignoreCache?: boolean | undefined;
|
|
42
63
|
componentKey?: "path" | "fullPath" | undefined;
|
|
43
64
|
children?: /*elided*/ any[] | undefined;
|
|
65
|
+
redirect?: string | ((to: import('vue-router').RouteLocation) => import('vue-router').RouteLocationRaw) | {
|
|
66
|
+
name?: import('vue-router').RouteRecordNameGeneric;
|
|
67
|
+
params?: import('vue-router').RouteParamsRawGeneric | undefined;
|
|
68
|
+
path?: undefined | undefined;
|
|
69
|
+
query?: import('vue-router').LocationQueryRaw | undefined;
|
|
70
|
+
hash?: string | undefined;
|
|
71
|
+
replace?: boolean | undefined;
|
|
72
|
+
force?: boolean | undefined;
|
|
73
|
+
state?: import('vue-router').HistoryState | undefined;
|
|
74
|
+
} | {
|
|
75
|
+
path: string;
|
|
76
|
+
query?: import('vue-router').LocationQueryRaw | undefined;
|
|
77
|
+
hash?: string | undefined;
|
|
78
|
+
replace?: boolean | undefined;
|
|
79
|
+
force?: boolean | undefined;
|
|
80
|
+
state?: import('vue-router').HistoryState | undefined;
|
|
81
|
+
} | undefined;
|
|
44
82
|
}[]>;
|
|
45
83
|
siderMenuItems: import('vue').Ref<{
|
|
46
84
|
name: string;
|
|
@@ -51,6 +89,8 @@ export declare function useHooks(props: IProLayoutProps): {
|
|
|
51
89
|
activatedKeys?: string[] | undefined;
|
|
52
90
|
icon?: string | undefined;
|
|
53
91
|
selectedIcon?: string | undefined;
|
|
92
|
+
order?: number | undefined;
|
|
93
|
+
fixed?: boolean | undefined;
|
|
54
94
|
hideInMenu?: boolean | undefined;
|
|
55
95
|
hideChildrenInMenu?: boolean | undefined;
|
|
56
96
|
noAffix?: boolean | undefined;
|
|
@@ -61,6 +101,23 @@ export declare function useHooks(props: IProLayoutProps): {
|
|
|
61
101
|
ignoreCache?: boolean | undefined;
|
|
62
102
|
componentKey?: "path" | "fullPath" | undefined;
|
|
63
103
|
children?: /*elided*/ any[] | undefined;
|
|
104
|
+
redirect?: string | ((to: import('vue-router').RouteLocation) => import('vue-router').RouteLocationRaw) | {
|
|
105
|
+
name?: import('vue-router').RouteRecordNameGeneric;
|
|
106
|
+
params?: import('vue-router').RouteParamsRawGeneric | undefined;
|
|
107
|
+
path?: undefined | undefined;
|
|
108
|
+
query?: import('vue-router').LocationQueryRaw | undefined;
|
|
109
|
+
hash?: string | undefined;
|
|
110
|
+
replace?: boolean | undefined;
|
|
111
|
+
force?: boolean | undefined;
|
|
112
|
+
state?: import('vue-router').HistoryState | undefined;
|
|
113
|
+
} | {
|
|
114
|
+
path: string;
|
|
115
|
+
query?: import('vue-router').LocationQueryRaw | undefined;
|
|
116
|
+
hash?: string | undefined;
|
|
117
|
+
replace?: boolean | undefined;
|
|
118
|
+
force?: boolean | undefined;
|
|
119
|
+
state?: import('vue-router').HistoryState | undefined;
|
|
120
|
+
} | undefined;
|
|
64
121
|
}[], IProMenuItem[] | {
|
|
65
122
|
name: string;
|
|
66
123
|
path: string;
|
|
@@ -70,6 +127,8 @@ export declare function useHooks(props: IProLayoutProps): {
|
|
|
70
127
|
activatedKeys?: string[] | undefined;
|
|
71
128
|
icon?: string | undefined;
|
|
72
129
|
selectedIcon?: string | undefined;
|
|
130
|
+
order?: number | undefined;
|
|
131
|
+
fixed?: boolean | undefined;
|
|
73
132
|
hideInMenu?: boolean | undefined;
|
|
74
133
|
hideChildrenInMenu?: boolean | undefined;
|
|
75
134
|
noAffix?: boolean | undefined;
|
|
@@ -80,9 +139,28 @@ export declare function useHooks(props: IProLayoutProps): {
|
|
|
80
139
|
ignoreCache?: boolean | undefined;
|
|
81
140
|
componentKey?: "path" | "fullPath" | undefined;
|
|
82
141
|
children?: /*elided*/ any[] | undefined;
|
|
142
|
+
redirect?: string | ((to: import('vue-router').RouteLocation) => import('vue-router').RouteLocationRaw) | {
|
|
143
|
+
name?: import('vue-router').RouteRecordNameGeneric;
|
|
144
|
+
params?: import('vue-router').RouteParamsRawGeneric | undefined;
|
|
145
|
+
path?: undefined | undefined;
|
|
146
|
+
query?: import('vue-router').LocationQueryRaw | undefined;
|
|
147
|
+
hash?: string | undefined;
|
|
148
|
+
replace?: boolean | undefined;
|
|
149
|
+
force?: boolean | undefined;
|
|
150
|
+
state?: import('vue-router').HistoryState | undefined;
|
|
151
|
+
} | {
|
|
152
|
+
path: string;
|
|
153
|
+
query?: import('vue-router').LocationQueryRaw | undefined;
|
|
154
|
+
hash?: string | undefined;
|
|
155
|
+
replace?: boolean | undefined;
|
|
156
|
+
force?: boolean | undefined;
|
|
157
|
+
state?: import('vue-router').HistoryState | undefined;
|
|
158
|
+
} | undefined;
|
|
83
159
|
}[]>;
|
|
84
160
|
topMenuSelectedKeys: import('vue').Ref<string[], string[]>;
|
|
85
161
|
siderMenuSelectedKeys: import('vue').Ref<string[], string[]>;
|
|
162
|
+
topMenuOpenKeys: import('vue').Ref<string[], string[]>;
|
|
163
|
+
siderMenuOpenKeys: import('vue').Ref<string[], string[]>;
|
|
86
164
|
activeMenuItem: import('vue').Ref<IProMenuItem | undefined, IProMenuItem | undefined>;
|
|
87
165
|
menuItemMap: import('vue').Ref<Record<string, IProMenuItem>, Record<string, IProMenuItem>>;
|
|
88
166
|
breadcrumbItems: import('vue').Ref<{
|
|
@@ -110,6 +188,7 @@ export declare function useHooks(props: IProLayoutProps): {
|
|
|
110
188
|
}[]>;
|
|
111
189
|
keepAliveInclude: import('vue').Ref<string[], string[]>;
|
|
112
190
|
onProMenuItemClick: (menuType: ProLayoutMenuType, item: IProMenuItem) => Promise<void>;
|
|
191
|
+
onProMenuOpenKeysChange: (menuType: ProLayoutMenuType, keys: string[]) => void;
|
|
113
192
|
onTabClick: (key: string) => void;
|
|
114
193
|
onTabDelete: (key: string) => void;
|
|
115
194
|
};
|
package/es/pro-layout/hooks.js
CHANGED
|
@@ -1,146 +1,195 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var V = Object.defineProperty, X = Object.defineProperties;
|
|
2
|
+
var Y = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var x = Object.getOwnPropertySymbols;
|
|
4
|
+
var Z = Object.prototype.hasOwnProperty, $ = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var J = (o, s, i) => s in o ? V(o, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[s] = i, w = (o, s) => {
|
|
6
|
+
for (var i in s || (s = {}))
|
|
7
|
+
Z.call(s, i) && J(o, i, s[i]);
|
|
8
|
+
if (x)
|
|
9
|
+
for (var i of x(s))
|
|
10
|
+
$.call(s, i) && J(o, i, s[i]);
|
|
11
|
+
return o;
|
|
12
|
+
}, A = (o, s) => X(o, Y(s));
|
|
13
|
+
var L = (o, s, i) => new Promise((T, y) => {
|
|
14
|
+
var b = (u) => {
|
|
15
|
+
try {
|
|
16
|
+
c(i.next(u));
|
|
17
|
+
} catch (d) {
|
|
18
|
+
y(d);
|
|
19
|
+
}
|
|
20
|
+
}, g = (u) => {
|
|
21
|
+
try {
|
|
22
|
+
c(i.throw(u));
|
|
23
|
+
} catch (d) {
|
|
24
|
+
y(d);
|
|
25
|
+
}
|
|
26
|
+
}, c = (u) => u.done ? T(u.value) : Promise.resolve(u.value).then(b, g);
|
|
27
|
+
c((i = i.apply(o, s)).next());
|
|
28
|
+
});
|
|
29
|
+
import { ref as v, computed as _, watch as E } from "vue";
|
|
30
|
+
import { useRoute as I, useRouter as m } from "vue-router";
|
|
31
|
+
import { ProLayoutMode as k, ProLayoutMenuType as R } from "./enum.js";
|
|
32
|
+
const te = (o) => {
|
|
33
|
+
const s = I(), i = m(), T = v([]), y = v([]), b = v([]), g = v([]), c = v(), u = v([]), d = v({}), N = v([]), f = v([]), K = v([]), P = v([]), p = v([]), M = _(() => {
|
|
6
34
|
const e = [...o.menuItems], a = (t) => {
|
|
7
35
|
t.forEach((l) => {
|
|
8
36
|
if (l != null && l.children && l.children.length > 0) {
|
|
9
37
|
if ((l == null ? void 0 : l.topChildrenMenu) !== void 0)
|
|
10
|
-
l.children = l.children.map((n) => ({
|
|
38
|
+
l.children = l.children.map((n) => A(w({}, n), { topMenu: l == null ? void 0 : l.topChildrenMenu }));
|
|
11
39
|
else {
|
|
12
|
-
const n = l.children.find((
|
|
13
|
-
n && (l.topChildrenMenu = n.topMenu, l.children = l.children.map((
|
|
40
|
+
const n = l.children.find((r) => r.topMenu !== void 0);
|
|
41
|
+
n && (l.topChildrenMenu = n.topMenu, l.children = l.children.map((r) => A(w({}, r), { topMenu: n.topMenu })));
|
|
14
42
|
}
|
|
15
43
|
a(l.children);
|
|
16
44
|
}
|
|
17
45
|
});
|
|
18
46
|
};
|
|
19
|
-
return o.layout ===
|
|
20
|
-
}),
|
|
47
|
+
return o.layout === k.mix && a(e), e;
|
|
48
|
+
}), W = (e) => {
|
|
21
49
|
var a;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
50
|
+
if (T.value = [e.name], !(e != null && e.children) || ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) === 0)
|
|
51
|
+
p.value = [], i == null || i.push({ path: e.path });
|
|
52
|
+
else if (p.value = e.children, e != null && e.redirect)
|
|
53
|
+
if (typeof e.redirect == "string")
|
|
54
|
+
i == null || i.push({ path: e.redirect });
|
|
55
|
+
else if (typeof e.redirect == "function") {
|
|
56
|
+
const t = e.redirect(s);
|
|
57
|
+
i == null || i.push(t);
|
|
58
|
+
} else
|
|
59
|
+
i == null || i.push(e.redirect);
|
|
60
|
+
}, B = (e) => {
|
|
61
|
+
e != null && e.name ? i == null || i.push({ name: e.name }) : i == null || i.push({ path: e.path }), y.value = [e.name];
|
|
62
|
+
}, D = (e, a) => L(null, null, function* () {
|
|
63
|
+
if (a != null && a.path && !(o != null && o.onMenuItemClick && !(yield o.onMenuItemClick(a)))) {
|
|
27
64
|
if (a.path.startsWith("http") || a.path.startsWith("https")) {
|
|
28
65
|
window.open(a.path);
|
|
29
66
|
return;
|
|
30
67
|
}
|
|
31
|
-
e ===
|
|
68
|
+
e === R.top ? W(a) : B(a);
|
|
32
69
|
}
|
|
33
|
-
},
|
|
70
|
+
}), H = (e, a) => {
|
|
71
|
+
e === R.top ? b.value = a : g.value = a;
|
|
72
|
+
}, j = () => {
|
|
34
73
|
const e = [], a = (t) => {
|
|
35
74
|
var l;
|
|
36
75
|
for (const n in t) {
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
return e.unshift(
|
|
76
|
+
const r = t[n];
|
|
77
|
+
if (r.name === ((l = c == null ? void 0 : c.value) == null ? void 0 : l.name) || r.children && r.children.length > 0 && a(r.children))
|
|
78
|
+
return e.unshift(r), !0;
|
|
40
79
|
}
|
|
41
80
|
return !1;
|
|
42
81
|
};
|
|
43
|
-
a(JSON.parse(JSON.stringify(
|
|
44
|
-
},
|
|
82
|
+
a(JSON.parse(JSON.stringify(M.value))), u.value = e;
|
|
83
|
+
}, q = () => {
|
|
45
84
|
var a, t, l;
|
|
46
|
-
const e = (a =
|
|
47
|
-
|
|
85
|
+
const e = (a = u.value) == null ? void 0 : a.map((n) => ({ path: n == null ? void 0 : n.path, label: n == null ? void 0 : n.title }));
|
|
86
|
+
N.value = (t = c.value) != null && t.breadcrumbs ? (l = c.value) == null ? void 0 : l.breadcrumbs : e.length !== 0 ? e : [];
|
|
48
87
|
};
|
|
49
|
-
function
|
|
50
|
-
if (!
|
|
51
|
-
|
|
88
|
+
function z() {
|
|
89
|
+
if (!c.value || c.value.noAffix) {
|
|
90
|
+
f.value.forEach((n) => {
|
|
52
91
|
n.active = !1;
|
|
53
92
|
});
|
|
54
93
|
return;
|
|
55
94
|
}
|
|
56
|
-
const { name: e, title: a } =
|
|
95
|
+
const { name: e, title: a } = c.value;
|
|
57
96
|
let t = -1;
|
|
58
|
-
|
|
59
|
-
n.active = !1, n.name === e && (t =
|
|
97
|
+
f.value.forEach((n, r) => {
|
|
98
|
+
n.active = !1, n.name === e && (t = r);
|
|
60
99
|
});
|
|
61
100
|
const l = {
|
|
62
101
|
name: e,
|
|
63
|
-
parentNames:
|
|
64
|
-
title: a
|
|
65
|
-
fullPath:
|
|
102
|
+
parentNames: u.value.map((n) => n.name),
|
|
103
|
+
title: a != null ? a : e,
|
|
104
|
+
fullPath: s.fullPath,
|
|
66
105
|
active: !0
|
|
67
106
|
};
|
|
68
107
|
if (~t) {
|
|
69
|
-
const n =
|
|
70
|
-
n.fullPath ===
|
|
71
|
-
|
|
108
|
+
const n = f.value[t];
|
|
109
|
+
n.fullPath === s.fullPath ? (n.active = !0, n.fullPath = s.fullPath) : (f.value.splice(t, 1), setTimeout(() => {
|
|
110
|
+
f.value.push(l);
|
|
72
111
|
}));
|
|
73
112
|
} else
|
|
74
|
-
|
|
113
|
+
f.value.push(l);
|
|
75
114
|
}
|
|
76
|
-
const
|
|
77
|
-
const a =
|
|
78
|
-
|
|
79
|
-
},
|
|
115
|
+
const F = (e) => {
|
|
116
|
+
const a = f.value.findIndex((l) => l.name === e), t = f.value[a];
|
|
117
|
+
i.push(t.fullPath);
|
|
118
|
+
}, G = (e) => {
|
|
80
119
|
let a = -1, t = -1;
|
|
81
|
-
if (
|
|
82
|
-
n.name === e && (t =
|
|
120
|
+
if (f.value.forEach((n, r) => {
|
|
121
|
+
n.name === e && (t = r), n.active && (a = r);
|
|
83
122
|
}), a === t) {
|
|
84
123
|
let n;
|
|
85
|
-
t === 0 ? n =
|
|
124
|
+
t === 0 ? n = f.value[t + 1] : n = f.value[t - 1], n.active = !0, i.push(n.fullPath);
|
|
86
125
|
}
|
|
87
|
-
const l =
|
|
88
|
-
|
|
89
|
-
},
|
|
126
|
+
const l = f.value.splice(t, 1);
|
|
127
|
+
U(l[0]);
|
|
128
|
+
}, Q = () => {
|
|
90
129
|
var a;
|
|
91
|
-
if (o != null && o.disableKeepAlive || (a =
|
|
130
|
+
if (o != null && o.disableKeepAlive || (a = s == null ? void 0 : s.meta) != null && a.ignoreCache)
|
|
92
131
|
return;
|
|
93
|
-
const e = new Set(
|
|
94
|
-
|
|
132
|
+
const e = new Set(K.value);
|
|
133
|
+
u.value.forEach((t) => {
|
|
95
134
|
t.name && e.add(t.name);
|
|
96
|
-
}),
|
|
97
|
-
},
|
|
98
|
-
const a = new Set(
|
|
135
|
+
}), K.value = Array.from(e.values());
|
|
136
|
+
}, U = (e) => {
|
|
137
|
+
const a = new Set(K.value);
|
|
99
138
|
e.parentNames.forEach((t) => {
|
|
100
139
|
a.delete(t);
|
|
101
|
-
}),
|
|
140
|
+
}), f.value.forEach((t) => {
|
|
102
141
|
t.parentNames.forEach((l) => {
|
|
103
|
-
const n =
|
|
104
|
-
n != null && n.ignoreCache || a.add(n.name);
|
|
142
|
+
const n = d.value[l];
|
|
143
|
+
n && (n != null && n.ignoreCache || a.add(n.name));
|
|
105
144
|
});
|
|
106
|
-
}),
|
|
145
|
+
}), K.value = Array.from(a.values());
|
|
107
146
|
};
|
|
108
|
-
return
|
|
147
|
+
return E(() => M.value, () => {
|
|
109
148
|
const e = {}, a = (t) => {
|
|
110
149
|
t.forEach((l) => {
|
|
111
150
|
l.children && l.children.length > 0 && a(l.children), delete l.children, e[l.name] = l;
|
|
112
151
|
});
|
|
113
152
|
};
|
|
114
|
-
a(JSON.parse(JSON.stringify(
|
|
115
|
-
}, { immediate: !0 }),
|
|
153
|
+
a(JSON.parse(JSON.stringify(M.value))), d.value = e;
|
|
154
|
+
}, { immediate: !0 }), E(() => [o.layout, M.value], () => {
|
|
116
155
|
var e;
|
|
117
|
-
if (
|
|
118
|
-
|
|
119
|
-
else if (o.layout ===
|
|
120
|
-
const a = (e =
|
|
121
|
-
(a == null ? void 0 : a.length) === 0 ?
|
|
156
|
+
if (P.value = [], p.value = [], o.layout === k.side)
|
|
157
|
+
p.value = M.value;
|
|
158
|
+
else if (o.layout === k.mix) {
|
|
159
|
+
const a = (e = M.value) == null ? void 0 : e.filter((t) => t.topMenu);
|
|
160
|
+
(a == null ? void 0 : a.length) === 0 ? p.value = M.value : P.value = a;
|
|
122
161
|
}
|
|
123
|
-
}, { immediate: !0 }),
|
|
162
|
+
}, { immediate: !0 }), E(() => s == null ? void 0 : s.name, () => {
|
|
124
163
|
var t, l, n;
|
|
125
|
-
const e =
|
|
126
|
-
|
|
127
|
-
const a =
|
|
128
|
-
a.length > 0 &&
|
|
164
|
+
const e = s == null ? void 0 : s.name;
|
|
165
|
+
c.value = d.value[e], j();
|
|
166
|
+
const a = u.value.filter((r) => r.topMenu);
|
|
167
|
+
if (a.length > 0 && P.value.length > 0 && (p.value = ((t = a[a.length - 1]) == null ? void 0 : t.children) || []), T.value = c != null && c.value ? [...a.map((r) => r.name), ...((l = c.value) == null ? void 0 : l.activatedKeys) || []] : [], y.value = c != null && c.value ? [c.value.name, ...((n = c.value) == null ? void 0 : n.activatedKeys) || []] : [], c.value) {
|
|
168
|
+
const r = u.value.filter((h, C) => C < u.value.length - 1), S = r.filter((h) => h.topMenu).map((h) => h.name), O = r.filter((h) => !h.topMenu).map((h) => h.name);
|
|
169
|
+
c.value.activatedKeys && c.value.activatedKeys.length > 0 && c.value.activatedKeys.forEach((h) => {
|
|
170
|
+
const C = d.value[h];
|
|
171
|
+
C && (C.topMenu ? S.push(h) : O.push(h));
|
|
172
|
+
}), b.value = Array.from(/* @__PURE__ */ new Set([...b.value, ...S])), g.value = Array.from(/* @__PURE__ */ new Set([...g.value, ...O]));
|
|
173
|
+
}
|
|
174
|
+
q(), o.hideTabs || z(), Q();
|
|
129
175
|
}, { immediate: !0 }), {
|
|
130
|
-
topMenuItems:
|
|
131
|
-
siderMenuItems:
|
|
132
|
-
topMenuSelectedKeys:
|
|
133
|
-
siderMenuSelectedKeys:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
176
|
+
topMenuItems: P,
|
|
177
|
+
siderMenuItems: p,
|
|
178
|
+
topMenuSelectedKeys: T,
|
|
179
|
+
siderMenuSelectedKeys: y,
|
|
180
|
+
topMenuOpenKeys: b,
|
|
181
|
+
siderMenuOpenKeys: g,
|
|
182
|
+
activeMenuItem: c,
|
|
183
|
+
menuItemMap: d,
|
|
184
|
+
breadcrumbItems: N,
|
|
185
|
+
tabs: f,
|
|
186
|
+
keepAliveInclude: K,
|
|
187
|
+
onProMenuItemClick: D,
|
|
188
|
+
onProMenuOpenKeysChange: H,
|
|
189
|
+
onTabClick: F,
|
|
190
|
+
onTabDelete: G
|
|
142
191
|
};
|
|
143
|
-
}
|
|
192
|
+
};
|
|
144
193
|
export {
|
|
145
|
-
|
|
194
|
+
te as useHooks
|
|
146
195
|
};
|
package/es/pro-layout/index.d.ts
CHANGED
|
@@ -7,12 +7,12 @@ declare const ProLayout: {
|
|
|
7
7
|
collapse: (_collapsed: boolean) => void;
|
|
8
8
|
keepAliveIncludeChange: (_keepAliveInclude: string[]) => void;
|
|
9
9
|
}, import('vue').PublicProps, {
|
|
10
|
+
layout: import('./enum').ProLayoutMode;
|
|
10
11
|
title: string;
|
|
11
|
-
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
12
12
|
tabsSize: "mini" | "small" | "medium" | "large";
|
|
13
13
|
tabsType: "line" | "card" | "card-gutter" | "text" | "rounded" | "capsule";
|
|
14
14
|
tabsHeaderPadding: boolean;
|
|
15
|
-
|
|
15
|
+
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
16
16
|
hideHeader: boolean;
|
|
17
17
|
hiderSider: boolean;
|
|
18
18
|
headerHeight: number;
|
|
@@ -36,12 +36,12 @@ declare const ProLayout: {
|
|
|
36
36
|
onCollapse?: ((_collapsed: boolean) => any) | undefined;
|
|
37
37
|
onKeepAliveIncludeChange?: ((_keepAliveInclude: string[]) => any) | undefined;
|
|
38
38
|
}>, {}, {}, {}, {}, {
|
|
39
|
+
layout: import('./enum').ProLayoutMode;
|
|
39
40
|
title: string;
|
|
40
|
-
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
41
41
|
tabsSize: "mini" | "small" | "medium" | "large";
|
|
42
42
|
tabsType: "line" | "card" | "card-gutter" | "text" | "rounded" | "capsule";
|
|
43
43
|
tabsHeaderPadding: boolean;
|
|
44
|
-
|
|
44
|
+
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
45
45
|
hideHeader: boolean;
|
|
46
46
|
hiderSider: boolean;
|
|
47
47
|
headerHeight: number;
|
|
@@ -65,12 +65,12 @@ declare const ProLayout: {
|
|
|
65
65
|
collapse: (_collapsed: boolean) => void;
|
|
66
66
|
keepAliveIncludeChange: (_keepAliveInclude: string[]) => void;
|
|
67
67
|
}, string, {
|
|
68
|
+
layout: import('./enum').ProLayoutMode;
|
|
68
69
|
title: string;
|
|
69
|
-
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
70
70
|
tabsSize: "mini" | "small" | "medium" | "large";
|
|
71
71
|
tabsType: "line" | "card" | "card-gutter" | "text" | "rounded" | "capsule";
|
|
72
72
|
tabsHeaderPadding: boolean;
|
|
73
|
-
|
|
73
|
+
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
74
74
|
hideHeader: boolean;
|
|
75
75
|
hiderSider: boolean;
|
|
76
76
|
headerHeight: number;
|
|
@@ -86,6 +86,8 @@ declare const ProLayout: {
|
|
|
86
86
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
87
87
|
$slots: {
|
|
88
88
|
'header-left'?(_: {}): any;
|
|
89
|
+
'header-left-logo-img'?(_: {}): any;
|
|
90
|
+
'header-left-logo-title'?(_: {}): any;
|
|
89
91
|
'header-center-left'?(_: {}): any;
|
|
90
92
|
'header-center-center'?(_: {}): any;
|
|
91
93
|
'header-center-right'?(_: {}): any;
|
|
@@ -96,5 +98,6 @@ declare const ProLayout: {
|
|
|
96
98
|
}) & {
|
|
97
99
|
install: (app: App) => void;
|
|
98
100
|
};
|
|
101
|
+
/** 导出组件 */
|
|
99
102
|
export { ProLayout };
|
|
100
103
|
export default ProLayout;
|
package/es/pro-layout/index.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./pro-layout.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { ProReuseTabs as f } from "../pro-reuse-tabs/index.js";
|
|
7
|
-
import { IconMenuFold as c, IconMenuUnfold as l } from "@arco-design/web-vue/es/icon";
|
|
8
|
-
const x = Object.assign(e, {
|
|
9
|
-
install: (o) => {
|
|
10
|
-
o.use(r), o.use(u), o.use(t), o.use(s), o.use(m), o.use(n), o.use(f), o.use(i), o.use(c), o.use(l), o.component("KbProLayout", e);
|
|
3
|
+
const r = Object.assign(o, {
|
|
4
|
+
install: (t) => {
|
|
5
|
+
t.component("KbProLayout", o);
|
|
11
6
|
}
|
|
12
7
|
});
|
|
13
8
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
r as ProLayout,
|
|
10
|
+
r as default
|
|
16
11
|
};
|
|
@@ -4,6 +4,8 @@ declare function __VLS_template(): {
|
|
|
4
4
|
attrs: Partial<{}>;
|
|
5
5
|
slots: {
|
|
6
6
|
'header-left'?(_: {}): any;
|
|
7
|
+
'header-left-logo-img'?(_: {}): any;
|
|
8
|
+
'header-left-logo-title'?(_: {}): any;
|
|
7
9
|
'header-center-left'?(_: {}): any;
|
|
8
10
|
'header-center-center'?(_: {}): any;
|
|
9
11
|
'header-center-right'?(_: {}): any;
|
|
@@ -22,12 +24,12 @@ declare const __VLS_component: import('vue').DefineComponent<IProLayoutProps, {}
|
|
|
22
24
|
onCollapse?: ((_collapsed: boolean) => any) | undefined;
|
|
23
25
|
onKeepAliveIncludeChange?: ((_keepAliveInclude: string[]) => any) | undefined;
|
|
24
26
|
}>, {
|
|
27
|
+
layout: ProLayoutMode;
|
|
25
28
|
title: string;
|
|
26
|
-
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
27
29
|
tabsSize: "mini" | "small" | "medium" | "large";
|
|
28
30
|
tabsType: "line" | "card" | "card-gutter" | "text" | "rounded" | "capsule";
|
|
29
31
|
tabsHeaderPadding: boolean;
|
|
30
|
-
|
|
32
|
+
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
31
33
|
hideHeader: boolean;
|
|
32
34
|
hiderSider: boolean;
|
|
33
35
|
headerHeight: number;
|