@keyblade/pro-components 1.4.5 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +22 -27
- package/es/pro-keep-alive-router-view/index.d.ts +1 -1
- 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.d.ts +1 -1
- package/es/pro-layout/hooks.js +87 -162
- package/es/pro-layout/index.d.ts +31 -13
- package/es/pro-layout/index.js +12 -23
- package/es/pro-layout/pro-layout.vue.d.ts +36 -15
- package/es/pro-layout/pro-layout.vue.js +154 -169
- 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.d.ts +24 -4
- package/es/pro-menu/index.js +9 -10
- package/es/pro-menu/pro-menu.vue.d.ts +13 -1
- package/es/pro-menu/pro-menu.vue.js +101 -46
- package/es/pro-menu/pro-menu.vue2.js +2 -2
- package/es/pro-menu/pro-menu.vue3.js +5 -0
- package/es/pro-page-container/index.d.ts +82 -109
- package/es/pro-page-container/index.js +8 -10
- package/es/pro-page-container/pro-page-container.vue.d.ts +49 -79
- package/es/pro-page-container/pro-page-container.vue.js +37 -57
- 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-breadcrumb → pro-page-header}/index.d.ts +55 -55
- package/es/pro-page-header/index.js +13 -0
- package/es/{pro-breadcrumb/pro-breadcrumb.vue.d.ts → pro-page-header/pro-page-header.vue.d.ts} +41 -41
- package/es/pro-page-header/pro-page-header.vue.js +125 -0
- package/es/pro-page-header/pro-page-header.vue2.js +4 -0
- package/es/pro-page-header/pro-page-header.vue3.js +5 -0
- package/es/pro-reuse-tabs/index.d.ts +1 -1
- 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 +5 -3
- package/src/index.ts +3 -3
- package/es/pro-breadcrumb/index.js +0 -16
- package/es/pro-breadcrumb/pro-breadcrumb.vue.js +0 -115
- package/es/pro-breadcrumb/pro-breadcrumb.vue2.js +0 -4
- package/es/pro-breadcrumb/pro-breadcrumb.vue3.js +0 -5
- package/es/pro-menu/pro-menu-item.vue.d.ts +0 -14
- package/es/pro-menu/pro-menu-item.vue.js +0 -103
- package/es/pro-menu/pro-menu-item.vue2.js +0 -4
- package/es/pro-menu/pro-menu-item.vue3.js +0 -5
package/es/components.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare module 'vue' {
|
|
2
2
|
interface GlobalComponents {
|
|
3
|
-
|
|
3
|
+
KbProPageHeader: typeof import('./index')['ProPageHeader'];
|
|
4
4
|
KbProKeepAliveRouterView: typeof import('./index')['ProKeepAliveRouterView'];
|
|
5
5
|
KbProLayout: typeof import('./index')['ProLayout'];
|
|
6
6
|
KbProMenu: typeof import('./index')['ProMenu'];
|
package/es/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare const _default: {
|
|
|
3
3
|
install(app: App): void;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as ProPageHeader } from './pro-page-header';
|
|
7
7
|
export { default as ProKeepAliveRouterView } from './pro-keep-alive-router-view';
|
|
8
8
|
export { default as ProLayout } from './pro-layout';
|
|
9
9
|
export { default as ProMenu } from './pro-menu';
|
package/es/index.js
CHANGED
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
import {
|
|
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 { ProPageHeader as o } from "./pro-page-header/index.js";
|
|
2
|
+
import { default as g } from "./pro-page-header/index.js";
|
|
3
|
+
import { ProKeepAliveRouterView as r } from "./pro-keep-alive-router-view/index.js";
|
|
4
|
+
import { default as b } from "./pro-keep-alive-router-view/index.js";
|
|
5
|
+
import { ProLayout as t } from "./pro-layout/index.js";
|
|
6
|
+
import { default as w } from "./pro-layout/index.js";
|
|
7
|
+
import { ProMenu as a } from "./pro-menu/index.js";
|
|
8
|
+
import { default as A } from "./pro-menu/index.js";
|
|
9
|
+
import { ProPageContainer as u } from "./pro-page-container/index.js";
|
|
10
|
+
import { default as H } from "./pro-page-container/index.js";
|
|
11
|
+
import { ProReuseTabs as f } from "./pro-reuse-tabs/index.js";
|
|
12
|
+
import { default as L } from "./pro-reuse-tabs/index.js";
|
|
13
|
+
const n = {
|
|
14
|
+
install(e) {
|
|
15
|
+
e.use(o), e.use(r), e.use(t), e.use(a), e.use(u), e.use(f);
|
|
21
16
|
}
|
|
22
17
|
};
|
|
23
18
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
b as ProKeepAliveRouterView,
|
|
20
|
+
w as ProLayout,
|
|
21
|
+
A as ProMenu,
|
|
22
|
+
H as ProPageContainer,
|
|
23
|
+
g as ProPageHeader,
|
|
24
|
+
L as ProReuseTabs,
|
|
25
|
+
n as default
|
|
31
26
|
};
|
|
@@ -7,7 +7,6 @@ declare const ProKeepAliveRouterView: {
|
|
|
7
7
|
keepAliveInclude?: string[] | undefined;
|
|
8
8
|
keepAliveExclude?: string[] | undefined;
|
|
9
9
|
keepAliveMax?: number | undefined;
|
|
10
|
-
style?: unknown;
|
|
11
10
|
key?: string | number | symbol | undefined;
|
|
12
11
|
ref?: VNodeRef | undefined;
|
|
13
12
|
ref_for?: boolean | undefined;
|
|
@@ -51,6 +50,7 @@ declare const ProKeepAliveRouterView: {
|
|
|
51
50
|
[key: string]: any;
|
|
52
51
|
}>) => void)[] | undefined;
|
|
53
52
|
class?: unknown;
|
|
53
|
+
style?: unknown;
|
|
54
54
|
};
|
|
55
55
|
$attrs: {
|
|
56
56
|
[x: string]: unknown;
|
|
@@ -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.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
import type { IProMenuItem } from '../pro-menu';
|
|
3
3
|
export declare function useHooks(menuItems: Ref<IProMenuItem[]>, options: {
|
|
4
|
-
|
|
4
|
+
hideTabs: boolean;
|
|
5
5
|
}): {
|
|
6
6
|
menuSelectedKeys: Ref<string[]>;
|
|
7
7
|
activeMenuItem: Ref<IProMenuItem | undefined>;
|
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.hideTabs || 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
|
};
|
package/es/pro-layout/index.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ declare const ProLayout: {
|
|
|
14
14
|
siderCollapsed?: boolean | undefined;
|
|
15
15
|
menuItems?: IProMenuItem[] | undefined;
|
|
16
16
|
footerTitle?: string | undefined;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
hideFooter?: boolean | undefined;
|
|
18
|
+
hideTabs?: boolean | undefined;
|
|
19
19
|
key?: string | number | symbol | undefined;
|
|
20
20
|
ref?: VNodeRef | undefined;
|
|
21
21
|
ref_for?: boolean | undefined;
|
|
@@ -59,6 +59,7 @@ declare const ProLayout: {
|
|
|
59
59
|
[key: string]: any;
|
|
60
60
|
}>) => void)[] | undefined;
|
|
61
61
|
class?: unknown;
|
|
62
|
+
style?: unknown;
|
|
62
63
|
onCollapse?: ((collapsed: boolean) => any) | undefined;
|
|
63
64
|
onKeepAliveIncludeChange?: ((keepAliveInclude: string[]) => any) | undefined;
|
|
64
65
|
};
|
|
@@ -86,12 +87,12 @@ declare const ProLayout: {
|
|
|
86
87
|
required: false;
|
|
87
88
|
default: number;
|
|
88
89
|
};
|
|
89
|
-
|
|
90
|
+
logo: {
|
|
90
91
|
type: PropType<string>;
|
|
91
92
|
required: false;
|
|
92
93
|
default: string;
|
|
93
94
|
};
|
|
94
|
-
|
|
95
|
+
title: {
|
|
95
96
|
type: PropType<string>;
|
|
96
97
|
required: false;
|
|
97
98
|
default: string;
|
|
@@ -121,7 +122,12 @@ declare const ProLayout: {
|
|
|
121
122
|
required: false;
|
|
122
123
|
default: string;
|
|
123
124
|
};
|
|
124
|
-
|
|
125
|
+
hideFooter: {
|
|
126
|
+
type: PropType<boolean>;
|
|
127
|
+
required: false;
|
|
128
|
+
default: boolean;
|
|
129
|
+
};
|
|
130
|
+
hideTabs: {
|
|
125
131
|
type: PropType<boolean>;
|
|
126
132
|
required: false;
|
|
127
133
|
default: boolean;
|
|
@@ -142,7 +148,8 @@ declare const ProLayout: {
|
|
|
142
148
|
siderCollapsed: boolean;
|
|
143
149
|
menuItems: IProMenuItem[];
|
|
144
150
|
footerTitle: string;
|
|
145
|
-
|
|
151
|
+
hideFooter: boolean;
|
|
152
|
+
hideTabs: boolean;
|
|
146
153
|
}, {}, string, {}> & {
|
|
147
154
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
148
155
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -174,12 +181,12 @@ declare const ProLayout: {
|
|
|
174
181
|
required: false;
|
|
175
182
|
default: number;
|
|
176
183
|
};
|
|
177
|
-
|
|
184
|
+
logo: {
|
|
178
185
|
type: PropType<string>;
|
|
179
186
|
required: false;
|
|
180
187
|
default: string;
|
|
181
188
|
};
|
|
182
|
-
|
|
189
|
+
title: {
|
|
183
190
|
type: PropType<string>;
|
|
184
191
|
required: false;
|
|
185
192
|
default: string;
|
|
@@ -209,7 +216,12 @@ declare const ProLayout: {
|
|
|
209
216
|
required: false;
|
|
210
217
|
default: string;
|
|
211
218
|
};
|
|
212
|
-
|
|
219
|
+
hideFooter: {
|
|
220
|
+
type: PropType<boolean>;
|
|
221
|
+
required: false;
|
|
222
|
+
default: boolean;
|
|
223
|
+
};
|
|
224
|
+
hideTabs: {
|
|
213
225
|
type: PropType<boolean>;
|
|
214
226
|
required: false;
|
|
215
227
|
default: boolean;
|
|
@@ -232,12 +244,12 @@ declare const ProLayout: {
|
|
|
232
244
|
required: false;
|
|
233
245
|
default: number;
|
|
234
246
|
};
|
|
235
|
-
|
|
247
|
+
logo: {
|
|
236
248
|
type: PropType<string>;
|
|
237
249
|
required: false;
|
|
238
250
|
default: string;
|
|
239
251
|
};
|
|
240
|
-
|
|
252
|
+
title: {
|
|
241
253
|
type: PropType<string>;
|
|
242
254
|
required: false;
|
|
243
255
|
default: string;
|
|
@@ -267,7 +279,12 @@ declare const ProLayout: {
|
|
|
267
279
|
required: false;
|
|
268
280
|
default: string;
|
|
269
281
|
};
|
|
270
|
-
|
|
282
|
+
hideFooter: {
|
|
283
|
+
type: PropType<boolean>;
|
|
284
|
+
required: false;
|
|
285
|
+
default: boolean;
|
|
286
|
+
};
|
|
287
|
+
hideTabs: {
|
|
271
288
|
type: PropType<boolean>;
|
|
272
289
|
required: false;
|
|
273
290
|
default: boolean;
|
|
@@ -288,7 +305,8 @@ declare const ProLayout: {
|
|
|
288
305
|
siderCollapsed: boolean;
|
|
289
306
|
menuItems: IProMenuItem[];
|
|
290
307
|
footerTitle: string;
|
|
291
|
-
|
|
308
|
+
hideFooter: boolean;
|
|
309
|
+
hideTabs: boolean;
|
|
292
310
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
293
311
|
$slots: {
|
|
294
312
|
"header-left"?(_: {}): any;
|
package/es/pro-layout/index.js
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./pro-layout.vue.js";
|
|
2
2
|
import "./pro-layout.vue2.js";
|
|
3
|
-
import { Layout, Space, Typography, Button, Affix } from "@arco-design/web-vue";
|
|
4
|
-
import { ProKeepAliveRouterView } from "../pro-keep-alive-router-view/index.js";
|
|
5
|
-
import { ProMenu } from "../pro-menu/index.js";
|
|
6
|
-
import { ProReuseTabs } from "../pro-reuse-tabs/index.js";
|
|
7
|
-
import { IconMenuFold, IconMenuUnfold } from "@arco-design/web-vue/es/icon";
|
|
8
|
-
const
|
|
9
|
-
install: (
|
|
10
|
-
|
|
11
|
-
app.use(Space);
|
|
12
|
-
app.use(Typography);
|
|
13
|
-
app.use(Button);
|
|
14
|
-
app.use(Affix);
|
|
15
|
-
app.use(ProKeepAliveRouterView);
|
|
16
|
-
app.use(ProMenu);
|
|
17
|
-
app.use(ProReuseTabs);
|
|
18
|
-
app.use(IconMenuFold);
|
|
19
|
-
app.use(IconMenuUnfold);
|
|
20
|
-
app.component("KbProLayout", _sfc_main);
|
|
3
|
+
import { Layout as r, Space as t, Typography as u, Button as s, Affix as m } from "@arco-design/web-vue";
|
|
4
|
+
import { ProKeepAliveRouterView as n } from "../pro-keep-alive-router-view/index.js";
|
|
5
|
+
import { ProMenu as i } from "../pro-menu/index.js";
|
|
6
|
+
import { ProReuseTabs as f } from "../pro-reuse-tabs/index.js";
|
|
7
|
+
import { IconMenuFold as c, IconMenuUnfold as l } from "@arco-design/web-vue/es/icon";
|
|
8
|
+
const y = Object.assign(e, {
|
|
9
|
+
install: (o) => {
|
|
10
|
+
o.use(r), o.use(t), o.use(u), o.use(s), o.use(m), o.use(n), o.use(i), o.use(f), o.use(c), o.use(l), o.component("KbProLayout", e);
|
|
21
11
|
}
|
|
22
|
-
});
|
|
23
|
-
const ProLayout$1 = ProLayout;
|
|
12
|
+
}), x = y;
|
|
24
13
|
export {
|
|
25
|
-
ProLayout,
|
|
26
|
-
|
|
14
|
+
y as ProLayout,
|
|
15
|
+
x as default
|
|
27
16
|
};
|