@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.
@@ -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 f } from "./pro-menu/index.js";
7
- import { ProPageContainer as P } from "./pro-page-container/index.js";
8
- import { ProReuseTabs as u } from "./pro-reuse-tabs/index.js";
9
- import { ProImageUpload as a } from "./pro-image-upload/index.js";
10
- import { ProDatesPicker as n } from "./pro-dates-picker/index.js";
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 d } from "./pro-table/index.js";
13
- import { ProTextarea as g } from "./pro-textarea/index.js";
14
- import { ProFooterBar as x } from "./pro-footer-bar/index.js";
15
- import { ProFormGroup as p } from "./pro-form-group/index.js";
16
- import { ProCalendar as b } from "./pro-calendar/index.js";
17
- import { ProLoader as c } from "./pro-loader/index.js";
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 M } from "./global-props.js";
20
- import { splitStringWithCommaAndSpace as W } from "./utils.js";
21
- import { EImageUploadInnerBeforeUploadStep as z } from "./pro-image-upload/types.js";
22
- import { defaultImageUploadOptions as N } from "./pro-image-upload/constant.js";
23
- import { EProLoginType as X } from "./pro-login/enum.js";
24
- import { EFindPasswordSteps as Z } from "./pro-find-password/enum.js";
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(x), o.use(f), o.use(P), o.use(u), o.use(a), o.use(n), o.use(l), o.use(g), o.use(d), o.use(p), o.use(b), o.use(c);
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
- Z as EFindPasswordSteps,
32
- z as EImageUploadInnerBeforeUploadStep,
33
- X as EProLoginType,
34
- b as ProCalendar,
31
+ _ as EFindPasswordSteps,
32
+ J as EImageUploadInnerBeforeUploadStep,
33
+ Y as EProLoginType,
34
+ p as ProCalendar,
35
35
  l as ProDateRangePicker,
36
- n as ProDatesPicker,
36
+ d as ProDatesPicker,
37
37
  m as ProFindPassword,
38
- x as ProFooterBar,
39
- p as ProFormGroup,
40
- a as ProImageUpload,
38
+ b as ProFooterBar,
39
+ c as ProFormGroup,
40
+ n as ProImageUpload,
41
41
  s as ProKeepAliveRouterView,
42
42
  i as ProLayout,
43
- c as ProLoader,
43
+ f as ProLayoutHeader,
44
+ L as ProLoader,
44
45
  e as ProLogin,
45
- f as ProMenu,
46
- P as ProPageContainer,
46
+ P as ProMenu,
47
+ u as ProPageContainer,
47
48
  t as ProPageHeader,
48
- u as ProReuseTabs,
49
- d as ProTable,
50
- g as ProTextarea,
49
+ a as ProReuseTabs,
50
+ g as ProTable,
51
+ x as ProTextarea,
51
52
  v as default,
52
- N as defaultImageUploadOptions,
53
+ Q as defaultImageUploadOptions,
53
54
  F as globalProps,
54
- M as setGlobalProps,
55
- W as splitStringWithCommaAndSpace
55
+ V as setGlobalProps,
56
+ q as splitStringWithCommaAndSpace
56
57
  };
