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