xto-fronted 0.5.3 → 0.6.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/{index-BDDza2ly.js → index-CYFcc2sd.js} +1 -1
- package/dist/{index-B6g6rfUF.js → index-DGrQCWU0.js} +1 -1
- package/dist/{index-lAMRZUaB.js → index-DIlGh6S6.js} +1 -1
- package/dist/{index-CY9LkKi6.js → index-DYmKmoMX.js} +1 -1
- package/dist/{index-DIoBRnFR.js → index-Dpv33ZXi.js} +496 -496
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -10
- package/src/assets/styles/_dark.scss +207 -169
- package/src/assets/styles/_root.scss +110 -116
- package/src/assets/styles/_variables.scss +23 -23
- package/src/assets/styles/index.scss +43 -65
- package/src/components/Layout/Header.vue +55 -54
- package/src/components/Layout/MixTopMenu.vue +9 -9
- package/src/components/Layout/Sidebar.vue +25 -10
- package/src/components/Layout/SidebarMenuItem.vue +2 -2
- package/src/components/Layout/Tabs.vue +31 -9
- package/src/components/Layout/TopMenu.vue +9 -9
- package/src/components/Layout/index.vue +4 -4
- package/src/style.scss +2 -2
- package/src/views/login/index.vue +25 -24
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as I, y as st, z as
|
|
2
|
-
import { ref as y, computed as w, watch as ye, defineComponent as ne, resolveComponent as rt, openBlock as
|
|
1
|
+
import { x as I, y as st, z as ot, A as at, B as nt, o as vt, C as lt, D as Re, E as ht, m as _t, i as ft, F as gt, G as Qe, H as yt, I as bt, J as kt } from "./user-ChcAx-5W.js";
|
|
2
|
+
import { ref as y, computed as w, watch as ye, defineComponent as ne, resolveComponent as rt, openBlock as a, createBlock as B, unref as n, withCtx as M, createElementBlock as c, Fragment as K, renderList as X, createElementVNode as e, toDisplayString as x, createCommentVNode as P, normalizeClass as J, withDirectives as ze, vShow as wt, createVNode as b, createTextVNode as he, onMounted as Ke, onUnmounted as je, vModelText as We, Transition as be, withModifiers as Te, normalizeStyle as Ne, reactive as qe, createStaticVNode as Ue, withKeys as xt, h as Ct } from "vue";
|
|
3
3
|
import { defineStore as Ie } from "pinia";
|
|
4
4
|
import { useRoute as we, useRouter as me, createRouter as He, createWebHistory as Ye } from "vue-router";
|
|
5
5
|
import { SubMenu as Oe, MenuItem as Se, Menu as Ge, Tabs as $t, TabPane as Lt } from "@xto/navigation";
|
|
@@ -7,20 +7,20 @@ import { Icon as U, Button as ke } from "@xto/base";
|
|
|
7
7
|
import { Drawer as Xe, Message as Mt } from "@xto/feedback";
|
|
8
8
|
import { Form as St, FormItem as Pe, Input as et, Checkbox as Nt } from "@xto/form";
|
|
9
9
|
import { createLocaleProvider as It, getSupportedLocales as Et, useLocale as Ut } from "@xto/core/locale";
|
|
10
|
-
const
|
|
11
|
-
const t = y(I.get("appName") || "XTO App"), r = y(I.get("indexPath") || "/dashboard"),
|
|
10
|
+
const de = Ie("app", () => {
|
|
11
|
+
const t = y(I.get("appName") || "XTO App"), r = y(I.get("indexPath") || "/dashboard"), d = y(I.get("loginPath") || "/login"), s = y(I.get("isDark") || !1), o = y(I.get("theme") || "light"), i = y(I.get("layout") || "sidebar"), h = y(I.get("isCollapsed") || !1), v = y(I.get("showTabs") ?? !0), u = y(I.get("showFooter") ?? !0), f = y(I.get("showBreadcrumb") ?? !0), _ = y(I.get("primaryColor") || "#4F46E5"), g = y([]), m = y([]), j = w(() => s.value ? "dark" : "light"), A = (E) => {
|
|
12
12
|
t.value = E, I.set("appName", E);
|
|
13
13
|
}, W = (E) => {
|
|
14
14
|
r.value = E, I.set("indexPath", E);
|
|
15
15
|
}, F = (E) => {
|
|
16
|
-
|
|
16
|
+
d.value = E, I.set("loginPath", E);
|
|
17
17
|
}, V = () => {
|
|
18
|
-
s.value = !s.value,
|
|
18
|
+
s.value = !s.value, o.value = s.value ? "dark" : "light", Z();
|
|
19
19
|
}, H = (E) => {
|
|
20
|
-
|
|
20
|
+
o.value = E, s.value = E === "dark", Z();
|
|
21
21
|
}, Z = () => {
|
|
22
22
|
const E = document.documentElement;
|
|
23
|
-
s.value ? E.classList.add("dark") : E.classList.remove("dark"), I.set("isDark", s.value), I.set("theme",
|
|
23
|
+
s.value ? E.classList.add("dark") : E.classList.remove("dark"), I.set("isDark", s.value), I.set("theme", o.value);
|
|
24
24
|
}, Y = () => {
|
|
25
25
|
h.value = !h.value, I.set("isCollapsed", h.value);
|
|
26
26
|
}, q = (E) => {
|
|
@@ -28,16 +28,16 @@ const ue = Ie("app", () => {
|
|
|
28
28
|
}, ee = () => {
|
|
29
29
|
v.value = !v.value, I.set("showTabs", v.value);
|
|
30
30
|
}, T = () => {
|
|
31
|
-
|
|
31
|
+
u.value = !u.value, I.set("showFooter", u.value);
|
|
32
32
|
}, N = () => {
|
|
33
33
|
f.value = !f.value, I.set("showBreadcrumb", f.value);
|
|
34
|
-
},
|
|
34
|
+
}, D = (E) => {
|
|
35
35
|
_.value = E, document.documentElement.style.setProperty("--xto-color-primary", E), I.set("primaryColor", E);
|
|
36
36
|
}, G = (E) => {
|
|
37
37
|
g.value.includes(E) || g.value.push(E);
|
|
38
38
|
}, R = (E) => {
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
const oe = g.value.indexOf(E);
|
|
40
|
+
oe > -1 && g.value.splice(oe, 1);
|
|
41
41
|
}, se = () => {
|
|
42
42
|
g.value = [];
|
|
43
43
|
}, ie = (E) => {
|
|
@@ -48,19 +48,19 @@ const ue = Ie("app", () => {
|
|
|
48
48
|
return ye(s, Z), {
|
|
49
49
|
appName: t,
|
|
50
50
|
indexPath: r,
|
|
51
|
-
loginPath:
|
|
51
|
+
loginPath: d,
|
|
52
52
|
isDark: s,
|
|
53
|
-
theme:
|
|
53
|
+
theme: o,
|
|
54
54
|
layout: i,
|
|
55
55
|
isCollapsed: h,
|
|
56
56
|
showTabs: v,
|
|
57
|
-
showFooter:
|
|
57
|
+
showFooter: u,
|
|
58
58
|
showBreadcrumb: f,
|
|
59
59
|
primaryColor: _,
|
|
60
60
|
cachedViews: g,
|
|
61
61
|
mixSubMenus: m,
|
|
62
62
|
themeClass: j,
|
|
63
|
-
setAppName:
|
|
63
|
+
setAppName: A,
|
|
64
64
|
setIndexPath: W,
|
|
65
65
|
setLoginPath: F,
|
|
66
66
|
toggleTheme: V,
|
|
@@ -70,7 +70,7 @@ const ue = Ie("app", () => {
|
|
|
70
70
|
toggleTabs: ee,
|
|
71
71
|
toggleFooter: T,
|
|
72
72
|
toggleBreadcrumb: N,
|
|
73
|
-
setPrimaryColor:
|
|
73
|
+
setPrimaryColor: D,
|
|
74
74
|
addCachedView: G,
|
|
75
75
|
removeCachedView: R,
|
|
76
76
|
clearCachedViews: se,
|
|
@@ -79,8 +79,8 @@ const ue = Ie("app", () => {
|
|
|
79
79
|
};
|
|
80
80
|
}), zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81
81
|
__proto__: null,
|
|
82
|
-
useAppStore:
|
|
83
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
82
|
+
useAppStore: de
|
|
83
|
+
}, Symbol.toStringTag, { value: "Module" })), De = "menu_list", Ae = "permission_list", Tt = {
|
|
84
84
|
menuCode: "home",
|
|
85
85
|
menuName: "首页",
|
|
86
86
|
menuUrl: "/dashboard",
|
|
@@ -97,37 +97,37 @@ function it(t) {
|
|
|
97
97
|
}
|
|
98
98
|
function Pt(t) {
|
|
99
99
|
const r = [];
|
|
100
|
-
function
|
|
101
|
-
s.forEach((
|
|
102
|
-
|
|
100
|
+
function d(s) {
|
|
101
|
+
s.forEach((o) => {
|
|
102
|
+
o.type === 1 && o.menuCode && r.push(o.menuCode), o.children && d(o.children);
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
return
|
|
105
|
+
return d(t), r;
|
|
106
106
|
}
|
|
107
|
-
const
|
|
108
|
-
const t = y(I.get(
|
|
107
|
+
const ue = Ie("menu", () => {
|
|
108
|
+
const t = y(I.get(De) || []), r = y(I.get(Ae) || []), d = w(() => t.value.length > 0);
|
|
109
109
|
return {
|
|
110
110
|
menuList: t,
|
|
111
111
|
permissions: r,
|
|
112
|
-
hasMenu:
|
|
112
|
+
hasMenu: d,
|
|
113
113
|
setMenuList: (h) => {
|
|
114
|
-
r.value = Pt(h), I.set(
|
|
114
|
+
r.value = Pt(h), I.set(Ae, r.value);
|
|
115
115
|
const v = it(h);
|
|
116
|
-
t.value = [Tt, ...v], I.set(
|
|
116
|
+
t.value = [Tt, ...v], I.set(De, t.value);
|
|
117
117
|
},
|
|
118
118
|
clearMenu: () => {
|
|
119
|
-
t.value = [], r.value = [], I.remove(
|
|
119
|
+
t.value = [], r.value = [], I.remove(De), I.remove(Ae);
|
|
120
120
|
},
|
|
121
121
|
hasPermission: (h) => Array.isArray(h) ? h.some((v) => r.value.includes(v)) : r.value.includes(h)
|
|
122
122
|
};
|
|
123
123
|
}), Fe = "user_info", le = Ie("user", () => {
|
|
124
|
-
const t = y(I.get(Fe)), r = w(() => !!t.value),
|
|
124
|
+
const t = y(I.get(Fe)), r = w(() => !!t.value), d = w(() => {
|
|
125
125
|
var m;
|
|
126
126
|
return ((m = t.value) == null ? void 0 : m.userId) || "";
|
|
127
127
|
}), s = w(() => {
|
|
128
128
|
var m;
|
|
129
129
|
return ((m = t.value) == null ? void 0 : m.userName) || "";
|
|
130
|
-
}),
|
|
130
|
+
}), o = w(() => {
|
|
131
131
|
var m;
|
|
132
132
|
return ((m = t.value) == null ? void 0 : m.departmentName) || "";
|
|
133
133
|
}), i = w(() => {
|
|
@@ -139,7 +139,7 @@ const de = Ie("menu", () => {
|
|
|
139
139
|
}), v = w(() => {
|
|
140
140
|
var m;
|
|
141
141
|
return ((m = t.value) == null ? void 0 : m.mobilePhone) || "";
|
|
142
|
-
}),
|
|
142
|
+
}), u = w(() => {
|
|
143
143
|
var m;
|
|
144
144
|
return ((m = t.value) == null ? void 0 : m.positionName) || "";
|
|
145
145
|
}), f = w(() => {
|
|
@@ -149,13 +149,13 @@ const de = Ie("menu", () => {
|
|
|
149
149
|
return {
|
|
150
150
|
userInfo: t,
|
|
151
151
|
isLoggedIn: r,
|
|
152
|
-
userId:
|
|
152
|
+
userId: d,
|
|
153
153
|
userName: s,
|
|
154
|
-
departmentName:
|
|
154
|
+
departmentName: o,
|
|
155
155
|
roleName: i,
|
|
156
156
|
email: h,
|
|
157
157
|
mobilePhone: v,
|
|
158
|
-
positionName:
|
|
158
|
+
positionName: u,
|
|
159
159
|
avatar: f,
|
|
160
160
|
setUserInfo: (m) => {
|
|
161
161
|
t.value = m, I.set(Fe, m);
|
|
@@ -165,34 +165,34 @@ const de = Ie("menu", () => {
|
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
167
|
}), Ee = Ie("auth", () => {
|
|
168
|
-
const t = y(st()), r = w(() =>
|
|
168
|
+
const t = y(st()), r = w(() => ot()), d = y(""), s = y(""), o = y(""), i = y("/login");
|
|
169
169
|
return {
|
|
170
170
|
token: t,
|
|
171
171
|
isLoggedIn: r,
|
|
172
|
-
baseUrl:
|
|
172
|
+
baseUrl: d,
|
|
173
173
|
appId: s,
|
|
174
|
-
clientId:
|
|
174
|
+
clientId: o,
|
|
175
175
|
loginPath: i,
|
|
176
176
|
login: (m) => {
|
|
177
177
|
t.value = m.access_token, nt(m);
|
|
178
178
|
},
|
|
179
179
|
logout: () => {
|
|
180
|
-
t.value = null,
|
|
180
|
+
t.value = null, at();
|
|
181
181
|
},
|
|
182
182
|
setBaseUrl: (m) => {
|
|
183
|
-
|
|
183
|
+
d.value = m;
|
|
184
184
|
},
|
|
185
185
|
setAppId: (m) => {
|
|
186
186
|
s.value = m;
|
|
187
187
|
},
|
|
188
188
|
setClientId: (m) => {
|
|
189
|
-
|
|
189
|
+
o.value = m;
|
|
190
190
|
},
|
|
191
191
|
setLoginPath: (m) => {
|
|
192
192
|
i.value = m;
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
|
-
}),
|
|
195
|
+
}), Dt = { class: "menu-item__content" }, At = { class: "menu-item__icon" }, Ft = {
|
|
196
196
|
key: 1,
|
|
197
197
|
class: "menu-item__char"
|
|
198
198
|
}, Bt = { class: "menu-item__text" }, Vt = { class: "menu-item__content" }, Ot = {
|
|
@@ -207,7 +207,7 @@ const de = Ie("menu", () => {
|
|
|
207
207
|
menu: {}
|
|
208
208
|
},
|
|
209
209
|
setup(t) {
|
|
210
|
-
const r = t,
|
|
210
|
+
const r = t, d = /* @__PURE__ */ new Set([
|
|
211
211
|
"arrow-up",
|
|
212
212
|
"arrow-down",
|
|
213
213
|
"arrow-left",
|
|
@@ -309,10 +309,10 @@ const de = Ie("menu", () => {
|
|
|
309
309
|
"sun",
|
|
310
310
|
"theme",
|
|
311
311
|
"skin"
|
|
312
|
-
]), s = (
|
|
313
|
-
if (!
|
|
314
|
-
if (
|
|
315
|
-
const _ =
|
|
312
|
+
]), s = (u) => {
|
|
313
|
+
if (!u || u === "") return "";
|
|
314
|
+
if (u.startsWith("tineco-icon-")) {
|
|
315
|
+
const _ = u.replace("tineco-icon-", "");
|
|
316
316
|
return {
|
|
317
317
|
home: "home",
|
|
318
318
|
dashboard: "dashboard",
|
|
@@ -345,45 +345,45 @@ const de = Ie("menu", () => {
|
|
|
345
345
|
app: "app",
|
|
346
346
|
list: "list",
|
|
347
347
|
grid: "grid"
|
|
348
|
-
}[
|
|
349
|
-
},
|
|
350
|
-
return (
|
|
348
|
+
}[u] || u;
|
|
349
|
+
}, o = (u) => u ? u.charAt(0) : "", i = (u) => d.has(u), h = w(() => r.menu.menuId || r.menu.menuCode || r.menu.menuUrl || ""), v = w(() => r.menu.children && r.menu.children.length > 0);
|
|
350
|
+
return (u, f) => {
|
|
351
351
|
const _ = rt("SidebarMenuItem", !0);
|
|
352
|
-
return v.value ? (
|
|
352
|
+
return v.value ? (a(), B(n(Oe), {
|
|
353
353
|
key: 0,
|
|
354
354
|
index: h.value
|
|
355
355
|
}, {
|
|
356
356
|
title: M(() => [
|
|
357
|
-
e("span",
|
|
358
|
-
e("span",
|
|
359
|
-
i(s(t.menu.icon)) ? (
|
|
357
|
+
e("span", Dt, [
|
|
358
|
+
e("span", At, [
|
|
359
|
+
i(s(t.menu.icon)) ? (a(), B(n(U), {
|
|
360
360
|
key: 0,
|
|
361
361
|
name: s(t.menu.icon),
|
|
362
362
|
size: 16
|
|
363
|
-
}, null, 8, ["name"])) : (
|
|
363
|
+
}, null, 8, ["name"])) : (a(), c("span", Ft, x(o(t.menu.menuName)), 1))
|
|
364
364
|
]),
|
|
365
365
|
e("span", Bt, x(t.menu.menuName), 1)
|
|
366
366
|
])
|
|
367
367
|
]),
|
|
368
368
|
default: M(() => [
|
|
369
|
-
(
|
|
369
|
+
(a(!0), c(K, null, X(t.menu.children, (g) => (a(), B(_, {
|
|
370
370
|
key: g.menuId || g.menuCode || g.menuUrl,
|
|
371
371
|
menu: g
|
|
372
372
|
}, null, 8, ["menu"]))), 128))
|
|
373
373
|
]),
|
|
374
374
|
_: 1
|
|
375
|
-
}, 8, ["index"])) : (
|
|
375
|
+
}, 8, ["index"])) : (a(), B(n(Se), {
|
|
376
376
|
key: 1,
|
|
377
377
|
index: t.menu.menuUrl || h.value
|
|
378
378
|
}, {
|
|
379
379
|
default: M(() => [
|
|
380
380
|
e("span", Vt, [
|
|
381
|
-
t.menu.menuName !== "首页" ? (
|
|
382
|
-
i(s(t.menu.icon)) ? (
|
|
381
|
+
t.menu.menuName !== "首页" ? (a(), c("span", Ot, [
|
|
382
|
+
i(s(t.menu.icon)) ? (a(), B(n(U), {
|
|
383
383
|
key: 0,
|
|
384
384
|
name: s(t.menu.icon),
|
|
385
385
|
size: 16
|
|
386
|
-
}, null, 8, ["name"])) : (
|
|
386
|
+
}, null, 8, ["name"])) : (a(), c("span", Rt, x(o(t.menu.menuName)), 1))
|
|
387
387
|
])) : P("", !0),
|
|
388
388
|
e("span", Kt, x(t.menu.menuName), 1)
|
|
389
389
|
])
|
|
@@ -393,11 +393,11 @@ const de = Ie("menu", () => {
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
}), re = (t, r) => {
|
|
396
|
-
const
|
|
397
|
-
for (const [s,
|
|
398
|
-
|
|
399
|
-
return
|
|
400
|
-
}, Wt = /* @__PURE__ */ re(jt, [["__scopeId", "data-v-
|
|
396
|
+
const d = t.__vccOpts || t;
|
|
397
|
+
for (const [s, o] of r)
|
|
398
|
+
d[s] = o;
|
|
399
|
+
return d;
|
|
400
|
+
}, Wt = /* @__PURE__ */ re(jt, [["__scopeId", "data-v-78c62b56"]]), qt = {
|
|
401
401
|
key: 0,
|
|
402
402
|
class: "sidebar__logo"
|
|
403
403
|
}, Ht = ["src"], Yt = {
|
|
@@ -412,42 +412,42 @@ const de = Ie("menu", () => {
|
|
|
412
412
|
logoSrc: { default: "/vite.svg" }
|
|
413
413
|
},
|
|
414
414
|
setup(t) {
|
|
415
|
-
const r = t,
|
|
415
|
+
const r = t, d = we(), s = me(), o = ue(), i = le(), h = Ee(), v = de(), u = w(() => r.menuList.length > 0 ? r.menuList : o.menuList), f = w(() => v.isCollapsed), _ = w(() => d.path), g = (T) => T.menuId || T.menuCode || T.menuUrl || "", m = () => u.value.map(g).join(","), j = I.get(Ve) || "", A = m(), W = j === A ? I.get(Be) || [] : [], F = y(W);
|
|
416
416
|
ye(F, (T) => {
|
|
417
417
|
I.set(Be, T), I.set(Ve, m());
|
|
418
418
|
}, { deep: !0 });
|
|
419
|
-
const V = (T, N,
|
|
419
|
+
const V = (T, N, D = []) => {
|
|
420
420
|
var G;
|
|
421
421
|
for (const R of T) {
|
|
422
422
|
if (R.menuUrl && (N === R.menuUrl || N.startsWith(R.menuUrl + "/")))
|
|
423
|
-
return [...
|
|
423
|
+
return [...D, g(R)];
|
|
424
424
|
if ((G = R.children) != null && G.length) {
|
|
425
|
-
const se = V(R.children, N, [...
|
|
425
|
+
const se = V(R.children, N, [...D, g(R)]);
|
|
426
426
|
if (se) return se;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
return null;
|
|
430
430
|
};
|
|
431
|
-
ye([() =>
|
|
431
|
+
ye([() => d.path, u], ([T, N]) => {
|
|
432
432
|
if (N.length > 0) {
|
|
433
|
-
const
|
|
434
|
-
if (
|
|
435
|
-
const G =
|
|
433
|
+
const D = V(N, T);
|
|
434
|
+
if (D) {
|
|
435
|
+
const G = D.slice(0, -1), R = /* @__PURE__ */ new Set([...F.value, ...G]);
|
|
436
436
|
F.value = Array.from(R);
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
}, { immediate: !0 }), ye(
|
|
439
|
+
}, { immediate: !0 }), ye(u, (T, N) => {
|
|
440
440
|
T !== N && (F.value = [], I.set(Be, []), I.set(Ve, m()));
|
|
441
441
|
}, { immediate: !1 });
|
|
442
|
-
const H = w(() => v.isDark ? "#
|
|
443
|
-
T && T !==
|
|
442
|
+
const H = w(() => v.isDark ? "#111A2C" : "#fff"), Z = w(() => v.isDark ? "#CBD5E1" : "#334155"), Y = w(() => v.isDark ? "#4C8DFF" : "#1D4ED8"), q = (T) => {
|
|
443
|
+
T && T !== d.path && s.push(T);
|
|
444
444
|
}, ee = () => {
|
|
445
|
-
h.logout(), i.clearUserInfo(),
|
|
445
|
+
h.logout(), i.clearUserInfo(), o.clearMenu(), s.push(v.loginPath);
|
|
446
446
|
};
|
|
447
|
-
return (T, N) => (
|
|
447
|
+
return (T, N) => (a(), c("div", {
|
|
448
448
|
class: J(["sidebar", { "sidebar--collapsed": f.value }])
|
|
449
449
|
}, [
|
|
450
|
-
r.showLogo ? (
|
|
450
|
+
r.showLogo ? (a(), c("div", qt, [
|
|
451
451
|
e("img", {
|
|
452
452
|
src: r.logoSrc,
|
|
453
453
|
alt: "Logo",
|
|
@@ -459,9 +459,9 @@ const de = Ie("menu", () => {
|
|
|
459
459
|
])) : P("", !0),
|
|
460
460
|
b(n(Ge), {
|
|
461
461
|
modelValue: _.value,
|
|
462
|
-
"onUpdate:modelValue": N[0] || (N[0] = (
|
|
462
|
+
"onUpdate:modelValue": N[0] || (N[0] = (D) => _.value = D),
|
|
463
463
|
openeds: F.value,
|
|
464
|
-
"onUpdate:openeds": N[1] || (N[1] = (
|
|
464
|
+
"onUpdate:openeds": N[1] || (N[1] = (D) => F.value = D),
|
|
465
465
|
mode: "vertical",
|
|
466
466
|
collapse: f.value,
|
|
467
467
|
"collapse-transition": !1,
|
|
@@ -472,14 +472,14 @@ const de = Ie("menu", () => {
|
|
|
472
472
|
onSelect: q
|
|
473
473
|
}, {
|
|
474
474
|
default: M(() => [
|
|
475
|
-
(
|
|
476
|
-
key: g(
|
|
477
|
-
menu:
|
|
475
|
+
(a(!0), c(K, null, X(u.value, (D) => (a(), B(Wt, {
|
|
476
|
+
key: g(D),
|
|
477
|
+
menu: D
|
|
478
478
|
}, null, 8, ["menu"]))), 128))
|
|
479
479
|
]),
|
|
480
480
|
_: 1
|
|
481
481
|
}, 8, ["modelValue", "openeds", "collapse", "background-color", "text-color", "active-text-color"]),
|
|
482
|
-
r.showUser && !f.value ? (
|
|
482
|
+
r.showUser && !f.value ? (a(), c("div", Yt, [
|
|
483
483
|
e("div", Gt, [
|
|
484
484
|
e("span", Xt, x(n(i).userName), 1),
|
|
485
485
|
e("span", Jt, x(n(i).departmentName), 1)
|
|
@@ -497,13 +497,13 @@ const de = Ie("menu", () => {
|
|
|
497
497
|
])) : P("", !0)
|
|
498
498
|
], 2));
|
|
499
499
|
}
|
|
500
|
-
}), tt = /* @__PURE__ */ re(Zt, [["__scopeId", "data-v-
|
|
500
|
+
}), tt = /* @__PURE__ */ re(Zt, [["__scopeId", "data-v-6c197c26"]]), Qt = { class: "header" }, es = { class: "header__left" }, ts = {
|
|
501
501
|
key: 0,
|
|
502
502
|
class: "header__breadcrumb"
|
|
503
503
|
}, ss = {
|
|
504
504
|
key: 0,
|
|
505
505
|
class: "breadcrumb-separator"
|
|
506
|
-
},
|
|
506
|
+
}, os = { class: "header__right" }, as = {
|
|
507
507
|
key: 0,
|
|
508
508
|
class: "header__search-dropdown"
|
|
509
509
|
}, ns = {
|
|
@@ -515,10 +515,10 @@ const de = Ie("menu", () => {
|
|
|
515
515
|
}, is = {
|
|
516
516
|
key: 1,
|
|
517
517
|
class: "header__search-char"
|
|
518
|
-
}, cs = { class: "header__search-item-title" },
|
|
518
|
+
}, cs = { class: "header__search-item-title" }, ds = {
|
|
519
519
|
key: 1,
|
|
520
520
|
class: "header__search-item-parent"
|
|
521
|
-
},
|
|
521
|
+
}, us = {
|
|
522
522
|
key: 1,
|
|
523
523
|
class: "header__search-empty"
|
|
524
524
|
}, ms = ["title"], ps = { class: "header__avatar" }, vs = { class: "header__user-name" }, hs = {
|
|
@@ -533,15 +533,15 @@ const de = Ie("menu", () => {
|
|
|
533
533
|
}, Ns = {
|
|
534
534
|
key: 2,
|
|
535
535
|
class: "layout-preview-mix"
|
|
536
|
-
}, Is = { class: "layout-option__label" }, Es = { class: "settings-section" }, Us = { class: "settings-color-options" }, zs = ["title", "onClick"], Ts = { class: "settings-section" }, Ps = { class: "settings-switch-list" },
|
|
536
|
+
}, Is = { class: "layout-option__label" }, Es = { class: "settings-section" }, Us = { class: "settings-color-options" }, zs = ["title", "onClick"], Ts = { class: "settings-section" }, Ps = { class: "settings-switch-list" }, Ds = { class: "settings-switch-item" }, As = { class: "settings-switch-item" }, Fs = /* @__PURE__ */ ne({
|
|
537
537
|
__name: "Header",
|
|
538
538
|
setup(t) {
|
|
539
|
-
const r = we(),
|
|
539
|
+
const r = we(), d = me(), s = de(), o = le(), i = Ee(), h = ue(), v = y(!1), u = y(!1), f = y(null), _ = y(!1), g = y(!1), m = y(""), j = y(null), A = y(!1), W = [
|
|
540
540
|
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
541
541
|
{ value: "top", label: "顶部菜单", icon: "menu" },
|
|
542
542
|
{ value: "mix", label: "混合菜单", icon: "grid" }
|
|
543
543
|
], F = [
|
|
544
|
-
{ value: "#
|
|
544
|
+
{ value: "#1D4ED8", label: "品牌蓝" },
|
|
545
545
|
{ value: "#1890ff", label: "科技蓝" },
|
|
546
546
|
{ value: "#52c41a", label: "极光绿" },
|
|
547
547
|
{ value: "#faad14", label: "日落橙" },
|
|
@@ -696,76 +696,76 @@ const de = Ie("menu", () => {
|
|
|
696
696
|
}[z] || z;
|
|
697
697
|
}, q = (z) => z ? z.charAt(0) : "", ee = (z) => Z.has(z), T = w(() => m.value.trim() ? H(h.menuList).filter(
|
|
698
698
|
(k) => k.title.toLowerCase().includes(m.value.toLowerCase())
|
|
699
|
-
) : []), N = w(() => s.layout),
|
|
699
|
+
) : []), N = w(() => s.layout), D = () => {
|
|
700
700
|
s.toggleCollapse();
|
|
701
701
|
}, G = () => {
|
|
702
702
|
s.toggleTheme();
|
|
703
703
|
}, R = () => {
|
|
704
|
-
|
|
704
|
+
u.value = !0;
|
|
705
705
|
}, se = (z) => {
|
|
706
|
-
s.setLayout(z),
|
|
706
|
+
s.setLayout(z), u.value = !1;
|
|
707
707
|
}, ie = (z) => {
|
|
708
|
-
|
|
708
|
+
A.value = z;
|
|
709
709
|
const k = document.documentElement;
|
|
710
710
|
z ? k.classList.add("grey-mode") : k.classList.remove("grey-mode");
|
|
711
711
|
}, pe = () => {
|
|
712
|
-
ie(!
|
|
712
|
+
ie(!A.value), u.value = !1;
|
|
713
713
|
}, E = () => {
|
|
714
|
-
s.toggleTheme(),
|
|
715
|
-
},
|
|
714
|
+
s.toggleTheme(), u.value = !1;
|
|
715
|
+
}, oe = () => {
|
|
716
716
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
717
717
|
}, _e = () => {
|
|
718
718
|
_.value = !!document.fullscreenElement;
|
|
719
719
|
}, ce = () => {
|
|
720
720
|
v.value = !v.value;
|
|
721
|
-
},
|
|
721
|
+
}, ae = () => {
|
|
722
722
|
v.value = !1;
|
|
723
723
|
}, ve = () => {
|
|
724
724
|
g.value = !1, m.value = "";
|
|
725
725
|
}, xe = (z) => {
|
|
726
|
-
|
|
726
|
+
d.push(z), ve();
|
|
727
727
|
}, Ce = (z) => {
|
|
728
|
-
s.setPrimaryColor(z),
|
|
728
|
+
s.setPrimaryColor(z), u.value = !1;
|
|
729
729
|
}, $e = () => {
|
|
730
|
-
|
|
730
|
+
ae(), d.push("/profile");
|
|
731
731
|
}, Le = () => {
|
|
732
|
-
|
|
732
|
+
ae(), d.push("/change-password");
|
|
733
733
|
}, Me = () => {
|
|
734
|
-
|
|
734
|
+
ae(), i.logout(), o.clearUserInfo(), h.clearMenu(), d.push(s.loginPath);
|
|
735
735
|
}, fe = (z) => {
|
|
736
|
-
f.value && !f.value.contains(z.target) &&
|
|
736
|
+
f.value && !f.value.contains(z.target) && ae(), j.value && !j.value.contains(z.target) && ve();
|
|
737
737
|
}, ge = (z) => {
|
|
738
|
-
z.key === "Escape" && (ve(),
|
|
738
|
+
z.key === "Escape" && (ve(), ae());
|
|
739
739
|
};
|
|
740
740
|
return Ke(() => {
|
|
741
|
-
document.addEventListener("click", fe), document.addEventListener("fullscreenchange", _e), document.addEventListener("keydown", ge), s.initTheme(),
|
|
741
|
+
document.addEventListener("click", fe), document.addEventListener("fullscreenchange", _e), document.addEventListener("keydown", ge), s.initTheme(), A.value = document.documentElement.classList.contains("grey-mode");
|
|
742
742
|
}), je(() => {
|
|
743
743
|
document.removeEventListener("click", fe), document.removeEventListener("fullscreenchange", _e), document.removeEventListener("keydown", ge);
|
|
744
744
|
}), (z, k) => {
|
|
745
745
|
var Q;
|
|
746
|
-
return
|
|
746
|
+
return a(), c("div", Qt, [
|
|
747
747
|
e("div", es, [
|
|
748
748
|
e("div", {
|
|
749
749
|
class: "header__collapse",
|
|
750
|
-
onClick:
|
|
750
|
+
onClick: D
|
|
751
751
|
}, [
|
|
752
752
|
b(n(U), {
|
|
753
753
|
name: n(s).isCollapsed ? "menu-unfold" : "menu-fold",
|
|
754
754
|
size: 18
|
|
755
755
|
}, null, 8, ["name"])
|
|
756
756
|
]),
|
|
757
|
-
n(s).showBreadcrumb ? (
|
|
758
|
-
(
|
|
757
|
+
n(s).showBreadcrumb ? (a(), c("div", ts, [
|
|
758
|
+
(a(!0), c(K, null, X(V.value, (C, S) => (a(), c("span", {
|
|
759
759
|
key: C.path
|
|
760
760
|
}, [
|
|
761
|
-
S > 0 ? (
|
|
761
|
+
S > 0 ? (a(), c("span", ss, "/")) : P("", !0),
|
|
762
762
|
e("span", {
|
|
763
763
|
class: J({ "is-current": S === V.value.length - 1 })
|
|
764
764
|
}, x(C.title), 3)
|
|
765
765
|
]))), 128))
|
|
766
766
|
])) : P("", !0)
|
|
767
767
|
]),
|
|
768
|
-
e("div",
|
|
768
|
+
e("div", os, [
|
|
769
769
|
e("div", {
|
|
770
770
|
class: "header__search",
|
|
771
771
|
ref_key: "searchRef",
|
|
@@ -787,24 +787,24 @@ const de = Ie("menu", () => {
|
|
|
787
787
|
]),
|
|
788
788
|
b(be, { name: "search-dropdown" }, {
|
|
789
789
|
default: M(() => [
|
|
790
|
-
g.value && (T.value.length > 0 || m.value) ? (
|
|
791
|
-
T.value.length > 0 ? (
|
|
792
|
-
(
|
|
790
|
+
g.value && (T.value.length > 0 || m.value) ? (a(), c("div", as, [
|
|
791
|
+
T.value.length > 0 ? (a(), c("div", ns, [
|
|
792
|
+
(a(!0), c(K, null, X(T.value, (C) => (a(), c("div", {
|
|
793
793
|
key: C.path,
|
|
794
794
|
class: "header__search-item",
|
|
795
795
|
onClick: (S) => xe(C.path)
|
|
796
796
|
}, [
|
|
797
|
-
C.title !== "首页" ? (
|
|
798
|
-
ee(Y(C.icon)) ? (
|
|
797
|
+
C.title !== "首页" ? (a(), c("span", rs, [
|
|
798
|
+
ee(Y(C.icon)) ? (a(), B(n(U), {
|
|
799
799
|
key: 0,
|
|
800
800
|
name: Y(C.icon),
|
|
801
801
|
size: 16
|
|
802
|
-
}, null, 8, ["name"])) : (
|
|
802
|
+
}, null, 8, ["name"])) : (a(), c("span", is, x(q(C.title)), 1))
|
|
803
803
|
])) : P("", !0),
|
|
804
804
|
e("span", cs, x(C.title), 1),
|
|
805
|
-
C.parentTitle ? (
|
|
805
|
+
C.parentTitle ? (a(), c("span", ds, x(C.parentTitle), 1)) : P("", !0)
|
|
806
806
|
], 8, ls))), 128))
|
|
807
|
-
])) : (
|
|
807
|
+
])) : (a(), c("div", us, " 未找到匹配的菜单 "))
|
|
808
808
|
])) : P("", !0)
|
|
809
809
|
]),
|
|
810
810
|
_: 1
|
|
@@ -812,7 +812,7 @@ const de = Ie("menu", () => {
|
|
|
812
812
|
], 512),
|
|
813
813
|
e("div", {
|
|
814
814
|
class: "header__action",
|
|
815
|
-
onClick:
|
|
815
|
+
onClick: oe,
|
|
816
816
|
title: _.value ? "退出全屏" : "全屏"
|
|
817
817
|
}, [
|
|
818
818
|
b(n(U), {
|
|
@@ -850,9 +850,9 @@ const de = Ie("menu", () => {
|
|
|
850
850
|
onClick: Te(ce, ["stop"])
|
|
851
851
|
}, [
|
|
852
852
|
e("div", ps, [
|
|
853
|
-
e("span", null, x(((Q = n(
|
|
853
|
+
e("span", null, x(((Q = n(o).userName) == null ? void 0 : Q.charAt(0)) || "U"), 1)
|
|
854
854
|
]),
|
|
855
|
-
e("span", vs, x(n(
|
|
855
|
+
e("span", vs, x(n(o).userName), 1),
|
|
856
856
|
e("span", {
|
|
857
857
|
class: J(["header__user-arrow", { "is-active": v.value }])
|
|
858
858
|
}, "▼", 2)
|
|
@@ -861,14 +861,14 @@ const de = Ie("menu", () => {
|
|
|
861
861
|
default: M(() => {
|
|
862
862
|
var C;
|
|
863
863
|
return [
|
|
864
|
-
v.value ? (
|
|
864
|
+
v.value ? (a(), c("div", hs, [
|
|
865
865
|
e("div", _s, [
|
|
866
866
|
e("div", fs, [
|
|
867
|
-
e("span", null, x(((C = n(
|
|
867
|
+
e("span", null, x(((C = n(o).userName) == null ? void 0 : C.charAt(0)) || "U"), 1)
|
|
868
868
|
]),
|
|
869
869
|
e("div", gs, [
|
|
870
|
-
e("div", ys, x(n(
|
|
871
|
-
e("div", bs, x(n(
|
|
870
|
+
e("div", ys, x(n(o).userName), 1),
|
|
871
|
+
e("div", bs, x(n(o).roleName || n(o).departmentName), 1)
|
|
872
872
|
])
|
|
873
873
|
]),
|
|
874
874
|
k[7] || (k[7] = e("div", { class: "header__dropdown-divider" }, null, -1)),
|
|
@@ -913,8 +913,8 @@ const de = Ie("menu", () => {
|
|
|
913
913
|
], 512)
|
|
914
914
|
]),
|
|
915
915
|
b(n(Xe), {
|
|
916
|
-
modelValue:
|
|
917
|
-
"onUpdate:modelValue": k[2] || (k[2] = (C) =>
|
|
916
|
+
modelValue: u.value,
|
|
917
|
+
"onUpdate:modelValue": k[2] || (k[2] = (C) => u.value = C),
|
|
918
918
|
title: "换肤设置",
|
|
919
919
|
direction: "rtl",
|
|
920
920
|
size: "320px"
|
|
@@ -924,22 +924,22 @@ const de = Ie("menu", () => {
|
|
|
924
924
|
e("div", xs, [
|
|
925
925
|
k[11] || (k[11] = e("div", { class: "settings-title" }, "布局模式", -1)),
|
|
926
926
|
e("div", Cs, [
|
|
927
|
-
(
|
|
927
|
+
(a(), c(K, null, X(W, (C) => e("div", {
|
|
928
928
|
key: C.value,
|
|
929
929
|
class: J(["layout-option", { "is-active": N.value === C.value }]),
|
|
930
930
|
onClick: (S) => se(C.value)
|
|
931
931
|
}, [
|
|
932
932
|
e("div", Ls, [
|
|
933
|
-
C.value === "sidebar" ? (
|
|
933
|
+
C.value === "sidebar" ? (a(), c("div", Ms, [...k[8] || (k[8] = [
|
|
934
934
|
e("div", { class: "preview-aside" }, null, -1),
|
|
935
935
|
e("div", { class: "preview-main" }, [
|
|
936
936
|
e("div", { class: "preview-header" }),
|
|
937
937
|
e("div", { class: "preview-content" })
|
|
938
938
|
], -1)
|
|
939
|
-
])])) : C.value === "top" ? (
|
|
939
|
+
])])) : C.value === "top" ? (a(), c("div", Ss, [...k[9] || (k[9] = [
|
|
940
940
|
e("div", { class: "preview-header-full" }, null, -1),
|
|
941
941
|
e("div", { class: "preview-content-full" }, null, -1)
|
|
942
|
-
])])) : (
|
|
942
|
+
])])) : (a(), c("div", Ns, [...k[10] || (k[10] = [
|
|
943
943
|
e("div", { class: "preview-header-mix" }, [
|
|
944
944
|
e("div", { class: "preview-mix-left" })
|
|
945
945
|
], -1),
|
|
@@ -956,14 +956,14 @@ const de = Ie("menu", () => {
|
|
|
956
956
|
e("div", Es, [
|
|
957
957
|
k[12] || (k[12] = e("div", { class: "settings-title" }, "主题色", -1)),
|
|
958
958
|
e("div", Us, [
|
|
959
|
-
(
|
|
959
|
+
(a(), c(K, null, X(F, (C) => e("div", {
|
|
960
960
|
key: C.value,
|
|
961
961
|
class: J(["color-option", { "is-active": n(s).primaryColor === C.value }]),
|
|
962
962
|
style: Ne({ backgroundColor: C.value }),
|
|
963
963
|
title: C.label,
|
|
964
964
|
onClick: (S) => Ce(C.value)
|
|
965
965
|
}, [
|
|
966
|
-
n(s).primaryColor === C.value ? (
|
|
966
|
+
n(s).primaryColor === C.value ? (a(), B(n(U), {
|
|
967
967
|
key: 0,
|
|
968
968
|
name: "check",
|
|
969
969
|
size: 12,
|
|
@@ -975,16 +975,16 @@ const de = Ie("menu", () => {
|
|
|
975
975
|
e("div", Ts, [
|
|
976
976
|
k[17] || (k[17] = e("div", { class: "settings-title" }, "功能设置", -1)),
|
|
977
977
|
e("div", Ps, [
|
|
978
|
-
e("div",
|
|
978
|
+
e("div", Ds, [
|
|
979
979
|
k[14] || (k[14] = e("span", null, "灰色模式", -1)),
|
|
980
980
|
e("div", {
|
|
981
|
-
class: J(["switch-wrapper", { "is-checked":
|
|
981
|
+
class: J(["switch-wrapper", { "is-checked": A.value }]),
|
|
982
982
|
onClick: pe
|
|
983
983
|
}, [...k[13] || (k[13] = [
|
|
984
984
|
e("span", { class: "switch-core" }, null, -1)
|
|
985
985
|
])], 2)
|
|
986
986
|
]),
|
|
987
|
-
e("div",
|
|
987
|
+
e("div", As, [
|
|
988
988
|
k[16] || (k[16] = e("span", null, "暗黑模式", -1)),
|
|
989
989
|
e("div", {
|
|
990
990
|
class: J(["switch-wrapper", { "is-checked": n(s).isDark }]),
|
|
@@ -1002,7 +1002,7 @@ const de = Ie("menu", () => {
|
|
|
1002
1002
|
]);
|
|
1003
1003
|
};
|
|
1004
1004
|
}
|
|
1005
|
-
}), Bs = /* @__PURE__ */ re(Fs, [["__scopeId", "data-v-
|
|
1005
|
+
}), Bs = /* @__PURE__ */ re(Fs, [["__scopeId", "data-v-a68ca7e5"]]), Vs = { class: "top-menu" }, Os = { class: "top-menu__logo" }, Rs = ["src"], Ks = { class: "top-menu__logo-text" }, js = { class: "top-menu__menu-content" }, Ws = {
|
|
1006
1006
|
key: 0,
|
|
1007
1007
|
class: "top-menu__menu-icon"
|
|
1008
1008
|
}, qs = {
|
|
@@ -1011,63 +1011,63 @@ const de = Ie("menu", () => {
|
|
|
1011
1011
|
}, Hs = { class: "top-menu__menu-text" }, Ys = { class: "top-menu__menu-content" }, Gs = { class: "top-menu__menu-icon" }, Xs = {
|
|
1012
1012
|
key: 1,
|
|
1013
1013
|
class: "top-menu__menu-char"
|
|
1014
|
-
}, Js = { class: "top-menu__menu-text" }, Zs = { class: "top-menu__menu-content" }, Qs = { class: "top-menu__menu-icon" },
|
|
1014
|
+
}, Js = { class: "top-menu__menu-text" }, Zs = { class: "top-menu__menu-content" }, Qs = { class: "top-menu__menu-icon" }, eo = {
|
|
1015
1015
|
key: 1,
|
|
1016
1016
|
class: "top-menu__menu-char"
|
|
1017
|
-
},
|
|
1017
|
+
}, to = { class: "top-menu__menu-text" }, so = { class: "top-menu__menu-content" }, oo = { class: "top-menu__menu-icon" }, ao = {
|
|
1018
1018
|
key: 1,
|
|
1019
1019
|
class: "top-menu__menu-char"
|
|
1020
|
-
},
|
|
1020
|
+
}, no = { class: "top-menu__menu-text" }, lo = { class: "top-menu__menu-content" }, ro = {
|
|
1021
1021
|
key: 0,
|
|
1022
1022
|
class: "top-menu__menu-icon"
|
|
1023
|
-
},
|
|
1023
|
+
}, io = {
|
|
1024
1024
|
key: 1,
|
|
1025
1025
|
class: "top-menu__menu-char"
|
|
1026
|
-
},
|
|
1026
|
+
}, co = { class: "top-menu__menu-text" }, uo = { class: "top-menu__actions" }, mo = {
|
|
1027
1027
|
key: 0,
|
|
1028
1028
|
class: "top-menu__search-dropdown"
|
|
1029
|
-
},
|
|
1029
|
+
}, po = {
|
|
1030
1030
|
key: 0,
|
|
1031
1031
|
class: "top-menu__search-results"
|
|
1032
|
-
},
|
|
1032
|
+
}, vo = ["onClick"], ho = {
|
|
1033
1033
|
key: 0,
|
|
1034
1034
|
class: "top-menu__search-icon-item"
|
|
1035
|
-
},
|
|
1035
|
+
}, _o = {
|
|
1036
1036
|
key: 1,
|
|
1037
1037
|
class: "top-menu__search-char"
|
|
1038
|
-
},
|
|
1038
|
+
}, fo = { class: "top-menu__search-item-title" }, go = {
|
|
1039
1039
|
key: 1,
|
|
1040
1040
|
class: "top-menu__search-item-parent"
|
|
1041
|
-
},
|
|
1041
|
+
}, yo = {
|
|
1042
1042
|
key: 1,
|
|
1043
1043
|
class: "top-menu__search-empty"
|
|
1044
|
-
},
|
|
1044
|
+
}, bo = ["title"], ko = { class: "top-menu__avatar" }, wo = { class: "top-menu__user-name" }, xo = {
|
|
1045
1045
|
key: 0,
|
|
1046
1046
|
class: "top-menu__dropdown"
|
|
1047
|
-
},
|
|
1047
|
+
}, Co = { class: "top-menu__dropdown-header" }, $o = { class: "top-menu__dropdown-avatar" }, Lo = { class: "top-menu__dropdown-info" }, Mo = { class: "top-menu__dropdown-name" }, So = { class: "top-menu__dropdown-role" }, No = { class: "top-menu__dropdown-menu" }, Io = { class: "settings-drawer" }, Eo = { class: "settings-section" }, Uo = { class: "settings-layout-options" }, zo = ["onClick"], To = { class: "layout-option__preview" }, Po = {
|
|
1048
1048
|
key: 0,
|
|
1049
1049
|
class: "layout-preview-sidebar"
|
|
1050
|
-
},
|
|
1050
|
+
}, Do = {
|
|
1051
1051
|
key: 1,
|
|
1052
1052
|
class: "layout-preview-top"
|
|
1053
|
-
},
|
|
1053
|
+
}, Ao = {
|
|
1054
1054
|
key: 2,
|
|
1055
1055
|
class: "layout-preview-mix"
|
|
1056
|
-
},
|
|
1056
|
+
}, Fo = { class: "layout-option__label" }, Bo = { class: "settings-section" }, Vo = { class: "settings-color-options" }, Oo = ["title", "onClick"], Ro = { class: "settings-section" }, Ko = { class: "settings-switch-list" }, jo = { class: "settings-switch-item" }, Wo = { class: "settings-switch-item" }, qo = /* @__PURE__ */ ne({
|
|
1057
1057
|
__name: "TopMenu",
|
|
1058
1058
|
props: {
|
|
1059
1059
|
logoSrc: { default: "/vite.svg" }
|
|
1060
1060
|
},
|
|
1061
1061
|
setup(t) {
|
|
1062
|
-
const r = t,
|
|
1062
|
+
const r = t, d = we(), s = me(), o = ue(), i = de(), h = le(), v = Ee(), u = w(() => d.path), f = (S, L = "") => {
|
|
1063
1063
|
const te = [];
|
|
1064
1064
|
return S.forEach((l) => {
|
|
1065
1065
|
l.children && l.children.length > 0 ? te.push(...f(l.children, l.menuName)) : te.push({ ...l, parentTitle: L, title: l.menuName, path: l.menuUrl });
|
|
1066
1066
|
}), te;
|
|
1067
|
-
}, _ = w(() => Y.value.trim() ? f(
|
|
1067
|
+
}, _ = w(() => Y.value.trim() ? f(o.menuList).filter(
|
|
1068
1068
|
(L) => L.title.toLowerCase().includes(Y.value.toLowerCase())
|
|
1069
|
-
) : []), g = w(() => i.isDark ? "#1d1e1f" : "#fff"), m = w(() => i.isDark ? "#cfd3dc" : "#303133"), j = w(() => "#409eff"),
|
|
1070
|
-
S && S !==
|
|
1069
|
+
) : []), g = w(() => i.isDark ? "#1d1e1f" : "#fff"), m = w(() => i.isDark ? "#cfd3dc" : "#303133"), j = w(() => "#409eff"), A = y(!1), W = y(null), F = y(!1), V = y(!1), H = y(!1), Z = y(!1), Y = y(""), q = y(null), ee = (S) => {
|
|
1070
|
+
S && S !== d.path && s.push(S);
|
|
1071
1071
|
}, T = /* @__PURE__ */ new Set([
|
|
1072
1072
|
"arrow-up",
|
|
1073
1073
|
"arrow-down",
|
|
@@ -1207,28 +1207,28 @@ const de = Ie("menu", () => {
|
|
|
1207
1207
|
list: "list",
|
|
1208
1208
|
grid: "grid"
|
|
1209
1209
|
}[S] || S;
|
|
1210
|
-
},
|
|
1210
|
+
}, D = (S) => S ? S.charAt(0) : "", G = (S) => T.has(S), R = () => {
|
|
1211
1211
|
i.toggleTheme(), V.value = !1;
|
|
1212
1212
|
}, se = () => {
|
|
1213
1213
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
1214
1214
|
}, ie = () => {
|
|
1215
1215
|
F.value = !!document.fullscreenElement;
|
|
1216
1216
|
}, pe = () => {
|
|
1217
|
-
|
|
1217
|
+
A.value = !A.value;
|
|
1218
1218
|
}, E = () => {
|
|
1219
|
-
|
|
1220
|
-
},
|
|
1219
|
+
A.value = !1;
|
|
1220
|
+
}, oe = () => {
|
|
1221
1221
|
Z.value = !1, Y.value = "";
|
|
1222
1222
|
}, _e = (S) => {
|
|
1223
|
-
s.push(S),
|
|
1223
|
+
s.push(S), oe();
|
|
1224
1224
|
}, ce = () => {
|
|
1225
1225
|
V.value = !0;
|
|
1226
|
-
},
|
|
1226
|
+
}, ae = (S) => {
|
|
1227
1227
|
H.value = S;
|
|
1228
1228
|
const L = document.documentElement;
|
|
1229
1229
|
S ? L.classList.add("grey-mode") : L.classList.remove("grey-mode");
|
|
1230
1230
|
}, ve = () => {
|
|
1231
|
-
|
|
1231
|
+
ae(!H.value), V.value = !1;
|
|
1232
1232
|
}, xe = () => {
|
|
1233
1233
|
i.toggleTheme(), V.value = !1;
|
|
1234
1234
|
}, Ce = [
|
|
@@ -1251,11 +1251,11 @@ const de = Ie("menu", () => {
|
|
|
1251
1251
|
}, z = () => {
|
|
1252
1252
|
E(), s.push("/change-password");
|
|
1253
1253
|
}, k = () => {
|
|
1254
|
-
E(), v.logout(), h.clearUserInfo(),
|
|
1254
|
+
E(), v.logout(), h.clearUserInfo(), o.clearMenu(), s.push(i.loginPath);
|
|
1255
1255
|
}, Q = (S) => {
|
|
1256
|
-
W.value && !W.value.contains(S.target) && E(), q.value && !q.value.contains(S.target) &&
|
|
1256
|
+
W.value && !W.value.contains(S.target) && E(), q.value && !q.value.contains(S.target) && oe();
|
|
1257
1257
|
}, C = (S) => {
|
|
1258
|
-
S.key === "Escape" && (
|
|
1258
|
+
S.key === "Escape" && (oe(), E());
|
|
1259
1259
|
};
|
|
1260
1260
|
return Ke(() => {
|
|
1261
1261
|
document.addEventListener("click", Q), document.addEventListener("fullscreenchange", ie), document.addEventListener("keydown", C), H.value = document.documentElement.classList.contains("grey-mode");
|
|
@@ -1263,7 +1263,7 @@ const de = Ie("menu", () => {
|
|
|
1263
1263
|
document.removeEventListener("click", Q), document.removeEventListener("fullscreenchange", ie), document.removeEventListener("keydown", C);
|
|
1264
1264
|
}), (S, L) => {
|
|
1265
1265
|
var te;
|
|
1266
|
-
return
|
|
1266
|
+
return a(), c("div", Vs, [
|
|
1267
1267
|
e("div", Os, [
|
|
1268
1268
|
e("img", {
|
|
1269
1269
|
src: r.logoSrc,
|
|
@@ -1273,7 +1273,7 @@ const de = Ie("menu", () => {
|
|
|
1273
1273
|
e("span", Ks, x(n(i).appName), 1)
|
|
1274
1274
|
]),
|
|
1275
1275
|
b(n(Ge), {
|
|
1276
|
-
"model-value":
|
|
1276
|
+
"model-value": u.value,
|
|
1277
1277
|
mode: "horizontal",
|
|
1278
1278
|
"background-color": g.value,
|
|
1279
1279
|
"text-color": m.value,
|
|
@@ -1282,80 +1282,80 @@ const de = Ie("menu", () => {
|
|
|
1282
1282
|
onSelect: ee
|
|
1283
1283
|
}, {
|
|
1284
1284
|
default: M(() => [
|
|
1285
|
-
(
|
|
1285
|
+
(a(!0), c(K, null, X(n(o).menuList, (l) => (a(), c(K, {
|
|
1286
1286
|
key: l.menuUrl
|
|
1287
1287
|
}, [
|
|
1288
|
-
l.children && l.children.length > 0 ? (
|
|
1288
|
+
l.children && l.children.length > 0 ? (a(), B(n(Oe), {
|
|
1289
1289
|
key: 0,
|
|
1290
1290
|
index: l.menuUrl
|
|
1291
1291
|
}, {
|
|
1292
1292
|
title: M(() => [
|
|
1293
1293
|
e("span", js, [
|
|
1294
|
-
l.menuName !== "首页" ? (
|
|
1295
|
-
G(N(l.icon)) ? (
|
|
1294
|
+
l.menuName !== "首页" ? (a(), c("span", Ws, [
|
|
1295
|
+
G(N(l.icon)) ? (a(), B(n(U), {
|
|
1296
1296
|
key: 0,
|
|
1297
1297
|
name: N(l.icon),
|
|
1298
1298
|
size: 16
|
|
1299
|
-
}, null, 8, ["name"])) : (
|
|
1299
|
+
}, null, 8, ["name"])) : (a(), c("span", qs, x(D(l.menuName)), 1))
|
|
1300
1300
|
])) : P("", !0),
|
|
1301
1301
|
e("span", Hs, x(l.menuName), 1)
|
|
1302
1302
|
])
|
|
1303
1303
|
]),
|
|
1304
1304
|
default: M(() => [
|
|
1305
|
-
(
|
|
1305
|
+
(a(!0), c(K, null, X(l.children, (p) => (a(), c(K, {
|
|
1306
1306
|
key: p.menuUrl
|
|
1307
1307
|
}, [
|
|
1308
|
-
p.children && p.children.length > 0 ? (
|
|
1308
|
+
p.children && p.children.length > 0 ? (a(), B(n(Oe), {
|
|
1309
1309
|
key: 0,
|
|
1310
1310
|
index: p.menuUrl
|
|
1311
1311
|
}, {
|
|
1312
1312
|
title: M(() => [
|
|
1313
1313
|
e("span", Ys, [
|
|
1314
1314
|
e("span", Gs, [
|
|
1315
|
-
G(N(p.icon)) ? (
|
|
1315
|
+
G(N(p.icon)) ? (a(), B(n(U), {
|
|
1316
1316
|
key: 0,
|
|
1317
1317
|
name: N(p.icon),
|
|
1318
1318
|
size: 16
|
|
1319
|
-
}, null, 8, ["name"])) : (
|
|
1319
|
+
}, null, 8, ["name"])) : (a(), c("span", Xs, x(D(p.menuName)), 1))
|
|
1320
1320
|
]),
|
|
1321
1321
|
e("span", Js, x(p.menuName), 1)
|
|
1322
1322
|
])
|
|
1323
1323
|
]),
|
|
1324
1324
|
default: M(() => [
|
|
1325
|
-
(
|
|
1325
|
+
(a(!0), c(K, null, X(p.children, (O) => (a(), B(n(Se), {
|
|
1326
1326
|
key: O.menuUrl,
|
|
1327
1327
|
index: O.menuUrl
|
|
1328
1328
|
}, {
|
|
1329
1329
|
default: M(() => [
|
|
1330
1330
|
e("span", Zs, [
|
|
1331
1331
|
e("span", Qs, [
|
|
1332
|
-
G(N(O.icon)) ? (
|
|
1332
|
+
G(N(O.icon)) ? (a(), B(n(U), {
|
|
1333
1333
|
key: 0,
|
|
1334
1334
|
name: N(O.icon),
|
|
1335
1335
|
size: 16
|
|
1336
|
-
}, null, 8, ["name"])) : (
|
|
1336
|
+
}, null, 8, ["name"])) : (a(), c("span", eo, x(D(O.menuName)), 1))
|
|
1337
1337
|
]),
|
|
1338
|
-
e("span",
|
|
1338
|
+
e("span", to, x(O.menuName), 1)
|
|
1339
1339
|
])
|
|
1340
1340
|
]),
|
|
1341
1341
|
_: 2
|
|
1342
1342
|
}, 1032, ["index"]))), 128))
|
|
1343
1343
|
]),
|
|
1344
1344
|
_: 2
|
|
1345
|
-
}, 1032, ["index"])) : (
|
|
1345
|
+
}, 1032, ["index"])) : (a(), B(n(Se), {
|
|
1346
1346
|
key: 1,
|
|
1347
1347
|
index: p.menuUrl
|
|
1348
1348
|
}, {
|
|
1349
1349
|
default: M(() => [
|
|
1350
|
-
e("span",
|
|
1351
|
-
e("span",
|
|
1352
|
-
G(N(p.icon)) ? (
|
|
1350
|
+
e("span", so, [
|
|
1351
|
+
e("span", oo, [
|
|
1352
|
+
G(N(p.icon)) ? (a(), B(n(U), {
|
|
1353
1353
|
key: 0,
|
|
1354
1354
|
name: N(p.icon),
|
|
1355
1355
|
size: 16
|
|
1356
|
-
}, null, 8, ["name"])) : (
|
|
1356
|
+
}, null, 8, ["name"])) : (a(), c("span", ao, x(D(p.menuName)), 1))
|
|
1357
1357
|
]),
|
|
1358
|
-
e("span",
|
|
1358
|
+
e("span", no, x(p.menuName), 1)
|
|
1359
1359
|
])
|
|
1360
1360
|
]),
|
|
1361
1361
|
_: 2
|
|
@@ -1363,20 +1363,20 @@ const de = Ie("menu", () => {
|
|
|
1363
1363
|
], 64))), 128))
|
|
1364
1364
|
]),
|
|
1365
1365
|
_: 2
|
|
1366
|
-
}, 1032, ["index"])) : (
|
|
1366
|
+
}, 1032, ["index"])) : (a(), B(n(Se), {
|
|
1367
1367
|
key: 1,
|
|
1368
1368
|
index: l.menuUrl
|
|
1369
1369
|
}, {
|
|
1370
1370
|
default: M(() => [
|
|
1371
|
-
e("span",
|
|
1372
|
-
l.menuName !== "首页" ? (
|
|
1373
|
-
G(N(l.icon)) ? (
|
|
1371
|
+
e("span", lo, [
|
|
1372
|
+
l.menuName !== "首页" ? (a(), c("span", ro, [
|
|
1373
|
+
G(N(l.icon)) ? (a(), B(n(U), {
|
|
1374
1374
|
key: 0,
|
|
1375
1375
|
name: N(l.icon),
|
|
1376
1376
|
size: 16
|
|
1377
|
-
}, null, 8, ["name"])) : (
|
|
1377
|
+
}, null, 8, ["name"])) : (a(), c("span", io, x(D(l.menuName)), 1))
|
|
1378
1378
|
])) : P("", !0),
|
|
1379
|
-
e("span",
|
|
1379
|
+
e("span", co, x(l.menuName), 1)
|
|
1380
1380
|
])
|
|
1381
1381
|
]),
|
|
1382
1382
|
_: 2
|
|
@@ -1385,7 +1385,7 @@ const de = Ie("menu", () => {
|
|
|
1385
1385
|
]),
|
|
1386
1386
|
_: 1
|
|
1387
1387
|
}, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
|
|
1388
|
-
e("div",
|
|
1388
|
+
e("div", uo, [
|
|
1389
1389
|
e("div", {
|
|
1390
1390
|
class: "top-menu__search",
|
|
1391
1391
|
ref_key: "searchRef",
|
|
@@ -1407,24 +1407,24 @@ const de = Ie("menu", () => {
|
|
|
1407
1407
|
]),
|
|
1408
1408
|
b(be, { name: "search-dropdown" }, {
|
|
1409
1409
|
default: M(() => [
|
|
1410
|
-
Z.value && (_.value.length > 0 || Y.value) ? (
|
|
1411
|
-
_.value.length > 0 ? (
|
|
1412
|
-
(
|
|
1410
|
+
Z.value && (_.value.length > 0 || Y.value) ? (a(), c("div", mo, [
|
|
1411
|
+
_.value.length > 0 ? (a(), c("div", po, [
|
|
1412
|
+
(a(!0), c(K, null, X(_.value, (l) => (a(), c("div", {
|
|
1413
1413
|
key: l.path,
|
|
1414
1414
|
class: "top-menu__search-item",
|
|
1415
1415
|
onClick: (p) => _e(l.path)
|
|
1416
1416
|
}, [
|
|
1417
|
-
l.title !== "首页" ? (
|
|
1418
|
-
G(N(l.icon)) ? (
|
|
1417
|
+
l.title !== "首页" ? (a(), c("span", ho, [
|
|
1418
|
+
G(N(l.icon)) ? (a(), B(n(U), {
|
|
1419
1419
|
key: 0,
|
|
1420
1420
|
name: N(l.icon),
|
|
1421
1421
|
size: 16
|
|
1422
|
-
}, null, 8, ["name"])) : (
|
|
1422
|
+
}, null, 8, ["name"])) : (a(), c("span", _o, x(D(l.title)), 1))
|
|
1423
1423
|
])) : P("", !0),
|
|
1424
|
-
e("span",
|
|
1425
|
-
l.parentTitle ? (
|
|
1426
|
-
], 8,
|
|
1427
|
-
])) : (
|
|
1424
|
+
e("span", fo, x(l.title), 1),
|
|
1425
|
+
l.parentTitle ? (a(), c("span", go, x(l.parentTitle), 1)) : P("", !0)
|
|
1426
|
+
], 8, vo))), 128))
|
|
1427
|
+
])) : (a(), c("div", yo, " 未找到匹配的菜单 "))
|
|
1428
1428
|
])) : P("", !0)
|
|
1429
1429
|
]),
|
|
1430
1430
|
_: 1
|
|
@@ -1439,7 +1439,7 @@ const de = Ie("menu", () => {
|
|
|
1439
1439
|
name: F.value ? "fullscreen-exit" : "fullscreen",
|
|
1440
1440
|
size: 16
|
|
1441
1441
|
}, null, 8, ["name"])
|
|
1442
|
-
], 8,
|
|
1442
|
+
], 8, bo),
|
|
1443
1443
|
e("div", {
|
|
1444
1444
|
class: "top-menu__action",
|
|
1445
1445
|
onClick: ce,
|
|
@@ -1469,30 +1469,30 @@ const de = Ie("menu", () => {
|
|
|
1469
1469
|
class: "top-menu__user-trigger",
|
|
1470
1470
|
onClick: Te(pe, ["stop"])
|
|
1471
1471
|
}, [
|
|
1472
|
-
e("div",
|
|
1472
|
+
e("div", ko, [
|
|
1473
1473
|
e("span", null, x(((te = n(h).userName) == null ? void 0 : te.charAt(0)) || "U"), 1)
|
|
1474
1474
|
]),
|
|
1475
|
-
e("span",
|
|
1475
|
+
e("span", wo, x(n(h).userName), 1),
|
|
1476
1476
|
e("span", {
|
|
1477
|
-
class: J(["top-menu__user-arrow", { "is-active":
|
|
1477
|
+
class: J(["top-menu__user-arrow", { "is-active": A.value }])
|
|
1478
1478
|
}, "▼", 2)
|
|
1479
1479
|
]),
|
|
1480
1480
|
b(be, { name: "dropdown" }, {
|
|
1481
1481
|
default: M(() => {
|
|
1482
1482
|
var l;
|
|
1483
1483
|
return [
|
|
1484
|
-
|
|
1485
|
-
e("div",
|
|
1486
|
-
e("div",
|
|
1484
|
+
A.value ? (a(), c("div", xo, [
|
|
1485
|
+
e("div", Co, [
|
|
1486
|
+
e("div", $o, [
|
|
1487
1487
|
e("span", null, x(((l = n(h).userName) == null ? void 0 : l.charAt(0)) || "U"), 1)
|
|
1488
1488
|
]),
|
|
1489
|
-
e("div",
|
|
1490
|
-
e("div",
|
|
1491
|
-
e("div",
|
|
1489
|
+
e("div", Lo, [
|
|
1490
|
+
e("div", Mo, x(n(h).userName), 1),
|
|
1491
|
+
e("div", So, x(n(h).departmentName), 1)
|
|
1492
1492
|
])
|
|
1493
1493
|
]),
|
|
1494
1494
|
L[7] || (L[7] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
|
|
1495
|
-
e("div",
|
|
1495
|
+
e("div", No, [
|
|
1496
1496
|
e("div", {
|
|
1497
1497
|
class: "top-menu__dropdown-item",
|
|
1498
1498
|
onClick: ge
|
|
@@ -1540,26 +1540,26 @@ const de = Ie("menu", () => {
|
|
|
1540
1540
|
size: "320px"
|
|
1541
1541
|
}, {
|
|
1542
1542
|
default: M(() => [
|
|
1543
|
-
e("div",
|
|
1544
|
-
e("div",
|
|
1543
|
+
e("div", Io, [
|
|
1544
|
+
e("div", Eo, [
|
|
1545
1545
|
L[11] || (L[11] = e("div", { class: "settings-title" }, "布局模式", -1)),
|
|
1546
|
-
e("div",
|
|
1547
|
-
(
|
|
1546
|
+
e("div", Uo, [
|
|
1547
|
+
(a(), c(K, null, X(Ce, (l) => e("div", {
|
|
1548
1548
|
key: l.value,
|
|
1549
1549
|
class: J(["layout-option", { "is-active": $e.value === l.value }]),
|
|
1550
1550
|
onClick: (p) => Le(l.value)
|
|
1551
1551
|
}, [
|
|
1552
|
-
e("div",
|
|
1553
|
-
l.value === "sidebar" ? (
|
|
1552
|
+
e("div", To, [
|
|
1553
|
+
l.value === "sidebar" ? (a(), c("div", Po, [...L[8] || (L[8] = [
|
|
1554
1554
|
e("div", { class: "preview-aside" }, null, -1),
|
|
1555
1555
|
e("div", { class: "preview-main" }, [
|
|
1556
1556
|
e("div", { class: "preview-header" }),
|
|
1557
1557
|
e("div", { class: "preview-content" })
|
|
1558
1558
|
], -1)
|
|
1559
|
-
])])) : l.value === "top" ? (
|
|
1559
|
+
])])) : l.value === "top" ? (a(), c("div", Do, [...L[9] || (L[9] = [
|
|
1560
1560
|
e("div", { class: "preview-header-full" }, null, -1),
|
|
1561
1561
|
e("div", { class: "preview-content-full" }, null, -1)
|
|
1562
|
-
])])) : (
|
|
1562
|
+
])])) : (a(), c("div", Ao, [...L[10] || (L[10] = [
|
|
1563
1563
|
e("div", { class: "preview-header-mix" }, [
|
|
1564
1564
|
e("div", { class: "preview-mix-left" })
|
|
1565
1565
|
], -1),
|
|
@@ -1569,33 +1569,33 @@ const de = Ie("menu", () => {
|
|
|
1569
1569
|
], -1)
|
|
1570
1570
|
])]))
|
|
1571
1571
|
]),
|
|
1572
|
-
e("span",
|
|
1573
|
-
], 10,
|
|
1572
|
+
e("span", Fo, x(l.label), 1)
|
|
1573
|
+
], 10, zo)), 64))
|
|
1574
1574
|
])
|
|
1575
1575
|
]),
|
|
1576
|
-
e("div",
|
|
1576
|
+
e("div", Bo, [
|
|
1577
1577
|
L[12] || (L[12] = e("div", { class: "settings-title" }, "主题色", -1)),
|
|
1578
|
-
e("div",
|
|
1579
|
-
(
|
|
1578
|
+
e("div", Vo, [
|
|
1579
|
+
(a(), c(K, null, X(Me, (l) => e("div", {
|
|
1580
1580
|
key: l.value,
|
|
1581
1581
|
class: J(["color-option", { "is-active": n(i).primaryColor === l.value }]),
|
|
1582
1582
|
style: Ne({ backgroundColor: l.value }),
|
|
1583
1583
|
title: l.label,
|
|
1584
1584
|
onClick: (p) => fe(l.value)
|
|
1585
1585
|
}, [
|
|
1586
|
-
n(i).primaryColor === l.value ? (
|
|
1586
|
+
n(i).primaryColor === l.value ? (a(), B(n(U), {
|
|
1587
1587
|
key: 0,
|
|
1588
1588
|
name: "check",
|
|
1589
1589
|
size: 12,
|
|
1590
1590
|
color: "#fff"
|
|
1591
1591
|
})) : P("", !0)
|
|
1592
|
-
], 14,
|
|
1592
|
+
], 14, Oo)), 64))
|
|
1593
1593
|
])
|
|
1594
1594
|
]),
|
|
1595
|
-
e("div",
|
|
1595
|
+
e("div", Ro, [
|
|
1596
1596
|
L[17] || (L[17] = e("div", { class: "settings-title" }, "功能设置", -1)),
|
|
1597
|
-
e("div",
|
|
1598
|
-
e("div",
|
|
1597
|
+
e("div", Ko, [
|
|
1598
|
+
e("div", jo, [
|
|
1599
1599
|
L[14] || (L[14] = e("span", null, "灰色模式", -1)),
|
|
1600
1600
|
e("div", {
|
|
1601
1601
|
class: J(["switch-wrapper", { "is-checked": H.value }]),
|
|
@@ -1604,7 +1604,7 @@ const de = Ie("menu", () => {
|
|
|
1604
1604
|
e("span", { class: "switch-core" }, null, -1)
|
|
1605
1605
|
])], 2)
|
|
1606
1606
|
]),
|
|
1607
|
-
e("div",
|
|
1607
|
+
e("div", Wo, [
|
|
1608
1608
|
L[16] || (L[16] = e("span", null, "暗黑模式", -1)),
|
|
1609
1609
|
e("div", {
|
|
1610
1610
|
class: J(["switch-wrapper", { "is-checked": n(i).isDark }]),
|
|
@@ -1622,73 +1622,73 @@ const de = Ie("menu", () => {
|
|
|
1622
1622
|
]);
|
|
1623
1623
|
};
|
|
1624
1624
|
}
|
|
1625
|
-
}),
|
|
1625
|
+
}), Ho = /* @__PURE__ */ re(qo, [["__scopeId", "data-v-114a2a03"]]), Yo = { class: "mix-top-menu" }, Go = { class: "mix-top-menu__logo" }, Xo = ["src"], Jo = { class: "mix-top-menu__logo-text" }, Zo = { class: "mix-top-menu__menu-content" }, Qo = {
|
|
1626
1626
|
key: 0,
|
|
1627
1627
|
class: "mix-top-menu__menu-icon"
|
|
1628
|
-
},
|
|
1628
|
+
}, ea = {
|
|
1629
1629
|
key: 1,
|
|
1630
1630
|
class: "mix-top-menu__menu-char"
|
|
1631
|
-
},
|
|
1631
|
+
}, ta = { class: "mix-top-menu__menu-text" }, sa = { class: "mix-top-menu__actions" }, oa = {
|
|
1632
1632
|
key: 0,
|
|
1633
1633
|
class: "mix-top-menu__search-dropdown"
|
|
1634
|
-
},
|
|
1634
|
+
}, aa = {
|
|
1635
1635
|
key: 0,
|
|
1636
1636
|
class: "mix-top-menu__search-results"
|
|
1637
|
-
},
|
|
1637
|
+
}, na = ["onClick"], la = {
|
|
1638
1638
|
key: 0,
|
|
1639
1639
|
class: "mix-top-menu__search-icon-item"
|
|
1640
|
-
},
|
|
1640
|
+
}, ra = {
|
|
1641
1641
|
key: 1,
|
|
1642
1642
|
class: "mix-top-menu__search-char"
|
|
1643
|
-
},
|
|
1643
|
+
}, ia = { class: "mix-top-menu__search-item-title" }, ca = {
|
|
1644
1644
|
key: 1,
|
|
1645
1645
|
class: "mix-top-menu__search-item-parent"
|
|
1646
|
-
},
|
|
1646
|
+
}, da = {
|
|
1647
1647
|
key: 1,
|
|
1648
1648
|
class: "mix-top-menu__search-empty"
|
|
1649
|
-
},
|
|
1649
|
+
}, ua = ["title"], ma = { class: "mix-top-menu__avatar" }, pa = { class: "mix-top-menu__user-name" }, va = {
|
|
1650
1650
|
key: 0,
|
|
1651
1651
|
class: "mix-top-menu__dropdown"
|
|
1652
|
-
},
|
|
1652
|
+
}, ha = { class: "mix-top-menu__dropdown-header" }, _a = { class: "mix-top-menu__dropdown-avatar" }, fa = { class: "mix-top-menu__dropdown-info" }, ga = { class: "mix-top-menu__dropdown-name" }, ya = { class: "mix-top-menu__dropdown-role" }, ba = { class: "mix-top-menu__dropdown-menu" }, ka = { class: "settings-drawer" }, wa = { class: "settings-section" }, xa = { class: "settings-layout-options" }, Ca = ["onClick"], $a = { class: "layout-option__preview" }, La = {
|
|
1653
1653
|
key: 0,
|
|
1654
1654
|
class: "layout-preview-sidebar"
|
|
1655
|
-
},
|
|
1655
|
+
}, Ma = {
|
|
1656
1656
|
key: 1,
|
|
1657
1657
|
class: "layout-preview-top"
|
|
1658
|
-
},
|
|
1658
|
+
}, Sa = {
|
|
1659
1659
|
key: 2,
|
|
1660
1660
|
class: "layout-preview-mix"
|
|
1661
|
-
},
|
|
1661
|
+
}, Na = { class: "layout-option__label" }, Ia = { class: "settings-section" }, Ea = { class: "settings-color-options" }, Ua = ["title", "onClick"], za = { class: "settings-section" }, Ta = { class: "settings-switch-list" }, Pa = { class: "settings-switch-item" }, Da = { class: "settings-switch-item" }, Aa = /* @__PURE__ */ ne({
|
|
1662
1662
|
__name: "MixTopMenu",
|
|
1663
1663
|
props: {
|
|
1664
1664
|
logoSrc: { default: "/vite.svg" }
|
|
1665
1665
|
},
|
|
1666
1666
|
setup(t) {
|
|
1667
|
-
const r = t,
|
|
1667
|
+
const r = t, d = we(), s = me(), o = ue(), i = de(), h = le(), v = Ee(), u = y(""), f = (l, p = "") => {
|
|
1668
1668
|
const O = [];
|
|
1669
1669
|
return l.forEach(($) => {
|
|
1670
1670
|
$.children && $.children.length > 0 ? O.push(...f($.children, $.menuName)) : O.push({ ...$, parentTitle: p, title: $.menuName, path: $.menuUrl });
|
|
1671
1671
|
}), O;
|
|
1672
|
-
}, _ = w(() => N.value.trim() ? f(
|
|
1672
|
+
}, _ = w(() => N.value.trim() ? f(o.menuList).filter(
|
|
1673
1673
|
(p) => p.title.toLowerCase().includes(N.value.toLowerCase())
|
|
1674
1674
|
) : []), g = w(() => {
|
|
1675
|
-
const l =
|
|
1675
|
+
const l = o.menuList.find((p) => p.menuUrl === u.value);
|
|
1676
1676
|
return (l == null ? void 0 : l.children) || [];
|
|
1677
|
-
}), m = w(() =>
|
|
1678
|
-
m.value ?
|
|
1679
|
-
},
|
|
1680
|
-
|
|
1681
|
-
const p =
|
|
1677
|
+
}), m = w(() => o.menuList.find((l) => !!(d.path === l.menuUrl || l.children && l.children.some((p) => d.path.startsWith(p.menuUrl) || d.path === p.menuUrl)))), j = () => {
|
|
1678
|
+
m.value ? u.value = m.value.menuUrl : o.menuList.length > 0 && (u.value = o.menuList[0].menuUrl);
|
|
1679
|
+
}, A = (l) => {
|
|
1680
|
+
u.value = l;
|
|
1681
|
+
const p = o.menuList.find((O) => O.menuUrl === l);
|
|
1682
1682
|
if (p)
|
|
1683
1683
|
if (p.children && p.children.length > 0) {
|
|
1684
1684
|
const O = p.children[0].menuUrl;
|
|
1685
|
-
|
|
1685
|
+
d.path !== O && s.push(O);
|
|
1686
1686
|
} else
|
|
1687
|
-
|
|
1688
|
-
}, W = w(() => i.isDark ? "#1d1e1f" : "#fff"), F = w(() => i.isDark ? "#cfd3dc" : "#303133"), V = w(() => "#409eff"), H = y(!1), Z = y(null), Y = y(!1), q = y(!1), ee = y(!1), T = y(!1), N = y(""),
|
|
1689
|
-
ye(() =>
|
|
1687
|
+
d.path !== l && s.push(l);
|
|
1688
|
+
}, W = w(() => i.isDark ? "#1d1e1f" : "#fff"), F = w(() => i.isDark ? "#cfd3dc" : "#303133"), V = w(() => "#409eff"), H = y(!1), Z = y(null), Y = y(!1), q = y(!1), ee = y(!1), T = y(!1), N = y(""), D = y(null);
|
|
1689
|
+
ye(() => d.path, () => {
|
|
1690
1690
|
j(), i.setMixSubMenus(g.value);
|
|
1691
|
-
}), ye(() =>
|
|
1691
|
+
}), ye(() => o.menuList, (l) => {
|
|
1692
1692
|
l && l.length > 0 && (j(), i.setMixSubMenus(g.value));
|
|
1693
1693
|
}, { immediate: !0 });
|
|
1694
1694
|
const G = /* @__PURE__ */ new Set([
|
|
@@ -1834,16 +1834,16 @@ const de = Ie("menu", () => {
|
|
|
1834
1834
|
i.toggleTheme(), q.value = !1;
|
|
1835
1835
|
}, E = () => {
|
|
1836
1836
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
1837
|
-
},
|
|
1837
|
+
}, oe = () => {
|
|
1838
1838
|
Y.value = !!document.fullscreenElement;
|
|
1839
1839
|
}, _e = () => {
|
|
1840
1840
|
H.value = !H.value;
|
|
1841
1841
|
}, ce = () => {
|
|
1842
1842
|
H.value = !1;
|
|
1843
|
-
},
|
|
1843
|
+
}, ae = () => {
|
|
1844
1844
|
T.value = !1, N.value = "";
|
|
1845
1845
|
}, ve = (l) => {
|
|
1846
|
-
s.push(l),
|
|
1846
|
+
s.push(l), ae();
|
|
1847
1847
|
}, xe = () => {
|
|
1848
1848
|
q.value = !0;
|
|
1849
1849
|
}, Ce = (l) => {
|
|
@@ -1874,51 +1874,51 @@ const de = Ie("menu", () => {
|
|
|
1874
1874
|
}, C = () => {
|
|
1875
1875
|
ce(), s.push("/change-password");
|
|
1876
1876
|
}, S = () => {
|
|
1877
|
-
ce(), v.logout(), h.clearUserInfo(),
|
|
1877
|
+
ce(), v.logout(), h.clearUserInfo(), o.clearMenu(), s.push(i.loginPath);
|
|
1878
1878
|
}, L = (l) => {
|
|
1879
|
-
Z.value && !Z.value.contains(l.target) && ce(),
|
|
1879
|
+
Z.value && !Z.value.contains(l.target) && ce(), D.value && !D.value.contains(l.target) && ae();
|
|
1880
1880
|
}, te = (l) => {
|
|
1881
|
-
l.key === "Escape" && (
|
|
1881
|
+
l.key === "Escape" && (ae(), ce());
|
|
1882
1882
|
};
|
|
1883
1883
|
return Ke(() => {
|
|
1884
|
-
document.addEventListener("click", L), document.addEventListener("fullscreenchange",
|
|
1884
|
+
document.addEventListener("click", L), document.addEventListener("fullscreenchange", oe), document.addEventListener("keydown", te), ee.value = document.documentElement.classList.contains("grey-mode"), j();
|
|
1885
1885
|
}), je(() => {
|
|
1886
|
-
document.removeEventListener("click", L), document.removeEventListener("fullscreenchange",
|
|
1886
|
+
document.removeEventListener("click", L), document.removeEventListener("fullscreenchange", oe), document.removeEventListener("keydown", te);
|
|
1887
1887
|
}), (l, p) => {
|
|
1888
1888
|
var O;
|
|
1889
|
-
return
|
|
1890
|
-
e("div",
|
|
1889
|
+
return a(), c("div", Yo, [
|
|
1890
|
+
e("div", Go, [
|
|
1891
1891
|
e("img", {
|
|
1892
1892
|
src: r.logoSrc,
|
|
1893
1893
|
alt: "Logo",
|
|
1894
1894
|
class: "mix-top-menu__logo-img"
|
|
1895
|
-
}, null, 8,
|
|
1896
|
-
e("span",
|
|
1895
|
+
}, null, 8, Xo),
|
|
1896
|
+
e("span", Jo, x(n(i).appName), 1)
|
|
1897
1897
|
]),
|
|
1898
1898
|
b(n(Ge), {
|
|
1899
|
-
"model-value":
|
|
1899
|
+
"model-value": u.value,
|
|
1900
1900
|
mode: "horizontal",
|
|
1901
1901
|
"background-color": W.value,
|
|
1902
1902
|
"text-color": F.value,
|
|
1903
1903
|
"active-text-color": V.value,
|
|
1904
1904
|
class: "mix-top-menu__menu",
|
|
1905
|
-
onSelect:
|
|
1905
|
+
onSelect: A
|
|
1906
1906
|
}, {
|
|
1907
1907
|
default: M(() => [
|
|
1908
|
-
(
|
|
1908
|
+
(a(!0), c(K, null, X(n(o).menuList, ($) => (a(), B(n(Se), {
|
|
1909
1909
|
key: $.menuUrl,
|
|
1910
1910
|
index: $.menuUrl
|
|
1911
1911
|
}, {
|
|
1912
1912
|
default: M(() => [
|
|
1913
|
-
e("span",
|
|
1914
|
-
$.menuName !== "首页" ? (
|
|
1915
|
-
ie(R($.icon)) ? (
|
|
1913
|
+
e("span", Zo, [
|
|
1914
|
+
$.menuName !== "首页" ? (a(), c("span", Qo, [
|
|
1915
|
+
ie(R($.icon)) ? (a(), B(n(U), {
|
|
1916
1916
|
key: 0,
|
|
1917
1917
|
name: R($.icon),
|
|
1918
1918
|
size: 16
|
|
1919
|
-
}, null, 8, ["name"])) : (
|
|
1919
|
+
}, null, 8, ["name"])) : (a(), c("span", ea, x(se($.menuName)), 1))
|
|
1920
1920
|
])) : P("", !0),
|
|
1921
|
-
e("span",
|
|
1921
|
+
e("span", ta, x($.menuName), 1)
|
|
1922
1922
|
])
|
|
1923
1923
|
]),
|
|
1924
1924
|
_: 2
|
|
@@ -1926,11 +1926,11 @@ const de = Ie("menu", () => {
|
|
|
1926
1926
|
]),
|
|
1927
1927
|
_: 1
|
|
1928
1928
|
}, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
|
|
1929
|
-
e("div",
|
|
1929
|
+
e("div", sa, [
|
|
1930
1930
|
e("div", {
|
|
1931
1931
|
class: "mix-top-menu__search",
|
|
1932
1932
|
ref_key: "searchRef",
|
|
1933
|
-
ref:
|
|
1933
|
+
ref: D
|
|
1934
1934
|
}, [
|
|
1935
1935
|
b(n(U), {
|
|
1936
1936
|
name: "search",
|
|
@@ -1948,24 +1948,24 @@ const de = Ie("menu", () => {
|
|
|
1948
1948
|
]),
|
|
1949
1949
|
b(be, { name: "search-dropdown" }, {
|
|
1950
1950
|
default: M(() => [
|
|
1951
|
-
T.value && (_.value.length > 0 || N.value) ? (
|
|
1952
|
-
_.value.length > 0 ? (
|
|
1953
|
-
(
|
|
1951
|
+
T.value && (_.value.length > 0 || N.value) ? (a(), c("div", oa, [
|
|
1952
|
+
_.value.length > 0 ? (a(), c("div", aa, [
|
|
1953
|
+
(a(!0), c(K, null, X(_.value, ($) => (a(), c("div", {
|
|
1954
1954
|
key: $.path,
|
|
1955
1955
|
class: "mix-top-menu__search-item",
|
|
1956
1956
|
onClick: (Ze) => ve($.path)
|
|
1957
1957
|
}, [
|
|
1958
|
-
$.title !== "首页" ? (
|
|
1959
|
-
ie(R($.icon)) ? (
|
|
1958
|
+
$.title !== "首页" ? (a(), c("span", la, [
|
|
1959
|
+
ie(R($.icon)) ? (a(), B(n(U), {
|
|
1960
1960
|
key: 0,
|
|
1961
1961
|
name: R($.icon),
|
|
1962
1962
|
size: 16
|
|
1963
|
-
}, null, 8, ["name"])) : (
|
|
1963
|
+
}, null, 8, ["name"])) : (a(), c("span", ra, x(se($.title)), 1))
|
|
1964
1964
|
])) : P("", !0),
|
|
1965
|
-
e("span",
|
|
1966
|
-
$.parentTitle ? (
|
|
1967
|
-
], 8,
|
|
1968
|
-
])) : (
|
|
1965
|
+
e("span", ia, x($.title), 1),
|
|
1966
|
+
$.parentTitle ? (a(), c("span", ca, x($.parentTitle), 1)) : P("", !0)
|
|
1967
|
+
], 8, na))), 128))
|
|
1968
|
+
])) : (a(), c("div", da, " 未找到匹配的菜单 "))
|
|
1969
1969
|
])) : P("", !0)
|
|
1970
1970
|
]),
|
|
1971
1971
|
_: 1
|
|
@@ -1980,7 +1980,7 @@ const de = Ie("menu", () => {
|
|
|
1980
1980
|
name: Y.value ? "fullscreen-exit" : "fullscreen",
|
|
1981
1981
|
size: 16
|
|
1982
1982
|
}, null, 8, ["name"])
|
|
1983
|
-
], 8,
|
|
1983
|
+
], 8, ua),
|
|
1984
1984
|
e("div", {
|
|
1985
1985
|
class: "mix-top-menu__action",
|
|
1986
1986
|
onClick: xe,
|
|
@@ -2010,10 +2010,10 @@ const de = Ie("menu", () => {
|
|
|
2010
2010
|
class: "mix-top-menu__user-trigger",
|
|
2011
2011
|
onClick: Te(_e, ["stop"])
|
|
2012
2012
|
}, [
|
|
2013
|
-
e("div",
|
|
2013
|
+
e("div", ma, [
|
|
2014
2014
|
e("span", null, x(((O = n(h).userName) == null ? void 0 : O.charAt(0)) || "U"), 1)
|
|
2015
2015
|
]),
|
|
2016
|
-
e("span",
|
|
2016
|
+
e("span", pa, x(n(h).userName), 1),
|
|
2017
2017
|
e("span", {
|
|
2018
2018
|
class: J(["mix-top-menu__user-arrow", { "is-active": H.value }])
|
|
2019
2019
|
}, "▼", 2)
|
|
@@ -2022,18 +2022,18 @@ const de = Ie("menu", () => {
|
|
|
2022
2022
|
default: M(() => {
|
|
2023
2023
|
var $;
|
|
2024
2024
|
return [
|
|
2025
|
-
H.value ? (
|
|
2026
|
-
e("div",
|
|
2027
|
-
e("div",
|
|
2025
|
+
H.value ? (a(), c("div", va, [
|
|
2026
|
+
e("div", ha, [
|
|
2027
|
+
e("div", _a, [
|
|
2028
2028
|
e("span", null, x((($ = n(h).userName) == null ? void 0 : $.charAt(0)) || "U"), 1)
|
|
2029
2029
|
]),
|
|
2030
|
-
e("div",
|
|
2031
|
-
e("div",
|
|
2032
|
-
e("div",
|
|
2030
|
+
e("div", fa, [
|
|
2031
|
+
e("div", ga, x(n(h).userName), 1),
|
|
2032
|
+
e("div", ya, x(n(h).departmentName), 1)
|
|
2033
2033
|
])
|
|
2034
2034
|
]),
|
|
2035
2035
|
p[7] || (p[7] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
|
|
2036
|
-
e("div",
|
|
2036
|
+
e("div", ba, [
|
|
2037
2037
|
e("div", {
|
|
2038
2038
|
class: "mix-top-menu__dropdown-item",
|
|
2039
2039
|
onClick: Q
|
|
@@ -2081,26 +2081,26 @@ const de = Ie("menu", () => {
|
|
|
2081
2081
|
size: "320px"
|
|
2082
2082
|
}, {
|
|
2083
2083
|
default: M(() => [
|
|
2084
|
-
e("div",
|
|
2085
|
-
e("div",
|
|
2084
|
+
e("div", ka, [
|
|
2085
|
+
e("div", wa, [
|
|
2086
2086
|
p[11] || (p[11] = e("div", { class: "settings-title" }, "布局模式", -1)),
|
|
2087
|
-
e("div",
|
|
2088
|
-
(
|
|
2087
|
+
e("div", xa, [
|
|
2088
|
+
(a(), c(K, null, X(Me, ($) => e("div", {
|
|
2089
2089
|
key: $.value,
|
|
2090
2090
|
class: J(["layout-option", { "is-active": fe.value === $.value }]),
|
|
2091
2091
|
onClick: (Ze) => ge($.value)
|
|
2092
2092
|
}, [
|
|
2093
|
-
e("div", $
|
|
2094
|
-
$.value === "sidebar" ? (
|
|
2093
|
+
e("div", $a, [
|
|
2094
|
+
$.value === "sidebar" ? (a(), c("div", La, [...p[8] || (p[8] = [
|
|
2095
2095
|
e("div", { class: "preview-aside" }, null, -1),
|
|
2096
2096
|
e("div", { class: "preview-main" }, [
|
|
2097
2097
|
e("div", { class: "preview-header" }),
|
|
2098
2098
|
e("div", { class: "preview-content" })
|
|
2099
2099
|
], -1)
|
|
2100
|
-
])])) : $.value === "top" ? (
|
|
2100
|
+
])])) : $.value === "top" ? (a(), c("div", Ma, [...p[9] || (p[9] = [
|
|
2101
2101
|
e("div", { class: "preview-header-full" }, null, -1),
|
|
2102
2102
|
e("div", { class: "preview-content-full" }, null, -1)
|
|
2103
|
-
])])) : (
|
|
2103
|
+
])])) : (a(), c("div", Sa, [...p[10] || (p[10] = [
|
|
2104
2104
|
e("div", { class: "preview-header-mix" }, [
|
|
2105
2105
|
e("div", { class: "preview-mix-left" })
|
|
2106
2106
|
], -1),
|
|
@@ -2110,33 +2110,33 @@ const de = Ie("menu", () => {
|
|
|
2110
2110
|
], -1)
|
|
2111
2111
|
])]))
|
|
2112
2112
|
]),
|
|
2113
|
-
e("span",
|
|
2114
|
-
], 10,
|
|
2113
|
+
e("span", Na, x($.label), 1)
|
|
2114
|
+
], 10, Ca)), 64))
|
|
2115
2115
|
])
|
|
2116
2116
|
]),
|
|
2117
|
-
e("div",
|
|
2117
|
+
e("div", Ia, [
|
|
2118
2118
|
p[12] || (p[12] = e("div", { class: "settings-title" }, "主题色", -1)),
|
|
2119
|
-
e("div",
|
|
2120
|
-
(
|
|
2119
|
+
e("div", Ea, [
|
|
2120
|
+
(a(), c(K, null, X(z, ($) => e("div", {
|
|
2121
2121
|
key: $.value,
|
|
2122
2122
|
class: J(["color-option", { "is-active": n(i).primaryColor === $.value }]),
|
|
2123
2123
|
style: Ne({ backgroundColor: $.value }),
|
|
2124
2124
|
title: $.label,
|
|
2125
2125
|
onClick: (Ze) => k($.value)
|
|
2126
2126
|
}, [
|
|
2127
|
-
n(i).primaryColor === $.value ? (
|
|
2127
|
+
n(i).primaryColor === $.value ? (a(), B(n(U), {
|
|
2128
2128
|
key: 0,
|
|
2129
2129
|
name: "check",
|
|
2130
2130
|
size: 12,
|
|
2131
2131
|
color: "#fff"
|
|
2132
2132
|
})) : P("", !0)
|
|
2133
|
-
], 14,
|
|
2133
|
+
], 14, Ua)), 64))
|
|
2134
2134
|
])
|
|
2135
2135
|
]),
|
|
2136
|
-
e("div",
|
|
2136
|
+
e("div", za, [
|
|
2137
2137
|
p[17] || (p[17] = e("div", { class: "settings-title" }, "功能设置", -1)),
|
|
2138
|
-
e("div",
|
|
2139
|
-
e("div",
|
|
2138
|
+
e("div", Ta, [
|
|
2139
|
+
e("div", Pa, [
|
|
2140
2140
|
p[14] || (p[14] = e("span", null, "灰色模式", -1)),
|
|
2141
2141
|
e("div", {
|
|
2142
2142
|
class: J(["switch-wrapper", { "is-checked": ee.value }]),
|
|
@@ -2145,7 +2145,7 @@ const de = Ie("menu", () => {
|
|
|
2145
2145
|
e("span", { class: "switch-core" }, null, -1)
|
|
2146
2146
|
])], 2)
|
|
2147
2147
|
]),
|
|
2148
|
-
e("div",
|
|
2148
|
+
e("div", Da, [
|
|
2149
2149
|
p[16] || (p[16] = e("span", null, "暗黑模式", -1)),
|
|
2150
2150
|
e("div", {
|
|
2151
2151
|
class: J(["switch-wrapper", { "is-checked": n(i).isDark }]),
|
|
@@ -2163,31 +2163,31 @@ const de = Ie("menu", () => {
|
|
|
2163
2163
|
]);
|
|
2164
2164
|
};
|
|
2165
2165
|
}
|
|
2166
|
-
}),
|
|
2166
|
+
}), Fa = /* @__PURE__ */ re(Aa, [["__scopeId", "data-v-e1e69bda"]]), Ba = {
|
|
2167
2167
|
key: 0,
|
|
2168
2168
|
class: "layout layout--sidebar"
|
|
2169
|
-
},
|
|
2169
|
+
}, Va = { class: "layout__main" }, Oa = { class: "layout__header" }, Ra = { class: "layout__content" }, Ka = {
|
|
2170
2170
|
key: 1,
|
|
2171
2171
|
class: "layout layout--top"
|
|
2172
|
-
},
|
|
2172
|
+
}, ja = { class: "layout__top-menu" }, Wa = { class: "layout__main" }, qa = { class: "layout__content" }, Ha = {
|
|
2173
2173
|
key: 2,
|
|
2174
2174
|
class: "layout layout--mix"
|
|
2175
|
-
},
|
|
2175
|
+
}, Ya = { class: "layout__mix-top-menu" }, Ga = { class: "layout__mix-body" }, Xa = { class: "layout__content" }, Ja = /* @__PURE__ */ ne({
|
|
2176
2176
|
__name: "index",
|
|
2177
2177
|
props: {
|
|
2178
2178
|
logoSrc: { default: "/vite.svg" }
|
|
2179
2179
|
},
|
|
2180
2180
|
setup(t) {
|
|
2181
|
-
const r = t,
|
|
2182
|
-
() =>
|
|
2183
|
-
), i = w(() =>
|
|
2181
|
+
const r = t, d = de(), s = ue(), o = w(
|
|
2182
|
+
() => d.isCollapsed ? "64px" : "210px"
|
|
2183
|
+
), i = w(() => d.layout), h = w(() => i.value === "mix"), v = w(() => i.value === "sidebar" ? s.menuList : i.value === "mix" ? d.mixSubMenus : []), u = w(() => h.value ? v.value.length > 0 : !1);
|
|
2184
2184
|
return (f, _) => {
|
|
2185
2185
|
const g = rt("router-view");
|
|
2186
|
-
return
|
|
2187
|
-
i.value === "sidebar" ? (
|
|
2186
|
+
return a(), c(K, null, [
|
|
2187
|
+
i.value === "sidebar" ? (a(), c("div", Ba, [
|
|
2188
2188
|
e("aside", {
|
|
2189
2189
|
class: "layout__aside",
|
|
2190
|
-
style: Ne({ width:
|
|
2190
|
+
style: Ne({ width: o.value })
|
|
2191
2191
|
}, [
|
|
2192
2192
|
b(tt, {
|
|
2193
2193
|
"menu-list": v.value,
|
|
@@ -2196,38 +2196,38 @@ const de = Ie("menu", () => {
|
|
|
2196
2196
|
"logo-src": r.logoSrc
|
|
2197
2197
|
}, null, 8, ["menu-list", "logo-src"])
|
|
2198
2198
|
], 4),
|
|
2199
|
-
e("div",
|
|
2200
|
-
e("header",
|
|
2199
|
+
e("div", Va, [
|
|
2200
|
+
e("header", Oa, [
|
|
2201
2201
|
b(Bs)
|
|
2202
2202
|
]),
|
|
2203
|
-
e("main",
|
|
2203
|
+
e("main", Ra, [
|
|
2204
2204
|
b(g)
|
|
2205
2205
|
])
|
|
2206
2206
|
])
|
|
2207
2207
|
])) : P("", !0),
|
|
2208
|
-
i.value === "top" ? (
|
|
2209
|
-
e("div",
|
|
2210
|
-
b(
|
|
2208
|
+
i.value === "top" ? (a(), c("div", Ka, [
|
|
2209
|
+
e("div", ja, [
|
|
2210
|
+
b(Ho, {
|
|
2211
2211
|
"logo-src": r.logoSrc
|
|
2212
2212
|
}, null, 8, ["logo-src"])
|
|
2213
2213
|
]),
|
|
2214
|
-
e("div",
|
|
2215
|
-
e("main",
|
|
2214
|
+
e("div", Wa, [
|
|
2215
|
+
e("main", qa, [
|
|
2216
2216
|
b(g)
|
|
2217
2217
|
])
|
|
2218
2218
|
])
|
|
2219
2219
|
])) : P("", !0),
|
|
2220
|
-
i.value === "mix" ? (
|
|
2221
|
-
e("div",
|
|
2222
|
-
b(
|
|
2220
|
+
i.value === "mix" ? (a(), c("div", Ha, [
|
|
2221
|
+
e("div", Ya, [
|
|
2222
|
+
b(Fa, {
|
|
2223
2223
|
"logo-src": r.logoSrc
|
|
2224
2224
|
}, null, 8, ["logo-src"])
|
|
2225
2225
|
]),
|
|
2226
|
-
e("div",
|
|
2227
|
-
|
|
2226
|
+
e("div", Ga, [
|
|
2227
|
+
u.value ? (a(), c("aside", {
|
|
2228
2228
|
key: 0,
|
|
2229
2229
|
class: "layout__aside",
|
|
2230
|
-
style: Ne({ width:
|
|
2230
|
+
style: Ne({ width: o.value })
|
|
2231
2231
|
}, [
|
|
2232
2232
|
b(tt, {
|
|
2233
2233
|
"menu-list": v.value,
|
|
@@ -2235,7 +2235,7 @@ const de = Ie("menu", () => {
|
|
|
2235
2235
|
"show-user": !1
|
|
2236
2236
|
}, null, 8, ["menu-list"])
|
|
2237
2237
|
], 4)) : P("", !0),
|
|
2238
|
-
e("main",
|
|
2238
|
+
e("main", Xa, [
|
|
2239
2239
|
b(g)
|
|
2240
2240
|
])
|
|
2241
2241
|
])
|
|
@@ -2243,41 +2243,41 @@ const de = Ie("menu", () => {
|
|
|
2243
2243
|
], 64);
|
|
2244
2244
|
};
|
|
2245
2245
|
}
|
|
2246
|
-
}), ct = /* @__PURE__ */ re(
|
|
2246
|
+
}), ct = /* @__PURE__ */ re(Ja, [["__scopeId", "data-v-f3d5d68c"]]), Za = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2247
2247
|
__proto__: null,
|
|
2248
2248
|
default: ct
|
|
2249
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2249
|
+
}, Symbol.toStringTag, { value: "Module" })), Qa = { class: "tabs-wrapper" }, en = { class: "tab-label" }, tn = ["onClick"], sn = /* @__PURE__ */ ne({
|
|
2250
2250
|
__name: "Tabs",
|
|
2251
2251
|
setup(t) {
|
|
2252
|
-
const r = we(),
|
|
2252
|
+
const r = we(), d = me(), s = w(() => {
|
|
2253
2253
|
const v = [];
|
|
2254
|
-
return r.matched.forEach((
|
|
2254
|
+
return r.matched.forEach((u) => {
|
|
2255
2255
|
var f;
|
|
2256
|
-
(f =
|
|
2257
|
-
name:
|
|
2258
|
-
title:
|
|
2259
|
-
path:
|
|
2256
|
+
(f = u.meta) != null && f.affix && v.push({
|
|
2257
|
+
name: u.name,
|
|
2258
|
+
title: u.meta.title,
|
|
2259
|
+
path: u.path,
|
|
2260
2260
|
affix: !0
|
|
2261
2261
|
});
|
|
2262
2262
|
}), v;
|
|
2263
|
-
}),
|
|
2264
|
-
|
|
2263
|
+
}), o = w(() => r.path), i = (v) => {
|
|
2264
|
+
d.push(v);
|
|
2265
2265
|
}, h = (v) => {
|
|
2266
|
-
const
|
|
2267
|
-
if (!(
|
|
2266
|
+
const u = s.value.find((f) => f.path === v);
|
|
2267
|
+
if (!(u != null && u.affix) && v === o.value) {
|
|
2268
2268
|
const f = s.value.findIndex((g) => g.path === v), _ = s.value[f - 1] || s.value[f + 1];
|
|
2269
|
-
_ &&
|
|
2269
|
+
_ && d.push(_.path);
|
|
2270
2270
|
}
|
|
2271
2271
|
};
|
|
2272
|
-
return (v,
|
|
2272
|
+
return (v, u) => (a(), c("div", Qa, [
|
|
2273
2273
|
b(n($t), {
|
|
2274
|
-
modelValue:
|
|
2275
|
-
"onUpdate:modelValue":
|
|
2274
|
+
modelValue: o.value,
|
|
2275
|
+
"onUpdate:modelValue": u[0] || (u[0] = (f) => o.value = f),
|
|
2276
2276
|
type: "card",
|
|
2277
2277
|
onTabClick: i
|
|
2278
2278
|
}, {
|
|
2279
2279
|
default: M(() => [
|
|
2280
|
-
(
|
|
2280
|
+
(a(!0), c(K, null, X(s.value, (f) => (a(), B(n(Lt), {
|
|
2281
2281
|
key: f.path,
|
|
2282
2282
|
name: f.path,
|
|
2283
2283
|
label: f.title,
|
|
@@ -2286,7 +2286,7 @@ const de = Ie("menu", () => {
|
|
|
2286
2286
|
label: M(() => [
|
|
2287
2287
|
e("span", en, [
|
|
2288
2288
|
he(x(f.title) + " ", 1),
|
|
2289
|
-
f.affix ? P("", !0) : (
|
|
2289
|
+
f.affix ? P("", !0) : (a(), c("span", {
|
|
2290
2290
|
key: 0,
|
|
2291
2291
|
class: "tab-close",
|
|
2292
2292
|
onClick: Te((_) => h(f.path), ["stop"])
|
|
@@ -2300,16 +2300,16 @@ const de = Ie("menu", () => {
|
|
|
2300
2300
|
}, 8, ["modelValue"])
|
|
2301
2301
|
]));
|
|
2302
2302
|
}
|
|
2303
|
-
}), qn = /* @__PURE__ */ re(sn, [["__scopeId", "data-v-
|
|
2303
|
+
}), qn = /* @__PURE__ */ re(sn, [["__scopeId", "data-v-876cc372"]]), on = {}, an = { class: "footer" };
|
|
2304
2304
|
function nn(t, r) {
|
|
2305
|
-
return
|
|
2305
|
+
return a(), c("div", an, [...r[0] || (r[0] = [
|
|
2306
2306
|
e("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
|
|
2307
2307
|
])]);
|
|
2308
2308
|
}
|
|
2309
|
-
const Hn = /* @__PURE__ */ re(
|
|
2309
|
+
const Hn = /* @__PURE__ */ re(on, [["render", nn], ["__scopeId", "data-v-5ef21e94"]]), ln = { class: "login-page" }, rn = { class: "login-form-section" }, cn = { class: "form-container" }, dn = { class: "input-wrapper" }, un = { class: "input-wrapper" }, mn = { class: "form-options" }, pn = { key: 0 }, vn = { key: 1 }, hn = /* @__PURE__ */ ne({
|
|
2310
2310
|
__name: "index",
|
|
2311
2311
|
setup(t) {
|
|
2312
|
-
const r = me(),
|
|
2312
|
+
const r = me(), d = we(), s = y(!1), o = y(!1), i = qe({
|
|
2313
2313
|
uid: "",
|
|
2314
2314
|
password: ""
|
|
2315
2315
|
}), h = {
|
|
@@ -2320,7 +2320,7 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2320
2320
|
{ required: !0, message: "请输入密码", trigger: "blur" },
|
|
2321
2321
|
{ min: 6, message: "密码长度至少6位", trigger: "blur" }
|
|
2322
2322
|
]
|
|
2323
|
-
}, v = y(),
|
|
2323
|
+
}, v = y(), u = async () => {
|
|
2324
2324
|
var f;
|
|
2325
2325
|
try {
|
|
2326
2326
|
await ((f = v.value) == null ? void 0 : f.validate()), s.value = !0;
|
|
@@ -2332,7 +2332,7 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2332
2332
|
code: !0
|
|
2333
2333
|
});
|
|
2334
2334
|
nt(_), Mt.success("登录成功");
|
|
2335
|
-
const g =
|
|
2335
|
+
const g = d.query.redirect;
|
|
2336
2336
|
g ? r.push(g) : r.push({ name: "Dashboard" });
|
|
2337
2337
|
} catch (_) {
|
|
2338
2338
|
console.error("登录失败:", _);
|
|
@@ -2340,8 +2340,8 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2340
2340
|
s.value = !1;
|
|
2341
2341
|
}
|
|
2342
2342
|
};
|
|
2343
|
-
return (f, _) => (
|
|
2344
|
-
_[10] || (_[10] = Ue('<div class="login-brand" data-v-
|
|
2343
|
+
return (f, _) => (a(), c("div", ln, [
|
|
2344
|
+
_[10] || (_[10] = Ue('<div class="login-brand" data-v-4597d7a1><div class="brand-content" data-v-4597d7a1><div class="brand-logo" data-v-4597d7a1><div class="logo-icon" data-v-4597d7a1><svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-4597d7a1><rect width="48" height="48" rx="12" fill="currentColor" data-v-4597d7a1></rect><path d="M14 24L20 30L34 16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" data-v-4597d7a1></path></svg></div><span class="logo-text" data-v-4597d7a1>XTO</span></div><div class="brand-slogan" data-v-4597d7a1><h1 data-v-4597d7a1>企业级后台管理解决方案</h1><p data-v-4597d7a1>开箱即用的中后台前端/设计解决方案</p></div><div class="brand-features" data-v-4597d7a1><div class="feature-item" data-v-4597d7a1><div class="feature-icon" data-v-4597d7a1><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-4597d7a1><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" data-v-4597d7a1></path></svg></div><div class="feature-text" data-v-4597d7a1><h4 data-v-4597d7a1>高性能</h4><p data-v-4597d7a1>极致的渲染性能与响应速度</p></div></div><div class="feature-item" data-v-4597d7a1><div class="feature-icon" data-v-4597d7a1><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-4597d7a1><rect x="3" y="3" width="18" height="18" rx="2" data-v-4597d7a1></rect><path d="M9 9h6M9 12h6M9 15h4" data-v-4597d7a1></path></svg></div><div class="feature-text" data-v-4597d7a1><h4 data-v-4597d7a1>丰富组件</h4><p data-v-4597d7a1>60+ 高质量业务组件</p></div></div><div class="feature-item" data-v-4597d7a1><div class="feature-icon" data-v-4597d7a1><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-4597d7a1><circle cx="12" cy="12" r="10" data-v-4597d7a1></circle><path d="M12 6v6l4 2" data-v-4597d7a1></path></svg></div><div class="feature-text" data-v-4597d7a1><h4 data-v-4597d7a1>持续更新</h4><p data-v-4597d7a1>活跃的社区与快速迭代</p></div></div></div><div class="brand-decoration" data-v-4597d7a1><div class="decoration-line" data-v-4597d7a1></div><div class="decoration-dots" data-v-4597d7a1><span data-v-4597d7a1></span><span data-v-4597d7a1></span><span data-v-4597d7a1></span></div></div></div><div class="brand-bg" data-v-4597d7a1><div class="bg-grid" data-v-4597d7a1></div><div class="bg-glow" data-v-4597d7a1></div><div class="bg-pattern" data-v-4597d7a1></div></div></div>', 1)),
|
|
2345
2345
|
e("div", rn, [
|
|
2346
2346
|
e("div", cn, [
|
|
2347
2347
|
_[7] || (_[7] = e("div", { class: "form-header" }, [
|
|
@@ -2359,7 +2359,7 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2359
2359
|
default: M(() => [
|
|
2360
2360
|
b(n(Pe), { prop: "uid" }, {
|
|
2361
2361
|
default: M(() => [
|
|
2362
|
-
e("div",
|
|
2362
|
+
e("div", dn, [
|
|
2363
2363
|
_[3] || (_[3] = e("label", { class: "input-label" }, "用户名", -1)),
|
|
2364
2364
|
b(n(et), {
|
|
2365
2365
|
modelValue: i.uid,
|
|
@@ -2381,7 +2381,7 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2381
2381
|
}),
|
|
2382
2382
|
b(n(Pe), { prop: "password" }, {
|
|
2383
2383
|
default: M(() => [
|
|
2384
|
-
e("div",
|
|
2384
|
+
e("div", un, [
|
|
2385
2385
|
_[4] || (_[4] = e("label", { class: "input-label" }, "密码", -1)),
|
|
2386
2386
|
b(n(et), {
|
|
2387
2387
|
modelValue: i.password,
|
|
@@ -2390,7 +2390,7 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2390
2390
|
placeholder: "请输入密码",
|
|
2391
2391
|
size: "large",
|
|
2392
2392
|
"show-password": "",
|
|
2393
|
-
onKeyup: xt(
|
|
2393
|
+
onKeyup: xt(u, ["enter"])
|
|
2394
2394
|
}, {
|
|
2395
2395
|
prefix: M(() => [
|
|
2396
2396
|
b(n(U), {
|
|
@@ -2406,8 +2406,8 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2406
2406
|
}),
|
|
2407
2407
|
e("div", mn, [
|
|
2408
2408
|
b(n(Nt), {
|
|
2409
|
-
modelValue:
|
|
2410
|
-
"onUpdate:modelValue": _[2] || (_[2] = (g) =>
|
|
2409
|
+
modelValue: o.value,
|
|
2410
|
+
"onUpdate:modelValue": _[2] || (_[2] = (g) => o.value = g)
|
|
2411
2411
|
}, {
|
|
2412
2412
|
default: M(() => [..._[5] || (_[5] = [
|
|
2413
2413
|
he("记住我", -1)
|
|
@@ -2426,10 +2426,10 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2426
2426
|
size: "large",
|
|
2427
2427
|
loading: s.value,
|
|
2428
2428
|
class: "login-btn",
|
|
2429
|
-
onClick:
|
|
2429
|
+
onClick: u
|
|
2430
2430
|
}, {
|
|
2431
2431
|
default: M(() => [
|
|
2432
|
-
s.value ? (
|
|
2432
|
+
s.value ? (a(), c("span", vn, "登录中...")) : (a(), c("span", pn, "登 录"))
|
|
2433
2433
|
]),
|
|
2434
2434
|
_: 1
|
|
2435
2435
|
}, 8, ["loading"])
|
|
@@ -2439,7 +2439,7 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2439
2439
|
]),
|
|
2440
2440
|
_: 1
|
|
2441
2441
|
}, 8, ["model"]),
|
|
2442
|
-
_[8] || (_[8] = Ue('<div class="form-footer" data-v-
|
|
2442
|
+
_[8] || (_[8] = Ue('<div class="form-footer" data-v-4597d7a1><p data-v-4597d7a1>其他登录方式</p><div class="social-login" data-v-4597d7a1><button class="social-btn" title="企业微信" data-v-4597d7a1><svg viewBox="0 0 24 24" fill="currentColor" data-v-4597d7a1><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" data-v-4597d7a1></path></svg></button><button class="social-btn" title="钉钉" data-v-4597d7a1><svg viewBox="0 0 24 24" fill="currentColor" data-v-4597d7a1><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z" data-v-4597d7a1></path></svg></button><button class="social-btn" title="飞书" data-v-4597d7a1><svg viewBox="0 0 24 24" fill="currentColor" data-v-4597d7a1><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" data-v-4597d7a1></path></svg></button></div></div>', 1))
|
|
2443
2443
|
]),
|
|
2444
2444
|
_[9] || (_[9] = e("div", { class: "copyright" }, [
|
|
2445
2445
|
e("p", null, "© 2024 XTO Team. All rights reserved.")
|
|
@@ -2447,31 +2447,31 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2447
2447
|
])
|
|
2448
2448
|
]));
|
|
2449
2449
|
}
|
|
2450
|
-
}), _n = /* @__PURE__ */ re(hn, [["__scopeId", "data-v-
|
|
2450
|
+
}), _n = /* @__PURE__ */ re(hn, [["__scopeId", "data-v-4597d7a1"]]), fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2451
2451
|
__proto__: null,
|
|
2452
2452
|
default: _n
|
|
2453
2453
|
}, Symbol.toStringTag, { value: "Module" })), gn = { class: "error-page" }, yn = { class: "error-container" }, bn = { class: "error-content" }, kn = { class: "error-actions" }, wn = /* @__PURE__ */ ne({
|
|
2454
2454
|
__name: "404",
|
|
2455
2455
|
setup(t) {
|
|
2456
|
-
const r = me(),
|
|
2456
|
+
const r = me(), d = () => {
|
|
2457
2457
|
r.push("/");
|
|
2458
2458
|
};
|
|
2459
|
-
return (s,
|
|
2459
|
+
return (s, o) => (a(), c("div", gn, [
|
|
2460
2460
|
e("div", yn, [
|
|
2461
|
-
|
|
2461
|
+
o[7] || (o[7] = e("div", { class: "error-bg" }, [
|
|
2462
2462
|
e("div", { class: "bg-circle circle-1" }),
|
|
2463
2463
|
e("div", { class: "bg-circle circle-2" }),
|
|
2464
2464
|
e("div", { class: "bg-circle circle-3" })
|
|
2465
2465
|
], -1)),
|
|
2466
2466
|
e("div", bn, [
|
|
2467
|
-
|
|
2467
|
+
o[5] || (o[5] = Ue('<div class="error-code" data-v-cb725bbc><span class="code-digit" data-v-cb725bbc>4</span><span class="code-zero" data-v-cb725bbc><span class="zero-inner" data-v-cb725bbc>0</span></span><span class="code-digit" data-v-cb725bbc>4</span></div><div class="error-illustration" data-v-cb725bbc><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-cb725bbc><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--xto-fill-color, #F3F4F6)" stroke="var(--xto-border-color, #D1D5DB)" stroke-width="2" data-v-cb725bbc></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--xto-bg-color, #FFFFFF)" data-v-cb725bbc></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--xto-border-color-light, #E5E7EB)" stroke-width="2" data-v-cb725bbc></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--xto-border-color-light, #E5E7EB)" stroke-width="2" data-v-cb725bbc></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--xto-border-color-light, #E5E7EB)" stroke-width="2" data-v-cb725bbc></line><text x="100" y="75" text-anchor="middle" fill="var(--xto-color-primary, #4F46E5)" font-size="24" font-weight="600" data-v-cb725bbc>?</text><circle cx="150" cy="35" r="12" stroke="var(--xto-color-primary, #4F46E5)" stroke-width="2" fill="none" data-v-cb725bbc></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--xto-color-primary, #4F46E5)" stroke-width="2" stroke-linecap="round" data-v-cb725bbc></line></svg></div><h1 class="error-title" data-v-cb725bbc>页面不存在</h1><p class="error-desc" data-v-cb725bbc>抱歉,您访问的页面不存在或已被删除</p>', 4)),
|
|
2468
2468
|
e("div", kn, [
|
|
2469
2469
|
b(n(ke), {
|
|
2470
2470
|
type: "primary",
|
|
2471
2471
|
size: "large",
|
|
2472
|
-
onClick:
|
|
2472
|
+
onClick: d
|
|
2473
2473
|
}, {
|
|
2474
|
-
icon: M(() => [...
|
|
2474
|
+
icon: M(() => [...o[1] || (o[1] = [
|
|
2475
2475
|
e("svg", {
|
|
2476
2476
|
viewBox: "0 0 24 24",
|
|
2477
2477
|
fill: "none",
|
|
@@ -2483,15 +2483,15 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2483
2483
|
], -1)
|
|
2484
2484
|
])]),
|
|
2485
2485
|
default: M(() => [
|
|
2486
|
-
|
|
2486
|
+
o[2] || (o[2] = he(" 返回首页 ", -1))
|
|
2487
2487
|
]),
|
|
2488
2488
|
_: 1
|
|
2489
2489
|
}),
|
|
2490
2490
|
b(n(ke), {
|
|
2491
2491
|
size: "large",
|
|
2492
|
-
onClick:
|
|
2492
|
+
onClick: o[0] || (o[0] = (i) => n(r).go(-1))
|
|
2493
2493
|
}, {
|
|
2494
|
-
icon: M(() => [...
|
|
2494
|
+
icon: M(() => [...o[3] || (o[3] = [
|
|
2495
2495
|
e("svg", {
|
|
2496
2496
|
viewBox: "0 0 24 24",
|
|
2497
2497
|
fill: "none",
|
|
@@ -2502,12 +2502,12 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2502
2502
|
], -1)
|
|
2503
2503
|
])]),
|
|
2504
2504
|
default: M(() => [
|
|
2505
|
-
|
|
2505
|
+
o[4] || (o[4] = he(" 返回上一页 ", -1))
|
|
2506
2506
|
]),
|
|
2507
2507
|
_: 1
|
|
2508
2508
|
})
|
|
2509
2509
|
]),
|
|
2510
|
-
|
|
2510
|
+
o[6] || (o[6] = e("div", { class: "error-tip" }, [
|
|
2511
2511
|
e("p", null, "您可以尝试:"),
|
|
2512
2512
|
e("ul", null, [
|
|
2513
2513
|
e("li", null, "检查您输入的网址是否正确"),
|
|
@@ -2519,31 +2519,31 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2519
2519
|
])
|
|
2520
2520
|
]));
|
|
2521
2521
|
}
|
|
2522
|
-
}), xn = /* @__PURE__ */ re(wn, [["__scopeId", "data-v-cb725bbc"]]),
|
|
2522
|
+
}), xn = /* @__PURE__ */ re(wn, [["__scopeId", "data-v-cb725bbc"]]), dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2523
2523
|
__proto__: null,
|
|
2524
2524
|
default: xn
|
|
2525
2525
|
}, Symbol.toStringTag, { value: "Module" })), Cn = { class: "error-page" }, $n = { class: "error-container" }, Ln = { class: "error-content" }, Mn = { class: "error-actions" }, Sn = /* @__PURE__ */ ne({
|
|
2526
2526
|
__name: "403",
|
|
2527
2527
|
setup(t) {
|
|
2528
|
-
const r = me(),
|
|
2528
|
+
const r = me(), d = () => {
|
|
2529
2529
|
r.push("/");
|
|
2530
2530
|
};
|
|
2531
|
-
return (s,
|
|
2531
|
+
return (s, o) => (a(), c("div", Cn, [
|
|
2532
2532
|
e("div", $n, [
|
|
2533
|
-
|
|
2533
|
+
o[7] || (o[7] = e("div", { class: "error-bg" }, [
|
|
2534
2534
|
e("div", { class: "bg-circle circle-1" }),
|
|
2535
2535
|
e("div", { class: "bg-circle circle-2" }),
|
|
2536
2536
|
e("div", { class: "bg-circle circle-3" })
|
|
2537
2537
|
], -1)),
|
|
2538
2538
|
e("div", Ln, [
|
|
2539
|
-
|
|
2539
|
+
o[5] || (o[5] = Ue('<div class="error-code" data-v-70b865a6><span class="code-digit" data-v-70b865a6>4</span><span class="code-zero warning" data-v-70b865a6><span class="zero-inner" data-v-70b865a6>0</span></span><span class="code-digit" data-v-70b865a6>3</span></div><div class="error-illustration" data-v-70b865a6><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-70b865a6><path d="M100 15 L150 35 L150 70 C150 95 100 110 100 110 C100 110 50 95 50 70 L50 35 Z" fill="var(--xto-color-warning-light-9, #FFFBEB)" stroke="var(--xto-color-warning, #F59E0B)" stroke-width="2" data-v-70b865a6></path><rect x="85" y="55" width="30" height="25" rx="4" fill="var(--xto-color-warning, #F59E0B)" data-v-70b865a6></rect><path d="M92 55 V48 A8 8 0 0 1 108 48 V55" fill="none" stroke="var(--xto-color-warning, #F59E0B)" stroke-width="3" data-v-70b865a6></path><circle cx="100" cy="67" r="6" fill="none" stroke="#fff" stroke-width="2" data-v-70b865a6></circle><line x1="96" y1="63" x2="104" y2="71" stroke="#fff" stroke-width="2" data-v-70b865a6></line></svg></div><h1 class="error-title" data-v-70b865a6>无访问权限</h1><p class="error-desc" data-v-70b865a6>抱歉,您没有权限访问此页面,请联系管理员获取权限</p>', 4)),
|
|
2540
2540
|
e("div", Mn, [
|
|
2541
2541
|
b(n(ke), {
|
|
2542
2542
|
type: "primary",
|
|
2543
2543
|
size: "large",
|
|
2544
|
-
onClick:
|
|
2544
|
+
onClick: d
|
|
2545
2545
|
}, {
|
|
2546
|
-
icon: M(() => [...
|
|
2546
|
+
icon: M(() => [...o[1] || (o[1] = [
|
|
2547
2547
|
e("svg", {
|
|
2548
2548
|
viewBox: "0 0 24 24",
|
|
2549
2549
|
fill: "none",
|
|
@@ -2555,15 +2555,15 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2555
2555
|
], -1)
|
|
2556
2556
|
])]),
|
|
2557
2557
|
default: M(() => [
|
|
2558
|
-
|
|
2558
|
+
o[2] || (o[2] = he(" 返回首页 ", -1))
|
|
2559
2559
|
]),
|
|
2560
2560
|
_: 1
|
|
2561
2561
|
}),
|
|
2562
2562
|
b(n(ke), {
|
|
2563
2563
|
size: "large",
|
|
2564
|
-
onClick:
|
|
2564
|
+
onClick: o[0] || (o[0] = (i) => n(r).go(-1))
|
|
2565
2565
|
}, {
|
|
2566
|
-
icon: M(() => [...
|
|
2566
|
+
icon: M(() => [...o[3] || (o[3] = [
|
|
2567
2567
|
e("svg", {
|
|
2568
2568
|
viewBox: "0 0 24 24",
|
|
2569
2569
|
fill: "none",
|
|
@@ -2574,12 +2574,12 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2574
2574
|
], -1)
|
|
2575
2575
|
])]),
|
|
2576
2576
|
default: M(() => [
|
|
2577
|
-
|
|
2577
|
+
o[4] || (o[4] = he(" 返回上一页 ", -1))
|
|
2578
2578
|
]),
|
|
2579
2579
|
_: 1
|
|
2580
2580
|
})
|
|
2581
2581
|
]),
|
|
2582
|
-
|
|
2582
|
+
o[6] || (o[6] = e("div", { class: "error-tip" }, [
|
|
2583
2583
|
e("p", null, "可能的原因:"),
|
|
2584
2584
|
e("ul", null, [
|
|
2585
2585
|
e("li", null, "您的账号权限不足"),
|
|
@@ -2593,14 +2593,14 @@ const Hn = /* @__PURE__ */ re(an, [["render", nn], ["__scopeId", "data-v-5ef21e9
|
|
|
2593
2593
|
}
|
|
2594
2594
|
}), Yn = /* @__PURE__ */ re(Sn, [["__scopeId", "data-v-70b865a6"]]);
|
|
2595
2595
|
function Gn() {
|
|
2596
|
-
const t =
|
|
2596
|
+
const t = de(), r = le(), d = Ee(), s = w(() => r.userName || ""), o = w(() => r.userInfo), i = w(() => t.appName), h = w(() => d.isLoggedIn), v = w(() => t.isDark), u = w(() => t.theme), f = w(() => t.isCollapsed), _ = w(() => t.layout);
|
|
2597
2597
|
return {
|
|
2598
2598
|
userName: s,
|
|
2599
|
-
userInfo:
|
|
2599
|
+
userInfo: o,
|
|
2600
2600
|
appName: i,
|
|
2601
2601
|
isLoggedIn: h,
|
|
2602
2602
|
isDark: v,
|
|
2603
|
-
theme:
|
|
2603
|
+
theme: u,
|
|
2604
2604
|
isCollapsed: f,
|
|
2605
2605
|
layout: _,
|
|
2606
2606
|
toggleTheme: () => {
|
|
@@ -2618,33 +2618,33 @@ function Xn() {
|
|
|
2618
2618
|
};
|
|
2619
2619
|
}
|
|
2620
2620
|
function Jn(t, r = {}) {
|
|
2621
|
-
const { rules:
|
|
2622
|
-
m(),
|
|
2623
|
-
}, _ = (
|
|
2624
|
-
Object.assign(i,
|
|
2621
|
+
const { rules: d, onSubmit: s } = r, o = y(), i = qe({ ...t }), h = y(!1), v = y(!1), u = y(!1), f = () => {
|
|
2622
|
+
m(), u.value = !1, v.value = !0;
|
|
2623
|
+
}, _ = (A) => {
|
|
2624
|
+
Object.assign(i, A), u.value = !0, v.value = !0;
|
|
2625
2625
|
}, g = () => {
|
|
2626
2626
|
v.value = !1, m();
|
|
2627
2627
|
}, m = () => {
|
|
2628
|
-
var
|
|
2628
|
+
var A;
|
|
2629
2629
|
Object.keys(t).forEach((W) => {
|
|
2630
2630
|
i[W] = t[W];
|
|
2631
|
-
}), (
|
|
2631
|
+
}), (A = o.value) == null || A.resetFields();
|
|
2632
2632
|
};
|
|
2633
2633
|
return {
|
|
2634
|
-
formRef:
|
|
2634
|
+
formRef: o,
|
|
2635
2635
|
formData: i,
|
|
2636
|
-
rules:
|
|
2636
|
+
rules: d,
|
|
2637
2637
|
loading: h,
|
|
2638
2638
|
visible: v,
|
|
2639
|
-
isEdit:
|
|
2639
|
+
isEdit: u,
|
|
2640
2640
|
openAdd: f,
|
|
2641
2641
|
openEdit: _,
|
|
2642
2642
|
close: g,
|
|
2643
2643
|
resetForm: m,
|
|
2644
2644
|
handleSubmit: async () => {
|
|
2645
|
-
var
|
|
2645
|
+
var A;
|
|
2646
2646
|
try {
|
|
2647
|
-
await ((
|
|
2647
|
+
await ((A = o.value) == null ? void 0 : A.validate()), h.value = !0, await (s == null ? void 0 : s(i)), g();
|
|
2648
2648
|
} catch (W) {
|
|
2649
2649
|
console.error(W);
|
|
2650
2650
|
} finally {
|
|
@@ -2654,15 +2654,15 @@ function Jn(t, r = {}) {
|
|
|
2654
2654
|
};
|
|
2655
2655
|
}
|
|
2656
2656
|
function Zn(t) {
|
|
2657
|
-
const { fetchData: r, defaultPageSize:
|
|
2657
|
+
const { fetchData: r, defaultPageSize: d = 10 } = t, s = y(!1), o = y([]), i = y(0), h = y(1), v = y(d), u = qe({}), f = async () => {
|
|
2658
2658
|
s.value = !0;
|
|
2659
2659
|
try {
|
|
2660
2660
|
const F = {
|
|
2661
|
-
...
|
|
2661
|
+
...u,
|
|
2662
2662
|
page: h.value,
|
|
2663
2663
|
pageSize: v.value
|
|
2664
2664
|
}, V = await r(F);
|
|
2665
|
-
|
|
2665
|
+
o.value = V.list, i.value = V.total;
|
|
2666
2666
|
} catch (F) {
|
|
2667
2667
|
console.error(F);
|
|
2668
2668
|
} finally {
|
|
@@ -2671,14 +2671,14 @@ function Zn(t) {
|
|
|
2671
2671
|
}, _ = () => {
|
|
2672
2672
|
h.value = 1, f();
|
|
2673
2673
|
}, g = () => {
|
|
2674
|
-
Object.keys(
|
|
2675
|
-
|
|
2674
|
+
Object.keys(u).forEach((F) => {
|
|
2675
|
+
u[F] = void 0;
|
|
2676
2676
|
}), h.value = 1, f();
|
|
2677
2677
|
}, m = (F) => {
|
|
2678
2678
|
h.value = F, f();
|
|
2679
2679
|
}, j = (F) => {
|
|
2680
2680
|
v.value = F, h.value = 1, f();
|
|
2681
|
-
},
|
|
2681
|
+
}, A = () => {
|
|
2682
2682
|
f();
|
|
2683
2683
|
}, W = w(() => ({
|
|
2684
2684
|
current: h.value,
|
|
@@ -2687,33 +2687,33 @@ function Zn(t) {
|
|
|
2687
2687
|
}));
|
|
2688
2688
|
return {
|
|
2689
2689
|
loading: s,
|
|
2690
|
-
data:
|
|
2690
|
+
data: o,
|
|
2691
2691
|
total: i,
|
|
2692
2692
|
currentPage: h,
|
|
2693
2693
|
pageSize: v,
|
|
2694
|
-
searchParams:
|
|
2694
|
+
searchParams: u,
|
|
2695
2695
|
pagination: W,
|
|
2696
2696
|
getData: f,
|
|
2697
2697
|
handleSearch: _,
|
|
2698
2698
|
handleReset: g,
|
|
2699
2699
|
handlePageChange: m,
|
|
2700
2700
|
handleSizeChange: j,
|
|
2701
|
-
refresh:
|
|
2701
|
+
refresh: A
|
|
2702
2702
|
};
|
|
2703
2703
|
}
|
|
2704
2704
|
const Je = Ie("locale", () => {
|
|
2705
|
-
const t = I.get("locale") || "zh-CN", r = It(t),
|
|
2706
|
-
const m = s.find((j) => j.code ===
|
|
2707
|
-
return (m == null ? void 0 : m.name) ||
|
|
2705
|
+
const t = I.get("locale") || "zh-CN", r = It(t), d = y(t), s = Et(), { t: o, messages: i, setLocale: h, mergeMessages: v } = Ut(), u = w(() => {
|
|
2706
|
+
const m = s.find((j) => j.code === d.value);
|
|
2707
|
+
return (m == null ? void 0 : m.name) || d.value;
|
|
2708
2708
|
});
|
|
2709
2709
|
return {
|
|
2710
|
-
locale:
|
|
2711
|
-
localeName:
|
|
2710
|
+
locale: d,
|
|
2711
|
+
localeName: u,
|
|
2712
2712
|
locales: s,
|
|
2713
2713
|
messages: i,
|
|
2714
|
-
t:
|
|
2714
|
+
t: o,
|
|
2715
2715
|
changeLocale: (m) => {
|
|
2716
|
-
|
|
2716
|
+
d.value = m, h(m), I.set("locale", m), r.setLocale(m);
|
|
2717
2717
|
},
|
|
2718
2718
|
addMessages: (m) => {
|
|
2719
2719
|
v(m);
|
|
@@ -2750,16 +2750,16 @@ function el() {
|
|
|
2750
2750
|
return Je().t;
|
|
2751
2751
|
}
|
|
2752
2752
|
function tl(t) {
|
|
2753
|
-
const r = le(),
|
|
2754
|
-
return r.isLoggedIn ?
|
|
2753
|
+
const r = le(), d = ue();
|
|
2754
|
+
return r.isLoggedIn ? d.hasPermission(t) : !1;
|
|
2755
2755
|
}
|
|
2756
2756
|
function sl(t) {
|
|
2757
2757
|
return le().isLoggedIn;
|
|
2758
2758
|
}
|
|
2759
|
-
function
|
|
2759
|
+
function ol() {
|
|
2760
2760
|
return !0;
|
|
2761
2761
|
}
|
|
2762
|
-
const
|
|
2762
|
+
const ut = [
|
|
2763
2763
|
{
|
|
2764
2764
|
path: "/login",
|
|
2765
2765
|
name: "Login",
|
|
@@ -2772,13 +2772,13 @@ const dt = [
|
|
|
2772
2772
|
], mt = {
|
|
2773
2773
|
path: "/",
|
|
2774
2774
|
name: "Layout",
|
|
2775
|
-
component: () => Promise.resolve().then(() =>
|
|
2775
|
+
component: () => Promise.resolve().then(() => Za),
|
|
2776
2776
|
redirect: "/dashboard",
|
|
2777
2777
|
children: [
|
|
2778
2778
|
{
|
|
2779
2779
|
path: "/dashboard",
|
|
2780
2780
|
name: "Dashboard",
|
|
2781
|
-
component: () => import("./index-
|
|
2781
|
+
component: () => import("./index-CYFcc2sd.js"),
|
|
2782
2782
|
meta: {
|
|
2783
2783
|
title: "仪表盘",
|
|
2784
2784
|
icon: "dashboard",
|
|
@@ -2789,7 +2789,7 @@ const dt = [
|
|
|
2789
2789
|
{
|
|
2790
2790
|
path: "/system/user",
|
|
2791
2791
|
name: "SystemUser",
|
|
2792
|
-
component: () => import("./index-
|
|
2792
|
+
component: () => import("./index-DGrQCWU0.js"),
|
|
2793
2793
|
meta: {
|
|
2794
2794
|
title: "用户管理",
|
|
2795
2795
|
icon: "user",
|
|
@@ -2799,7 +2799,7 @@ const dt = [
|
|
|
2799
2799
|
{
|
|
2800
2800
|
path: "/system/role",
|
|
2801
2801
|
name: "SystemRole",
|
|
2802
|
-
component: () => import("./index-
|
|
2802
|
+
component: () => import("./index-DYmKmoMX.js"),
|
|
2803
2803
|
meta: {
|
|
2804
2804
|
title: "角色管理",
|
|
2805
2805
|
icon: "role",
|
|
@@ -2809,7 +2809,7 @@ const dt = [
|
|
|
2809
2809
|
{
|
|
2810
2810
|
path: "/system/menu",
|
|
2811
2811
|
name: "SystemMenu",
|
|
2812
|
-
component: () => import("./index-
|
|
2812
|
+
component: () => import("./index-DIlGh6S6.js"),
|
|
2813
2813
|
meta: {
|
|
2814
2814
|
title: "菜单管理",
|
|
2815
2815
|
icon: "menu",
|
|
@@ -2820,18 +2820,18 @@ const dt = [
|
|
|
2820
2820
|
{
|
|
2821
2821
|
path: "/:pathMatch(.*)*",
|
|
2822
2822
|
name: "CatchAll",
|
|
2823
|
-
component: () => Promise.resolve().then(() =>
|
|
2823
|
+
component: () => Promise.resolve().then(() => dt),
|
|
2824
2824
|
meta: {
|
|
2825
2825
|
title: "404",
|
|
2826
2826
|
hidden: !0
|
|
2827
2827
|
}
|
|
2828
2828
|
}
|
|
2829
2829
|
]
|
|
2830
|
-
},
|
|
2830
|
+
}, al = [
|
|
2831
2831
|
{
|
|
2832
2832
|
path: "/dashboard",
|
|
2833
2833
|
name: "Dashboard",
|
|
2834
|
-
component: () => import("./index-
|
|
2834
|
+
component: () => import("./index-CYFcc2sd.js"),
|
|
2835
2835
|
meta: {
|
|
2836
2836
|
title: "仪表盘",
|
|
2837
2837
|
icon: "dashboard",
|
|
@@ -2851,7 +2851,7 @@ const dt = [
|
|
|
2851
2851
|
{
|
|
2852
2852
|
path: "user",
|
|
2853
2853
|
name: "SystemUser",
|
|
2854
|
-
component: () => import("./index-
|
|
2854
|
+
component: () => import("./index-DGrQCWU0.js"),
|
|
2855
2855
|
meta: {
|
|
2856
2856
|
title: "用户管理",
|
|
2857
2857
|
icon: "user",
|
|
@@ -2861,7 +2861,7 @@ const dt = [
|
|
|
2861
2861
|
{
|
|
2862
2862
|
path: "role",
|
|
2863
2863
|
name: "SystemRole",
|
|
2864
|
-
component: () => import("./index-
|
|
2864
|
+
component: () => import("./index-DYmKmoMX.js"),
|
|
2865
2865
|
meta: {
|
|
2866
2866
|
title: "角色管理",
|
|
2867
2867
|
icon: "role",
|
|
@@ -2871,7 +2871,7 @@ const dt = [
|
|
|
2871
2871
|
{
|
|
2872
2872
|
path: "menu",
|
|
2873
2873
|
name: "SystemMenu",
|
|
2874
|
-
component: () => import("./index-
|
|
2874
|
+
component: () => import("./index-DIlGh6S6.js"),
|
|
2875
2875
|
meta: {
|
|
2876
2876
|
title: "菜单管理",
|
|
2877
2877
|
icon: "menu",
|
|
@@ -2930,17 +2930,17 @@ const dt = [
|
|
|
2930
2930
|
}
|
|
2931
2931
|
], pt = He({
|
|
2932
2932
|
history: Ye(),
|
|
2933
|
-
routes: [...
|
|
2933
|
+
routes: [...ut, mt],
|
|
2934
2934
|
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
2935
2935
|
}), En = ["/login"];
|
|
2936
|
-
pt.beforeEach(async (t, r,
|
|
2937
|
-
const s =
|
|
2938
|
-
if (s.initTheme(),
|
|
2936
|
+
pt.beforeEach(async (t, r, d) => {
|
|
2937
|
+
const s = de();
|
|
2938
|
+
if (s.initTheme(), ot())
|
|
2939
2939
|
if (t.path === "/login")
|
|
2940
|
-
|
|
2940
|
+
d({ path: "/" });
|
|
2941
2941
|
else {
|
|
2942
|
-
const
|
|
2943
|
-
|
|
2942
|
+
const o = le();
|
|
2943
|
+
o.isLoggedIn || (o.setUserInfo({
|
|
2944
2944
|
appId: Re(),
|
|
2945
2945
|
userId: "1",
|
|
2946
2946
|
userName: "管理员",
|
|
@@ -2949,23 +2949,23 @@ pt.beforeEach(async (t, r, u) => {
|
|
|
2949
2949
|
mobilePhone: "13800138000",
|
|
2950
2950
|
positionName: "管理员",
|
|
2951
2951
|
avatar: ""
|
|
2952
|
-
}),
|
|
2952
|
+
}), ue().setMenuList(In)), t.name && t.meta.keepAlive && s.addCachedView(t.name), d();
|
|
2953
2953
|
}
|
|
2954
2954
|
else
|
|
2955
|
-
En.includes(t.path) ?
|
|
2955
|
+
En.includes(t.path) ? d() : d("/login");
|
|
2956
2956
|
});
|
|
2957
2957
|
function nl() {
|
|
2958
2958
|
const t = He({
|
|
2959
2959
|
history: Ye(),
|
|
2960
|
-
routes: [...
|
|
2960
|
+
routes: [...ut, mt]
|
|
2961
2961
|
});
|
|
2962
2962
|
pt.matcher = t.matcher;
|
|
2963
2963
|
}
|
|
2964
2964
|
function ll(t, r = {}) {
|
|
2965
|
-
const
|
|
2965
|
+
const d = r.indexPath || "/dashboard", s = r.logoSrc || "/vite.svg", o = {
|
|
2966
2966
|
path: "/:pathMatch(.*)*",
|
|
2967
2967
|
name: "CatchAll",
|
|
2968
|
-
component: () => Promise.resolve().then(() =>
|
|
2968
|
+
component: () => Promise.resolve().then(() => dt),
|
|
2969
2969
|
meta: {
|
|
2970
2970
|
title: "404"
|
|
2971
2971
|
}
|
|
@@ -2979,14 +2979,14 @@ function ll(t, r = {}) {
|
|
|
2979
2979
|
return Ct(ct, { logoSrc: s });
|
|
2980
2980
|
}
|
|
2981
2981
|
}),
|
|
2982
|
-
redirect:
|
|
2983
|
-
children: [...t,
|
|
2982
|
+
redirect: d,
|
|
2983
|
+
children: [...t, o]
|
|
2984
2984
|
};
|
|
2985
2985
|
}
|
|
2986
2986
|
function rl(t, r = {}) {
|
|
2987
|
-
const
|
|
2987
|
+
const d = r.base || ht();
|
|
2988
2988
|
return He({
|
|
2989
|
-
history: Ye(
|
|
2989
|
+
history: Ye(d),
|
|
2990
2990
|
routes: t,
|
|
2991
2991
|
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
2992
2992
|
});
|
|
@@ -2994,13 +2994,13 @@ function rl(t, r = {}) {
|
|
|
2994
2994
|
const Un = ["login", "404", "403", "/login", "/404", "/403"];
|
|
2995
2995
|
function zn(t, r) {
|
|
2996
2996
|
if (r.includes(t)) return !0;
|
|
2997
|
-
const
|
|
2998
|
-
return r.includes(
|
|
2997
|
+
const d = t.startsWith("/") ? t.slice(1) : t;
|
|
2998
|
+
return r.includes(d);
|
|
2999
2999
|
}
|
|
3000
3000
|
function il(t, r = {}) {
|
|
3001
|
-
const
|
|
3002
|
-
t.beforeEach(async (s,
|
|
3003
|
-
const h =
|
|
3001
|
+
const d = r.whiteList || Un;
|
|
3002
|
+
t.beforeEach(async (s, o, i) => {
|
|
3003
|
+
const h = de(), v = le(), u = ue(), f = h.loginPath || r.loginPath || "/login";
|
|
3004
3004
|
if (h.initTheme(), st())
|
|
3005
3005
|
if (s.path === f || s.name === "Login")
|
|
3006
3006
|
i({ name: "Dashboard" });
|
|
@@ -3017,29 +3017,29 @@ function il(t, r = {}) {
|
|
|
3017
3017
|
}
|
|
3018
3018
|
if (r.fetchMenu) {
|
|
3019
3019
|
const g = await r.fetchMenu();
|
|
3020
|
-
|
|
3020
|
+
u.setMenuList(g);
|
|
3021
3021
|
} else {
|
|
3022
3022
|
const g = await ft(r.appId);
|
|
3023
|
-
|
|
3023
|
+
u.setMenuList(g);
|
|
3024
3024
|
}
|
|
3025
3025
|
r.onLoginSuccess && r.onLoginSuccess(), s.name && s.meta.keepAlive && h.addCachedView(s.name), i({ ...s, replace: !0 });
|
|
3026
3026
|
} catch (g) {
|
|
3027
|
-
console.error("获取用户信息失败:", g), v.clearUserInfo(),
|
|
3027
|
+
console.error("获取用户信息失败:", g), v.clearUserInfo(), u.clearMenu(), at(), i({ name: "Login", query: { redirect: s.fullPath } });
|
|
3028
3028
|
}
|
|
3029
3029
|
else
|
|
3030
|
-
zn(s.path,
|
|
3030
|
+
zn(s.path, d) || s.name === "Login" || s.name === "NotFound" || s.name === "Forbidden" ? i() : i({ name: "Login", query: { redirect: s.fullPath } });
|
|
3031
3031
|
}), t.afterEach(() => {
|
|
3032
3032
|
});
|
|
3033
3033
|
}
|
|
3034
|
-
var Tn = /* @__PURE__ */ ((t) => (t[t.ENABLED = 1] = "ENABLED", t[t.DISABLED = 0] = "DISABLED", t))(Tn || {}), Pn = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.MALE = 1] = "MALE", t[t.FEMALE = 2] = "FEMALE", t))(Pn || {}),
|
|
3034
|
+
var Tn = /* @__PURE__ */ ((t) => (t[t.ENABLED = 1] = "ENABLED", t[t.DISABLED = 0] = "DISABLED", t))(Tn || {}), Pn = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.MALE = 1] = "MALE", t[t.FEMALE = 2] = "FEMALE", t))(Pn || {}), Dn = /* @__PURE__ */ ((t) => (t[t.DIRECTORY = 0] = "DIRECTORY", t[t.MENU = 1] = "MENU", t[t.BUTTON = 2] = "BUTTON", t))(Dn || {});
|
|
3035
3035
|
const cl = {
|
|
3036
3036
|
1: "启用",
|
|
3037
3037
|
0: "禁用"
|
|
3038
|
-
},
|
|
3038
|
+
}, dl = {
|
|
3039
3039
|
0: "未知",
|
|
3040
3040
|
1: "男",
|
|
3041
3041
|
2: "女"
|
|
3042
|
-
},
|
|
3042
|
+
}, ul = {
|
|
3043
3043
|
0: "目录",
|
|
3044
3044
|
1: "菜单",
|
|
3045
3045
|
2: "按钮"
|
|
@@ -3089,12 +3089,12 @@ const cl = {
|
|
|
3089
3089
|
], hl = {
|
|
3090
3090
|
mounted(t, r) {
|
|
3091
3091
|
var h, v;
|
|
3092
|
-
const
|
|
3093
|
-
if (!
|
|
3092
|
+
const d = le(), s = ue();
|
|
3093
|
+
if (!d.isLoggedIn) {
|
|
3094
3094
|
(h = t.parentNode) == null || h.removeChild(t);
|
|
3095
3095
|
return;
|
|
3096
3096
|
}
|
|
3097
|
-
const
|
|
3097
|
+
const o = r.value, i = Array.isArray(o) ? o : [o];
|
|
3098
3098
|
s.hasPermission(i) || (v = t.parentNode) == null || v.removeChild(t);
|
|
3099
3099
|
}
|
|
3100
3100
|
};
|
|
@@ -3106,11 +3106,11 @@ async function _l(t) {
|
|
|
3106
3106
|
clientId: t.clientId,
|
|
3107
3107
|
apiBaseUrl: r || t.apiBaseUrl,
|
|
3108
3108
|
basePath: t.basePath
|
|
3109
|
-
}), t.basePath && kt(t.basePath), Promise.resolve().then(() => zt).then(({ useAppStore:
|
|
3110
|
-
const s =
|
|
3109
|
+
}), t.basePath && kt(t.basePath), Promise.resolve().then(() => zt).then(({ useAppStore: d }) => {
|
|
3110
|
+
const s = d();
|
|
3111
3111
|
t.appName && s.setAppName(t.appName), t.indexPath && s.setIndexPath(t.indexPath), t.loginPath && s.setLoginPath(t.loginPath);
|
|
3112
|
-
}), t.locale && Promise.resolve().then(() => Nn).then(({ useLocaleStore:
|
|
3113
|
-
|
|
3112
|
+
}), t.locale && Promise.resolve().then(() => Nn).then(({ useLocaleStore: d }) => {
|
|
3113
|
+
d().changeLocale(t.locale);
|
|
3114
3114
|
}), {
|
|
3115
3115
|
config: {
|
|
3116
3116
|
appName: t.appName || "XTO App",
|
|
@@ -3125,7 +3125,7 @@ async function _l(t) {
|
|
|
3125
3125
|
};
|
|
3126
3126
|
}
|
|
3127
3127
|
export {
|
|
3128
|
-
|
|
3128
|
+
de as A,
|
|
3129
3129
|
Xn as B,
|
|
3130
3130
|
Ee as C,
|
|
3131
3131
|
Jn as D,
|
|
@@ -3134,10 +3134,10 @@ export {
|
|
|
3134
3134
|
Pn as G,
|
|
3135
3135
|
Bs as H,
|
|
3136
3136
|
Je as I,
|
|
3137
|
-
|
|
3137
|
+
ue as J,
|
|
3138
3138
|
Zn as K,
|
|
3139
3139
|
ct as L,
|
|
3140
|
-
|
|
3140
|
+
Dn as M,
|
|
3141
3141
|
le as N,
|
|
3142
3142
|
Tn as S,
|
|
3143
3143
|
qn as T,
|
|
@@ -3146,8 +3146,8 @@ export {
|
|
|
3146
3146
|
vl as b,
|
|
3147
3147
|
Yn as c,
|
|
3148
3148
|
pl as d,
|
|
3149
|
-
|
|
3150
|
-
|
|
3149
|
+
dl as e,
|
|
3150
|
+
ul as f,
|
|
3151
3151
|
xn as g,
|
|
3152
3152
|
tt as h,
|
|
3153
3153
|
_n as i,
|
|
@@ -3156,16 +3156,16 @@ export {
|
|
|
3156
3156
|
rl as l,
|
|
3157
3157
|
el as m,
|
|
3158
3158
|
_l as n,
|
|
3159
|
-
|
|
3159
|
+
al as o,
|
|
3160
3160
|
tl as p,
|
|
3161
3161
|
sl as q,
|
|
3162
|
-
|
|
3162
|
+
ol as r,
|
|
3163
3163
|
mt as s,
|
|
3164
3164
|
In as t,
|
|
3165
3165
|
hl as u,
|
|
3166
3166
|
nl as v,
|
|
3167
3167
|
pt as w,
|
|
3168
3168
|
il as x,
|
|
3169
|
-
|
|
3169
|
+
ut as y,
|
|
3170
3170
|
Gn as z
|
|
3171
3171
|
};
|