@@ -1,195 +1,197 @@
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 = (c, s, i) => s in c ? V(c, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[s] = i, w = (c, s) => {
6
- for (var i in s || (s = {}))
7
- Z.call(s, i) && J(c, i, s[i]);
8
- if (x)
9
- for (var i of x(s))
10
- $.call(s, i) && J(c, i, s[i]);
11
- return c;
12
- }, O = (c, s) => X(c, Y(s));
13
- var L = (c, s, i) => new Promise((K, g) => {
14
- var p = (r) => {
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
- u(i.next(r));
16
+ y(c.next(u));
17
17
  } catch (d) {
18
- g(d);
18
+ T(d);
19
19
  }
20
- }, M = (r) => {
20
+ }, b = (u) => {
21
21
  try {
22
- u(i.throw(r));
22
+ y(c.throw(u));
23
23
  } catch (d) {
24
- g(d);
24
+ T(d);
25
25
  }
26
- }, u = (r) => r.done ? K(r.value) : Promise.resolve(r.value).then(p, M);
27
- u((i = i.apply(c, s)).next());
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 _, watch as A } from "vue";
30
- import { useRoute as I, useRouter as m } from "vue-router";
31
- import { ProLayoutMode as E, ProLayoutMenuType as R } from "./enum.js";
32
- const te = (c) => {
33
- const s = I(), i = m(), K = v([]), g = v([]), p = v([]), M = v([]), u = v(), r = v([]), d = v({}), k = v([]), f = v([]), P = v([]), T = v([]), y = v([]), b = _(() => {
34
- const e = [...c.menuItems], a = (t) => {
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) => O(w({}, n), { topMenu: l == null ? void 0 : l.topChildrenMenu }));
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((o) => o.topMenu !== void 0);
41
- n && (l.topChildrenMenu = n.topMenu, l.children = l.children.map((o) => O(w({}, o), { topMenu: n.topMenu })));
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 c.layout === E.mix && a(e), e;
48
- }), W = (e) => {
47
+ return i.layout === k.mix && a(e), e;
48
+ }), L = (e) => {
49
49
  var a;
50
- if (K.value = [e.name], !(e != null && e.children) || ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) === 0)
51
- y.value = [], i == null || i.push({ path: e.path });
52
- else if (y.value = e.children, e != null && e.redirect)
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
- i == null || i.push({ path: e.redirect });
54
+ o == null || o.push({ path: e.redirect });
55
55
  else if (typeof e.redirect == "function") {
56
- const t = e.redirect(s);
57
- i == null || i.push(t);
56
+ const t = e.redirect(c);
57
+ o == null || o.push(t);
58
58
  } else
