@keyblade/pro-components 1.4.5 → 1.4.6
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.js +22 -27
- package/es/pro-breadcrumb/index.js +9 -12
- package/es/pro-breadcrumb/pro-breadcrumb.vue.js +45 -58
- package/es/pro-breadcrumb/pro-breadcrumb.vue2.js +2 -2
- package/es/pro-breadcrumb/pro-breadcrumb.vue3.js +2 -2
- package/es/pro-keep-alive-router-view/index.js +7 -8
- package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.js +18 -28
- package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue2.js +2 -2
- package/es/pro-layout/hooks.js +87 -162
- package/es/pro-layout/index.js +12 -23
- package/es/pro-layout/pro-layout.vue.js +128 -155
- package/es/pro-layout/pro-layout.vue2.js +2 -2
- package/es/pro-layout/pro-layout.vue3.js +2 -2
- package/es/pro-menu/index.js +8 -10
- package/es/pro-menu/pro-menu-item.vue.js +56 -71
- package/es/pro-menu/pro-menu-item.vue2.js +2 -2
- package/es/pro-menu/pro-menu-item.vue3.js +2 -2
- package/es/pro-menu/pro-menu.vue.js +31 -41
- package/es/pro-menu/pro-menu.vue2.js +2 -2
- package/es/pro-page-container/index.js +8 -10
- package/es/pro-page-container/pro-page-container.vue.js +27 -28
- package/es/pro-page-container/pro-page-container.vue2.js +2 -2
- package/es/pro-page-container/pro-page-container.vue3.js +2 -2
- package/es/pro-reuse-tabs/index.js +8 -10
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.js +28 -35
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue2.js +2 -2
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue3.js +2 -2
- package/es/style.css +1 -121
- package/package.json +3 -2
package/es/index.js
CHANGED
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
import { ProBreadcrumb } from "./pro-breadcrumb/index.js";
|
|
2
|
-
import { default as
|
|
3
|
-
import { ProKeepAliveRouterView } from "./pro-keep-alive-router-view/index.js";
|
|
4
|
-
import { default as
|
|
5
|
-
import { ProLayout } from "./pro-layout/index.js";
|
|
6
|
-
import { default as
|
|
7
|
-
import { ProMenu } from "./pro-menu/index.js";
|
|
8
|
-
import { default as
|
|
9
|
-
import { ProPageContainer } from "./pro-page-container/index.js";
|
|
10
|
-
import { default as
|
|
11
|
-
import { ProReuseTabs } from "./pro-reuse-tabs/index.js";
|
|
12
|
-
import { default as
|
|
13
|
-
const
|
|
14
|
-
install(
|
|
15
|
-
|
|
16
|
-
app.use(ProKeepAliveRouterView);
|
|
17
|
-
app.use(ProLayout);
|
|
18
|
-
app.use(ProMenu);
|
|
19
|
-
app.use(ProPageContainer);
|
|
20
|
-
app.use(ProReuseTabs);
|
|
1
|
+
import { ProBreadcrumb as o } from "./pro-breadcrumb/index.js";
|
|
2
|
+
import { default as b } from "./pro-breadcrumb/index.js";
|
|
3
|
+
import { ProKeepAliveRouterView as e } from "./pro-keep-alive-router-view/index.js";
|
|
4
|
+
import { default as c } from "./pro-keep-alive-router-view/index.js";
|
|
5
|
+
import { ProLayout as t } from "./pro-layout/index.js";
|
|
6
|
+
import { default as v } from "./pro-layout/index.js";
|
|
7
|
+
import { ProMenu as u } from "./pro-menu/index.js";
|
|
8
|
+
import { default as y } from "./pro-menu/index.js";
|
|
9
|
+
import { ProPageContainer as a } from "./pro-page-container/index.js";
|
|
10
|
+
import { default as B } from "./pro-page-container/index.js";
|
|
11
|
+
import { ProReuseTabs as m } from "./pro-reuse-tabs/index.js";
|
|
12
|
+
import { default as K } from "./pro-reuse-tabs/index.js";
|
|
13
|
+
const n = {
|
|
14
|
+
install(r) {
|
|
15
|
+
r.use(o), r.use(e), r.use(t), r.use(u), r.use(a), r.use(m);
|
|
21
16
|
}
|
|
22
17
|
};
|
|
23
18
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
b as ProBreadcrumb,
|
|
20
|
+
c as ProKeepAliveRouterView,
|
|
21
|
+
v as ProLayout,
|
|
22
|
+
y as ProMenu,
|
|
23
|
+
B as ProPageContainer,
|
|
24
|
+
K as ProReuseTabs,
|
|
25
|
+
n as default
|
|
31
26
|
};
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./pro-breadcrumb.vue.js";
|
|
2
2
|
import "./pro-breadcrumb.vue2.js";
|
|
3
|
-
import { Breadcrumb } from "@arco-design/web-vue";
|
|
4
|
-
import { IconApps } from "@arco-design/web-vue/es/icon";
|
|
5
|
-
const
|
|
6
|
-
install: (
|
|
7
|
-
|
|
8
|
-
app.use(IconApps);
|
|
9
|
-
app.component("KbProBreadcrumb", _sfc_main);
|
|
3
|
+
import { Breadcrumb as m } from "@arco-design/web-vue";
|
|
4
|
+
import { IconApps as t } from "@arco-design/web-vue/es/icon";
|
|
5
|
+
const c = Object.assign(o, {
|
|
6
|
+
install: (r) => {
|
|
7
|
+
r.use(m), r.use(t), r.component("KbProBreadcrumb", o);
|
|
10
8
|
}
|
|
11
|
-
});
|
|
12
|
-
const ProBreadcrumb$1 = ProBreadcrumb;
|
|
9
|
+
}), i = c;
|
|
13
10
|
export {
|
|
14
|
-
ProBreadcrumb,
|
|
15
|
-
|
|
11
|
+
c as ProBreadcrumb,
|
|
12
|
+
i as default
|
|
16
13
|
};
|
|
@@ -1,115 +1,102 @@
|
|
|
1
|
-
import { defineComponent, inject, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
const
|
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1
|
+
import { defineComponent as k, inject as v, computed as x, resolveComponent as s, openBlock as t, createElementBlock as _, normalizeClass as u, createVNode as B, withCtx as r, createBlock as l, resolveDynamicComponent as C, createCommentVNode as c, Fragment as q, renderList as T, createTextVNode as d, toDisplayString as y } from "vue";
|
|
2
|
+
const i = "keyblade-pro-breadcrumb", N = /* @__PURE__ */ k({
|
|
4
3
|
__name: "pro-breadcrumb",
|
|
5
4
|
props: {
|
|
6
5
|
/** 是否显示图标 */
|
|
7
6
|
showIcon: {
|
|
8
7
|
type: Boolean,
|
|
9
|
-
required:
|
|
10
|
-
default:
|
|
8
|
+
required: !1,
|
|
9
|
+
default: !0
|
|
11
10
|
},
|
|
12
11
|
/** 图标类型 */
|
|
13
12
|
icon: {
|
|
14
13
|
type: String,
|
|
15
|
-
required:
|
|
14
|
+
required: !1,
|
|
16
15
|
default: "icon-apps"
|
|
17
16
|
},
|
|
18
17
|
/** 面包屑项目 */
|
|
19
18
|
items: {
|
|
20
19
|
type: Array,
|
|
21
|
-
required:
|
|
20
|
+
required: !1,
|
|
22
21
|
default: () => []
|
|
23
22
|
},
|
|
24
23
|
/** 是否显示标题 */
|
|
25
24
|
showTitle: {
|
|
26
25
|
type: Boolean,
|
|
27
|
-
required:
|
|
28
|
-
default:
|
|
26
|
+
required: !1,
|
|
27
|
+
default: !0
|
|
29
28
|
},
|
|
30
29
|
/** 标题,不传默认展示面包屑标题最后一项 */
|
|
31
30
|
title: {
|
|
32
31
|
type: String,
|
|
33
|
-
required:
|
|
32
|
+
required: !1,
|
|
34
33
|
default: ""
|
|
35
34
|
},
|
|
36
35
|
/** 副标题,不传默认不展示 */
|
|
37
36
|
subTitle: {
|
|
38
37
|
type: String,
|
|
39
|
-
required:
|
|
38
|
+
required: !1,
|
|
40
39
|
default: ""
|
|
41
40
|
}
|
|
42
41
|
},
|
|
43
|
-
setup(
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return proBreadcrumbItems.value;
|
|
49
|
-
}
|
|
50
|
-
return props.items || [];
|
|
51
|
-
});
|
|
52
|
-
return (_ctx, _cache) => {
|
|
53
|
-
const _component_a_breadcrumb_item = resolveComponent("a-breadcrumb-item");
|
|
54
|
-
const _component_a_breadcrumb = resolveComponent("a-breadcrumb");
|
|
55
|
-
const _component_a_typography_title = resolveComponent("a-typography-title");
|
|
56
|
-
const _component_a_typography_text = resolveComponent("a-typography-text");
|
|
57
|
-
return breadcrumbItems.value ? (openBlock(), createElementBlock("div", {
|
|
42
|
+
setup(m) {
|
|
43
|
+
const e = m, b = v("ProBreadcrumbItems", []), n = x(() => e.items instanceof Array && e.items.length === 0 || !e.items ? b.value : e.items || []);
|
|
44
|
+
return (w, I) => {
|
|
45
|
+
const f = s("a-breadcrumb-item"), p = s("a-breadcrumb"), h = s("a-typography-title"), g = s("a-typography-text");
|
|
46
|
+
return n.value ? (t(), _("div", {
|
|
58
47
|
key: 0,
|
|
59
|
-
class:
|
|
48
|
+
class: u(i)
|
|
60
49
|
}, [
|
|
61
|
-
|
|
62
|
-
class:
|
|
50
|
+
B(p, {
|
|
51
|
+
class: u(`${i}-items`)
|
|
63
52
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
53
|
+
default: r(() => [
|
|
54
|
+
m.showIcon ? (t(), l(f, {
|
|
66
55
|
key: 0,
|
|
67
|
-
style: {
|
|
56
|
+
style: { cursor: "text" }
|
|
68
57
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
(
|
|
58
|
+
default: r(() => [
|
|
59
|
+
(t(), l(C(m.icon)))
|
|
71
60
|
]),
|
|
72
61
|
_: 1
|
|
73
|
-
})) :
|
|
74
|
-
(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}, 1024);
|
|
83
|
-
}), 128))
|
|
62
|
+
})) : c("", !0),
|
|
63
|
+
(t(!0), _(q, null, T(n.value, (a, o) => (t(), l(f, {
|
|
64
|
+
key: `${a}-${o}`
|
|
65
|
+
}, {
|
|
66
|
+
default: r(() => [
|
|
67
|
+
d(y(a), 1)
|
|
68
|
+
]),
|
|
69
|
+
_: 2
|
|
70
|
+
}, 1024))), 128))
|
|
84
71
|
]),
|
|
85
72
|
_: 1
|
|
86
73
|
}, 8, ["class"]),
|
|
87
|
-
|
|
74
|
+
e != null && e.showTitle ? (t(), l(h, {
|
|
88
75
|
key: 0,
|
|
89
76
|
heading: 6,
|
|
90
|
-
class:
|
|
77
|
+
class: u(`${i}-title`)
|
|
91
78
|
}, {
|
|
92
|
-
default:
|
|
93
|
-
var
|
|
79
|
+
default: r(() => {
|
|
80
|
+
var a, o;
|
|
94
81
|
return [
|
|
95
|
-
|
|
82
|
+
d(y((e == null ? void 0 : e.title) || ((o = n.value) == null ? void 0 : o[((a = n.value) == null ? void 0 : a.length) - 1])), 1)
|
|
96
83
|
];
|
|
97
84
|
}),
|
|
98
85
|
_: 1
|
|
99
|
-
}, 8, ["class"])) :
|
|
100
|
-
|
|
86
|
+
}, 8, ["class"])) : c("", !0),
|
|
87
|
+
e != null && e.subTitle ? (t(), l(g, {
|
|
101
88
|
key: 1,
|
|
102
|
-
class:
|
|
89
|
+
class: u(`${i}-subtitle`)
|
|
103
90
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
|
|
91
|
+
default: r(() => [
|
|
92
|
+
d(y(e == null ? void 0 : e.subTitle), 1)
|
|
106
93
|
]),
|
|
107
94
|
_: 1
|
|
108
|
-
}, 8, ["class"])) :
|
|
109
|
-
])) :
|
|
95
|
+
}, 8, ["class"])) : c("", !0)
|
|
96
|
+
])) : c("", !0);
|
|
110
97
|
};
|
|
111
98
|
}
|
|
112
99
|
});
|
|
113
100
|
export {
|
|
114
|
-
|
|
101
|
+
N as default
|
|
115
102
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
install: (
|
|
4
|
-
|
|
1
|
+
import e from "./pro-keep-alive-router-view.vue.js";
|
|
2
|
+
const t = Object.assign(e, {
|
|
3
|
+
install: (o) => {
|
|
4
|
+
o.component("KbProKeepAliveRouterView", e);
|
|
5
5
|
}
|
|
6
|
-
});
|
|
7
|
-
const ProKeepAliveRouterView$1 = ProKeepAliveRouterView;
|
|
6
|
+
}), r = t;
|
|
8
7
|
export {
|
|
9
|
-
ProKeepAliveRouterView,
|
|
10
|
-
|
|
8
|
+
t as ProKeepAliveRouterView,
|
|
9
|
+
r as default
|
|
11
10
|
};
|
|
@@ -1,49 +1,39 @@
|
|
|
1
|
-
import { defineComponent, inject, computed, resolveComponent, openBlock, createBlock, withCtx, KeepAlive, resolveDynamicComponent } from "vue";
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as d, inject as v, computed as u, resolveComponent as s, openBlock as l, createBlock as n, withCtx as A, KeepAlive as f, resolveDynamicComponent as k } from "vue";
|
|
2
|
+
const _ = /* @__PURE__ */ d({
|
|
3
3
|
__name: "pro-keep-alive-router-view",
|
|
4
4
|
props: {
|
|
5
5
|
/** 包含 */
|
|
6
6
|
keepAliveInclude: {
|
|
7
7
|
type: Array,
|
|
8
|
-
required:
|
|
8
|
+
required: !1,
|
|
9
9
|
default: () => []
|
|
10
10
|
},
|
|
11
11
|
/** 排除(ProLayout里一般不会用) */
|
|
12
12
|
keepAliveExclude: {
|
|
13
13
|
type: Array,
|
|
14
|
-
required:
|
|
14
|
+
required: !1,
|
|
15
15
|
default: () => []
|
|
16
16
|
},
|
|
17
17
|
/** 最大数(ProLayout里一般不会用) */
|
|
18
18
|
keepAliveMax: {
|
|
19
19
|
type: Number,
|
|
20
|
-
required:
|
|
20
|
+
required: !1,
|
|
21
21
|
default: 9999
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return props.keepAliveExclude || [];
|
|
35
|
-
});
|
|
36
|
-
return (_ctx, _cache) => {
|
|
37
|
-
const _component_router_view = resolveComponent("router-view");
|
|
38
|
-
return openBlock(), createBlock(_component_router_view, null, {
|
|
39
|
-
default: withCtx(({ Component, route }) => [
|
|
40
|
-
(openBlock(), createBlock(KeepAlive, {
|
|
41
|
-
include: include.value,
|
|
42
|
-
exclude: exclude.value,
|
|
43
|
-
max: __props.keepAliveMax
|
|
24
|
+
setup(r) {
|
|
25
|
+
const e = r, t = v("ProKeepAliveInclude", []), c = u(() => e.keepAliveInclude instanceof Array && e.keepAliveInclude.length === 0 || !e.keepAliveInclude ? t.value : e.keepAliveInclude || []), o = u(() => e.keepAliveExclude || []);
|
|
26
|
+
return (m, x) => {
|
|
27
|
+
const i = s("router-view");
|
|
28
|
+
return l(), n(i, null, {
|
|
29
|
+
default: A(({ Component: p, route: a }) => [
|
|
30
|
+
(l(), n(f, {
|
|
31
|
+
include: c.value,
|
|
32
|
+
exclude: o.value,
|
|
33
|
+
max: r.keepAliveMax
|
|
44
34
|
}, [
|
|
45
|
-
(
|
|
46
|
-
key:
|
|
35
|
+
(l(), n(k(p), {
|
|
36
|
+
key: a.fullPath
|
|
47
37
|
}))
|
|
48
38
|
], 1032, ["include", "exclude", "max"]))
|
|
49
39
|
]),
|
|
@@ -53,5 +43,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
43
|
}
|
|
54
44
|
});
|
|
55
45
|
export {
|
|
56
|
-
|
|
46
|
+
_ as default
|
|
57
47
|
};
|
package/es/pro-layout/hooks.js
CHANGED
|
@@ -1,181 +1,106 @@
|
|
|
1
|
-
import { ref, watch } from "vue";
|
|
2
|
-
import { useRoute, useRouter } from "vue-router";
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const breadcrumbItems = ref([]);
|
|
14
|
-
const tabs = ref([]);
|
|
15
|
-
const keepAliveInclude = ref([]);
|
|
16
|
-
const setActiveMenuItemPaths = () => {
|
|
17
|
-
const paths = [];
|
|
18
|
-
const recursion = (_menuItems) => {
|
|
19
|
-
var _a;
|
|
20
|
-
for (const i in _menuItems) {
|
|
21
|
-
const menuItem = _menuItems[i];
|
|
22
|
-
if (menuItem.name === ((_a = activeMenuItem == null ? void 0 : activeMenuItem.value) == null ? void 0 : _a.name)) {
|
|
23
|
-
delete menuItem.children;
|
|
24
|
-
paths.unshift(menuItem);
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
if (menuItem.children && menuItem.children.length > 0) {
|
|
28
|
-
const ok = recursion(menuItem.children);
|
|
29
|
-
if (ok) {
|
|
30
|
-
delete menuItem.children;
|
|
31
|
-
paths.unshift(menuItem);
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
import { ref as r, watch as b } from "vue";
|
|
2
|
+
import { useRoute as S, useRouter as x } from "vue-router";
|
|
3
|
+
function K(d, T) {
|
|
4
|
+
const i = S(), m = x(), h = r([]), P = (a) => {
|
|
5
|
+
h.value = [a];
|
|
6
|
+
}, u = r(), f = r([]), v = r({}), p = r([]), s = r([]), o = r([]), N = () => {
|
|
7
|
+
const a = [], t = (e) => {
|
|
8
|
+
var l;
|
|
9
|
+
for (const n in e) {
|
|
10
|
+
const c = e[n];
|
|
11
|
+
if (c.name === ((l = u == null ? void 0 : u.value) == null ? void 0 : l.name) || c.children && c.children.length > 0 && t(c.children))
|
|
12
|
+
return delete c.children, a.unshift(c), !0;
|
|
35
13
|
}
|
|
36
|
-
return
|
|
14
|
+
return !1;
|
|
37
15
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const activeMenuItemTitles = activeMenuItemPaths.value.map((v) => v.title);
|
|
44
|
-
breadcrumbItems.value = ((_a = activeMenuItem.value) == null ? void 0 : _a.breadcrumbs) ? (_b = activeMenuItem.value) == null ? void 0 : _b.breadcrumbs : activeMenuItemTitles.length !== 0 ? activeMenuItemTitles : [];
|
|
16
|
+
t(JSON.parse(JSON.stringify(d.value))), f.value = a;
|
|
17
|
+
}, k = () => {
|
|
18
|
+
var t, e;
|
|
19
|
+
const a = f.value.map((l) => l.title);
|
|
20
|
+
p.value = (t = u.value) != null && t.breadcrumbs ? (e = u.value) == null ? void 0 : e.breadcrumbs : a.length !== 0 ? a : [];
|
|
45
21
|
};
|
|
46
|
-
function
|
|
47
|
-
if (!
|
|
48
|
-
|
|
49
|
-
|
|
22
|
+
function y() {
|
|
23
|
+
if (!u.value || u.value.noAffix) {
|
|
24
|
+
s.value.forEach((n) => {
|
|
25
|
+
n.active = !1;
|
|
50
26
|
});
|
|
51
27
|
return;
|
|
52
28
|
}
|
|
53
|
-
const { name:
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (v.name === menuItemName) {
|
|
58
|
-
findIndex = i;
|
|
59
|
-
}
|
|
29
|
+
const { name: a, title: t } = u.value;
|
|
30
|
+
let e = -1;
|
|
31
|
+
s.value.forEach((n, c) => {
|
|
32
|
+
n.active = !1, n.name === a && (e = c);
|
|
60
33
|
});
|
|
61
|
-
const
|
|
62
|
-
name:
|
|
63
|
-
parentNames:
|
|
64
|
-
title:
|
|
65
|
-
fullPath:
|
|
66
|
-
active:
|
|
34
|
+
const l = {
|
|
35
|
+
name: a,
|
|
36
|
+
parentNames: f.value.map((n) => n.name),
|
|
37
|
+
title: t ?? a,
|
|
38
|
+
fullPath: i.fullPath,
|
|
39
|
+
active: !0
|
|
67
40
|
};
|
|
68
|
-
if (~
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
setTimeout(() => {
|
|
76
|
-
tabs.value.push(newTab);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
tabs.value.push(newTab);
|
|
81
|
-
}
|
|
41
|
+
if (~e) {
|
|
42
|
+
const n = s.value[e];
|
|
43
|
+
n.fullPath === i.fullPath ? (n.active = !0, n.fullPath = i.fullPath) : (s.value.splice(e, 1), setTimeout(() => {
|
|
44
|
+
s.value.push(l);
|
|
45
|
+
}));
|
|
46
|
+
} else
|
|
47
|
+
s.value.push(l);
|
|
82
48
|
}
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
findTabIndex = index;
|
|
94
|
-
}
|
|
95
|
-
if (tab.active) {
|
|
96
|
-
activeIndex = index;
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
if (activeIndex === findTabIndex) {
|
|
100
|
-
let tab;
|
|
101
|
-
if (findTabIndex === 0) {
|
|
102
|
-
tab = tabs.value[findTabIndex + 1];
|
|
103
|
-
} else {
|
|
104
|
-
tab = tabs.value[findTabIndex - 1];
|
|
105
|
-
}
|
|
106
|
-
tab.active = true;
|
|
107
|
-
router.push(tab.fullPath);
|
|
49
|
+
const E = (a) => {
|
|
50
|
+
const t = s.value.findIndex((l) => l.name === a), e = s.value[t];
|
|
51
|
+
m.push(e.fullPath);
|
|
52
|
+
}, g = (a) => {
|
|
53
|
+
let t = -1, e = -1;
|
|
54
|
+
if (s.value.forEach((n, c) => {
|
|
55
|
+
n.name === a && (e = c), n.active && (t = c);
|
|
56
|
+
}), t === e) {
|
|
57
|
+
let n;
|
|
58
|
+
e === 0 ? n = s.value[e + 1] : n = s.value[e - 1], n.active = !0, m.push(n.fullPath);
|
|
108
59
|
}
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
if ((_a = route == null ? void 0 : route.meta) == null ? void 0 : _a.ignoreCache) {
|
|
60
|
+
const l = s.value.splice(e, 1);
|
|
61
|
+
I(l[0]);
|
|
62
|
+
}, A = () => {
|
|
63
|
+
var t;
|
|
64
|
+
if ((t = i == null ? void 0 : i.meta) != null && t.ignoreCache)
|
|
115
65
|
return;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
keys.delete(name);
|
|
129
|
-
});
|
|
130
|
-
tabs.value.forEach((tab2) => {
|
|
131
|
-
tab2.parentNames.forEach((name) => {
|
|
132
|
-
const menuItem = menuItemMap.value[name];
|
|
133
|
-
if (menuItem == null ? void 0 : menuItem.ignoreCache) {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
keys.add(menuItem.name);
|
|
66
|
+
const a = new Set(o.value);
|
|
67
|
+
f.value.forEach((e) => {
|
|
68
|
+
e.name && a.add(e.name);
|
|
69
|
+
}), o.value = Array.from(a.values());
|
|
70
|
+
}, I = (a) => {
|
|
71
|
+
const t = new Set(o.value);
|
|
72
|
+
a.parentNames.forEach((e) => {
|
|
73
|
+
t.delete(e);
|
|
74
|
+
}), s.value.forEach((e) => {
|
|
75
|
+
e.parentNames.forEach((l) => {
|
|
76
|
+
const n = v.value[l];
|
|
77
|
+
n != null && n.ignoreCache || t.add(n.name);
|
|
137
78
|
});
|
|
138
|
-
});
|
|
139
|
-
keepAliveInclude.value = Array.from(keys.values());
|
|
79
|
+
}), o.value = Array.from(t.values());
|
|
140
80
|
};
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
if (menuItem.children && menuItem.children.length > 0) {
|
|
146
|
-
fn(menuItem.children);
|
|
147
|
-
}
|
|
148
|
-
delete menuItem["children"];
|
|
149
|
-
_menuItemMap[menuItem.name] = menuItem;
|
|
81
|
+
return b(d, () => {
|
|
82
|
+
const a = {}, t = (e) => {
|
|
83
|
+
e.forEach((l) => {
|
|
84
|
+
l.children && l.children.length > 0 && t(l.children), delete l.children, a[l.name] = l;
|
|
150
85
|
});
|
|
151
86
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
return {
|
|
168
|
-
menuSelectedKeys,
|
|
169
|
-
activeMenuItem,
|
|
170
|
-
menuItemMap,
|
|
171
|
-
breadcrumbItems,
|
|
172
|
-
tabs,
|
|
173
|
-
keepAliveInclude,
|
|
174
|
-
onMenuItemClick,
|
|
175
|
-
onTabClick,
|
|
176
|
-
onTabDelete
|
|
87
|
+
t(JSON.parse(JSON.stringify(d.value))), v.value = a;
|
|
88
|
+
}, { immediate: !0 }), b(() => i == null ? void 0 : i.name, () => {
|
|
89
|
+
var t;
|
|
90
|
+
const a = i == null ? void 0 : i.name;
|
|
91
|
+
u.value = v.value[a], h.value = u != null && u.value ? [u.value.name, ...((t = u.value) == null ? void 0 : t.activatedKeys) || []] : [], N(), k(), T.showTabs && y(), A();
|
|
92
|
+
}, { immediate: !0 }), {
|
|
93
|
+
menuSelectedKeys: h,
|
|
94
|
+
activeMenuItem: u,
|
|
95
|
+
menuItemMap: v,
|
|
96
|
+
breadcrumbItems: p,
|
|
97
|
+
tabs: s,
|
|
98
|
+
keepAliveInclude: o,
|
|
99
|
+
onMenuItemClick: P,
|
|
100
|
+
onTabClick: E,
|
|
101
|
+
onTabDelete: g
|
|
177
102
|
};
|
|
178
103
|
}
|
|
179
104
|
export {
|
|
180
|
-
useHooks
|
|
105
|
+
K as useHooks
|
|
181
106
|
};
|