@done-coding/admin-core 0.9.1-alpha.0 → 0.10.1-alpha.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/bridge/config-hook.mjs +32 -26
- package/es/bridge/index.mjs +129 -83
- package/es/bridge/theme/index.mjs +103 -0
- package/es/bridge/theme/persist.mjs +14 -0
- package/es/bridge/theme/system-dark.mjs +11 -0
- package/es/components/app-layout/AppAside.vue.mjs +7 -0
- package/es/components/app-layout/AppAside.vue2.mjs +22 -0
- package/es/components/app-layout/AppFooter.vue.mjs +2 -2
- package/es/components/app-layout/AppHeader.vue.mjs +2 -2
- package/es/components/app-layout/AppHeader.vue2.mjs +35 -41
- package/es/components/app-layout/AppLayout.vue.mjs +2 -2
- package/es/components/app-layout/AppLayout.vue2.mjs +106 -88
- package/es/components/app-layout/AppShell.vue.mjs +60 -0
- package/es/components/app-layout/AppShell.vue2.mjs +4 -0
- package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
- package/es/components/app-layout/AppSidebar.vue2.mjs +44 -47
- package/es/components/app-layout/AppTheme.vue.mjs +2 -2
- package/es/components/app-layout/AppTheme.vue2.mjs +55 -25
- package/es/components/app-layout/viewport.mjs +5 -0
- package/es/components/form/FormItemNestForm.vue.mjs +1 -1
- package/es/components/form/FormItemNestFormList.vue.mjs +1 -1
- package/es/components/form/FormSearch.vue.mjs +2 -2
- package/es/components/form/FormSearch.vue2.mjs +1 -1
- package/es/hooks/use-admin-theme-apply.mjs +16 -15
- package/es/hooks/use-admin-viewport-apply.mjs +29 -17
- package/es/index.mjs +182 -175
- package/es/store/app.mjs +133 -77
- package/es/style.css +1 -1
- package/package.json +2 -2
- package/types/bridge/config-hook.d.ts +10 -2
- package/types/bridge/index.d.ts +105 -5
- package/types/bridge/theme/index.d.ts +10 -0
- package/types/bridge/theme/persist.d.ts +23 -0
- package/types/bridge/theme/system-dark.d.ts +14 -0
- package/types/bridge/theme/types.d.ts +258 -0
- package/types/components/app-layout/AppAside.vue.d.ts +21 -0
- package/types/components/app-layout/AppLayout.vue.d.ts +2 -7
- package/types/components/app-layout/AppShell.vue.d.ts +27 -0
- package/types/components/app-layout/index.d.ts +4 -1
- package/types/components/app-layout/types.d.ts +117 -1
- package/types/components/app-layout/viewport.d.ts +30 -0
- package/types/hooks/use-admin-viewport-apply.d.ts +6 -1
- package/types/store/app.d.ts +24 -83
- package/types/types/route.d.ts +2 -0
- package/es/bridge/theme.mjs +0 -65
- package/types/bridge/theme.d.ts +0 -85
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { ElIcon as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const R = { class: "app-header-shim" }, q = ["name", "onClick"], z = { class: "app-header-userInfo" }, J = /* @__PURE__ */ S({
|
|
1
|
+
import { defineComponent as k, useCssVars as g, inject as d, computed as a, watch as P, nextTick as E, openBlock as r, createElementBlock as s, normalizeStyle as A, createElementVNode as i, renderSlot as p, normalizeClass as m, Fragment as B, renderList as $, createBlock as h, unref as w, withCtx as I, resolveDynamicComponent as L, createCommentVNode as v, toDisplayString as x } from "vue";
|
|
2
|
+
import { useRouter as T } from "vue-router";
|
|
3
|
+
import { ElIcon as V } from "element-plus";
|
|
4
|
+
import { APP_LAYOUT_APP_STORE_KEY as Y, APP_LAYOUT_BRIDGE_KEY as b } from "../../inject/key.mjs";
|
|
5
|
+
const D = { class: "app-header-shim" }, O = ["name", "onClick"], R = { class: "app-header-right" }, U = /* @__PURE__ */ k({
|
|
7
6
|
__name: "AppHeader",
|
|
8
7
|
props: {
|
|
9
8
|
show: { type: Boolean },
|
|
@@ -12,30 +11,26 @@ const R = { class: "app-header-shim" }, q = ["name", "onClick"], z = { class: "a
|
|
|
12
11
|
activeModuleMenu: {},
|
|
13
12
|
menuFlatList: {}
|
|
14
13
|
},
|
|
15
|
-
setup(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
v4782742c: l.value.top,
|
|
19
|
-
v70971b33: l.value.right,
|
|
20
|
-
fcf1a792: p.value.baseColor,
|
|
21
|
-
d3910988: p.value.primaryColor
|
|
14
|
+
setup(c) {
|
|
15
|
+
g((t) => ({
|
|
16
|
+
v1eee7516: y.value.primaryColor
|
|
22
17
|
}));
|
|
23
|
-
const
|
|
18
|
+
const n = c, _ = d(Y), f = d(b), y = a(() => f.themeColors.value), C = a(() => _.headerStyle), M = T(), u = `app-header-module_${Math.random().toString(36).substring(2)}`, S = a(() => n.menus), l = a({
|
|
24
19
|
get() {
|
|
25
20
|
var t;
|
|
26
|
-
return (t =
|
|
21
|
+
return (t = n.activeModuleMenu) == null ? void 0 : t.path;
|
|
27
22
|
},
|
|
28
23
|
set(t) {
|
|
29
24
|
var o, e;
|
|
30
|
-
((e = (o =
|
|
25
|
+
((e = (o = n.activeMenu) == null ? void 0 : o.parentPathList) == null ? void 0 : e[0]) !== t && M.push(t);
|
|
31
26
|
}
|
|
32
27
|
});
|
|
33
|
-
return
|
|
34
|
-
|
|
28
|
+
return P(
|
|
29
|
+
l,
|
|
35
30
|
(t) => {
|
|
36
|
-
t &&
|
|
31
|
+
t && E(() => {
|
|
37
32
|
var o, e;
|
|
38
|
-
(e = (o = document.querySelector(`.${
|
|
33
|
+
(e = (o = document.querySelector(`.${u}`)) == null ? void 0 : o.querySelector(`[name="${t}"]`)) == null || e.scrollIntoView({
|
|
39
34
|
behavior: "smooth"
|
|
40
35
|
});
|
|
41
36
|
});
|
|
@@ -43,45 +38,44 @@ const R = { class: "app-header-shim" }, q = ["name", "onClick"], z = { class: "a
|
|
|
43
38
|
{
|
|
44
39
|
immediate: !0
|
|
45
40
|
}
|
|
46
|
-
), (t, o) => (
|
|
41
|
+
), (t, o) => (r(), s("div", {
|
|
47
42
|
class: "app-header",
|
|
48
|
-
style:
|
|
43
|
+
style: A(C.value)
|
|
49
44
|
}, [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
i("div", D, [
|
|
46
|
+
p(t.$slots, "left", {}, void 0, !0),
|
|
47
|
+
S.value ? (r(), s("div", {
|
|
53
48
|
key: 0,
|
|
54
|
-
class:
|
|
49
|
+
class: m(["app-header-module", u])
|
|
55
50
|
}, [
|
|
56
|
-
(
|
|
51
|
+
(r(!0), s(B, null, $(c.menus, (e) => (r(), s("div", {
|
|
57
52
|
key: e.path,
|
|
58
53
|
name: e.path,
|
|
59
|
-
class:
|
|
54
|
+
class: m([
|
|
60
55
|
"app-header-module-item",
|
|
61
|
-
|
|
56
|
+
l.value === e.path ? "app-header-module-item_active" : ""
|
|
62
57
|
]),
|
|
63
|
-
onClick: (
|
|
58
|
+
onClick: (q) => l.value = e.path
|
|
64
59
|
}, [
|
|
65
|
-
e.menuIcon ? (
|
|
60
|
+
e.menuIcon ? (r(), h(w(V), {
|
|
66
61
|
key: 0,
|
|
67
62
|
class: "app-header-module-item__icon"
|
|
68
63
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
(
|
|
64
|
+
default: I(() => [
|
|
65
|
+
(r(), h(L(e.menuIcon)))
|
|
71
66
|
]),
|
|
72
67
|
_: 2
|
|
73
|
-
}, 1024)) :
|
|
74
|
-
|
|
75
|
-
], 10,
|
|
76
|
-
])) :
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
v(t.$slots, "right", {}, void 0, !0)
|
|
68
|
+
}, 1024)) : v("", !0),
|
|
69
|
+
i("span", null, x(e.title), 1)
|
|
70
|
+
], 10, O))), 128))
|
|
71
|
+
])) : v("", !0),
|
|
72
|
+
i("div", R, [
|
|
73
|
+
p(t.$slots, "right", {}, void 0, !0)
|
|
80
74
|
])
|
|
81
75
|
])
|
|
82
76
|
], 4));
|
|
83
77
|
}
|
|
84
78
|
});
|
|
85
79
|
export {
|
|
86
|
-
|
|
80
|
+
U as default
|
|
87
81
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AppLayout.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-646eac1d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElWatermark as
|
|
3
|
-
import { useRoute as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
import { useMenusDataDispatch as z } from "../../hooks/menus-dispatch.mjs";
|
|
14
|
-
const re = /* @__PURE__ */ P({
|
|
1
|
+
import { defineComponent as F, provide as m, computed as r, markRaw as H, watch as v, openBlock as s, createElementBlock as f, normalizeClass as O, createVNode as p, unref as a, withCtx as n, createBlock as g, resolveDynamicComponent as S, createSlots as I, normalizeStyle as Y, createCommentVNode as x, renderList as G, renderSlot as $ } from "vue";
|
|
2
|
+
import { ElWatermark as D } from "element-plus";
|
|
3
|
+
import { useRoute as N, useRouter as U } from "vue-router";
|
|
4
|
+
import z from "./AppBody.vue.mjs";
|
|
5
|
+
import K from "./AppShell.vue.mjs";
|
|
6
|
+
import V from "../modal/ModalShelf.vue.mjs";
|
|
7
|
+
import { APP_LAYOUT_BRIDGE_KEY as W, APP_LAYOUT_APP_STORE_KEY as j, APP_LAYOUT_USER_STORE_KEY as q } from "../../inject/key.mjs";
|
|
8
|
+
import { useAdminThemeApply as J } from "../../hooks/use-admin-theme-apply.mjs";
|
|
9
|
+
import { useAdminViewportApply as Q } from "../../hooks/use-admin-viewport-apply.mjs";
|
|
10
|
+
import { flatRouteMetaResolveRaw as X } from "../../utils/router.mjs";
|
|
11
|
+
import { useMenusDataDispatch as Z } from "../../hooks/menus-dispatch.mjs";
|
|
12
|
+
const me = /* @__PURE__ */ F({
|
|
15
13
|
__name: "AppLayout",
|
|
16
14
|
props: {
|
|
17
15
|
adminBridge: {},
|
|
@@ -20,101 +18,121 @@ const re = /* @__PURE__ */ P({
|
|
|
20
18
|
watermarkContent: {},
|
|
21
19
|
sidebarAboveHeader: { type: Boolean, default: !1 }
|
|
22
20
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
21
|
+
setup(u) {
|
|
22
|
+
const e = u, _ = {
|
|
25
23
|
color: "rgba(0,0,0,0.08)",
|
|
26
24
|
fontSize: 12
|
|
27
25
|
};
|
|
28
|
-
|
|
29
|
-
getThemeConfig: () =>
|
|
30
|
-
getThemeIsDark: () =>
|
|
31
|
-
}),
|
|
32
|
-
getViewportConfig: () =>
|
|
26
|
+
m(W, e.adminBridge), m(j, e.appStore), m(q, e.userStore), J({
|
|
27
|
+
getThemeConfig: () => e.adminBridge.APP_THEME_CONFIG,
|
|
28
|
+
getThemeIsDark: () => e.adminBridge.themeIsDark.value
|
|
29
|
+
}), Q({
|
|
30
|
+
getViewportConfig: () => e.adminBridge.APP_LAYOUT_VIEWPORT_CONFIG,
|
|
31
|
+
getGapConfig: () => e.adminBridge.APP_LAYOUT_GAP_CONFIG
|
|
33
32
|
});
|
|
34
|
-
const d =
|
|
35
|
-
|
|
33
|
+
const d = r(() => e.adminBridge.generateRouteMetaRawTree(
|
|
34
|
+
e.adminBridge.getRoutes(),
|
|
36
35
|
{
|
|
37
36
|
parentPath: "",
|
|
38
|
-
filterFn: (
|
|
39
|
-
sortFn: (
|
|
37
|
+
filterFn: (t, i, o) => t.checkPermission ? t.menuShow && e.userStore.havePermissionByKey(t.permissionKey) : t.menuShow && (!o || i),
|
|
38
|
+
sortFn: (t, i) => t.menuSort - i.menuSort
|
|
40
39
|
}
|
|
41
|
-
)),
|
|
42
|
-
sidebarMenus:
|
|
43
|
-
headerMenus:
|
|
44
|
-
activeMenu:
|
|
45
|
-
activeModuleMenu:
|
|
46
|
-
needRedirectToFirstChildMenu:
|
|
47
|
-
} =
|
|
40
|
+
)), l = r(() => X(d.value)), {
|
|
41
|
+
sidebarMenus: c,
|
|
42
|
+
headerMenus: A,
|
|
43
|
+
activeMenu: M,
|
|
44
|
+
activeModuleMenu: w,
|
|
45
|
+
needRedirectToFirstChildMenu: y
|
|
46
|
+
} = Z({
|
|
48
47
|
getMenus: () => d.value,
|
|
49
|
-
getMenuFlatList: () =>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
() =>
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
getMenuFlatList: () => l.value,
|
|
49
|
+
// 分流意图**纯归布局**(preset.layout.extractLevel1ToHeader,经 themeLayout 暴露):
|
|
50
|
+
// true 时 1 级路由模块提取到 header(headerMenus 才有内容)、sidebar 显模块下子菜单;
|
|
51
|
+
// 缺省 false → 经典布局(全菜单在 sidebar、headerMenus 空)。appStore 不再持此意图。
|
|
52
|
+
getExtractLevel1ToHeader: () => e.adminBridge.themeLayout.value.extractLevel1ToHeader
|
|
53
|
+
}), b = H(K), L = r(
|
|
54
|
+
() => e.adminBridge.themeLayout.value.shell ?? b
|
|
55
|
+
), P = [
|
|
56
|
+
"brand",
|
|
57
|
+
"userEntry",
|
|
58
|
+
"settings",
|
|
59
|
+
"themeSwitcher",
|
|
60
|
+
"aside"
|
|
61
|
+
], B = r(() => e.userStore.isLogin), h = r(() => e.appStore.showHeader), C = r(() => e.appStore.showSidebar), T = r(() => ({
|
|
62
|
+
position: "fixed",
|
|
63
|
+
top: "0",
|
|
64
|
+
left: "0",
|
|
65
|
+
right: "0",
|
|
66
|
+
height: `calc(${e.appStore.headerStyle.top} + ${e.appStore.headerStyle.height})`,
|
|
67
|
+
background: e.adminBridge.themeColors.value.bodyColor,
|
|
68
|
+
zIndex: 1,
|
|
69
|
+
pointerEvents: "none"
|
|
70
|
+
})), E = r(() => e.appStore.showAside);
|
|
71
|
+
v(
|
|
72
|
+
() => c.value.length,
|
|
73
|
+
(t) => {
|
|
74
|
+
e.appStore.changeSidebarHasMenusStatus(!!t);
|
|
56
75
|
},
|
|
57
76
|
{
|
|
58
77
|
immediate: !0
|
|
59
78
|
}
|
|
60
79
|
);
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
(
|
|
65
|
-
|
|
80
|
+
const R = N(), k = U();
|
|
81
|
+
return v(
|
|
82
|
+
y,
|
|
83
|
+
(t) => {
|
|
84
|
+
t && (console.log(`${R.path}需要重定向到${t.path}`), k.replace(t.path));
|
|
66
85
|
},
|
|
67
86
|
{
|
|
68
87
|
immediate: !0
|
|
69
88
|
}
|
|
70
|
-
), (
|
|
71
|
-
class:
|
|
72
|
-
"app-layout_noLogin": !
|
|
89
|
+
), (t, i) => (s(), f("div", {
|
|
90
|
+
class: O(["app-layout", {
|
|
91
|
+
"app-layout_noLogin": !B.value
|
|
73
92
|
}])
|
|
74
93
|
}, [
|
|
75
|
-
|
|
76
|
-
content:
|
|
77
|
-
font:
|
|
94
|
+
p(a(D), {
|
|
95
|
+
content: u.watermarkContent,
|
|
96
|
+
font: _,
|
|
78
97
|
zIndex: 1e4
|
|
79
98
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
|
|
82
|
-
default:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
99
|
+
default: n(() => [
|
|
100
|
+
p(a(V), { level: "app" }, {
|
|
101
|
+
default: n(() => [
|
|
102
|
+
(s(), g(S(L.value), {
|
|
103
|
+
menus: d.value,
|
|
104
|
+
menuFlatList: l.value,
|
|
105
|
+
sidebarMenus: a(c),
|
|
106
|
+
headerMenus: a(A),
|
|
107
|
+
activeMenu: a(M),
|
|
108
|
+
activeModuleMenu: a(w),
|
|
109
|
+
showHeader: h.value,
|
|
110
|
+
showSidebar: C.value,
|
|
111
|
+
showAside: E.value,
|
|
112
|
+
sidebarAboveHeader: u.sidebarAboveHeader
|
|
113
|
+
}, I({
|
|
114
|
+
default: n(({ Footer: o }) => [
|
|
115
|
+
p(z, { menuFlatList: l.value }, {
|
|
116
|
+
footer: n(() => [
|
|
117
|
+
(s(), g(S(o)))
|
|
118
|
+
]),
|
|
119
|
+
_: 2
|
|
120
|
+
}, 1032, ["menuFlatList"]),
|
|
121
|
+
h.value ? (s(), f("div", {
|
|
122
|
+
key: 0,
|
|
123
|
+
class: "app-header-gap-cover",
|
|
124
|
+
style: Y(T.value)
|
|
125
|
+
}, null, 4)) : x("", !0)
|
|
86
126
|
]),
|
|
87
|
-
_:
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
u(e.$slots, "sidebar-top", {}, void 0, !0)
|
|
97
|
-
]),
|
|
98
|
-
bottom: o(() => [
|
|
99
|
-
u(e.$slots, "sidebar-bottom", {}, void 0, !0)
|
|
100
|
-
]),
|
|
101
|
-
_: 3
|
|
102
|
-
}, 8, ["show", "aboveHeader", "menus", "menuFlatList"]),
|
|
103
|
-
r(C, {
|
|
104
|
-
show: A.value,
|
|
105
|
-
menus: a(h),
|
|
106
|
-
activeMenu: a(v),
|
|
107
|
-
activeModuleMenu: a(g),
|
|
108
|
-
menuFlatList: i.value
|
|
109
|
-
}, {
|
|
110
|
-
left: o(() => [
|
|
111
|
-
u(e.$slots, "header-left", {}, void 0, !0)
|
|
112
|
-
]),
|
|
113
|
-
right: o(() => [
|
|
114
|
-
u(e.$slots, "header-right", {}, void 0, !0)
|
|
115
|
-
]),
|
|
116
|
-
_: 3
|
|
117
|
-
}, 8, ["show", "menus", "activeMenu", "activeModuleMenu", "menuFlatList"])
|
|
127
|
+
_: 2
|
|
128
|
+
}, [
|
|
129
|
+
G(P, (o) => ({
|
|
130
|
+
name: o,
|
|
131
|
+
fn: n(() => [
|
|
132
|
+
$(t.$slots, o, {}, void 0, !0)
|
|
133
|
+
])
|
|
134
|
+
}))
|
|
135
|
+
]), 1032, ["menus", "menuFlatList", "sidebarMenus", "headerMenus", "activeMenu", "activeModuleMenu", "showHeader", "showSidebar", "showAside", "sidebarAboveHeader"]))
|
|
118
136
|
]),
|
|
119
137
|
_: 3
|
|
120
138
|
})
|
|
@@ -125,5 +143,5 @@ const re = /* @__PURE__ */ P({
|
|
|
125
143
|
}
|
|
126
144
|
});
|
|
127
145
|
export {
|
|
128
|
-
|
|
146
|
+
me as default
|
|
129
147
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as u, createElementBlock as r, Fragment as l, renderSlot as o, createVNode as a, withCtx as s } from "vue";
|
|
2
|
+
import d from "./AppSidebar.vue.mjs";
|
|
3
|
+
import m from "./AppAside.vue.mjs";
|
|
4
|
+
import h from "./AppHeader.vue.mjs";
|
|
5
|
+
import M from "./AppFooter.vue.mjs";
|
|
6
|
+
import n from "./AppTheme.vue.mjs";
|
|
7
|
+
const F = /* @__PURE__ */ i({
|
|
8
|
+
__name: "AppShell",
|
|
9
|
+
props: {
|
|
10
|
+
menus: {},
|
|
11
|
+
menuFlatList: {},
|
|
12
|
+
sidebarMenus: {},
|
|
13
|
+
headerMenus: {},
|
|
14
|
+
activeMenu: {},
|
|
15
|
+
activeModuleMenu: {},
|
|
16
|
+
showHeader: { type: Boolean },
|
|
17
|
+
showSidebar: { type: Boolean },
|
|
18
|
+
showAside: { type: Boolean },
|
|
19
|
+
sidebarAboveHeader: { type: Boolean }
|
|
20
|
+
},
|
|
21
|
+
setup(e) {
|
|
22
|
+
return (t, w) => (u(), r(l, null, [
|
|
23
|
+
o(t.$slots, "default", { Footer: M }),
|
|
24
|
+
a(d, {
|
|
25
|
+
show: e.showSidebar,
|
|
26
|
+
aboveHeader: e.sidebarAboveHeader,
|
|
27
|
+
menus: e.sidebarMenus,
|
|
28
|
+
menuFlatList: e.menuFlatList
|
|
29
|
+
}, null, 8, ["show", "aboveHeader", "menus", "menuFlatList"]),
|
|
30
|
+
a(m, { show: e.showAside }, {
|
|
31
|
+
default: s(() => [
|
|
32
|
+
o(t.$slots, "aside")
|
|
33
|
+
]),
|
|
34
|
+
_: 3
|
|
35
|
+
}, 8, ["show"]),
|
|
36
|
+
a(h, {
|
|
37
|
+
show: e.showHeader,
|
|
38
|
+
menus: e.headerMenus,
|
|
39
|
+
activeMenu: e.activeMenu,
|
|
40
|
+
activeModuleMenu: e.activeModuleMenu,
|
|
41
|
+
menuFlatList: e.menuFlatList
|
|
42
|
+
}, {
|
|
43
|
+
left: s(() => [
|
|
44
|
+
o(t.$slots, "brand")
|
|
45
|
+
]),
|
|
46
|
+
right: s(() => [
|
|
47
|
+
o(t.$slots, "themeSwitcher", { Default: n }, () => [
|
|
48
|
+
a(n)
|
|
49
|
+
]),
|
|
50
|
+
o(t.$slots, "userEntry"),
|
|
51
|
+
o(t.$slots, "settings")
|
|
52
|
+
]),
|
|
53
|
+
_: 3
|
|
54
|
+
}, 8, ["show", "menus", "activeMenu", "activeModuleMenu", "menuFlatList"])
|
|
55
|
+
], 64));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
F as default
|
|
60
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AppSidebar.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import p from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ p(o, [["__scopeId", "data-v-1dee248d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ElTooltip as
|
|
5
|
-
import { ArrowRightBold as
|
|
6
|
-
import { APP_LAYOUT_APP_STORE_KEY as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as k, useCssVars as A, inject as v, computed as e, ref as b, openBlock as f, createElementBlock as T, normalizeStyle as g, createVNode as a, unref as o, withCtx as i, renderSlot as h, createElementVNode as C, createBlock as H, createCommentVNode as L } from "vue";
|
|
2
|
+
import w from "../menu/MenuTree.vue.mjs";
|
|
3
|
+
import y from "../display/WatchSize.vue.mjs";
|
|
4
|
+
import { ElTooltip as F, ElIcon as I } from "element-plus";
|
|
5
|
+
import { ArrowRightBold as V } from "@element-plus/icons-vue";
|
|
6
|
+
import { APP_LAYOUT_APP_STORE_KEY as Y, APP_LAYOUT_BRIDGE_KEY as N } from "../../inject/key.mjs";
|
|
7
|
+
const O = { class: "app-sidebar-shim" }, D = /* @__PURE__ */ k({
|
|
8
8
|
__name: "AppSidebar",
|
|
9
9
|
props: {
|
|
10
10
|
show: { type: Boolean },
|
|
@@ -13,71 +13,68 @@ const R = { class: "app-sidebar-shim" }, G = /* @__PURE__ */ w({
|
|
|
13
13
|
menuFlatList: {}
|
|
14
14
|
},
|
|
15
15
|
setup(s) {
|
|
16
|
-
A((
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
v0a70f74c: B.value,
|
|
23
|
-
v1ffafb76: a.value.bodyColor,
|
|
24
|
-
v738d1dcc: a.value.primaryColor
|
|
16
|
+
A((d) => ({
|
|
17
|
+
v368510bd: E.value,
|
|
18
|
+
v7b09fce5: _.value,
|
|
19
|
+
v1098f49b: B.value,
|
|
20
|
+
cc02eed6: l.value.bodyColor,
|
|
21
|
+
v56d0884d: l.value.primaryColor
|
|
25
22
|
}));
|
|
26
|
-
const
|
|
27
|
-
() => `${Math.max(
|
|
28
|
-
), B = e(() => `${
|
|
29
|
-
transform: `rotate(${
|
|
30
|
-
})),
|
|
31
|
-
return (
|
|
23
|
+
const S = s, u = v(Y), c = e(() => u.sidebarStyle), p = b(0), m = b(0), x = e(() => parseFloat(String(c.value.paddingTop ?? "")) || 0), _ = e(
|
|
24
|
+
() => `${Math.max(x.value, p.value)}px`
|
|
25
|
+
), B = e(() => `${m.value}px`), E = e(() => S.aboveHeader ? 2 : 0), r = e(() => u.sidebarIsCollapse), P = e(() => ({
|
|
26
|
+
transform: `rotate(${r.value ? 0 : 180}deg)`
|
|
27
|
+
})), $ = v(N), l = e(() => $.themeColors.value);
|
|
28
|
+
return (d, t) => (f(), T("div", {
|
|
32
29
|
class: "app-sidebar",
|
|
33
|
-
style:
|
|
30
|
+
style: g(c.value)
|
|
34
31
|
}, [
|
|
35
|
-
|
|
32
|
+
a(o(y), {
|
|
36
33
|
class: "app-sidebar-top",
|
|
37
|
-
onHeightChange: t[0] || (t[0] = (
|
|
34
|
+
onHeightChange: t[0] || (t[0] = (n) => p.value = n)
|
|
38
35
|
}, {
|
|
39
|
-
default:
|
|
40
|
-
|
|
36
|
+
default: i(() => [
|
|
37
|
+
h(d.$slots, "top", {}, void 0, !0)
|
|
41
38
|
]),
|
|
42
39
|
_: 3
|
|
43
40
|
}),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
collapse:
|
|
41
|
+
C("div", O, [
|
|
42
|
+
a(o(w), {
|
|
43
|
+
collapse: r.value,
|
|
47
44
|
menus: s.menus,
|
|
48
45
|
style: { height: "100%" },
|
|
49
|
-
"background-color":
|
|
50
|
-
"text-color":
|
|
51
|
-
"active-text-color":
|
|
46
|
+
"background-color": l.value.bodyColor,
|
|
47
|
+
"text-color": l.value.baseColor,
|
|
48
|
+
"active-text-color": l.value.primaryColor,
|
|
52
49
|
menuFlatList: s.menuFlatList,
|
|
53
50
|
routerMode: ""
|
|
54
51
|
}, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
|
|
55
52
|
]),
|
|
56
|
-
|
|
53
|
+
a(o(y), {
|
|
57
54
|
class: "app-sidebar-bottom",
|
|
58
|
-
onHeightChange: t[1] || (t[1] = (
|
|
55
|
+
onHeightChange: t[1] || (t[1] = (n) => m.value = n)
|
|
59
56
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
57
|
+
default: i(() => [
|
|
58
|
+
h(d.$slots, "bottom", {}, void 0, !0)
|
|
62
59
|
]),
|
|
63
60
|
_: 3
|
|
64
61
|
}),
|
|
65
|
-
s.show ? (
|
|
62
|
+
s.show ? (f(), H(o(F), {
|
|
66
63
|
key: 0,
|
|
67
|
-
content:
|
|
64
|
+
content: r.value ? "展开" : "收起",
|
|
68
65
|
placement: "right",
|
|
69
66
|
"show-after": 200
|
|
70
67
|
}, {
|
|
71
|
-
default:
|
|
72
|
-
|
|
68
|
+
default: i(() => [
|
|
69
|
+
C("div", {
|
|
73
70
|
class: "app-sidebar-toggle",
|
|
74
|
-
onClick: t[2] || (t[2] = (
|
|
71
|
+
onClick: t[2] || (t[2] = (n) => o(u).changeSidebarCollapseStatus(!r.value))
|
|
75
72
|
}, [
|
|
76
|
-
|
|
77
|
-
default:
|
|
78
|
-
|
|
73
|
+
a(o(I), null, {
|
|
74
|
+
default: i(() => [
|
|
75
|
+
a(o(V), {
|
|
79
76
|
class: "app-sidebar-toggle-icon",
|
|
80
|
-
style:
|
|
77
|
+
style: g(P.value)
|
|
81
78
|
}, null, 8, ["style"])
|
|
82
79
|
]),
|
|
83
80
|
_: 1
|
|
@@ -90,5 +87,5 @@ const R = { class: "app-sidebar-shim" }, G = /* @__PURE__ */ w({
|
|
|
90
87
|
}
|
|
91
88
|
});
|
|
92
89
|
export {
|
|
93
|
-
|
|
90
|
+
D as default
|
|
94
91
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AppTheme.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import p from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ p(o, [["__scopeId", "data-v-89d81e34"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|