59
- i == null || i.push(e.redirect);
59
+ o == null || o.push(e.redirect);
60
60
  }, B = (e) => {
61
- e != null && e.name ? i == null || i.push({ name: e.name }) : i == null || i.push({ path: e.path }), g.value = [e.name];
62
- }, D = (e, a) => L(null, null, function* () {
63
- if (a != null && a.path && !(c != null && c.onMenuItemClick && !(yield c.onMenuItemClick(a)))) {
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 === R.top ? W(a) : B(a);
68
+ e === D.top ? L(a) : B(a);
69
69
  }
70
- }), H = (e, a) => {
71
- e === R.top ? p.value = a : M.value = a;
72
- }, j = () => {
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 o = t[n];
77
- if (o.name === ((l = u == null ? void 0 : u.value) == null ? void 0 : l.name) || o.children && o.children.length > 0 && a(o.children))
78
- return e.unshift(o), !0;
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(b.value))), r.value = e;
83
- }, q = () => {
82
+ a(JSON.parse(JSON.stringify(p.value))), d.value = e;
83
+ }, z = () => {
84
84
  var a, t, l;
85
- const e = (a = r.value) == null ? void 0 : a.map((n) => ({ path: n == null ? void 0 : n.path, label: n == null ? void 0 : n.title }));
86
- k.value = (t = u.value) != null && t.breadcrumbs ? (l = u.value) == null ? void 0 : l.breadcrumbs : e.length !== 0 ? e : [];
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 z() {
88
+ function F() {
89
+ var M, O;
89
90
  if (!u.value || u.value.noAffix) {
90
- f.value.forEach((n) => {
91
- n.active = !1;
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
- let t = -1;
97
- f.value.forEach((n, o) => {
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: r.value.map((n) => n.name),
103
- title: a != null ? a : e,
104
- fullPath: s.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
- if (~t) {
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 F = (e) => {
116
- const a = f.value.findIndex((l) => l.name === e), t = f.value[a];
117
- i.push(t.fullPath);
118
- }, G = (e) => {
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 (f.value.forEach((n, o) => {
121
- n.name === e && (t = o), n.active && (a = o);
122
- }), a === t) {
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 = f.value[t + 1] : n = f.value[t - 1], n.active = !0, i.push(n.fullPath);
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 = f.value.splice(t, 1);
127
- U(l[0]);
128
- }, Q = () => {
121
+ const l = h.value.splice(t, 1);
122
+ V(l[0]);
123
+ }, U = () => {
129
124
  var a;
130
- if (c != null && c.disableKeepAlive || (a = s == null ? void 0 : s.meta) != null && a.ignoreCache)
125
+ if (i != null && i.disableKeepAlive || (a = c == null ? void 0 : c.meta) != null && a.ignoreCache)
131
126
  return;
132
- const e = new Set(P.value);
133
- r.value.forEach((t) => {
127
+ const e = new Set(S.value);
128
+ d.value.forEach((t) => {
134
129
  t.name && e.add(t.name);
135
- }), P.value = Array.from(e.values());
136
- }, U = (e) => {
137
- const a = new Set(P.value);
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
- }), f.value.forEach((t) => {
135
+ }), h.value.forEach((t) => {
141
136
  t.parentNames.forEach((l) => {
142
- const n = d.value[l];
137
+ const n = K.value[l];
143
138
  n && (n != null && n.ignoreCache || a.add(n.name));
144
139
  });
145
- }), P.value = Array.from(a.values());
140
+ }), S.value = Array.from(a.values());
146
141
  };
147
- return A(() => b.value, () => {
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(b.value))), d.value = e;
154
- }, { immediate: !0 }), A(() => [c.layout, b.value], () => {
155
- var e, a, t;
156
- if (T.value = [], y.value = [], p.value = [...((e = c.menuProps) == null ? void 0 : e.defaultOpenKeys) || [], ...p.value], M.value = [...((a = c.menuProps) == null ? void 0 : a.defaultOpenKeys) || [], ...M.value], c.layout === E.side)
157
- y.value = b.value;
158
- else if (c.layout === E.mix) {
159
- const l = (t = b.value) == null ? void 0 : t.filter((n) => n.topMenu);
160
- (l == null ? void 0 : l.length) === 0 ? y.value = b.value : T.value = l;
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 }), A(() => s == null ? void 0 : s.name, () => {
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 = s == null ? void 0 : s.name;
165
- u.value = d.value[e], j();
166
- const a = r.value.filter((o) => o.topMenu);
167
- if (a.length > 0 && T.value.length > 0 && (y.value = ((t = a[a.length - 1]) == null ? void 0 : t.children) || []), K.value = u != null && u.value ? [...a.map((o) => o.name), ...((l = u.value) == null ? void 0 : l.activatedKeys) || []] : [], g.value = u != null && u.value ? [u.value.name, ...((n = u.value) == null ? void 0 : n.activatedKeys) || []] : [], u.value) {
168
- const o = r.value.filter((h, C) => C < r.value.length - 1), S = o.filter((h) => h.topMenu).map((h) => h.name), N = o.filter((h) => !h.topMenu).map((h) => h.name);
169
- u.value.activatedKeys && u.value.activatedKeys.length > 0 && u.value.activatedKeys.forEach((h) => {
170
- const C = d.value[h];
171
- C && (C.topMenu ? S.push(h) : N.push(h));
172
- }), p.value = Array.from(/* @__PURE__ */ new Set([...p.value, ...S])), M.value = Array.from(/* @__PURE__ */ new Set([...M.value, ...N]));
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
- q(), c.hideTabs || z(), Q();
175
- }, { immediate: !0 }), {
176
- topMenuItems: T,
177
- siderMenuItems: y,
178
- topMenuSelectedKeys: K,
179
- siderMenuSelectedKeys: g,
180
- topMenuOpenKeys: p,
181
- siderMenuOpenKeys: M,
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: d,
184
- breadcrumbItems: k,
185
- tabs: f,
186
- keepAliveInclude: P,
187
- onProMenuItemClick: D,
188
- onProMenuOpenKeysChange: H,
189
- onTabClick: F,
190
- onTabDelete: G
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
- te as useHooks
196
+ ie as useHooks
195
197
  };
@@ -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
- hiderSider: boolean;
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
- hiderSider: boolean;
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
- hiderSider: boolean;
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;
@@ -1,11 +1,18 @@
1
- import o from "./pro-layout.vue.js";
1
+ import t from "./pro-layout.vue.js";
2
2
  /* empty css */
3
- const r = Object.assign(o, {
4
- install: (t) => {
5
- t.component("KbProLayout", o);
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
- r as ProLayout,
10
- r as default
15
+ i as ProLayout,
16
+ m as ProLayoutHeader,
17
+ i as default
11
18
  };