@keyblade/pro-components 1.15.0-alpha.5 → 1.15.0-alpha.7
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/index.d.ts +1 -0
- package/es/index.js +37 -36
- package/es/pro-layout/hooks.js +121 -115
- package/es/pro-layout/index.d.ts +95 -10
- package/es/pro-layout/index.js +13 -6
- package/es/pro-layout/pro-layout-header.vue.d.ts +66 -0
- package/es/pro-layout/pro-layout-header.vue.js +104 -0
- package/es/pro-layout/pro-layout-header.vue3.js +5 -0
- package/es/pro-layout/pro-layout.vue.d.ts +4 -3
- package/es/pro-layout/pro-layout.vue.js +175 -170
- package/es/pro-layout/type.d.ts +4 -0
- package/es/style.css +1 -1
- package/package.json +1 -1
package/es/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { default as ProFindPassword } from './pro-find-password';
|
|
|
9
9
|
export { default as ProPageHeader } from './pro-page-header';
|
|
10
10
|
export { default as ProKeepAliveRouterView } from './pro-keep-alive-router-view';
|
|
11
11
|
export { default as ProLayout } from './pro-layout';
|
|
12
|
+
export { ProLayoutHeader } from './pro-layout';
|
|
12
13
|
export { default as ProFooterBar } from './pro-footer-bar';
|
|
13
14
|
export { default as ProMenu } from './pro-menu';
|
|
14
15
|
export type { IProMenuItem } from './pro-menu';
|
package/es/index.js
CHANGED
|
@@ -2,55 +2,56 @@ import { ProLogin as e } from "./pro-login/index.js";
|
|
|
2
2
|
import { ProFindPassword as m } from "./pro-find-password/index.js";
|
|
3
3
|
import { ProPageHeader as t } from "./pro-page-header/index.js";
|
|
4
4
|
import { ProKeepAliveRouterView as s } from "./pro-keep-alive-router-view/index.js";
|
|
5
|
-
import { ProLayout as i } from "./pro-layout/index.js";
|
|
6
|
-
import { ProMenu as
|
|
7
|
-
import { ProPageContainer as
|
|
8
|
-
import { ProReuseTabs as
|
|
9
|
-
import { ProImageUpload as
|
|
10
|
-
import { ProDatesPicker as
|
|
5
|
+
import { ProLayout as i, ProLayoutHeader as f } from "./pro-layout/index.js";
|
|
6
|
+
import { ProMenu as P } from "./pro-menu/index.js";
|
|
7
|
+
import { ProPageContainer as u } from "./pro-page-container/index.js";
|
|
8
|
+
import { ProReuseTabs as a } from "./pro-reuse-tabs/index.js";
|
|
9
|
+
import { ProImageUpload as n } from "./pro-image-upload/index.js";
|
|
10
|
+
import { ProDatesPicker as d } from "./pro-dates-picker/index.js";
|
|
11
11
|
import { ProDateRangePicker as l } from "./pro-date-range-picker/index.js";
|
|
12
|
-
import { ProTable as
|
|
13
|
-
import { ProTextarea as
|
|
14
|
-
import { ProFooterBar as
|
|
15
|
-
import { ProFormGroup as
|
|
16
|
-
import { ProCalendar as
|
|
17
|
-
import { ProLoader as
|
|
12
|
+
import { ProTable as g } from "./pro-table/index.js";
|
|
13
|
+
import { ProTextarea as x } from "./pro-textarea/index.js";
|
|
14
|
+
import { ProFooterBar as b } from "./pro-footer-bar/index.js";
|
|
15
|
+
import { ProFormGroup as c } from "./pro-form-group/index.js";
|
|
16
|
+
import { ProCalendar as p } from "./pro-calendar/index.js";
|
|
17
|
+
import { ProLoader as L } from "./pro-loader/index.js";
|
|
18
18
|
import { globalProps as F } from "./global-props.js";
|
|
19
|
-
import { setGlobalProps as
|
|
20
|
-
import { splitStringWithCommaAndSpace as
|
|
21
|
-
import { EImageUploadInnerBeforeUploadStep as
|
|
22
|
-
import { defaultImageUploadOptions as
|
|
23
|
-
import { EProLoginType as
|
|
24
|
-
import { EFindPasswordSteps as
|
|
19
|
+
import { setGlobalProps as V } from "./global-props.js";
|
|
20
|
+
import { splitStringWithCommaAndSpace as q } from "./utils.js";
|
|
21
|
+
import { EImageUploadInnerBeforeUploadStep as J } from "./pro-image-upload/types.js";
|
|
22
|
+
import { defaultImageUploadOptions as Q } from "./pro-image-upload/constant.js";
|
|
23
|
+
import { EProLoginType as Y } from "./pro-login/enum.js";
|
|
24
|
+
import { EFindPasswordSteps as _ } from "./pro-find-password/enum.js";
|
|
25
25
|
const v = {
|
|
26
26
|
install(o, r) {
|
|
27
|
-
Object.assign(F, r || {}), o.use(e), o.use(m), o.use(t), o.use(s), o.use(i), o.use(
|
|
27
|
+
Object.assign(F, r || {}), o.use(e), o.use(m), o.use(t), o.use(s), o.use(i), o.use(f), o.use(b), o.use(P), o.use(u), o.use(a), o.use(n), o.use(d), o.use(l), o.use(x), o.use(g), o.use(c), o.use(p), o.use(L);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
_ as EFindPasswordSteps,
|
|
32
|
+
J as EImageUploadInnerBeforeUploadStep,
|
|
33
|
+
Y as EProLoginType,
|
|
34
|
+
p as ProCalendar,
|
|
35
35
|
l as ProDateRangePicker,
|
|
36
|
-
|
|
36
|
+
d as ProDatesPicker,
|
|
37
37
|
m as ProFindPassword,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
b as ProFooterBar,
|
|
39
|
+
c as ProFormGroup,
|
|
40
|
+
n as ProImageUpload,
|
|
41
41
|
s as ProKeepAliveRouterView,
|
|
42
42
|
i as ProLayout,
|
|
43
|
-
|
|
43
|
+
f as ProLayoutHeader,
|
|
44
|
+
L as ProLoader,
|
|
44
45
|
e as ProLogin,
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
P as ProMenu,
|
|
47
|
+
u as ProPageContainer,
|
|
47
48
|
t as ProPageHeader,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
a as ProReuseTabs,
|
|
50
|
+
g as ProTable,
|
|
51
|
+
x as ProTextarea,
|
|
51
52
|
v as default,
|
|
52
|
-
|
|
53
|
+
Q as defaultImageUploadOptions,
|
|
53
54
|
F as globalProps,
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
V as setGlobalProps,
|
|
56
|
+
q as splitStringWithCommaAndSpace
|
|
56
57
|
};
|
package/es/pro-layout/hooks.js
CHANGED
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, A = (
|
|
13
|
-
var W = (
|
|
14
|
-
var
|
|
1
|
+
var X = Object.defineProperty, Y = Object.defineProperties;
|
|
2
|
+
var Z = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var J = Object.getOwnPropertySymbols;
|
|
4
|
+
var $ = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var R = (s, f, i) => f in s ? X(s, f, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[f] = i, N = (s, f) => {
|
|
6
|
+
for (var i in f || (f = {}))
|
|
7
|
+
$.call(f, i) && R(s, i, f[i]);
|
|
8
|
+
if (J)
|
|
9
|
+
for (var i of J(f))
|
|
10
|
+
_.call(f, i) && R(s, i, f[i]);
|
|
11
|
+
return s;
|
|
12
|
+
}, A = (s, f) => Y(s, Z(f));
|
|
13
|
+
var W = (s, f, i) => new Promise((o, b) => {
|
|
14
|
+
var P = (c) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
16
|
+
p(i.next(c));
|
|
17
17
|
} catch (d) {
|
|
18
|
-
|
|
18
|
+
b(d);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, y = (c) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
22
|
+
p(i.throw(c));
|
|
23
23
|
} catch (d) {
|
|
24
|
-
|
|
24
|
+
b(d);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, p = (c) => c.done ? o(c.value) : Promise.resolve(c.value).then(P, y);
|
|
27
|
+
p((i = i.apply(s, f)).next());
|
|
28
28
|
});
|
|
29
|
-
import { ref as v, computed as
|
|
30
|
-
import { useRoute as
|
|
29
|
+
import { ref as v, computed as I, watch as E } from "vue";
|
|
30
|
+
import { useRoute as m, useRouter as ee } from "vue-router";
|
|
31
31
|
import { ProLayoutMode as k, ProLayoutMenuType as D } from "./enum.js";
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const e = [...
|
|
32
|
+
const ie = (s) => {
|
|
33
|
+
const f = "cacheRouteTabs", i = m(), o = ee(), b = v([]), P = v([]), y = v([]), p = v([]), c = v(), d = v([]), K = v({}), x = v([]), h = v([]), S = v([]), C = v([]), M = v([]), g = I(() => {
|
|
34
|
+
const e = [...s.menuItems], a = (t) => {
|
|
35
35
|
t.forEach((l) => {
|
|
36
36
|
if (l != null && l.children && l.children.length > 0) {
|
|
37
37
|
if ((l == null ? void 0 : l.topChildrenMenu) !== void 0)
|
|
38
|
-
l.children = l.children.map((
|
|
38
|
+
l.children = l.children.map((n) => A(N({}, n), { topMenu: l == null ? void 0 : l.topChildrenMenu }));
|
|
39
39
|
else {
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const n = l.children.find((u) => u.topMenu !== void 0);
|
|
41
|
+
n && (l.topChildrenMenu = n.topMenu, l.children = l.children.map((u) => A(N({}, u), { topMenu: n.topMenu })));
|
|
42
42
|
}
|
|
43
43
|
a(l.children);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
return
|
|
47
|
+
return s.layout === k.mix && a(e), e;
|
|
48
48
|
}), L = (e) => {
|
|
49
49
|
var a;
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
else if (
|
|
50
|
+
if (b.value = [e.name], !(e != null && e.children) || ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) === 0)
|
|
51
|
+
M.value = [], o == null || o.push({ path: e.path });
|
|
52
|
+
else if (M.value = e.children, e != null && e.redirect)
|
|
53
53
|
if (typeof e.redirect == "string")
|
|
54
|
-
|
|
54
|
+
o == null || o.push({ path: e.redirect });
|
|
55
55
|
else if (typeof e.redirect == "function") {
|
|
56
|
-
const t = e.redirect(
|
|
57
|
-
|
|
56
|
+
const t = e.redirect(i);
|
|
57
|
+
o == null || o.push(t);
|
|
58
58
|
} else
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
e != null && e.name ?
|
|
62
|
-
},
|
|
63
|
-
if (a != null && a.path && !(
|
|
59
|
+
o == null || o.push(e.redirect);
|
|
60
|
+
}, B = (e) => {
|
|
61
|
+
e != null && e.name ? o == null || o.push({ name: e.name }) : o == null || o.push({ path: e.path }), P.value = [e.name];
|
|
62
|
+
}, H = (e, a) => W(null, null, function* () {
|
|
63
|
+
if (a != null && a.path && !(s != null && s.onMenuItemClick && !(yield s.onMenuItemClick(a)))) {
|
|
64
64
|
if (a.path.startsWith("http") || a.path.startsWith("https")) {
|
|
65
65
|
window.open(a.path);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
e === D.top ? L(a) :
|
|
68
|
+
e === D.top ? L(a) : B(a);
|
|
69
69
|
}
|
|
70
|
-
}),
|
|
71
|
-
e === D.top ?
|
|
72
|
-
},
|
|
70
|
+
}), j = (e, a) => {
|
|
71
|
+
e === D.top ? y.value = a : p.value = a;
|
|
72
|
+
}, q = () => {
|
|
73
73
|
const e = [], a = (t) => {
|
|
74
74
|
var l;
|
|
75
|
-
for (const
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
return e.unshift(
|
|
75
|
+
for (const n in t) {
|
|
76
|
+
const u = t[n];
|
|
77
|
+
if (u.name === ((l = c == null ? void 0 : c.value) == null ? void 0 : l.name) || u.children && u.children.length > 0 && a(u.children))
|
|
78
|
+
return e.unshift(u), !0;
|
|
79
79
|
}
|
|
80
80
|
return !1;
|
|
81
81
|
};
|
|
82
|
-
a(JSON.parse(JSON.stringify(g.value))),
|
|
83
|
-
},
|
|
82
|
+
a(JSON.parse(JSON.stringify(g.value))), d.value = e;
|
|
83
|
+
}, z = () => {
|
|
84
84
|
var a, t, l;
|
|
85
|
-
const e = (a =
|
|
86
|
-
|
|
85
|
+
const e = (a = d.value) == null ? void 0 : a.map((n) => ({ path: n == null ? void 0 : n.path, label: n == null ? void 0 : n.title }));
|
|
86
|
+
x.value = (t = c.value) != null && t.breadcrumbs ? (l = c.value) == null ? void 0 : l.breadcrumbs : e.length !== 0 ? e : [];
|
|
87
87
|
};
|
|
88
|
-
function
|
|
89
|
-
var
|
|
90
|
-
if (!
|
|
88
|
+
function F() {
|
|
89
|
+
var T, O;
|
|
90
|
+
if (!c.value || c.value.noAffix) {
|
|
91
91
|
h.value.forEach((r) => {
|
|
92
92
|
r.active = !1;
|
|
93
93
|
});
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
const { name: e, title: a } =
|
|
96
|
+
const { name: e, title: a } = c.value;
|
|
97
97
|
h.value.forEach((r) => {
|
|
98
98
|
r.active = !1;
|
|
99
99
|
});
|
|
100
|
-
const t = (
|
|
100
|
+
const t = (T = i.meta) == null ? void 0 : T.getTitle, l = typeof t == "function" ? t(i) : void 0, n = {
|
|
101
101
|
name: e,
|
|
102
|
-
parentNames:
|
|
103
|
-
title: (
|
|
104
|
-
fullPath:
|
|
102
|
+
parentNames: d.value.map((r) => r.name),
|
|
103
|
+
title: (O = l != null ? l : a) != null ? O : e,
|
|
104
|
+
fullPath: i.fullPath,
|
|
105
105
|
active: !0
|
|
106
|
-
},
|
|
107
|
-
|
|
106
|
+
}, u = h.value.findIndex((r) => r.fullPath.startsWith(i.path));
|
|
107
|
+
u >= 0 ? (h.value[u].active = !0, h.value[u].fullPath = i.fullPath) : h.value.push(n);
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const G = (e) => {
|
|
110
110
|
const a = h.value.find((t) => t.fullPath === e);
|
|
111
|
-
a &&
|
|
112
|
-
},
|
|
111
|
+
a && o.push(a.fullPath);
|
|
112
|
+
}, Q = (e) => {
|
|
113
113
|
let a = -1, t = -1;
|
|
114
|
-
if (h.value.forEach((
|
|
115
|
-
|
|
114
|
+
if (h.value.forEach((n, u) => {
|
|
115
|
+
n.fullPath === e && (t = u), n.active && (a = u);
|
|
116
116
|
}), t === -1) return;
|
|
117
117
|
if (a === t) {
|
|
118
|
-
let
|
|
119
|
-
t === 0 ?
|
|
118
|
+
let n;
|
|
119
|
+
t === 0 ? n = h.value[t + 1] : n = h.value[t - 1], n && (n.active = !0, o.push(n.fullPath));
|
|
120
120
|
}
|
|
121
121
|
const l = h.value.splice(t, 1);
|
|
122
|
-
|
|
123
|
-
},
|
|
122
|
+
V(l[0]);
|
|
123
|
+
}, U = () => {
|
|
124
124
|
var a;
|
|
125
|
-
if (
|
|
125
|
+
if (s != null && s.disableKeepAlive || (a = i == null ? void 0 : i.meta) != null && a.ignoreCache)
|
|
126
126
|
return;
|
|
127
|
-
const e = new Set(
|
|
128
|
-
|
|
127
|
+
const e = new Set(S.value);
|
|
128
|
+
d.value.forEach((t) => {
|
|
129
129
|
t.name && e.add(t.name);
|
|
130
|
-
}),
|
|
131
|
-
},
|
|
132
|
-
const a = new Set(
|
|
130
|
+
}), S.value = Array.from(e.values());
|
|
131
|
+
}, V = (e) => {
|
|
132
|
+
const a = new Set(S.value);
|
|
133
133
|
e.parentNames.forEach((t) => {
|
|
134
134
|
a.delete(t);
|
|
135
135
|
}), h.value.forEach((t) => {
|
|
136
136
|
t.parentNames.forEach((l) => {
|
|
137
|
-
const
|
|
138
|
-
|
|
137
|
+
const n = K.value[l];
|
|
138
|
+
n && (n != null && n.ignoreCache || a.add(n.name));
|
|
139
139
|
});
|
|
140
|
-
}),
|
|
140
|
+
}), S.value = Array.from(a.values());
|
|
141
141
|
};
|
|
142
142
|
return E(() => g.value, () => {
|
|
143
143
|
const e = {}, a = (t) => {
|
|
@@ -145,46 +145,52 @@ const ne = (c) => {
|
|
|
145
145
|
l.children && l.children.length > 0 && a(l.children), delete l.children, e[l.name] = l;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
-
a(JSON.parse(JSON.stringify(g.value))),
|
|
149
|
-
}, { immediate: !0 }), E(() => [
|
|
148
|
+
a(JSON.parse(JSON.stringify(g.value))), K.value = e;
|
|
149
|
+
}, { immediate: !0 }), E(() => [s.layout, g.value], () => {
|
|
150
150
|
var e, a, t;
|
|
151
|
-
if (
|
|
152
|
-
|
|
153
|
-
else if (
|
|
154
|
-
const l = (t = g.value) == null ? void 0 : t.filter((
|
|
155
|
-
(l == null ? void 0 : l.length) === 0 ?
|
|
151
|
+
if (C.value = [], M.value = [], y.value = [...((e = s.menuProps) == null ? void 0 : e.defaultOpenKeys) || [], ...y.value], p.value = [...((a = s.menuProps) == null ? void 0 : a.defaultOpenKeys) || [], ...p.value], s.layout === k.side)
|
|
152
|
+
M.value = g.value;
|
|
153
|
+
else if (s.layout === k.mix) {
|
|
154
|
+
const l = (t = g.value) == null ? void 0 : t.filter((n) => n.topMenu);
|
|
155
|
+
(l == null ? void 0 : l.length) === 0 ? M.value = g.value : C.value = l;
|
|
156
|
+
}
|
|
157
|
+
if (s != null && s.cacheTabs) {
|
|
158
|
+
const l = JSON.parse(sessionStorage.getItem(f) || "[]") || [];
|
|
159
|
+
l.forEach((n) => n.active = !1), h.value = l, sessionStorage.removeItem(f);
|
|
156
160
|
}
|
|
157
|
-
}, { immediate: !0 }), E(() => [
|
|
158
|
-
var t, l,
|
|
159
|
-
const e =
|
|
160
|
-
|
|
161
|
-
const a =
|
|
162
|
-
if (a.length > 0 &&
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
const w =
|
|
166
|
-
w && (w.topMenu ?
|
|
167
|
-
}),
|
|
161
|
+
}, { immediate: !0 }), E(() => [i == null ? void 0 : i.name, i == null ? void 0 : i.fullPath], () => {
|
|
162
|
+
var t, l, n;
|
|
163
|
+
const e = i == null ? void 0 : i.name;
|
|
164
|
+
c.value = K.value[e], q();
|
|
165
|
+
const a = d.value.filter((u) => u.topMenu);
|
|
166
|
+
if (a.length > 0 && C.value.length > 0 && (M.value = ((t = a[a.length - 1]) == null ? void 0 : t.children) || []), b.value = c != null && c.value ? [...a.map((u) => u.name), ...((l = c.value) == null ? void 0 : l.activatedKeys) || []] : [], P.value = c != null && c.value ? [c.value.name, ...((n = c.value) == null ? void 0 : n.activatedKeys) || []] : [], c.value) {
|
|
167
|
+
const u = d.value.filter((r, w) => w < d.value.length - 1), T = u.filter((r) => r.topMenu).map((r) => r.name), O = u.filter((r) => !r.topMenu).map((r) => r.name);
|
|
168
|
+
c.value.activatedKeys && c.value.activatedKeys.length > 0 && c.value.activatedKeys.forEach((r) => {
|
|
169
|
+
const w = K.value[r];
|
|
170
|
+
w && (w.topMenu ? T.push(r) : O.push(r));
|
|
171
|
+
}), y.value = Array.from(/* @__PURE__ */ new Set([...y.value, ...T])), p.value = Array.from(/* @__PURE__ */ new Set([...p.value, ...O]));
|
|
168
172
|
}
|
|
169
|
-
|
|
170
|
-
}, { immediate: !0 }), {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
z(), s.hideTabs || F(), U();
|
|
174
|
+
}, { immediate: !0 }), E(() => h.value, () => {
|
|
175
|
+
s != null && s.cacheTabs && sessionStorage.setItem(f, JSON.stringify(h.value || []));
|
|
176
|
+
}, { deep: !0 }), {
|
|
177
|
+
topMenuItems: C,
|
|
178
|
+
siderMenuItems: M,
|
|
179
|
+
topMenuSelectedKeys: b,
|
|
174
180
|
siderMenuSelectedKeys: P,
|
|
175
|
-
topMenuOpenKeys:
|
|
176
|
-
siderMenuOpenKeys:
|
|
177
|
-
activeMenuItem:
|
|
178
|
-
menuItemMap:
|
|
179
|
-
breadcrumbItems:
|
|
181
|
+
topMenuOpenKeys: y,
|
|
182
|
+
siderMenuOpenKeys: p,
|
|
183
|
+
activeMenuItem: c,
|
|
184
|
+
menuItemMap: K,
|
|
185
|
+
breadcrumbItems: x,
|
|
180
186
|
tabs: h,
|
|
181
|
-
keepAliveInclude:
|
|
182
|
-
onProMenuItemClick:
|
|
183
|
-
onProMenuOpenKeysChange:
|
|
184
|
-
onTabClick:
|
|
185
|
-
onTabDelete:
|
|
187
|
+
keepAliveInclude: S,
|
|
188
|
+
onProMenuItemClick: H,
|
|
189
|
+
onProMenuOpenKeysChange: j,
|
|
190
|
+
onTabClick: G,
|
|
191
|
+
onTabDelete: Q
|
|
186
192
|
};
|
|
187
193
|
};
|
|
188
194
|
export {
|
|
189
|
-
|
|
195
|
+
ie as useHooks
|
|
190
196
|
};
|
package/es/pro-layout/index.d.ts
CHANGED
|
@@ -14,16 +14,17 @@ declare const ProLayout: {
|
|
|
14
14
|
tabsHeaderPadding: boolean;
|
|
15
15
|
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
16
16
|
hideHeader: boolean;
|
|
17
|
-
|
|
18
|
-
headerHeight: number;
|
|
17
|
+
siderCollapsed: boolean;
|
|
19
18
|
logo: string;
|
|
19
|
+
headerHeight: number;
|
|
20
20
|
siderWidth: number;
|
|
21
|
+
hiderSider: boolean;
|
|
21
22
|
siderBreakpoint: "xxl" | "xl" | "lg" | "md" | "sm" | "xs";
|
|
22
|
-
siderCollapsed: boolean;
|
|
23
23
|
menuItems: import('..').IProMenuItem[];
|
|
24
24
|
footerTitle: string;
|
|
25
25
|
hideFooter: boolean;
|
|
26
26
|
hideTabs: boolean;
|
|
27
|
+
cacheTabs: boolean;
|
|
27
28
|
disableKeepAlive: boolean;
|
|
28
29
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
29
30
|
P: {};
|
|
@@ -43,16 +44,17 @@ declare const ProLayout: {
|
|
|
43
44
|
tabsHeaderPadding: boolean;
|
|
44
45
|
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
45
46
|
hideHeader: boolean;
|
|
46
|
-
|
|
47
|
-
headerHeight: number;
|
|
47
|
+
siderCollapsed: boolean;
|
|
48
48
|
logo: string;
|
|
49
|
+
headerHeight: number;
|
|
49
50
|
siderWidth: number;
|
|
51
|
+
hiderSider: boolean;
|
|
50
52
|
siderBreakpoint: "xxl" | "xl" | "lg" | "md" | "sm" | "xs";
|
|
51
|
-
siderCollapsed: boolean;
|
|
52
53
|
menuItems: import('..').IProMenuItem[];
|
|
53
54
|
footerTitle: string;
|
|
54
55
|
hideFooter: boolean;
|
|
55
56
|
hideTabs: boolean;
|
|
57
|
+
cacheTabs: boolean;
|
|
56
58
|
disableKeepAlive: boolean;
|
|
57
59
|
}>;
|
|
58
60
|
__isFragment?: never;
|
|
@@ -72,16 +74,17 @@ declare const ProLayout: {
|
|
|
72
74
|
tabsHeaderPadding: boolean;
|
|
73
75
|
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
74
76
|
hideHeader: boolean;
|
|
75
|
-
|
|
76
|
-
headerHeight: number;
|
|
77
|
+
siderCollapsed: boolean;
|
|
77
78
|
logo: string;
|
|
79
|
+
headerHeight: number;
|
|
78
80
|
siderWidth: number;
|
|
81
|
+
hiderSider: boolean;
|
|
79
82
|
siderBreakpoint: "xxl" | "xl" | "lg" | "md" | "sm" | "xs";
|
|
80
|
-
siderCollapsed: boolean;
|
|
81
83
|
menuItems: import('..').IProMenuItem[];
|
|
82
84
|
footerTitle: string;
|
|
83
85
|
hideFooter: boolean;
|
|
84
86
|
hideTabs: boolean;
|
|
87
|
+
cacheTabs: boolean;
|
|
85
88
|
disableKeepAlive: boolean;
|
|
86
89
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
87
90
|
$slots: {
|
|
@@ -98,6 +101,88 @@ declare const ProLayout: {
|
|
|
98
101
|
}) & {
|
|
99
102
|
install: (app: App) => void;
|
|
100
103
|
};
|
|
104
|
+
declare const ProLayoutHeader: {
|
|
105
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./pro-layout-header.vue').IProLayoutHeaderProps> & Readonly<{
|
|
106
|
+
onMenuItemClick?: ((type: import('./enum').ProLayoutMenuType, item: import('..').IProMenuItem) => any) | undefined;
|
|
107
|
+
onOpenKeysChange?: ((type: import('./enum').ProLayoutMenuType, keys: string[]) => any) | undefined;
|
|
108
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
109
|
+
menuItemClick: (type: import('./enum').ProLayoutMenuType, item: import('..').IProMenuItem) => any;
|
|
110
|
+
openKeysChange: (type: import('./enum').ProLayoutMenuType, keys: string[]) => any;
|
|
111
|
+
}, import('vue').PublicProps, {
|
|
112
|
+
layout: import('./enum').ProLayoutMode;
|
|
113
|
+
prefixClsName: string;
|
|
114
|
+
title: string;
|
|
115
|
+
menuProps: Record<string, unknown>;
|
|
116
|
+
hideHeader: boolean;
|
|
117
|
+
siderCollapsed: boolean;
|
|
118
|
+
logo: string;
|
|
119
|
+
topMenuItems: import('..').IProMenuItem[];
|
|
120
|
+
topMenuSelectedKeys: string[];
|
|
121
|
+
topMenuOpenKeys: string[];
|
|
122
|
+
headerHeight: number;
|
|
123
|
+
siderWidth: number;
|
|
124
|
+
siderCollapsedWidth: number;
|
|
125
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
126
|
+
P: {};
|
|
127
|
+
B: {};
|
|
128
|
+
D: {};
|
|
129
|
+
C: {};
|
|
130
|
+
M: {};
|
|
131
|
+
Defaults: {};
|
|
132
|
+
}, Readonly<import('./pro-layout-header.vue').IProLayoutHeaderProps> & Readonly<{
|
|
133
|
+
onMenuItemClick?: ((type: import('./enum').ProLayoutMenuType, item: import('..').IProMenuItem) => any) | undefined;
|
|
134
|
+
onOpenKeysChange?: ((type: import('./enum').ProLayoutMenuType, keys: string[]) => any) | undefined;
|
|
135
|
+
}>, {}, {}, {}, {}, {
|
|
136
|
+
layout: import('./enum').ProLayoutMode;
|
|
137
|
+
prefixClsName: string;
|
|
138
|
+
title: string;
|
|
139
|
+
menuProps: Record<string, unknown>;
|
|
140
|
+
hideHeader: boolean;
|
|
141
|
+
siderCollapsed: boolean;
|
|
142
|
+
logo: string;
|
|
143
|
+
topMenuItems: import('..').IProMenuItem[];
|
|
144
|
+
topMenuSelectedKeys: string[];
|
|
145
|
+
topMenuOpenKeys: string[];
|
|
146
|
+
headerHeight: number;
|
|
147
|
+
siderWidth: number;
|
|
148
|
+
siderCollapsedWidth: number;
|
|
149
|
+
}>;
|
|
150
|
+
__isFragment?: never;
|
|
151
|
+
__isTeleport?: never;
|
|
152
|
+
__isSuspense?: never;
|
|
153
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./pro-layout-header.vue').IProLayoutHeaderProps> & Readonly<{
|
|
154
|
+
onMenuItemClick?: ((type: import('./enum').ProLayoutMenuType, item: import('..').IProMenuItem) => any) | undefined;
|
|
155
|
+
onOpenKeysChange?: ((type: import('./enum').ProLayoutMenuType, keys: string[]) => any) | undefined;
|
|
156
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
157
|
+
menuItemClick: (type: import('./enum').ProLayoutMenuType, item: import('..').IProMenuItem) => any;
|
|
158
|
+
openKeysChange: (type: import('./enum').ProLayoutMenuType, keys: string[]) => any;
|
|
159
|
+
}, string, {
|
|
160
|
+
layout: import('./enum').ProLayoutMode;
|
|
161
|
+
prefixClsName: string;
|
|
162
|
+
title: string;
|
|
163
|
+
menuProps: Record<string, unknown>;
|
|
164
|
+
hideHeader: boolean;
|
|
165
|
+
siderCollapsed: boolean;
|
|
166
|
+
logo: string;
|
|
167
|
+
topMenuItems: import('..').IProMenuItem[];
|
|
168
|
+
topMenuSelectedKeys: string[];
|
|
169
|
+
topMenuOpenKeys: string[];
|
|
170
|
+
headerHeight: number;
|
|
171
|
+
siderWidth: number;
|
|
172
|
+
siderCollapsedWidth: number;
|
|
173
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
174
|
+
$slots: {
|
|
175
|
+
'header-left'?(_: {}): any;
|
|
176
|
+
'header-left-logo-img'?(_: {}): any;
|
|
177
|
+
'header-left-logo-title'?(_: {}): any;
|
|
178
|
+
'header-center-left'?(_: {}): any;
|
|
179
|
+
'header-center-center'?(_: {}): any;
|
|
180
|
+
'header-center-right'?(_: {}): any;
|
|
181
|
+
'header-right'?(_: {}): any;
|
|
182
|
+
};
|
|
183
|
+
}) & {
|
|
184
|
+
install: (app: App) => void;
|
|
185
|
+
};
|
|
101
186
|
/** 导出组件 */
|
|
102
|
-
export { ProLayout };
|
|
187
|
+
export { ProLayout, ProLayoutHeader };
|
|
103
188
|
export default ProLayout;
|
package/es/pro-layout/index.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from "./pro-layout.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import a from "./pro-layout-header.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const i = Object.assign(t, {
|
|
6
|
+
install: (o) => {
|
|
7
|
+
o.component("KbProLayout", t);
|
|
8
|
+
}
|
|
9
|
+
}), m = Object.assign(a, {
|
|
10
|
+
install: (o) => {
|
|
11
|
+
o.component("KbProLayoutHeader", a);
|
|
6
12
|
}
|
|
7
13
|
});
|
|
8
14
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
i as ProLayout,
|
|
16
|
+
m as ProLayoutHeader,
|
|
17
|
+
i as default
|
|
11
18
|
};
|