@keyblade/pro-components 1.13.8-alpha.2 → 1.13.8-alpha.20
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 +5 -0
- package/es/global-props.d.ts +13 -0
- package/es/global-props.js +4 -0
- package/es/index.d.ts +7 -1
- package/es/index.js +31 -22
- package/es/inerface.d.ts +2 -0
- package/es/pro-calendar/calendar.vue.d.ts +75 -0
- package/es/pro-calendar/calendar.vue.js +158 -0
- package/es/pro-calendar/calendar.vue3.js +5 -0
- package/es/pro-calendar/enum.d.ts +6 -0
- package/es/pro-calendar/enum.js +4 -0
- package/es/pro-calendar/header.vue.d.ts +27 -0
- package/es/pro-calendar/header.vue.js +135 -0
- package/es/pro-calendar/header.vue2.js +4 -0
- package/es/pro-calendar/hooks/useCellClassName.d.ts +12 -0
- package/es/pro-calendar/hooks/useCellClassName.js +41 -0
- package/es/pro-calendar/index.d.ts +118 -0
- package/es/pro-calendar/index.js +11 -0
- package/es/pro-calendar/inerface.d.ts +87 -0
- package/es/pro-calendar/month.d.ts +5 -0
- package/es/pro-calendar/month.js +43 -0
- package/es/pro-calendar/month.vue.d.ts +22 -0
- package/es/pro-calendar/month.vue.js +127 -0
- package/es/pro-calendar/month.vue2.js +4 -0
- package/es/pro-calendar/week.vue.d.ts +3 -0
- package/es/pro-calendar/week.vue.js +34 -0
- package/es/pro-calendar/week.vue2.js +4 -0
- package/es/pro-calendar/year.vue.d.ts +3 -0
- package/es/pro-calendar/year.vue.js +112 -0
- package/es/pro-calendar/year.vue2.js +4 -0
- package/es/pro-date-range-picker/index.d.ts +8 -8
- package/es/pro-date-range-picker/{type.d.ts → inerface.d.ts} +5 -1
- package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +1 -1
- package/es/pro-date-range-picker/pro-date-range-picker.vue.js +3 -3
- package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +70 -56
- package/es/pro-footer-bar/index.d.ts +38 -0
- package/es/pro-footer-bar/index.js +11 -0
- package/es/pro-footer-bar/index.vue.d.ts +24 -0
- package/es/pro-footer-bar/index.vue.js +7 -0
- package/es/pro-footer-bar/index.vue2.js +44 -0
- package/es/pro-footer-bar/inerface.d.ts +7 -0
- package/es/pro-form-group/index.d.ts +43 -0
- package/es/pro-form-group/index.js +12 -0
- package/es/pro-form-group/index.vue.d.ts +28 -0
- package/es/pro-form-group/index.vue.js +7 -0
- package/es/pro-form-group/index.vue2.js +43 -0
- package/es/pro-image-upload/image-upload.vue.d.ts +1 -1
- package/es/pro-image-upload/index.d.ts +3 -3
- package/es/pro-layout/hooks.d.ts +1 -1
- package/es/pro-layout/hooks.js +84 -84
- package/es/pro-layout/pro-layout.vue.js +35 -37
- package/es/pro-menu/index.d.ts +11 -80
- package/es/pro-menu/interface.d.ts +19 -0
- package/es/pro-menu/menu-item.vue.d.ts +25 -0
- package/es/pro-menu/menu-item.vue.js +35 -0
- package/es/pro-menu/menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu-item.vue.d.ts +7 -0
- package/es/pro-menu/pro-menu-item.vue.js +63 -0
- package/es/pro-menu/pro-menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu.vue.d.ts +7 -55
- package/es/pro-menu/pro-menu.vue.js +28 -114
- package/es/pro-menu/sub-menu.vue.d.ts +22 -0
- package/es/pro-menu/sub-menu.vue.js +54 -0
- package/es/pro-menu/sub-menu.vue2.js +4 -0
- package/es/pro-menu/util.d.ts +9 -0
- package/es/pro-menu/util.js +7 -0
- package/es/pro-page-container/index.d.ts +36 -130
- package/es/pro-page-container/index.js +7 -6
- package/es/pro-page-container/inerface.d.ts +12 -0
- package/es/pro-page-container/pro-page-container.vue.d.ts +21 -79
- package/es/pro-page-container/pro-page-container.vue.js +38 -36
- package/es/pro-table/index.d.ts +7 -5
- package/es/pro-table/index.js +5 -4
- package/es/pro-table/index.vue.d.ts +10 -3
- package/es/pro-table/index.vue.js +30 -20
- package/es/pro-table/index.vue3.js +5 -0
- package/es/pro-table/interface.d.ts +1 -0
- package/es/pro-textarea/index.d.ts +25 -0
- package/es/pro-textarea/index.js +11 -0
- package/es/pro-textarea/index.vue.d.ts +4 -0
- package/es/pro-textarea/index.vue.js +7 -0
- package/es/pro-textarea/index.vue2.js +40 -0
- package/es/pro-textarea/inerface.d.ts +43 -0
- package/es/style.css +1 -1
- package/package.json +1 -1
- package/es/pro-table/index.vue2.js +0 -4
package/es/pro-layout/hooks.js
CHANGED
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as h, computed as L, watch as g } from "vue";
|
|
2
2
|
import { useRoute as R, useRouter as W } from "vue-router";
|
|
3
3
|
import { ProLayoutMode as P, ProLayoutMenuType as B } from "./enum.js";
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
4
|
+
const z = (o) => {
|
|
5
|
+
const u = R(), r = W(), y = h([]), T = h([]), i = h(), v = h([]), M = h({}), k = h([]), s = h([]), p = h([]), b = h([]), f = h([]), d = L(() => {
|
|
6
|
+
const e = [...o.menuItems], a = (t) => {
|
|
7
|
+
t.forEach((l) => {
|
|
8
8
|
if (l != null && l.children && l.children.length > 0) {
|
|
9
9
|
if ((l == null ? void 0 : l.topChildrenMenu) !== void 0)
|
|
10
|
-
l.children = l.children.map((
|
|
10
|
+
l.children = l.children.map((n) => ({ ...n, topMenu: l == null ? void 0 : l.topChildrenMenu }));
|
|
11
11
|
else {
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const n = l.children.find((c) => c.topMenu !== void 0);
|
|
13
|
+
n && (l.topChildrenMenu = n.topMenu, l.children = l.children.map((c) => ({ ...c, topMenu: n.topMenu })));
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
a(l.children);
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
return
|
|
20
|
-
}), C = (
|
|
21
|
-
var
|
|
22
|
-
y.value = [
|
|
23
|
-
}, E = (
|
|
24
|
-
|
|
25
|
-
}, N = async (
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
window.open(
|
|
19
|
+
return o.layout === P.mix && a(e), e;
|
|
20
|
+
}), C = (e) => {
|
|
21
|
+
var a;
|
|
22
|
+
y.value = [e.name], !(e != null && e.children) || ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) === 0 ? (f.value = [], r == null || r.push({ path: e.path })) : f.value = e.children;
|
|
23
|
+
}, E = (e) => {
|
|
24
|
+
e != null && e.name ? r == null || r.push({ name: e.name }) : r == null || r.push({ path: e.path, params: {} }), T.value = [e.name];
|
|
25
|
+
}, N = async (e, a) => {
|
|
26
|
+
if (a != null && a.path && !(o != null && o.onMenuItemClick && !await o.onMenuItemClick(a))) {
|
|
27
|
+
if (a.path.startsWith("http") || a.path.startsWith("https")) {
|
|
28
|
+
window.open(a.path);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
e === B.top ? C(a) : E(a);
|
|
32
32
|
}
|
|
33
33
|
}, S = () => {
|
|
34
|
-
const
|
|
34
|
+
const e = [], a = (t) => {
|
|
35
35
|
var l;
|
|
36
|
-
for (const
|
|
37
|
-
const c = n
|
|
38
|
-
if (c.name === ((l = i == null ? void 0 : i.value) == null ? void 0 : l.name) || c.children && c.children.length > 0 &&
|
|
39
|
-
return
|
|
36
|
+
for (const n in t) {
|
|
37
|
+
const c = t[n];
|
|
38
|
+
if (c.name === ((l = i == null ? void 0 : i.value) == null ? void 0 : l.name) || c.children && c.children.length > 0 && a(c.children))
|
|
39
|
+
return e.unshift(c), !0;
|
|
40
40
|
}
|
|
41
41
|
return !1;
|
|
42
42
|
};
|
|
43
|
-
|
|
43
|
+
a(JSON.parse(JSON.stringify(d.value))), v.value = e;
|
|
44
44
|
}, x = () => {
|
|
45
|
-
var
|
|
46
|
-
const
|
|
47
|
-
k.value = (
|
|
45
|
+
var a, t, l;
|
|
46
|
+
const e = (a = v.value) == null ? void 0 : a.map((n) => ({ path: n == null ? void 0 : n.path, label: n == null ? void 0 : n.title }));
|
|
47
|
+
k.value = (t = i.value) != null && t.breadcrumbs ? (l = i.value) == null ? void 0 : l.breadcrumbs : e.length !== 0 ? e : [];
|
|
48
48
|
};
|
|
49
49
|
function A() {
|
|
50
50
|
if (!i.value || i.value.noAffix) {
|
|
51
|
-
s.value.forEach((
|
|
52
|
-
|
|
51
|
+
s.value.forEach((n) => {
|
|
52
|
+
n.active = !1;
|
|
53
53
|
});
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
const { name:
|
|
57
|
-
let
|
|
58
|
-
s.value.forEach((
|
|
59
|
-
|
|
56
|
+
const { name: e, title: a } = i.value;
|
|
57
|
+
let t = -1;
|
|
58
|
+
s.value.forEach((n, c) => {
|
|
59
|
+
n.active = !1, n.name === e && (t = c);
|
|
60
60
|
});
|
|
61
61
|
const l = {
|
|
62
|
-
name:
|
|
63
|
-
parentNames: v.value.map((
|
|
64
|
-
title:
|
|
65
|
-
fullPath:
|
|
62
|
+
name: e,
|
|
63
|
+
parentNames: v.value.map((n) => n.name),
|
|
64
|
+
title: a ?? e,
|
|
65
|
+
fullPath: u.fullPath,
|
|
66
66
|
active: !0
|
|
67
67
|
};
|
|
68
|
-
if (~
|
|
69
|
-
const
|
|
70
|
-
|
|
68
|
+
if (~t) {
|
|
69
|
+
const n = s.value[t];
|
|
70
|
+
n.fullPath === u.fullPath ? (n.active = !0, n.fullPath = u.fullPath) : (s.value.splice(t, 1), setTimeout(() => {
|
|
71
71
|
s.value.push(l);
|
|
72
72
|
}));
|
|
73
73
|
} else
|
|
74
74
|
s.value.push(l);
|
|
75
75
|
}
|
|
76
|
-
const w = (
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
}, K = (
|
|
80
|
-
let
|
|
81
|
-
if (s.value.forEach((
|
|
82
|
-
|
|
83
|
-
}),
|
|
84
|
-
let
|
|
85
|
-
|
|
76
|
+
const w = (e) => {
|
|
77
|
+
const a = s.value.findIndex((l) => l.name === e), t = s.value[a];
|
|
78
|
+
r.push(t.fullPath);
|
|
79
|
+
}, K = (e) => {
|
|
80
|
+
let a = -1, t = -1;
|
|
81
|
+
if (s.value.forEach((n, c) => {
|
|
82
|
+
n.name === e && (t = c), n.active && (a = c);
|
|
83
|
+
}), a === t) {
|
|
84
|
+
let n;
|
|
85
|
+
t === 0 ? n = s.value[t + 1] : n = s.value[t - 1], n.active = !0, r.push(n.fullPath);
|
|
86
86
|
}
|
|
87
|
-
const l = s.value.splice(
|
|
87
|
+
const l = s.value.splice(t, 1);
|
|
88
88
|
O(l[0]);
|
|
89
89
|
}, J = () => {
|
|
90
|
-
var
|
|
91
|
-
if (
|
|
90
|
+
var a;
|
|
91
|
+
if (o != null && o.disableKeepAlive || (a = u == null ? void 0 : u.meta) != null && a.ignoreCache)
|
|
92
92
|
return;
|
|
93
|
-
const a = new Set(p.value);
|
|
94
|
-
v.value.forEach((n) => {
|
|
95
|
-
n.name && a.add(n.name);
|
|
96
|
-
}), p.value = Array.from(a.values());
|
|
97
|
-
}, O = (a) => {
|
|
98
93
|
const e = new Set(p.value);
|
|
99
|
-
|
|
100
|
-
e.
|
|
101
|
-
}), s.value.forEach((n) => {
|
|
102
|
-
n.parentNames.forEach((l) => {
|
|
103
|
-
const t = M.value[l];
|
|
104
|
-
t != null && t.ignoreCache || e.add(t.name);
|
|
105
|
-
});
|
|
94
|
+
v.value.forEach((t) => {
|
|
95
|
+
t.name && e.add(t.name);
|
|
106
96
|
}), p.value = Array.from(e.values());
|
|
97
|
+
}, O = (e) => {
|
|
98
|
+
const a = new Set(p.value);
|
|
99
|
+
e.parentNames.forEach((t) => {
|
|
100
|
+
a.delete(t);
|
|
101
|
+
}), s.value.forEach((t) => {
|
|
102
|
+
t.parentNames.forEach((l) => {
|
|
103
|
+
const n = M.value[l];
|
|
104
|
+
n != null && n.ignoreCache || a.add(n.name);
|
|
105
|
+
});
|
|
106
|
+
}), p.value = Array.from(a.values());
|
|
107
107
|
};
|
|
108
108
|
return g(() => d.value, () => {
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
l.children && l.children.length > 0 &&
|
|
109
|
+
const e = {}, a = (t) => {
|
|
110
|
+
t.forEach((l) => {
|
|
111
|
+
l.children && l.children.length > 0 && a(l.children), delete l.children, e[l.name] = l;
|
|
112
112
|
});
|
|
113
113
|
};
|
|
114
|
-
|
|
115
|
-
}, { immediate: !0 }), g(() => [
|
|
116
|
-
var
|
|
117
|
-
if (b.value = [], f.value = [],
|
|
114
|
+
a(JSON.parse(JSON.stringify(d.value))), M.value = e;
|
|
115
|
+
}, { immediate: !0 }), g(() => [o.layout, d.value], () => {
|
|
116
|
+
var e;
|
|
117
|
+
if (b.value = [], f.value = [], o.layout === P.side)
|
|
118
118
|
f.value = d.value;
|
|
119
|
-
else if (
|
|
120
|
-
const
|
|
121
|
-
(
|
|
119
|
+
else if (o.layout === P.mix) {
|
|
120
|
+
const a = (e = d.value) == null ? void 0 : e.filter((t) => t.topMenu);
|
|
121
|
+
(a == null ? void 0 : a.length) === 0 ? f.value = d.value : b.value = a;
|
|
122
122
|
}
|
|
123
|
-
}, { immediate: !0 }), g(() =>
|
|
124
|
-
var
|
|
125
|
-
const
|
|
126
|
-
i.value = M.value[
|
|
127
|
-
const
|
|
128
|
-
|
|
123
|
+
}, { immediate: !0 }), g(() => u == null ? void 0 : u.name, () => {
|
|
124
|
+
var t, l, n;
|
|
125
|
+
const e = u == null ? void 0 : u.name;
|
|
126
|
+
i.value = M.value[e], S();
|
|
127
|
+
const a = v.value.filter((c) => c.topMenu);
|
|
128
|
+
a.length > 0 && b.value.length > 0 && (f.value = ((t = a[a.length - 1]) == null ? void 0 : t.children) || []), y.value = i != null && i.value ? [...a.map((c) => c.name), ...((l = i.value) == null ? void 0 : l.activatedKeys) || []] : [], T.value = i != null && i.value ? [i.value.name, ...((n = i.value) == null ? void 0 : n.activatedKeys) || []] : [], x(), o.hideTabs || A(), J();
|
|
129
129
|
}, { immediate: !0 }), {
|
|
130
130
|
topMenuItems: b,
|
|
131
131
|
siderMenuItems: f,
|
|
@@ -140,7 +140,7 @@ function z(u) {
|
|
|
140
140
|
onTabClick: w,
|
|
141
141
|
onTabDelete: K
|
|
142
142
|
};
|
|
143
|
-
}
|
|
143
|
+
};
|
|
144
144
|
export {
|
|
145
145
|
z as useHooks
|
|
146
146
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as le, useCssVars as ae, ref as N, useSlots as se, computed as de, provide as C, onMounted as ne, watch as V, resolveComponent as s, createBlock as i, openBlock as l, normalizeClass as a, withCtx as d, createCommentVNode as n, createVNode as p, createElementVNode as
|
|
1
|
+
import { defineComponent as le, useCssVars as ae, ref as N, useSlots as se, computed as de, provide as C, onMounted as ne, watch as V, resolveComponent as s, createBlock as i, openBlock as l, normalizeClass as a, withCtx as d, createCommentVNode as n, createVNode as p, createElementVNode as y, renderSlot as c, createElementBlock as h, unref as o, Fragment as b, createTextVNode as T, toDisplayString as P } from "vue";
|
|
2
2
|
import { useHooks as re } from "./hooks.js";
|
|
3
3
|
import { ProLayoutMode as ie, ProLayoutMenuType as F } from "./enum.js";
|
|
4
4
|
const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @__PURE__ */ le({
|
|
@@ -26,18 +26,18 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
|
|
|
26
26
|
},
|
|
27
27
|
emits: {
|
|
28
28
|
/** 收缩事件 */
|
|
29
|
-
collapse: (
|
|
29
|
+
collapse: (_) => !0,
|
|
30
30
|
/** keepAlive改变事件 */
|
|
31
|
-
keepAliveIncludeChange: (
|
|
31
|
+
keepAliveIncludeChange: (_) => !0
|
|
32
32
|
},
|
|
33
|
-
setup(
|
|
33
|
+
setup(_, { emit: E }) {
|
|
34
34
|
ae((e) => ({
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
35
|
+
69231088: z.value,
|
|
36
|
+
"608a2431": G,
|
|
37
|
+
"2ea5a9b4": J
|
|
38
38
|
}));
|
|
39
|
-
const u =
|
|
40
|
-
topMenuItems:
|
|
39
|
+
const u = _, B = E, m = se(), I = de(() => u.hiderSider || g.value.length > 0 && H.value.length === 0), {
|
|
40
|
+
topMenuItems: g,
|
|
41
41
|
siderMenuItems: H,
|
|
42
42
|
topMenuSelectedKeys: L,
|
|
43
43
|
siderMenuSelectedKeys: R,
|
|
@@ -58,7 +58,7 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
|
|
|
58
58
|
r.value = u.siderCollapsed;
|
|
59
59
|
}, { immediate: !0 }), V(v, () => {
|
|
60
60
|
B("keepAliveIncludeChange", v.value);
|
|
61
|
-
}, { immediate: !0 }), (e,
|
|
61
|
+
}, { immediate: !0 }), (e, f) => {
|
|
62
62
|
const A = s("a-typography-title"), K = s("a-space"), D = s("kb-pro-menu"), O = s("a-layout-header"), Q = s("icon-menu-unfold"), U = s("icon-menu-fold"), X = s("a-button"), Y = s("a-layout-sider"), Z = s("kb-pro-reuse-tabs"), x = s("a-affix"), ee = s("kb-pro-keep-alive-router-view"), te = s("a-layout-content"), oe = s("a-layout-footer"), $ = s("a-layout");
|
|
63
63
|
return l(), i($, {
|
|
64
64
|
class: a([t, `${t}-${e.layout}`])
|
|
@@ -69,17 +69,17 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
|
|
|
69
69
|
class: a([`${t}-header`, { [`${t}-header-collapsed`]: r.value }])
|
|
70
70
|
}, {
|
|
71
71
|
default: d(() => [
|
|
72
|
-
|
|
72
|
+
y("div", {
|
|
73
73
|
class: a(`${t}-header-left`)
|
|
74
74
|
}, [
|
|
75
|
-
o(
|
|
76
|
-
e.layout !== "side" ? (l(),
|
|
75
|
+
o(m)["header-left"] ? c(e.$slots, "header-left", { key: 0 }) : (l(), h(b, { key: 1 }, [
|
|
76
|
+
e.layout !== "side" ? (l(), h("div", {
|
|
77
77
|
key: 0,
|
|
78
78
|
class: a(`${t}-header-left-logo`)
|
|
79
79
|
}, [
|
|
80
80
|
p(K, null, {
|
|
81
81
|
default: d(() => [
|
|
82
|
-
|
|
82
|
+
y("img", {
|
|
83
83
|
class: a(`${t}-header-left-logo-img`),
|
|
84
84
|
alt: "logo",
|
|
85
85
|
src: e.logo
|
|
@@ -100,25 +100,23 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
|
|
|
100
100
|
], 2)) : n("", !0)
|
|
101
101
|
], 64))
|
|
102
102
|
], 2),
|
|
103
|
-
|
|
103
|
+
y("div", {
|
|
104
104
|
class: a(`${t}-header-center`)
|
|
105
105
|
}, [
|
|
106
|
-
o(
|
|
107
|
-
o(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
], 64)) : (l(), m(k, { key: 2 }, [
|
|
117
|
-
o(f)["header-center-center"] ? c(e.$slots, "header-center-center", { key: 0 }) : n("", !0)
|
|
106
|
+
o(m)["header-center-left"] ? c(e.$slots, "header-center-left", { key: 0 }) : n("", !0),
|
|
107
|
+
o(g).length > 0 ? (l(), i(D, {
|
|
108
|
+
key: 1,
|
|
109
|
+
mode: "horizontal",
|
|
110
|
+
"selected-keys": o(L),
|
|
111
|
+
items: o(g),
|
|
112
|
+
"menu-props": e.menuProps,
|
|
113
|
+
onMenuItemClick: f[0] || (f[0] = (k) => o(S)(o(F).top, k))
|
|
114
|
+
}, null, 8, ["selected-keys", "items", "menu-props"])) : (l(), h(b, { key: 2 }, [
|
|
115
|
+
o(m)["header-center-center"] ? c(e.$slots, "header-center-center", { key: 0 }) : n("", !0)
|
|
118
116
|
], 64)),
|
|
119
|
-
o(
|
|
117
|
+
o(m)["header-center-right"] ? c(e.$slots, "header-center-right", { key: 3 }) : n("", !0)
|
|
120
118
|
], 2),
|
|
121
|
-
|
|
119
|
+
y("div", {
|
|
122
120
|
class: a(`${t}-header-right`)
|
|
123
121
|
}, [
|
|
124
122
|
c(e.$slots, "header-right")
|
|
@@ -139,17 +137,17 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
|
|
|
139
137
|
onCollapse: W
|
|
140
138
|
}, {
|
|
141
139
|
default: d(() => [
|
|
142
|
-
|
|
140
|
+
y("div", {
|
|
143
141
|
class: a(`${t}-sider-content`)
|
|
144
142
|
}, [
|
|
145
|
-
o(
|
|
146
|
-
e.layout === "side" ? (l(),
|
|
143
|
+
o(m)["sider-top"] ? c(e.$slots, "sider-top", { key: 0 }) : (l(), h(b, { key: 1 }, [
|
|
144
|
+
e.layout === "side" ? (l(), h("div", {
|
|
147
145
|
key: 0,
|
|
148
146
|
class: a(`${t}-sider-content-logo`)
|
|
149
147
|
}, [
|
|
150
148
|
p(K, null, {
|
|
151
149
|
default: d(() => [
|
|
152
|
-
|
|
150
|
+
y("img", {
|
|
153
151
|
class: a(`${t}-sider-content-logo-img`),
|
|
154
152
|
alt: "logo",
|
|
155
153
|
src: e.logo
|
|
@@ -175,13 +173,13 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
|
|
|
175
173
|
"selected-keys": o(R),
|
|
176
174
|
items: o(H),
|
|
177
175
|
"menu-props": e.menuProps,
|
|
178
|
-
onMenuItemClick:
|
|
176
|
+
onMenuItemClick: f[1] || (f[1] = (k) => o(S)(o(F).side, k))
|
|
179
177
|
}, null, 8, ["collapsed", "selected-keys", "items", "menu-props"])
|
|
180
178
|
], 2),
|
|
181
179
|
p(X, {
|
|
182
180
|
class: a(`${t}-sider-collapse-btn`),
|
|
183
181
|
size: "mini",
|
|
184
|
-
onClick:
|
|
182
|
+
onClick: f[2] || (f[2] = (k) => W(!r.value))
|
|
185
183
|
}, {
|
|
186
184
|
icon: d(() => [
|
|
187
185
|
r.value ? (l(), i(Q, { key: 0 })) : (l(), i(U, { key: 1 }))
|
|
@@ -223,8 +221,8 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
|
|
|
223
221
|
]),
|
|
224
222
|
_: 1
|
|
225
223
|
}),
|
|
226
|
-
e.hideFooter ? n("", !0) : (l(),
|
|
227
|
-
o(
|
|
224
|
+
e.hideFooter ? n("", !0) : (l(), h(b, { key: 1 }, [
|
|
225
|
+
o(m).footer !== void 0 ? c(e.$slots, "footer", { key: 0 }) : (l(), i(oe, {
|
|
228
226
|
key: 1,
|
|
229
227
|
class: a(`${t}-body-footer`)
|
|
230
228
|
}, {
|
package/es/pro-menu/index.d.ts
CHANGED
|
@@ -1,67 +1,21 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
declare const ProMenu: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
default: string;
|
|
8
|
-
};
|
|
9
|
-
collapsed: {
|
|
10
|
-
type: import('vue').PropType<boolean>;
|
|
11
|
-
required: false;
|
|
12
|
-
};
|
|
13
|
-
selectedKeys: {
|
|
14
|
-
type: import('vue').PropType<string[]>;
|
|
15
|
-
required: true;
|
|
16
|
-
};
|
|
17
|
-
items: {
|
|
18
|
-
type: import('vue').PropType<import('./interface').IProMenuItem[]>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
menuProps: {
|
|
22
|
-
type: import('vue').PropType<Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>>;
|
|
23
|
-
required: false;
|
|
24
|
-
default: () => {};
|
|
25
|
-
};
|
|
26
|
-
}>> & Readonly<{
|
|
27
|
-
"onMenu-item-click"?: ((_item: import('./interface').IProMenuItem) => any) | undefined;
|
|
28
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
-
"menu-item-click": (_item: import('./interface').IProMenuItem) => void;
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./interface').IProMenuProps> & Readonly<{
|
|
4
|
+
"onMenu-item-click"?: ((item: import('./interface').IProMenuItem) => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
6
|
+
"menu-item-click": (item: import('./interface').IProMenuItem) => any;
|
|
30
7
|
}, import('vue').PublicProps, {
|
|
31
8
|
mode: "horizontal" | "vertical";
|
|
32
9
|
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
33
|
-
},
|
|
10
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
34
11
|
P: {};
|
|
35
12
|
B: {};
|
|
36
13
|
D: {};
|
|
37
14
|
C: {};
|
|
38
15
|
M: {};
|
|
39
16
|
Defaults: {};
|
|
40
|
-
}, Readonly<import('
|
|
41
|
-
|
|
42
|
-
type: import('vue').PropType<"horizontal" | "vertical">;
|
|
43
|
-
required: false;
|
|
44
|
-
default: string;
|
|
45
|
-
};
|
|
46
|
-
collapsed: {
|
|
47
|
-
type: import('vue').PropType<boolean>;
|
|
48
|
-
required: false;
|
|
49
|
-
};
|
|
50
|
-
selectedKeys: {
|
|
51
|
-
type: import('vue').PropType<string[]>;
|
|
52
|
-
required: true;
|
|
53
|
-
};
|
|
54
|
-
items: {
|
|
55
|
-
type: import('vue').PropType<import('./interface').IProMenuItem[]>;
|
|
56
|
-
required: true;
|
|
57
|
-
};
|
|
58
|
-
menuProps: {
|
|
59
|
-
type: import('vue').PropType<Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>>;
|
|
60
|
-
required: false;
|
|
61
|
-
default: () => {};
|
|
62
|
-
};
|
|
63
|
-
}>> & Readonly<{
|
|
64
|
-
"onMenu-item-click"?: ((_item: import('./interface').IProMenuItem) => any) | undefined;
|
|
17
|
+
}, Readonly<import('./interface').IProMenuProps> & Readonly<{
|
|
18
|
+
"onMenu-item-click"?: ((item: import('./interface').IProMenuItem) => any) | undefined;
|
|
65
19
|
}>, {}, {}, {}, {}, {
|
|
66
20
|
mode: "horizontal" | "vertical";
|
|
67
21
|
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
@@ -69,33 +23,10 @@ declare const ProMenu: {
|
|
|
69
23
|
__isFragment?: never;
|
|
70
24
|
__isTeleport?: never;
|
|
71
25
|
__isSuspense?: never;
|
|
72
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
default: string;
|
|
77
|
-
};
|
|
78
|
-
collapsed: {
|
|
79
|
-
type: import('vue').PropType<boolean>;
|
|
80
|
-
required: false;
|
|
81
|
-
};
|
|
82
|
-
selectedKeys: {
|
|
83
|
-
type: import('vue').PropType<string[]>;
|
|
84
|
-
required: true;
|
|
85
|
-
};
|
|
86
|
-
items: {
|
|
87
|
-
type: import('vue').PropType<import('./interface').IProMenuItem[]>;
|
|
88
|
-
required: true;
|
|
89
|
-
};
|
|
90
|
-
menuProps: {
|
|
91
|
-
type: import('vue').PropType<Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>>;
|
|
92
|
-
required: false;
|
|
93
|
-
default: () => {};
|
|
94
|
-
};
|
|
95
|
-
}>> & Readonly<{
|
|
96
|
-
"onMenu-item-click"?: ((_item: import('./interface').IProMenuItem) => any) | undefined;
|
|
97
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
98
|
-
"menu-item-click": (_item: import('./interface').IProMenuItem) => void;
|
|
26
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./interface').IProMenuProps> & Readonly<{
|
|
27
|
+
"onMenu-item-click"?: ((item: import('./interface').IProMenuItem) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
29
|
+
"menu-item-click": (item: import('./interface').IProMenuItem) => any;
|
|
99
30
|
}, string, {
|
|
100
31
|
mode: "horizontal" | "vertical";
|
|
101
32
|
menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MenuProps } from '@arco-design/web-vue/es/menu/interface';
|
|
1
2
|
export interface IProMenuItem {
|
|
2
3
|
/** 英文名称(唯一标识,不能重复) */
|
|
3
4
|
name: string;
|
|
@@ -48,3 +49,21 @@ export interface IProMenuItem {
|
|
|
48
49
|
/** 子菜单 */
|
|
49
50
|
children?: IProMenuItem[];
|
|
50
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* 组件emits
|
|
54
|
+
*/
|
|
55
|
+
export interface IProMenuEmits {
|
|
56
|
+
(e: 'menu-item-click', item: IProMenuItem): void;
|
|
57
|
+
}
|
|
58
|
+
export interface IProMenuProps {
|
|
59
|
+
items: IProMenuItem[];
|
|
60
|
+
selectedKeys: string[];
|
|
61
|
+
mode?: 'horizontal' | 'vertical';
|
|
62
|
+
collapsed?: boolean;
|
|
63
|
+
menuProps?: Partial<MenuProps>;
|
|
64
|
+
}
|
|
65
|
+
export type IProMenuItemProps = {
|
|
66
|
+
item: IProMenuItem;
|
|
67
|
+
selectedKeys: string[];
|
|
68
|
+
mode?: 'horizontal' | 'vertical';
|
|
69
|
+
} & Pick<IProMenuProps, 'selectedKeys' | 'mode'>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IProMenuItem } from './interface.ts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
item: IProMenuItem;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
icon?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: any;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
15
|
+
"menu-item-click": (item: IProMenuItem) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
"onMenu-item-click"?: ((item: IProMenuItem) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as s, resolveComponent as l, createBlock as a, openBlock as c, createSlots as p, withCtx as o, createTextVNode as u, toDisplayString as k, renderSlot as d } from "vue";
|
|
2
|
+
const v = /* @__PURE__ */ s({
|
|
3
|
+
__name: "menu-item",
|
|
4
|
+
props: {
|
|
5
|
+
item: {}
|
|
6
|
+
},
|
|
7
|
+
emits: ["menu-item-click"],
|
|
8
|
+
setup(f, { emit: i }) {
|
|
9
|
+
const m = i;
|
|
10
|
+
return (e, t) => {
|
|
11
|
+
var n;
|
|
12
|
+
const r = l("a-menu-item");
|
|
13
|
+
return c(), a(r, {
|
|
14
|
+
key: e.item.name,
|
|
15
|
+
onClick: t[0] || (t[0] = (_) => m("menu-item-click", e.item))
|
|
16
|
+
}, p({
|
|
17
|
+
default: o(() => [
|
|
18
|
+
u(" " + k(e.item.title), 1)
|
|
19
|
+
]),
|
|
20
|
+
_: 2
|
|
21
|
+
}, [
|
|
22
|
+
(n = e.item) != null && n.icon ? {
|
|
23
|
+
name: "icon",
|
|
24
|
+
fn: o(() => [
|
|
25
|
+
d(e.$slots, "icon")
|
|
26
|
+
]),
|
|
27
|
+
key: "0"
|
|
28
|
+
} : void 0
|
|
29
|
+
]), 1024);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
v as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IProMenuItem, IProMenuItemProps } from './interface.ts';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IProMenuItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
"menu-item-click": (item: IProMenuItem) => any;
|
|
4
|
+
}, string, import('vue').PublicProps, Readonly<IProMenuItemProps> & Readonly<{
|
|
5
|
+
"onMenu-item-click"?: ((item: IProMenuItem) => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|