xto-fronted 0.4.104 → 0.4.106
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-j1GPEQjY.js → index-01f4mTJg.js} +1 -1
- package/dist/{index-C2zTmROz.js → index-BSyHGMA5.js} +652 -647
- package/dist/{index-x7bKZmey.js → index-BnkXUVuB.js} +1 -1
- package/dist/{index-Ci9SM-gg.js → index-Nz8stCJl.js} +1 -1
- package/dist/{index-HtulbTHk.js → index-ddj4tPtc.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/router/guards.ts +22 -10
- package/src/views/login/index.vue +9 -4
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { x as
|
|
2
|
-
import { ref as g, computed as w, watch as ye, defineComponent as ae, resolveComponent as lt, openBlock as s, createBlock as O, unref as
|
|
3
|
-
import { defineStore as
|
|
4
|
-
import { useRoute as
|
|
5
|
-
import { SubMenu as Re, MenuItem as Se, Menu as Xe, Tabs as
|
|
6
|
-
import { Icon as U, Button as
|
|
1
|
+
import { x as I, y as tt, z as st, A as ot, B as nt, o as pt, C as at, D as Fe, m as vt, i as ht, E as _t, F as ft } from "./user-Qd_jMBaH.js";
|
|
2
|
+
import { ref as g, computed as w, watch as ye, defineComponent as ae, resolveComponent as lt, openBlock as s, createBlock as O, unref as a, withCtx as M, createElementBlock as c, Fragment as K, renderList as G, createElementVNode as e, toDisplayString as b, createCommentVNode as P, normalizeClass as J, withDirectives as Te, vShow as gt, createVNode as y, createTextVNode as he, onMounted as Ke, onUnmounted as je, vModelText as We, Transition as ke, withModifiers as Ee, normalizeStyle as Ne, reactive as qe, createStaticVNode as Ue, withKeys as yt, h as kt } from "vue";
|
|
3
|
+
import { defineStore as Ie } from "pinia";
|
|
4
|
+
import { useRoute as be, useRouter as me, createRouter as He, createWebHistory as Ye } from "vue-router";
|
|
5
|
+
import { SubMenu as Re, MenuItem as Se, Menu as Xe, Tabs as wt, TabPane as bt } from "@xto/navigation";
|
|
6
|
+
import { Icon as U, Button as we } from "@xto/base";
|
|
7
7
|
import { Drawer as Ge, Message as xt } from "@xto/feedback";
|
|
8
8
|
import { Form as Ct, FormItem as Pe, Input as Qe, Checkbox as $t } from "@xto/form";
|
|
9
9
|
import { createLocaleProvider as Lt, getSupportedLocales as Mt, useLocale as St } from "@xto/core/locale";
|
|
10
|
-
const
|
|
11
|
-
const t = g(
|
|
12
|
-
t.value = z,
|
|
10
|
+
const ue = Ie("app", () => {
|
|
11
|
+
const t = g(I.get("appName") || "XTO App"), r = g(I.get("indexPath") || "/dashboard"), d = g(I.get("loginPath") || "/login"), n = g(I.get("isDark") || !1), o = g(I.get("theme") || "light"), i = g(I.get("layout") || "sidebar"), h = g(I.get("isCollapsed") || !1), v = g(I.get("showTabs") ?? !0), m = g(I.get("showFooter") ?? !0), f = g(I.get("showBreadcrumb") ?? !0), _ = g(I.get("primaryColor") || "#409eff"), u = g([]), $ = g([]), j = w(() => n.value ? "dark" : "light"), D = (z) => {
|
|
12
|
+
t.value = z, I.set("appName", z);
|
|
13
13
|
}, W = (z) => {
|
|
14
|
-
r.value = z,
|
|
14
|
+
r.value = z, I.set("indexPath", z);
|
|
15
15
|
}, V = (z) => {
|
|
16
|
-
d.value = z,
|
|
16
|
+
d.value = z, I.set("loginPath", z);
|
|
17
17
|
}, B = () => {
|
|
18
|
-
|
|
18
|
+
n.value = !n.value, o.value = n.value ? "dark" : "light", Z();
|
|
19
19
|
}, H = (z) => {
|
|
20
|
-
o.value = z,
|
|
20
|
+
o.value = z, n.value = z === "dark", Z();
|
|
21
21
|
}, Z = () => {
|
|
22
22
|
const z = document.documentElement;
|
|
23
|
-
|
|
23
|
+
n.value ? z.classList.add("dark") : z.classList.remove("dark"), I.set("isDark", n.value), I.set("theme", o.value);
|
|
24
24
|
}, Y = () => {
|
|
25
|
-
|
|
25
|
+
h.value = !h.value, I.set("isCollapsed", h.value);
|
|
26
26
|
}, q = (z) => {
|
|
27
|
-
i.value = z,
|
|
27
|
+
i.value = z, I.set("layout", z);
|
|
28
28
|
}, ee = () => {
|
|
29
|
-
|
|
29
|
+
v.value = !v.value, I.set("showTabs", v.value);
|
|
30
30
|
}, E = () => {
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
f.value = !f.value,
|
|
31
|
+
m.value = !m.value, I.set("showFooter", m.value);
|
|
32
|
+
}, N = () => {
|
|
33
|
+
f.value = !f.value, I.set("showBreadcrumb", f.value);
|
|
34
34
|
}, A = (z) => {
|
|
35
|
-
_.value = z, document.documentElement.style.setProperty("--color-primary", z),
|
|
35
|
+
_.value = z, document.documentElement.style.setProperty("--color-primary", z), I.set("primaryColor", z);
|
|
36
36
|
}, X = (z) => {
|
|
37
|
-
|
|
37
|
+
u.value.includes(z) || u.value.push(z);
|
|
38
38
|
}, F = (z) => {
|
|
39
|
-
const oe =
|
|
40
|
-
oe > -1 &&
|
|
39
|
+
const oe = u.value.indexOf(z);
|
|
40
|
+
oe > -1 && u.value.splice(oe, 1);
|
|
41
41
|
}, se = () => {
|
|
42
|
-
|
|
42
|
+
u.value = [];
|
|
43
43
|
}, ie = (z) => {
|
|
44
|
-
|
|
44
|
+
$.value = z;
|
|
45
45
|
}, pe = () => {
|
|
46
46
|
Z(), _.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", _.value);
|
|
47
47
|
};
|
|
48
|
-
return ye(
|
|
48
|
+
return ye(n, Z), {
|
|
49
49
|
appName: t,
|
|
50
50
|
indexPath: r,
|
|
51
51
|
loginPath: d,
|
|
52
|
-
isDark:
|
|
52
|
+
isDark: n,
|
|
53
53
|
theme: o,
|
|
54
54
|
layout: i,
|
|
55
|
-
isCollapsed:
|
|
56
|
-
showTabs:
|
|
57
|
-
showFooter:
|
|
55
|
+
isCollapsed: h,
|
|
56
|
+
showTabs: v,
|
|
57
|
+
showFooter: m,
|
|
58
58
|
showBreadcrumb: f,
|
|
59
59
|
primaryColor: _,
|
|
60
|
-
cachedViews:
|
|
61
|
-
mixSubMenus:
|
|
60
|
+
cachedViews: u,
|
|
61
|
+
mixSubMenus: $,
|
|
62
62
|
themeClass: j,
|
|
63
63
|
setAppName: D,
|
|
64
64
|
setIndexPath: W,
|
|
@@ -69,7 +69,7 @@ const de = Ne("app", () => {
|
|
|
69
69
|
setLayout: q,
|
|
70
70
|
toggleTabs: ee,
|
|
71
71
|
toggleFooter: E,
|
|
72
|
-
toggleBreadcrumb:
|
|
72
|
+
toggleBreadcrumb: N,
|
|
73
73
|
setPrimaryColor: A,
|
|
74
74
|
addCachedView: X,
|
|
75
75
|
removeCachedView: F,
|
|
@@ -77,10 +77,10 @@ const de = Ne("app", () => {
|
|
|
77
77
|
setMixSubMenus: ie,
|
|
78
78
|
initTheme: pe
|
|
79
79
|
};
|
|
80
|
-
}),
|
|
80
|
+
}), Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81
81
|
__proto__: null,
|
|
82
|
-
useAppStore:
|
|
83
|
-
}, Symbol.toStringTag, { value: "Module" })), Ae = "menu_list", De = "permission_list",
|
|
82
|
+
useAppStore: ue
|
|
83
|
+
}, Symbol.toStringTag, { value: "Module" })), Ae = "menu_list", De = "permission_list", It = {
|
|
84
84
|
menuCode: "home",
|
|
85
85
|
menuName: "首页",
|
|
86
86
|
menuUrl: "/dashboard",
|
|
@@ -97,95 +97,95 @@ function rt(t) {
|
|
|
97
97
|
}
|
|
98
98
|
function zt(t) {
|
|
99
99
|
const r = [];
|
|
100
|
-
function d(
|
|
101
|
-
|
|
100
|
+
function d(n) {
|
|
101
|
+
n.forEach((o) => {
|
|
102
102
|
o.type === 1 && o.menuCode && r.push(o.menuCode), o.children && d(o.children);
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
return d(t), r;
|
|
106
106
|
}
|
|
107
|
-
const
|
|
108
|
-
const t = g(
|
|
107
|
+
const de = Ie("menu", () => {
|
|
108
|
+
const t = g(I.get(Ae) || []), r = g(I.get(De) || []), d = w(() => t.value.length > 0);
|
|
109
109
|
return {
|
|
110
110
|
menuList: t,
|
|
111
111
|
permissions: r,
|
|
112
112
|
hasMenu: d,
|
|
113
|
-
setMenuList: (
|
|
114
|
-
r.value = zt(
|
|
115
|
-
const
|
|
116
|
-
t.value = [
|
|
113
|
+
setMenuList: (h) => {
|
|
114
|
+
r.value = zt(h), I.set(De, r.value);
|
|
115
|
+
const v = rt(h);
|
|
116
|
+
t.value = [It, ...v], I.set(Ae, t.value);
|
|
117
117
|
},
|
|
118
118
|
clearMenu: () => {
|
|
119
|
-
t.value = [], r.value = [],
|
|
119
|
+
t.value = [], r.value = [], I.remove(Ae), I.remove(De);
|
|
120
120
|
},
|
|
121
|
-
hasPermission: (
|
|
121
|
+
hasPermission: (h) => Array.isArray(h) ? h.some((v) => r.value.includes(v)) : r.value.includes(h)
|
|
122
122
|
};
|
|
123
|
-
}), Ve = "user_info", le =
|
|
124
|
-
const t = g(
|
|
125
|
-
var
|
|
126
|
-
return ((
|
|
127
|
-
}),
|
|
128
|
-
var
|
|
129
|
-
return ((
|
|
123
|
+
}), Ve = "user_info", le = Ie("user", () => {
|
|
124
|
+
const t = g(I.get(Ve)), r = w(() => !!t.value), d = w(() => {
|
|
125
|
+
var u;
|
|
126
|
+
return ((u = t.value) == null ? void 0 : u.userId) || "";
|
|
127
|
+
}), n = w(() => {
|
|
128
|
+
var u;
|
|
129
|
+
return ((u = t.value) == null ? void 0 : u.userName) || "";
|
|
130
130
|
}), o = w(() => {
|
|
131
|
-
var
|
|
132
|
-
return ((
|
|
131
|
+
var u;
|
|
132
|
+
return ((u = t.value) == null ? void 0 : u.departmentName) || "";
|
|
133
133
|
}), i = w(() => {
|
|
134
|
-
var
|
|
135
|
-
return ((
|
|
136
|
-
}), v = w(() => {
|
|
137
|
-
var m;
|
|
138
|
-
return ((m = t.value) == null ? void 0 : m.mobilePhone) || "";
|
|
134
|
+
var u;
|
|
135
|
+
return ((u = t.value) == null ? void 0 : u.email) || "";
|
|
139
136
|
}), h = w(() => {
|
|
140
|
-
var
|
|
141
|
-
return ((
|
|
142
|
-
}),
|
|
143
|
-
var
|
|
144
|
-
return ((
|
|
137
|
+
var u;
|
|
138
|
+
return ((u = t.value) == null ? void 0 : u.mobilePhone) || "";
|
|
139
|
+
}), v = w(() => {
|
|
140
|
+
var u;
|
|
141
|
+
return ((u = t.value) == null ? void 0 : u.positionName) || "";
|
|
142
|
+
}), m = w(() => {
|
|
143
|
+
var u;
|
|
144
|
+
return ((u = t.value) == null ? void 0 : u.avatar) || "";
|
|
145
145
|
});
|
|
146
146
|
return {
|
|
147
147
|
userInfo: t,
|
|
148
148
|
isLoggedIn: r,
|
|
149
149
|
userId: d,
|
|
150
|
-
userName:
|
|
150
|
+
userName: n,
|
|
151
151
|
departmentName: o,
|
|
152
152
|
email: i,
|
|
153
|
-
mobilePhone:
|
|
154
|
-
positionName:
|
|
155
|
-
avatar:
|
|
156
|
-
setUserInfo: (
|
|
157
|
-
t.value =
|
|
153
|
+
mobilePhone: h,
|
|
154
|
+
positionName: v,
|
|
155
|
+
avatar: m,
|
|
156
|
+
setUserInfo: (u) => {
|
|
157
|
+
t.value = u, I.set(Ve, u);
|
|
158
158
|
},
|
|
159
159
|
clearUserInfo: () => {
|
|
160
|
-
t.value = null,
|
|
160
|
+
t.value = null, I.remove(Ve);
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
|
-
}), ze =
|
|
164
|
-
const t = g(tt()), r = w(() => st()), d = g(""),
|
|
163
|
+
}), ze = Ie("auth", () => {
|
|
164
|
+
const t = g(tt()), r = w(() => st()), d = g(""), n = g(""), o = g(""), i = g("/login");
|
|
165
165
|
return {
|
|
166
166
|
token: t,
|
|
167
167
|
isLoggedIn: r,
|
|
168
168
|
baseUrl: d,
|
|
169
|
-
appId:
|
|
169
|
+
appId: n,
|
|
170
170
|
clientId: o,
|
|
171
171
|
loginPath: i,
|
|
172
|
-
login: (
|
|
173
|
-
t.value =
|
|
172
|
+
login: ($) => {
|
|
173
|
+
t.value = $.access_token, nt($);
|
|
174
174
|
},
|
|
175
175
|
logout: () => {
|
|
176
176
|
t.value = null, ot();
|
|
177
177
|
},
|
|
178
|
-
setBaseUrl: (
|
|
179
|
-
d.value =
|
|
178
|
+
setBaseUrl: ($) => {
|
|
179
|
+
d.value = $;
|
|
180
180
|
},
|
|
181
|
-
setAppId: (
|
|
182
|
-
|
|
181
|
+
setAppId: ($) => {
|
|
182
|
+
n.value = $;
|
|
183
183
|
},
|
|
184
|
-
setClientId: (
|
|
185
|
-
o.value =
|
|
184
|
+
setClientId: ($) => {
|
|
185
|
+
o.value = $;
|
|
186
186
|
},
|
|
187
|
-
setLoginPath: (
|
|
188
|
-
i.value =
|
|
187
|
+
setLoginPath: ($) => {
|
|
188
|
+
i.value = $;
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
}), Ut = { class: "menu-item__content" }, Tt = { class: "menu-item__icon" }, Et = {
|
|
@@ -305,10 +305,10 @@ const ue = Ne("menu", () => {
|
|
|
305
305
|
"sun",
|
|
306
306
|
"theme",
|
|
307
307
|
"skin"
|
|
308
|
-
]),
|
|
309
|
-
if (!
|
|
310
|
-
if (
|
|
311
|
-
const _ =
|
|
308
|
+
]), n = (m) => {
|
|
309
|
+
if (!m || m === "") return "";
|
|
310
|
+
if (m.startsWith("tineco-icon-")) {
|
|
311
|
+
const _ = m.replace("tineco-icon-", "");
|
|
312
312
|
return {
|
|
313
313
|
home: "home",
|
|
314
314
|
dashboard: "dashboard",
|
|
@@ -341,47 +341,47 @@ const ue = Ne("menu", () => {
|
|
|
341
341
|
app: "app",
|
|
342
342
|
list: "list",
|
|
343
343
|
grid: "grid"
|
|
344
|
-
}[
|
|
345
|
-
}, o = (
|
|
346
|
-
return (
|
|
344
|
+
}[m] || m;
|
|
345
|
+
}, o = (m) => m ? m.charAt(0) : "", i = (m) => d.has(m), h = w(() => r.menu.menuId || r.menu.menuCode || r.menu.menuUrl || ""), v = w(() => r.menu.children && r.menu.children.length > 0);
|
|
346
|
+
return (m, f) => {
|
|
347
347
|
const _ = lt("SidebarMenuItem", !0);
|
|
348
|
-
return
|
|
348
|
+
return v.value ? (s(), O(a(Re), {
|
|
349
349
|
key: 0,
|
|
350
|
-
index:
|
|
350
|
+
index: h.value
|
|
351
351
|
}, {
|
|
352
352
|
title: M(() => [
|
|
353
353
|
e("span", Ut, [
|
|
354
354
|
e("span", Tt, [
|
|
355
|
-
i(
|
|
355
|
+
i(n(t.menu.icon)) ? (s(), O(a(U), {
|
|
356
356
|
key: 0,
|
|
357
|
-
name:
|
|
357
|
+
name: n(t.menu.icon),
|
|
358
358
|
size: 16
|
|
359
|
-
}, null, 8, ["name"])) : (s(), c("span", Et,
|
|
359
|
+
}, null, 8, ["name"])) : (s(), c("span", Et, b(o(t.menu.menuName)), 1))
|
|
360
360
|
]),
|
|
361
|
-
e("span", Pt,
|
|
361
|
+
e("span", Pt, b(t.menu.menuName), 1)
|
|
362
362
|
])
|
|
363
363
|
]),
|
|
364
364
|
default: M(() => [
|
|
365
|
-
(s(!0), c(K, null, G(t.menu.children, (
|
|
366
|
-
key:
|
|
367
|
-
menu:
|
|
365
|
+
(s(!0), c(K, null, G(t.menu.children, (u) => (s(), O(_, {
|
|
366
|
+
key: u.menuId || u.menuCode || u.menuUrl,
|
|
367
|
+
menu: u
|
|
368
368
|
}, null, 8, ["menu"]))), 128))
|
|
369
369
|
]),
|
|
370
370
|
_: 1
|
|
371
|
-
}, 8, ["index"])) : (s(), O(
|
|
371
|
+
}, 8, ["index"])) : (s(), O(a(Se), {
|
|
372
372
|
key: 1,
|
|
373
|
-
index: t.menu.menuUrl ||
|
|
373
|
+
index: t.menu.menuUrl || h.value
|
|
374
374
|
}, {
|
|
375
375
|
default: M(() => [
|
|
376
376
|
e("span", At, [
|
|
377
377
|
t.menu.menuName !== "首页" ? (s(), c("span", Dt, [
|
|
378
|
-
i(
|
|
378
|
+
i(n(t.menu.icon)) ? (s(), O(a(U), {
|
|
379
379
|
key: 0,
|
|
380
|
-
name:
|
|
380
|
+
name: n(t.menu.icon),
|
|
381
381
|
size: 16
|
|
382
|
-
}, null, 8, ["name"])) : (s(), c("span", Vt,
|
|
382
|
+
}, null, 8, ["name"])) : (s(), c("span", Vt, b(o(t.menu.menuName)), 1))
|
|
383
383
|
])) : P("", !0),
|
|
384
|
-
e("span", Ot,
|
|
384
|
+
e("span", Ot, b(t.menu.menuName), 1)
|
|
385
385
|
])
|
|
386
386
|
]),
|
|
387
387
|
_: 1
|
|
@@ -390,8 +390,8 @@ const ue = Ne("menu", () => {
|
|
|
390
390
|
}
|
|
391
391
|
}), re = (t, r) => {
|
|
392
392
|
const d = t.__vccOpts || t;
|
|
393
|
-
for (const [
|
|
394
|
-
d[
|
|
393
|
+
for (const [n, o] of r)
|
|
394
|
+
d[n] = o;
|
|
395
395
|
return d;
|
|
396
396
|
}, Rt = /* @__PURE__ */ re(Bt, [["__scopeId", "data-v-f5865e28"]]), Ft = {
|
|
397
397
|
key: 0,
|
|
@@ -408,39 +408,39 @@ const ue = Ne("menu", () => {
|
|
|
408
408
|
logoSrc: { default: "/vite.svg" }
|
|
409
409
|
},
|
|
410
410
|
setup(t) {
|
|
411
|
-
const r = t, d =
|
|
411
|
+
const r = t, d = be(), n = me(), o = de(), i = le(), h = ze(), v = ue(), m = w(() => r.menuList.length > 0 ? r.menuList : o.menuList), f = w(() => v.isCollapsed), _ = w(() => d.path), u = (E) => E.menuId || E.menuCode || E.menuUrl || "", $ = () => m.value.map(u).join(","), j = I.get(Be) || "", D = $(), W = j === D ? I.get(Oe) || [] : [], V = g(W);
|
|
412
412
|
ye(V, (E) => {
|
|
413
|
-
|
|
413
|
+
I.set(Oe, E), I.set(Be, $());
|
|
414
414
|
}, { deep: !0 });
|
|
415
|
-
const B = (E,
|
|
415
|
+
const B = (E, N, A = []) => {
|
|
416
416
|
var X;
|
|
417
417
|
for (const F of E) {
|
|
418
|
-
if (F.menuUrl && (
|
|
419
|
-
return [...A,
|
|
418
|
+
if (F.menuUrl && (N === F.menuUrl || N.startsWith(F.menuUrl + "/")))
|
|
419
|
+
return [...A, u(F)];
|
|
420
420
|
if ((X = F.children) != null && X.length) {
|
|
421
|
-
const se = B(F.children,
|
|
421
|
+
const se = B(F.children, N, [...A, u(F)]);
|
|
422
422
|
if (se) return se;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
return null;
|
|
426
426
|
};
|
|
427
|
-
ye([() => d.path,
|
|
428
|
-
if (
|
|
429
|
-
const A = B(
|
|
427
|
+
ye([() => d.path, m], ([E, N]) => {
|
|
428
|
+
if (N.length > 0) {
|
|
429
|
+
const A = B(N, E);
|
|
430
430
|
if (A) {
|
|
431
431
|
const X = A.slice(0, -1), F = /* @__PURE__ */ new Set([...V.value, ...X]);
|
|
432
432
|
V.value = Array.from(F);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
}, { immediate: !0 }), ye(
|
|
436
|
-
E !==
|
|
435
|
+
}, { immediate: !0 }), ye(m, (E, N) => {
|
|
436
|
+
E !== N && (V.value = [], I.set(Oe, []), I.set(Be, $()));
|
|
437
437
|
}, { immediate: !1 });
|
|
438
|
-
const H = w(() =>
|
|
439
|
-
E && E !== d.path &&
|
|
438
|
+
const H = w(() => v.isDark ? "#1d1e1f" : "#fff"), Z = w(() => v.isDark ? "#cfd3dc" : "#303133"), Y = w(() => "#409eff"), q = (E) => {
|
|
439
|
+
E && E !== d.path && n.push(E);
|
|
440
440
|
}, ee = () => {
|
|
441
|
-
|
|
441
|
+
h.logout(), i.clearUserInfo(), o.clearMenu(), n.push(v.loginPath);
|
|
442
442
|
};
|
|
443
|
-
return (E,
|
|
443
|
+
return (E, N) => (s(), c("div", {
|
|
444
444
|
class: J(["sidebar", { "sidebar--collapsed": f.value }])
|
|
445
445
|
}, [
|
|
446
446
|
r.showLogo ? (s(), c("div", Ft, [
|
|
@@ -449,15 +449,15 @@ const ue = Ne("menu", () => {
|
|
|
449
449
|
alt: "Logo",
|
|
450
450
|
class: "sidebar__logo-img"
|
|
451
451
|
}, null, 8, Kt),
|
|
452
|
-
Te(e("span", { class: "sidebar__logo-text" },
|
|
452
|
+
Te(e("span", { class: "sidebar__logo-text" }, b(a(v).appName), 513), [
|
|
453
453
|
[gt, !f.value]
|
|
454
454
|
])
|
|
455
455
|
])) : P("", !0),
|
|
456
|
-
y(
|
|
456
|
+
y(a(Xe), {
|
|
457
457
|
modelValue: _.value,
|
|
458
|
-
"onUpdate:modelValue":
|
|
458
|
+
"onUpdate:modelValue": N[0] || (N[0] = (A) => _.value = A),
|
|
459
459
|
openeds: V.value,
|
|
460
|
-
"onUpdate:openeds":
|
|
460
|
+
"onUpdate:openeds": N[1] || (N[1] = (A) => V.value = A),
|
|
461
461
|
mode: "vertical",
|
|
462
462
|
collapse: f.value,
|
|
463
463
|
"collapse-transition": !1,
|
|
@@ -468,8 +468,8 @@ const ue = Ne("menu", () => {
|
|
|
468
468
|
onSelect: q
|
|
469
469
|
}, {
|
|
470
470
|
default: M(() => [
|
|
471
|
-
(s(!0), c(K, null, G(
|
|
472
|
-
key:
|
|
471
|
+
(s(!0), c(K, null, G(m.value, (A) => (s(), O(Rt, {
|
|
472
|
+
key: u(A),
|
|
473
473
|
menu: A
|
|
474
474
|
}, null, 8, ["menu"]))), 128))
|
|
475
475
|
]),
|
|
@@ -477,15 +477,15 @@ const ue = Ne("menu", () => {
|
|
|
477
477
|
}, 8, ["modelValue", "openeds", "collapse", "background-color", "text-color", "active-text-color"]),
|
|
478
478
|
r.showUser && !f.value ? (s(), c("div", jt, [
|
|
479
479
|
e("div", Wt, [
|
|
480
|
-
e("span", qt,
|
|
481
|
-
e("span", Ht,
|
|
480
|
+
e("span", qt, b(a(i).userName), 1),
|
|
481
|
+
e("span", Ht, b(a(i).departmentName), 1)
|
|
482
482
|
]),
|
|
483
|
-
y(
|
|
483
|
+
y(a(we), {
|
|
484
484
|
type: "text",
|
|
485
485
|
size: "small",
|
|
486
486
|
onClick: ee
|
|
487
487
|
}, {
|
|
488
|
-
default: M(() => [...
|
|
488
|
+
default: M(() => [...N[2] || (N[2] = [
|
|
489
489
|
he("退出", -1)
|
|
490
490
|
])]),
|
|
491
491
|
_: 1
|
|
@@ -517,10 +517,10 @@ const ue = Ne("menu", () => {
|
|
|
517
517
|
}, rs = {
|
|
518
518
|
key: 1,
|
|
519
519
|
class: "header__search-empty"
|
|
520
|
-
}, is = ["title"], cs = { class: "header__avatar" },
|
|
520
|
+
}, is = ["title"], cs = { class: "header__avatar" }, us = { class: "header__user-name" }, ds = {
|
|
521
521
|
key: 0,
|
|
522
522
|
class: "header__dropdown"
|
|
523
|
-
}, ms = { class: "header__dropdown-header" }, ps = { class: "header__dropdown-avatar" }, vs = { class: "header__dropdown-info" }, hs = { class: "header__dropdown-name" }, _s = { class: "header__dropdown-role" }, fs = { class: "header__dropdown-menu" }, gs = { class: "settings-drawer" }, ys = { class: "settings-section" },
|
|
523
|
+
}, ms = { class: "header__dropdown-header" }, ps = { class: "header__dropdown-avatar" }, vs = { class: "header__dropdown-info" }, hs = { class: "header__dropdown-name" }, _s = { class: "header__dropdown-role" }, fs = { class: "header__dropdown-menu" }, gs = { class: "settings-drawer" }, ys = { class: "settings-section" }, ks = { class: "settings-layout-options" }, ws = ["onClick"], bs = { class: "layout-option__preview" }, xs = {
|
|
524
524
|
key: 0,
|
|
525
525
|
class: "layout-preview-sidebar"
|
|
526
526
|
}, Cs = {
|
|
@@ -529,10 +529,10 @@ const ue = Ne("menu", () => {
|
|
|
529
529
|
}, $s = {
|
|
530
530
|
key: 2,
|
|
531
531
|
class: "layout-preview-mix"
|
|
532
|
-
}, Ls = { class: "layout-option__label" }, Ms = { class: "settings-section" }, Ss = { class: "settings-color-options" },
|
|
532
|
+
}, Ls = { class: "layout-option__label" }, Ms = { class: "settings-section" }, Ss = { class: "settings-color-options" }, Ns = ["title", "onClick"], Is = { class: "settings-section" }, zs = { class: "settings-switch-list" }, Us = { class: "settings-switch-item" }, Ts = { class: "settings-switch-item" }, Es = /* @__PURE__ */ ae({
|
|
533
533
|
__name: "Header",
|
|
534
534
|
setup(t) {
|
|
535
|
-
const r =
|
|
535
|
+
const r = be(), d = me(), n = ue(), o = le(), i = ze(), h = de(), v = g(!1), m = g(!1), f = g(null), _ = g(!1), u = g(!1), $ = g(""), j = g(null), D = g(!1), W = [
|
|
536
536
|
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
537
537
|
{ value: "top", label: "顶部菜单", icon: "menu" },
|
|
538
538
|
{ value: "mix", label: "混合菜单", icon: "grid" }
|
|
@@ -548,8 +548,8 @@ const ue = Ne("menu", () => {
|
|
|
548
548
|
path: k.path
|
|
549
549
|
}))), H = (T, k = "") => {
|
|
550
550
|
const Q = [];
|
|
551
|
-
return T.forEach((
|
|
552
|
-
|
|
551
|
+
return T.forEach((x) => {
|
|
552
|
+
x.children && x.children.length > 0 ? Q.push(...H(x.children, x.menuName)) : Q.push({ ...x, parentTitle: k, title: x.menuName, path: x.menuUrl });
|
|
553
553
|
}), Q;
|
|
554
554
|
}, Z = /* @__PURE__ */ new Set([
|
|
555
555
|
"arrow-up",
|
|
@@ -690,51 +690,51 @@ const ue = Ne("menu", () => {
|
|
|
690
690
|
list: "list",
|
|
691
691
|
grid: "grid"
|
|
692
692
|
}[T] || T;
|
|
693
|
-
}, q = (T) => T ? T.charAt(0) : "", ee = (T) => Z.has(T), E = w(() =>
|
|
694
|
-
(k) => k.title.toLowerCase().includes(
|
|
695
|
-
) : []),
|
|
696
|
-
|
|
693
|
+
}, q = (T) => T ? T.charAt(0) : "", ee = (T) => Z.has(T), E = w(() => $.value.trim() ? H(h.menuList).filter(
|
|
694
|
+
(k) => k.title.toLowerCase().includes($.value.toLowerCase())
|
|
695
|
+
) : []), N = w(() => n.layout), A = () => {
|
|
696
|
+
n.toggleCollapse();
|
|
697
697
|
}, X = () => {
|
|
698
|
-
|
|
698
|
+
n.toggleTheme();
|
|
699
699
|
}, F = () => {
|
|
700
|
-
|
|
700
|
+
m.value = !0;
|
|
701
701
|
}, se = (T) => {
|
|
702
|
-
|
|
702
|
+
n.setLayout(T), m.value = !1;
|
|
703
703
|
}, ie = (T) => {
|
|
704
704
|
D.value = T;
|
|
705
705
|
const k = document.documentElement;
|
|
706
706
|
T ? k.classList.add("grey-mode") : k.classList.remove("grey-mode");
|
|
707
707
|
}, pe = () => {
|
|
708
|
-
ie(!D.value),
|
|
708
|
+
ie(!D.value), m.value = !1;
|
|
709
709
|
}, z = () => {
|
|
710
|
-
|
|
710
|
+
n.toggleTheme(), m.value = !1;
|
|
711
711
|
}, oe = () => {
|
|
712
712
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
713
713
|
}, _e = () => {
|
|
714
714
|
_.value = !!document.fullscreenElement;
|
|
715
715
|
}, ce = () => {
|
|
716
|
-
|
|
716
|
+
v.value = !v.value;
|
|
717
717
|
}, ne = () => {
|
|
718
|
-
|
|
718
|
+
v.value = !1;
|
|
719
719
|
}, ve = () => {
|
|
720
|
-
|
|
720
|
+
u.value = !1, $.value = "";
|
|
721
721
|
}, xe = (T) => {
|
|
722
722
|
d.push(T), ve();
|
|
723
723
|
}, Ce = (T) => {
|
|
724
|
-
|
|
724
|
+
n.setPrimaryColor(T), m.value = !1;
|
|
725
725
|
}, $e = () => {
|
|
726
726
|
ne(), d.push("/profile");
|
|
727
727
|
}, Le = () => {
|
|
728
728
|
ne(), d.push("/change-password");
|
|
729
729
|
}, Me = () => {
|
|
730
|
-
ne(), i.logout(), o.clearUserInfo(),
|
|
730
|
+
ne(), i.logout(), o.clearUserInfo(), h.clearMenu(), d.push(n.loginPath);
|
|
731
731
|
}, fe = (T) => {
|
|
732
732
|
f.value && !f.value.contains(T.target) && ne(), j.value && !j.value.contains(T.target) && ve();
|
|
733
733
|
}, ge = (T) => {
|
|
734
734
|
T.key === "Escape" && (ve(), ne());
|
|
735
735
|
};
|
|
736
736
|
return Ke(() => {
|
|
737
|
-
document.addEventListener("click", fe), document.addEventListener("fullscreenchange", _e), document.addEventListener("keydown", ge),
|
|
737
|
+
document.addEventListener("click", fe), document.addEventListener("fullscreenchange", _e), document.addEventListener("keydown", ge), n.initTheme(), D.value = document.documentElement.classList.contains("grey-mode");
|
|
738
738
|
}), je(() => {
|
|
739
739
|
document.removeEventListener("click", fe), document.removeEventListener("fullscreenchange", _e), document.removeEventListener("keydown", ge);
|
|
740
740
|
}), (T, k) => {
|
|
@@ -745,19 +745,19 @@ const ue = Ne("menu", () => {
|
|
|
745
745
|
class: "header__collapse",
|
|
746
746
|
onClick: A
|
|
747
747
|
}, [
|
|
748
|
-
y(
|
|
749
|
-
name: n
|
|
748
|
+
y(a(U), {
|
|
749
|
+
name: a(n).isCollapsed ? "menu-unfold" : "menu-fold",
|
|
750
750
|
size: 18
|
|
751
751
|
}, null, 8, ["name"])
|
|
752
752
|
]),
|
|
753
|
-
n
|
|
754
|
-
(s(!0), c(K, null, G(B.value, (
|
|
755
|
-
key:
|
|
753
|
+
a(n).showBreadcrumb ? (s(), c("div", Jt, [
|
|
754
|
+
(s(!0), c(K, null, G(B.value, (x, S) => (s(), c("span", {
|
|
755
|
+
key: x.path
|
|
756
756
|
}, [
|
|
757
757
|
S > 0 ? (s(), c("span", Zt, "/")) : P("", !0),
|
|
758
758
|
e("span", {
|
|
759
759
|
class: J({ "is-current": S === B.value.length - 1 })
|
|
760
|
-
}, x
|
|
760
|
+
}, b(x.title), 3)
|
|
761
761
|
]))), 128))
|
|
762
762
|
])) : P("", !0)
|
|
763
763
|
]),
|
|
@@ -767,38 +767,38 @@ const ue = Ne("menu", () => {
|
|
|
767
767
|
ref_key: "searchRef",
|
|
768
768
|
ref: j
|
|
769
769
|
}, [
|
|
770
|
-
y(
|
|
770
|
+
y(a(U), {
|
|
771
771
|
name: "search",
|
|
772
772
|
size: 14,
|
|
773
773
|
class: "header__search-icon"
|
|
774
774
|
}),
|
|
775
775
|
Te(e("input", {
|
|
776
|
-
"onUpdate:modelValue": k[0] || (k[0] = (
|
|
776
|
+
"onUpdate:modelValue": k[0] || (k[0] = (x) => $.value = x),
|
|
777
777
|
type: "text",
|
|
778
778
|
class: "header__search-input",
|
|
779
779
|
placeholder: "搜索菜单...",
|
|
780
|
-
onFocus: k[1] || (k[1] = (
|
|
780
|
+
onFocus: k[1] || (k[1] = (x) => u.value = !0)
|
|
781
781
|
}, null, 544), [
|
|
782
|
-
[We,
|
|
782
|
+
[We, $.value]
|
|
783
783
|
]),
|
|
784
|
-
y(
|
|
784
|
+
y(ke, { name: "search-dropdown" }, {
|
|
785
785
|
default: M(() => [
|
|
786
|
-
|
|
786
|
+
u.value && (E.value.length > 0 || $.value) ? (s(), c("div", es, [
|
|
787
787
|
E.value.length > 0 ? (s(), c("div", ts, [
|
|
788
|
-
(s(!0), c(K, null, G(E.value, (
|
|
789
|
-
key:
|
|
788
|
+
(s(!0), c(K, null, G(E.value, (x) => (s(), c("div", {
|
|
789
|
+
key: x.path,
|
|
790
790
|
class: "header__search-item",
|
|
791
|
-
onClick: (S) => xe(
|
|
791
|
+
onClick: (S) => xe(x.path)
|
|
792
792
|
}, [
|
|
793
|
-
|
|
794
|
-
ee(Y(
|
|
793
|
+
x.title !== "首页" ? (s(), c("span", os, [
|
|
794
|
+
ee(Y(x.icon)) ? (s(), O(a(U), {
|
|
795
795
|
key: 0,
|
|
796
|
-
name: Y(
|
|
796
|
+
name: Y(x.icon),
|
|
797
797
|
size: 16
|
|
798
|
-
}, null, 8, ["name"])) : (s(), c("span", ns,
|
|
798
|
+
}, null, 8, ["name"])) : (s(), c("span", ns, b(q(x.title)), 1))
|
|
799
799
|
])) : P("", !0),
|
|
800
|
-
e("span", as, x
|
|
801
|
-
|
|
800
|
+
e("span", as, b(x.title), 1),
|
|
801
|
+
x.parentTitle ? (s(), c("span", ls, b(x.parentTitle), 1)) : P("", !0)
|
|
802
802
|
], 8, ss))), 128))
|
|
803
803
|
])) : (s(), c("div", rs, " 未找到匹配的菜单 "))
|
|
804
804
|
])) : P("", !0)
|
|
@@ -811,7 +811,7 @@ const ue = Ne("menu", () => {
|
|
|
811
811
|
onClick: oe,
|
|
812
812
|
title: _.value ? "退出全屏" : "全屏"
|
|
813
813
|
}, [
|
|
814
|
-
y(
|
|
814
|
+
y(a(U), {
|
|
815
815
|
name: _.value ? "fullscreen-exit" : "fullscreen",
|
|
816
816
|
size: 16
|
|
817
817
|
}, null, 8, ["name"])
|
|
@@ -821,7 +821,7 @@ const ue = Ne("menu", () => {
|
|
|
821
821
|
onClick: F,
|
|
822
822
|
title: "换肤设置"
|
|
823
823
|
}, [
|
|
824
|
-
y(
|
|
824
|
+
y(a(U), {
|
|
825
825
|
name: "skin",
|
|
826
826
|
size: 16
|
|
827
827
|
})
|
|
@@ -831,8 +831,8 @@ const ue = Ne("menu", () => {
|
|
|
831
831
|
onClick: X,
|
|
832
832
|
title: "切换主题"
|
|
833
833
|
}, [
|
|
834
|
-
y(
|
|
835
|
-
name: n
|
|
834
|
+
y(a(U), {
|
|
835
|
+
name: a(n).isDark ? "sun" : "moon",
|
|
836
836
|
size: 16
|
|
837
837
|
}, null, 8, ["name"])
|
|
838
838
|
]),
|
|
@@ -846,25 +846,25 @@ const ue = Ne("menu", () => {
|
|
|
846
846
|
onClick: Ee(ce, ["stop"])
|
|
847
847
|
}, [
|
|
848
848
|
e("div", cs, [
|
|
849
|
-
e("span", null,
|
|
849
|
+
e("span", null, b(((Q = a(o).userName) == null ? void 0 : Q.charAt(0)) || "U"), 1)
|
|
850
850
|
]),
|
|
851
|
-
e("span",
|
|
851
|
+
e("span", us, b(a(o).userName), 1),
|
|
852
852
|
e("span", {
|
|
853
|
-
class: J(["header__user-arrow", { "is-active":
|
|
853
|
+
class: J(["header__user-arrow", { "is-active": v.value }])
|
|
854
854
|
}, "▼", 2)
|
|
855
855
|
]),
|
|
856
|
-
y(
|
|
856
|
+
y(ke, { name: "dropdown" }, {
|
|
857
857
|
default: M(() => {
|
|
858
|
-
var
|
|
858
|
+
var x;
|
|
859
859
|
return [
|
|
860
|
-
|
|
860
|
+
v.value ? (s(), c("div", ds, [
|
|
861
861
|
e("div", ms, [
|
|
862
862
|
e("div", ps, [
|
|
863
|
-
e("span", null,
|
|
863
|
+
e("span", null, b(((x = a(o).userName) == null ? void 0 : x.charAt(0)) || "U"), 1)
|
|
864
864
|
]),
|
|
865
865
|
e("div", vs, [
|
|
866
|
-
e("div", hs,
|
|
867
|
-
e("div", _s,
|
|
866
|
+
e("div", hs, b(a(o).userName), 1),
|
|
867
|
+
e("div", _s, b(a(o).departmentName), 1)
|
|
868
868
|
])
|
|
869
869
|
]),
|
|
870
870
|
k[7] || (k[7] = e("div", { class: "header__dropdown-divider" }, null, -1)),
|
|
@@ -873,7 +873,7 @@ const ue = Ne("menu", () => {
|
|
|
873
873
|
class: "header__dropdown-item",
|
|
874
874
|
onClick: $e
|
|
875
875
|
}, [
|
|
876
|
-
y(
|
|
876
|
+
y(a(U), {
|
|
877
877
|
name: "user",
|
|
878
878
|
size: 16
|
|
879
879
|
}),
|
|
@@ -883,7 +883,7 @@ const ue = Ne("menu", () => {
|
|
|
883
883
|
class: "header__dropdown-item",
|
|
884
884
|
onClick: Le
|
|
885
885
|
}, [
|
|
886
|
-
y(
|
|
886
|
+
y(a(U), {
|
|
887
887
|
name: "lock",
|
|
888
888
|
size: 16
|
|
889
889
|
}),
|
|
@@ -894,7 +894,7 @@ const ue = Ne("menu", () => {
|
|
|
894
894
|
class: "header__dropdown-item header__dropdown-item--danger",
|
|
895
895
|
onClick: Me
|
|
896
896
|
}, [
|
|
897
|
-
y(
|
|
897
|
+
y(a(U), {
|
|
898
898
|
name: "logout",
|
|
899
899
|
size: 16
|
|
900
900
|
}),
|
|
@@ -908,9 +908,9 @@ const ue = Ne("menu", () => {
|
|
|
908
908
|
})
|
|
909
909
|
], 512)
|
|
910
910
|
]),
|
|
911
|
-
y(
|
|
912
|
-
modelValue:
|
|
913
|
-
"onUpdate:modelValue": k[2] || (k[2] = (
|
|
911
|
+
y(a(Ge), {
|
|
912
|
+
modelValue: m.value,
|
|
913
|
+
"onUpdate:modelValue": k[2] || (k[2] = (x) => m.value = x),
|
|
914
914
|
title: "换肤设置",
|
|
915
915
|
direction: "rtl",
|
|
916
916
|
size: "320px"
|
|
@@ -919,20 +919,20 @@ const ue = Ne("menu", () => {
|
|
|
919
919
|
e("div", gs, [
|
|
920
920
|
e("div", ys, [
|
|
921
921
|
k[11] || (k[11] = e("div", { class: "settings-title" }, "布局模式", -1)),
|
|
922
|
-
e("div",
|
|
923
|
-
(s(), c(K, null, G(W, (
|
|
924
|
-
key:
|
|
925
|
-
class: J(["layout-option", { "is-active":
|
|
926
|
-
onClick: (S) => se(
|
|
922
|
+
e("div", ks, [
|
|
923
|
+
(s(), c(K, null, G(W, (x) => e("div", {
|
|
924
|
+
key: x.value,
|
|
925
|
+
class: J(["layout-option", { "is-active": N.value === x.value }]),
|
|
926
|
+
onClick: (S) => se(x.value)
|
|
927
927
|
}, [
|
|
928
|
-
e("div",
|
|
929
|
-
|
|
928
|
+
e("div", bs, [
|
|
929
|
+
x.value === "sidebar" ? (s(), c("div", xs, [...k[8] || (k[8] = [
|
|
930
930
|
e("div", { class: "preview-aside" }, null, -1),
|
|
931
931
|
e("div", { class: "preview-main" }, [
|
|
932
932
|
e("div", { class: "preview-header" }),
|
|
933
933
|
e("div", { class: "preview-content" })
|
|
934
934
|
], -1)
|
|
935
|
-
])])) :
|
|
935
|
+
])])) : x.value === "top" ? (s(), c("div", Cs, [...k[9] || (k[9] = [
|
|
936
936
|
e("div", { class: "preview-header-full" }, null, -1),
|
|
937
937
|
e("div", { class: "preview-content-full" }, null, -1)
|
|
938
938
|
])])) : (s(), c("div", $s, [...k[10] || (k[10] = [
|
|
@@ -945,30 +945,30 @@ const ue = Ne("menu", () => {
|
|
|
945
945
|
], -1)
|
|
946
946
|
])]))
|
|
947
947
|
]),
|
|
948
|
-
e("span", Ls, x
|
|
949
|
-
], 10,
|
|
948
|
+
e("span", Ls, b(x.label), 1)
|
|
949
|
+
], 10, ws)), 64))
|
|
950
950
|
])
|
|
951
951
|
]),
|
|
952
952
|
e("div", Ms, [
|
|
953
953
|
k[12] || (k[12] = e("div", { class: "settings-title" }, "主题色", -1)),
|
|
954
954
|
e("div", Ss, [
|
|
955
|
-
(s(), c(K, null, G(V, (
|
|
956
|
-
key:
|
|
957
|
-
class: J(["color-option", { "is-active": n
|
|
958
|
-
style:
|
|
959
|
-
title:
|
|
960
|
-
onClick: (S) => Ce(
|
|
955
|
+
(s(), c(K, null, G(V, (x) => e("div", {
|
|
956
|
+
key: x.value,
|
|
957
|
+
class: J(["color-option", { "is-active": a(n).primaryColor === x.value }]),
|
|
958
|
+
style: Ne({ backgroundColor: x.value }),
|
|
959
|
+
title: x.label,
|
|
960
|
+
onClick: (S) => Ce(x.value)
|
|
961
961
|
}, [
|
|
962
|
-
n
|
|
962
|
+
a(n).primaryColor === x.value ? (s(), O(a(U), {
|
|
963
963
|
key: 0,
|
|
964
964
|
name: "check",
|
|
965
965
|
size: 12,
|
|
966
966
|
color: "#fff"
|
|
967
967
|
})) : P("", !0)
|
|
968
|
-
], 14,
|
|
968
|
+
], 14, Ns)), 64))
|
|
969
969
|
])
|
|
970
970
|
]),
|
|
971
|
-
e("div",
|
|
971
|
+
e("div", Is, [
|
|
972
972
|
k[17] || (k[17] = e("div", { class: "settings-title" }, "功能设置", -1)),
|
|
973
973
|
e("div", zs, [
|
|
974
974
|
e("div", Us, [
|
|
@@ -983,7 +983,7 @@ const ue = Ne("menu", () => {
|
|
|
983
983
|
e("div", Ts, [
|
|
984
984
|
k[16] || (k[16] = e("span", null, "暗黑模式", -1)),
|
|
985
985
|
e("div", {
|
|
986
|
-
class: J(["switch-wrapper", { "is-checked": n
|
|
986
|
+
class: J(["switch-wrapper", { "is-checked": a(n).isDark }]),
|
|
987
987
|
onClick: z
|
|
988
988
|
}, [...k[15] || (k[15] = [
|
|
989
989
|
e("span", { class: "switch-core" }, null, -1)
|
|
@@ -1040,7 +1040,7 @@ const ue = Ne("menu", () => {
|
|
|
1040
1040
|
}, _o = ["title"], fo = { class: "top-menu__avatar" }, go = { class: "top-menu__user-name" }, yo = {
|
|
1041
1041
|
key: 0,
|
|
1042
1042
|
class: "top-menu__dropdown"
|
|
1043
|
-
},
|
|
1043
|
+
}, ko = { class: "top-menu__dropdown-header" }, wo = { class: "top-menu__dropdown-avatar" }, bo = { class: "top-menu__dropdown-info" }, xo = { class: "top-menu__dropdown-name" }, Co = { class: "top-menu__dropdown-role" }, $o = { class: "top-menu__dropdown-menu" }, Lo = { class: "settings-drawer" }, Mo = { class: "settings-section" }, So = { class: "settings-layout-options" }, No = ["onClick"], Io = { class: "layout-option__preview" }, zo = {
|
|
1044
1044
|
key: 0,
|
|
1045
1045
|
class: "layout-preview-sidebar"
|
|
1046
1046
|
}, Uo = {
|
|
@@ -1055,15 +1055,15 @@ const ue = Ne("menu", () => {
|
|
|
1055
1055
|
logoSrc: { default: "/vite.svg" }
|
|
1056
1056
|
},
|
|
1057
1057
|
setup(t) {
|
|
1058
|
-
const r = t, d =
|
|
1058
|
+
const r = t, d = be(), n = me(), o = de(), i = ue(), h = le(), v = ze(), m = w(() => d.path), f = (S, L = "") => {
|
|
1059
1059
|
const te = [];
|
|
1060
|
-
return S.forEach((
|
|
1061
|
-
|
|
1060
|
+
return S.forEach((l) => {
|
|
1061
|
+
l.children && l.children.length > 0 ? te.push(...f(l.children, l.menuName)) : te.push({ ...l, parentTitle: L, title: l.menuName, path: l.menuUrl });
|
|
1062
1062
|
}), te;
|
|
1063
1063
|
}, _ = w(() => Y.value.trim() ? f(o.menuList).filter(
|
|
1064
1064
|
(L) => L.title.toLowerCase().includes(Y.value.toLowerCase())
|
|
1065
|
-
) : []),
|
|
1066
|
-
S && S !== d.path &&
|
|
1065
|
+
) : []), u = w(() => i.isDark ? "#1d1e1f" : "#fff"), $ = w(() => i.isDark ? "#cfd3dc" : "#303133"), j = w(() => "#409eff"), D = g(!1), W = g(null), V = g(!1), B = g(!1), H = g(!1), Z = g(!1), Y = g(""), q = g(null), ee = (S) => {
|
|
1066
|
+
S && S !== d.path && n.push(S);
|
|
1067
1067
|
}, E = /* @__PURE__ */ new Set([
|
|
1068
1068
|
"arrow-up",
|
|
1069
1069
|
"arrow-down",
|
|
@@ -1166,7 +1166,7 @@ const ue = Ne("menu", () => {
|
|
|
1166
1166
|
"sun",
|
|
1167
1167
|
"theme",
|
|
1168
1168
|
"skin"
|
|
1169
|
-
]),
|
|
1169
|
+
]), N = (S) => {
|
|
1170
1170
|
if (!S || S === "") return "";
|
|
1171
1171
|
if (S.startsWith("tineco-icon-")) {
|
|
1172
1172
|
const te = S.replace("tineco-icon-", "");
|
|
@@ -1216,7 +1216,7 @@ const ue = Ne("menu", () => {
|
|
|
1216
1216
|
}, oe = () => {
|
|
1217
1217
|
Z.value = !1, Y.value = "";
|
|
1218
1218
|
}, _e = (S) => {
|
|
1219
|
-
|
|
1219
|
+
n.push(S), oe();
|
|
1220
1220
|
}, ce = () => {
|
|
1221
1221
|
B.value = !0;
|
|
1222
1222
|
}, ne = (S) => {
|
|
@@ -1243,20 +1243,20 @@ const ue = Ne("menu", () => {
|
|
|
1243
1243
|
], fe = (S) => {
|
|
1244
1244
|
i.setPrimaryColor(S), B.value = !1;
|
|
1245
1245
|
}, ge = () => {
|
|
1246
|
-
z(),
|
|
1246
|
+
z(), n.push("/profile");
|
|
1247
1247
|
}, T = () => {
|
|
1248
|
-
z(),
|
|
1248
|
+
z(), n.push("/change-password");
|
|
1249
1249
|
}, k = () => {
|
|
1250
|
-
z(),
|
|
1250
|
+
z(), v.logout(), h.clearUserInfo(), o.clearMenu(), n.push(i.loginPath);
|
|
1251
1251
|
}, Q = (S) => {
|
|
1252
1252
|
W.value && !W.value.contains(S.target) && z(), q.value && !q.value.contains(S.target) && oe();
|
|
1253
|
-
},
|
|
1253
|
+
}, x = (S) => {
|
|
1254
1254
|
S.key === "Escape" && (oe(), z());
|
|
1255
1255
|
};
|
|
1256
1256
|
return Ke(() => {
|
|
1257
|
-
document.addEventListener("click", Q), document.addEventListener("fullscreenchange", ie), document.addEventListener("keydown",
|
|
1257
|
+
document.addEventListener("click", Q), document.addEventListener("fullscreenchange", ie), document.addEventListener("keydown", x), H.value = document.documentElement.classList.contains("grey-mode");
|
|
1258
1258
|
}), je(() => {
|
|
1259
|
-
document.removeEventListener("click", Q), document.removeEventListener("fullscreenchange", ie), document.removeEventListener("keydown",
|
|
1259
|
+
document.removeEventListener("click", Q), document.removeEventListener("fullscreenchange", ie), document.removeEventListener("keydown", x);
|
|
1260
1260
|
}), (S, L) => {
|
|
1261
1261
|
var te;
|
|
1262
1262
|
return s(), c("div", As, [
|
|
@@ -1266,92 +1266,92 @@ const ue = Ne("menu", () => {
|
|
|
1266
1266
|
alt: "Logo",
|
|
1267
1267
|
class: "top-menu__logo-img"
|
|
1268
1268
|
}, null, 8, Vs),
|
|
1269
|
-
e("span", Os,
|
|
1269
|
+
e("span", Os, b(a(i).appName), 1)
|
|
1270
1270
|
]),
|
|
1271
|
-
y(
|
|
1272
|
-
"model-value":
|
|
1271
|
+
y(a(Xe), {
|
|
1272
|
+
"model-value": m.value,
|
|
1273
1273
|
mode: "horizontal",
|
|
1274
|
-
"background-color":
|
|
1275
|
-
"text-color":
|
|
1274
|
+
"background-color": u.value,
|
|
1275
|
+
"text-color": $.value,
|
|
1276
1276
|
"active-text-color": j.value,
|
|
1277
1277
|
class: "top-menu__menu",
|
|
1278
1278
|
onSelect: ee
|
|
1279
1279
|
}, {
|
|
1280
1280
|
default: M(() => [
|
|
1281
|
-
(s(!0), c(K, null, G(
|
|
1282
|
-
key:
|
|
1281
|
+
(s(!0), c(K, null, G(a(o).menuList, (l) => (s(), c(K, {
|
|
1282
|
+
key: l.menuUrl
|
|
1283
1283
|
}, [
|
|
1284
|
-
|
|
1284
|
+
l.children && l.children.length > 0 ? (s(), O(a(Re), {
|
|
1285
1285
|
key: 0,
|
|
1286
|
-
index:
|
|
1286
|
+
index: l.menuUrl
|
|
1287
1287
|
}, {
|
|
1288
1288
|
title: M(() => [
|
|
1289
1289
|
e("span", Bs, [
|
|
1290
|
-
|
|
1291
|
-
X(
|
|
1290
|
+
l.menuName !== "首页" ? (s(), c("span", Rs, [
|
|
1291
|
+
X(N(l.icon)) ? (s(), O(a(U), {
|
|
1292
1292
|
key: 0,
|
|
1293
|
-
name:
|
|
1293
|
+
name: N(l.icon),
|
|
1294
1294
|
size: 16
|
|
1295
|
-
}, null, 8, ["name"])) : (s(), c("span", Fs,
|
|
1295
|
+
}, null, 8, ["name"])) : (s(), c("span", Fs, b(A(l.menuName)), 1))
|
|
1296
1296
|
])) : P("", !0),
|
|
1297
|
-
e("span", Ks,
|
|
1297
|
+
e("span", Ks, b(l.menuName), 1)
|
|
1298
1298
|
])
|
|
1299
1299
|
]),
|
|
1300
1300
|
default: M(() => [
|
|
1301
|
-
(s(!0), c(K, null, G(
|
|
1301
|
+
(s(!0), c(K, null, G(l.children, (p) => (s(), c(K, {
|
|
1302
1302
|
key: p.menuUrl
|
|
1303
1303
|
}, [
|
|
1304
|
-
p.children && p.children.length > 0 ? (s(), O(
|
|
1304
|
+
p.children && p.children.length > 0 ? (s(), O(a(Re), {
|
|
1305
1305
|
key: 0,
|
|
1306
1306
|
index: p.menuUrl
|
|
1307
1307
|
}, {
|
|
1308
1308
|
title: M(() => [
|
|
1309
1309
|
e("span", js, [
|
|
1310
1310
|
e("span", Ws, [
|
|
1311
|
-
X(
|
|
1311
|
+
X(N(p.icon)) ? (s(), O(a(U), {
|
|
1312
1312
|
key: 0,
|
|
1313
|
-
name:
|
|
1313
|
+
name: N(p.icon),
|
|
1314
1314
|
size: 16
|
|
1315
|
-
}, null, 8, ["name"])) : (s(), c("span", qs,
|
|
1315
|
+
}, null, 8, ["name"])) : (s(), c("span", qs, b(A(p.menuName)), 1))
|
|
1316
1316
|
]),
|
|
1317
|
-
e("span", Hs,
|
|
1317
|
+
e("span", Hs, b(p.menuName), 1)
|
|
1318
1318
|
])
|
|
1319
1319
|
]),
|
|
1320
1320
|
default: M(() => [
|
|
1321
|
-
(s(!0), c(K, null, G(p.children, (R) => (s(), O(
|
|
1321
|
+
(s(!0), c(K, null, G(p.children, (R) => (s(), O(a(Se), {
|
|
1322
1322
|
key: R.menuUrl,
|
|
1323
1323
|
index: R.menuUrl
|
|
1324
1324
|
}, {
|
|
1325
1325
|
default: M(() => [
|
|
1326
1326
|
e("span", Ys, [
|
|
1327
1327
|
e("span", Xs, [
|
|
1328
|
-
X(
|
|
1328
|
+
X(N(R.icon)) ? (s(), O(a(U), {
|
|
1329
1329
|
key: 0,
|
|
1330
|
-
name:
|
|
1330
|
+
name: N(R.icon),
|
|
1331
1331
|
size: 16
|
|
1332
|
-
}, null, 8, ["name"])) : (s(), c("span", Gs,
|
|
1332
|
+
}, null, 8, ["name"])) : (s(), c("span", Gs, b(A(R.menuName)), 1))
|
|
1333
1333
|
]),
|
|
1334
|
-
e("span", Js,
|
|
1334
|
+
e("span", Js, b(R.menuName), 1)
|
|
1335
1335
|
])
|
|
1336
1336
|
]),
|
|
1337
1337
|
_: 2
|
|
1338
1338
|
}, 1032, ["index"]))), 128))
|
|
1339
1339
|
]),
|
|
1340
1340
|
_: 2
|
|
1341
|
-
}, 1032, ["index"])) : (s(), O(
|
|
1341
|
+
}, 1032, ["index"])) : (s(), O(a(Se), {
|
|
1342
1342
|
key: 1,
|
|
1343
1343
|
index: p.menuUrl
|
|
1344
1344
|
}, {
|
|
1345
1345
|
default: M(() => [
|
|
1346
1346
|
e("span", Zs, [
|
|
1347
1347
|
e("span", Qs, [
|
|
1348
|
-
X(
|
|
1348
|
+
X(N(p.icon)) ? (s(), O(a(U), {
|
|
1349
1349
|
key: 0,
|
|
1350
|
-
name:
|
|
1350
|
+
name: N(p.icon),
|
|
1351
1351
|
size: 16
|
|
1352
|
-
}, null, 8, ["name"])) : (s(), c("span", eo,
|
|
1352
|
+
}, null, 8, ["name"])) : (s(), c("span", eo, b(A(p.menuName)), 1))
|
|
1353
1353
|
]),
|
|
1354
|
-
e("span", to,
|
|
1354
|
+
e("span", to, b(p.menuName), 1)
|
|
1355
1355
|
])
|
|
1356
1356
|
]),
|
|
1357
1357
|
_: 2
|
|
@@ -1359,20 +1359,20 @@ const ue = Ne("menu", () => {
|
|
|
1359
1359
|
], 64))), 128))
|
|
1360
1360
|
]),
|
|
1361
1361
|
_: 2
|
|
1362
|
-
}, 1032, ["index"])) : (s(), O(
|
|
1362
|
+
}, 1032, ["index"])) : (s(), O(a(Se), {
|
|
1363
1363
|
key: 1,
|
|
1364
|
-
index:
|
|
1364
|
+
index: l.menuUrl
|
|
1365
1365
|
}, {
|
|
1366
1366
|
default: M(() => [
|
|
1367
1367
|
e("span", so, [
|
|
1368
|
-
|
|
1369
|
-
X(
|
|
1368
|
+
l.menuName !== "首页" ? (s(), c("span", oo, [
|
|
1369
|
+
X(N(l.icon)) ? (s(), O(a(U), {
|
|
1370
1370
|
key: 0,
|
|
1371
|
-
name:
|
|
1371
|
+
name: N(l.icon),
|
|
1372
1372
|
size: 16
|
|
1373
|
-
}, null, 8, ["name"])) : (s(), c("span", no,
|
|
1373
|
+
}, null, 8, ["name"])) : (s(), c("span", no, b(A(l.menuName)), 1))
|
|
1374
1374
|
])) : P("", !0),
|
|
1375
|
-
e("span", ao,
|
|
1375
|
+
e("span", ao, b(l.menuName), 1)
|
|
1376
1376
|
])
|
|
1377
1377
|
]),
|
|
1378
1378
|
_: 2
|
|
@@ -1387,38 +1387,38 @@ const ue = Ne("menu", () => {
|
|
|
1387
1387
|
ref_key: "searchRef",
|
|
1388
1388
|
ref: q
|
|
1389
1389
|
}, [
|
|
1390
|
-
y(
|
|
1390
|
+
y(a(U), {
|
|
1391
1391
|
name: "search",
|
|
1392
1392
|
size: 14,
|
|
1393
1393
|
class: "top-menu__search-icon"
|
|
1394
1394
|
}),
|
|
1395
1395
|
Te(e("input", {
|
|
1396
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
1396
|
+
"onUpdate:modelValue": L[0] || (L[0] = (l) => Y.value = l),
|
|
1397
1397
|
type: "text",
|
|
1398
1398
|
class: "top-menu__search-input",
|
|
1399
1399
|
placeholder: "搜索菜单...",
|
|
1400
|
-
onFocus: L[1] || (L[1] = (
|
|
1400
|
+
onFocus: L[1] || (L[1] = (l) => Z.value = !0)
|
|
1401
1401
|
}, null, 544), [
|
|
1402
1402
|
[We, Y.value]
|
|
1403
1403
|
]),
|
|
1404
|
-
y(
|
|
1404
|
+
y(ke, { name: "search-dropdown" }, {
|
|
1405
1405
|
default: M(() => [
|
|
1406
1406
|
Z.value && (_.value.length > 0 || Y.value) ? (s(), c("div", ro, [
|
|
1407
1407
|
_.value.length > 0 ? (s(), c("div", io, [
|
|
1408
|
-
(s(!0), c(K, null, G(_.value, (
|
|
1409
|
-
key:
|
|
1408
|
+
(s(!0), c(K, null, G(_.value, (l) => (s(), c("div", {
|
|
1409
|
+
key: l.path,
|
|
1410
1410
|
class: "top-menu__search-item",
|
|
1411
|
-
onClick: (p) => _e(
|
|
1411
|
+
onClick: (p) => _e(l.path)
|
|
1412
1412
|
}, [
|
|
1413
|
-
|
|
1414
|
-
X(
|
|
1413
|
+
l.title !== "首页" ? (s(), c("span", uo, [
|
|
1414
|
+
X(N(l.icon)) ? (s(), O(a(U), {
|
|
1415
1415
|
key: 0,
|
|
1416
|
-
name:
|
|
1416
|
+
name: N(l.icon),
|
|
1417
1417
|
size: 16
|
|
1418
|
-
}, null, 8, ["name"])) : (s(), c("span", mo,
|
|
1418
|
+
}, null, 8, ["name"])) : (s(), c("span", mo, b(A(l.title)), 1))
|
|
1419
1419
|
])) : P("", !0),
|
|
1420
|
-
e("span", po,
|
|
1421
|
-
|
|
1420
|
+
e("span", po, b(l.title), 1),
|
|
1421
|
+
l.parentTitle ? (s(), c("span", vo, b(l.parentTitle), 1)) : P("", !0)
|
|
1422
1422
|
], 8, co))), 128))
|
|
1423
1423
|
])) : (s(), c("div", ho, " 未找到匹配的菜单 "))
|
|
1424
1424
|
])) : P("", !0)
|
|
@@ -1431,7 +1431,7 @@ const ue = Ne("menu", () => {
|
|
|
1431
1431
|
onClick: se,
|
|
1432
1432
|
title: V.value ? "退出全屏" : "全屏"
|
|
1433
1433
|
}, [
|
|
1434
|
-
y(
|
|
1434
|
+
y(a(U), {
|
|
1435
1435
|
name: V.value ? "fullscreen-exit" : "fullscreen",
|
|
1436
1436
|
size: 16
|
|
1437
1437
|
}, null, 8, ["name"])
|
|
@@ -1441,7 +1441,7 @@ const ue = Ne("menu", () => {
|
|
|
1441
1441
|
onClick: ce,
|
|
1442
1442
|
title: "换肤设置"
|
|
1443
1443
|
}, [
|
|
1444
|
-
y(
|
|
1444
|
+
y(a(U), {
|
|
1445
1445
|
name: "skin",
|
|
1446
1446
|
size: 16
|
|
1447
1447
|
})
|
|
@@ -1451,8 +1451,8 @@ const ue = Ne("menu", () => {
|
|
|
1451
1451
|
onClick: F,
|
|
1452
1452
|
title: "切换主题"
|
|
1453
1453
|
}, [
|
|
1454
|
-
y(
|
|
1455
|
-
name:
|
|
1454
|
+
y(a(U), {
|
|
1455
|
+
name: a(i).isDark ? "sun" : "moon",
|
|
1456
1456
|
size: 16
|
|
1457
1457
|
}, null, 8, ["name"])
|
|
1458
1458
|
]),
|
|
@@ -1466,25 +1466,25 @@ const ue = Ne("menu", () => {
|
|
|
1466
1466
|
onClick: Ee(pe, ["stop"])
|
|
1467
1467
|
}, [
|
|
1468
1468
|
e("div", fo, [
|
|
1469
|
-
e("span", null,
|
|
1469
|
+
e("span", null, b(((te = a(h).userName) == null ? void 0 : te.charAt(0)) || "U"), 1)
|
|
1470
1470
|
]),
|
|
1471
|
-
e("span", go,
|
|
1471
|
+
e("span", go, b(a(h).userName), 1),
|
|
1472
1472
|
e("span", {
|
|
1473
1473
|
class: J(["top-menu__user-arrow", { "is-active": D.value }])
|
|
1474
1474
|
}, "▼", 2)
|
|
1475
1475
|
]),
|
|
1476
|
-
y(
|
|
1476
|
+
y(ke, { name: "dropdown" }, {
|
|
1477
1477
|
default: M(() => {
|
|
1478
|
-
var
|
|
1478
|
+
var l;
|
|
1479
1479
|
return [
|
|
1480
1480
|
D.value ? (s(), c("div", yo, [
|
|
1481
|
-
e("div",
|
|
1482
|
-
e("div", ko, [
|
|
1483
|
-
e("span", null, x(((a = n(v).userName) == null ? void 0 : a.charAt(0)) || "U"), 1)
|
|
1484
|
-
]),
|
|
1481
|
+
e("div", ko, [
|
|
1485
1482
|
e("div", wo, [
|
|
1486
|
-
e("
|
|
1487
|
-
|
|
1483
|
+
e("span", null, b(((l = a(h).userName) == null ? void 0 : l.charAt(0)) || "U"), 1)
|
|
1484
|
+
]),
|
|
1485
|
+
e("div", bo, [
|
|
1486
|
+
e("div", xo, b(a(h).userName), 1),
|
|
1487
|
+
e("div", Co, b(a(h).departmentName), 1)
|
|
1488
1488
|
])
|
|
1489
1489
|
]),
|
|
1490
1490
|
L[7] || (L[7] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
|
|
@@ -1493,7 +1493,7 @@ const ue = Ne("menu", () => {
|
|
|
1493
1493
|
class: "top-menu__dropdown-item",
|
|
1494
1494
|
onClick: ge
|
|
1495
1495
|
}, [
|
|
1496
|
-
y(
|
|
1496
|
+
y(a(U), {
|
|
1497
1497
|
name: "user",
|
|
1498
1498
|
size: 16
|
|
1499
1499
|
}),
|
|
@@ -1503,7 +1503,7 @@ const ue = Ne("menu", () => {
|
|
|
1503
1503
|
class: "top-menu__dropdown-item",
|
|
1504
1504
|
onClick: T
|
|
1505
1505
|
}, [
|
|
1506
|
-
y(
|
|
1506
|
+
y(a(U), {
|
|
1507
1507
|
name: "lock",
|
|
1508
1508
|
size: 16
|
|
1509
1509
|
}),
|
|
@@ -1514,7 +1514,7 @@ const ue = Ne("menu", () => {
|
|
|
1514
1514
|
class: "top-menu__dropdown-item top-menu__dropdown-item--danger",
|
|
1515
1515
|
onClick: k
|
|
1516
1516
|
}, [
|
|
1517
|
-
y(
|
|
1517
|
+
y(a(U), {
|
|
1518
1518
|
name: "logout",
|
|
1519
1519
|
size: 16
|
|
1520
1520
|
}),
|
|
@@ -1528,9 +1528,9 @@ const ue = Ne("menu", () => {
|
|
|
1528
1528
|
})
|
|
1529
1529
|
], 512)
|
|
1530
1530
|
]),
|
|
1531
|
-
y(
|
|
1531
|
+
y(a(Ge), {
|
|
1532
1532
|
modelValue: B.value,
|
|
1533
|
-
"onUpdate:modelValue": L[2] || (L[2] = (
|
|
1533
|
+
"onUpdate:modelValue": L[2] || (L[2] = (l) => B.value = l),
|
|
1534
1534
|
title: "换肤设置",
|
|
1535
1535
|
direction: "rtl",
|
|
1536
1536
|
size: "320px"
|
|
@@ -1540,19 +1540,19 @@ const ue = Ne("menu", () => {
|
|
|
1540
1540
|
e("div", Mo, [
|
|
1541
1541
|
L[11] || (L[11] = e("div", { class: "settings-title" }, "布局模式", -1)),
|
|
1542
1542
|
e("div", So, [
|
|
1543
|
-
(s(), c(K, null, G(Ce, (
|
|
1544
|
-
key:
|
|
1545
|
-
class: J(["layout-option", { "is-active": $e.value ===
|
|
1546
|
-
onClick: (p) => Le(
|
|
1543
|
+
(s(), c(K, null, G(Ce, (l) => e("div", {
|
|
1544
|
+
key: l.value,
|
|
1545
|
+
class: J(["layout-option", { "is-active": $e.value === l.value }]),
|
|
1546
|
+
onClick: (p) => Le(l.value)
|
|
1547
1547
|
}, [
|
|
1548
|
-
e("div",
|
|
1549
|
-
|
|
1548
|
+
e("div", Io, [
|
|
1549
|
+
l.value === "sidebar" ? (s(), c("div", zo, [...L[8] || (L[8] = [
|
|
1550
1550
|
e("div", { class: "preview-aside" }, null, -1),
|
|
1551
1551
|
e("div", { class: "preview-main" }, [
|
|
1552
1552
|
e("div", { class: "preview-header" }),
|
|
1553
1553
|
e("div", { class: "preview-content" })
|
|
1554
1554
|
], -1)
|
|
1555
|
-
])])) :
|
|
1555
|
+
])])) : l.value === "top" ? (s(), c("div", Uo, [...L[9] || (L[9] = [
|
|
1556
1556
|
e("div", { class: "preview-header-full" }, null, -1),
|
|
1557
1557
|
e("div", { class: "preview-content-full" }, null, -1)
|
|
1558
1558
|
])])) : (s(), c("div", To, [...L[10] || (L[10] = [
|
|
@@ -1565,21 +1565,21 @@ const ue = Ne("menu", () => {
|
|
|
1565
1565
|
], -1)
|
|
1566
1566
|
])]))
|
|
1567
1567
|
]),
|
|
1568
|
-
e("span", Eo,
|
|
1569
|
-
], 10,
|
|
1568
|
+
e("span", Eo, b(l.label), 1)
|
|
1569
|
+
], 10, No)), 64))
|
|
1570
1570
|
])
|
|
1571
1571
|
]),
|
|
1572
1572
|
e("div", Po, [
|
|
1573
1573
|
L[12] || (L[12] = e("div", { class: "settings-title" }, "主题色", -1)),
|
|
1574
1574
|
e("div", Ao, [
|
|
1575
|
-
(s(), c(K, null, G(Me, (
|
|
1576
|
-
key:
|
|
1577
|
-
class: J(["color-option", { "is-active":
|
|
1578
|
-
style:
|
|
1579
|
-
title:
|
|
1580
|
-
onClick: (p) => fe(
|
|
1575
|
+
(s(), c(K, null, G(Me, (l) => e("div", {
|
|
1576
|
+
key: l.value,
|
|
1577
|
+
class: J(["color-option", { "is-active": a(i).primaryColor === l.value }]),
|
|
1578
|
+
style: Ne({ backgroundColor: l.value }),
|
|
1579
|
+
title: l.label,
|
|
1580
|
+
onClick: (p) => fe(l.value)
|
|
1581
1581
|
}, [
|
|
1582
|
-
|
|
1582
|
+
a(i).primaryColor === l.value ? (s(), O(a(U), {
|
|
1583
1583
|
key: 0,
|
|
1584
1584
|
name: "check",
|
|
1585
1585
|
size: 12,
|
|
@@ -1603,7 +1603,7 @@ const ue = Ne("menu", () => {
|
|
|
1603
1603
|
e("div", Ro, [
|
|
1604
1604
|
L[16] || (L[16] = e("span", null, "暗黑模式", -1)),
|
|
1605
1605
|
e("div", {
|
|
1606
|
-
class: J(["switch-wrapper", { "is-checked":
|
|
1606
|
+
class: J(["switch-wrapper", { "is-checked": a(i).isDark }]),
|
|
1607
1607
|
onClick: xe
|
|
1608
1608
|
}, [...L[15] || (L[15] = [
|
|
1609
1609
|
e("span", { class: "switch-core" }, null, -1)
|
|
@@ -1642,10 +1642,10 @@ const ue = Ne("menu", () => {
|
|
|
1642
1642
|
}, ln = {
|
|
1643
1643
|
key: 1,
|
|
1644
1644
|
class: "mix-top-menu__search-empty"
|
|
1645
|
-
}, rn = ["title"], cn = { class: "mix-top-menu__avatar" },
|
|
1645
|
+
}, rn = ["title"], cn = { class: "mix-top-menu__avatar" }, un = { class: "mix-top-menu__user-name" }, dn = {
|
|
1646
1646
|
key: 0,
|
|
1647
1647
|
class: "mix-top-menu__dropdown"
|
|
1648
|
-
}, mn = { class: "mix-top-menu__dropdown-header" }, pn = { class: "mix-top-menu__dropdown-avatar" }, vn = { class: "mix-top-menu__dropdown-info" }, hn = { class: "mix-top-menu__dropdown-name" }, _n = { class: "mix-top-menu__dropdown-role" }, fn = { class: "mix-top-menu__dropdown-menu" }, gn = { class: "settings-drawer" }, yn = { class: "settings-section" },
|
|
1648
|
+
}, mn = { class: "mix-top-menu__dropdown-header" }, pn = { class: "mix-top-menu__dropdown-avatar" }, vn = { class: "mix-top-menu__dropdown-info" }, hn = { class: "mix-top-menu__dropdown-name" }, _n = { class: "mix-top-menu__dropdown-role" }, fn = { class: "mix-top-menu__dropdown-menu" }, gn = { class: "settings-drawer" }, yn = { class: "settings-section" }, kn = { class: "settings-layout-options" }, wn = ["onClick"], bn = { class: "layout-option__preview" }, xn = {
|
|
1649
1649
|
key: 0,
|
|
1650
1650
|
class: "layout-preview-sidebar"
|
|
1651
1651
|
}, Cn = {
|
|
@@ -1654,38 +1654,38 @@ const ue = Ne("menu", () => {
|
|
|
1654
1654
|
}, $n = {
|
|
1655
1655
|
key: 2,
|
|
1656
1656
|
class: "layout-preview-mix"
|
|
1657
|
-
}, Ln = { class: "layout-option__label" }, Mn = { class: "settings-section" }, Sn = { class: "settings-color-options" },
|
|
1657
|
+
}, Ln = { class: "layout-option__label" }, Mn = { class: "settings-section" }, Sn = { class: "settings-color-options" }, Nn = ["title", "onClick"], In = { class: "settings-section" }, zn = { class: "settings-switch-list" }, Un = { class: "settings-switch-item" }, Tn = { class: "settings-switch-item" }, En = /* @__PURE__ */ ae({
|
|
1658
1658
|
__name: "MixTopMenu",
|
|
1659
1659
|
props: {
|
|
1660
1660
|
logoSrc: { default: "/vite.svg" }
|
|
1661
1661
|
},
|
|
1662
1662
|
setup(t) {
|
|
1663
|
-
const r = t, d =
|
|
1663
|
+
const r = t, d = be(), n = me(), o = de(), i = ue(), h = le(), v = ze(), m = g(""), f = (l, p = "") => {
|
|
1664
1664
|
const R = [];
|
|
1665
|
-
return
|
|
1666
|
-
|
|
1665
|
+
return l.forEach((C) => {
|
|
1666
|
+
C.children && C.children.length > 0 ? R.push(...f(C.children, C.menuName)) : R.push({ ...C, parentTitle: p, title: C.menuName, path: C.menuUrl });
|
|
1667
1667
|
}), R;
|
|
1668
|
-
}, _ = w(() =>
|
|
1669
|
-
(p) => p.title.toLowerCase().includes(
|
|
1670
|
-
) : []),
|
|
1671
|
-
const
|
|
1672
|
-
return (
|
|
1673
|
-
}),
|
|
1674
|
-
|
|
1675
|
-
}, D = (
|
|
1676
|
-
|
|
1677
|
-
const p = o.menuList.find((R) => R.menuUrl ===
|
|
1668
|
+
}, _ = w(() => N.value.trim() ? f(o.menuList).filter(
|
|
1669
|
+
(p) => p.title.toLowerCase().includes(N.value.toLowerCase())
|
|
1670
|
+
) : []), u = w(() => {
|
|
1671
|
+
const l = o.menuList.find((p) => p.menuUrl === m.value);
|
|
1672
|
+
return (l == null ? void 0 : l.children) || [];
|
|
1673
|
+
}), $ = 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 = () => {
|
|
1674
|
+
$.value ? m.value = $.value.menuUrl : o.menuList.length > 0 && (m.value = o.menuList[0].menuUrl);
|
|
1675
|
+
}, D = (l) => {
|
|
1676
|
+
m.value = l;
|
|
1677
|
+
const p = o.menuList.find((R) => R.menuUrl === l);
|
|
1678
1678
|
if (p)
|
|
1679
1679
|
if (p.children && p.children.length > 0) {
|
|
1680
1680
|
const R = p.children[0].menuUrl;
|
|
1681
|
-
d.path !== R &&
|
|
1681
|
+
d.path !== R && n.push(R);
|
|
1682
1682
|
} else
|
|
1683
|
-
d.path !==
|
|
1684
|
-
}, W = w(() => i.isDark ? "#1d1e1f" : "#fff"), V = w(() => i.isDark ? "#cfd3dc" : "#303133"), B = w(() => "#409eff"), H = g(!1), Z = g(null), Y = g(!1), q = g(!1), ee = g(!1), E = g(!1),
|
|
1683
|
+
d.path !== l && n.push(l);
|
|
1684
|
+
}, W = w(() => i.isDark ? "#1d1e1f" : "#fff"), V = w(() => i.isDark ? "#cfd3dc" : "#303133"), B = w(() => "#409eff"), H = g(!1), Z = g(null), Y = g(!1), q = g(!1), ee = g(!1), E = g(!1), N = g(""), A = g(null);
|
|
1685
1685
|
ye(() => d.path, () => {
|
|
1686
|
-
j(), i.setMixSubMenus(
|
|
1687
|
-
}), ye(() => o.menuList, (
|
|
1688
|
-
|
|
1686
|
+
j(), i.setMixSubMenus(u.value);
|
|
1687
|
+
}), ye(() => o.menuList, (l) => {
|
|
1688
|
+
l && l.length > 0 && (j(), i.setMixSubMenus(u.value));
|
|
1689
1689
|
}, { immediate: !0 });
|
|
1690
1690
|
const X = /* @__PURE__ */ new Set([
|
|
1691
1691
|
"arrow-up",
|
|
@@ -1789,10 +1789,10 @@ const ue = Ne("menu", () => {
|
|
|
1789
1789
|
"sun",
|
|
1790
1790
|
"theme",
|
|
1791
1791
|
"skin"
|
|
1792
|
-
]), F = (
|
|
1793
|
-
if (!
|
|
1794
|
-
if (
|
|
1795
|
-
const R =
|
|
1792
|
+
]), F = (l) => {
|
|
1793
|
+
if (!l || l === "") return "";
|
|
1794
|
+
if (l.startsWith("tineco-icon-")) {
|
|
1795
|
+
const R = l.replace("tineco-icon-", "");
|
|
1796
1796
|
return {
|
|
1797
1797
|
home: "home",
|
|
1798
1798
|
dashboard: "dashboard",
|
|
@@ -1825,8 +1825,8 @@ const ue = Ne("menu", () => {
|
|
|
1825
1825
|
app: "app",
|
|
1826
1826
|
list: "list",
|
|
1827
1827
|
grid: "grid"
|
|
1828
|
-
}[
|
|
1829
|
-
}, se = (
|
|
1828
|
+
}[l] || l;
|
|
1829
|
+
}, se = (l) => l ? l.charAt(0) : "", ie = (l) => X.has(l), pe = () => {
|
|
1830
1830
|
i.toggleTheme(), q.value = !1;
|
|
1831
1831
|
}, z = () => {
|
|
1832
1832
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
@@ -1837,15 +1837,15 @@ const ue = Ne("menu", () => {
|
|
|
1837
1837
|
}, ce = () => {
|
|
1838
1838
|
H.value = !1;
|
|
1839
1839
|
}, ne = () => {
|
|
1840
|
-
E.value = !1,
|
|
1841
|
-
}, ve = (
|
|
1842
|
-
|
|
1840
|
+
E.value = !1, N.value = "";
|
|
1841
|
+
}, ve = (l) => {
|
|
1842
|
+
n.push(l), ne();
|
|
1843
1843
|
}, xe = () => {
|
|
1844
1844
|
q.value = !0;
|
|
1845
|
-
}, Ce = (
|
|
1846
|
-
ee.value =
|
|
1845
|
+
}, Ce = (l) => {
|
|
1846
|
+
ee.value = l;
|
|
1847
1847
|
const p = document.documentElement;
|
|
1848
|
-
|
|
1848
|
+
l ? p.classList.add("grey-mode") : p.classList.remove("grey-mode");
|
|
1849
1849
|
}, $e = () => {
|
|
1850
1850
|
Ce(!ee.value), q.value = !1;
|
|
1851
1851
|
}, Le = () => {
|
|
@@ -1854,8 +1854,8 @@ const ue = Ne("menu", () => {
|
|
|
1854
1854
|
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
1855
1855
|
{ value: "top", label: "顶部菜单", icon: "menu" },
|
|
1856
1856
|
{ value: "mix", label: "混合菜单", icon: "grid" }
|
|
1857
|
-
], fe = w(() => i.layout), ge = (
|
|
1858
|
-
i.setLayout(
|
|
1857
|
+
], fe = w(() => i.layout), ge = (l) => {
|
|
1858
|
+
i.setLayout(l), q.value = !1;
|
|
1859
1859
|
}, T = [
|
|
1860
1860
|
{ value: "#409eff", label: "默认蓝" },
|
|
1861
1861
|
{ value: "#1890ff", label: "科技蓝" },
|
|
@@ -1863,24 +1863,24 @@ const ue = Ne("menu", () => {
|
|
|
1863
1863
|
{ value: "#faad14", label: "日落橙" },
|
|
1864
1864
|
{ value: "#f5222d", label: "薄暮红" },
|
|
1865
1865
|
{ value: "#722ed1", label: "酱紫" }
|
|
1866
|
-
], k = (
|
|
1867
|
-
i.setPrimaryColor(
|
|
1866
|
+
], k = (l) => {
|
|
1867
|
+
i.setPrimaryColor(l), q.value = !1;
|
|
1868
1868
|
}, Q = () => {
|
|
1869
|
-
ce(),
|
|
1870
|
-
},
|
|
1871
|
-
ce(),
|
|
1869
|
+
ce(), n.push("/profile");
|
|
1870
|
+
}, x = () => {
|
|
1871
|
+
ce(), n.push("/change-password");
|
|
1872
1872
|
}, S = () => {
|
|
1873
|
-
ce(),
|
|
1874
|
-
}, L = (
|
|
1875
|
-
Z.value && !Z.value.contains(
|
|
1876
|
-
}, te = (
|
|
1877
|
-
|
|
1873
|
+
ce(), v.logout(), h.clearUserInfo(), o.clearMenu(), n.push(i.loginPath);
|
|
1874
|
+
}, L = (l) => {
|
|
1875
|
+
Z.value && !Z.value.contains(l.target) && ce(), A.value && !A.value.contains(l.target) && ne();
|
|
1876
|
+
}, te = (l) => {
|
|
1877
|
+
l.key === "Escape" && (ne(), ce());
|
|
1878
1878
|
};
|
|
1879
1879
|
return Ke(() => {
|
|
1880
1880
|
document.addEventListener("click", L), document.addEventListener("fullscreenchange", oe), document.addEventListener("keydown", te), ee.value = document.documentElement.classList.contains("grey-mode"), j();
|
|
1881
1881
|
}), je(() => {
|
|
1882
1882
|
document.removeEventListener("click", L), document.removeEventListener("fullscreenchange", oe), document.removeEventListener("keydown", te);
|
|
1883
|
-
}), (
|
|
1883
|
+
}), (l, p) => {
|
|
1884
1884
|
var R;
|
|
1885
1885
|
return s(), c("div", jo, [
|
|
1886
1886
|
e("div", Wo, [
|
|
@@ -1889,10 +1889,10 @@ const ue = Ne("menu", () => {
|
|
|
1889
1889
|
alt: "Logo",
|
|
1890
1890
|
class: "mix-top-menu__logo-img"
|
|
1891
1891
|
}, null, 8, qo),
|
|
1892
|
-
e("span", Ho,
|
|
1892
|
+
e("span", Ho, b(a(i).appName), 1)
|
|
1893
1893
|
]),
|
|
1894
|
-
y(
|
|
1895
|
-
"model-value":
|
|
1894
|
+
y(a(Xe), {
|
|
1895
|
+
"model-value": m.value,
|
|
1896
1896
|
mode: "horizontal",
|
|
1897
1897
|
"background-color": W.value,
|
|
1898
1898
|
"text-color": V.value,
|
|
@@ -1901,20 +1901,20 @@ const ue = Ne("menu", () => {
|
|
|
1901
1901
|
onSelect: D
|
|
1902
1902
|
}, {
|
|
1903
1903
|
default: M(() => [
|
|
1904
|
-
(s(!0), c(K, null, G(
|
|
1905
|
-
key:
|
|
1906
|
-
index:
|
|
1904
|
+
(s(!0), c(K, null, G(a(o).menuList, (C) => (s(), O(a(Se), {
|
|
1905
|
+
key: C.menuUrl,
|
|
1906
|
+
index: C.menuUrl
|
|
1907
1907
|
}, {
|
|
1908
1908
|
default: M(() => [
|
|
1909
1909
|
e("span", Yo, [
|
|
1910
|
-
|
|
1911
|
-
ie(F(
|
|
1910
|
+
C.menuName !== "首页" ? (s(), c("span", Xo, [
|
|
1911
|
+
ie(F(C.icon)) ? (s(), O(a(U), {
|
|
1912
1912
|
key: 0,
|
|
1913
|
-
name: F(
|
|
1913
|
+
name: F(C.icon),
|
|
1914
1914
|
size: 16
|
|
1915
|
-
}, null, 8, ["name"])) : (s(), c("span", Go,
|
|
1915
|
+
}, null, 8, ["name"])) : (s(), c("span", Go, b(se(C.menuName)), 1))
|
|
1916
1916
|
])) : P("", !0),
|
|
1917
|
-
e("span", Jo,
|
|
1917
|
+
e("span", Jo, b(C.menuName), 1)
|
|
1918
1918
|
])
|
|
1919
1919
|
]),
|
|
1920
1920
|
_: 2
|
|
@@ -1928,38 +1928,38 @@ const ue = Ne("menu", () => {
|
|
|
1928
1928
|
ref_key: "searchRef",
|
|
1929
1929
|
ref: A
|
|
1930
1930
|
}, [
|
|
1931
|
-
y(
|
|
1931
|
+
y(a(U), {
|
|
1932
1932
|
name: "search",
|
|
1933
1933
|
size: 14,
|
|
1934
1934
|
class: "mix-top-menu__search-icon"
|
|
1935
1935
|
}),
|
|
1936
1936
|
Te(e("input", {
|
|
1937
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
1937
|
+
"onUpdate:modelValue": p[0] || (p[0] = (C) => N.value = C),
|
|
1938
1938
|
type: "text",
|
|
1939
1939
|
class: "mix-top-menu__search-input",
|
|
1940
1940
|
placeholder: "搜索菜单...",
|
|
1941
|
-
onFocus: p[1] || (p[1] = (
|
|
1941
|
+
onFocus: p[1] || (p[1] = (C) => E.value = !0)
|
|
1942
1942
|
}, null, 544), [
|
|
1943
|
-
[We,
|
|
1943
|
+
[We, N.value]
|
|
1944
1944
|
]),
|
|
1945
|
-
y(
|
|
1945
|
+
y(ke, { name: "search-dropdown" }, {
|
|
1946
1946
|
default: M(() => [
|
|
1947
|
-
E.value && (_.value.length > 0 ||
|
|
1947
|
+
E.value && (_.value.length > 0 || N.value) ? (s(), c("div", Qo, [
|
|
1948
1948
|
_.value.length > 0 ? (s(), c("div", en, [
|
|
1949
|
-
(s(!0), c(K, null, G(_.value, (
|
|
1950
|
-
key:
|
|
1949
|
+
(s(!0), c(K, null, G(_.value, (C) => (s(), c("div", {
|
|
1950
|
+
key: C.path,
|
|
1951
1951
|
class: "mix-top-menu__search-item",
|
|
1952
|
-
onClick: (Ze) => ve(
|
|
1952
|
+
onClick: (Ze) => ve(C.path)
|
|
1953
1953
|
}, [
|
|
1954
|
-
|
|
1955
|
-
ie(F(
|
|
1954
|
+
C.title !== "首页" ? (s(), c("span", sn, [
|
|
1955
|
+
ie(F(C.icon)) ? (s(), O(a(U), {
|
|
1956
1956
|
key: 0,
|
|
1957
|
-
name: F(
|
|
1957
|
+
name: F(C.icon),
|
|
1958
1958
|
size: 16
|
|
1959
|
-
}, null, 8, ["name"])) : (s(), c("span", on,
|
|
1959
|
+
}, null, 8, ["name"])) : (s(), c("span", on, b(se(C.title)), 1))
|
|
1960
1960
|
])) : P("", !0),
|
|
1961
|
-
e("span", nn,
|
|
1962
|
-
|
|
1961
|
+
e("span", nn, b(C.title), 1),
|
|
1962
|
+
C.parentTitle ? (s(), c("span", an, b(C.parentTitle), 1)) : P("", !0)
|
|
1963
1963
|
], 8, tn))), 128))
|
|
1964
1964
|
])) : (s(), c("div", ln, " 未找到匹配的菜单 "))
|
|
1965
1965
|
])) : P("", !0)
|
|
@@ -1972,7 +1972,7 @@ const ue = Ne("menu", () => {
|
|
|
1972
1972
|
onClick: z,
|
|
1973
1973
|
title: Y.value ? "退出全屏" : "全屏"
|
|
1974
1974
|
}, [
|
|
1975
|
-
y(
|
|
1975
|
+
y(a(U), {
|
|
1976
1976
|
name: Y.value ? "fullscreen-exit" : "fullscreen",
|
|
1977
1977
|
size: 16
|
|
1978
1978
|
}, null, 8, ["name"])
|
|
@@ -1982,7 +1982,7 @@ const ue = Ne("menu", () => {
|
|
|
1982
1982
|
onClick: xe,
|
|
1983
1983
|
title: "换肤设置"
|
|
1984
1984
|
}, [
|
|
1985
|
-
y(
|
|
1985
|
+
y(a(U), {
|
|
1986
1986
|
name: "skin",
|
|
1987
1987
|
size: 16
|
|
1988
1988
|
})
|
|
@@ -1992,8 +1992,8 @@ const ue = Ne("menu", () => {
|
|
|
1992
1992
|
onClick: pe,
|
|
1993
1993
|
title: "切换主题"
|
|
1994
1994
|
}, [
|
|
1995
|
-
y(
|
|
1996
|
-
name:
|
|
1995
|
+
y(a(U), {
|
|
1996
|
+
name: a(i).isDark ? "sun" : "moon",
|
|
1997
1997
|
size: 16
|
|
1998
1998
|
}, null, 8, ["name"])
|
|
1999
1999
|
]),
|
|
@@ -2007,25 +2007,25 @@ const ue = Ne("menu", () => {
|
|
|
2007
2007
|
onClick: Ee(_e, ["stop"])
|
|
2008
2008
|
}, [
|
|
2009
2009
|
e("div", cn, [
|
|
2010
|
-
e("span", null,
|
|
2010
|
+
e("span", null, b(((R = a(h).userName) == null ? void 0 : R.charAt(0)) || "U"), 1)
|
|
2011
2011
|
]),
|
|
2012
|
-
e("span",
|
|
2012
|
+
e("span", un, b(a(h).userName), 1),
|
|
2013
2013
|
e("span", {
|
|
2014
2014
|
class: J(["mix-top-menu__user-arrow", { "is-active": H.value }])
|
|
2015
2015
|
}, "▼", 2)
|
|
2016
2016
|
]),
|
|
2017
|
-
y(
|
|
2017
|
+
y(ke, { name: "dropdown" }, {
|
|
2018
2018
|
default: M(() => {
|
|
2019
|
-
var
|
|
2019
|
+
var C;
|
|
2020
2020
|
return [
|
|
2021
|
-
H.value ? (s(), c("div",
|
|
2021
|
+
H.value ? (s(), c("div", dn, [
|
|
2022
2022
|
e("div", mn, [
|
|
2023
2023
|
e("div", pn, [
|
|
2024
|
-
e("span", null,
|
|
2024
|
+
e("span", null, b(((C = a(h).userName) == null ? void 0 : C.charAt(0)) || "U"), 1)
|
|
2025
2025
|
]),
|
|
2026
2026
|
e("div", vn, [
|
|
2027
|
-
e("div", hn,
|
|
2028
|
-
e("div", _n,
|
|
2027
|
+
e("div", hn, b(a(h).userName), 1),
|
|
2028
|
+
e("div", _n, b(a(h).departmentName), 1)
|
|
2029
2029
|
])
|
|
2030
2030
|
]),
|
|
2031
2031
|
p[7] || (p[7] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
|
|
@@ -2034,7 +2034,7 @@ const ue = Ne("menu", () => {
|
|
|
2034
2034
|
class: "mix-top-menu__dropdown-item",
|
|
2035
2035
|
onClick: Q
|
|
2036
2036
|
}, [
|
|
2037
|
-
y(
|
|
2037
|
+
y(a(U), {
|
|
2038
2038
|
name: "user",
|
|
2039
2039
|
size: 16
|
|
2040
2040
|
}),
|
|
@@ -2042,9 +2042,9 @@ const ue = Ne("menu", () => {
|
|
|
2042
2042
|
]),
|
|
2043
2043
|
e("div", {
|
|
2044
2044
|
class: "mix-top-menu__dropdown-item",
|
|
2045
|
-
onClick:
|
|
2045
|
+
onClick: x
|
|
2046
2046
|
}, [
|
|
2047
|
-
y(
|
|
2047
|
+
y(a(U), {
|
|
2048
2048
|
name: "lock",
|
|
2049
2049
|
size: 16
|
|
2050
2050
|
}),
|
|
@@ -2055,7 +2055,7 @@ const ue = Ne("menu", () => {
|
|
|
2055
2055
|
class: "mix-top-menu__dropdown-item mix-top-menu__dropdown-item--danger",
|
|
2056
2056
|
onClick: S
|
|
2057
2057
|
}, [
|
|
2058
|
-
y(
|
|
2058
|
+
y(a(U), {
|
|
2059
2059
|
name: "logout",
|
|
2060
2060
|
size: 16
|
|
2061
2061
|
}),
|
|
@@ -2069,9 +2069,9 @@ const ue = Ne("menu", () => {
|
|
|
2069
2069
|
})
|
|
2070
2070
|
], 512)
|
|
2071
2071
|
]),
|
|
2072
|
-
y(
|
|
2072
|
+
y(a(Ge), {
|
|
2073
2073
|
modelValue: q.value,
|
|
2074
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
2074
|
+
"onUpdate:modelValue": p[2] || (p[2] = (C) => q.value = C),
|
|
2075
2075
|
title: "换肤设置",
|
|
2076
2076
|
direction: "rtl",
|
|
2077
2077
|
size: "320px"
|
|
@@ -2080,20 +2080,20 @@ const ue = Ne("menu", () => {
|
|
|
2080
2080
|
e("div", gn, [
|
|
2081
2081
|
e("div", yn, [
|
|
2082
2082
|
p[11] || (p[11] = e("div", { class: "settings-title" }, "布局模式", -1)),
|
|
2083
|
-
e("div",
|
|
2084
|
-
(s(), c(K, null, G(Me, (
|
|
2085
|
-
key:
|
|
2086
|
-
class: J(["layout-option", { "is-active": fe.value ===
|
|
2087
|
-
onClick: (Ze) => ge(
|
|
2083
|
+
e("div", kn, [
|
|
2084
|
+
(s(), c(K, null, G(Me, (C) => e("div", {
|
|
2085
|
+
key: C.value,
|
|
2086
|
+
class: J(["layout-option", { "is-active": fe.value === C.value }]),
|
|
2087
|
+
onClick: (Ze) => ge(C.value)
|
|
2088
2088
|
}, [
|
|
2089
|
-
e("div",
|
|
2090
|
-
|
|
2089
|
+
e("div", bn, [
|
|
2090
|
+
C.value === "sidebar" ? (s(), c("div", xn, [...p[8] || (p[8] = [
|
|
2091
2091
|
e("div", { class: "preview-aside" }, null, -1),
|
|
2092
2092
|
e("div", { class: "preview-main" }, [
|
|
2093
2093
|
e("div", { class: "preview-header" }),
|
|
2094
2094
|
e("div", { class: "preview-content" })
|
|
2095
2095
|
], -1)
|
|
2096
|
-
])])) :
|
|
2096
|
+
])])) : C.value === "top" ? (s(), c("div", Cn, [...p[9] || (p[9] = [
|
|
2097
2097
|
e("div", { class: "preview-header-full" }, null, -1),
|
|
2098
2098
|
e("div", { class: "preview-content-full" }, null, -1)
|
|
2099
2099
|
])])) : (s(), c("div", $n, [...p[10] || (p[10] = [
|
|
@@ -2106,30 +2106,30 @@ const ue = Ne("menu", () => {
|
|
|
2106
2106
|
], -1)
|
|
2107
2107
|
])]))
|
|
2108
2108
|
]),
|
|
2109
|
-
e("span", Ln,
|
|
2110
|
-
], 10,
|
|
2109
|
+
e("span", Ln, b(C.label), 1)
|
|
2110
|
+
], 10, wn)), 64))
|
|
2111
2111
|
])
|
|
2112
2112
|
]),
|
|
2113
2113
|
e("div", Mn, [
|
|
2114
2114
|
p[12] || (p[12] = e("div", { class: "settings-title" }, "主题色", -1)),
|
|
2115
2115
|
e("div", Sn, [
|
|
2116
|
-
(s(), c(K, null, G(T, (
|
|
2117
|
-
key:
|
|
2118
|
-
class: J(["color-option", { "is-active":
|
|
2119
|
-
style:
|
|
2120
|
-
title:
|
|
2121
|
-
onClick: (Ze) => k(
|
|
2116
|
+
(s(), c(K, null, G(T, (C) => e("div", {
|
|
2117
|
+
key: C.value,
|
|
2118
|
+
class: J(["color-option", { "is-active": a(i).primaryColor === C.value }]),
|
|
2119
|
+
style: Ne({ backgroundColor: C.value }),
|
|
2120
|
+
title: C.label,
|
|
2121
|
+
onClick: (Ze) => k(C.value)
|
|
2122
2122
|
}, [
|
|
2123
|
-
|
|
2123
|
+
a(i).primaryColor === C.value ? (s(), O(a(U), {
|
|
2124
2124
|
key: 0,
|
|
2125
2125
|
name: "check",
|
|
2126
2126
|
size: 12,
|
|
2127
2127
|
color: "#fff"
|
|
2128
2128
|
})) : P("", !0)
|
|
2129
|
-
], 14,
|
|
2129
|
+
], 14, Nn)), 64))
|
|
2130
2130
|
])
|
|
2131
2131
|
]),
|
|
2132
|
-
e("div",
|
|
2132
|
+
e("div", In, [
|
|
2133
2133
|
p[17] || (p[17] = e("div", { class: "settings-title" }, "功能设置", -1)),
|
|
2134
2134
|
e("div", zn, [
|
|
2135
2135
|
e("div", Un, [
|
|
@@ -2144,7 +2144,7 @@ const ue = Ne("menu", () => {
|
|
|
2144
2144
|
e("div", Tn, [
|
|
2145
2145
|
p[16] || (p[16] = e("span", null, "暗黑模式", -1)),
|
|
2146
2146
|
e("div", {
|
|
2147
|
-
class: J(["switch-wrapper", { "is-checked":
|
|
2147
|
+
class: J(["switch-wrapper", { "is-checked": a(i).isDark }]),
|
|
2148
2148
|
onClick: Le
|
|
2149
2149
|
}, [...p[15] || (p[15] = [
|
|
2150
2150
|
e("span", { class: "switch-core" }, null, -1)
|
|
@@ -2174,19 +2174,19 @@ const ue = Ne("menu", () => {
|
|
|
2174
2174
|
logoSrc: { default: "/vite.svg" }
|
|
2175
2175
|
},
|
|
2176
2176
|
setup(t) {
|
|
2177
|
-
const r = t, d =
|
|
2177
|
+
const r = t, d = ue(), n = de(), o = w(
|
|
2178
2178
|
() => d.isCollapsed ? "64px" : "210px"
|
|
2179
|
-
), i = w(() => d.layout),
|
|
2179
|
+
), i = w(() => d.layout), h = w(() => i.value === "mix"), v = w(() => i.value === "sidebar" ? n.menuList : i.value === "mix" ? d.mixSubMenus : []), m = w(() => h.value ? v.value.length > 0 : !1);
|
|
2180
2180
|
return (f, _) => {
|
|
2181
|
-
const
|
|
2181
|
+
const u = lt("router-view");
|
|
2182
2182
|
return s(), c(K, null, [
|
|
2183
2183
|
i.value === "sidebar" ? (s(), c("div", An, [
|
|
2184
2184
|
e("aside", {
|
|
2185
2185
|
class: "layout__aside",
|
|
2186
|
-
style:
|
|
2186
|
+
style: Ne({ width: o.value })
|
|
2187
2187
|
}, [
|
|
2188
2188
|
y(et, {
|
|
2189
|
-
"menu-list":
|
|
2189
|
+
"menu-list": v.value,
|
|
2190
2190
|
"show-logo": !0,
|
|
2191
2191
|
"show-user": !0,
|
|
2192
2192
|
"logo-src": r.logoSrc
|
|
@@ -2197,7 +2197,7 @@ const ue = Ne("menu", () => {
|
|
|
2197
2197
|
y(Ps)
|
|
2198
2198
|
]),
|
|
2199
2199
|
e("main", On, [
|
|
2200
|
-
y(
|
|
2200
|
+
y(u)
|
|
2201
2201
|
])
|
|
2202
2202
|
])
|
|
2203
2203
|
])) : P("", !0),
|
|
@@ -2209,7 +2209,7 @@ const ue = Ne("menu", () => {
|
|
|
2209
2209
|
]),
|
|
2210
2210
|
e("div", Fn, [
|
|
2211
2211
|
e("main", Kn, [
|
|
2212
|
-
y(
|
|
2212
|
+
y(u)
|
|
2213
2213
|
])
|
|
2214
2214
|
])
|
|
2215
2215
|
])) : P("", !0),
|
|
@@ -2220,19 +2220,19 @@ const ue = Ne("menu", () => {
|
|
|
2220
2220
|
}, null, 8, ["logo-src"])
|
|
2221
2221
|
]),
|
|
2222
2222
|
e("div", qn, [
|
|
2223
|
-
|
|
2223
|
+
m.value ? (s(), c("aside", {
|
|
2224
2224
|
key: 0,
|
|
2225
2225
|
class: "layout__aside",
|
|
2226
|
-
style:
|
|
2226
|
+
style: Ne({ width: o.value })
|
|
2227
2227
|
}, [
|
|
2228
2228
|
y(et, {
|
|
2229
|
-
"menu-list":
|
|
2229
|
+
"menu-list": v.value,
|
|
2230
2230
|
"show-logo": !1,
|
|
2231
2231
|
"show-user": !1
|
|
2232
2232
|
}, null, 8, ["menu-list"])
|
|
2233
2233
|
], 4)) : P("", !0),
|
|
2234
2234
|
e("main", Hn, [
|
|
2235
|
-
y(
|
|
2235
|
+
y(u)
|
|
2236
2236
|
])
|
|
2237
2237
|
])
|
|
2238
2238
|
])) : P("", !0)
|
|
@@ -2245,35 +2245,35 @@ const ue = Ne("menu", () => {
|
|
|
2245
2245
|
}, Symbol.toStringTag, { value: "Module" })), Gn = { class: "tabs-wrapper" }, Jn = { class: "tab-label" }, Zn = ["onClick"], Qn = /* @__PURE__ */ ae({
|
|
2246
2246
|
__name: "Tabs",
|
|
2247
2247
|
setup(t) {
|
|
2248
|
-
const r =
|
|
2249
|
-
const
|
|
2250
|
-
return r.matched.forEach((
|
|
2248
|
+
const r = be(), d = me(), n = w(() => {
|
|
2249
|
+
const v = [];
|
|
2250
|
+
return r.matched.forEach((m) => {
|
|
2251
2251
|
var f;
|
|
2252
|
-
(f =
|
|
2253
|
-
name:
|
|
2254
|
-
title:
|
|
2255
|
-
path:
|
|
2252
|
+
(f = m.meta) != null && f.affix && v.push({
|
|
2253
|
+
name: m.name,
|
|
2254
|
+
title: m.meta.title,
|
|
2255
|
+
path: m.path,
|
|
2256
2256
|
affix: !0
|
|
2257
2257
|
});
|
|
2258
|
-
}),
|
|
2259
|
-
}), o = w(() => r.path), i = (
|
|
2260
|
-
d.push(
|
|
2261
|
-
},
|
|
2262
|
-
const
|
|
2263
|
-
if (!(
|
|
2264
|
-
const f =
|
|
2258
|
+
}), v;
|
|
2259
|
+
}), o = w(() => r.path), i = (v) => {
|
|
2260
|
+
d.push(v);
|
|
2261
|
+
}, h = (v) => {
|
|
2262
|
+
const m = n.value.find((f) => f.path === v);
|
|
2263
|
+
if (!(m != null && m.affix) && v === o.value) {
|
|
2264
|
+
const f = n.value.findIndex((u) => u.path === v), _ = n.value[f - 1] || n.value[f + 1];
|
|
2265
2265
|
_ && d.push(_.path);
|
|
2266
2266
|
}
|
|
2267
2267
|
};
|
|
2268
|
-
return (
|
|
2269
|
-
y(
|
|
2268
|
+
return (v, m) => (s(), c("div", Gn, [
|
|
2269
|
+
y(a(wt), {
|
|
2270
2270
|
modelValue: o.value,
|
|
2271
|
-
"onUpdate:modelValue":
|
|
2271
|
+
"onUpdate:modelValue": m[0] || (m[0] = (f) => o.value = f),
|
|
2272
2272
|
type: "card",
|
|
2273
2273
|
onTabClick: i
|
|
2274
2274
|
}, {
|
|
2275
2275
|
default: M(() => [
|
|
2276
|
-
(s(!0), c(K, null, G(
|
|
2276
|
+
(s(!0), c(K, null, G(n.value, (f) => (s(), O(a(bt), {
|
|
2277
2277
|
key: f.path,
|
|
2278
2278
|
name: f.path,
|
|
2279
2279
|
label: f.title,
|
|
@@ -2281,11 +2281,11 @@ const ue = Ne("menu", () => {
|
|
|
2281
2281
|
}, {
|
|
2282
2282
|
label: M(() => [
|
|
2283
2283
|
e("span", Jn, [
|
|
2284
|
-
he(
|
|
2284
|
+
he(b(f.title) + " ", 1),
|
|
2285
2285
|
f.affix ? P("", !0) : (s(), c("span", {
|
|
2286
2286
|
key: 0,
|
|
2287
2287
|
class: "tab-close",
|
|
2288
|
-
onClick: Ee((_) =>
|
|
2288
|
+
onClick: Ee((_) => h(f.path), ["stop"])
|
|
2289
2289
|
}, " ✕ ", 8, Zn))
|
|
2290
2290
|
])
|
|
2291
2291
|
]),
|
|
@@ -2296,19 +2296,19 @@ const ue = Ne("menu", () => {
|
|
|
2296
2296
|
}, 8, ["modelValue"])
|
|
2297
2297
|
]));
|
|
2298
2298
|
}
|
|
2299
|
-
}),
|
|
2299
|
+
}), Fa = /* @__PURE__ */ re(Qn, [["__scopeId", "data-v-9156d8cd"]]), ea = {}, ta = { class: "footer" };
|
|
2300
2300
|
function sa(t, r) {
|
|
2301
2301
|
return s(), c("div", ta, [...r[0] || (r[0] = [
|
|
2302
2302
|
e("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
|
|
2303
2303
|
])]);
|
|
2304
2304
|
}
|
|
2305
|
-
const
|
|
2305
|
+
const Ka = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826a"]]), oa = { class: "login-page" }, na = { class: "login-form-section" }, aa = { class: "form-container" }, la = { class: "input-wrapper" }, ra = { class: "input-wrapper" }, ia = { class: "form-options" }, ca = { key: 0 }, ua = { key: 1 }, da = /* @__PURE__ */ ae({
|
|
2306
2306
|
__name: "index",
|
|
2307
2307
|
setup(t) {
|
|
2308
|
-
const r = me(), d =
|
|
2308
|
+
const r = me(), d = be(), n = g(!1), o = g(!1), i = qe({
|
|
2309
2309
|
uid: "",
|
|
2310
2310
|
password: ""
|
|
2311
|
-
}),
|
|
2311
|
+
}), h = {
|
|
2312
2312
|
uid: [
|
|
2313
2313
|
{ required: !0, message: "请输入用户名", trigger: "blur" }
|
|
2314
2314
|
],
|
|
@@ -2316,10 +2316,10 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2316
2316
|
{ required: !0, message: "请输入密码", trigger: "blur" },
|
|
2317
2317
|
{ min: 6, message: "密码长度至少6位", trigger: "blur" }
|
|
2318
2318
|
]
|
|
2319
|
-
},
|
|
2319
|
+
}, v = g(), m = async () => {
|
|
2320
2320
|
var f;
|
|
2321
2321
|
try {
|
|
2322
|
-
await ((f =
|
|
2322
|
+
await ((f = v.value) == null ? void 0 : f.validate()), n.value = !0;
|
|
2323
2323
|
const _ = await pt({
|
|
2324
2324
|
appId: Fe(),
|
|
2325
2325
|
clientId: at(),
|
|
@@ -2328,43 +2328,43 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2328
2328
|
code: !0
|
|
2329
2329
|
});
|
|
2330
2330
|
nt(_), xt.success("登录成功");
|
|
2331
|
-
const
|
|
2332
|
-
r.push(
|
|
2331
|
+
const u = d.query.redirect;
|
|
2332
|
+
u ? r.push(u) : r.push({ name: "Dashboard" });
|
|
2333
2333
|
} catch (_) {
|
|
2334
2334
|
console.error("登录失败:", _);
|
|
2335
2335
|
} finally {
|
|
2336
|
-
|
|
2336
|
+
n.value = !1;
|
|
2337
2337
|
}
|
|
2338
2338
|
};
|
|
2339
2339
|
return (f, _) => (s(), c("div", oa, [
|
|
2340
|
-
_[10] || (_[10] = Ue('<div class="login-brand" data-v-
|
|
2340
|
+
_[10] || (_[10] = Ue('<div class="login-brand" data-v-ef91e533><div class="brand-content" data-v-ef91e533><div class="brand-logo" data-v-ef91e533><div class="logo-icon" data-v-ef91e533><svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ef91e533><rect width="48" height="48" rx="12" fill="currentColor" data-v-ef91e533></rect><path d="M14 24L20 30L34 16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" data-v-ef91e533></path></svg></div><span class="logo-text" data-v-ef91e533>XTO</span></div><div class="brand-slogan" data-v-ef91e533><h1 data-v-ef91e533>企业级后台管理解决方案</h1><p data-v-ef91e533>开箱即用的中后台前端/设计解决方案</p></div><div class="brand-features" data-v-ef91e533><div class="feature-item" data-v-ef91e533><div class="feature-icon" data-v-ef91e533><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-ef91e533><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" data-v-ef91e533></path></svg></div><div class="feature-text" data-v-ef91e533><h4 data-v-ef91e533>高性能</h4><p data-v-ef91e533>极致的渲染性能与响应速度</p></div></div><div class="feature-item" data-v-ef91e533><div class="feature-icon" data-v-ef91e533><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-ef91e533><rect x="3" y="3" width="18" height="18" rx="2" data-v-ef91e533></rect><path d="M9 9h6M9 12h6M9 15h4" data-v-ef91e533></path></svg></div><div class="feature-text" data-v-ef91e533><h4 data-v-ef91e533>丰富组件</h4><p data-v-ef91e533>60+ 高质量业务组件</p></div></div><div class="feature-item" data-v-ef91e533><div class="feature-icon" data-v-ef91e533><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-ef91e533><circle cx="12" cy="12" r="10" data-v-ef91e533></circle><path d="M12 6v6l4 2" data-v-ef91e533></path></svg></div><div class="feature-text" data-v-ef91e533><h4 data-v-ef91e533>持续更新</h4><p data-v-ef91e533>活跃的社区与快速迭代</p></div></div></div><div class="brand-decoration" data-v-ef91e533><div class="decoration-line" data-v-ef91e533></div><div class="decoration-dots" data-v-ef91e533><span data-v-ef91e533></span><span data-v-ef91e533></span><span data-v-ef91e533></span></div></div></div><div class="brand-bg" data-v-ef91e533><div class="bg-grid" data-v-ef91e533></div><div class="bg-glow" data-v-ef91e533></div><div class="bg-pattern" data-v-ef91e533></div></div></div>', 1)),
|
|
2341
2341
|
e("div", na, [
|
|
2342
2342
|
e("div", aa, [
|
|
2343
2343
|
_[7] || (_[7] = e("div", { class: "form-header" }, [
|
|
2344
2344
|
e("h2", null, "欢迎登录"),
|
|
2345
2345
|
e("p", null, "请输入您的账户信息")
|
|
2346
2346
|
], -1)),
|
|
2347
|
-
y(
|
|
2347
|
+
y(a(Ct), {
|
|
2348
2348
|
ref_key: "formRef",
|
|
2349
|
-
ref:
|
|
2349
|
+
ref: v,
|
|
2350
2350
|
model: i,
|
|
2351
|
-
rules:
|
|
2351
|
+
rules: h,
|
|
2352
2352
|
class: "login-form",
|
|
2353
2353
|
"label-width": "0"
|
|
2354
2354
|
}, {
|
|
2355
2355
|
default: M(() => [
|
|
2356
|
-
y(
|
|
2356
|
+
y(a(Pe), { prop: "uid" }, {
|
|
2357
2357
|
default: M(() => [
|
|
2358
2358
|
e("div", la, [
|
|
2359
2359
|
_[3] || (_[3] = e("label", { class: "input-label" }, "用户名", -1)),
|
|
2360
|
-
y(
|
|
2360
|
+
y(a(Qe), {
|
|
2361
2361
|
modelValue: i.uid,
|
|
2362
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
2362
|
+
"onUpdate:modelValue": _[0] || (_[0] = (u) => i.uid = u),
|
|
2363
2363
|
placeholder: "请输入用户名",
|
|
2364
2364
|
size: "large"
|
|
2365
2365
|
}, {
|
|
2366
2366
|
prefix: M(() => [
|
|
2367
|
-
y(
|
|
2367
|
+
y(a(U), {
|
|
2368
2368
|
name: "user",
|
|
2369
2369
|
size: 18
|
|
2370
2370
|
})
|
|
@@ -2375,21 +2375,21 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2375
2375
|
]),
|
|
2376
2376
|
_: 1
|
|
2377
2377
|
}),
|
|
2378
|
-
y(
|
|
2378
|
+
y(a(Pe), { prop: "password" }, {
|
|
2379
2379
|
default: M(() => [
|
|
2380
2380
|
e("div", ra, [
|
|
2381
2381
|
_[4] || (_[4] = e("label", { class: "input-label" }, "密码", -1)),
|
|
2382
|
-
y(
|
|
2382
|
+
y(a(Qe), {
|
|
2383
2383
|
modelValue: i.password,
|
|
2384
|
-
"onUpdate:modelValue": _[1] || (_[1] = (
|
|
2384
|
+
"onUpdate:modelValue": _[1] || (_[1] = (u) => i.password = u),
|
|
2385
2385
|
type: "password",
|
|
2386
2386
|
placeholder: "请输入密码",
|
|
2387
2387
|
size: "large",
|
|
2388
2388
|
"show-password": "",
|
|
2389
|
-
onKeyup: yt(
|
|
2389
|
+
onKeyup: yt(m, ["enter"])
|
|
2390
2390
|
}, {
|
|
2391
2391
|
prefix: M(() => [
|
|
2392
|
-
y(
|
|
2392
|
+
y(a(U), {
|
|
2393
2393
|
name: "lock",
|
|
2394
2394
|
size: 18
|
|
2395
2395
|
})
|
|
@@ -2401,9 +2401,9 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2401
2401
|
_: 1
|
|
2402
2402
|
}),
|
|
2403
2403
|
e("div", ia, [
|
|
2404
|
-
y(
|
|
2404
|
+
y(a($t), {
|
|
2405
2405
|
modelValue: o.value,
|
|
2406
|
-
"onUpdate:modelValue": _[2] || (_[2] = (
|
|
2406
|
+
"onUpdate:modelValue": _[2] || (_[2] = (u) => o.value = u)
|
|
2407
2407
|
}, {
|
|
2408
2408
|
default: M(() => [..._[5] || (_[5] = [
|
|
2409
2409
|
he("记住我", -1)
|
|
@@ -2415,17 +2415,17 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2415
2415
|
class: "forgot-link"
|
|
2416
2416
|
}, "忘记密码?", -1))
|
|
2417
2417
|
]),
|
|
2418
|
-
y(
|
|
2418
|
+
y(a(Pe), null, {
|
|
2419
2419
|
default: M(() => [
|
|
2420
|
-
y(
|
|
2420
|
+
y(a(we), {
|
|
2421
2421
|
type: "primary",
|
|
2422
2422
|
size: "large",
|
|
2423
|
-
loading:
|
|
2423
|
+
loading: n.value,
|
|
2424
2424
|
class: "login-btn",
|
|
2425
|
-
onClick:
|
|
2425
|
+
onClick: m
|
|
2426
2426
|
}, {
|
|
2427
2427
|
default: M(() => [
|
|
2428
|
-
|
|
2428
|
+
n.value ? (s(), c("span", ua, "登录中...")) : (s(), c("span", ca, "登 录"))
|
|
2429
2429
|
]),
|
|
2430
2430
|
_: 1
|
|
2431
2431
|
}, 8, ["loading"])
|
|
@@ -2435,7 +2435,7 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2435
2435
|
]),
|
|
2436
2436
|
_: 1
|
|
2437
2437
|
}, 8, ["model"]),
|
|
2438
|
-
_[8] || (_[8] = Ue('<div class="form-footer" data-v-
|
|
2438
|
+
_[8] || (_[8] = Ue('<div class="form-footer" data-v-ef91e533><p data-v-ef91e533>其他登录方式</p><div class="social-login" data-v-ef91e533><button class="social-btn" title="企业微信" data-v-ef91e533><svg viewBox="0 0 24 24" fill="currentColor" data-v-ef91e533><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-ef91e533></path></svg></button><button class="social-btn" title="钉钉" data-v-ef91e533><svg viewBox="0 0 24 24" fill="currentColor" data-v-ef91e533><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-ef91e533></path></svg></button><button class="social-btn" title="飞书" data-v-ef91e533><svg viewBox="0 0 24 24" fill="currentColor" data-v-ef91e533><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-ef91e533></path></svg></button></div></div>', 1))
|
|
2439
2439
|
]),
|
|
2440
2440
|
_[9] || (_[9] = e("div", { class: "copyright" }, [
|
|
2441
2441
|
e("p", null, "© 2024 XTO Team. All rights reserved.")
|
|
@@ -2443,7 +2443,7 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2443
2443
|
])
|
|
2444
2444
|
]));
|
|
2445
2445
|
}
|
|
2446
|
-
}), ma = /* @__PURE__ */ re(
|
|
2446
|
+
}), ma = /* @__PURE__ */ re(da, [["__scopeId", "data-v-ef91e533"]]), pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2447
2447
|
__proto__: null,
|
|
2448
2448
|
default: ma
|
|
2449
2449
|
}, Symbol.toStringTag, { value: "Module" })), va = { class: "error-page" }, ha = { class: "error-container" }, _a = { class: "error-content" }, fa = { class: "error-actions" }, ga = /* @__PURE__ */ ae({
|
|
@@ -2452,7 +2452,7 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2452
2452
|
const r = me(), d = () => {
|
|
2453
2453
|
r.push("/");
|
|
2454
2454
|
};
|
|
2455
|
-
return (
|
|
2455
|
+
return (n, o) => (s(), c("div", va, [
|
|
2456
2456
|
e("div", ha, [
|
|
2457
2457
|
o[7] || (o[7] = e("div", { class: "error-bg" }, [
|
|
2458
2458
|
e("div", { class: "bg-circle circle-1" }),
|
|
@@ -2462,7 +2462,7 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2462
2462
|
e("div", _a, [
|
|
2463
2463
|
o[5] || (o[5] = Ue('<div class="error-code" data-v-1b083153><span class="code-digit" data-v-1b083153>4</span><span class="code-zero" data-v-1b083153><span class="zero-inner" data-v-1b083153>0</span></span><span class="code-digit" data-v-1b083153>4</span></div><div class="error-illustration" data-v-1b083153><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-1b083153><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--color-fill)" stroke="var(--color-border)" stroke-width="2" data-v-1b083153></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--bg-color)" data-v-1b083153></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--color-border-light)" stroke-width="2" data-v-1b083153></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--color-border-light)" stroke-width="2" data-v-1b083153></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--color-border-light)" stroke-width="2" data-v-1b083153></line><text x="100" y="75" text-anchor="middle" fill="var(--color-primary)" font-size="24" font-weight="600" data-v-1b083153>?</text><circle cx="150" cy="35" r="12" stroke="var(--color-primary)" stroke-width="2" fill="none" data-v-1b083153></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--color-primary)" stroke-width="2" stroke-linecap="round" data-v-1b083153></line></svg></div><h1 class="error-title" data-v-1b083153>页面不存在</h1><p class="error-desc" data-v-1b083153>抱歉,您访问的页面不存在或已被删除</p>', 4)),
|
|
2464
2464
|
e("div", fa, [
|
|
2465
|
-
y(
|
|
2465
|
+
y(a(we), {
|
|
2466
2466
|
type: "primary",
|
|
2467
2467
|
size: "large",
|
|
2468
2468
|
onClick: d
|
|
@@ -2483,9 +2483,9 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2483
2483
|
]),
|
|
2484
2484
|
_: 1
|
|
2485
2485
|
}),
|
|
2486
|
-
y(
|
|
2486
|
+
y(a(we), {
|
|
2487
2487
|
size: "large",
|
|
2488
|
-
onClick: o[0] || (o[0] = (i) =>
|
|
2488
|
+
onClick: o[0] || (o[0] = (i) => a(r).go(-1))
|
|
2489
2489
|
}, {
|
|
2490
2490
|
icon: M(() => [...o[3] || (o[3] = [
|
|
2491
2491
|
e("svg", {
|
|
@@ -2518,23 +2518,23 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2518
2518
|
}), ya = /* @__PURE__ */ re(ga, [["__scopeId", "data-v-1b083153"]]), ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2519
2519
|
__proto__: null,
|
|
2520
2520
|
default: ya
|
|
2521
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2521
|
+
}, Symbol.toStringTag, { value: "Module" })), ka = { class: "error-page" }, wa = { class: "error-container" }, ba = { class: "error-content" }, xa = { class: "error-actions" }, Ca = /* @__PURE__ */ ae({
|
|
2522
2522
|
__name: "403",
|
|
2523
2523
|
setup(t) {
|
|
2524
2524
|
const r = me(), d = () => {
|
|
2525
2525
|
r.push("/");
|
|
2526
2526
|
};
|
|
2527
|
-
return (
|
|
2528
|
-
e("div",
|
|
2527
|
+
return (n, o) => (s(), c("div", ka, [
|
|
2528
|
+
e("div", wa, [
|
|
2529
2529
|
o[7] || (o[7] = e("div", { class: "error-bg" }, [
|
|
2530
2530
|
e("div", { class: "bg-circle circle-1" }),
|
|
2531
2531
|
e("div", { class: "bg-circle circle-2" }),
|
|
2532
2532
|
e("div", { class: "bg-circle circle-3" })
|
|
2533
2533
|
], -1)),
|
|
2534
|
-
e("div",
|
|
2534
|
+
e("div", ba, [
|
|
2535
2535
|
o[5] || (o[5] = Ue('<div class="error-code" data-v-d167f981><span class="code-digit" data-v-d167f981>4</span><span class="code-zero warning" data-v-d167f981><span class="zero-inner" data-v-d167f981>0</span></span><span class="code-digit" data-v-d167f981>3</span></div><div class="error-illustration" data-v-d167f981><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d167f981><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(--color-warning-lighter)" stroke="var(--color-warning)" stroke-width="2" data-v-d167f981></path><rect x="85" y="55" width="30" height="25" rx="4" fill="var(--color-warning)" data-v-d167f981></rect><path d="M92 55 V48 A8 8 0 0 1 108 48 V55" fill="none" stroke="var(--color-warning)" stroke-width="3" data-v-d167f981></path><circle cx="100" cy="67" r="6" fill="none" stroke="#fff" stroke-width="2" data-v-d167f981></circle><line x1="96" y1="63" x2="104" y2="71" stroke="#fff" stroke-width="2" data-v-d167f981></line></svg></div><h1 class="error-title" data-v-d167f981>无访问权限</h1><p class="error-desc" data-v-d167f981>抱歉,您没有权限访问此页面,请联系管理员获取权限</p>', 4)),
|
|
2536
2536
|
e("div", xa, [
|
|
2537
|
-
y(
|
|
2537
|
+
y(a(we), {
|
|
2538
2538
|
type: "primary",
|
|
2539
2539
|
size: "large",
|
|
2540
2540
|
onClick: d
|
|
@@ -2555,9 +2555,9 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2555
2555
|
]),
|
|
2556
2556
|
_: 1
|
|
2557
2557
|
}),
|
|
2558
|
-
y(
|
|
2558
|
+
y(a(we), {
|
|
2559
2559
|
size: "large",
|
|
2560
|
-
onClick: o[0] || (o[0] = (i) =>
|
|
2560
|
+
onClick: o[0] || (o[0] = (i) => a(r).go(-1))
|
|
2561
2561
|
}, {
|
|
2562
2562
|
icon: M(() => [...o[3] || (o[3] = [
|
|
2563
2563
|
e("svg", {
|
|
@@ -2587,16 +2587,16 @@ const Fa = /* @__PURE__ */ re(ea, [["render", sa], ["__scopeId", "data-v-4852826
|
|
|
2587
2587
|
])
|
|
2588
2588
|
]));
|
|
2589
2589
|
}
|
|
2590
|
-
}),
|
|
2591
|
-
function
|
|
2592
|
-
const t =
|
|
2590
|
+
}), ja = /* @__PURE__ */ re(Ca, [["__scopeId", "data-v-d167f981"]]);
|
|
2591
|
+
function Wa() {
|
|
2592
|
+
const t = ue(), r = le(), d = ze(), n = w(() => r.userName || ""), o = w(() => r.userInfo), i = w(() => t.appName), h = w(() => d.isLoggedIn), v = w(() => t.isDark), m = w(() => t.theme), f = w(() => t.isCollapsed), _ = w(() => t.layout);
|
|
2593
2593
|
return {
|
|
2594
|
-
userName:
|
|
2594
|
+
userName: n,
|
|
2595
2595
|
userInfo: o,
|
|
2596
2596
|
appName: i,
|
|
2597
|
-
isLoggedIn:
|
|
2598
|
-
isDark:
|
|
2599
|
-
theme:
|
|
2597
|
+
isLoggedIn: h,
|
|
2598
|
+
isDark: v,
|
|
2599
|
+
theme: m,
|
|
2600
2600
|
isCollapsed: f,
|
|
2601
2601
|
layout: _,
|
|
2602
2602
|
toggleTheme: () => {
|
|
@@ -2607,20 +2607,20 @@ function ja() {
|
|
|
2607
2607
|
}
|
|
2608
2608
|
};
|
|
2609
2609
|
}
|
|
2610
|
-
function
|
|
2610
|
+
function qa() {
|
|
2611
2611
|
const t = le();
|
|
2612
2612
|
return {
|
|
2613
2613
|
isLoggedIn: w(() => t.isLoggedIn)
|
|
2614
2614
|
};
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2617
|
-
const { rules: d, onSubmit:
|
|
2618
|
-
|
|
2616
|
+
function Ha(t, r = {}) {
|
|
2617
|
+
const { rules: d, onSubmit: n } = r, o = g(), i = qe({ ...t }), h = g(!1), v = g(!1), m = g(!1), f = () => {
|
|
2618
|
+
$(), m.value = !1, v.value = !0;
|
|
2619
2619
|
}, _ = (D) => {
|
|
2620
|
-
Object.assign(i, D),
|
|
2621
|
-
},
|
|
2622
|
-
|
|
2623
|
-
},
|
|
2620
|
+
Object.assign(i, D), m.value = !0, v.value = !0;
|
|
2621
|
+
}, u = () => {
|
|
2622
|
+
v.value = !1, $();
|
|
2623
|
+
}, $ = () => {
|
|
2624
2624
|
var D;
|
|
2625
2625
|
Object.keys(t).forEach((W) => {
|
|
2626
2626
|
i[W] = t[W];
|
|
@@ -2630,92 +2630,92 @@ function qa(t, r = {}) {
|
|
|
2630
2630
|
formRef: o,
|
|
2631
2631
|
formData: i,
|
|
2632
2632
|
rules: d,
|
|
2633
|
-
loading:
|
|
2634
|
-
visible:
|
|
2635
|
-
isEdit:
|
|
2633
|
+
loading: h,
|
|
2634
|
+
visible: v,
|
|
2635
|
+
isEdit: m,
|
|
2636
2636
|
openAdd: f,
|
|
2637
2637
|
openEdit: _,
|
|
2638
|
-
close:
|
|
2639
|
-
resetForm:
|
|
2638
|
+
close: u,
|
|
2639
|
+
resetForm: $,
|
|
2640
2640
|
handleSubmit: async () => {
|
|
2641
2641
|
var D;
|
|
2642
2642
|
try {
|
|
2643
|
-
await ((D = o.value) == null ? void 0 : D.validate()),
|
|
2643
|
+
await ((D = o.value) == null ? void 0 : D.validate()), h.value = !0, await (n == null ? void 0 : n(i)), u();
|
|
2644
2644
|
} catch (W) {
|
|
2645
2645
|
console.error(W);
|
|
2646
2646
|
} finally {
|
|
2647
|
-
|
|
2647
|
+
h.value = !1;
|
|
2648
2648
|
}
|
|
2649
2649
|
}
|
|
2650
2650
|
};
|
|
2651
2651
|
}
|
|
2652
|
-
function
|
|
2653
|
-
const { fetchData: r, defaultPageSize: d = 10 } = t,
|
|
2654
|
-
|
|
2652
|
+
function Ya(t) {
|
|
2653
|
+
const { fetchData: r, defaultPageSize: d = 10 } = t, n = g(!1), o = g([]), i = g(0), h = g(1), v = g(d), m = qe({}), f = async () => {
|
|
2654
|
+
n.value = !0;
|
|
2655
2655
|
try {
|
|
2656
2656
|
const V = {
|
|
2657
|
-
...
|
|
2658
|
-
page:
|
|
2659
|
-
pageSize:
|
|
2657
|
+
...m,
|
|
2658
|
+
page: h.value,
|
|
2659
|
+
pageSize: v.value
|
|
2660
2660
|
}, B = await r(V);
|
|
2661
2661
|
o.value = B.list, i.value = B.total;
|
|
2662
2662
|
} catch (V) {
|
|
2663
2663
|
console.error(V);
|
|
2664
2664
|
} finally {
|
|
2665
|
-
|
|
2665
|
+
n.value = !1;
|
|
2666
2666
|
}
|
|
2667
2667
|
}, _ = () => {
|
|
2668
|
-
|
|
2669
|
-
},
|
|
2670
|
-
Object.keys(
|
|
2671
|
-
|
|
2672
|
-
}),
|
|
2673
|
-
},
|
|
2674
|
-
|
|
2668
|
+
h.value = 1, f();
|
|
2669
|
+
}, u = () => {
|
|
2670
|
+
Object.keys(m).forEach((V) => {
|
|
2671
|
+
m[V] = void 0;
|
|
2672
|
+
}), h.value = 1, f();
|
|
2673
|
+
}, $ = (V) => {
|
|
2674
|
+
h.value = V, f();
|
|
2675
2675
|
}, j = (V) => {
|
|
2676
|
-
|
|
2676
|
+
v.value = V, h.value = 1, f();
|
|
2677
2677
|
}, D = () => {
|
|
2678
2678
|
f();
|
|
2679
2679
|
}, W = w(() => ({
|
|
2680
|
-
current:
|
|
2681
|
-
pageSize:
|
|
2680
|
+
current: h.value,
|
|
2681
|
+
pageSize: v.value,
|
|
2682
2682
|
total: i.value
|
|
2683
2683
|
}));
|
|
2684
2684
|
return {
|
|
2685
|
-
loading:
|
|
2685
|
+
loading: n,
|
|
2686
2686
|
data: o,
|
|
2687
2687
|
total: i,
|
|
2688
|
-
currentPage:
|
|
2689
|
-
pageSize:
|
|
2690
|
-
searchParams:
|
|
2688
|
+
currentPage: h,
|
|
2689
|
+
pageSize: v,
|
|
2690
|
+
searchParams: m,
|
|
2691
2691
|
pagination: W,
|
|
2692
2692
|
getData: f,
|
|
2693
2693
|
handleSearch: _,
|
|
2694
|
-
handleReset:
|
|
2695
|
-
handlePageChange:
|
|
2694
|
+
handleReset: u,
|
|
2695
|
+
handlePageChange: $,
|
|
2696
2696
|
handleSizeChange: j,
|
|
2697
2697
|
refresh: D
|
|
2698
2698
|
};
|
|
2699
2699
|
}
|
|
2700
|
-
const Je =
|
|
2701
|
-
const t =
|
|
2702
|
-
const
|
|
2703
|
-
return (
|
|
2700
|
+
const Je = Ie("locale", () => {
|
|
2701
|
+
const t = I.get("locale") || "zh-CN", r = Lt(t), d = g(t), n = Mt(), { t: o, messages: i, setLocale: h, mergeMessages: v } = St(), m = w(() => {
|
|
2702
|
+
const $ = n.find((j) => j.code === d.value);
|
|
2703
|
+
return ($ == null ? void 0 : $.name) || d.value;
|
|
2704
2704
|
});
|
|
2705
2705
|
return {
|
|
2706
2706
|
locale: d,
|
|
2707
|
-
localeName:
|
|
2708
|
-
locales:
|
|
2707
|
+
localeName: m,
|
|
2708
|
+
locales: n,
|
|
2709
2709
|
messages: i,
|
|
2710
2710
|
t: o,
|
|
2711
|
-
changeLocale: (
|
|
2712
|
-
d.value =
|
|
2711
|
+
changeLocale: ($) => {
|
|
2712
|
+
d.value = $, h($), I.set("locale", $), r.setLocale($);
|
|
2713
2713
|
},
|
|
2714
|
-
addMessages: (
|
|
2715
|
-
|
|
2714
|
+
addMessages: ($) => {
|
|
2715
|
+
v($);
|
|
2716
2716
|
},
|
|
2717
2717
|
initLocale: () => {
|
|
2718
|
-
|
|
2718
|
+
h(t);
|
|
2719
2719
|
},
|
|
2720
2720
|
provider: r
|
|
2721
2721
|
};
|
|
@@ -2723,7 +2723,7 @@ const Je = Ne("locale", () => {
|
|
|
2723
2723
|
__proto__: null,
|
|
2724
2724
|
useLocaleStore: Je
|
|
2725
2725
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2726
|
-
function
|
|
2726
|
+
function Xa() {
|
|
2727
2727
|
const t = Je();
|
|
2728
2728
|
return {
|
|
2729
2729
|
/** 当前语言代码 */
|
|
@@ -2742,20 +2742,20 @@ function Ya() {
|
|
|
2742
2742
|
addMessages: t.addMessages
|
|
2743
2743
|
};
|
|
2744
2744
|
}
|
|
2745
|
-
function
|
|
2745
|
+
function Ga() {
|
|
2746
2746
|
return Je().t;
|
|
2747
2747
|
}
|
|
2748
|
-
function
|
|
2749
|
-
const r = le(), d =
|
|
2748
|
+
function Ja(t) {
|
|
2749
|
+
const r = le(), d = de();
|
|
2750
2750
|
return r.isLoggedIn ? d.hasPermission(t) : !1;
|
|
2751
2751
|
}
|
|
2752
|
-
function
|
|
2752
|
+
function Za(t) {
|
|
2753
2753
|
return le().isLoggedIn;
|
|
2754
2754
|
}
|
|
2755
|
-
function
|
|
2755
|
+
function Qa() {
|
|
2756
2756
|
return !0;
|
|
2757
2757
|
}
|
|
2758
|
-
const
|
|
2758
|
+
const ut = [
|
|
2759
2759
|
{
|
|
2760
2760
|
path: "/login",
|
|
2761
2761
|
name: "Login",
|
|
@@ -2765,7 +2765,7 @@ const dt = [
|
|
|
2765
2765
|
hidden: !0
|
|
2766
2766
|
}
|
|
2767
2767
|
}
|
|
2768
|
-
],
|
|
2768
|
+
], dt = {
|
|
2769
2769
|
path: "/",
|
|
2770
2770
|
name: "Layout",
|
|
2771
2771
|
component: () => Promise.resolve().then(() => Xn),
|
|
@@ -2774,7 +2774,7 @@ const dt = [
|
|
|
2774
2774
|
{
|
|
2775
2775
|
path: "/dashboard",
|
|
2776
2776
|
name: "Dashboard",
|
|
2777
|
-
component: () => import("./index-
|
|
2777
|
+
component: () => import("./index-BnkXUVuB.js"),
|
|
2778
2778
|
meta: {
|
|
2779
2779
|
title: "仪表盘",
|
|
2780
2780
|
icon: "dashboard",
|
|
@@ -2785,7 +2785,7 @@ const dt = [
|
|
|
2785
2785
|
{
|
|
2786
2786
|
path: "/system/user",
|
|
2787
2787
|
name: "SystemUser",
|
|
2788
|
-
component: () => import("./index-
|
|
2788
|
+
component: () => import("./index-Nz8stCJl.js"),
|
|
2789
2789
|
meta: {
|
|
2790
2790
|
title: "用户管理",
|
|
2791
2791
|
icon: "user",
|
|
@@ -2795,7 +2795,7 @@ const dt = [
|
|
|
2795
2795
|
{
|
|
2796
2796
|
path: "/system/role",
|
|
2797
2797
|
name: "SystemRole",
|
|
2798
|
-
component: () => import("./index-
|
|
2798
|
+
component: () => import("./index-01f4mTJg.js"),
|
|
2799
2799
|
meta: {
|
|
2800
2800
|
title: "角色管理",
|
|
2801
2801
|
icon: "role",
|
|
@@ -2805,7 +2805,7 @@ const dt = [
|
|
|
2805
2805
|
{
|
|
2806
2806
|
path: "/system/menu",
|
|
2807
2807
|
name: "SystemMenu",
|
|
2808
|
-
component: () => import("./index-
|
|
2808
|
+
component: () => import("./index-ddj4tPtc.js"),
|
|
2809
2809
|
meta: {
|
|
2810
2810
|
title: "菜单管理",
|
|
2811
2811
|
icon: "menu",
|
|
@@ -2823,11 +2823,11 @@ const dt = [
|
|
|
2823
2823
|
}
|
|
2824
2824
|
}
|
|
2825
2825
|
]
|
|
2826
|
-
},
|
|
2826
|
+
}, el = [
|
|
2827
2827
|
{
|
|
2828
2828
|
path: "/dashboard",
|
|
2829
2829
|
name: "Dashboard",
|
|
2830
|
-
component: () => import("./index-
|
|
2830
|
+
component: () => import("./index-BnkXUVuB.js"),
|
|
2831
2831
|
meta: {
|
|
2832
2832
|
title: "仪表盘",
|
|
2833
2833
|
icon: "dashboard",
|
|
@@ -2847,7 +2847,7 @@ const dt = [
|
|
|
2847
2847
|
{
|
|
2848
2848
|
path: "user",
|
|
2849
2849
|
name: "SystemUser",
|
|
2850
|
-
component: () => import("./index-
|
|
2850
|
+
component: () => import("./index-Nz8stCJl.js"),
|
|
2851
2851
|
meta: {
|
|
2852
2852
|
title: "用户管理",
|
|
2853
2853
|
icon: "user",
|
|
@@ -2857,7 +2857,7 @@ const dt = [
|
|
|
2857
2857
|
{
|
|
2858
2858
|
path: "role",
|
|
2859
2859
|
name: "SystemRole",
|
|
2860
|
-
component: () => import("./index-
|
|
2860
|
+
component: () => import("./index-01f4mTJg.js"),
|
|
2861
2861
|
meta: {
|
|
2862
2862
|
title: "角色管理",
|
|
2863
2863
|
icon: "role",
|
|
@@ -2867,7 +2867,7 @@ const dt = [
|
|
|
2867
2867
|
{
|
|
2868
2868
|
path: "menu",
|
|
2869
2869
|
name: "SystemMenu",
|
|
2870
|
-
component: () => import("./index-
|
|
2870
|
+
component: () => import("./index-ddj4tPtc.js"),
|
|
2871
2871
|
meta: {
|
|
2872
2872
|
title: "菜单管理",
|
|
2873
2873
|
icon: "menu",
|
|
@@ -2926,12 +2926,12 @@ const dt = [
|
|
|
2926
2926
|
}
|
|
2927
2927
|
], mt = He({
|
|
2928
2928
|
history: Ye(),
|
|
2929
|
-
routes: [...
|
|
2929
|
+
routes: [...ut, dt],
|
|
2930
2930
|
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
2931
2931
|
}), Ma = ["/login"];
|
|
2932
2932
|
mt.beforeEach(async (t, r, d) => {
|
|
2933
|
-
const
|
|
2934
|
-
if (
|
|
2933
|
+
const n = ue();
|
|
2934
|
+
if (n.initTheme(), st())
|
|
2935
2935
|
if (t.path === "/login")
|
|
2936
2936
|
d({ path: "/" });
|
|
2937
2937
|
else {
|
|
@@ -2945,20 +2945,20 @@ mt.beforeEach(async (t, r, d) => {
|
|
|
2945
2945
|
mobilePhone: "13800138000",
|
|
2946
2946
|
positionName: "管理员",
|
|
2947
2947
|
avatar: ""
|
|
2948
|
-
}),
|
|
2948
|
+
}), de().setMenuList(La)), t.name && t.meta.keepAlive && n.addCachedView(t.name), d();
|
|
2949
2949
|
}
|
|
2950
2950
|
else
|
|
2951
2951
|
Ma.includes(t.path) ? d() : d("/login");
|
|
2952
2952
|
});
|
|
2953
|
-
function
|
|
2953
|
+
function tl() {
|
|
2954
2954
|
const t = He({
|
|
2955
2955
|
history: Ye(),
|
|
2956
|
-
routes: [...
|
|
2956
|
+
routes: [...ut, dt]
|
|
2957
2957
|
});
|
|
2958
2958
|
mt.matcher = t.matcher;
|
|
2959
2959
|
}
|
|
2960
|
-
function
|
|
2961
|
-
const d = r.indexPath || "/dashboard",
|
|
2960
|
+
function sl(t, r = {}) {
|
|
2961
|
+
const d = r.indexPath || "/dashboard", n = r.logoSrc || "/vite.svg", o = {
|
|
2962
2962
|
path: "/:pathMatch(.*)*",
|
|
2963
2963
|
name: "CatchAll",
|
|
2964
2964
|
component: () => Promise.resolve().then(() => ct),
|
|
@@ -2972,68 +2972,73 @@ function tl(t, r = {}) {
|
|
|
2972
2972
|
component: ae({
|
|
2973
2973
|
name: "LayoutWrapper",
|
|
2974
2974
|
render() {
|
|
2975
|
-
return
|
|
2975
|
+
return kt(it, { logoSrc: n });
|
|
2976
2976
|
}
|
|
2977
2977
|
}),
|
|
2978
2978
|
redirect: d,
|
|
2979
2979
|
children: [...t, o]
|
|
2980
2980
|
};
|
|
2981
2981
|
}
|
|
2982
|
-
function
|
|
2982
|
+
function ol(t, r = {}) {
|
|
2983
2983
|
return He({
|
|
2984
2984
|
history: Ye(r.base),
|
|
2985
2985
|
routes: t,
|
|
2986
2986
|
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
2987
2987
|
});
|
|
2988
2988
|
}
|
|
2989
|
-
const Sa = ["/login", "/404", "/403"];
|
|
2990
|
-
function
|
|
2989
|
+
const Sa = ["login", "404", "403", "/login", "/404", "/403"];
|
|
2990
|
+
function Na(t, r) {
|
|
2991
|
+
if (r.includes(t)) return !0;
|
|
2992
|
+
const d = t.startsWith("/") ? t.slice(1) : t;
|
|
2993
|
+
return r.includes(d);
|
|
2994
|
+
}
|
|
2995
|
+
function nl(t, r = {}) {
|
|
2991
2996
|
const d = r.whiteList || Sa;
|
|
2992
|
-
t.beforeEach(async (
|
|
2993
|
-
const
|
|
2994
|
-
if (
|
|
2995
|
-
if (
|
|
2996
|
-
i({
|
|
2997
|
-
else if (
|
|
2998
|
-
|
|
2997
|
+
t.beforeEach(async (n, o, i) => {
|
|
2998
|
+
const h = ue(), v = le(), m = de(), f = h.loginPath || r.loginPath || "/login";
|
|
2999
|
+
if (h.initTheme(), tt())
|
|
3000
|
+
if (n.path === f || n.name === "Login")
|
|
3001
|
+
i({ name: "Dashboard" });
|
|
3002
|
+
else if (v.isLoggedIn)
|
|
3003
|
+
n.name && n.meta.keepAlive && h.addCachedView(n.name), i();
|
|
2999
3004
|
else
|
|
3000
3005
|
try {
|
|
3001
3006
|
if (r.fetchUserInfo) {
|
|
3002
|
-
const
|
|
3003
|
-
|
|
3007
|
+
const u = await r.fetchUserInfo();
|
|
3008
|
+
v.setUserInfo(u);
|
|
3004
3009
|
} else {
|
|
3005
|
-
const
|
|
3006
|
-
|
|
3010
|
+
const u = await vt();
|
|
3011
|
+
v.setUserInfo(u);
|
|
3007
3012
|
}
|
|
3008
3013
|
if (r.fetchMenu) {
|
|
3009
|
-
const
|
|
3010
|
-
|
|
3014
|
+
const u = await r.fetchMenu();
|
|
3015
|
+
m.setMenuList(u);
|
|
3011
3016
|
} else {
|
|
3012
|
-
const
|
|
3013
|
-
|
|
3017
|
+
const u = await ht(r.appId);
|
|
3018
|
+
m.setMenuList(u);
|
|
3014
3019
|
}
|
|
3015
|
-
r.onLoginSuccess && r.onLoginSuccess(),
|
|
3016
|
-
} catch (
|
|
3017
|
-
console.error("获取用户信息失败:",
|
|
3020
|
+
r.onLoginSuccess && r.onLoginSuccess(), n.name && n.meta.keepAlive && h.addCachedView(n.name), i({ ...n, replace: !0 });
|
|
3021
|
+
} catch (u) {
|
|
3022
|
+
console.error("获取用户信息失败:", u), v.clearUserInfo(), m.clearMenu(), ot(), i({ name: "Login", query: { redirect: n.fullPath } });
|
|
3018
3023
|
}
|
|
3019
3024
|
else
|
|
3020
|
-
|
|
3025
|
+
Na(n.path, d) || n.name === "Login" || n.name === "NotFound" || n.name === "Forbidden" ? i() : i({ name: "Login", query: { redirect: n.fullPath } });
|
|
3021
3026
|
}), t.afterEach(() => {
|
|
3022
3027
|
});
|
|
3023
3028
|
}
|
|
3024
|
-
var Ia = /* @__PURE__ */ ((t) => (t[t.ENABLED = 1] = "ENABLED", t[t.DISABLED = 0] = "DISABLED", t))(Ia || {}),
|
|
3025
|
-
const
|
|
3029
|
+
var Ia = /* @__PURE__ */ ((t) => (t[t.ENABLED = 1] = "ENABLED", t[t.DISABLED = 0] = "DISABLED", t))(Ia || {}), za = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.MALE = 1] = "MALE", t[t.FEMALE = 2] = "FEMALE", t))(za || {}), Ua = /* @__PURE__ */ ((t) => (t[t.DIRECTORY = 0] = "DIRECTORY", t[t.MENU = 1] = "MENU", t[t.BUTTON = 2] = "BUTTON", t))(Ua || {});
|
|
3030
|
+
const al = {
|
|
3026
3031
|
1: "启用",
|
|
3027
3032
|
0: "禁用"
|
|
3028
|
-
},
|
|
3033
|
+
}, ll = {
|
|
3029
3034
|
0: "未知",
|
|
3030
3035
|
1: "男",
|
|
3031
3036
|
2: "女"
|
|
3032
|
-
},
|
|
3037
|
+
}, rl = {
|
|
3033
3038
|
0: "目录",
|
|
3034
3039
|
1: "菜单",
|
|
3035
3040
|
2: "按钮"
|
|
3036
|
-
},
|
|
3041
|
+
}, il = [
|
|
3037
3042
|
{
|
|
3038
3043
|
label: "启用",
|
|
3039
3044
|
value: 1
|
|
@@ -3044,7 +3049,7 @@ const nl = {
|
|
|
3044
3049
|
value: 0
|
|
3045
3050
|
/* DISABLED */
|
|
3046
3051
|
}
|
|
3047
|
-
],
|
|
3052
|
+
], cl = [
|
|
3048
3053
|
{
|
|
3049
3054
|
label: "未知",
|
|
3050
3055
|
value: 0
|
|
@@ -3060,7 +3065,7 @@ const nl = {
|
|
|
3060
3065
|
value: 2
|
|
3061
3066
|
/* FEMALE */
|
|
3062
3067
|
}
|
|
3063
|
-
],
|
|
3068
|
+
], ul = [
|
|
3064
3069
|
{
|
|
3065
3070
|
label: "目录",
|
|
3066
3071
|
value: 0
|
|
@@ -3078,22 +3083,22 @@ const nl = {
|
|
|
3078
3083
|
}
|
|
3079
3084
|
], dl = {
|
|
3080
3085
|
mounted(t, r) {
|
|
3081
|
-
var
|
|
3082
|
-
const d = le(),
|
|
3086
|
+
var h, v;
|
|
3087
|
+
const d = le(), n = de();
|
|
3083
3088
|
if (!d.isLoggedIn) {
|
|
3084
|
-
(
|
|
3089
|
+
(h = t.parentNode) == null || h.removeChild(t);
|
|
3085
3090
|
return;
|
|
3086
3091
|
}
|
|
3087
3092
|
const o = r.value, i = Array.isArray(o) ? o : [o];
|
|
3088
|
-
|
|
3093
|
+
n.hasPermission(i) || (v = t.parentNode) == null || v.removeChild(t);
|
|
3089
3094
|
}
|
|
3090
3095
|
};
|
|
3091
|
-
function
|
|
3096
|
+
function ml(t) {
|
|
3092
3097
|
return _t({
|
|
3093
3098
|
appId: t.appId,
|
|
3094
3099
|
clientId: t.clientId,
|
|
3095
3100
|
apiBaseUrl: t.apiBaseUrl
|
|
3096
|
-
}), Promise.resolve().then(() =>
|
|
3101
|
+
}), Promise.resolve().then(() => Nt).then(({ useAppStore: r }) => {
|
|
3097
3102
|
const d = r();
|
|
3098
3103
|
t.appName && d.setAppName(t.appName), t.indexPath && d.setIndexPath(t.indexPath), t.loginPath && d.setLoginPath(t.loginPath);
|
|
3099
3104
|
}), t.locale && Promise.resolve().then(() => $a).then(({ useLocaleStore: r }) => {
|
|
@@ -3111,47 +3116,47 @@ function ul(t) {
|
|
|
3111
3116
|
};
|
|
3112
3117
|
}
|
|
3113
3118
|
export {
|
|
3114
|
-
|
|
3115
|
-
|
|
3119
|
+
ue as A,
|
|
3120
|
+
qa as B,
|
|
3116
3121
|
ze as C,
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3122
|
+
Ha as D,
|
|
3123
|
+
Xa as E,
|
|
3124
|
+
Ka as F,
|
|
3125
|
+
za as G,
|
|
3121
3126
|
Ps as H,
|
|
3122
3127
|
Je as I,
|
|
3123
|
-
|
|
3124
|
-
|
|
3128
|
+
de as J,
|
|
3129
|
+
Ya as K,
|
|
3125
3130
|
it as L,
|
|
3126
|
-
|
|
3131
|
+
Ua as M,
|
|
3127
3132
|
le as N,
|
|
3128
3133
|
Ia as S,
|
|
3129
|
-
|
|
3134
|
+
Fa as T,
|
|
3130
3135
|
re as _,
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3136
|
+
il as a,
|
|
3137
|
+
ul as b,
|
|
3138
|
+
ja as c,
|
|
3139
|
+
cl as d,
|
|
3140
|
+
ll as e,
|
|
3141
|
+
rl as f,
|
|
3137
3142
|
ya as g,
|
|
3138
3143
|
et as h,
|
|
3139
3144
|
ma as i,
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3145
|
+
al as j,
|
|
3146
|
+
sl as k,
|
|
3147
|
+
ol as l,
|
|
3148
|
+
Ga as m,
|
|
3149
|
+
ml as n,
|
|
3150
|
+
el as o,
|
|
3151
|
+
Ja as p,
|
|
3152
|
+
Za as q,
|
|
3153
|
+
Qa as r,
|
|
3154
|
+
dt as s,
|
|
3150
3155
|
La as t,
|
|
3151
3156
|
dl as u,
|
|
3152
|
-
|
|
3157
|
+
tl as v,
|
|
3153
3158
|
mt as w,
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3159
|
+
nl as x,
|
|
3160
|
+
ut as y,
|
|
3161
|
+
Wa as z
|
|
3157
3162
|
};
|