mamba-layout 0.2.0 → 0.3.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/dist/layout/BaseLayout.css +1 -1
- package/dist/layout/BaseLayout.vue.js +2 -2
- package/dist/layout/BaseLayout.vue2.js +79 -43
- package/dist/layout/components/LayoutBreadcrumb.vue.d.ts +1 -1
- package/dist/layout/components/UserInfo.vue.js +2 -2
- package/dist/layout/components/UserInfo2.css +1 -1
- package/dist/layout/components/mobile/AppSelectMobile.vue.js +13 -13
- package/dist/layout/components/mobile/AsideBarMobile.css +1 -1
- package/dist/layout/components/mobile/AsideBarMobile.vue.js +3 -3
- package/dist/layout/components/mobile/AsideBarMobile.vue2.js +24 -22
- package/dist/layout/components/mobile/HeaderRightMobile.css +1 -1
- package/dist/layout/components/mobile/HeaderRightMobile.vue.js +1 -1
- package/dist/layout/components/mobile/HeaderRightMobile.vue2.js +17 -19
- package/dist/layout/components/mobile/MobileMenuToggle.css +1 -1
- package/dist/layout/components/mobile/MobileMenuToggle.vue.js +1 -1
- package/dist/layout/components/mobile/MobileMenuToggle.vue2.js +15 -13
- package/dist/layout/hooks/useState.js +56 -55
- package/dist/layout.css +1 -1
- package/dist/layout.es.js +9402 -9491
- package/dist/layout.global.js +30 -30
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.layout-shell[data-v-
|
|
1
|
+
.layout-shell[data-v-b3392308]{background:var(--ui-topnav-bg);color:var(--ui-text-primary)}.layout-shell__overlay[data-v-b3392308]{background:#000000b3}.layout-page-view[data-v-b3392308]{display:flex;flex:1 1 auto;flex-direction:column;width:100%;min-width:0;min-height:0;background:var(--ui-bg-page);contain:paint}.layout-page-enter-active[data-v-b3392308],.layout-page-leave-active[data-v-b3392308]{transition:opacity var(--ui-transition-base),transform var(--ui-transition-base);will-change:opacity,transform}.layout-page-enter-from[data-v-b3392308]{opacity:0;transform:translate3d(8px,0,0)}.layout-page-leave-to[data-v-b3392308]{opacity:0;transform:translate3d(-6px,0,0)}@media(prefers-reduced-motion:reduce){.layout-page-enter-active[data-v-b3392308],.layout-page-leave-active[data-v-b3392308]{transition:none}.layout-page-enter-from[data-v-b3392308],.layout-page-leave-to[data-v-b3392308]{opacity:1;transform:none}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./BaseLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b3392308"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,56 +1,87 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { provideSetting as
|
|
7
|
-
import { useStateHook as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as E, computed as A, watchEffect as C, watch as S, onMounted as M, onUnmounted as N, resolveComponent as j, openBlock as s, createElementBlock as f, createVNode as u, withCtx as c, renderSlot as K, createElementVNode as p, unref as y, createBlock as v, Transition as k, resolveDynamicComponent as O, createCommentVNode as R } from "vue";
|
|
2
|
+
import V from "./components/AsideBar.vue.js";
|
|
3
|
+
import $ from "./components/HeaderBar.vue.js";
|
|
4
|
+
import H from "./components/mobile/AsideBarMobile.vue.js";
|
|
5
|
+
import P from "../assets/logo.png.js";
|
|
6
|
+
import { provideSetting as D } from "./hooks/useSetting.js";
|
|
7
|
+
import { useStateHook as T } from "./hooks/useState.js";
|
|
8
|
+
const U = { class: "layout-shell w-full flex flex-col" }, q = { class: "layout-shell__body flex flex-1 min-h-0 overflow-hidden" }, z = { class: "layout-shell__main flex flex-col flex-1 min-h-0 min-w-0 h-full" }, F = { class: "layout-shell__content flex-1 w-full min-h-0 flex flex-col overflow-hidden" }, Z = /* @__PURE__ */ E({
|
|
9
9
|
__name: "BaseLayout",
|
|
10
10
|
props: {
|
|
11
11
|
setting: {}
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
var
|
|
13
|
+
setup(x) {
|
|
14
|
+
const l = x, L = A(() => {
|
|
15
|
+
var e, o, a, t, n, g, w;
|
|
16
16
|
return {
|
|
17
|
-
...
|
|
18
|
-
logo: ((
|
|
19
|
-
menus: ((
|
|
20
|
-
accountMenu: ((
|
|
21
|
-
user: ((
|
|
22
|
-
appList: ((
|
|
23
|
-
onLogin: (g =
|
|
24
|
-
onLogout: (
|
|
17
|
+
...l.setting || {},
|
|
18
|
+
logo: ((e = l.setting) == null ? void 0 : e.logo) || P,
|
|
19
|
+
menus: ((o = l.setting) == null ? void 0 : o.menus) || [],
|
|
20
|
+
accountMenu: ((a = l.setting) == null ? void 0 : a.accountMenu) || [],
|
|
21
|
+
user: ((t = l.setting) == null ? void 0 : t.user) ?? null,
|
|
22
|
+
appList: ((n = l.setting) == null ? void 0 : n.appList) || [],
|
|
23
|
+
onLogin: (g = l.setting) == null ? void 0 : g.onLogin,
|
|
24
|
+
onLogout: (w = l.setting) == null ? void 0 : w.onLogout
|
|
25
25
|
};
|
|
26
26
|
});
|
|
27
|
-
|
|
28
|
-
const { isMobile:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
C(() => void D(L.value));
|
|
28
|
+
const { isMobile: i, sideOpen: d } = T();
|
|
29
|
+
let m = "", r = !1;
|
|
30
|
+
const h = () => void (d.value = !1), B = (e) => {
|
|
31
|
+
const o = e.matched[1];
|
|
32
|
+
if (!o) return e.path;
|
|
33
|
+
const a = b(o, e);
|
|
34
|
+
return [o.path, a].filter(Boolean).join("|");
|
|
35
|
+
}, b = (e, o) => Array.from(
|
|
36
|
+
e.path.matchAll(/:(\w+)/g),
|
|
37
|
+
([, t]) => t
|
|
38
|
+
).map((t) => {
|
|
39
|
+
const n = o.params[t];
|
|
40
|
+
return `${t}:${Array.isArray(n) ? n.join(",") : n || ""}`;
|
|
41
|
+
}).join("|"), _ = (e) => {
|
|
42
|
+
e.key === "Escape" && i.value && d.value && h();
|
|
43
|
+
};
|
|
44
|
+
return S(
|
|
45
|
+
() => i.value && d.value,
|
|
46
|
+
(e) => {
|
|
47
|
+
if (!(typeof document > "u")) {
|
|
48
|
+
if (e && !r) {
|
|
49
|
+
m = document.body.style.overflow, document.body.style.overflow = "hidden", r = !0;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
!e && r && (document.body.style.overflow = m, r = !1);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{ immediate: !0 }
|
|
56
|
+
), M(() => {
|
|
57
|
+
window.addEventListener("keydown", _);
|
|
58
|
+
}), N(() => {
|
|
59
|
+
window.removeEventListener("keydown", _), typeof document < "u" && r && (document.body.style.overflow = m);
|
|
60
|
+
}), (e, o) => {
|
|
61
|
+
const a = j("router-view");
|
|
62
|
+
return s(), f("div", U, [
|
|
63
|
+
u($, null, {
|
|
33
64
|
default: c(() => [
|
|
34
|
-
|
|
65
|
+
K(e.$slots, "header-right", {}, void 0, !0)
|
|
35
66
|
]),
|
|
36
67
|
_: 3
|
|
37
68
|
}),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
u(
|
|
43
|
-
default: c(({ Component:
|
|
44
|
-
u(
|
|
45
|
-
name: String(
|
|
69
|
+
p("div", q, [
|
|
70
|
+
y(i) ? (s(), v(H, { key: 1 })) : (s(), v(V, { key: 0 })),
|
|
71
|
+
p("main", z, [
|
|
72
|
+
p("div", F, [
|
|
73
|
+
u(a, null, {
|
|
74
|
+
default: c(({ Component: t, route: n }) => [
|
|
75
|
+
u(k, {
|
|
76
|
+
name: String(n.meta.transition || "layout-page"),
|
|
46
77
|
mode: "out-in"
|
|
47
78
|
}, {
|
|
48
79
|
default: c(() => [
|
|
49
|
-
(
|
|
50
|
-
key:
|
|
80
|
+
(s(), f("div", {
|
|
81
|
+
key: B(n),
|
|
51
82
|
class: "layout-page-view"
|
|
52
83
|
}, [
|
|
53
|
-
(
|
|
84
|
+
(s(), v(O(t)))
|
|
54
85
|
]))
|
|
55
86
|
]),
|
|
56
87
|
_: 2
|
|
@@ -61,15 +92,20 @@ const O = { class: "layout-shell w-full h-screen flex flex-col" }, D = { class:
|
|
|
61
92
|
])
|
|
62
93
|
])
|
|
63
94
|
]),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
95
|
+
u(k, { name: "layout-overlay" }, {
|
|
96
|
+
default: c(() => [
|
|
97
|
+
y(i) && y(d) ? (s(), f("div", {
|
|
98
|
+
key: 0,
|
|
99
|
+
class: "layout-shell__overlay",
|
|
100
|
+
onClick: h
|
|
101
|
+
})) : R("", !0)
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
})
|
|
69
105
|
]);
|
|
70
106
|
};
|
|
71
107
|
}
|
|
72
108
|
});
|
|
73
109
|
export {
|
|
74
|
-
|
|
110
|
+
Z as default
|
|
75
111
|
};
|
|
@@ -18,8 +18,8 @@ type __VLS_Props = {
|
|
|
18
18
|
};
|
|
19
19
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
20
|
parentPath: string;
|
|
21
|
-
currentTitle: string;
|
|
22
21
|
items: LayoutBreadcrumbItem[];
|
|
22
|
+
currentTitle: string;
|
|
23
23
|
preserveQueryKeys: string[];
|
|
24
24
|
showCurrent: boolean;
|
|
25
25
|
showBack: boolean;
|
|
@@ -2,7 +2,7 @@ import o from "./UserInfo.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ac052463"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
f as default
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.user-info__trigger[data-v-
|
|
1
|
+
.user-info__trigger[data-v-ac052463]{display:inline-flex;width:28px;height:28px;overflow:hidden;border-radius:var(--ui-radius-pill);background:var(--ui-avatar-bg, var(--el-color-primary));border:1px solid var(--ui-topnav-border);align-items:center;justify-content:center;font-size:12px;font-weight:600;color:var(--ui-text-on-brand);cursor:pointer;flex-shrink:0;-webkit-user-select:none;user-select:none;transition:border-color var(--ui-transition-fast),filter var(--ui-transition-fast)}.user-info__trigger[data-v-ac052463]:hover{border-color:var(--ui-topnav-foreground);filter:brightness(1.05)}.user-info__panel[data-v-ac052463]{display:grid;gap:2px}.user-info__profile[data-v-ac052463]{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;align-items:center;padding:8px 8px 10px}.user-info__profile-avatar[data-v-ac052463]{width:44px;height:44px;overflow:hidden;border-radius:var(--ui-radius-pill);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--ui-avatar-bg, var(--el-color-primary));color:var(--ui-text-on-brand);font-size:16px;font-weight:700}.user-info__profile-main[data-v-ac052463]{min-width:0}.user-info__display-name[data-v-ac052463]{color:var(--ui-text-primary);font-size:14px;font-weight:700;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-info__username[data-v-ac052463]{margin-top:2px;color:var(--ui-text-muted);font-size:12px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-info__meta[data-v-ac052463]{display:grid;gap:2px;padding:8px;margin-bottom:2px;border-radius:var(--ui-radius-control);background:var(--ui-bg-muted)}.user-info__meta-row[data-v-ac052463]{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px;align-items:center;min-height:24px;font-size:12px;line-height:18px}.user-info__meta-label[data-v-ac052463]{color:var(--ui-text-muted)}.user-info__meta-value[data-v-ac052463]{min-width:0;color:var(--ui-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}.user-info__item[data-v-ac052463]{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:var(--ui-radius-control);color:var(--ui-text-primary);font-size:12px;cursor:pointer;transition:background var(--ui-transition-fast),color var(--ui-transition-fast)}.user-info__item[data-v-ac052463]:hover{background:var(--ui-bg-muted)}.user-info__item--danger[data-v-ac052463]{color:var(--el-color-danger)}.user-info__divider[data-v-ac052463]{height:1px;background:var(--ui-border-soft);margin:4px 0}
|
|
@@ -3,17 +3,17 @@ import { useApp as I } from "../../hooks/useApp.js";
|
|
|
3
3
|
import { injectLayoutContext as w } from "../../hooks/useState.js";
|
|
4
4
|
const L = {
|
|
5
5
|
key: 0,
|
|
6
|
-
class: "w-
|
|
6
|
+
class: "min-w-0 flex-1"
|
|
7
7
|
}, F = /* @__PURE__ */ C({
|
|
8
8
|
__name: "AppSelectMobile",
|
|
9
9
|
setup(N) {
|
|
10
10
|
const { currentAppId: v } = w(), { appList: s, getAppPath: a, findAppById: h } = I(), g = x(() => {
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
}), k = (
|
|
14
|
-
|
|
11
|
+
const n = h(v.value);
|
|
12
|
+
return n ? a(n) : "";
|
|
13
|
+
}), k = (n) => {
|
|
14
|
+
n && (location.href = n);
|
|
15
15
|
};
|
|
16
|
-
return (
|
|
16
|
+
return (n, P) => {
|
|
17
17
|
var d;
|
|
18
18
|
const _ = p("el-option"), y = p("el-option-group"), b = p("el-select");
|
|
19
19
|
return (d = l(s)) != null && d.length ? (e(), o("div", L, [
|
|
@@ -23,17 +23,17 @@ const L = {
|
|
|
23
23
|
onChange: k
|
|
24
24
|
}, {
|
|
25
25
|
default: i(() => [
|
|
26
|
-
(e(!0), o(c, null, f(l(s), (
|
|
26
|
+
(e(!0), o(c, null, f(l(s), (t) => {
|
|
27
27
|
var m;
|
|
28
28
|
return e(), o(c, {
|
|
29
|
-
key:
|
|
29
|
+
key: t.appId
|
|
30
30
|
}, [
|
|
31
|
-
(m =
|
|
31
|
+
(m = t.children) != null && m.length ? (e(), u(y, {
|
|
32
32
|
key: 0,
|
|
33
|
-
label:
|
|
33
|
+
label: t.name
|
|
34
34
|
}, {
|
|
35
35
|
default: i(() => [
|
|
36
|
-
(e(!0), o(c, null, f(
|
|
36
|
+
(e(!0), o(c, null, f(t.children, (r) => (e(), u(_, {
|
|
37
37
|
key: r.appId,
|
|
38
38
|
label: r.name,
|
|
39
39
|
value: l(a)(r),
|
|
@@ -43,8 +43,8 @@ const L = {
|
|
|
43
43
|
_: 2
|
|
44
44
|
}, 1032, ["label"])) : (e(), u(_, {
|
|
45
45
|
key: 1,
|
|
46
|
-
label:
|
|
47
|
-
value: l(a)(
|
|
46
|
+
label: t.name,
|
|
47
|
+
value: l(a)(t)
|
|
48
48
|
}, null, 8, ["label", "value"]))
|
|
49
49
|
], 64);
|
|
50
50
|
}), 128))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.aside-bar-mobile[data-v-
|
|
1
|
+
.aside-bar-mobile[data-v-ffd10c8b]{width:min(86vw,320px);max-width:calc(100vw - 32px);height:100vh;height:100dvh;z-index:240;border-right:1px solid var(--ui-sidebar-border);background:var(--ui-sidebar-bg);color:var(--ui-sidebar-foreground);box-shadow:var(--ui-shadow-pop);will-change:transform}.aside-bar-mobile__head[data-v-ffd10c8b]{min-height:var(--layout-mobile-header-height, 56px);padding:10px 12px;border-bottom:1px solid var(--ui-sidebar-border);flex-shrink:0}.aside-bar-mobile__close[data-v-ffd10c8b]{width:36px;height:36px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--ui-sidebar-border);border-radius:var(--ui-radius-control);background:var(--ui-sidebar-accent);color:var(--ui-text-muted);cursor:pointer;transition:background var(--ui-transition-fast),color var(--ui-transition-fast),border-color var(--ui-transition-fast)}.aside-bar-mobile__close[data-v-ffd10c8b]:hover{background:var(--ui-sidebar-hover-bg);color:var(--ui-sidebar-foreground)}.aside-bar-mobile[data-v-ffd10c8b] .el-scrollbar{flex:1 1 auto;min-height:0}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AsideBarMobile.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ffd10c8b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
import { defineComponent as d, resolveComponent as
|
|
1
|
+
import { defineComponent as d, resolveComponent as r, unref as o, openBlock as _, createElementBlock as f, normalizeClass as p, createElementVNode as t, createVNode as e, withCtx as a, renderSlot as u, createCommentVNode as b } from "vue";
|
|
2
2
|
import { Fold as x } from "@element-plus/icons-vue";
|
|
3
3
|
import { injectLayoutContext as h } from "../../hooks/useState.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
4
|
+
import C from "../AsideSubMenus.vue.js";
|
|
5
|
+
import v from "./AppSelectMobile.vue.js";
|
|
6
|
+
import k from "./AsideUserMobile.vue.js";
|
|
7
|
+
const y = { class: "aside-bar-mobile__head flex items-center gap-3" }, S = { class: "p-3" }, M = /* @__PURE__ */ d({
|
|
8
8
|
__name: "AsideBarMobile",
|
|
9
9
|
setup($) {
|
|
10
|
-
const { menus:
|
|
11
|
-
return (
|
|
12
|
-
const m =
|
|
13
|
-
return o(
|
|
10
|
+
const { menus: l, sideOpen: n } = h(), i = () => void (n.value = !1);
|
|
11
|
+
return (s, B) => {
|
|
12
|
+
const m = r("el-icon"), c = r("el-scrollbar");
|
|
13
|
+
return o(l).length && !s.$route.meta.hideSidebar ? (_(), f("div", {
|
|
14
14
|
key: 0,
|
|
15
|
-
class: p(["aside-bar-mobile
|
|
15
|
+
class: p(["aside-bar-mobile fixed inset-y-0 left-0 z-200 flex min-h-0 flex-col transition-transform", [o(n) ? "translate-x-[0px]" : "translate-x-[-100%]"]])
|
|
16
16
|
}, [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
t("div", y, [
|
|
18
|
+
t("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
class: "aside-bar-mobile__close",
|
|
21
|
+
"aria-label": "Close menu",
|
|
22
|
+
onClick: i
|
|
21
23
|
}, [
|
|
22
24
|
e(m, null, {
|
|
23
|
-
default:
|
|
25
|
+
default: a(() => [
|
|
24
26
|
e(o(x))
|
|
25
27
|
]),
|
|
26
28
|
_: 1
|
|
27
29
|
})
|
|
28
30
|
]),
|
|
29
|
-
e(
|
|
31
|
+
e(v)
|
|
30
32
|
]),
|
|
31
33
|
e(c, { ref: "leftScrollRef" }, {
|
|
32
|
-
default:
|
|
33
|
-
|
|
34
|
-
e(
|
|
34
|
+
default: a(() => [
|
|
35
|
+
t("div", S, [
|
|
36
|
+
e(C, { menus: o(l) }, null, 8, ["menus"])
|
|
35
37
|
])
|
|
36
38
|
]),
|
|
37
39
|
_: 1
|
|
38
40
|
}, 512),
|
|
39
|
-
u(
|
|
40
|
-
e(
|
|
41
|
+
u(s.$slots, "sidebar-foot", {}, void 0, !0),
|
|
42
|
+
e(k)
|
|
41
43
|
], 2)) : b("", !0);
|
|
42
44
|
};
|
|
43
45
|
}
|
|
44
46
|
});
|
|
45
47
|
export {
|
|
46
|
-
|
|
48
|
+
M as default
|
|
47
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.header-right-mobile[data-v-
|
|
1
|
+
.header-right-mobile[data-v-48792b0a]{--nav-icon-btn-size: 40px;display:flex;align-items:center;gap:8px;padding-right:0;min-width:0}.header-right-mobile[data-v-48792b0a] .nav-icon-btn{--nav-icon-btn-size: 40px;--nav-icon-btn-color: var(--ui-topnav-foreground);--nav-icon-btn-bg: var(--ui-topnav-surface);--nav-icon-btn-border-color: var(--ui-topnav-border);--nav-icon-btn-hover-bg: var(--ui-topnav-hover);--nav-icon-btn-hover-color: var(--ui-topnav-foreground);--nav-icon-btn-hover-border-color: var(--ui-topnav-border)}.header-right-mobile__action[data-v-48792b0a]{--nav-icon-btn-color: var(--ui-topnav-foreground);--nav-icon-btn-bg: var(--ui-topnav-surface);--nav-icon-btn-border-color: var(--ui-topnav-border);--nav-icon-btn-hover-bg: var(--ui-topnav-hover);--nav-icon-btn-hover-color: var(--ui-topnav-foreground);--nav-icon-btn-hover-border-color: var(--ui-topnav-border)}@media(max-width:374px){.header-right-mobile[data-v-48792b0a]{--nav-icon-btn-size: 36px;gap:6px}.header-right-mobile[data-v-48792b0a] .nav-icon-btn{--nav-icon-btn-size: 36px}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HeaderRightMobile.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-48792b0a"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import { defineComponent as u, computed as d, openBlock as r, createElementBlock as p, createVNode as
|
|
2
|
-
import { useSetting as
|
|
3
|
-
import { redirectToLayoutLogin as
|
|
1
|
+
import { defineComponent as u, computed as d, openBlock as r, createElementBlock as p, createVNode as n, createBlock as l, withCtx as i, createElementVNode as s } from "vue";
|
|
2
|
+
import { useSetting as g } from "../../hooks/useSetting.js";
|
|
3
|
+
import { redirectToLayoutLogin as _ } from "../../utils/index.js";
|
|
4
4
|
import a from "../NavIconBtn.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import h from "
|
|
7
|
-
|
|
8
|
-
const k = { class: "header-right-mobile" }, E = /* @__PURE__ */ u({
|
|
5
|
+
import f from "../ThemeToggle.vue.js";
|
|
6
|
+
import h from "./AsideUserMobilePopover.vue.js";
|
|
7
|
+
const v = { class: "header-right-mobile" }, N = /* @__PURE__ */ u({
|
|
9
8
|
__name: "HeaderRightMobile",
|
|
10
|
-
setup(
|
|
11
|
-
const t =
|
|
9
|
+
setup(k) {
|
|
10
|
+
const t = g(), m = d(
|
|
12
11
|
() => {
|
|
13
12
|
var o, e;
|
|
14
13
|
return !!((o = t.value.user) != null && o.id || (e = t.value.user) != null && e.userId);
|
|
15
14
|
}
|
|
16
15
|
), c = () => {
|
|
17
16
|
var o, e;
|
|
18
|
-
(e = (o = t.value).onLogin) != null && e.call(o) ||
|
|
17
|
+
(e = (o = t.value).onLogin) != null && e.call(o) || _(t.value);
|
|
19
18
|
};
|
|
20
|
-
return (o, e) => (r(), p("div",
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
default: n(() => [...e[0] || (e[0] = [
|
|
19
|
+
return (o, e) => (r(), p("div", v, [
|
|
20
|
+
n(f),
|
|
21
|
+
m.value ? (r(), l(h, { key: 0 }, {
|
|
22
|
+
reference: i(() => [
|
|
23
|
+
n(a, { class: "header-right-mobile__action" }, {
|
|
24
|
+
default: i(() => [...e[0] || (e[0] = [
|
|
27
25
|
s("i", { class: "metisicon-yonghu1" }, null, -1)
|
|
28
26
|
])]),
|
|
29
27
|
_: 1
|
|
@@ -35,7 +33,7 @@ const k = { class: "header-right-mobile" }, E = /* @__PURE__ */ u({
|
|
|
35
33
|
class: "header-right-mobile__action",
|
|
36
34
|
onClick: c
|
|
37
35
|
}, {
|
|
38
|
-
default:
|
|
36
|
+
default: i(() => [...e[1] || (e[1] = [
|
|
39
37
|
s("i", { class: "metisicon-yonghu1" }, null, -1)
|
|
40
38
|
])]),
|
|
41
39
|
_: 1
|
|
@@ -44,5 +42,5 @@ const k = { class: "header-right-mobile" }, E = /* @__PURE__ */ u({
|
|
|
44
42
|
}
|
|
45
43
|
});
|
|
46
44
|
export {
|
|
47
|
-
|
|
45
|
+
N as default
|
|
48
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.mobile-menu-toggle[data-v-
|
|
1
|
+
.mobile-menu-toggle[data-v-c14b8f72]{width:40px;height:40px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--ui-topnav-border);border-radius:var(--ui-radius-control);background:var(--ui-topnav-surface);color:var(--ui-topnav-foreground);cursor:pointer;transition:background var(--ui-transition-fast),color var(--ui-transition-fast)}.mobile-menu-toggle[data-v-c14b8f72]:hover{background:var(--ui-topnav-hover)}.mobile-menu-toggle[data-v-c14b8f72]:focus-visible{outline:2px solid var(--ui-topnav-foreground);outline-offset:2px}.mobile-menu-toggle__icon[data-v-c14b8f72]{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;font-size:18px}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./MobileMenuToggle.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c14b8f72"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Expand as
|
|
3
|
-
import { injectLayoutContext as
|
|
4
|
-
const u = { class: "mobile-menu-toggle__icon" }, v = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as a, resolveComponent as c, openBlock as i, createElementBlock as r, unref as o, createElementVNode as m, createVNode as n, withCtx as s } from "vue";
|
|
2
|
+
import { Expand as p } from "@element-plus/icons-vue";
|
|
3
|
+
import { injectLayoutContext as _ } from "../../hooks/useState.js";
|
|
4
|
+
const u = ["aria-label", "aria-expanded"], d = { class: "mobile-menu-toggle__icon" }, v = /* @__PURE__ */ a({
|
|
5
5
|
__name: "MobileMenuToggle",
|
|
6
|
-
setup(
|
|
7
|
-
const { sideOpen: e } =
|
|
6
|
+
setup(f) {
|
|
7
|
+
const { sideOpen: e } = _(), t = () => {
|
|
8
8
|
e.value = !e.value;
|
|
9
9
|
};
|
|
10
|
-
return (
|
|
11
|
-
const
|
|
12
|
-
return i(),
|
|
10
|
+
return (g, b) => {
|
|
11
|
+
const l = c("el-icon");
|
|
12
|
+
return i(), r("button", {
|
|
13
13
|
type: "button",
|
|
14
14
|
class: "mobile-menu-toggle",
|
|
15
|
+
"aria-label": o(e) ? "Close menu" : "Open menu",
|
|
16
|
+
"aria-expanded": o(e),
|
|
15
17
|
onClick: t
|
|
16
18
|
}, [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
m("div", d, [
|
|
20
|
+
n(l, null, {
|
|
19
21
|
default: s(() => [
|
|
20
|
-
o(
|
|
22
|
+
n(o(p))
|
|
21
23
|
]),
|
|
22
24
|
_: 1
|
|
23
25
|
})
|
|
24
26
|
])
|
|
25
|
-
]);
|
|
27
|
+
], 8, u);
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
30
|
});
|