mamba-layout 0.1.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/README.md +47 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/assets/logo.png.js +4 -0
- package/dist/components/UserAvatar/index.d.ts +2 -0
- package/dist/components/UserAvatar/index.js +5 -0
- package/dist/components/UserAvatar/src/UserAvatar.css +1 -0
- package/dist/components/UserAvatar/src/UserAvatar.vue.d.ts +9 -0
- package/dist/components/UserAvatar/src/UserAvatar.vue.js +7 -0
- package/dist/components/UserAvatar/src/UserAvatar.vue2.js +61 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +51 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +80 -0
- package/dist/layout/BaseLayout.css +1 -0
- package/dist/layout/BaseLayout.vue.d.ts +23 -0
- package/dist/layout/BaseLayout.vue.js +7 -0
- package/dist/layout/BaseLayout.vue2.js +75 -0
- package/dist/layout/components/AppSelect.css +1 -0
- package/dist/layout/components/AppSelect.vue.d.ts +2 -0
- package/dist/layout/components/AppSelect.vue.js +7 -0
- package/dist/layout/components/AppSelect.vue2.js +69 -0
- package/dist/layout/components/AsideBar.css +1 -0
- package/dist/layout/components/AsideBar.vue.d.ts +21 -0
- package/dist/layout/components/AsideBar.vue.js +7 -0
- package/dist/layout/components/AsideBar.vue2.js +49 -0
- package/dist/layout/components/AsideSubMenuItem.vue.d.ts +25 -0
- package/dist/layout/components/AsideSubMenuItem.vue.js +84 -0
- package/dist/layout/components/AsideSubMenuItem.vue2.js +4 -0
- package/dist/layout/components/AsideSubMenus.vue.d.ts +16 -0
- package/dist/layout/components/AsideSubMenus.vue.js +36 -0
- package/dist/layout/components/AsideSubMenus.vue2.js +4 -0
- package/dist/layout/components/AsideTabMenus.vue.d.ts +2 -0
- package/dist/layout/components/AsideTabMenus.vue.js +41 -0
- package/dist/layout/components/AsideTabMenus.vue2.js +4 -0
- package/dist/layout/components/AsideUser.vue.d.ts +2 -0
- package/dist/layout/components/AsideUser.vue.js +58 -0
- package/dist/layout/components/AsideUser.vue2.js +4 -0
- package/dist/layout/components/HeaderBar.css +1 -0
- package/dist/layout/components/HeaderBar.vue.d.ts +17 -0
- package/dist/layout/components/HeaderBar.vue.js +7 -0
- package/dist/layout/components/HeaderBar.vue2.js +55 -0
- package/dist/layout/components/HeaderMenuToggle.vue.d.ts +25 -0
- package/dist/layout/components/HeaderMenuToggle.vue.js +40 -0
- package/dist/layout/components/HeaderMenuToggle.vue2.js +4 -0
- package/dist/layout/components/LanguageSelect.css +1 -0
- package/dist/layout/components/LanguageSelect.vue.d.ts +22 -0
- package/dist/layout/components/LanguageSelect.vue.js +8 -0
- package/dist/layout/components/LanguageSelect.vue2.js +101 -0
- package/dist/layout/components/LanguageSelect2.css +1 -0
- package/dist/layout/components/LayoutBreadcrumb.css +1 -0
- package/dist/layout/components/LayoutBreadcrumb.vue.d.ts +29 -0
- package/dist/layout/components/LayoutBreadcrumb.vue.js +7 -0
- package/dist/layout/components/LayoutBreadcrumb.vue2.js +189 -0
- package/dist/layout/components/MenuDrawer.css +1 -0
- package/dist/layout/components/MenuDrawer.vue.d.ts +12 -0
- package/dist/layout/components/MenuDrawer.vue.js +163 -0
- package/dist/layout/components/MenuDrawer.vue3.js +5 -0
- package/dist/layout/components/MenuItemIcon.css +1 -0
- package/dist/layout/components/MenuItemIcon.vue.d.ts +7 -0
- package/dist/layout/components/MenuItemIcon.vue.js +7 -0
- package/dist/layout/components/MenuItemIcon.vue2.js +23 -0
- package/dist/layout/components/NavIconBtn.css +1 -0
- package/dist/layout/components/NavIconBtn.vue.d.ts +26 -0
- package/dist/layout/components/NavIconBtn.vue.js +7 -0
- package/dist/layout/components/NavIconBtn.vue2.js +23 -0
- package/dist/layout/components/SHeaderRight.css +1 -0
- package/dist/layout/components/SHeaderRight.vue.d.ts +2 -0
- package/dist/layout/components/SHeaderRight.vue.js +7 -0
- package/dist/layout/components/SHeaderRight.vue2.js +80 -0
- package/dist/layout/components/ThemeToggle.css +1 -0
- package/dist/layout/components/ThemeToggle.vue.d.ts +2 -0
- package/dist/layout/components/ThemeToggle.vue.js +7 -0
- package/dist/layout/components/ThemeToggle.vue2.js +30 -0
- package/dist/layout/components/TimezoneSelect.css +1 -0
- package/dist/layout/components/TimezoneSelect.vue.d.ts +7 -0
- package/dist/layout/components/TimezoneSelect.vue.js +8 -0
- package/dist/layout/components/TimezoneSelect.vue2.js +78 -0
- package/dist/layout/components/TimezoneSelect2.css +1 -0
- package/dist/layout/components/UserInfo.css +1 -0
- package/dist/layout/components/UserInfo.vue.d.ts +2 -0
- package/dist/layout/components/UserInfo.vue.js +8 -0
- package/dist/layout/components/UserInfo.vue2.js +111 -0
- package/dist/layout/components/UserInfo2.css +1 -0
- package/dist/layout/components/index.d.ts +23 -0
- package/dist/layout/components/index.js +49 -0
- package/dist/layout/components/mobile/AppSelectMobile.vue.d.ts +2 -0
- package/dist/layout/components/mobile/AppSelectMobile.vue.js +60 -0
- package/dist/layout/components/mobile/AppSelectMobile.vue2.js +4 -0
- package/dist/layout/components/mobile/AsideBarMobile.css +1 -0
- package/dist/layout/components/mobile/AsideBarMobile.vue.d.ts +21 -0
- package/dist/layout/components/mobile/AsideBarMobile.vue.js +7 -0
- package/dist/layout/components/mobile/AsideBarMobile.vue2.js +47 -0
- package/dist/layout/components/mobile/AsideUserMobile.css +1 -0
- package/dist/layout/components/mobile/AsideUserMobile.vue.d.ts +2 -0
- package/dist/layout/components/mobile/AsideUserMobile.vue.js +7 -0
- package/dist/layout/components/mobile/AsideUserMobile.vue2.js +56 -0
- package/dist/layout/components/mobile/AsideUserMobilePopover.css +1 -0
- package/dist/layout/components/mobile/AsideUserMobilePopover.vue.d.ts +17 -0
- package/dist/layout/components/mobile/AsideUserMobilePopover.vue.js +7 -0
- package/dist/layout/components/mobile/AsideUserMobilePopover.vue2.js +52 -0
- package/dist/layout/components/mobile/HeaderRightMobile.css +1 -0
- package/dist/layout/components/mobile/HeaderRightMobile.vue.d.ts +2 -0
- package/dist/layout/components/mobile/HeaderRightMobile.vue.js +7 -0
- package/dist/layout/components/mobile/HeaderRightMobile.vue2.js +50 -0
- package/dist/layout/components/mobile/MobileMenuToggle.css +1 -0
- package/dist/layout/components/mobile/MobileMenuToggle.vue.d.ts +2 -0
- package/dist/layout/components/mobile/MobileMenuToggle.vue.js +7 -0
- package/dist/layout/components/mobile/MobileMenuToggle.vue2.js +31 -0
- package/dist/layout/hooks/index.d.ts +4 -0
- package/dist/layout/hooks/index.js +17 -0
- package/dist/layout/hooks/useApp.d.ts +6 -0
- package/dist/layout/hooks/useApp.js +20 -0
- package/dist/layout/hooks/useSetting.d.ts +62 -0
- package/dist/layout/hooks/useSetting.js +24 -0
- package/dist/layout/hooks/useState.d.ts +763 -0
- package/dist/layout/hooks/useState.js +99 -0
- package/dist/layout/hooks/useTheme.d.ts +15 -0
- package/dist/layout/hooks/useTheme.js +44 -0
- package/dist/layout/utils/index.d.ts +7 -0
- package/dist/layout/utils/index.js +59 -0
- package/dist/layout.css +1 -0
- package/dist/layout.es.js +53770 -0
- package/dist/layout.global.js +78 -0
- package/dist/locales/en/account.d.ts +10 -0
- package/dist/locales/en/account.js +12 -0
- package/dist/locales/en/admin.d.ts +207 -0
- package/dist/locales/en/admin.js +209 -0
- package/dist/locales/en/common.d.ts +40 -0
- package/dist/locales/en/common.js +42 -0
- package/dist/locales/en/components.d.ts +37 -0
- package/dist/locales/en/components.js +39 -0
- package/dist/locales/en/constant.d.ts +151 -0
- package/dist/locales/en/constant.js +153 -0
- package/dist/locales/en/filterBox.d.ts +11 -0
- package/dist/locales/en/filterBox.js +13 -0
- package/dist/locales/en/index.d.ts +487 -0
- package/dist/locales/en/index.js +22 -0
- package/dist/locales/en/instanceForm.d.ts +17 -0
- package/dist/locales/en/instanceForm.js +19 -0
- package/dist/locales/en/password.d.ts +18 -0
- package/dist/locales/en/password.js +20 -0
- package/dist/locales/index.d.ts +973 -0
- package/dist/locales/index.js +12 -0
- package/dist/locales/messages.d.ts +973 -0
- package/dist/locales/messages.js +9 -0
- package/dist/locales/zh-cn/account.d.ts +10 -0
- package/dist/locales/zh-cn/account.js +12 -0
- package/dist/locales/zh-cn/admin.d.ts +205 -0
- package/dist/locales/zh-cn/admin.js +207 -0
- package/dist/locales/zh-cn/common.d.ts +40 -0
- package/dist/locales/zh-cn/common.js +42 -0
- package/dist/locales/zh-cn/components.d.ts +37 -0
- package/dist/locales/zh-cn/components.js +39 -0
- package/dist/locales/zh-cn/constant.d.ts +151 -0
- package/dist/locales/zh-cn/constant.js +153 -0
- package/dist/locales/zh-cn/filterBox.d.ts +11 -0
- package/dist/locales/zh-cn/filterBox.js +13 -0
- package/dist/locales/zh-cn/index.d.ts +485 -0
- package/dist/locales/zh-cn/index.js +22 -0
- package/dist/locales/zh-cn/instanceForm.d.ts +17 -0
- package/dist/locales/zh-cn/instanceForm.js +19 -0
- package/dist/locales/zh-cn/password.d.ts +18 -0
- package/dist/locales/zh-cn/password.js +20 -0
- package/dist/standalone.d.ts +0 -0
- package/dist/utils/createContext.d.ts +8 -0
- package/dist/utils/createContext.js +14 -0
- package/dist/utils/repoUtils.d.ts +59 -0
- package/dist/utils/repoUtils.js +160 -0
- package/package.json +110 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { defineComponent as I, computed as U, resolveComponent as W, createElementBlock as u, createCommentVNode as _, openBlock as c, createVNode as w, withCtx as z, unref as M, Fragment as X, renderList as Y, createBlock as Z, toDisplayString as B } from "vue";
|
|
2
|
+
import { ArrowLeft as tt, ArrowRight as et } from "@element-plus/icons-vue";
|
|
3
|
+
import { useRoute as nt, useRouter as rt } from "vue-router";
|
|
4
|
+
import { replaceName as at, tname as ot } from "../../utils/repoUtils.js";
|
|
5
|
+
import { useSetting as st } from "../hooks/useSetting.js";
|
|
6
|
+
import { injectLayoutContext as lt } from "../hooks/useState.js";
|
|
7
|
+
const ct = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "layout-breadcrumb text-xs",
|
|
10
|
+
"aria-label": "Breadcrumb"
|
|
11
|
+
}, ut = ["aria-label", "title"], it = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "flex min-w-0 items-center gap-1"
|
|
14
|
+
}, ht = ["href"], pt = ["onClick"], dt = {
|
|
15
|
+
key: 3,
|
|
16
|
+
class: "layout-breadcrumb__current"
|
|
17
|
+
}, vt = /* @__PURE__ */ I({
|
|
18
|
+
__name: "LayoutBreadcrumb",
|
|
19
|
+
props: {
|
|
20
|
+
items: { default: void 0 },
|
|
21
|
+
currentTitle: { default: "" },
|
|
22
|
+
parentPath: { default: "" },
|
|
23
|
+
preserveQueryKeys: { default: () => [] },
|
|
24
|
+
showCurrent: { type: Boolean, default: !0 },
|
|
25
|
+
showBack: { type: Boolean, default: !0 },
|
|
26
|
+
backTo: { default: void 0 },
|
|
27
|
+
backLabel: { default: "返回" }
|
|
28
|
+
},
|
|
29
|
+
setup(N) {
|
|
30
|
+
const o = N, s = nt(), g = rt(), j = st(), m = lt(null), h = U(() => {
|
|
31
|
+
var R, $, A, S, E, x;
|
|
32
|
+
if ((R = o.items) != null && R.length)
|
|
33
|
+
return o.items.filter((b) => b.title);
|
|
34
|
+
const t = k(s.path), e = k(
|
|
35
|
+
(($ = s.meta) == null ? void 0 : $.parent) || ((A = s.meta) == null ? void 0 : A.parentPath) || s.path
|
|
36
|
+
), n = V(), r = (E = (S = m == null ? void 0 : m.currentEndRoute) == null ? void 0 : S.value) == null ? void 0 : E.paths, a = L(r || []);
|
|
37
|
+
let l = a.length ? a : y(n, e);
|
|
38
|
+
const P = k(
|
|
39
|
+
o.parentPath || ((x = s.meta) == null ? void 0 : x.parentPath) || ""
|
|
40
|
+
);
|
|
41
|
+
if (!l.length && P && (l = y(n, P)), !l.length) {
|
|
42
|
+
const b = P || O(t, n);
|
|
43
|
+
l = b ? y(n, b) : [];
|
|
44
|
+
}
|
|
45
|
+
const d = l.map(q).filter((b) => b.title), i = d[d.length - 1], f = K();
|
|
46
|
+
return o.showCurrent && f && p(i == null ? void 0 : i.path) !== p(t) ? d.push({
|
|
47
|
+
title: f,
|
|
48
|
+
path: t,
|
|
49
|
+
disabled: !0
|
|
50
|
+
}) : f && i && p(i.path) === p(t) && (i.title = f, i.disabled = !0), !d.length && f && d.push({
|
|
51
|
+
title: f,
|
|
52
|
+
path: t,
|
|
53
|
+
disabled: !0
|
|
54
|
+
}), d;
|
|
55
|
+
}), V = () => {
|
|
56
|
+
const t = [], e = /* @__PURE__ */ new Set();
|
|
57
|
+
return (j.value.menus || []).forEach((n) => {
|
|
58
|
+
var a;
|
|
59
|
+
const r = n.path || n.name || JSON.stringify(((a = n.meta) == null ? void 0 : a.translations) || {});
|
|
60
|
+
!r || e.has(r) || (e.add(r), t.push(n));
|
|
61
|
+
}), t;
|
|
62
|
+
}, L = (t) => t.filter((e) => {
|
|
63
|
+
var n;
|
|
64
|
+
return e && ((n = e.meta) == null ? void 0 : n.visible) !== "0";
|
|
65
|
+
}), q = (t) => {
|
|
66
|
+
var e;
|
|
67
|
+
return {
|
|
68
|
+
title: F(t),
|
|
69
|
+
path: t.path,
|
|
70
|
+
disabled: ((e = t.meta) == null ? void 0 : e.visible) === "0",
|
|
71
|
+
children: t.children
|
|
72
|
+
};
|
|
73
|
+
}, F = (t) => {
|
|
74
|
+
var n;
|
|
75
|
+
return ((n = t == null ? void 0 : t.meta) != null && n.translations ? at(ot(t.meta.translations, "name", t.name)) : "") || (t == null ? void 0 : t.title) || (t == null ? void 0 : t.name) || "";
|
|
76
|
+
}, K = () => {
|
|
77
|
+
var t;
|
|
78
|
+
return o.currentTitle ? o.currentTitle : typeof ((t = s.meta) == null ? void 0 : t.title) == "string" ? s.meta.title : String(s.params.id || s.params.tenantId || "");
|
|
79
|
+
}, y = (t, e, n = []) => {
|
|
80
|
+
if (!e) return [];
|
|
81
|
+
for (const r of t) {
|
|
82
|
+
const a = [...n, r];
|
|
83
|
+
if (Q(r.path, e))
|
|
84
|
+
return L(a);
|
|
85
|
+
const l = y(r.children || [], e, a);
|
|
86
|
+
if (l.length) return l;
|
|
87
|
+
}
|
|
88
|
+
return [];
|
|
89
|
+
}, O = (t, e) => {
|
|
90
|
+
const n = t.split("/").filter(Boolean);
|
|
91
|
+
for (let r = n.length - 1; r > 0; r -= 1) {
|
|
92
|
+
const a = `/${n.slice(0, r).join("/")}`;
|
|
93
|
+
if (y(e, a).length) return a;
|
|
94
|
+
}
|
|
95
|
+
return "";
|
|
96
|
+
}, Q = (t = "", e = "") => {
|
|
97
|
+
const n = p(t), r = p(e);
|
|
98
|
+
if (!n || !r) return !1;
|
|
99
|
+
if (n === r) return !0;
|
|
100
|
+
const a = n.replace(/\/:(\w+)/g, "/([^/]+)");
|
|
101
|
+
return new RegExp(`^${a}$`, "i").test(r);
|
|
102
|
+
}, k = (t = "") => t ? t.split("?")[0].split("#")[0] : "", p = (t = "") => (k(t).replace(/\/+$/, "") || "/").toLowerCase(), v = (t) => /^https?:\/\//.test(t.path || ""), D = (t) => {
|
|
103
|
+
var e;
|
|
104
|
+
return !!((e = t.children) != null && e.some((n) => !n.disabled));
|
|
105
|
+
}, T = (t, e) => t.disabled || e === h.value.length - 1 || !t.path ? !1 : v(t) || !D(t), J = (t) => {
|
|
106
|
+
const e = t.to || C(t);
|
|
107
|
+
e && g.push(e);
|
|
108
|
+
}, G = () => {
|
|
109
|
+
var e;
|
|
110
|
+
if (o.backTo) {
|
|
111
|
+
g.push(o.backTo);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if ((e = g.options.history.state) != null && e.back && window.history.length > 1) {
|
|
115
|
+
g.back();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const t = H();
|
|
119
|
+
t && g.push(t);
|
|
120
|
+
}, H = () => {
|
|
121
|
+
var n, r;
|
|
122
|
+
const t = o.parentPath || ((n = s.meta) == null ? void 0 : n.parentPath) || ((r = s.meta) == null ? void 0 : r.parent) || "";
|
|
123
|
+
if (t)
|
|
124
|
+
return C({ path: t });
|
|
125
|
+
const e = h.value[h.value.length - 2];
|
|
126
|
+
if (e != null && e.to) return e.to;
|
|
127
|
+
if (e != null && e.path && !v(e))
|
|
128
|
+
return C(e);
|
|
129
|
+
}, C = (t) => {
|
|
130
|
+
if (!t.path) return;
|
|
131
|
+
const e = o.preserveQueryKeys.reduce((n, r) => {
|
|
132
|
+
const a = s.query[r];
|
|
133
|
+
return typeof a == "string" && (n[r] = a), Array.isArray(a) && (n[r] = a.filter(
|
|
134
|
+
(l) => typeof l == "string"
|
|
135
|
+
)), n;
|
|
136
|
+
}, {});
|
|
137
|
+
return Object.keys(e).length ? { path: t.path, query: e } : { path: t.path };
|
|
138
|
+
};
|
|
139
|
+
return (t, e) => {
|
|
140
|
+
const n = W("el-icon");
|
|
141
|
+
return o.showBack || h.value.length ? (c(), u("nav", ct, [
|
|
142
|
+
o.showBack ? (c(), u("button", {
|
|
143
|
+
key: 0,
|
|
144
|
+
class: "layout-breadcrumb__back",
|
|
145
|
+
type: "button",
|
|
146
|
+
"aria-label": o.backLabel,
|
|
147
|
+
title: o.backLabel,
|
|
148
|
+
onClick: G
|
|
149
|
+
}, [
|
|
150
|
+
w(n, null, {
|
|
151
|
+
default: z(() => [
|
|
152
|
+
w(M(tt))
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
})
|
|
156
|
+
], 8, ut)) : _("", !0),
|
|
157
|
+
h.value.length ? (c(), u("ol", it, [
|
|
158
|
+
(c(!0), u(X, null, Y(h.value, (r, a) => (c(), u("li", {
|
|
159
|
+
key: `${r.path || r.title}-${a}`,
|
|
160
|
+
class: "flex min-w-0 items-center gap-1"
|
|
161
|
+
}, [
|
|
162
|
+
a > 0 ? (c(), Z(n, {
|
|
163
|
+
key: 0,
|
|
164
|
+
class: "layout-breadcrumb__separator"
|
|
165
|
+
}, {
|
|
166
|
+
default: z(() => [
|
|
167
|
+
w(M(et))
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
})) : _("", !0),
|
|
171
|
+
v(r) && T(r, a) ? (c(), u("a", {
|
|
172
|
+
key: 1,
|
|
173
|
+
class: "layout-breadcrumb__link",
|
|
174
|
+
href: r.path
|
|
175
|
+
}, B(r.title), 9, ht)) : T(r, a) ? (c(), u("button", {
|
|
176
|
+
key: 2,
|
|
177
|
+
class: "layout-breadcrumb__link",
|
|
178
|
+
type: "button",
|
|
179
|
+
onClick: (l) => J(r)
|
|
180
|
+
}, B(r.title), 9, pt)) : (c(), u("span", dt, B(r.title), 1))
|
|
181
|
+
]))), 128))
|
|
182
|
+
])) : _("", !0)
|
|
183
|
+
])) : _("", !0);
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
export {
|
|
188
|
+
vt as default
|
|
189
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.menu-drawer-modal{height:calc(100% - 52px);top:auto}.menu-drawer-modal .el-drawer__body{overflow:hidden;padding:0}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const visible: import('vue').ModelRef<boolean, string, boolean, boolean>;
|
|
2
|
+
type __VLS_PublicProps = {
|
|
3
|
+
"modelValue"?: typeof visible['value'];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
6
|
+
visible: import('vue').ModelRef<boolean, string, boolean, boolean>;
|
|
7
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: boolean) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { defineComponent as $, computed as D, useModel as q, resolveComponent as B, createBlock as E, openBlock as d, withCtx as b, createVNode as H, createElementVNode as a, createElementBlock as m, Fragment as x, renderList as g, toDisplayString as v, normalizeClass as M, unref as p, resolveDynamicComponent as J, mergeProps as K } from "vue";
|
|
2
|
+
import { replaceName as y, tname as I } from "../../utils/repoUtils.js";
|
|
3
|
+
import { useApp as Q } from "../hooks/useApp.js";
|
|
4
|
+
import { useSetting as Y } from "../hooks/useSetting.js";
|
|
5
|
+
import { injectLayoutContext as Z } from "../hooks/useState.js";
|
|
6
|
+
const ee = { class: "py-5" }, te = { class: "flex-1 min-w-0 flex items-center px-5" }, ae = { class: "flex-1 min-w-0 flex items-center" }, se = { class: "flex-1 min-w-0" }, le = ["href"], re = ["title"], ne = { class: "p-5" }, oe = { class: "font-bold mb-3 leading-4 text-sm px-2 border-l-3 border-blue-500" }, de = { class: "grid grid-cols-4 gap-3" }, ie = { class: "truncate" }, he = /* @__PURE__ */ $({
|
|
7
|
+
__name: "MenuDrawer",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
modelModifiers: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:modelValue"],
|
|
16
|
+
setup(j, { expose: L }) {
|
|
17
|
+
const O = Y(), { appList: S, getAppPath: z, findAppById: F } = Q(), T = D(() => V(S.value)), W = D(
|
|
18
|
+
() => (O.value.menus || []).reduce((t, e) => {
|
|
19
|
+
var o, s, f, i;
|
|
20
|
+
const n = t.find((l) => {
|
|
21
|
+
var c;
|
|
22
|
+
return l.appId == ((c = e.meta) == null ? void 0 : c.appId);
|
|
23
|
+
});
|
|
24
|
+
if (n)
|
|
25
|
+
(o = n.children) == null || o.push(e);
|
|
26
|
+
else {
|
|
27
|
+
const l = F((s = e.meta) == null ? void 0 : s.appId);
|
|
28
|
+
t.push({
|
|
29
|
+
appId: ((f = e.meta) == null ? void 0 : f.appId) || "",
|
|
30
|
+
appName: (l == null ? void 0 : l.name) || ((i = e.meta) == null ? void 0 : i.appId) || "",
|
|
31
|
+
appDesc: l == null ? void 0 : l.desc,
|
|
32
|
+
appPath: z(l),
|
|
33
|
+
children: [e]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
}, []).sort((t, e) => C(t.appId) - C(e.appId))
|
|
38
|
+
), u = q(j, "modelValue"), G = (t) => R.value === t, { defaultParentActive: R, currentAppId: w, currentTabPath: k } = Z(), U = (t) => {
|
|
39
|
+
var e;
|
|
40
|
+
return /^http/.test(t.path || "") || !((e = t.path) != null && e.startsWith(k.value)) ? "a" : "router-link";
|
|
41
|
+
}, X = (t) => {
|
|
42
|
+
var e, n, o;
|
|
43
|
+
return /^http/.test(t.path || "") || !((e = t.path) != null && e.startsWith(k.value)) ? {
|
|
44
|
+
href: t.path,
|
|
45
|
+
"data-tag": "a",
|
|
46
|
+
"data-appid": (n = t.meta) == null ? void 0 : n.appId,
|
|
47
|
+
"data-current-appid": w.value
|
|
48
|
+
} : {
|
|
49
|
+
to: t.path,
|
|
50
|
+
"data-tag": "router-link",
|
|
51
|
+
"data-appid": (o = t.meta) == null ? void 0 : o.appId,
|
|
52
|
+
"data-current-appid": w.value
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
L({ visible: u });
|
|
56
|
+
function C(t) {
|
|
57
|
+
const e = T.value.indexOf(t);
|
|
58
|
+
return e === -1 ? Number.MAX_SAFE_INTEGER : e;
|
|
59
|
+
}
|
|
60
|
+
function V(t) {
|
|
61
|
+
return t.flatMap((e) => [
|
|
62
|
+
e.appId,
|
|
63
|
+
...V(e.children || [])
|
|
64
|
+
]);
|
|
65
|
+
}
|
|
66
|
+
return (t, e) => {
|
|
67
|
+
const n = B("el-scrollbar"), o = B("el-drawer");
|
|
68
|
+
return d(), E(o, {
|
|
69
|
+
modelValue: u.value,
|
|
70
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => u.value = s),
|
|
71
|
+
direction: "ltr",
|
|
72
|
+
"append-to-body": "",
|
|
73
|
+
size: "800",
|
|
74
|
+
class: "menu-drawer",
|
|
75
|
+
"modal-class": "menu-drawer-modal",
|
|
76
|
+
"with-header": !1
|
|
77
|
+
}, {
|
|
78
|
+
default: b(() => [
|
|
79
|
+
H(n, { class: "" }, {
|
|
80
|
+
default: b(() => [
|
|
81
|
+
a("div", ee, [
|
|
82
|
+
(d(!0), m(x, null, g(W.value, (s, f) => (d(), m("div", {
|
|
83
|
+
key: f,
|
|
84
|
+
class: "flex flex-col h-full mb-4"
|
|
85
|
+
}, [
|
|
86
|
+
a("div", te, [
|
|
87
|
+
a("div", ae, [
|
|
88
|
+
e[2] || (e[2] = a("div", { class: "bg-blue-100 rounded-lg flex items-center justify-center w-10 h-10 mr-4 text-blue-500 text-3xl" }, [
|
|
89
|
+
a("i", { class: "metisicon-tishici" })
|
|
90
|
+
], -1)),
|
|
91
|
+
a("div", se, [
|
|
92
|
+
a("a", {
|
|
93
|
+
class: "text-base font-bold",
|
|
94
|
+
href: s.appPath || void 0
|
|
95
|
+
}, v(s.appName || s.appId), 9, le),
|
|
96
|
+
a("div", {
|
|
97
|
+
class: "text-xs text-gray-500 truncate",
|
|
98
|
+
title: s.appDesc
|
|
99
|
+
}, v(s.appDesc), 9, re)
|
|
100
|
+
])
|
|
101
|
+
])
|
|
102
|
+
]),
|
|
103
|
+
a("div", ne, [
|
|
104
|
+
(d(!0), m(x, null, g(s.children, (i, l) => {
|
|
105
|
+
var c, A;
|
|
106
|
+
return d(), m("div", {
|
|
107
|
+
key: l,
|
|
108
|
+
class: M({ "mb-4": l < s.children.length - 1 })
|
|
109
|
+
}, [
|
|
110
|
+
a("div", oe, v(p(y)(
|
|
111
|
+
p(I)(((c = i.meta) == null ? void 0 : c.translations) || {}, "name", i.name)
|
|
112
|
+
)), 1),
|
|
113
|
+
a("div", de, [
|
|
114
|
+
(d(!0), m(x, null, g((A = i.children) == null ? void 0 : A.filter(
|
|
115
|
+
(r) => {
|
|
116
|
+
var h;
|
|
117
|
+
return ((h = r.meta) == null ? void 0 : h.visible) != "0";
|
|
118
|
+
}
|
|
119
|
+
), (r, h) => {
|
|
120
|
+
var N;
|
|
121
|
+
return d(), E(J(U(r)), K({
|
|
122
|
+
key: h,
|
|
123
|
+
class: ["px-4 h-9 flex items-center justify-start rounded-lg gap-2", [
|
|
124
|
+
G(r.path) ? "border-blue-500 text-white bg-blue-500" : "bg-gray-100 border-1 border-gray-100 hover:border-blue-500 hover:text-blue-500"
|
|
125
|
+
]],
|
|
126
|
+
title: p(y)(
|
|
127
|
+
p(I)(((N = r.meta) == null ? void 0 : N.translations) || {}, "name", r.name)
|
|
128
|
+
)
|
|
129
|
+
}, { ref_for: !0 }, X(r), {
|
|
130
|
+
onClick: e[0] || (e[0] = (_) => u.value = !1)
|
|
131
|
+
}), {
|
|
132
|
+
default: b(() => {
|
|
133
|
+
var _, P;
|
|
134
|
+
return [
|
|
135
|
+
a("i", {
|
|
136
|
+
class: M(((_ = r.meta) == null ? void 0 : _.icon) || "metisicon-yingyong")
|
|
137
|
+
}, null, 2),
|
|
138
|
+
a("span", ie, v(p(y)(
|
|
139
|
+
p(I)(((P = r.meta) == null ? void 0 : P.translations) || {}, "name", r.name)
|
|
140
|
+
)), 1)
|
|
141
|
+
];
|
|
142
|
+
}),
|
|
143
|
+
_: 2
|
|
144
|
+
}, 1040, ["class", "title"]);
|
|
145
|
+
}), 128))
|
|
146
|
+
])
|
|
147
|
+
], 2);
|
|
148
|
+
}), 128))
|
|
149
|
+
])
|
|
150
|
+
]))), 128))
|
|
151
|
+
])
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
})
|
|
155
|
+
]),
|
|
156
|
+
_: 1
|
|
157
|
+
}, 8, ["modelValue"]);
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
export {
|
|
162
|
+
he as default
|
|
163
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.menu-item-icon[data-v-ed060390]{display:inline-flex;align-items:center;justify-content:center;color:currentColor}.menu-item-icon__svg[data-v-ed060390]{display:inline-flex}.menu-item-icon__svg[data-v-ed060390] svg{width:1em;height:1em;display:block;fill:currentColor}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
icon?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
icon: string;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as g, computed as o, createElementBlock as n, openBlock as t, normalizeClass as v } from "vue";
|
|
2
|
+
const f = { class: "menu-item-icon" }, S = ["innerHTML"], I = /* @__PURE__ */ g({
|
|
3
|
+
__name: "MenuItemIcon",
|
|
4
|
+
props: {
|
|
5
|
+
icon: { default: "metisicon-yingyong" }
|
|
6
|
+
},
|
|
7
|
+
setup(i) {
|
|
8
|
+
const a = i, s = o(() => a.icon || "metisicon-yingyong"), r = /^\s*<svg[\s>]/i, l = /\son[a-z]+\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi, _ = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, p = /\s(?:href|xlink:href)\s*=\s*("\s*javascript:[^"]*"|'\s*javascript:[^']*')/gi, c = (e) => !!e && r.test(e), u = (e) => !e || !c(e) ? "" : e.replace(_, "").replace(l, "").replace(p, ""), m = o(() => u(s.value));
|
|
9
|
+
return (e, E) => (t(), n("div", f, [
|
|
10
|
+
c(s.value) ? (t(), n("span", {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "menu-item-icon__svg",
|
|
13
|
+
innerHTML: m.value
|
|
14
|
+
}, null, 8, S)) : (t(), n("i", {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: v(s.value)
|
|
17
|
+
}, null, 2))
|
|
18
|
+
]));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
I as default
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nav-icon-btn[data-v-824bbddc]{--nav-icon-btn-size: 30px;--nav-icon-btn-padding-x: 12px;--nav-icon-btn-color: var(--ui-topnav-muted);--nav-icon-btn-bg: transparent;--nav-icon-btn-border-color: transparent;--nav-icon-btn-hover-bg: rgba(0, 0, 0, .1);--nav-icon-btn-hover-border-color: var(--nav-icon-btn-border-color);--nav-icon-btn-focus-ring: var(--ui-topnav-foreground);min-width:var(--nav-icon-btn-size);height:var(--nav-icon-btn-size);display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 var(--nav-icon-btn-padding-x);border:1px solid var(--nav-icon-btn-border-color);border-radius:var(--ui-radius-control);background:var(--nav-icon-btn-bg);color:var(--nav-icon-btn-color);font-size:16px;line-height:1;white-space:nowrap;text-decoration:none;cursor:pointer;box-sizing:border-box;flex-shrink:0;-webkit-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:background var(--ui-transition-fast),color var(--ui-transition-fast),border-color var(--ui-transition-fast)}.nav-icon-btn[data-v-824bbddc]:hover{background:var(--nav-icon-btn-hover-bg);color:var(--nav-icon-btn-hover-color);border-color:var(--nav-icon-btn-hover-border-color)}.nav-icon-btn[data-v-824bbddc]:focus-visible{outline:2px solid var(--nav-icon-btn-focus-ring);outline-offset:2px}.nav-icon-btn[data-v-824bbddc]:disabled{opacity:.6;cursor:not-allowed}.nav-icon-btn--icon-only[data-v-824bbddc]{width:var(--nav-icon-btn-size);padding:0}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
tag?: "button" | "a" | "div";
|
|
3
|
+
type?: "button" | "submit" | "reset";
|
|
4
|
+
iconOnly?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
+
tag: "button" | "a" | "div";
|
|
17
|
+
type: "button" | "submit" | "reset";
|
|
18
|
+
iconOnly: boolean;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as e, createBlock as n, openBlock as o, resolveDynamicComponent as a, normalizeClass as l, withCtx as r, renderSlot as p } from "vue";
|
|
2
|
+
const c = /* @__PURE__ */ e({
|
|
3
|
+
__name: "NavIconBtn",
|
|
4
|
+
props: {
|
|
5
|
+
tag: { default: "button" },
|
|
6
|
+
type: { default: "button" },
|
|
7
|
+
iconOnly: { type: Boolean, default: !0 }
|
|
8
|
+
},
|
|
9
|
+
setup(s) {
|
|
10
|
+
return (t, u) => (o(), n(a(t.tag), {
|
|
11
|
+
type: t.tag === "button" ? t.type : void 0,
|
|
12
|
+
class: l(["nav-icon-btn", { "nav-icon-btn--icon-only": t.iconOnly }])
|
|
13
|
+
}, {
|
|
14
|
+
default: r(() => [
|
|
15
|
+
p(t.$slots, "default", {}, void 0, !0)
|
|
16
|
+
]),
|
|
17
|
+
_: 3
|
|
18
|
+
}, 8, ["type", "class"]));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
c as default
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.header-right[data-v-205feba2]{display:flex;align-items:center;gap:8px;font-size:13px;--nav-icon-btn-size: 30px}.header-right__login[data-v-205feba2]{height:30px;line-height:30px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;border-radius:var(--ui-radius-control);color:var(--ui-topnav-foreground);background:linear-gradient(135deg,var(--el-color-primary) 0%,var(--ui-topnav-accent) 100%);box-shadow:0 8px 18px rgba(var(--el-color-primary-rgb),.24);transition:background var(--ui-transition-fast),color var(--ui-transition-fast),border-color var(--ui-transition-fast)}.header-right__login[data-v-205feba2]:hover{filter:brightness(1.05)}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { defineComponent as C, computed as a, resolveComponent as L, createElementBlock as h, openBlock as n, createBlock as m, createCommentVNode as P, createVNode as s, withCtx as f, createElementVNode as c, toDisplayString as x, unref as y } from "vue";
|
|
2
|
+
import B from "../../locales/index.js";
|
|
3
|
+
import { useSetting as S } from "../hooks/useSetting.js";
|
|
4
|
+
import { getLayoutLoginPath as D } from "../utils/index.js";
|
|
5
|
+
import I from "./LanguageSelect.vue.js";
|
|
6
|
+
import N from "./NavIconBtn.vue.js";
|
|
7
|
+
import U from "./ThemeToggle.vue.js";
|
|
8
|
+
import V from "./UserInfo.vue.js";
|
|
9
|
+
const E = { class: "header-right" }, M = ["href"], G = /* @__PURE__ */ C({
|
|
10
|
+
__name: "SHeaderRight",
|
|
11
|
+
setup(R) {
|
|
12
|
+
const { t: p, locale: i } = B.global, o = S(), g = a(() => o.value.hideDoc ?? !1), v = a(() => D(o.value)), r = a(() => o.value.user), _ = a(() => {
|
|
13
|
+
var t, e;
|
|
14
|
+
return !!((t = r.value) != null && t.id || (e = r.value) != null && e.userId);
|
|
15
|
+
}), b = (t) => {
|
|
16
|
+
o.value.onLogin && (t.preventDefault(), o.value.onLogin());
|
|
17
|
+
}, k = a(() => {
|
|
18
|
+
var d, u;
|
|
19
|
+
const t = i.value == "en-US" ? "/docs" : "/docs/" + i.value;
|
|
20
|
+
let e = "";
|
|
21
|
+
const l = [
|
|
22
|
+
"03aafe62a76e21c9bb6e6224a62414b3",
|
|
23
|
+
"5c3dcb05be31bea98922705eb8fdad1f",
|
|
24
|
+
"69762cb59e9d97da2c970b7d4d4816bf",
|
|
25
|
+
"70c03df02f4d4888adea4e86dbc630fd"
|
|
26
|
+
];
|
|
27
|
+
return (u = (d = r.value) == null ? void 0 : d.roles) != null && u.some((w) => l.includes(w)) ? e = o.value.docOperatorPath || "" : e = o.value.docUserPath || "", t + e;
|
|
28
|
+
});
|
|
29
|
+
return (t, e) => {
|
|
30
|
+
const l = L("el-icon");
|
|
31
|
+
return n(), h("div", E, [
|
|
32
|
+
g.value ? P("", !0) : (n(), m(N, {
|
|
33
|
+
key: 0,
|
|
34
|
+
tag: "a",
|
|
35
|
+
class: "whitespace-nowrap",
|
|
36
|
+
href: k.value,
|
|
37
|
+
target: "_blank"
|
|
38
|
+
}, {
|
|
39
|
+
default: f(() => [
|
|
40
|
+
s(l, null, {
|
|
41
|
+
default: f(() => e[0] || (e[0] = [
|
|
42
|
+
c("svg", {
|
|
43
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
44
|
+
width: "24",
|
|
45
|
+
height: "24",
|
|
46
|
+
viewBox: "0 0 24 24",
|
|
47
|
+
fill: "none",
|
|
48
|
+
stroke: "currentColor",
|
|
49
|
+
"stroke-width": "2",
|
|
50
|
+
"stroke-linecap": "round",
|
|
51
|
+
"stroke-linejoin": "round",
|
|
52
|
+
"data-lucide": "book-open",
|
|
53
|
+
"aria-hidden": "true",
|
|
54
|
+
class: "lucide lucide-book-open"
|
|
55
|
+
}, [
|
|
56
|
+
c("path", { d: "M12 7v14" }),
|
|
57
|
+
c("path", { d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" })
|
|
58
|
+
], -1)
|
|
59
|
+
])),
|
|
60
|
+
_: 1,
|
|
61
|
+
__: [0]
|
|
62
|
+
})
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["href"])),
|
|
66
|
+
s(I),
|
|
67
|
+
s(U),
|
|
68
|
+
_.value ? (n(), m(V, { key: 1 })) : (n(), h("a", {
|
|
69
|
+
key: 2,
|
|
70
|
+
class: "header-right__login",
|
|
71
|
+
href: v.value,
|
|
72
|
+
onClick: b
|
|
73
|
+
}, x(y(p)("common.btn.login")), 9, M))
|
|
74
|
+
]);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
export {
|
|
79
|
+
G as default
|
|
80
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.theme-toggle__label[data-v-e6ea60b7]{font-size:12px;line-height:1}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as a, watchEffect as f, resolveComponent as p, createBlock as o, openBlock as t, unref as e, withCtx as n, createVNode as s } from "vue";
|
|
2
|
+
import { Moon as u, Sunny as _ } from "@element-plus/icons-vue";
|
|
3
|
+
import { useSetting as h } from "../hooks/useSetting.js";
|
|
4
|
+
import { useTheme as k } from "../hooks/useTheme.js";
|
|
5
|
+
import g from "./NavIconBtn.vue.js";
|
|
6
|
+
const N = /* @__PURE__ */ a({
|
|
7
|
+
__name: "ThemeToggle",
|
|
8
|
+
setup(d) {
|
|
9
|
+
const r = h(), { theme: c, isDark: m, toggleTheme: l } = k();
|
|
10
|
+
return f(() => {
|
|
11
|
+
r.value.theme = c.value;
|
|
12
|
+
}), (C, v) => {
|
|
13
|
+
const i = p("el-icon");
|
|
14
|
+
return t(), o(g, { onClick: e(l) }, {
|
|
15
|
+
default: n(() => [
|
|
16
|
+
s(i, null, {
|
|
17
|
+
default: n(() => [
|
|
18
|
+
e(m) ? (t(), o(e(_), { key: 1 })) : (t(), o(e(u), { key: 0 }))
|
|
19
|
+
]),
|
|
20
|
+
_: 1
|
|
21
|
+
})
|
|
22
|
+
]),
|
|
23
|
+
_: 1
|
|
24
|
+
}, 8, ["onClick"]);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
N as default
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.top-timezone-popover{padding:6px!important;border:1px solid var(--ui-border-default)!important;background:var(--ui-bg-card)!important;box-shadow:var(--ui-shadow-pop)!important}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
showLabel?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
showLabel: boolean;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|