xto-fronted 0.9.8 → 0.9.10
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/components/TableActions.vue.d.ts +11 -0
- package/dist/{index-DMUFTG7s.js → index-B1Mm04GL.js} +1 -1
- package/dist/{index-BK1apsCp.js → index-BXcy4Waf.js} +1 -1
- package/dist/{index-BVJQ19TI.js → index-CEMQH6PX.js} +1 -1
- package/dist/{index-DaMmGfCF.js → index-ChjL51Io.js} +1 -1
- package/dist/{index-BWXq-6ka.js → index-DJkhFYHs.js} +1082 -1012
- package/dist/index.d.ts +1 -0
- package/dist/index.js +82 -81
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/styles/index.scss +3 -2
- package/src/components/TableActions.vue +142 -0
- package/src/index.ts +1 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { y as U, z as nt, A as Se, B as
|
|
2
|
-
import { ref as
|
|
1
|
+
import { y as U, z as nt, A as Se, B as dt, C as mt, D as pt, E as vt, F as ze, p as wt, G as ht, H as xt, j as lt, n as Ct, I as $t, J as rt, K as Lt, L as Mt, M as St, h as It, N as Et } from "./user-B0q24FmO.js";
|
|
2
|
+
import { ref as b, computed as k, watch as Le, defineComponent as ae, resolveComponent as ke, openBlock as a, createBlock as P, unref as n, withCtx as x, createElementBlock as d, Fragment as K, renderList as G, createTextVNode as oe, toDisplayString as C, normalizeClass as H, createElementVNode as e, withDirectives as Be, vShow as Nt, createCommentVNode as F, createVNode as y, onMounted as Oe, onUnmounted as Xe, vModelText as Je, Transition as Ie, withModifiers as Ve, normalizeStyle as Ee, nextTick as Re, onUpdated as Tt, renderSlot as De, createSlots as Ut, useSlots as zt, Comment as Pt, resolveDynamicComponent as it, cloneVNode as Ft, reactive as Qe, createStaticVNode as Ae, withKeys as Dt, h as At } from "vue";
|
|
3
3
|
import { defineStore as Pe } from "pinia";
|
|
4
|
-
import { useRoute as
|
|
5
|
-
import { SubMenu as Ge, MenuItem as
|
|
6
|
-
import { Icon as E, Button as
|
|
7
|
-
import { Drawer as st, Message as
|
|
8
|
-
import { Form as
|
|
9
|
-
import { createLocaleProvider as
|
|
10
|
-
function
|
|
4
|
+
import { useRoute as Te, useRouter as we, createRouter as Ze, createWebHistory as et } from "vue-router";
|
|
5
|
+
import { SubMenu as Ge, MenuItem as Ue, Menu as tt, Tabs as Bt, TabPane as Ot, Dropdown as Vt, DropdownMenu as Rt, DropdownItem as Kt } from "@xto/navigation";
|
|
6
|
+
import { Icon as E, Button as Ne } from "@xto/base";
|
|
7
|
+
import { Drawer as st, Message as jt } from "@xto/feedback";
|
|
8
|
+
import { Form as Wt, FormItem as Ke, Input as ct, Checkbox as qt } from "@xto/form";
|
|
9
|
+
import { createLocaleProvider as Ht, getSupportedLocales as Yt, useLocale as Gt } from "@xto/core/locale";
|
|
10
|
+
function Xt(t) {
|
|
11
11
|
const o = /^#?([0-9a-f]{6})$/i.exec(t.trim());
|
|
12
12
|
if (!o) return null;
|
|
13
13
|
const p = parseInt(o[1], 16);
|
|
@@ -17,51 +17,51 @@ function Me(t) {
|
|
|
17
17
|
const o = U.get(t);
|
|
18
18
|
return o === null || o === "" ? void 0 : o;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
const t = nt(), o = t.features || {}, p =
|
|
20
|
+
const Jt = ["layout", "primaryColor", "theme", "isDark", "showTabs", "showBreadcrumb", "showFooter"], fe = Pe("app", () => {
|
|
21
|
+
const t = nt(), o = t.features || {}, p = b(U.get("appName") || "XTO App"), l = b(U.get("indexPath") || "/dashboard"), s = b(U.get("loginPath") || "/login"), m = b(t.theme ?? Me("theme") ?? "light"), r = b(m.value === "dark"), v = b(t.layout ?? Me("layout") ?? "sidebar"), h = b(U.get("isCollapsed") || !1), u = b(o.showTabs ?? Me("showTabs") ?? !0), f = b(o.showFooter ?? Me("showFooter") ?? !0), g = b(o.showBreadcrumb ?? Me("showBreadcrumb") ?? !0), c = b(t.primaryColor ?? Me("primaryColor") ?? "#4F46E5"), V = b(t.allowUserOverride !== !1), z = b([]), D = b([]), O = k(() => r.value ? "dark" : "light"), R = (S) => {
|
|
22
22
|
p.value = S, U.set("appName", S);
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
},
|
|
23
|
+
}, W = (S) => {
|
|
24
|
+
l.value = S, U.set("indexPath", S);
|
|
25
|
+
}, Z = (S) => {
|
|
26
26
|
s.value = S, U.set("loginPath", S);
|
|
27
|
-
},
|
|
27
|
+
}, J = () => {
|
|
28
28
|
const S = document.documentElement;
|
|
29
29
|
r.value ? S.classList.add("dark") : S.classList.remove("dark");
|
|
30
30
|
}, ee = () => {
|
|
31
|
-
r.value = !r.value,
|
|
32
|
-
},
|
|
33
|
-
|
|
31
|
+
r.value = !r.value, m.value = r.value ? "dark" : "light", te();
|
|
32
|
+
}, X = (S) => {
|
|
33
|
+
m.value = S, r.value = S === "dark", te();
|
|
34
34
|
}, te = () => {
|
|
35
|
-
|
|
35
|
+
J(), U.set("isDark", r.value), U.set("theme", m.value);
|
|
36
36
|
}, B = () => {
|
|
37
|
-
|
|
37
|
+
h.value = !h.value, U.set("isCollapsed", h.value);
|
|
38
38
|
}, N = (S) => {
|
|
39
39
|
v.value = S, U.set("layout", S);
|
|
40
40
|
}, A = () => {
|
|
41
|
-
|
|
42
|
-
},
|
|
41
|
+
u.value = !u.value, U.set("showTabs", u.value);
|
|
42
|
+
}, Q = () => {
|
|
43
43
|
f.value = !f.value, U.set("showFooter", f.value);
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
},
|
|
44
|
+
}, q = () => {
|
|
45
|
+
g.value = !g.value, U.set("showBreadcrumb", g.value);
|
|
46
|
+
}, le = (S) => {
|
|
47
47
|
const Y = document.documentElement;
|
|
48
48
|
Y.style.setProperty("--xto-color-primary", S);
|
|
49
|
-
const ve =
|
|
49
|
+
const ve = Xt(S);
|
|
50
50
|
if (ve) {
|
|
51
|
-
const he = (ie,
|
|
52
|
-
const be =
|
|
53
|
-
return `#${ve.map((T,
|
|
51
|
+
const he = (ie, Ce) => {
|
|
52
|
+
const be = Ce ? [255, 255, 255] : [0, 0, 0];
|
|
53
|
+
return `#${ve.map((T, w) => Math.round(T + (be[w] - T) * ie)).map((T) => T.toString(16).padStart(2, "0")).join("")}`;
|
|
54
54
|
};
|
|
55
55
|
for (let ie = 1; ie <= 9; ie++)
|
|
56
56
|
Y.style.setProperty(`--xto-color-primary-light-${ie}`, he(ie * 0.1, !0));
|
|
57
57
|
Y.style.setProperty("--xto-color-primary-dark-1", he(0.12, !1)), Y.style.setProperty("--xto-color-primary-dark-2", he(0.28, !1)), Y.style.setProperty("--xto-color-primary-dark-3", he(0.45, !1)), Y.style.setProperty("--xto-color-ring", S);
|
|
58
58
|
}
|
|
59
59
|
}, _e = (S) => {
|
|
60
|
-
c.value = S,
|
|
61
|
-
},
|
|
62
|
-
|
|
60
|
+
c.value = S, le(S), U.set("primaryColor", S);
|
|
61
|
+
}, xe = () => {
|
|
62
|
+
Jt.forEach((ve) => U.remove(ve));
|
|
63
63
|
const S = nt(), Y = S.features || {};
|
|
64
|
-
v.value = S.layout ?? "sidebar", c.value = S.primaryColor ?? "#4F46E5",
|
|
64
|
+
v.value = S.layout ?? "sidebar", c.value = S.primaryColor ?? "#4F46E5", m.value = S.theme ?? "light", r.value = m.value === "dark", u.value = Y.showTabs ?? !0, f.value = Y.showFooter ?? !0, g.value = Y.showBreadcrumb ?? !0, J(), le(c.value);
|
|
65
65
|
}, ue = (S) => {
|
|
66
66
|
z.value.includes(S) || z.value.push(S);
|
|
67
67
|
}, pe = (S) => {
|
|
@@ -70,48 +70,48 @@ const jt = ["layout", "primaryColor", "theme", "isDark", "showTabs", "showBreadc
|
|
|
70
70
|
}, ye = () => {
|
|
71
71
|
z.value = [];
|
|
72
72
|
}, de = (S) => {
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
|
|
73
|
+
D.value = S;
|
|
74
|
+
}, re = () => {
|
|
75
|
+
J(), le(c.value);
|
|
76
76
|
};
|
|
77
|
-
return Le(r,
|
|
77
|
+
return Le(r, J), {
|
|
78
78
|
appName: p,
|
|
79
|
-
indexPath:
|
|
79
|
+
indexPath: l,
|
|
80
80
|
loginPath: s,
|
|
81
81
|
isDark: r,
|
|
82
|
-
theme:
|
|
82
|
+
theme: m,
|
|
83
83
|
layout: v,
|
|
84
|
-
isCollapsed:
|
|
85
|
-
showTabs:
|
|
84
|
+
isCollapsed: h,
|
|
85
|
+
showTabs: u,
|
|
86
86
|
showFooter: f,
|
|
87
|
-
showBreadcrumb:
|
|
87
|
+
showBreadcrumb: g,
|
|
88
88
|
primaryColor: c,
|
|
89
89
|
allowUserOverride: V,
|
|
90
90
|
cachedViews: z,
|
|
91
|
-
mixSubMenus:
|
|
91
|
+
mixSubMenus: D,
|
|
92
92
|
themeClass: O,
|
|
93
93
|
setAppName: R,
|
|
94
|
-
setIndexPath:
|
|
95
|
-
setLoginPath:
|
|
94
|
+
setIndexPath: W,
|
|
95
|
+
setLoginPath: Z,
|
|
96
96
|
toggleTheme: ee,
|
|
97
97
|
toggleCollapse: B,
|
|
98
|
-
setTheme:
|
|
98
|
+
setTheme: X,
|
|
99
99
|
setLayout: N,
|
|
100
100
|
toggleTabs: A,
|
|
101
|
-
toggleFooter:
|
|
102
|
-
toggleBreadcrumb:
|
|
101
|
+
toggleFooter: Q,
|
|
102
|
+
toggleBreadcrumb: q,
|
|
103
103
|
setPrimaryColor: _e,
|
|
104
|
-
resetToServerDefaults:
|
|
104
|
+
resetToServerDefaults: xe,
|
|
105
105
|
addCachedView: ue,
|
|
106
106
|
removeCachedView: pe,
|
|
107
107
|
clearCachedViews: ye,
|
|
108
108
|
setMixSubMenus: de,
|
|
109
|
-
initTheme:
|
|
109
|
+
initTheme: re
|
|
110
110
|
};
|
|
111
|
-
}),
|
|
111
|
+
}), Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
112
112
|
__proto__: null,
|
|
113
113
|
useAppStore: fe
|
|
114
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
114
|
+
}, Symbol.toStringTag, { value: "Module" })), Zt = "menu_list", es = "permission_list", je = () => `${Zt}_${Se()}`, We = () => `${es}_${Se()}`, ts = {
|
|
115
115
|
menuCode: "home",
|
|
116
116
|
menuName: "首页",
|
|
117
117
|
menuUrl: "/dashboard",
|
|
@@ -120,31 +120,31 @@ const jt = ["layout", "primaryColor", "theme", "isDark", "showTabs", "showBreadc
|
|
|
120
120
|
isDefault: !1,
|
|
121
121
|
isOut: !1
|
|
122
122
|
};
|
|
123
|
-
function
|
|
123
|
+
function _t(t) {
|
|
124
124
|
return t.filter((o) => o.type !== 1).map((o) => ({
|
|
125
125
|
...o,
|
|
126
|
-
children: o.children ?
|
|
126
|
+
children: o.children ? _t(o.children) : void 0
|
|
127
127
|
}));
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function ss(t) {
|
|
130
130
|
const o = [];
|
|
131
|
-
function p(
|
|
132
|
-
|
|
131
|
+
function p(l) {
|
|
132
|
+
l.forEach((s) => {
|
|
133
133
|
s.type === 1 && s.menuCode && o.push(s.menuCode), s.children && p(s.children);
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
return p(t), o;
|
|
137
137
|
}
|
|
138
138
|
const ge = Pe("menu", () => {
|
|
139
|
-
const t =
|
|
139
|
+
const t = b(U.get(je()) || []), o = b(U.get(We()) || []), p = k(() => t.value.length > 0);
|
|
140
140
|
return {
|
|
141
141
|
menuList: t,
|
|
142
142
|
permissions: o,
|
|
143
143
|
hasMenu: p,
|
|
144
144
|
setMenuList: (r) => {
|
|
145
|
-
o.value =
|
|
146
|
-
const v =
|
|
147
|
-
t.value = [
|
|
145
|
+
o.value = ss(r), U.set(We(), o.value);
|
|
146
|
+
const v = _t(r);
|
|
147
|
+
t.value = [ts, ...v], U.set(je(), t.value);
|
|
148
148
|
},
|
|
149
149
|
clearMenu: () => {
|
|
150
150
|
t.value = [], o.value = [], U.remove(je()), U.remove(We());
|
|
@@ -152,28 +152,28 @@ const ge = Pe("menu", () => {
|
|
|
152
152
|
hasPermission: (r) => Array.isArray(r) ? r.some((v) => o.value.includes(v)) : o.value.includes(r)
|
|
153
153
|
};
|
|
154
154
|
}), qe = "user_info", me = Pe("user", () => {
|
|
155
|
-
const t =
|
|
155
|
+
const t = b(U.get(qe)), o = k(() => !!t.value), p = k(() => {
|
|
156
156
|
var c;
|
|
157
157
|
return ((c = t.value) == null ? void 0 : c.userId) || "";
|
|
158
|
-
}),
|
|
158
|
+
}), l = k(() => {
|
|
159
159
|
var c;
|
|
160
160
|
return ((c = t.value) == null ? void 0 : c.userName) || "";
|
|
161
|
-
}), s =
|
|
161
|
+
}), s = k(() => {
|
|
162
162
|
var c;
|
|
163
163
|
return ((c = t.value) == null ? void 0 : c.departmentName) || "";
|
|
164
|
-
}),
|
|
164
|
+
}), m = k(() => {
|
|
165
165
|
var c;
|
|
166
166
|
return ((c = t.value) == null ? void 0 : c.roleName) || "";
|
|
167
|
-
}), r =
|
|
167
|
+
}), r = k(() => {
|
|
168
168
|
var c;
|
|
169
169
|
return ((c = t.value) == null ? void 0 : c.email) || "";
|
|
170
|
-
}), v =
|
|
170
|
+
}), v = k(() => {
|
|
171
171
|
var c;
|
|
172
172
|
return ((c = t.value) == null ? void 0 : c.mobilePhone) || "";
|
|
173
|
-
}),
|
|
173
|
+
}), h = k(() => {
|
|
174
174
|
var c;
|
|
175
175
|
return ((c = t.value) == null ? void 0 : c.positionName) || "";
|
|
176
|
-
}),
|
|
176
|
+
}), u = k(() => {
|
|
177
177
|
var c;
|
|
178
178
|
return ((c = t.value) == null ? void 0 : c.avatar) || "";
|
|
179
179
|
});
|
|
@@ -181,13 +181,13 @@ const ge = Pe("menu", () => {
|
|
|
181
181
|
userInfo: t,
|
|
182
182
|
isLoggedIn: o,
|
|
183
183
|
userId: p,
|
|
184
|
-
userName:
|
|
184
|
+
userName: l,
|
|
185
185
|
departmentName: s,
|
|
186
|
-
roleName:
|
|
186
|
+
roleName: m,
|
|
187
187
|
email: r,
|
|
188
188
|
mobilePhone: v,
|
|
189
|
-
positionName:
|
|
190
|
-
avatar:
|
|
189
|
+
positionName: h,
|
|
190
|
+
avatar: u,
|
|
191
191
|
setUserInfo: (c) => {
|
|
192
192
|
t.value = c, U.set(qe, c);
|
|
193
193
|
},
|
|
@@ -196,40 +196,40 @@ const ge = Pe("menu", () => {
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
}), Fe = Pe("auth", () => {
|
|
199
|
-
const t =
|
|
199
|
+
const t = b(dt()), o = k(() => mt()), p = b(""), l = b(""), s = b(""), m = b("/login");
|
|
200
200
|
return {
|
|
201
201
|
token: t,
|
|
202
202
|
isLoggedIn: o,
|
|
203
203
|
baseUrl: p,
|
|
204
|
-
appId:
|
|
204
|
+
appId: l,
|
|
205
205
|
clientId: s,
|
|
206
|
-
loginPath:
|
|
206
|
+
loginPath: m,
|
|
207
207
|
login: (c) => {
|
|
208
|
-
t.value = c.access_token,
|
|
208
|
+
t.value = c.access_token, vt(c);
|
|
209
209
|
},
|
|
210
210
|
logout: () => {
|
|
211
|
-
t.value = null,
|
|
211
|
+
t.value = null, pt();
|
|
212
212
|
},
|
|
213
213
|
setBaseUrl: (c) => {
|
|
214
214
|
p.value = c;
|
|
215
215
|
},
|
|
216
216
|
setAppId: (c) => {
|
|
217
|
-
|
|
217
|
+
l.value = c;
|
|
218
218
|
},
|
|
219
219
|
setClientId: (c) => {
|
|
220
220
|
s.value = c;
|
|
221
221
|
},
|
|
222
222
|
setLoginPath: (c) => {
|
|
223
|
-
|
|
223
|
+
m.value = c;
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
}),
|
|
226
|
+
}), os = {
|
|
227
227
|
key: 1,
|
|
228
228
|
class: "menu-item__char"
|
|
229
|
-
},
|
|
229
|
+
}, as = {
|
|
230
230
|
key: 1,
|
|
231
231
|
class: "menu-item__char"
|
|
232
|
-
},
|
|
232
|
+
}, ns = /* @__PURE__ */ ae({
|
|
233
233
|
__name: "SidebarMenuItem",
|
|
234
234
|
props: {
|
|
235
235
|
menu: {}
|
|
@@ -337,7 +337,7 @@ const ge = Pe("menu", () => {
|
|
|
337
337
|
"sun",
|
|
338
338
|
"theme",
|
|
339
339
|
"skin"
|
|
340
|
-
]),
|
|
340
|
+
]), l = {
|
|
341
341
|
"el-icon-s-platform": "system",
|
|
342
342
|
"el-icon-platform": "system",
|
|
343
343
|
"el-icon-s-data": "database",
|
|
@@ -391,11 +391,11 @@ const ge = Pe("menu", () => {
|
|
|
391
391
|
"el-icon-chat-dot-round": "chat",
|
|
392
392
|
"el-icon-cpu": "server",
|
|
393
393
|
"el-icon-cloudy": "cloud"
|
|
394
|
-
}, s = (
|
|
395
|
-
if (!
|
|
396
|
-
if (
|
|
397
|
-
if (
|
|
398
|
-
const
|
|
394
|
+
}, s = (u) => {
|
|
395
|
+
if (!u || u === "") return "";
|
|
396
|
+
if (l[u]) return l[u];
|
|
397
|
+
if (u.startsWith("tineco-icon-")) {
|
|
398
|
+
const g = u.replace("tineco-icon-", "");
|
|
399
399
|
return {
|
|
400
400
|
home: "home",
|
|
401
401
|
dashboard: "dashboard",
|
|
@@ -409,7 +409,7 @@ const ge = Pe("menu", () => {
|
|
|
409
409
|
chart: "chart",
|
|
410
410
|
report: "report",
|
|
411
411
|
analytics: "analytics"
|
|
412
|
-
}[
|
|
412
|
+
}[g] || g;
|
|
413
413
|
}
|
|
414
414
|
return {
|
|
415
415
|
dashboard: "dashboard",
|
|
@@ -428,61 +428,61 @@ const ge = Pe("menu", () => {
|
|
|
428
428
|
app: "app",
|
|
429
429
|
list: "list",
|
|
430
430
|
grid: "grid"
|
|
431
|
-
}[
|
|
432
|
-
},
|
|
433
|
-
return (
|
|
434
|
-
const
|
|
435
|
-
return
|
|
431
|
+
}[u] || u;
|
|
432
|
+
}, m = (u) => u ? u.charAt(0) : "", r = (u) => p.has(u), v = k(() => o.menu.menuId || o.menu.menuCode || o.menu.menuUrl || ""), h = k(() => o.menu.children && o.menu.children.length > 0);
|
|
433
|
+
return (u, f) => {
|
|
434
|
+
const g = ke("SidebarMenuItem", !0);
|
|
435
|
+
return h.value ? (a(), P(n(Ge), {
|
|
436
436
|
key: 0,
|
|
437
437
|
index: v.value
|
|
438
438
|
}, {
|
|
439
|
-
icon:
|
|
440
|
-
r(s(t.menu.icon)) ? (a(),
|
|
439
|
+
icon: x(() => [
|
|
440
|
+
r(s(t.menu.icon)) ? (a(), P(n(E), {
|
|
441
441
|
key: 0,
|
|
442
442
|
name: s(t.menu.icon),
|
|
443
443
|
size: 16
|
|
444
|
-
}, null, 8, ["name"])) : (a(),
|
|
444
|
+
}, null, 8, ["name"])) : (a(), d("span", os, C(m(t.menu.menuName)), 1))
|
|
445
445
|
]),
|
|
446
|
-
title:
|
|
447
|
-
|
|
446
|
+
title: x(() => [
|
|
447
|
+
oe(C(t.menu.menuName), 1)
|
|
448
448
|
]),
|
|
449
|
-
default:
|
|
450
|
-
(a(!0),
|
|
449
|
+
default: x(() => [
|
|
450
|
+
(a(!0), d(K, null, G(t.menu.children, (c) => (a(), P(g, {
|
|
451
451
|
key: c.menuId || c.menuCode || c.menuUrl,
|
|
452
452
|
menu: c
|
|
453
453
|
}, null, 8, ["menu"]))), 128))
|
|
454
454
|
]),
|
|
455
455
|
_: 1
|
|
456
|
-
}, 8, ["index"])) : (a(),
|
|
456
|
+
}, 8, ["index"])) : (a(), P(n(Ue), {
|
|
457
457
|
key: 1,
|
|
458
458
|
index: t.menu.menuUrl || v.value
|
|
459
459
|
}, {
|
|
460
|
-
icon:
|
|
461
|
-
r(s(t.menu.icon)) ? (a(),
|
|
460
|
+
icon: x(() => [
|
|
461
|
+
r(s(t.menu.icon)) ? (a(), P(n(E), {
|
|
462
462
|
key: 0,
|
|
463
463
|
name: s(t.menu.icon),
|
|
464
464
|
size: 16
|
|
465
|
-
}, null, 8, ["name"])) : (a(),
|
|
465
|
+
}, null, 8, ["name"])) : (a(), d("span", as, C(m(t.menu.menuName)), 1))
|
|
466
466
|
]),
|
|
467
|
-
default:
|
|
468
|
-
|
|
467
|
+
default: x(() => [
|
|
468
|
+
oe(" " + C(t.menu.menuName), 1)
|
|
469
469
|
]),
|
|
470
470
|
_: 1
|
|
471
471
|
}, 8, ["index"]));
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
}),
|
|
474
|
+
}), ne = (t, o) => {
|
|
475
475
|
const p = t.__vccOpts || t;
|
|
476
|
-
for (const [
|
|
477
|
-
p[
|
|
476
|
+
for (const [l, s] of o)
|
|
477
|
+
p[l] = s;
|
|
478
478
|
return p;
|
|
479
|
-
},
|
|
479
|
+
}, ls = /* @__PURE__ */ ne(ns, [["__scopeId", "data-v-7297001c"]]), rs = {
|
|
480
480
|
key: 0,
|
|
481
481
|
class: "sidebar__logo"
|
|
482
|
-
},
|
|
482
|
+
}, is = ["src"], cs = {
|
|
483
483
|
key: 1,
|
|
484
484
|
class: "sidebar__user"
|
|
485
|
-
},
|
|
485
|
+
}, us = { class: "sidebar__user-info" }, ds = { class: "sidebar__user-name" }, ms = { class: "sidebar__user-role" }, He = "sidebar_opened_menus", Ye = "sidebar_menu_list_key", ps = /* @__PURE__ */ ae({
|
|
486
486
|
__name: "Sidebar",
|
|
487
487
|
props: {
|
|
488
488
|
menuList: { default: () => [] },
|
|
@@ -491,131 +491,131 @@ const ge = Pe("menu", () => {
|
|
|
491
491
|
logoSrc: {}
|
|
492
492
|
},
|
|
493
493
|
setup(t) {
|
|
494
|
-
const o = t, p =
|
|
494
|
+
const o = t, p = k(() => o.logoSrc || ze("/vite.svg")), l = Te(), s = we(), m = ge(), r = me(), v = Fe(), h = fe(), u = k(() => o.menuList.length > 0 ? o.menuList : m.menuList), f = k(() => h.isCollapsed), g = k(() => l.path), c = (B) => B.menuId || B.menuCode || B.menuUrl || "", V = () => u.value.map(c).join(","), z = U.get(Ye) || "", D = V(), O = z === D ? U.get(He) || [] : [], R = b(O);
|
|
495
495
|
Le(R, (B) => {
|
|
496
496
|
U.set(He, B), U.set(Ye, V());
|
|
497
497
|
}, { deep: !0 });
|
|
498
|
-
const
|
|
499
|
-
var
|
|
500
|
-
for (const
|
|
501
|
-
if (
|
|
502
|
-
return [...A, c(
|
|
503
|
-
if ((
|
|
504
|
-
const
|
|
505
|
-
if (
|
|
498
|
+
const W = (B, N, A = []) => {
|
|
499
|
+
var Q;
|
|
500
|
+
for (const q of B) {
|
|
501
|
+
if (q.menuUrl && (N === q.menuUrl || N.startsWith(q.menuUrl + "/")))
|
|
502
|
+
return [...A, c(q)];
|
|
503
|
+
if ((Q = q.children) != null && Q.length) {
|
|
504
|
+
const le = W(q.children, N, [...A, c(q)]);
|
|
505
|
+
if (le) return le;
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
return null;
|
|
509
509
|
};
|
|
510
|
-
Le([() =>
|
|
510
|
+
Le([() => l.path, u], ([B, N]) => {
|
|
511
511
|
if (N.length > 0) {
|
|
512
|
-
const A =
|
|
512
|
+
const A = W(N, B);
|
|
513
513
|
if (A) {
|
|
514
|
-
const
|
|
515
|
-
R.value = Array.from(
|
|
514
|
+
const Q = A.slice(0, -1), q = /* @__PURE__ */ new Set([...R.value, ...Q]);
|
|
515
|
+
R.value = Array.from(q);
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
}, { immediate: !0 }), Le(
|
|
518
|
+
}, { immediate: !0 }), Le(u, (B, N) => {
|
|
519
519
|
B !== N && (R.value = [], U.set(He, []), U.set(Ye, V()));
|
|
520
520
|
}, { immediate: !1 });
|
|
521
|
-
const
|
|
522
|
-
B && B !==
|
|
521
|
+
const Z = k(() => h.isDark ? "#161B21" : "#fff"), J = k(() => h.isDark ? "#D9DCE1" : "#4E5566"), ee = k(() => h.isDark ? "#818CF8" : "#4F46E5"), X = (B) => {
|
|
522
|
+
B && B !== l.path && s.push(B);
|
|
523
523
|
}, te = () => {
|
|
524
|
-
v.logout(), r.clearUserInfo(),
|
|
524
|
+
v.logout(), r.clearUserInfo(), m.clearMenu(), s.push(h.loginPath);
|
|
525
525
|
};
|
|
526
|
-
return (B, N) => (a(),
|
|
526
|
+
return (B, N) => (a(), d("div", {
|
|
527
527
|
class: H(["sidebar", { "sidebar--collapsed": f.value }])
|
|
528
528
|
}, [
|
|
529
|
-
o.showLogo ? (a(),
|
|
529
|
+
o.showLogo ? (a(), d("div", rs, [
|
|
530
530
|
e("img", {
|
|
531
531
|
src: p.value,
|
|
532
532
|
alt: "Logo",
|
|
533
533
|
class: "sidebar__logo-img"
|
|
534
|
-
}, null, 8,
|
|
535
|
-
Be(e("span", { class: "sidebar__logo-text" },
|
|
536
|
-
[
|
|
534
|
+
}, null, 8, is),
|
|
535
|
+
Be(e("span", { class: "sidebar__logo-text" }, C(n(h).appName), 513), [
|
|
536
|
+
[Nt, !f.value]
|
|
537
537
|
])
|
|
538
|
-
])) :
|
|
539
|
-
y(
|
|
540
|
-
modelValue:
|
|
541
|
-
"onUpdate:modelValue": N[0] || (N[0] = (A) =>
|
|
538
|
+
])) : F("", !0),
|
|
539
|
+
y(n(tt), {
|
|
540
|
+
modelValue: g.value,
|
|
541
|
+
"onUpdate:modelValue": N[0] || (N[0] = (A) => g.value = A),
|
|
542
542
|
openeds: R.value,
|
|
543
543
|
"onUpdate:openeds": N[1] || (N[1] = (A) => R.value = A),
|
|
544
544
|
mode: "vertical",
|
|
545
545
|
collapse: f.value,
|
|
546
546
|
"collapse-transition": !1,
|
|
547
|
-
"background-color":
|
|
548
|
-
"text-color":
|
|
547
|
+
"background-color": Z.value,
|
|
548
|
+
"text-color": J.value,
|
|
549
549
|
"active-text-color": ee.value,
|
|
550
550
|
class: "sidebar__menu",
|
|
551
|
-
onSelect:
|
|
551
|
+
onSelect: X
|
|
552
552
|
}, {
|
|
553
|
-
default:
|
|
554
|
-
(a(!0),
|
|
553
|
+
default: x(() => [
|
|
554
|
+
(a(!0), d(K, null, G(u.value, (A) => (a(), P(ls, {
|
|
555
555
|
key: c(A),
|
|
556
556
|
menu: A
|
|
557
557
|
}, null, 8, ["menu"]))), 128))
|
|
558
558
|
]),
|
|
559
559
|
_: 1
|
|
560
560
|
}, 8, ["modelValue", "openeds", "collapse", "background-color", "text-color", "active-text-color"]),
|
|
561
|
-
o.showUser && !f.value ? (a(),
|
|
562
|
-
e("div",
|
|
563
|
-
e("span",
|
|
564
|
-
e("span",
|
|
561
|
+
o.showUser && !f.value ? (a(), d("div", cs, [
|
|
562
|
+
e("div", us, [
|
|
563
|
+
e("span", ds, C(n(r).userName), 1),
|
|
564
|
+
e("span", ms, C(n(r).departmentName), 1)
|
|
565
565
|
]),
|
|
566
|
-
y(
|
|
566
|
+
y(n(Ne), {
|
|
567
567
|
type: "text",
|
|
568
568
|
size: "small",
|
|
569
569
|
onClick: te
|
|
570
570
|
}, {
|
|
571
|
-
default:
|
|
572
|
-
|
|
571
|
+
default: x(() => [...N[2] || (N[2] = [
|
|
572
|
+
oe("退出", -1)
|
|
573
573
|
])]),
|
|
574
574
|
_: 1
|
|
575
575
|
})
|
|
576
|
-
])) :
|
|
576
|
+
])) : F("", !0)
|
|
577
577
|
], 2));
|
|
578
578
|
}
|
|
579
|
-
}),
|
|
579
|
+
}), ut = /* @__PURE__ */ ne(ps, [["__scopeId", "data-v-0322d1ab"]]), vs = { class: "header" }, hs = { class: "header__left" }, _s = {
|
|
580
580
|
key: 0,
|
|
581
581
|
class: "header__breadcrumb"
|
|
582
|
-
},
|
|
582
|
+
}, fs = {
|
|
583
583
|
key: 0,
|
|
584
584
|
class: "breadcrumb-separator"
|
|
585
|
-
},
|
|
585
|
+
}, gs = { class: "header__right" }, ys = {
|
|
586
586
|
key: 0,
|
|
587
587
|
class: "header__search-dropdown"
|
|
588
|
-
},
|
|
588
|
+
}, bs = {
|
|
589
589
|
key: 0,
|
|
590
590
|
class: "header__search-results"
|
|
591
|
-
},
|
|
591
|
+
}, ks = ["onClick"], ws = {
|
|
592
592
|
key: 0,
|
|
593
593
|
class: "header__search-icon"
|
|
594
|
-
},
|
|
594
|
+
}, xs = {
|
|
595
595
|
key: 1,
|
|
596
596
|
class: "header__search-char"
|
|
597
|
-
},
|
|
597
|
+
}, Cs = { class: "header__search-item-title" }, $s = {
|
|
598
598
|
key: 1,
|
|
599
599
|
class: "header__search-item-parent"
|
|
600
|
-
},
|
|
600
|
+
}, Ls = {
|
|
601
601
|
key: 1,
|
|
602
602
|
class: "header__search-empty"
|
|
603
|
-
},
|
|
603
|
+
}, Ms = ["title"], Ss = { class: "header__avatar" }, Is = { class: "header__user-name" }, Es = {
|
|
604
604
|
key: 0,
|
|
605
605
|
class: "header__dropdown"
|
|
606
|
-
},
|
|
606
|
+
}, Ns = { class: "header__dropdown-header" }, Ts = { class: "header__dropdown-avatar" }, Us = { class: "header__dropdown-info" }, zs = { class: "header__dropdown-name" }, Ps = { class: "header__dropdown-role" }, Fs = { class: "header__dropdown-menu" }, Ds = { class: "settings-drawer" }, As = { class: "settings-section" }, Bs = { class: "settings-layout-options" }, Os = ["onClick"], Vs = { class: "layout-option__preview" }, Rs = {
|
|
607
607
|
key: 0,
|
|
608
608
|
class: "layout-preview-sidebar"
|
|
609
|
-
},
|
|
609
|
+
}, Ks = {
|
|
610
610
|
key: 1,
|
|
611
611
|
class: "layout-preview-top"
|
|
612
|
-
},
|
|
612
|
+
}, js = {
|
|
613
613
|
key: 2,
|
|
614
614
|
class: "layout-preview-mix"
|
|
615
|
-
},
|
|
615
|
+
}, Ws = { class: "layout-option__label" }, qs = { class: "settings-section" }, Hs = { class: "settings-color-options" }, Ys = ["title", "onClick"], Gs = { class: "settings-section" }, Xs = { class: "settings-switch-list" }, Js = { class: "settings-switch-item" }, Qs = { class: "settings-switch-item" }, Zs = { class: "settings-section" }, eo = /* @__PURE__ */ ae({
|
|
616
616
|
__name: "Header",
|
|
617
617
|
setup(t) {
|
|
618
|
-
const o =
|
|
618
|
+
const o = Te(), p = we(), l = fe(), s = me(), m = Fe(), r = ge(), v = b(!1), h = b(!1), u = b(null), f = b(!1), g = b(!1), c = b(""), V = b(null), z = b(!1), D = [
|
|
619
619
|
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
620
620
|
{ value: "top", label: "顶部菜单", icon: "menu" },
|
|
621
621
|
{ value: "mix", label: "混合菜单", icon: "grid" }
|
|
@@ -625,15 +625,15 @@ const ge = Pe("menu", () => {
|
|
|
625
625
|
{ value: "#00A870", label: "翡翠绿" },
|
|
626
626
|
{ value: "#D46B08", label: "琥珀橙" },
|
|
627
627
|
{ value: "#1F2329", label: "石墨黑" }
|
|
628
|
-
], R =
|
|
629
|
-
title:
|
|
630
|
-
path:
|
|
631
|
-
}))),
|
|
628
|
+
], R = k(() => o.matched.filter((w) => w.meta && w.meta.title).map((w) => ({
|
|
629
|
+
title: w.meta.title,
|
|
630
|
+
path: w.path
|
|
631
|
+
}))), W = (T, w = "") => {
|
|
632
632
|
const se = [];
|
|
633
633
|
return T.forEach((L) => {
|
|
634
|
-
L.children && L.children.length > 0 ? se.push(...
|
|
634
|
+
L.children && L.children.length > 0 ? se.push(...W(L.children, L.menuName)) : se.push({ ...L, parentTitle: w, title: L.menuName, path: L.menuUrl });
|
|
635
635
|
}), se;
|
|
636
|
-
},
|
|
636
|
+
}, Z = /* @__PURE__ */ new Set([
|
|
637
637
|
"arrow-up",
|
|
638
638
|
"arrow-down",
|
|
639
639
|
"arrow-left",
|
|
@@ -735,7 +735,7 @@ const ge = Pe("menu", () => {
|
|
|
735
735
|
"sun",
|
|
736
736
|
"theme",
|
|
737
737
|
"skin"
|
|
738
|
-
]),
|
|
738
|
+
]), J = (T) => {
|
|
739
739
|
if (!T || T === "") return "";
|
|
740
740
|
if (T.startsWith("tineco-icon-")) {
|
|
741
741
|
const se = T.replace("tineco-icon-", "");
|
|
@@ -772,120 +772,120 @@ const ge = Pe("menu", () => {
|
|
|
772
772
|
list: "list",
|
|
773
773
|
grid: "grid"
|
|
774
774
|
}[T] || T;
|
|
775
|
-
}, ee = (T) => T ? T.charAt(0) : "",
|
|
776
|
-
(
|
|
777
|
-
) : []), B =
|
|
778
|
-
|
|
775
|
+
}, ee = (T) => T ? T.charAt(0) : "", X = (T) => Z.has(T), te = k(() => c.value.trim() ? W(r.menuList).filter(
|
|
776
|
+
(w) => w.title.toLowerCase().includes(c.value.toLowerCase())
|
|
777
|
+
) : []), B = k(() => l.layout), N = () => {
|
|
778
|
+
l.toggleCollapse();
|
|
779
779
|
}, A = () => {
|
|
780
|
-
|
|
781
|
-
},
|
|
782
|
-
|
|
783
|
-
},
|
|
784
|
-
|
|
785
|
-
},
|
|
780
|
+
l.toggleTheme();
|
|
781
|
+
}, Q = () => {
|
|
782
|
+
h.value = !0;
|
|
783
|
+
}, q = (T) => {
|
|
784
|
+
l.setLayout(T), h.value = !1;
|
|
785
|
+
}, le = (T) => {
|
|
786
786
|
z.value = T;
|
|
787
|
-
const
|
|
788
|
-
T ?
|
|
787
|
+
const w = document.documentElement;
|
|
788
|
+
T ? w.classList.add("grey-mode") : w.classList.remove("grey-mode");
|
|
789
789
|
}, _e = () => {
|
|
790
|
-
|
|
791
|
-
},
|
|
792
|
-
|
|
790
|
+
le(!z.value), h.value = !1;
|
|
791
|
+
}, xe = () => {
|
|
792
|
+
l.toggleTheme(), h.value = !1;
|
|
793
793
|
}, ue = () => {
|
|
794
|
-
|
|
794
|
+
l.resetToServerDefaults(), h.value = !1;
|
|
795
795
|
}, pe = () => {
|
|
796
796
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
797
797
|
}, ye = () => {
|
|
798
798
|
f.value = !!document.fullscreenElement;
|
|
799
799
|
}, de = () => {
|
|
800
800
|
v.value = !v.value;
|
|
801
|
-
},
|
|
801
|
+
}, re = () => {
|
|
802
802
|
v.value = !1;
|
|
803
803
|
}, S = () => {
|
|
804
|
-
|
|
804
|
+
g.value = !1, c.value = "";
|
|
805
805
|
}, Y = (T) => {
|
|
806
806
|
p.push(T), S();
|
|
807
807
|
}, ve = (T) => {
|
|
808
|
-
|
|
808
|
+
l.setPrimaryColor(T), h.value = !1;
|
|
809
809
|
}, he = () => {
|
|
810
|
-
|
|
810
|
+
re(), p.push("/profile");
|
|
811
811
|
}, ie = () => {
|
|
812
|
-
|
|
813
|
-
},
|
|
814
|
-
|
|
812
|
+
re(), p.push("/change-password");
|
|
813
|
+
}, Ce = () => {
|
|
814
|
+
re(), m.logout(), s.clearUserInfo(), r.clearMenu(), p.push(l.loginPath);
|
|
815
815
|
}, be = (T) => {
|
|
816
|
-
|
|
817
|
-
},
|
|
818
|
-
T.key === "Escape" && (S(),
|
|
816
|
+
u.value && !u.value.contains(T.target) && re(), V.value && !V.value.contains(T.target) && S();
|
|
817
|
+
}, $e = (T) => {
|
|
818
|
+
T.key === "Escape" && (S(), re());
|
|
819
819
|
};
|
|
820
820
|
return Oe(() => {
|
|
821
|
-
document.addEventListener("click", be), document.addEventListener("fullscreenchange", ye), document.addEventListener("keydown",
|
|
821
|
+
document.addEventListener("click", be), document.addEventListener("fullscreenchange", ye), document.addEventListener("keydown", $e), l.initTheme(), z.value = document.documentElement.classList.contains("grey-mode");
|
|
822
822
|
}), Xe(() => {
|
|
823
|
-
document.removeEventListener("click", be), document.removeEventListener("fullscreenchange", ye), document.removeEventListener("keydown",
|
|
824
|
-
}), (T,
|
|
823
|
+
document.removeEventListener("click", be), document.removeEventListener("fullscreenchange", ye), document.removeEventListener("keydown", $e);
|
|
824
|
+
}), (T, w) => {
|
|
825
825
|
var se;
|
|
826
|
-
return a(),
|
|
827
|
-
e("div",
|
|
826
|
+
return a(), d("div", vs, [
|
|
827
|
+
e("div", hs, [
|
|
828
828
|
e("div", {
|
|
829
829
|
class: "header__collapse",
|
|
830
830
|
onClick: N
|
|
831
831
|
}, [
|
|
832
|
-
y(
|
|
833
|
-
name: l
|
|
832
|
+
y(n(E), {
|
|
833
|
+
name: n(l).isCollapsed ? "menu-unfold" : "menu-fold",
|
|
834
834
|
size: 18
|
|
835
835
|
}, null, 8, ["name"])
|
|
836
836
|
]),
|
|
837
|
-
l
|
|
838
|
-
(a(!0),
|
|
837
|
+
n(l).showBreadcrumb ? (a(), d("div", _s, [
|
|
838
|
+
(a(!0), d(K, null, G(R.value, (L, I) => (a(), d("span", {
|
|
839
839
|
key: L.path
|
|
840
840
|
}, [
|
|
841
|
-
I > 0 ? (a(),
|
|
841
|
+
I > 0 ? (a(), d("span", fs, "/")) : F("", !0),
|
|
842
842
|
e("span", {
|
|
843
843
|
class: H({ "is-current": I === R.value.length - 1 })
|
|
844
|
-
},
|
|
844
|
+
}, C(L.title), 3)
|
|
845
845
|
]))), 128))
|
|
846
|
-
])) :
|
|
846
|
+
])) : F("", !0)
|
|
847
847
|
]),
|
|
848
|
-
e("div",
|
|
848
|
+
e("div", gs, [
|
|
849
849
|
e("div", {
|
|
850
850
|
class: "header__search",
|
|
851
851
|
ref_key: "searchRef",
|
|
852
852
|
ref: V
|
|
853
853
|
}, [
|
|
854
|
-
y(
|
|
854
|
+
y(n(E), {
|
|
855
855
|
name: "search",
|
|
856
856
|
size: 14,
|
|
857
857
|
class: "header__search-icon"
|
|
858
858
|
}),
|
|
859
859
|
Be(e("input", {
|
|
860
|
-
"onUpdate:modelValue":
|
|
860
|
+
"onUpdate:modelValue": w[0] || (w[0] = (L) => c.value = L),
|
|
861
861
|
type: "text",
|
|
862
862
|
class: "header__search-input",
|
|
863
863
|
placeholder: "搜索菜单...",
|
|
864
|
-
onFocus:
|
|
864
|
+
onFocus: w[1] || (w[1] = (L) => g.value = !0)
|
|
865
865
|
}, null, 544), [
|
|
866
866
|
[Je, c.value]
|
|
867
867
|
]),
|
|
868
868
|
y(Ie, { name: "search-dropdown" }, {
|
|
869
|
-
default:
|
|
870
|
-
|
|
871
|
-
te.value.length > 0 ? (a(),
|
|
872
|
-
(a(!0),
|
|
869
|
+
default: x(() => [
|
|
870
|
+
g.value && (te.value.length > 0 || c.value) ? (a(), d("div", ys, [
|
|
871
|
+
te.value.length > 0 ? (a(), d("div", bs, [
|
|
872
|
+
(a(!0), d(K, null, G(te.value, (L) => (a(), d("div", {
|
|
873
873
|
key: L.path,
|
|
874
874
|
class: "header__search-item",
|
|
875
875
|
onClick: (I) => Y(L.path)
|
|
876
876
|
}, [
|
|
877
|
-
L.title !== "首页" ? (a(),
|
|
878
|
-
|
|
877
|
+
L.title !== "首页" ? (a(), d("span", ws, [
|
|
878
|
+
X(J(L.icon)) ? (a(), P(n(E), {
|
|
879
879
|
key: 0,
|
|
880
|
-
name:
|
|
880
|
+
name: J(L.icon),
|
|
881
881
|
size: 16
|
|
882
|
-
}, null, 8, ["name"])) : (a(),
|
|
883
|
-
])) :
|
|
884
|
-
e("span",
|
|
885
|
-
L.parentTitle ? (a(),
|
|
886
|
-
], 8,
|
|
887
|
-
])) : (a(),
|
|
888
|
-
])) :
|
|
882
|
+
}, null, 8, ["name"])) : (a(), d("span", xs, C(ee(L.title)), 1))
|
|
883
|
+
])) : F("", !0),
|
|
884
|
+
e("span", Cs, C(L.title), 1),
|
|
885
|
+
L.parentTitle ? (a(), d("span", $s, C(L.parentTitle), 1)) : F("", !0)
|
|
886
|
+
], 8, ks))), 128))
|
|
887
|
+
])) : (a(), d("div", Ls, " 未找到匹配的菜单 "))
|
|
888
|
+
])) : F("", !0)
|
|
889
889
|
]),
|
|
890
890
|
_: 1
|
|
891
891
|
})
|
|
@@ -895,48 +895,48 @@ const ge = Pe("menu", () => {
|
|
|
895
895
|
onClick: pe,
|
|
896
896
|
title: f.value ? "退出全屏" : "全屏"
|
|
897
897
|
}, [
|
|
898
|
-
y(
|
|
898
|
+
y(n(E), {
|
|
899
899
|
name: f.value ? "fullscreen-exit" : "fullscreen",
|
|
900
900
|
size: 16
|
|
901
901
|
}, null, 8, ["name"])
|
|
902
|
-
], 8,
|
|
903
|
-
l
|
|
902
|
+
], 8, Ms),
|
|
903
|
+
n(l).allowUserOverride ? (a(), d("div", {
|
|
904
904
|
key: 0,
|
|
905
905
|
class: "header__action",
|
|
906
|
-
onClick:
|
|
906
|
+
onClick: Q,
|
|
907
907
|
title: "换肤设置"
|
|
908
908
|
}, [
|
|
909
|
-
y(
|
|
909
|
+
y(n(E), {
|
|
910
910
|
name: "skin",
|
|
911
911
|
size: 16
|
|
912
912
|
})
|
|
913
|
-
])) :
|
|
913
|
+
])) : F("", !0),
|
|
914
914
|
e("div", {
|
|
915
915
|
class: "header__action",
|
|
916
916
|
onClick: A,
|
|
917
917
|
title: "切换主题"
|
|
918
918
|
}, [
|
|
919
|
-
y(
|
|
920
|
-
name: l
|
|
919
|
+
y(n(E), {
|
|
920
|
+
name: n(l).isDark ? "sun" : "moon",
|
|
921
921
|
size: 16
|
|
922
922
|
}, null, 8, ["name"])
|
|
923
923
|
]),
|
|
924
924
|
e("div", {
|
|
925
925
|
class: "header__user",
|
|
926
926
|
ref_key: "dropdownRef",
|
|
927
|
-
ref:
|
|
927
|
+
ref: u
|
|
928
928
|
}, [
|
|
929
929
|
e("div", {
|
|
930
930
|
class: "header__user-trigger",
|
|
931
931
|
onClick: Ve(de, ["stop"])
|
|
932
932
|
}, [
|
|
933
|
-
e("div",
|
|
934
|
-
e("span", null,
|
|
933
|
+
e("div", Ss, [
|
|
934
|
+
e("span", null, C(((se = n(s).userName) == null ? void 0 : se.charAt(0)) || "U"), 1)
|
|
935
935
|
]),
|
|
936
|
-
e("span",
|
|
936
|
+
e("span", Is, C(n(s).userName), 1),
|
|
937
937
|
e("span", {
|
|
938
938
|
class: H(["header__user-arrow", { "is-active": v.value }])
|
|
939
|
-
}, [...
|
|
939
|
+
}, [...w[3] || (w[3] = [
|
|
940
940
|
e("svg", {
|
|
941
941
|
viewBox: "0 0 12 12",
|
|
942
942
|
width: "10",
|
|
@@ -952,88 +952,88 @@ const ge = Pe("menu", () => {
|
|
|
952
952
|
])], 2)
|
|
953
953
|
]),
|
|
954
954
|
y(Ie, { name: "dropdown" }, {
|
|
955
|
-
default:
|
|
955
|
+
default: x(() => {
|
|
956
956
|
var L;
|
|
957
957
|
return [
|
|
958
|
-
v.value ? (a(),
|
|
959
|
-
e("div",
|
|
960
|
-
e("div",
|
|
961
|
-
e("span", null,
|
|
958
|
+
v.value ? (a(), d("div", Es, [
|
|
959
|
+
e("div", Ns, [
|
|
960
|
+
e("div", Ts, [
|
|
961
|
+
e("span", null, C(((L = n(s).userName) == null ? void 0 : L.charAt(0)) || "U"), 1)
|
|
962
962
|
]),
|
|
963
|
-
e("div",
|
|
964
|
-
e("div",
|
|
965
|
-
e("div",
|
|
963
|
+
e("div", Us, [
|
|
964
|
+
e("div", zs, C(n(s).userName), 1),
|
|
965
|
+
e("div", Ps, C(n(s).roleName || n(s).departmentName), 1)
|
|
966
966
|
])
|
|
967
967
|
]),
|
|
968
|
-
|
|
969
|
-
e("div",
|
|
968
|
+
w[8] || (w[8] = e("div", { class: "header__dropdown-divider" }, null, -1)),
|
|
969
|
+
e("div", Fs, [
|
|
970
970
|
e("div", {
|
|
971
971
|
class: "header__dropdown-item",
|
|
972
972
|
onClick: he
|
|
973
973
|
}, [
|
|
974
|
-
y(
|
|
974
|
+
y(n(E), {
|
|
975
975
|
name: "user",
|
|
976
976
|
size: 16
|
|
977
977
|
}),
|
|
978
|
-
|
|
978
|
+
w[4] || (w[4] = e("span", null, "个人信息", -1))
|
|
979
979
|
]),
|
|
980
980
|
e("div", {
|
|
981
981
|
class: "header__dropdown-item",
|
|
982
982
|
onClick: ie
|
|
983
983
|
}, [
|
|
984
|
-
y(
|
|
984
|
+
y(n(E), {
|
|
985
985
|
name: "lock",
|
|
986
986
|
size: 16
|
|
987
987
|
}),
|
|
988
|
-
|
|
988
|
+
w[5] || (w[5] = e("span", null, "修改密码", -1))
|
|
989
989
|
]),
|
|
990
|
-
|
|
990
|
+
w[7] || (w[7] = e("div", { class: "header__dropdown-divider" }, null, -1)),
|
|
991
991
|
e("div", {
|
|
992
992
|
class: "header__dropdown-item header__dropdown-item--danger",
|
|
993
|
-
onClick:
|
|
993
|
+
onClick: Ce
|
|
994
994
|
}, [
|
|
995
|
-
y(
|
|
995
|
+
y(n(E), {
|
|
996
996
|
name: "logout",
|
|
997
997
|
size: 16
|
|
998
998
|
}),
|
|
999
|
-
|
|
999
|
+
w[6] || (w[6] = e("span", null, "退出登录", -1))
|
|
1000
1000
|
])
|
|
1001
1001
|
])
|
|
1002
|
-
])) :
|
|
1002
|
+
])) : F("", !0)
|
|
1003
1003
|
];
|
|
1004
1004
|
}),
|
|
1005
1005
|
_: 1
|
|
1006
1006
|
})
|
|
1007
1007
|
], 512)
|
|
1008
1008
|
]),
|
|
1009
|
-
y(
|
|
1010
|
-
modelValue:
|
|
1011
|
-
"onUpdate:modelValue":
|
|
1009
|
+
y(n(st), {
|
|
1010
|
+
modelValue: h.value,
|
|
1011
|
+
"onUpdate:modelValue": w[2] || (w[2] = (L) => h.value = L),
|
|
1012
1012
|
title: "换肤设置",
|
|
1013
1013
|
direction: "rtl",
|
|
1014
1014
|
size: "320px"
|
|
1015
1015
|
}, {
|
|
1016
|
-
default:
|
|
1017
|
-
e("div",
|
|
1018
|
-
e("div",
|
|
1019
|
-
|
|
1020
|
-
e("div",
|
|
1021
|
-
(a(),
|
|
1016
|
+
default: x(() => [
|
|
1017
|
+
e("div", Ds, [
|
|
1018
|
+
e("div", As, [
|
|
1019
|
+
w[12] || (w[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
|
|
1020
|
+
e("div", Bs, [
|
|
1021
|
+
(a(), d(K, null, G(D, (L) => e("div", {
|
|
1022
1022
|
key: L.value,
|
|
1023
1023
|
class: H(["layout-option", { "is-active": B.value === L.value }]),
|
|
1024
|
-
onClick: (I) =>
|
|
1024
|
+
onClick: (I) => q(L.value)
|
|
1025
1025
|
}, [
|
|
1026
|
-
e("div",
|
|
1027
|
-
L.value === "sidebar" ? (a(),
|
|
1026
|
+
e("div", Vs, [
|
|
1027
|
+
L.value === "sidebar" ? (a(), d("div", Rs, [...w[9] || (w[9] = [
|
|
1028
1028
|
e("div", { class: "preview-aside" }, null, -1),
|
|
1029
1029
|
e("div", { class: "preview-main" }, [
|
|
1030
1030
|
e("div", { class: "preview-header" }),
|
|
1031
1031
|
e("div", { class: "preview-content" })
|
|
1032
1032
|
], -1)
|
|
1033
|
-
])])) : L.value === "top" ? (a(),
|
|
1033
|
+
])])) : L.value === "top" ? (a(), d("div", Ks, [...w[10] || (w[10] = [
|
|
1034
1034
|
e("div", { class: "preview-header-full" }, null, -1),
|
|
1035
1035
|
e("div", { class: "preview-content-full" }, null, -1)
|
|
1036
|
-
])])) : (a(),
|
|
1036
|
+
])])) : (a(), d("div", js, [...w[11] || (w[11] = [
|
|
1037
1037
|
e("div", { class: "preview-header-mix" }, [
|
|
1038
1038
|
e("div", { class: "preview-mix-left" })
|
|
1039
1039
|
], -1),
|
|
@@ -1043,62 +1043,62 @@ const ge = Pe("menu", () => {
|
|
|
1043
1043
|
], -1)
|
|
1044
1044
|
])]))
|
|
1045
1045
|
]),
|
|
1046
|
-
e("span",
|
|
1047
|
-
], 10,
|
|
1046
|
+
e("span", Ws, C(L.label), 1)
|
|
1047
|
+
], 10, Os)), 64))
|
|
1048
1048
|
])
|
|
1049
1049
|
]),
|
|
1050
|
-
e("div",
|
|
1051
|
-
|
|
1052
|
-
e("div",
|
|
1053
|
-
(a(),
|
|
1050
|
+
e("div", qs, [
|
|
1051
|
+
w[13] || (w[13] = e("div", { class: "settings-title" }, "主题色", -1)),
|
|
1052
|
+
e("div", Hs, [
|
|
1053
|
+
(a(), d(K, null, G(O, (L) => e("div", {
|
|
1054
1054
|
key: L.value,
|
|
1055
|
-
class: H(["color-option", { "is-active": l
|
|
1056
|
-
style:
|
|
1055
|
+
class: H(["color-option", { "is-active": n(l).primaryColor === L.value }]),
|
|
1056
|
+
style: Ee({ backgroundColor: L.value }),
|
|
1057
1057
|
title: L.label,
|
|
1058
1058
|
onClick: (I) => ve(L.value)
|
|
1059
1059
|
}, [
|
|
1060
|
-
l
|
|
1060
|
+
n(l).primaryColor === L.value ? (a(), P(n(E), {
|
|
1061
1061
|
key: 0,
|
|
1062
1062
|
name: "check",
|
|
1063
1063
|
size: 12,
|
|
1064
1064
|
color: "#fff"
|
|
1065
|
-
})) :
|
|
1066
|
-
], 14,
|
|
1065
|
+
})) : F("", !0)
|
|
1066
|
+
], 14, Ys)), 64))
|
|
1067
1067
|
])
|
|
1068
1068
|
]),
|
|
1069
|
-
e("div",
|
|
1070
|
-
|
|
1071
|
-
e("div",
|
|
1072
|
-
e("div",
|
|
1073
|
-
|
|
1069
|
+
e("div", Gs, [
|
|
1070
|
+
w[18] || (w[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
|
|
1071
|
+
e("div", Xs, [
|
|
1072
|
+
e("div", Js, [
|
|
1073
|
+
w[15] || (w[15] = e("span", null, "灰色模式", -1)),
|
|
1074
1074
|
e("div", {
|
|
1075
1075
|
class: H(["switch-wrapper", { "is-checked": z.value }]),
|
|
1076
1076
|
onClick: _e
|
|
1077
|
-
}, [...
|
|
1077
|
+
}, [...w[14] || (w[14] = [
|
|
1078
1078
|
e("span", { class: "switch-core" }, null, -1)
|
|
1079
1079
|
])], 2)
|
|
1080
1080
|
]),
|
|
1081
|
-
e("div",
|
|
1082
|
-
|
|
1081
|
+
e("div", Qs, [
|
|
1082
|
+
w[17] || (w[17] = e("span", null, "暗黑模式", -1)),
|
|
1083
1083
|
e("div", {
|
|
1084
|
-
class: H(["switch-wrapper", { "is-checked": l
|
|
1085
|
-
onClick:
|
|
1086
|
-
}, [...
|
|
1084
|
+
class: H(["switch-wrapper", { "is-checked": n(l).isDark }]),
|
|
1085
|
+
onClick: xe
|
|
1086
|
+
}, [...w[16] || (w[16] = [
|
|
1087
1087
|
e("span", { class: "switch-core" }, null, -1)
|
|
1088
1088
|
])], 2)
|
|
1089
1089
|
])
|
|
1090
1090
|
])
|
|
1091
1091
|
]),
|
|
1092
|
-
e("div",
|
|
1092
|
+
e("div", Zs, [
|
|
1093
1093
|
e("div", {
|
|
1094
1094
|
class: "settings-reset",
|
|
1095
1095
|
onClick: ue
|
|
1096
1096
|
}, [
|
|
1097
|
-
y(
|
|
1097
|
+
y(n(E), {
|
|
1098
1098
|
name: "refresh",
|
|
1099
1099
|
size: 14
|
|
1100
1100
|
}),
|
|
1101
|
-
|
|
1101
|
+
w[19] || (w[19] = e("span", null, "恢复默认", -1))
|
|
1102
1102
|
])
|
|
1103
1103
|
])
|
|
1104
1104
|
])
|
|
@@ -1108,72 +1108,72 @@ const ge = Pe("menu", () => {
|
|
|
1108
1108
|
]);
|
|
1109
1109
|
};
|
|
1110
1110
|
}
|
|
1111
|
-
}),
|
|
1111
|
+
}), to = /* @__PURE__ */ ne(eo, [["__scopeId", "data-v-21769fe5"]]), so = { class: "top-menu" }, oo = { class: "top-menu__logo" }, ao = ["src"], no = { class: "top-menu__logo-text" }, lo = { class: "top-menu__menu-content" }, ro = {
|
|
1112
1112
|
key: 0,
|
|
1113
1113
|
class: "top-menu__menu-icon"
|
|
1114
|
-
},
|
|
1114
|
+
}, io = {
|
|
1115
1115
|
key: 1,
|
|
1116
1116
|
class: "top-menu__menu-char"
|
|
1117
|
-
},
|
|
1117
|
+
}, co = { class: "top-menu__menu-text" }, uo = { class: "top-menu__menu-content" }, mo = { class: "top-menu__menu-icon" }, po = {
|
|
1118
1118
|
key: 1,
|
|
1119
1119
|
class: "top-menu__menu-char"
|
|
1120
|
-
},
|
|
1120
|
+
}, vo = { class: "top-menu__menu-text" }, ho = { class: "top-menu__menu-content" }, _o = { class: "top-menu__menu-icon" }, fo = {
|
|
1121
1121
|
key: 1,
|
|
1122
1122
|
class: "top-menu__menu-char"
|
|
1123
|
-
},
|
|
1123
|
+
}, go = { class: "top-menu__menu-text" }, yo = { class: "top-menu__menu-content" }, bo = { class: "top-menu__menu-icon" }, ko = {
|
|
1124
1124
|
key: 1,
|
|
1125
1125
|
class: "top-menu__menu-char"
|
|
1126
|
-
},
|
|
1126
|
+
}, wo = { class: "top-menu__menu-text" }, xo = { class: "top-menu__menu-content" }, Co = {
|
|
1127
1127
|
key: 0,
|
|
1128
1128
|
class: "top-menu__menu-icon"
|
|
1129
|
-
},
|
|
1129
|
+
}, $o = {
|
|
1130
1130
|
key: 1,
|
|
1131
1131
|
class: "top-menu__menu-char"
|
|
1132
|
-
},
|
|
1132
|
+
}, Lo = { class: "top-menu__menu-text" }, Mo = { class: "top-menu__actions" }, So = {
|
|
1133
1133
|
key: 0,
|
|
1134
1134
|
class: "top-menu__search-dropdown"
|
|
1135
|
-
},
|
|
1135
|
+
}, Io = {
|
|
1136
1136
|
key: 0,
|
|
1137
1137
|
class: "top-menu__search-results"
|
|
1138
|
-
},
|
|
1138
|
+
}, Eo = ["onClick"], No = {
|
|
1139
1139
|
key: 0,
|
|
1140
1140
|
class: "top-menu__search-icon-item"
|
|
1141
|
-
},
|
|
1141
|
+
}, To = {
|
|
1142
1142
|
key: 1,
|
|
1143
1143
|
class: "top-menu__search-char"
|
|
1144
|
-
},
|
|
1144
|
+
}, Uo = { class: "top-menu__search-item-title" }, zo = {
|
|
1145
1145
|
key: 1,
|
|
1146
1146
|
class: "top-menu__search-item-parent"
|
|
1147
|
-
},
|
|
1147
|
+
}, Po = {
|
|
1148
1148
|
key: 1,
|
|
1149
1149
|
class: "top-menu__search-empty"
|
|
1150
|
-
},
|
|
1150
|
+
}, Fo = ["title"], Do = { class: "top-menu__avatar" }, Ao = { class: "top-menu__user-name" }, Bo = {
|
|
1151
1151
|
key: 0,
|
|
1152
1152
|
class: "top-menu__dropdown"
|
|
1153
|
-
},
|
|
1153
|
+
}, Oo = { class: "top-menu__dropdown-header" }, Vo = { class: "top-menu__dropdown-avatar" }, Ro = { class: "top-menu__dropdown-info" }, Ko = { class: "top-menu__dropdown-name" }, jo = { class: "top-menu__dropdown-role" }, Wo = { class: "top-menu__dropdown-menu" }, qo = { class: "settings-drawer" }, Ho = { class: "settings-section" }, Yo = { class: "settings-layout-options" }, Go = ["onClick"], Xo = { class: "layout-option__preview" }, Jo = {
|
|
1154
1154
|
key: 0,
|
|
1155
1155
|
class: "layout-preview-sidebar"
|
|
1156
|
-
},
|
|
1156
|
+
}, Qo = {
|
|
1157
1157
|
key: 1,
|
|
1158
1158
|
class: "layout-preview-top"
|
|
1159
|
-
},
|
|
1159
|
+
}, Zo = {
|
|
1160
1160
|
key: 2,
|
|
1161
1161
|
class: "layout-preview-mix"
|
|
1162
|
-
},
|
|
1162
|
+
}, ea = { class: "layout-option__label" }, ta = { class: "settings-section" }, sa = { class: "settings-color-options" }, oa = ["title", "onClick"], aa = { class: "settings-section" }, na = { class: "settings-switch-list" }, la = { class: "settings-switch-item" }, ra = { class: "settings-switch-item" }, ia = /* @__PURE__ */ ae({
|
|
1163
1163
|
__name: "TopMenu",
|
|
1164
1164
|
props: {
|
|
1165
1165
|
logoSrc: {}
|
|
1166
1166
|
},
|
|
1167
1167
|
setup(t) {
|
|
1168
|
-
const o = t, p =
|
|
1168
|
+
const o = t, p = k(() => o.logoSrc || ze("/vite.svg")), l = Te(), s = we(), m = ge(), r = fe(), v = me(), h = Fe(), u = k(() => l.path), f = (I, $ = "") => {
|
|
1169
1169
|
const ce = [];
|
|
1170
1170
|
return I.forEach((i) => {
|
|
1171
1171
|
i.children && i.children.length > 0 ? ce.push(...f(i.children, i.menuName)) : ce.push({ ...i, parentTitle: $, title: i.menuName, path: i.menuUrl });
|
|
1172
1172
|
}), ce;
|
|
1173
|
-
},
|
|
1173
|
+
}, g = k(() => ee.value.trim() ? f(m.menuList).filter(
|
|
1174
1174
|
($) => $.title.toLowerCase().includes(ee.value.toLowerCase())
|
|
1175
|
-
) : []), c =
|
|
1176
|
-
I && I !==
|
|
1175
|
+
) : []), c = k(() => r.isDark ? "#1d1e1f" : "#fff"), V = k(() => r.isDark ? "#cfd3dc" : "#303133"), z = k(() => "#409eff"), D = b(!1), O = b(null), R = b(!1), W = b(!1), Z = b(!1), J = b(!1), ee = b(""), X = b(null), te = (I) => {
|
|
1176
|
+
I && I !== l.path && s.push(I);
|
|
1177
1177
|
}, B = /* @__PURE__ */ new Set([
|
|
1178
1178
|
"arrow-up",
|
|
1179
1179
|
"arrow-down",
|
|
@@ -1313,72 +1313,72 @@ const ge = Pe("menu", () => {
|
|
|
1313
1313
|
list: "list",
|
|
1314
1314
|
grid: "grid"
|
|
1315
1315
|
}[I] || I;
|
|
1316
|
-
}, A = (I) => I ? I.charAt(0) : "",
|
|
1317
|
-
r.toggleTheme(),
|
|
1318
|
-
},
|
|
1316
|
+
}, A = (I) => I ? I.charAt(0) : "", Q = (I) => B.has(I), q = () => {
|
|
1317
|
+
r.toggleTheme(), W.value = !1;
|
|
1318
|
+
}, le = () => {
|
|
1319
1319
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
1320
1320
|
}, _e = () => {
|
|
1321
1321
|
R.value = !!document.fullscreenElement;
|
|
1322
|
-
},
|
|
1323
|
-
|
|
1322
|
+
}, xe = () => {
|
|
1323
|
+
D.value = !D.value;
|
|
1324
1324
|
}, ue = () => {
|
|
1325
|
-
|
|
1325
|
+
D.value = !1;
|
|
1326
1326
|
}, pe = () => {
|
|
1327
|
-
|
|
1327
|
+
J.value = !1, ee.value = "";
|
|
1328
1328
|
}, ye = (I) => {
|
|
1329
1329
|
s.push(I), pe();
|
|
1330
1330
|
}, de = () => {
|
|
1331
|
-
|
|
1332
|
-
},
|
|
1333
|
-
|
|
1331
|
+
W.value = !0;
|
|
1332
|
+
}, re = (I) => {
|
|
1333
|
+
Z.value = I;
|
|
1334
1334
|
const $ = document.documentElement;
|
|
1335
1335
|
I ? $.classList.add("grey-mode") : $.classList.remove("grey-mode");
|
|
1336
1336
|
}, S = () => {
|
|
1337
|
-
|
|
1337
|
+
re(!Z.value), W.value = !1;
|
|
1338
1338
|
}, Y = () => {
|
|
1339
|
-
r.toggleTheme(),
|
|
1339
|
+
r.toggleTheme(), W.value = !1;
|
|
1340
1340
|
}, ve = [
|
|
1341
1341
|
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
1342
1342
|
{ value: "top", label: "顶部菜单", icon: "menu" },
|
|
1343
1343
|
{ value: "mix", label: "混合菜单", icon: "grid" }
|
|
1344
|
-
], he =
|
|
1345
|
-
r.setLayout(I),
|
|
1346
|
-
},
|
|
1344
|
+
], he = k(() => r.layout), ie = (I) => {
|
|
1345
|
+
r.setLayout(I), W.value = !1;
|
|
1346
|
+
}, Ce = [
|
|
1347
1347
|
{ value: "#409eff", label: "默认蓝" },
|
|
1348
1348
|
{ value: "#0F6FDE", label: "企业蓝" },
|
|
1349
1349
|
{ value: "#00A870", label: "翡翠绿" },
|
|
1350
1350
|
{ value: "#D46B08", label: "琥珀橙" },
|
|
1351
1351
|
{ value: "#1F2329", label: "石墨黑" }
|
|
1352
1352
|
], be = (I) => {
|
|
1353
|
-
r.setPrimaryColor(I),
|
|
1354
|
-
},
|
|
1353
|
+
r.setPrimaryColor(I), W.value = !1;
|
|
1354
|
+
}, $e = () => {
|
|
1355
1355
|
ue(), s.push("/profile");
|
|
1356
1356
|
}, T = () => {
|
|
1357
1357
|
ue(), s.push("/change-password");
|
|
1358
|
-
},
|
|
1359
|
-
ue(),
|
|
1358
|
+
}, w = () => {
|
|
1359
|
+
ue(), h.logout(), v.clearUserInfo(), m.clearMenu(), s.push(r.loginPath);
|
|
1360
1360
|
}, se = (I) => {
|
|
1361
|
-
O.value && !O.value.contains(I.target) && ue(),
|
|
1361
|
+
O.value && !O.value.contains(I.target) && ue(), X.value && !X.value.contains(I.target) && pe();
|
|
1362
1362
|
}, L = (I) => {
|
|
1363
1363
|
I.key === "Escape" && (pe(), ue());
|
|
1364
1364
|
};
|
|
1365
1365
|
return Oe(() => {
|
|
1366
|
-
document.addEventListener("click", se), document.addEventListener("fullscreenchange", _e), document.addEventListener("keydown", L),
|
|
1366
|
+
document.addEventListener("click", se), document.addEventListener("fullscreenchange", _e), document.addEventListener("keydown", L), Z.value = document.documentElement.classList.contains("grey-mode");
|
|
1367
1367
|
}), Xe(() => {
|
|
1368
1368
|
document.removeEventListener("click", se), document.removeEventListener("fullscreenchange", _e), document.removeEventListener("keydown", L);
|
|
1369
1369
|
}), (I, $) => {
|
|
1370
1370
|
var ce;
|
|
1371
|
-
return a(),
|
|
1372
|
-
e("div",
|
|
1371
|
+
return a(), d("div", so, [
|
|
1372
|
+
e("div", oo, [
|
|
1373
1373
|
e("img", {
|
|
1374
1374
|
src: p.value,
|
|
1375
1375
|
alt: "Logo",
|
|
1376
1376
|
class: "top-menu__logo-img"
|
|
1377
|
-
}, null, 8,
|
|
1378
|
-
e("span",
|
|
1377
|
+
}, null, 8, ao),
|
|
1378
|
+
e("span", no, C(n(r).appName), 1)
|
|
1379
1379
|
]),
|
|
1380
|
-
y(
|
|
1381
|
-
"model-value":
|
|
1380
|
+
y(n(tt), {
|
|
1381
|
+
"model-value": u.value,
|
|
1382
1382
|
mode: "horizontal",
|
|
1383
1383
|
"background-color": c.value,
|
|
1384
1384
|
"text-color": V.value,
|
|
@@ -1386,81 +1386,81 @@ const ge = Pe("menu", () => {
|
|
|
1386
1386
|
class: "top-menu__menu",
|
|
1387
1387
|
onSelect: te
|
|
1388
1388
|
}, {
|
|
1389
|
-
default:
|
|
1390
|
-
(a(!0),
|
|
1389
|
+
default: x(() => [
|
|
1390
|
+
(a(!0), d(K, null, G(n(m).menuList, (i) => (a(), d(K, {
|
|
1391
1391
|
key: i.menuUrl
|
|
1392
1392
|
}, [
|
|
1393
|
-
i.children && i.children.length > 0 ? (a(),
|
|
1393
|
+
i.children && i.children.length > 0 ? (a(), P(n(Ge), {
|
|
1394
1394
|
key: 0,
|
|
1395
1395
|
index: i.menuUrl
|
|
1396
1396
|
}, {
|
|
1397
|
-
title:
|
|
1398
|
-
e("span",
|
|
1399
|
-
i.menuName !== "首页" ? (a(),
|
|
1400
|
-
|
|
1397
|
+
title: x(() => [
|
|
1398
|
+
e("span", lo, [
|
|
1399
|
+
i.menuName !== "首页" ? (a(), d("span", ro, [
|
|
1400
|
+
Q(N(i.icon)) ? (a(), P(n(E), {
|
|
1401
1401
|
key: 0,
|
|
1402
1402
|
name: N(i.icon),
|
|
1403
1403
|
size: 16
|
|
1404
|
-
}, null, 8, ["name"])) : (a(),
|
|
1405
|
-
])) :
|
|
1406
|
-
e("span",
|
|
1404
|
+
}, null, 8, ["name"])) : (a(), d("span", io, C(A(i.menuName)), 1))
|
|
1405
|
+
])) : F("", !0),
|
|
1406
|
+
e("span", co, C(i.menuName), 1)
|
|
1407
1407
|
])
|
|
1408
1408
|
]),
|
|
1409
|
-
default:
|
|
1410
|
-
(a(!0),
|
|
1411
|
-
key:
|
|
1409
|
+
default: x(() => [
|
|
1410
|
+
(a(!0), d(K, null, G(i.children, (_) => (a(), d(K, {
|
|
1411
|
+
key: _.menuUrl
|
|
1412
1412
|
}, [
|
|
1413
|
-
|
|
1413
|
+
_.children && _.children.length > 0 ? (a(), P(n(Ge), {
|
|
1414
1414
|
key: 0,
|
|
1415
|
-
index:
|
|
1415
|
+
index: _.menuUrl
|
|
1416
1416
|
}, {
|
|
1417
|
-
title:
|
|
1418
|
-
e("span",
|
|
1419
|
-
e("span",
|
|
1420
|
-
|
|
1417
|
+
title: x(() => [
|
|
1418
|
+
e("span", uo, [
|
|
1419
|
+
e("span", mo, [
|
|
1420
|
+
Q(N(_.icon)) ? (a(), P(n(E), {
|
|
1421
1421
|
key: 0,
|
|
1422
|
-
name: N(
|
|
1422
|
+
name: N(_.icon),
|
|
1423
1423
|
size: 16
|
|
1424
|
-
}, null, 8, ["name"])) : (a(),
|
|
1424
|
+
}, null, 8, ["name"])) : (a(), d("span", po, C(A(_.menuName)), 1))
|
|
1425
1425
|
]),
|
|
1426
|
-
e("span",
|
|
1426
|
+
e("span", vo, C(_.menuName), 1)
|
|
1427
1427
|
])
|
|
1428
1428
|
]),
|
|
1429
|
-
default:
|
|
1430
|
-
(a(!0),
|
|
1431
|
-
key:
|
|
1432
|
-
index:
|
|
1429
|
+
default: x(() => [
|
|
1430
|
+
(a(!0), d(K, null, G(_.children, (j) => (a(), P(n(Ue), {
|
|
1431
|
+
key: j.menuUrl,
|
|
1432
|
+
index: j.menuUrl
|
|
1433
1433
|
}, {
|
|
1434
|
-
default:
|
|
1435
|
-
e("span",
|
|
1436
|
-
e("span",
|
|
1437
|
-
|
|
1434
|
+
default: x(() => [
|
|
1435
|
+
e("span", ho, [
|
|
1436
|
+
e("span", _o, [
|
|
1437
|
+
Q(N(j.icon)) ? (a(), P(n(E), {
|
|
1438
1438
|
key: 0,
|
|
1439
|
-
name: N(
|
|
1439
|
+
name: N(j.icon),
|
|
1440
1440
|
size: 16
|
|
1441
|
-
}, null, 8, ["name"])) : (a(),
|
|
1441
|
+
}, null, 8, ["name"])) : (a(), d("span", fo, C(A(j.menuName)), 1))
|
|
1442
1442
|
]),
|
|
1443
|
-
e("span",
|
|
1443
|
+
e("span", go, C(j.menuName), 1)
|
|
1444
1444
|
])
|
|
1445
1445
|
]),
|
|
1446
1446
|
_: 2
|
|
1447
1447
|
}, 1032, ["index"]))), 128))
|
|
1448
1448
|
]),
|
|
1449
1449
|
_: 2
|
|
1450
|
-
}, 1032, ["index"])) : (a(),
|
|
1450
|
+
}, 1032, ["index"])) : (a(), P(n(Ue), {
|
|
1451
1451
|
key: 1,
|
|
1452
|
-
index:
|
|
1452
|
+
index: _.menuUrl
|
|
1453
1453
|
}, {
|
|
1454
|
-
default:
|
|
1455
|
-
e("span",
|
|
1456
|
-
e("span",
|
|
1457
|
-
|
|
1454
|
+
default: x(() => [
|
|
1455
|
+
e("span", yo, [
|
|
1456
|
+
e("span", bo, [
|
|
1457
|
+
Q(N(_.icon)) ? (a(), P(n(E), {
|
|
1458
1458
|
key: 0,
|
|
1459
|
-
name: N(
|
|
1459
|
+
name: N(_.icon),
|
|
1460
1460
|
size: 16
|
|
1461
|
-
}, null, 8, ["name"])) : (a(),
|
|
1461
|
+
}, null, 8, ["name"])) : (a(), d("span", ko, C(A(_.menuName)), 1))
|
|
1462
1462
|
]),
|
|
1463
|
-
e("span",
|
|
1463
|
+
e("span", wo, C(_.menuName), 1)
|
|
1464
1464
|
])
|
|
1465
1465
|
]),
|
|
1466
1466
|
_: 2
|
|
@@ -1468,20 +1468,20 @@ const ge = Pe("menu", () => {
|
|
|
1468
1468
|
], 64))), 128))
|
|
1469
1469
|
]),
|
|
1470
1470
|
_: 2
|
|
1471
|
-
}, 1032, ["index"])) : (a(),
|
|
1471
|
+
}, 1032, ["index"])) : (a(), P(n(Ue), {
|
|
1472
1472
|
key: 1,
|
|
1473
1473
|
index: i.menuUrl
|
|
1474
1474
|
}, {
|
|
1475
|
-
default:
|
|
1476
|
-
e("span",
|
|
1477
|
-
i.menuName !== "首页" ? (a(),
|
|
1478
|
-
|
|
1475
|
+
default: x(() => [
|
|
1476
|
+
e("span", xo, [
|
|
1477
|
+
i.menuName !== "首页" ? (a(), d("span", Co, [
|
|
1478
|
+
Q(N(i.icon)) ? (a(), P(n(E), {
|
|
1479
1479
|
key: 0,
|
|
1480
1480
|
name: N(i.icon),
|
|
1481
1481
|
size: 16
|
|
1482
|
-
}, null, 8, ["name"])) : (a(),
|
|
1483
|
-
])) :
|
|
1484
|
-
e("span",
|
|
1482
|
+
}, null, 8, ["name"])) : (a(), d("span", $o, C(A(i.menuName)), 1))
|
|
1483
|
+
])) : F("", !0),
|
|
1484
|
+
e("span", Lo, C(i.menuName), 1)
|
|
1485
1485
|
])
|
|
1486
1486
|
]),
|
|
1487
1487
|
_: 2
|
|
@@ -1490,13 +1490,13 @@ const ge = Pe("menu", () => {
|
|
|
1490
1490
|
]),
|
|
1491
1491
|
_: 1
|
|
1492
1492
|
}, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
|
|
1493
|
-
e("div",
|
|
1493
|
+
e("div", Mo, [
|
|
1494
1494
|
e("div", {
|
|
1495
1495
|
class: "top-menu__search",
|
|
1496
1496
|
ref_key: "searchRef",
|
|
1497
|
-
ref:
|
|
1497
|
+
ref: X
|
|
1498
1498
|
}, [
|
|
1499
|
-
y(
|
|
1499
|
+
y(n(E), {
|
|
1500
1500
|
name: "search",
|
|
1501
1501
|
size: 14,
|
|
1502
1502
|
class: "top-menu__search-icon"
|
|
@@ -1506,62 +1506,62 @@ const ge = Pe("menu", () => {
|
|
|
1506
1506
|
type: "text",
|
|
1507
1507
|
class: "top-menu__search-input",
|
|
1508
1508
|
placeholder: "搜索菜单...",
|
|
1509
|
-
onFocus: $[1] || ($[1] = (i) =>
|
|
1509
|
+
onFocus: $[1] || ($[1] = (i) => J.value = !0)
|
|
1510
1510
|
}, null, 544), [
|
|
1511
1511
|
[Je, ee.value]
|
|
1512
1512
|
]),
|
|
1513
1513
|
y(Ie, { name: "search-dropdown" }, {
|
|
1514
|
-
default:
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
(a(!0),
|
|
1514
|
+
default: x(() => [
|
|
1515
|
+
J.value && (g.value.length > 0 || ee.value) ? (a(), d("div", So, [
|
|
1516
|
+
g.value.length > 0 ? (a(), d("div", Io, [
|
|
1517
|
+
(a(!0), d(K, null, G(g.value, (i) => (a(), d("div", {
|
|
1518
1518
|
key: i.path,
|
|
1519
1519
|
class: "top-menu__search-item",
|
|
1520
|
-
onClick: (
|
|
1520
|
+
onClick: (_) => ye(i.path)
|
|
1521
1521
|
}, [
|
|
1522
|
-
i.title !== "首页" ? (a(),
|
|
1523
|
-
|
|
1522
|
+
i.title !== "首页" ? (a(), d("span", No, [
|
|
1523
|
+
Q(N(i.icon)) ? (a(), P(n(E), {
|
|
1524
1524
|
key: 0,
|
|
1525
1525
|
name: N(i.icon),
|
|
1526
1526
|
size: 16
|
|
1527
|
-
}, null, 8, ["name"])) : (a(),
|
|
1528
|
-
])) :
|
|
1529
|
-
e("span",
|
|
1530
|
-
i.parentTitle ? (a(),
|
|
1531
|
-
], 8,
|
|
1532
|
-
])) : (a(),
|
|
1533
|
-
])) :
|
|
1527
|
+
}, null, 8, ["name"])) : (a(), d("span", To, C(A(i.title)), 1))
|
|
1528
|
+
])) : F("", !0),
|
|
1529
|
+
e("span", Uo, C(i.title), 1),
|
|
1530
|
+
i.parentTitle ? (a(), d("span", zo, C(i.parentTitle), 1)) : F("", !0)
|
|
1531
|
+
], 8, Eo))), 128))
|
|
1532
|
+
])) : (a(), d("div", Po, " 未找到匹配的菜单 "))
|
|
1533
|
+
])) : F("", !0)
|
|
1534
1534
|
]),
|
|
1535
1535
|
_: 1
|
|
1536
1536
|
})
|
|
1537
1537
|
], 512),
|
|
1538
1538
|
e("div", {
|
|
1539
1539
|
class: "top-menu__action",
|
|
1540
|
-
onClick:
|
|
1540
|
+
onClick: le,
|
|
1541
1541
|
title: R.value ? "退出全屏" : "全屏"
|
|
1542
1542
|
}, [
|
|
1543
|
-
y(
|
|
1543
|
+
y(n(E), {
|
|
1544
1544
|
name: R.value ? "fullscreen-exit" : "fullscreen",
|
|
1545
1545
|
size: 16
|
|
1546
1546
|
}, null, 8, ["name"])
|
|
1547
|
-
], 8,
|
|
1547
|
+
], 8, Fo),
|
|
1548
1548
|
e("div", {
|
|
1549
1549
|
class: "top-menu__action",
|
|
1550
1550
|
onClick: de,
|
|
1551
1551
|
title: "换肤设置"
|
|
1552
1552
|
}, [
|
|
1553
|
-
y(
|
|
1553
|
+
y(n(E), {
|
|
1554
1554
|
name: "skin",
|
|
1555
1555
|
size: 16
|
|
1556
1556
|
})
|
|
1557
1557
|
]),
|
|
1558
1558
|
e("div", {
|
|
1559
1559
|
class: "top-menu__action",
|
|
1560
|
-
onClick:
|
|
1560
|
+
onClick: q,
|
|
1561
1561
|
title: "切换主题"
|
|
1562
1562
|
}, [
|
|
1563
|
-
y(
|
|
1564
|
-
name:
|
|
1563
|
+
y(n(E), {
|
|
1564
|
+
name: n(r).isDark ? "sun" : "moon",
|
|
1565
1565
|
size: 16
|
|
1566
1566
|
}, null, 8, ["name"])
|
|
1567
1567
|
]),
|
|
@@ -1572,14 +1572,14 @@ const ge = Pe("menu", () => {
|
|
|
1572
1572
|
}, [
|
|
1573
1573
|
e("div", {
|
|
1574
1574
|
class: "top-menu__user-trigger",
|
|
1575
|
-
onClick: Ve(
|
|
1575
|
+
onClick: Ve(xe, ["stop"])
|
|
1576
1576
|
}, [
|
|
1577
|
-
e("div",
|
|
1578
|
-
e("span", null,
|
|
1577
|
+
e("div", Do, [
|
|
1578
|
+
e("span", null, C(((ce = n(v).userName) == null ? void 0 : ce.charAt(0)) || "U"), 1)
|
|
1579
1579
|
]),
|
|
1580
|
-
e("span",
|
|
1580
|
+
e("span", Ao, C(n(v).userName), 1),
|
|
1581
1581
|
e("span", {
|
|
1582
|
-
class: H(["top-menu__user-arrow", { "is-active":
|
|
1582
|
+
class: H(["top-menu__user-arrow", { "is-active": D.value }])
|
|
1583
1583
|
}, [...$[3] || ($[3] = [
|
|
1584
1584
|
e("svg", {
|
|
1585
1585
|
viewBox: "0 0 12 12",
|
|
@@ -1596,26 +1596,26 @@ const ge = Pe("menu", () => {
|
|
|
1596
1596
|
])], 2)
|
|
1597
1597
|
]),
|
|
1598
1598
|
y(Ie, { name: "dropdown" }, {
|
|
1599
|
-
default:
|
|
1599
|
+
default: x(() => {
|
|
1600
1600
|
var i;
|
|
1601
1601
|
return [
|
|
1602
|
-
|
|
1603
|
-
e("div",
|
|
1604
|
-
e("div",
|
|
1605
|
-
e("span", null,
|
|
1602
|
+
D.value ? (a(), d("div", Bo, [
|
|
1603
|
+
e("div", Oo, [
|
|
1604
|
+
e("div", Vo, [
|
|
1605
|
+
e("span", null, C(((i = n(v).userName) == null ? void 0 : i.charAt(0)) || "U"), 1)
|
|
1606
1606
|
]),
|
|
1607
|
-
e("div",
|
|
1608
|
-
e("div",
|
|
1609
|
-
e("div",
|
|
1607
|
+
e("div", Ro, [
|
|
1608
|
+
e("div", Ko, C(n(v).userName), 1),
|
|
1609
|
+
e("div", jo, C(n(v).departmentName), 1)
|
|
1610
1610
|
])
|
|
1611
1611
|
]),
|
|
1612
1612
|
$[8] || ($[8] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
|
|
1613
|
-
e("div",
|
|
1613
|
+
e("div", Wo, [
|
|
1614
1614
|
e("div", {
|
|
1615
1615
|
class: "top-menu__dropdown-item",
|
|
1616
|
-
onClick:
|
|
1616
|
+
onClick: $e
|
|
1617
1617
|
}, [
|
|
1618
|
-
y(
|
|
1618
|
+
y(n(E), {
|
|
1619
1619
|
name: "user",
|
|
1620
1620
|
size: 16
|
|
1621
1621
|
}),
|
|
@@ -1625,7 +1625,7 @@ const ge = Pe("menu", () => {
|
|
|
1625
1625
|
class: "top-menu__dropdown-item",
|
|
1626
1626
|
onClick: T
|
|
1627
1627
|
}, [
|
|
1628
|
-
y(
|
|
1628
|
+
y(n(E), {
|
|
1629
1629
|
name: "lock",
|
|
1630
1630
|
size: 16
|
|
1631
1631
|
}),
|
|
@@ -1634,50 +1634,50 @@ const ge = Pe("menu", () => {
|
|
|
1634
1634
|
$[7] || ($[7] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
|
|
1635
1635
|
e("div", {
|
|
1636
1636
|
class: "top-menu__dropdown-item top-menu__dropdown-item--danger",
|
|
1637
|
-
onClick:
|
|
1637
|
+
onClick: w
|
|
1638
1638
|
}, [
|
|
1639
|
-
y(
|
|
1639
|
+
y(n(E), {
|
|
1640
1640
|
name: "logout",
|
|
1641
1641
|
size: 16
|
|
1642
1642
|
}),
|
|
1643
1643
|
$[6] || ($[6] = e("span", null, "退出登录", -1))
|
|
1644
1644
|
])
|
|
1645
1645
|
])
|
|
1646
|
-
])) :
|
|
1646
|
+
])) : F("", !0)
|
|
1647
1647
|
];
|
|
1648
1648
|
}),
|
|
1649
1649
|
_: 1
|
|
1650
1650
|
})
|
|
1651
1651
|
], 512)
|
|
1652
1652
|
]),
|
|
1653
|
-
y(
|
|
1654
|
-
modelValue:
|
|
1655
|
-
"onUpdate:modelValue": $[2] || ($[2] = (i) =>
|
|
1653
|
+
y(n(st), {
|
|
1654
|
+
modelValue: W.value,
|
|
1655
|
+
"onUpdate:modelValue": $[2] || ($[2] = (i) => W.value = i),
|
|
1656
1656
|
title: "换肤设置",
|
|
1657
1657
|
direction: "rtl",
|
|
1658
1658
|
size: "320px"
|
|
1659
1659
|
}, {
|
|
1660
|
-
default:
|
|
1661
|
-
e("div",
|
|
1662
|
-
e("div",
|
|
1660
|
+
default: x(() => [
|
|
1661
|
+
e("div", qo, [
|
|
1662
|
+
e("div", Ho, [
|
|
1663
1663
|
$[12] || ($[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
|
|
1664
|
-
e("div",
|
|
1665
|
-
(a(),
|
|
1664
|
+
e("div", Yo, [
|
|
1665
|
+
(a(), d(K, null, G(ve, (i) => e("div", {
|
|
1666
1666
|
key: i.value,
|
|
1667
1667
|
class: H(["layout-option", { "is-active": he.value === i.value }]),
|
|
1668
|
-
onClick: (
|
|
1668
|
+
onClick: (_) => ie(i.value)
|
|
1669
1669
|
}, [
|
|
1670
|
-
e("div",
|
|
1671
|
-
i.value === "sidebar" ? (a(),
|
|
1670
|
+
e("div", Xo, [
|
|
1671
|
+
i.value === "sidebar" ? (a(), d("div", Jo, [...$[9] || ($[9] = [
|
|
1672
1672
|
e("div", { class: "preview-aside" }, null, -1),
|
|
1673
1673
|
e("div", { class: "preview-main" }, [
|
|
1674
1674
|
e("div", { class: "preview-header" }),
|
|
1675
1675
|
e("div", { class: "preview-content" })
|
|
1676
1676
|
], -1)
|
|
1677
|
-
])])) : i.value === "top" ? (a(),
|
|
1677
|
+
])])) : i.value === "top" ? (a(), d("div", Qo, [...$[10] || ($[10] = [
|
|
1678
1678
|
e("div", { class: "preview-header-full" }, null, -1),
|
|
1679
1679
|
e("div", { class: "preview-content-full" }, null, -1)
|
|
1680
|
-
])])) : (a(),
|
|
1680
|
+
])])) : (a(), d("div", Zo, [...$[11] || ($[11] = [
|
|
1681
1681
|
e("div", { class: "preview-header-mix" }, [
|
|
1682
1682
|
e("div", { class: "preview-mix-left" })
|
|
1683
1683
|
], -1),
|
|
@@ -1687,45 +1687,45 @@ const ge = Pe("menu", () => {
|
|
|
1687
1687
|
], -1)
|
|
1688
1688
|
])]))
|
|
1689
1689
|
]),
|
|
1690
|
-
e("span",
|
|
1691
|
-
], 10,
|
|
1690
|
+
e("span", ea, C(i.label), 1)
|
|
1691
|
+
], 10, Go)), 64))
|
|
1692
1692
|
])
|
|
1693
1693
|
]),
|
|
1694
|
-
e("div",
|
|
1694
|
+
e("div", ta, [
|
|
1695
1695
|
$[13] || ($[13] = e("div", { class: "settings-title" }, "主题色", -1)),
|
|
1696
|
-
e("div",
|
|
1697
|
-
(a(),
|
|
1696
|
+
e("div", sa, [
|
|
1697
|
+
(a(), d(K, null, G(Ce, (i) => e("div", {
|
|
1698
1698
|
key: i.value,
|
|
1699
|
-
class: H(["color-option", { "is-active":
|
|
1700
|
-
style:
|
|
1699
|
+
class: H(["color-option", { "is-active": n(r).primaryColor === i.value }]),
|
|
1700
|
+
style: Ee({ backgroundColor: i.value }),
|
|
1701
1701
|
title: i.label,
|
|
1702
|
-
onClick: (
|
|
1702
|
+
onClick: (_) => be(i.value)
|
|
1703
1703
|
}, [
|
|
1704
|
-
|
|
1704
|
+
n(r).primaryColor === i.value ? (a(), P(n(E), {
|
|
1705
1705
|
key: 0,
|
|
1706
1706
|
name: "check",
|
|
1707
1707
|
size: 12,
|
|
1708
1708
|
color: "#fff"
|
|
1709
|
-
})) :
|
|
1710
|
-
], 14,
|
|
1709
|
+
})) : F("", !0)
|
|
1710
|
+
], 14, oa)), 64))
|
|
1711
1711
|
])
|
|
1712
1712
|
]),
|
|
1713
|
-
e("div",
|
|
1713
|
+
e("div", aa, [
|
|
1714
1714
|
$[18] || ($[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
|
|
1715
|
-
e("div",
|
|
1716
|
-
e("div",
|
|
1715
|
+
e("div", na, [
|
|
1716
|
+
e("div", la, [
|
|
1717
1717
|
$[15] || ($[15] = e("span", null, "灰色模式", -1)),
|
|
1718
1718
|
e("div", {
|
|
1719
|
-
class: H(["switch-wrapper", { "is-checked":
|
|
1719
|
+
class: H(["switch-wrapper", { "is-checked": Z.value }]),
|
|
1720
1720
|
onClick: S
|
|
1721
1721
|
}, [...$[14] || ($[14] = [
|
|
1722
1722
|
e("span", { class: "switch-core" }, null, -1)
|
|
1723
1723
|
])], 2)
|
|
1724
1724
|
]),
|
|
1725
|
-
e("div",
|
|
1725
|
+
e("div", ra, [
|
|
1726
1726
|
$[17] || ($[17] = e("span", null, "暗黑模式", -1)),
|
|
1727
1727
|
e("div", {
|
|
1728
|
-
class: H(["switch-wrapper", { "is-checked":
|
|
1728
|
+
class: H(["switch-wrapper", { "is-checked": n(r).isDark }]),
|
|
1729
1729
|
onClick: Y
|
|
1730
1730
|
}, [...$[16] || ($[16] = [
|
|
1731
1731
|
e("span", { class: "switch-core" }, null, -1)
|
|
@@ -1740,76 +1740,76 @@ const ge = Pe("menu", () => {
|
|
|
1740
1740
|
]);
|
|
1741
1741
|
};
|
|
1742
1742
|
}
|
|
1743
|
-
}),
|
|
1743
|
+
}), ca = /* @__PURE__ */ ne(ia, [["__scopeId", "data-v-711d5b8d"]]), ua = { class: "mix-top-menu" }, da = { class: "mix-top-menu__logo" }, ma = ["src"], pa = { class: "mix-top-menu__logo-text" }, va = { class: "mix-top-menu__menu-content" }, ha = {
|
|
1744
1744
|
key: 0,
|
|
1745
1745
|
class: "mix-top-menu__menu-icon"
|
|
1746
|
-
},
|
|
1746
|
+
}, _a = {
|
|
1747
1747
|
key: 1,
|
|
1748
1748
|
class: "mix-top-menu__menu-char"
|
|
1749
|
-
},
|
|
1749
|
+
}, fa = { class: "mix-top-menu__menu-text" }, ga = { class: "mix-top-menu__actions" }, ya = {
|
|
1750
1750
|
key: 0,
|
|
1751
1751
|
class: "mix-top-menu__search-dropdown"
|
|
1752
|
-
},
|
|
1752
|
+
}, ba = {
|
|
1753
1753
|
key: 0,
|
|
1754
1754
|
class: "mix-top-menu__search-results"
|
|
1755
|
-
},
|
|
1755
|
+
}, ka = ["onClick"], wa = {
|
|
1756
1756
|
key: 0,
|
|
1757
1757
|
class: "mix-top-menu__search-icon-item"
|
|
1758
|
-
},
|
|
1758
|
+
}, xa = {
|
|
1759
1759
|
key: 1,
|
|
1760
1760
|
class: "mix-top-menu__search-char"
|
|
1761
|
-
},
|
|
1761
|
+
}, Ca = { class: "mix-top-menu__search-item-title" }, $a = {
|
|
1762
1762
|
key: 1,
|
|
1763
1763
|
class: "mix-top-menu__search-item-parent"
|
|
1764
|
-
},
|
|
1764
|
+
}, La = {
|
|
1765
1765
|
key: 1,
|
|
1766
1766
|
class: "mix-top-menu__search-empty"
|
|
1767
|
-
},
|
|
1767
|
+
}, Ma = ["title"], Sa = { class: "mix-top-menu__avatar" }, Ia = { class: "mix-top-menu__user-name" }, Ea = {
|
|
1768
1768
|
key: 0,
|
|
1769
1769
|
class: "mix-top-menu__dropdown"
|
|
1770
|
-
},
|
|
1770
|
+
}, Na = { class: "mix-top-menu__dropdown-header" }, Ta = { class: "mix-top-menu__dropdown-avatar" }, Ua = { class: "mix-top-menu__dropdown-info" }, za = { class: "mix-top-menu__dropdown-name" }, Pa = { class: "mix-top-menu__dropdown-role" }, Fa = { class: "mix-top-menu__dropdown-menu" }, Da = { class: "settings-drawer" }, Aa = { class: "settings-section" }, Ba = { class: "settings-layout-options" }, Oa = ["onClick"], Va = { class: "layout-option__preview" }, Ra = {
|
|
1771
1771
|
key: 0,
|
|
1772
1772
|
class: "layout-preview-sidebar"
|
|
1773
|
-
},
|
|
1773
|
+
}, Ka = {
|
|
1774
1774
|
key: 1,
|
|
1775
1775
|
class: "layout-preview-top"
|
|
1776
|
-
},
|
|
1776
|
+
}, ja = {
|
|
1777
1777
|
key: 2,
|
|
1778
1778
|
class: "layout-preview-mix"
|
|
1779
|
-
},
|
|
1779
|
+
}, Wa = { class: "layout-option__label" }, qa = { class: "settings-section" }, Ha = { class: "settings-color-options" }, Ya = ["title", "onClick"], Ga = { class: "settings-section" }, Xa = { class: "settings-switch-list" }, Ja = { class: "settings-switch-item" }, Qa = { class: "settings-switch-item" }, Za = /* @__PURE__ */ ae({
|
|
1780
1780
|
__name: "MixTopMenu",
|
|
1781
1781
|
props: {
|
|
1782
1782
|
logoSrc: {}
|
|
1783
1783
|
},
|
|
1784
1784
|
setup(t) {
|
|
1785
|
-
const o = t, p =
|
|
1786
|
-
const
|
|
1785
|
+
const o = t, p = k(() => o.logoSrc || ze("/vite.svg")), l = Te(), s = we(), m = ge(), r = fe(), v = me(), h = Fe(), u = b(""), f = (i, _ = "") => {
|
|
1786
|
+
const j = [];
|
|
1787
1787
|
return i.forEach((M) => {
|
|
1788
|
-
M.children && M.children.length > 0 ?
|
|
1789
|
-
}),
|
|
1790
|
-
},
|
|
1791
|
-
(
|
|
1792
|
-
) : []), c =
|
|
1793
|
-
const i =
|
|
1788
|
+
M.children && M.children.length > 0 ? j.push(...f(M.children, M.menuName)) : j.push({ ...M, parentTitle: _, title: M.menuName, path: M.menuUrl });
|
|
1789
|
+
}), j;
|
|
1790
|
+
}, g = k(() => N.value.trim() ? f(m.menuList).filter(
|
|
1791
|
+
(_) => _.title.toLowerCase().includes(N.value.toLowerCase())
|
|
1792
|
+
) : []), c = k(() => {
|
|
1793
|
+
const i = m.menuList.find((_) => _.menuUrl === u.value);
|
|
1794
1794
|
return (i == null ? void 0 : i.children) || [];
|
|
1795
|
-
}), V =
|
|
1796
|
-
V.value ?
|
|
1797
|
-
},
|
|
1798
|
-
|
|
1799
|
-
const
|
|
1800
|
-
if (
|
|
1801
|
-
if (
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1795
|
+
}), V = k(() => m.menuList.find((i) => !!(l.path === i.menuUrl || i.children && i.children.some((_) => l.path.startsWith(_.menuUrl) || l.path === _.menuUrl)))), z = () => {
|
|
1796
|
+
V.value ? u.value = V.value.menuUrl : m.menuList.length > 0 && (u.value = m.menuList[0].menuUrl);
|
|
1797
|
+
}, D = (i) => {
|
|
1798
|
+
u.value = i;
|
|
1799
|
+
const _ = m.menuList.find((j) => j.menuUrl === i);
|
|
1800
|
+
if (_)
|
|
1801
|
+
if (_.children && _.children.length > 0) {
|
|
1802
|
+
const j = _.children[0].menuUrl;
|
|
1803
|
+
l.path !== j && s.push(j);
|
|
1804
1804
|
} else
|
|
1805
|
-
|
|
1806
|
-
}, O =
|
|
1807
|
-
Le(() =>
|
|
1805
|
+
l.path !== i && s.push(i);
|
|
1806
|
+
}, O = k(() => r.isDark ? "#1d1e1f" : "#fff"), R = k(() => r.isDark ? "#cfd3dc" : "#303133"), W = k(() => "#409eff"), Z = b(!1), J = b(null), ee = b(!1), X = b(!1), te = b(!1), B = b(!1), N = b(""), A = b(null);
|
|
1807
|
+
Le(() => l.path, () => {
|
|
1808
1808
|
z(), r.setMixSubMenus(c.value);
|
|
1809
|
-
}), Le(() =>
|
|
1809
|
+
}), Le(() => m.menuList, (i) => {
|
|
1810
1810
|
i && i.length > 0 && (z(), r.setMixSubMenus(c.value));
|
|
1811
1811
|
}, { immediate: !0 });
|
|
1812
|
-
const
|
|
1812
|
+
const Q = /* @__PURE__ */ new Set([
|
|
1813
1813
|
"arrow-up",
|
|
1814
1814
|
"arrow-down",
|
|
1815
1815
|
"arrow-left",
|
|
@@ -1911,10 +1911,10 @@ const ge = Pe("menu", () => {
|
|
|
1911
1911
|
"sun",
|
|
1912
1912
|
"theme",
|
|
1913
1913
|
"skin"
|
|
1914
|
-
]),
|
|
1914
|
+
]), q = (i) => {
|
|
1915
1915
|
if (!i || i === "") return "";
|
|
1916
1916
|
if (i.startsWith("tineco-icon-")) {
|
|
1917
|
-
const
|
|
1917
|
+
const j = i.replace("tineco-icon-", "");
|
|
1918
1918
|
return {
|
|
1919
1919
|
home: "home",
|
|
1920
1920
|
dashboard: "dashboard",
|
|
@@ -1928,7 +1928,7 @@ const ge = Pe("menu", () => {
|
|
|
1928
1928
|
chart: "chart",
|
|
1929
1929
|
report: "report",
|
|
1930
1930
|
analytics: "analytics"
|
|
1931
|
-
}[
|
|
1931
|
+
}[j] || j;
|
|
1932
1932
|
}
|
|
1933
1933
|
return {
|
|
1934
1934
|
dashboard: "dashboard",
|
|
@@ -1948,94 +1948,94 @@ const ge = Pe("menu", () => {
|
|
|
1948
1948
|
list: "list",
|
|
1949
1949
|
grid: "grid"
|
|
1950
1950
|
}[i] || i;
|
|
1951
|
-
},
|
|
1952
|
-
r.toggleTheme(),
|
|
1951
|
+
}, le = (i) => i ? i.charAt(0) : "", _e = (i) => Q.has(i), xe = () => {
|
|
1952
|
+
r.toggleTheme(), X.value = !1;
|
|
1953
1953
|
}, ue = () => {
|
|
1954
1954
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
1955
1955
|
}, pe = () => {
|
|
1956
1956
|
ee.value = !!document.fullscreenElement;
|
|
1957
1957
|
}, ye = () => {
|
|
1958
|
-
|
|
1958
|
+
Z.value = !Z.value;
|
|
1959
1959
|
}, de = () => {
|
|
1960
|
-
|
|
1961
|
-
},
|
|
1960
|
+
Z.value = !1;
|
|
1961
|
+
}, re = () => {
|
|
1962
1962
|
B.value = !1, N.value = "";
|
|
1963
1963
|
}, S = (i) => {
|
|
1964
|
-
s.push(i),
|
|
1964
|
+
s.push(i), re();
|
|
1965
1965
|
}, Y = () => {
|
|
1966
|
-
|
|
1966
|
+
X.value = !0;
|
|
1967
1967
|
}, ve = (i) => {
|
|
1968
1968
|
te.value = i;
|
|
1969
|
-
const
|
|
1970
|
-
i ?
|
|
1969
|
+
const _ = document.documentElement;
|
|
1970
|
+
i ? _.classList.add("grey-mode") : _.classList.remove("grey-mode");
|
|
1971
1971
|
}, he = () => {
|
|
1972
|
-
ve(!te.value),
|
|
1972
|
+
ve(!te.value), X.value = !1;
|
|
1973
1973
|
}, ie = () => {
|
|
1974
|
-
r.toggleTheme(),
|
|
1975
|
-
},
|
|
1974
|
+
r.toggleTheme(), X.value = !1;
|
|
1975
|
+
}, Ce = [
|
|
1976
1976
|
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
1977
1977
|
{ value: "top", label: "顶部菜单", icon: "menu" },
|
|
1978
1978
|
{ value: "mix", label: "混合菜单", icon: "grid" }
|
|
1979
|
-
], be =
|
|
1980
|
-
r.setLayout(i),
|
|
1979
|
+
], be = k(() => r.layout), $e = (i) => {
|
|
1980
|
+
r.setLayout(i), X.value = !1;
|
|
1981
1981
|
}, T = [
|
|
1982
1982
|
{ value: "#409eff", label: "默认蓝" },
|
|
1983
1983
|
{ value: "#0F6FDE", label: "企业蓝" },
|
|
1984
1984
|
{ value: "#00A870", label: "翡翠绿" },
|
|
1985
1985
|
{ value: "#D46B08", label: "琥珀橙" },
|
|
1986
1986
|
{ value: "#1F2329", label: "石墨黑" }
|
|
1987
|
-
],
|
|
1988
|
-
r.setPrimaryColor(i),
|
|
1987
|
+
], w = (i) => {
|
|
1988
|
+
r.setPrimaryColor(i), X.value = !1;
|
|
1989
1989
|
}, se = () => {
|
|
1990
1990
|
de(), s.push("/profile");
|
|
1991
1991
|
}, L = () => {
|
|
1992
1992
|
de(), s.push("/change-password");
|
|
1993
1993
|
}, I = () => {
|
|
1994
|
-
de(),
|
|
1994
|
+
de(), h.logout(), v.clearUserInfo(), m.clearMenu(), s.push(r.loginPath);
|
|
1995
1995
|
}, $ = (i) => {
|
|
1996
|
-
|
|
1996
|
+
J.value && !J.value.contains(i.target) && de(), A.value && !A.value.contains(i.target) && re();
|
|
1997
1997
|
}, ce = (i) => {
|
|
1998
|
-
i.key === "Escape" && (
|
|
1998
|
+
i.key === "Escape" && (re(), de());
|
|
1999
1999
|
};
|
|
2000
2000
|
return Oe(() => {
|
|
2001
2001
|
document.addEventListener("click", $), document.addEventListener("fullscreenchange", pe), document.addEventListener("keydown", ce), te.value = document.documentElement.classList.contains("grey-mode"), z();
|
|
2002
2002
|
}), Xe(() => {
|
|
2003
2003
|
document.removeEventListener("click", $), document.removeEventListener("fullscreenchange", pe), document.removeEventListener("keydown", ce);
|
|
2004
|
-
}), (i,
|
|
2005
|
-
var
|
|
2006
|
-
return a(),
|
|
2007
|
-
e("div",
|
|
2004
|
+
}), (i, _) => {
|
|
2005
|
+
var j;
|
|
2006
|
+
return a(), d("div", ua, [
|
|
2007
|
+
e("div", da, [
|
|
2008
2008
|
e("img", {
|
|
2009
2009
|
src: p.value,
|
|
2010
2010
|
alt: "Logo",
|
|
2011
2011
|
class: "mix-top-menu__logo-img"
|
|
2012
|
-
}, null, 8,
|
|
2013
|
-
e("span",
|
|
2012
|
+
}, null, 8, ma),
|
|
2013
|
+
e("span", pa, C(n(r).appName), 1)
|
|
2014
2014
|
]),
|
|
2015
|
-
y(
|
|
2016
|
-
"model-value":
|
|
2015
|
+
y(n(tt), {
|
|
2016
|
+
"model-value": u.value,
|
|
2017
2017
|
mode: "horizontal",
|
|
2018
2018
|
"background-color": O.value,
|
|
2019
2019
|
"text-color": R.value,
|
|
2020
|
-
"active-text-color":
|
|
2020
|
+
"active-text-color": W.value,
|
|
2021
2021
|
class: "mix-top-menu__menu",
|
|
2022
|
-
onSelect:
|
|
2022
|
+
onSelect: D
|
|
2023
2023
|
}, {
|
|
2024
|
-
default:
|
|
2025
|
-
(a(!0),
|
|
2024
|
+
default: x(() => [
|
|
2025
|
+
(a(!0), d(K, null, G(n(m).menuList, (M) => (a(), P(n(Ue), {
|
|
2026
2026
|
key: M.menuUrl,
|
|
2027
2027
|
index: M.menuUrl
|
|
2028
2028
|
}, {
|
|
2029
|
-
default:
|
|
2030
|
-
e("span",
|
|
2031
|
-
M.menuName !== "首页" ? (a(),
|
|
2032
|
-
_e(
|
|
2029
|
+
default: x(() => [
|
|
2030
|
+
e("span", va, [
|
|
2031
|
+
M.menuName !== "首页" ? (a(), d("span", ha, [
|
|
2032
|
+
_e(q(M.icon)) ? (a(), P(n(E), {
|
|
2033
2033
|
key: 0,
|
|
2034
|
-
name:
|
|
2034
|
+
name: q(M.icon),
|
|
2035
2035
|
size: 16
|
|
2036
|
-
}, null, 8, ["name"])) : (a(),
|
|
2037
|
-
])) :
|
|
2038
|
-
e("span",
|
|
2036
|
+
}, null, 8, ["name"])) : (a(), d("span", _a, C(le(M.menuName)), 1))
|
|
2037
|
+
])) : F("", !0),
|
|
2038
|
+
e("span", fa, C(M.menuName), 1)
|
|
2039
2039
|
])
|
|
2040
2040
|
]),
|
|
2041
2041
|
_: 2
|
|
@@ -2043,47 +2043,47 @@ const ge = Pe("menu", () => {
|
|
|
2043
2043
|
]),
|
|
2044
2044
|
_: 1
|
|
2045
2045
|
}, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
|
|
2046
|
-
e("div",
|
|
2046
|
+
e("div", ga, [
|
|
2047
2047
|
e("div", {
|
|
2048
2048
|
class: "mix-top-menu__search",
|
|
2049
2049
|
ref_key: "searchRef",
|
|
2050
2050
|
ref: A
|
|
2051
2051
|
}, [
|
|
2052
|
-
y(
|
|
2052
|
+
y(n(E), {
|
|
2053
2053
|
name: "search",
|
|
2054
2054
|
size: 14,
|
|
2055
2055
|
class: "mix-top-menu__search-icon"
|
|
2056
2056
|
}),
|
|
2057
2057
|
Be(e("input", {
|
|
2058
|
-
"onUpdate:modelValue":
|
|
2058
|
+
"onUpdate:modelValue": _[0] || (_[0] = (M) => N.value = M),
|
|
2059
2059
|
type: "text",
|
|
2060
2060
|
class: "mix-top-menu__search-input",
|
|
2061
2061
|
placeholder: "搜索菜单...",
|
|
2062
|
-
onFocus:
|
|
2062
|
+
onFocus: _[1] || (_[1] = (M) => B.value = !0)
|
|
2063
2063
|
}, null, 544), [
|
|
2064
2064
|
[Je, N.value]
|
|
2065
2065
|
]),
|
|
2066
2066
|
y(Ie, { name: "search-dropdown" }, {
|
|
2067
|
-
default:
|
|
2068
|
-
B.value && (
|
|
2069
|
-
|
|
2070
|
-
(a(!0),
|
|
2067
|
+
default: x(() => [
|
|
2068
|
+
B.value && (g.value.length > 0 || N.value) ? (a(), d("div", ya, [
|
|
2069
|
+
g.value.length > 0 ? (a(), d("div", ba, [
|
|
2070
|
+
(a(!0), d(K, null, G(g.value, (M) => (a(), d("div", {
|
|
2071
2071
|
key: M.path,
|
|
2072
2072
|
class: "mix-top-menu__search-item",
|
|
2073
2073
|
onClick: (at) => S(M.path)
|
|
2074
2074
|
}, [
|
|
2075
|
-
M.title !== "首页" ? (a(),
|
|
2076
|
-
_e(
|
|
2075
|
+
M.title !== "首页" ? (a(), d("span", wa, [
|
|
2076
|
+
_e(q(M.icon)) ? (a(), P(n(E), {
|
|
2077
2077
|
key: 0,
|
|
2078
|
-
name:
|
|
2078
|
+
name: q(M.icon),
|
|
2079
2079
|
size: 16
|
|
2080
|
-
}, null, 8, ["name"])) : (a(),
|
|
2081
|
-
])) :
|
|
2082
|
-
e("span",
|
|
2083
|
-
M.parentTitle ? (a(),
|
|
2084
|
-
], 8,
|
|
2085
|
-
])) : (a(),
|
|
2086
|
-
])) :
|
|
2080
|
+
}, null, 8, ["name"])) : (a(), d("span", xa, C(le(M.title)), 1))
|
|
2081
|
+
])) : F("", !0),
|
|
2082
|
+
e("span", Ca, C(M.title), 1),
|
|
2083
|
+
M.parentTitle ? (a(), d("span", $a, C(M.parentTitle), 1)) : F("", !0)
|
|
2084
|
+
], 8, ka))), 128))
|
|
2085
|
+
])) : (a(), d("div", La, " 未找到匹配的菜单 "))
|
|
2086
|
+
])) : F("", !0)
|
|
2087
2087
|
]),
|
|
2088
2088
|
_: 1
|
|
2089
2089
|
})
|
|
@@ -2093,47 +2093,47 @@ const ge = Pe("menu", () => {
|
|
|
2093
2093
|
onClick: ue,
|
|
2094
2094
|
title: ee.value ? "退出全屏" : "全屏"
|
|
2095
2095
|
}, [
|
|
2096
|
-
y(
|
|
2096
|
+
y(n(E), {
|
|
2097
2097
|
name: ee.value ? "fullscreen-exit" : "fullscreen",
|
|
2098
2098
|
size: 16
|
|
2099
2099
|
}, null, 8, ["name"])
|
|
2100
|
-
], 8,
|
|
2100
|
+
], 8, Ma),
|
|
2101
2101
|
e("div", {
|
|
2102
2102
|
class: "mix-top-menu__action",
|
|
2103
2103
|
onClick: Y,
|
|
2104
2104
|
title: "换肤设置"
|
|
2105
2105
|
}, [
|
|
2106
|
-
y(
|
|
2106
|
+
y(n(E), {
|
|
2107
2107
|
name: "skin",
|
|
2108
2108
|
size: 16
|
|
2109
2109
|
})
|
|
2110
2110
|
]),
|
|
2111
2111
|
e("div", {
|
|
2112
2112
|
class: "mix-top-menu__action",
|
|
2113
|
-
onClick:
|
|
2113
|
+
onClick: xe,
|
|
2114
2114
|
title: "切换主题"
|
|
2115
2115
|
}, [
|
|
2116
|
-
y(
|
|
2117
|
-
name:
|
|
2116
|
+
y(n(E), {
|
|
2117
|
+
name: n(r).isDark ? "sun" : "moon",
|
|
2118
2118
|
size: 16
|
|
2119
2119
|
}, null, 8, ["name"])
|
|
2120
2120
|
]),
|
|
2121
2121
|
e("div", {
|
|
2122
2122
|
class: "mix-top-menu__user",
|
|
2123
2123
|
ref_key: "dropdownRef",
|
|
2124
|
-
ref:
|
|
2124
|
+
ref: J
|
|
2125
2125
|
}, [
|
|
2126
2126
|
e("div", {
|
|
2127
2127
|
class: "mix-top-menu__user-trigger",
|
|
2128
2128
|
onClick: Ve(ye, ["stop"])
|
|
2129
2129
|
}, [
|
|
2130
|
-
e("div",
|
|
2131
|
-
e("span", null,
|
|
2130
|
+
e("div", Sa, [
|
|
2131
|
+
e("span", null, C(((j = n(v).userName) == null ? void 0 : j.charAt(0)) || "U"), 1)
|
|
2132
2132
|
]),
|
|
2133
|
-
e("span",
|
|
2133
|
+
e("span", Ia, C(n(v).userName), 1),
|
|
2134
2134
|
e("span", {
|
|
2135
|
-
class: H(["mix-top-menu__user-arrow", { "is-active":
|
|
2136
|
-
}, [...
|
|
2135
|
+
class: H(["mix-top-menu__user-arrow", { "is-active": Z.value }])
|
|
2136
|
+
}, [..._[3] || (_[3] = [
|
|
2137
2137
|
e("svg", {
|
|
2138
2138
|
viewBox: "0 0 12 12",
|
|
2139
2139
|
width: "10",
|
|
@@ -2149,88 +2149,88 @@ const ge = Pe("menu", () => {
|
|
|
2149
2149
|
])], 2)
|
|
2150
2150
|
]),
|
|
2151
2151
|
y(Ie, { name: "dropdown" }, {
|
|
2152
|
-
default:
|
|
2152
|
+
default: x(() => {
|
|
2153
2153
|
var M;
|
|
2154
2154
|
return [
|
|
2155
|
-
|
|
2156
|
-
e("div",
|
|
2157
|
-
e("div",
|
|
2158
|
-
e("span", null,
|
|
2155
|
+
Z.value ? (a(), d("div", Ea, [
|
|
2156
|
+
e("div", Na, [
|
|
2157
|
+
e("div", Ta, [
|
|
2158
|
+
e("span", null, C(((M = n(v).userName) == null ? void 0 : M.charAt(0)) || "U"), 1)
|
|
2159
2159
|
]),
|
|
2160
|
-
e("div",
|
|
2161
|
-
e("div",
|
|
2162
|
-
e("div",
|
|
2160
|
+
e("div", Ua, [
|
|
2161
|
+
e("div", za, C(n(v).userName), 1),
|
|
2162
|
+
e("div", Pa, C(n(v).departmentName), 1)
|
|
2163
2163
|
])
|
|
2164
2164
|
]),
|
|
2165
|
-
|
|
2166
|
-
e("div",
|
|
2165
|
+
_[8] || (_[8] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
|
|
2166
|
+
e("div", Fa, [
|
|
2167
2167
|
e("div", {
|
|
2168
2168
|
class: "mix-top-menu__dropdown-item",
|
|
2169
2169
|
onClick: se
|
|
2170
2170
|
}, [
|
|
2171
|
-
y(
|
|
2171
|
+
y(n(E), {
|
|
2172
2172
|
name: "user",
|
|
2173
2173
|
size: 16
|
|
2174
2174
|
}),
|
|
2175
|
-
|
|
2175
|
+
_[4] || (_[4] = e("span", null, "个人信息", -1))
|
|
2176
2176
|
]),
|
|
2177
2177
|
e("div", {
|
|
2178
2178
|
class: "mix-top-menu__dropdown-item",
|
|
2179
2179
|
onClick: L
|
|
2180
2180
|
}, [
|
|
2181
|
-
y(
|
|
2181
|
+
y(n(E), {
|
|
2182
2182
|
name: "lock",
|
|
2183
2183
|
size: 16
|
|
2184
2184
|
}),
|
|
2185
|
-
|
|
2185
|
+
_[5] || (_[5] = e("span", null, "修改密码", -1))
|
|
2186
2186
|
]),
|
|
2187
|
-
|
|
2187
|
+
_[7] || (_[7] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
|
|
2188
2188
|
e("div", {
|
|
2189
2189
|
class: "mix-top-menu__dropdown-item mix-top-menu__dropdown-item--danger",
|
|
2190
2190
|
onClick: I
|
|
2191
2191
|
}, [
|
|
2192
|
-
y(
|
|
2192
|
+
y(n(E), {
|
|
2193
2193
|
name: "logout",
|
|
2194
2194
|
size: 16
|
|
2195
2195
|
}),
|
|
2196
|
-
|
|
2196
|
+
_[6] || (_[6] = e("span", null, "退出登录", -1))
|
|
2197
2197
|
])
|
|
2198
2198
|
])
|
|
2199
|
-
])) :
|
|
2199
|
+
])) : F("", !0)
|
|
2200
2200
|
];
|
|
2201
2201
|
}),
|
|
2202
2202
|
_: 1
|
|
2203
2203
|
})
|
|
2204
2204
|
], 512)
|
|
2205
2205
|
]),
|
|
2206
|
-
y(
|
|
2207
|
-
modelValue:
|
|
2208
|
-
"onUpdate:modelValue":
|
|
2206
|
+
y(n(st), {
|
|
2207
|
+
modelValue: X.value,
|
|
2208
|
+
"onUpdate:modelValue": _[2] || (_[2] = (M) => X.value = M),
|
|
2209
2209
|
title: "换肤设置",
|
|
2210
2210
|
direction: "rtl",
|
|
2211
2211
|
size: "320px"
|
|
2212
2212
|
}, {
|
|
2213
|
-
default:
|
|
2214
|
-
e("div",
|
|
2215
|
-
e("div",
|
|
2216
|
-
|
|
2217
|
-
e("div",
|
|
2218
|
-
(a(),
|
|
2213
|
+
default: x(() => [
|
|
2214
|
+
e("div", Da, [
|
|
2215
|
+
e("div", Aa, [
|
|
2216
|
+
_[12] || (_[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
|
|
2217
|
+
e("div", Ba, [
|
|
2218
|
+
(a(), d(K, null, G(Ce, (M) => e("div", {
|
|
2219
2219
|
key: M.value,
|
|
2220
2220
|
class: H(["layout-option", { "is-active": be.value === M.value }]),
|
|
2221
|
-
onClick: (at) =>
|
|
2221
|
+
onClick: (at) => $e(M.value)
|
|
2222
2222
|
}, [
|
|
2223
|
-
e("div",
|
|
2224
|
-
M.value === "sidebar" ? (a(),
|
|
2223
|
+
e("div", Va, [
|
|
2224
|
+
M.value === "sidebar" ? (a(), d("div", Ra, [..._[9] || (_[9] = [
|
|
2225
2225
|
e("div", { class: "preview-aside" }, null, -1),
|
|
2226
2226
|
e("div", { class: "preview-main" }, [
|
|
2227
2227
|
e("div", { class: "preview-header" }),
|
|
2228
2228
|
e("div", { class: "preview-content" })
|
|
2229
2229
|
], -1)
|
|
2230
|
-
])])) : M.value === "top" ? (a(),
|
|
2230
|
+
])])) : M.value === "top" ? (a(), d("div", Ka, [..._[10] || (_[10] = [
|
|
2231
2231
|
e("div", { class: "preview-header-full" }, null, -1),
|
|
2232
2232
|
e("div", { class: "preview-content-full" }, null, -1)
|
|
2233
|
-
])])) : (a(),
|
|
2233
|
+
])])) : (a(), d("div", ja, [..._[11] || (_[11] = [
|
|
2234
2234
|
e("div", { class: "preview-header-mix" }, [
|
|
2235
2235
|
e("div", { class: "preview-mix-left" })
|
|
2236
2236
|
], -1),
|
|
@@ -2240,47 +2240,47 @@ const ge = Pe("menu", () => {
|
|
|
2240
2240
|
], -1)
|
|
2241
2241
|
])]))
|
|
2242
2242
|
]),
|
|
2243
|
-
e("span",
|
|
2244
|
-
], 10,
|
|
2243
|
+
e("span", Wa, C(M.label), 1)
|
|
2244
|
+
], 10, Oa)), 64))
|
|
2245
2245
|
])
|
|
2246
2246
|
]),
|
|
2247
|
-
e("div",
|
|
2248
|
-
|
|
2249
|
-
e("div",
|
|
2250
|
-
(a(),
|
|
2247
|
+
e("div", qa, [
|
|
2248
|
+
_[13] || (_[13] = e("div", { class: "settings-title" }, "主题色", -1)),
|
|
2249
|
+
e("div", Ha, [
|
|
2250
|
+
(a(), d(K, null, G(T, (M) => e("div", {
|
|
2251
2251
|
key: M.value,
|
|
2252
|
-
class: H(["color-option", { "is-active":
|
|
2253
|
-
style:
|
|
2252
|
+
class: H(["color-option", { "is-active": n(r).primaryColor === M.value }]),
|
|
2253
|
+
style: Ee({ backgroundColor: M.value }),
|
|
2254
2254
|
title: M.label,
|
|
2255
|
-
onClick: (at) =>
|
|
2255
|
+
onClick: (at) => w(M.value)
|
|
2256
2256
|
}, [
|
|
2257
|
-
|
|
2257
|
+
n(r).primaryColor === M.value ? (a(), P(n(E), {
|
|
2258
2258
|
key: 0,
|
|
2259
2259
|
name: "check",
|
|
2260
2260
|
size: 12,
|
|
2261
2261
|
color: "#fff"
|
|
2262
|
-
})) :
|
|
2263
|
-
], 14,
|
|
2262
|
+
})) : F("", !0)
|
|
2263
|
+
], 14, Ya)), 64))
|
|
2264
2264
|
])
|
|
2265
2265
|
]),
|
|
2266
|
-
e("div",
|
|
2267
|
-
|
|
2268
|
-
e("div",
|
|
2269
|
-
e("div",
|
|
2270
|
-
|
|
2266
|
+
e("div", Ga, [
|
|
2267
|
+
_[18] || (_[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
|
|
2268
|
+
e("div", Xa, [
|
|
2269
|
+
e("div", Ja, [
|
|
2270
|
+
_[15] || (_[15] = e("span", null, "灰色模式", -1)),
|
|
2271
2271
|
e("div", {
|
|
2272
2272
|
class: H(["switch-wrapper", { "is-checked": te.value }]),
|
|
2273
2273
|
onClick: he
|
|
2274
|
-
}, [...
|
|
2274
|
+
}, [..._[14] || (_[14] = [
|
|
2275
2275
|
e("span", { class: "switch-core" }, null, -1)
|
|
2276
2276
|
])], 2)
|
|
2277
2277
|
]),
|
|
2278
|
-
e("div",
|
|
2279
|
-
|
|
2278
|
+
e("div", Qa, [
|
|
2279
|
+
_[17] || (_[17] = e("span", null, "暗黑模式", -1)),
|
|
2280
2280
|
e("div", {
|
|
2281
|
-
class: H(["switch-wrapper", { "is-checked":
|
|
2281
|
+
class: H(["switch-wrapper", { "is-checked": n(r).isDark }]),
|
|
2282
2282
|
onClick: ie
|
|
2283
|
-
}, [...
|
|
2283
|
+
}, [..._[16] || (_[16] = [
|
|
2284
2284
|
e("span", { class: "switch-core" }, null, -1)
|
|
2285
2285
|
])], 2)
|
|
2286
2286
|
])
|
|
@@ -2293,130 +2293,130 @@ const ge = Pe("menu", () => {
|
|
|
2293
2293
|
]);
|
|
2294
2294
|
};
|
|
2295
2295
|
}
|
|
2296
|
-
}),
|
|
2296
|
+
}), en = /* @__PURE__ */ ne(Za, [["__scopeId", "data-v-ec17777f"]]), tn = {
|
|
2297
2297
|
key: 0,
|
|
2298
2298
|
class: "layout layout--sidebar"
|
|
2299
|
-
},
|
|
2299
|
+
}, sn = { class: "layout__main" }, on = { class: "layout__header" }, an = { class: "layout__content" }, nn = {
|
|
2300
2300
|
key: 1,
|
|
2301
2301
|
class: "layout layout--top"
|
|
2302
|
-
},
|
|
2302
|
+
}, ln = { class: "layout__top-menu" }, rn = { class: "layout__main" }, cn = { class: "layout__content" }, un = {
|
|
2303
2303
|
key: 2,
|
|
2304
2304
|
class: "layout layout--mix"
|
|
2305
|
-
},
|
|
2305
|
+
}, dn = { class: "layout__mix-top-menu" }, mn = { class: "layout__mix-body" }, pn = { class: "layout__content" }, vn = /* @__PURE__ */ ae({
|
|
2306
2306
|
__name: "index",
|
|
2307
2307
|
props: {
|
|
2308
2308
|
logoSrc: {}
|
|
2309
2309
|
},
|
|
2310
2310
|
setup(t) {
|
|
2311
|
-
const o = t, p =
|
|
2312
|
-
() =>
|
|
2313
|
-
), r =
|
|
2314
|
-
return (f,
|
|
2315
|
-
const c =
|
|
2316
|
-
return a(),
|
|
2317
|
-
r.value === "sidebar" ? (a(),
|
|
2311
|
+
const o = t, p = k(() => o.logoSrc || ze("/vite.svg")), l = fe(), s = ge(), m = k(
|
|
2312
|
+
() => l.isCollapsed ? "64px" : "210px"
|
|
2313
|
+
), r = k(() => l.layout), v = k(() => r.value === "mix"), h = k(() => r.value === "sidebar" ? s.menuList : r.value === "mix" ? l.mixSubMenus : []), u = k(() => v.value ? h.value.length > 0 : !1);
|
|
2314
|
+
return (f, g) => {
|
|
2315
|
+
const c = ke("router-view");
|
|
2316
|
+
return a(), d(K, null, [
|
|
2317
|
+
r.value === "sidebar" ? (a(), d("div", tn, [
|
|
2318
2318
|
e("aside", {
|
|
2319
|
-
class: H(["layout__aside", { "layout__aside--collapsed": l
|
|
2320
|
-
style:
|
|
2319
|
+
class: H(["layout__aside", { "layout__aside--collapsed": n(l).isCollapsed }]),
|
|
2320
|
+
style: Ee({ width: m.value })
|
|
2321
2321
|
}, [
|
|
2322
|
-
y(
|
|
2323
|
-
"menu-list":
|
|
2322
|
+
y(ut, {
|
|
2323
|
+
"menu-list": h.value,
|
|
2324
2324
|
"show-logo": !0,
|
|
2325
2325
|
"show-user": !0,
|
|
2326
2326
|
"logo-src": p.value
|
|
2327
2327
|
}, null, 8, ["menu-list", "logo-src"])
|
|
2328
2328
|
], 6),
|
|
2329
|
-
e("div",
|
|
2330
|
-
e("header",
|
|
2331
|
-
y(
|
|
2329
|
+
e("div", sn, [
|
|
2330
|
+
e("header", on, [
|
|
2331
|
+
y(to)
|
|
2332
2332
|
]),
|
|
2333
|
-
e("main",
|
|
2333
|
+
e("main", an, [
|
|
2334
2334
|
y(c)
|
|
2335
2335
|
])
|
|
2336
2336
|
])
|
|
2337
|
-
])) :
|
|
2338
|
-
r.value === "top" ? (a(),
|
|
2339
|
-
e("div",
|
|
2340
|
-
y(
|
|
2337
|
+
])) : F("", !0),
|
|
2338
|
+
r.value === "top" ? (a(), d("div", nn, [
|
|
2339
|
+
e("div", ln, [
|
|
2340
|
+
y(ca, { "logo-src": p.value }, null, 8, ["logo-src"])
|
|
2341
2341
|
]),
|
|
2342
|
-
e("div",
|
|
2343
|
-
e("main",
|
|
2342
|
+
e("div", rn, [
|
|
2343
|
+
e("main", cn, [
|
|
2344
2344
|
y(c)
|
|
2345
2345
|
])
|
|
2346
2346
|
])
|
|
2347
|
-
])) :
|
|
2348
|
-
r.value === "mix" ? (a(),
|
|
2349
|
-
e("div",
|
|
2350
|
-
y(
|
|
2347
|
+
])) : F("", !0),
|
|
2348
|
+
r.value === "mix" ? (a(), d("div", un, [
|
|
2349
|
+
e("div", dn, [
|
|
2350
|
+
y(en, { "logo-src": p.value }, null, 8, ["logo-src"])
|
|
2351
2351
|
]),
|
|
2352
|
-
e("div",
|
|
2353
|
-
|
|
2352
|
+
e("div", mn, [
|
|
2353
|
+
u.value ? (a(), d("aside", {
|
|
2354
2354
|
key: 0,
|
|
2355
|
-
class: H(["layout__aside", { "layout__aside--collapsed": l
|
|
2356
|
-
style:
|
|
2355
|
+
class: H(["layout__aside", { "layout__aside--collapsed": n(l).isCollapsed }]),
|
|
2356
|
+
style: Ee({ width: m.value })
|
|
2357
2357
|
}, [
|
|
2358
|
-
y(
|
|
2359
|
-
"menu-list":
|
|
2358
|
+
y(ut, {
|
|
2359
|
+
"menu-list": h.value,
|
|
2360
2360
|
"show-logo": !1,
|
|
2361
2361
|
"show-user": !1
|
|
2362
2362
|
}, null, 8, ["menu-list"])
|
|
2363
|
-
], 6)) :
|
|
2364
|
-
e("main",
|
|
2363
|
+
], 6)) : F("", !0),
|
|
2364
|
+
e("main", pn, [
|
|
2365
2365
|
y(c)
|
|
2366
2366
|
])
|
|
2367
2367
|
])
|
|
2368
|
-
])) :
|
|
2368
|
+
])) : F("", !0)
|
|
2369
2369
|
], 64);
|
|
2370
2370
|
};
|
|
2371
2371
|
}
|
|
2372
|
-
}),
|
|
2372
|
+
}), ft = /* @__PURE__ */ ne(vn, [["__scopeId", "data-v-a1c7e6e2"]]), hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2373
2373
|
__proto__: null,
|
|
2374
|
-
default:
|
|
2375
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2374
|
+
default: ft
|
|
2375
|
+
}, Symbol.toStringTag, { value: "Module" })), _n = { class: "tabs-wrapper" }, fn = { class: "tab-label" }, gn = ["onClick"], yn = /* @__PURE__ */ ae({
|
|
2376
2376
|
__name: "Tabs",
|
|
2377
2377
|
setup(t) {
|
|
2378
|
-
const o =
|
|
2378
|
+
const o = Te(), p = we(), l = k(() => {
|
|
2379
2379
|
const v = [];
|
|
2380
|
-
return o.matched.forEach((
|
|
2381
|
-
var
|
|
2382
|
-
(
|
|
2383
|
-
name:
|
|
2384
|
-
title:
|
|
2385
|
-
path:
|
|
2380
|
+
return o.matched.forEach((h) => {
|
|
2381
|
+
var u;
|
|
2382
|
+
(u = h.meta) != null && u.affix && v.push({
|
|
2383
|
+
name: h.name,
|
|
2384
|
+
title: h.meta.title,
|
|
2385
|
+
path: h.path,
|
|
2386
2386
|
affix: !0
|
|
2387
2387
|
});
|
|
2388
2388
|
}), v;
|
|
2389
|
-
}), s =
|
|
2389
|
+
}), s = k(() => o.path), m = (v) => {
|
|
2390
2390
|
p.push(v);
|
|
2391
2391
|
}, r = (v) => {
|
|
2392
|
-
const
|
|
2393
|
-
if (!(
|
|
2394
|
-
const
|
|
2392
|
+
const h = l.value.find((u) => u.path === v);
|
|
2393
|
+
if (!(h != null && h.affix) && v === s.value) {
|
|
2394
|
+
const u = l.value.findIndex((g) => g.path === v), f = l.value[u - 1] || l.value[u + 1];
|
|
2395
2395
|
f && p.push(f.path);
|
|
2396
2396
|
}
|
|
2397
2397
|
};
|
|
2398
|
-
return (v,
|
|
2399
|
-
y(
|
|
2398
|
+
return (v, h) => (a(), d("div", _n, [
|
|
2399
|
+
y(n(Bt), {
|
|
2400
2400
|
modelValue: s.value,
|
|
2401
|
-
"onUpdate:modelValue":
|
|
2401
|
+
"onUpdate:modelValue": h[0] || (h[0] = (u) => s.value = u),
|
|
2402
2402
|
type: "card",
|
|
2403
|
-
onTabClick:
|
|
2403
|
+
onTabClick: m
|
|
2404
2404
|
}, {
|
|
2405
|
-
default:
|
|
2406
|
-
(a(!0),
|
|
2407
|
-
key:
|
|
2408
|
-
name:
|
|
2409
|
-
label:
|
|
2410
|
-
closable: !
|
|
2405
|
+
default: x(() => [
|
|
2406
|
+
(a(!0), d(K, null, G(l.value, (u) => (a(), P(n(Ot), {
|
|
2407
|
+
key: u.path,
|
|
2408
|
+
name: u.path,
|
|
2409
|
+
label: u.title,
|
|
2410
|
+
closable: !u.affix
|
|
2411
2411
|
}, {
|
|
2412
|
-
label:
|
|
2413
|
-
e("span",
|
|
2414
|
-
|
|
2415
|
-
|
|
2412
|
+
label: x(() => [
|
|
2413
|
+
e("span", fn, [
|
|
2414
|
+
oe(C(u.title) + " ", 1),
|
|
2415
|
+
u.affix ? F("", !0) : (a(), d("span", {
|
|
2416
2416
|
key: 0,
|
|
2417
2417
|
class: "tab-close",
|
|
2418
|
-
onClick: Ve((f) => r(
|
|
2419
|
-
}, " ✕ ", 8,
|
|
2418
|
+
onClick: Ve((f) => r(u.path), ["stop"])
|
|
2419
|
+
}, " ✕ ", 8, gn))
|
|
2420
2420
|
])
|
|
2421
2421
|
]),
|
|
2422
2422
|
_: 2
|
|
@@ -2426,13 +2426,13 @@ const ge = Pe("menu", () => {
|
|
|
2426
2426
|
}, 8, ["modelValue"])
|
|
2427
2427
|
]));
|
|
2428
2428
|
}
|
|
2429
|
-
}),
|
|
2430
|
-
function
|
|
2431
|
-
return a(),
|
|
2429
|
+
}), vl = /* @__PURE__ */ ne(yn, [["__scopeId", "data-v-0a4ca30d"]]), bn = {}, kn = { class: "footer" };
|
|
2430
|
+
function wn(t, o) {
|
|
2431
|
+
return a(), d("div", kn, [...o[0] || (o[0] = [
|
|
2432
2432
|
e("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
|
|
2433
2433
|
])]);
|
|
2434
2434
|
}
|
|
2435
|
-
const
|
|
2435
|
+
const hl = /* @__PURE__ */ ne(bn, [["render", wn], ["__scopeId", "data-v-ac63e349"]]), xn = /* @__PURE__ */ ae({
|
|
2436
2436
|
name: "FilterBar",
|
|
2437
2437
|
__name: "FilterBar",
|
|
2438
2438
|
props: {
|
|
@@ -2446,19 +2446,19 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2446
2446
|
},
|
|
2447
2447
|
emits: ["search", "reset"],
|
|
2448
2448
|
setup(t, { expose: o, emit: p }) {
|
|
2449
|
-
const
|
|
2450
|
-
var
|
|
2451
|
-
const V = (
|
|
2449
|
+
const l = t, s = p, m = b(null), r = b(l.defaultCollapsed), v = b(0), h = () => {
|
|
2450
|
+
var D;
|
|
2451
|
+
const V = (D = m.value) == null ? void 0 : D.$el;
|
|
2452
2452
|
if (!V) return;
|
|
2453
2453
|
const z = V.querySelectorAll(":scope > .x-form-item:not(.filter-bar__ops)");
|
|
2454
2454
|
v.value = z.length, z.forEach((O, R) => {
|
|
2455
|
-
O.style.display = r.value && R >=
|
|
2455
|
+
O.style.display = r.value && R >= l.collapsedCount ? "none" : "";
|
|
2456
2456
|
});
|
|
2457
|
-
},
|
|
2457
|
+
}, u = k(() => l.collapsible && v.value > l.collapsedCount), f = () => {
|
|
2458
2458
|
r.value = !r.value;
|
|
2459
2459
|
};
|
|
2460
|
-
Le(r, () => Re(
|
|
2461
|
-
const
|
|
2460
|
+
Le(r, () => Re(h)), Oe(() => Re(h)), Tt(() => Re(h));
|
|
2461
|
+
const g = () => s("search"), c = () => s("reset");
|
|
2462
2462
|
return o({
|
|
2463
2463
|
/** 展开筛选项 */
|
|
2464
2464
|
expand: () => {
|
|
@@ -2469,58 +2469,58 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2469
2469
|
r.value = !0;
|
|
2470
2470
|
}
|
|
2471
2471
|
}), (V, z) => {
|
|
2472
|
-
const
|
|
2473
|
-
return a(),
|
|
2474
|
-
default:
|
|
2472
|
+
const D = ke("x-button"), O = ke("x-form-item"), R = ke("x-form"), W = ke("x-card");
|
|
2473
|
+
return a(), P(W, { class: "filter-bar" }, {
|
|
2474
|
+
default: x(() => [
|
|
2475
2475
|
y(R, {
|
|
2476
2476
|
ref_key: "formRef",
|
|
2477
|
-
ref:
|
|
2477
|
+
ref: m,
|
|
2478
2478
|
model: t.model,
|
|
2479
2479
|
layout: "inline",
|
|
2480
|
-
onSubmit:
|
|
2480
|
+
onSubmit: g,
|
|
2481
2481
|
onReset: c
|
|
2482
2482
|
}, {
|
|
2483
|
-
default:
|
|
2483
|
+
default: x(() => [
|
|
2484
2484
|
De(V.$slots, "default", {}, void 0, !0),
|
|
2485
2485
|
y(O, { class: "filter-bar__ops" }, {
|
|
2486
|
-
default:
|
|
2487
|
-
y(
|
|
2486
|
+
default: x(() => [
|
|
2487
|
+
y(D, {
|
|
2488
2488
|
type: "primary",
|
|
2489
2489
|
size: "small",
|
|
2490
2490
|
"html-type": "submit",
|
|
2491
2491
|
loading: t.searchLoading
|
|
2492
2492
|
}, {
|
|
2493
|
-
default:
|
|
2494
|
-
|
|
2493
|
+
default: x(() => [
|
|
2494
|
+
oe(C(t.searchText), 1)
|
|
2495
2495
|
]),
|
|
2496
2496
|
_: 1
|
|
2497
2497
|
}, 8, ["loading"]),
|
|
2498
|
-
y(
|
|
2498
|
+
y(D, {
|
|
2499
2499
|
size: "small",
|
|
2500
2500
|
"html-type": "reset"
|
|
2501
2501
|
}, {
|
|
2502
|
-
default:
|
|
2503
|
-
|
|
2502
|
+
default: x(() => [
|
|
2503
|
+
oe(C(t.resetText), 1)
|
|
2504
2504
|
]),
|
|
2505
2505
|
_: 1
|
|
2506
2506
|
}),
|
|
2507
|
-
|
|
2507
|
+
u.value ? (a(), P(D, {
|
|
2508
2508
|
key: 0,
|
|
2509
2509
|
type: "text",
|
|
2510
2510
|
size: "small",
|
|
2511
2511
|
class: "filter-bar__toggle",
|
|
2512
2512
|
onClick: f
|
|
2513
2513
|
}, {
|
|
2514
|
-
default:
|
|
2515
|
-
|
|
2516
|
-
y(
|
|
2514
|
+
default: x(() => [
|
|
2515
|
+
oe(C(r.value ? "展开" : "收起") + " ", 1),
|
|
2516
|
+
y(n(E), {
|
|
2517
2517
|
name: "caret-down",
|
|
2518
2518
|
size: 12,
|
|
2519
2519
|
class: H(["filter-bar__caret", { "is-open": !r.value }])
|
|
2520
2520
|
}, null, 8, ["class"])
|
|
2521
2521
|
]),
|
|
2522
2522
|
_: 1
|
|
2523
|
-
})) :
|
|
2523
|
+
})) : F("", !0)
|
|
2524
2524
|
]),
|
|
2525
2525
|
_: 1
|
|
2526
2526
|
})
|
|
@@ -2532,7 +2532,7 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2532
2532
|
});
|
|
2533
2533
|
};
|
|
2534
2534
|
}
|
|
2535
|
-
}),
|
|
2535
|
+
}), _l = /* @__PURE__ */ ne(xn, [["__scopeId", "data-v-caa0ce56"]]), Cn = { class: "table-card__header" }, $n = { class: "table-card__title" }, Ln = { class: "table-card__actions" }, Mn = /* @__PURE__ */ ae({
|
|
2536
2536
|
name: "TableCard",
|
|
2537
2537
|
__name: "TableCard",
|
|
2538
2538
|
props: {
|
|
@@ -2540,23 +2540,23 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2540
2540
|
},
|
|
2541
2541
|
setup(t) {
|
|
2542
2542
|
return (o, p) => {
|
|
2543
|
-
const
|
|
2544
|
-
return a(),
|
|
2545
|
-
default:
|
|
2543
|
+
const l = ke("x-card");
|
|
2544
|
+
return a(), P(l, { class: "table-card-frame" }, Ut({
|
|
2545
|
+
default: x(() => [
|
|
2546
2546
|
De(o.$slots, "default", {}, void 0, !0)
|
|
2547
2547
|
]),
|
|
2548
2548
|
_: 2
|
|
2549
2549
|
}, [
|
|
2550
2550
|
t.title || o.$slots.header || o.$slots.actions ? {
|
|
2551
2551
|
name: "header",
|
|
2552
|
-
fn:
|
|
2553
|
-
e("div",
|
|
2554
|
-
e("div",
|
|
2552
|
+
fn: x(() => [
|
|
2553
|
+
e("div", Cn, [
|
|
2554
|
+
e("div", $n, [
|
|
2555
2555
|
De(o.$slots, "header", {}, () => [
|
|
2556
|
-
|
|
2556
|
+
oe(C(t.title), 1)
|
|
2557
2557
|
], !0)
|
|
2558
2558
|
]),
|
|
2559
|
-
e("div",
|
|
2559
|
+
e("div", Ln, [
|
|
2560
2560
|
De(o.$slots, "actions", {}, void 0, !0)
|
|
2561
2561
|
])
|
|
2562
2562
|
])
|
|
@@ -2566,10 +2566,79 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2566
2566
|
]), 1024);
|
|
2567
2567
|
};
|
|
2568
2568
|
}
|
|
2569
|
-
}),
|
|
2569
|
+
}), fl = /* @__PURE__ */ ne(Mn, [["__scopeId", "data-v-ccdd6039"]]), Sn = /* @__PURE__ */ ae({
|
|
2570
|
+
name: "TableActions",
|
|
2571
|
+
__name: "TableActions",
|
|
2572
|
+
props: {
|
|
2573
|
+
max: { default: 0 },
|
|
2574
|
+
gap: { default: 8 }
|
|
2575
|
+
},
|
|
2576
|
+
setup(t) {
|
|
2577
|
+
const o = t, p = zt(), l = (h) => {
|
|
2578
|
+
const u = h.props || {}, f = u.type === "danger" || u.danger === !0 || u.danger === "", g = { type: "text", size: "small" };
|
|
2579
|
+
return f && (g.class = [u.class, "table-actions__danger"]), Ft(h, g);
|
|
2580
|
+
}, s = k(
|
|
2581
|
+
() => {
|
|
2582
|
+
var h;
|
|
2583
|
+
return (((h = p.default) == null ? void 0 : h.call(p)) ?? []).filter((u) => u.type && u.type !== Pt && typeof u.type != "symbol").map(l);
|
|
2584
|
+
}
|
|
2585
|
+
), m = k(() => o.max > 0 && s.value.length > o.max), r = k(
|
|
2586
|
+
() => m.value ? s.value.slice(0, Math.max(1, o.max - 1)) : s.value
|
|
2587
|
+
), v = k(() => m.value ? s.value.slice(Math.max(1, o.max - 1)) : []);
|
|
2588
|
+
return (h, u) => {
|
|
2589
|
+
const f = ke("x-button");
|
|
2590
|
+
return s.value.length ? (a(), d("div", {
|
|
2591
|
+
key: 0,
|
|
2592
|
+
class: "table-actions",
|
|
2593
|
+
style: Ee({ gap: `${t.gap}px` })
|
|
2594
|
+
}, [
|
|
2595
|
+
(a(!0), d(K, null, G(r.value, (g, c) => (a(), P(it(g), { key: c }))), 128)),
|
|
2596
|
+
v.value.length ? (a(), P(n(Vt), {
|
|
2597
|
+
key: 0,
|
|
2598
|
+
trigger: "click",
|
|
2599
|
+
placement: "bottom-end"
|
|
2600
|
+
}, {
|
|
2601
|
+
dropdown: x(() => [
|
|
2602
|
+
y(n(Rt), null, {
|
|
2603
|
+
default: x(() => [
|
|
2604
|
+
(a(!0), d(K, null, G(v.value, (g, c) => (a(), P(n(Kt), {
|
|
2605
|
+
key: c,
|
|
2606
|
+
command: c
|
|
2607
|
+
}, {
|
|
2608
|
+
default: x(() => [
|
|
2609
|
+
(a(), P(it(g)))
|
|
2610
|
+
]),
|
|
2611
|
+
_: 2
|
|
2612
|
+
}, 1032, ["command"]))), 128))
|
|
2613
|
+
]),
|
|
2614
|
+
_: 1
|
|
2615
|
+
})
|
|
2616
|
+
]),
|
|
2617
|
+
default: x(() => [
|
|
2618
|
+
y(f, {
|
|
2619
|
+
type: "text",
|
|
2620
|
+
size: "small",
|
|
2621
|
+
class: "table-actions__more"
|
|
2622
|
+
}, {
|
|
2623
|
+
default: x(() => [
|
|
2624
|
+
u[0] || (u[0] = oe(" 更多 ", -1)),
|
|
2625
|
+
y(n(E), {
|
|
2626
|
+
name: "caret-down",
|
|
2627
|
+
size: 12
|
|
2628
|
+
})
|
|
2629
|
+
]),
|
|
2630
|
+
_: 1
|
|
2631
|
+
})
|
|
2632
|
+
]),
|
|
2633
|
+
_: 1
|
|
2634
|
+
})) : F("", !0)
|
|
2635
|
+
], 4)) : F("", !0);
|
|
2636
|
+
};
|
|
2637
|
+
}
|
|
2638
|
+
}), gl = /* @__PURE__ */ ne(Sn, [["__scopeId", "data-v-9d8190be"]]), In = { class: "login-page" }, En = { class: "login-form-section" }, Nn = { class: "form-container" }, Tn = { class: "input-wrapper" }, Un = { class: "input-wrapper" }, zn = { class: "form-options" }, Pn = { key: 0 }, Fn = { key: 1 }, Dn = /* @__PURE__ */ ae({
|
|
2570
2639
|
__name: "index",
|
|
2571
2640
|
setup(t) {
|
|
2572
|
-
const o =
|
|
2641
|
+
const o = we(), p = Te(), l = b(!1), s = b(!1), m = Qe({
|
|
2573
2642
|
uid: "",
|
|
2574
2643
|
password: ""
|
|
2575
2644
|
}), r = {
|
|
@@ -2580,55 +2649,55 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2580
2649
|
{ required: !0, message: "请输入密码", trigger: "blur" },
|
|
2581
2650
|
{ min: 6, message: "密码长度至少6位", trigger: "blur" }
|
|
2582
2651
|
]
|
|
2583
|
-
}, v =
|
|
2584
|
-
var
|
|
2652
|
+
}, v = b(), h = async () => {
|
|
2653
|
+
var u;
|
|
2585
2654
|
try {
|
|
2586
|
-
await ((
|
|
2587
|
-
const f = await
|
|
2655
|
+
await ((u = v.value) == null ? void 0 : u.validate()), l.value = !0;
|
|
2656
|
+
const f = await wt({
|
|
2588
2657
|
appId: Se(),
|
|
2589
|
-
clientId:
|
|
2590
|
-
uid:
|
|
2591
|
-
password:
|
|
2658
|
+
clientId: ht(),
|
|
2659
|
+
uid: m.uid,
|
|
2660
|
+
password: m.password,
|
|
2592
2661
|
code: !0
|
|
2593
2662
|
});
|
|
2594
|
-
|
|
2595
|
-
const
|
|
2596
|
-
|
|
2663
|
+
vt(f), jt.success("登录成功");
|
|
2664
|
+
const g = p.query.redirect;
|
|
2665
|
+
g ? o.push(g) : o.push({ name: "Dashboard" });
|
|
2597
2666
|
} catch (f) {
|
|
2598
2667
|
console.error("登录失败:", f);
|
|
2599
2668
|
} finally {
|
|
2600
|
-
|
|
2669
|
+
l.value = !1;
|
|
2601
2670
|
}
|
|
2602
2671
|
};
|
|
2603
|
-
return (
|
|
2672
|
+
return (u, f) => (a(), d("div", In, [
|
|
2604
2673
|
f[10] || (f[10] = Ae('<div class="login-brand" data-v-20b19b53><div class="brand-content" data-v-20b19b53><div class="brand-logo" data-v-20b19b53><div class="logo-icon" data-v-20b19b53><svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-20b19b53><rect width="48" height="48" rx="12" fill="currentColor" data-v-20b19b53></rect><path d="M14 24L20 30L34 16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" data-v-20b19b53></path></svg></div><span class="logo-text" data-v-20b19b53>XTO</span></div><div class="brand-slogan" data-v-20b19b53><h1 data-v-20b19b53>企业级后台管理解决方案</h1><p data-v-20b19b53>开箱即用的中后台前端/设计解决方案</p></div><div class="brand-features" data-v-20b19b53><div class="feature-item" data-v-20b19b53><div class="feature-icon" data-v-20b19b53><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-20b19b53><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" data-v-20b19b53></path></svg></div><div class="feature-text" data-v-20b19b53><h4 data-v-20b19b53>高性能</h4><p data-v-20b19b53>极致的渲染性能与响应速度</p></div></div><div class="feature-item" data-v-20b19b53><div class="feature-icon" data-v-20b19b53><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-20b19b53><rect x="3" y="3" width="18" height="18" rx="2" data-v-20b19b53></rect><path d="M9 9h6M9 12h6M9 15h4" data-v-20b19b53></path></svg></div><div class="feature-text" data-v-20b19b53><h4 data-v-20b19b53>丰富组件</h4><p data-v-20b19b53>60+ 高质量业务组件</p></div></div><div class="feature-item" data-v-20b19b53><div class="feature-icon" data-v-20b19b53><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-20b19b53><circle cx="12" cy="12" r="10" data-v-20b19b53></circle><path d="M12 6v6l4 2" data-v-20b19b53></path></svg></div><div class="feature-text" data-v-20b19b53><h4 data-v-20b19b53>持续更新</h4><p data-v-20b19b53>活跃的社区与快速迭代</p></div></div></div><div class="brand-decoration" data-v-20b19b53><div class="decoration-line" data-v-20b19b53></div><div class="decoration-dots" data-v-20b19b53><span data-v-20b19b53></span><span data-v-20b19b53></span><span data-v-20b19b53></span></div></div></div><div class="brand-bg" data-v-20b19b53><div class="bg-grid" data-v-20b19b53></div></div></div>', 1)),
|
|
2605
|
-
e("div",
|
|
2606
|
-
e("div",
|
|
2674
|
+
e("div", En, [
|
|
2675
|
+
e("div", Nn, [
|
|
2607
2676
|
f[7] || (f[7] = e("div", { class: "form-header" }, [
|
|
2608
2677
|
e("h2", null, "欢迎登录"),
|
|
2609
2678
|
e("p", null, "请输入您的账户信息")
|
|
2610
2679
|
], -1)),
|
|
2611
|
-
y(
|
|
2680
|
+
y(n(Wt), {
|
|
2612
2681
|
ref_key: "formRef",
|
|
2613
2682
|
ref: v,
|
|
2614
|
-
model:
|
|
2683
|
+
model: m,
|
|
2615
2684
|
rules: r,
|
|
2616
2685
|
class: "login-form",
|
|
2617
2686
|
"label-width": "0"
|
|
2618
2687
|
}, {
|
|
2619
|
-
default:
|
|
2620
|
-
y(
|
|
2621
|
-
default:
|
|
2622
|
-
e("div",
|
|
2688
|
+
default: x(() => [
|
|
2689
|
+
y(n(Ke), { prop: "uid" }, {
|
|
2690
|
+
default: x(() => [
|
|
2691
|
+
e("div", Tn, [
|
|
2623
2692
|
f[3] || (f[3] = e("label", { class: "input-label" }, "用户名", -1)),
|
|
2624
|
-
y(
|
|
2625
|
-
modelValue:
|
|
2626
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
2693
|
+
y(n(ct), {
|
|
2694
|
+
modelValue: m.uid,
|
|
2695
|
+
"onUpdate:modelValue": f[0] || (f[0] = (g) => m.uid = g),
|
|
2627
2696
|
placeholder: "请输入用户名",
|
|
2628
2697
|
size: "large"
|
|
2629
2698
|
}, {
|
|
2630
|
-
prefix:
|
|
2631
|
-
y(
|
|
2699
|
+
prefix: x(() => [
|
|
2700
|
+
y(n(E), {
|
|
2632
2701
|
name: "user",
|
|
2633
2702
|
size: 18
|
|
2634
2703
|
})
|
|
@@ -2639,21 +2708,21 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2639
2708
|
]),
|
|
2640
2709
|
_: 1
|
|
2641
2710
|
}),
|
|
2642
|
-
y(
|
|
2643
|
-
default:
|
|
2644
|
-
e("div",
|
|
2711
|
+
y(n(Ke), { prop: "password" }, {
|
|
2712
|
+
default: x(() => [
|
|
2713
|
+
e("div", Un, [
|
|
2645
2714
|
f[4] || (f[4] = e("label", { class: "input-label" }, "密码", -1)),
|
|
2646
|
-
y(
|
|
2647
|
-
modelValue:
|
|
2648
|
-
"onUpdate:modelValue": f[1] || (f[1] = (
|
|
2715
|
+
y(n(ct), {
|
|
2716
|
+
modelValue: m.password,
|
|
2717
|
+
"onUpdate:modelValue": f[1] || (f[1] = (g) => m.password = g),
|
|
2649
2718
|
type: "password",
|
|
2650
2719
|
placeholder: "请输入密码",
|
|
2651
2720
|
size: "large",
|
|
2652
2721
|
"show-password": "",
|
|
2653
|
-
onKeyup:
|
|
2722
|
+
onKeyup: Dt(h, ["enter"])
|
|
2654
2723
|
}, {
|
|
2655
|
-
prefix:
|
|
2656
|
-
y(
|
|
2724
|
+
prefix: x(() => [
|
|
2725
|
+
y(n(E), {
|
|
2657
2726
|
name: "lock",
|
|
2658
2727
|
size: 18
|
|
2659
2728
|
})
|
|
@@ -2664,13 +2733,13 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2664
2733
|
]),
|
|
2665
2734
|
_: 1
|
|
2666
2735
|
}),
|
|
2667
|
-
e("div",
|
|
2668
|
-
y(
|
|
2736
|
+
e("div", zn, [
|
|
2737
|
+
y(n(qt), {
|
|
2669
2738
|
modelValue: s.value,
|
|
2670
|
-
"onUpdate:modelValue": f[2] || (f[2] = (
|
|
2739
|
+
"onUpdate:modelValue": f[2] || (f[2] = (g) => s.value = g)
|
|
2671
2740
|
}, {
|
|
2672
|
-
default:
|
|
2673
|
-
|
|
2741
|
+
default: x(() => [...f[5] || (f[5] = [
|
|
2742
|
+
oe("记住我", -1)
|
|
2674
2743
|
])]),
|
|
2675
2744
|
_: 1
|
|
2676
2745
|
}, 8, ["modelValue"]),
|
|
@@ -2679,17 +2748,17 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2679
2748
|
class: "forgot-link"
|
|
2680
2749
|
}, "忘记密码?", -1))
|
|
2681
2750
|
]),
|
|
2682
|
-
y(
|
|
2683
|
-
default:
|
|
2684
|
-
y(
|
|
2751
|
+
y(n(Ke), null, {
|
|
2752
|
+
default: x(() => [
|
|
2753
|
+
y(n(Ne), {
|
|
2685
2754
|
type: "primary",
|
|
2686
2755
|
size: "large",
|
|
2687
|
-
loading:
|
|
2756
|
+
loading: l.value,
|
|
2688
2757
|
class: "login-btn",
|
|
2689
|
-
onClick:
|
|
2758
|
+
onClick: h
|
|
2690
2759
|
}, {
|
|
2691
|
-
default:
|
|
2692
|
-
|
|
2760
|
+
default: x(() => [
|
|
2761
|
+
l.value ? (a(), d("span", Fn, "登录中...")) : (a(), d("span", Pn, "登 录"))
|
|
2693
2762
|
]),
|
|
2694
2763
|
_: 1
|
|
2695
2764
|
}, 8, ["loading"])
|
|
@@ -2707,31 +2776,31 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2707
2776
|
])
|
|
2708
2777
|
]));
|
|
2709
2778
|
}
|
|
2710
|
-
}),
|
|
2779
|
+
}), An = /* @__PURE__ */ ne(Dn, [["__scopeId", "data-v-20b19b53"]]), Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2711
2780
|
__proto__: null,
|
|
2712
|
-
default:
|
|
2713
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2781
|
+
default: An
|
|
2782
|
+
}, Symbol.toStringTag, { value: "Module" })), On = { class: "error-page" }, Vn = { class: "error-container" }, Rn = { class: "error-content" }, Kn = { class: "error-actions" }, jn = /* @__PURE__ */ ae({
|
|
2714
2783
|
__name: "404",
|
|
2715
2784
|
setup(t) {
|
|
2716
|
-
const o =
|
|
2785
|
+
const o = we(), p = () => {
|
|
2717
2786
|
o.push("/");
|
|
2718
2787
|
};
|
|
2719
|
-
return (
|
|
2720
|
-
e("div",
|
|
2788
|
+
return (l, s) => (a(), d("div", On, [
|
|
2789
|
+
e("div", Vn, [
|
|
2721
2790
|
s[7] || (s[7] = e("div", { class: "error-bg" }, [
|
|
2722
2791
|
e("div", { class: "bg-circle circle-1" }),
|
|
2723
2792
|
e("div", { class: "bg-circle circle-2" }),
|
|
2724
2793
|
e("div", { class: "bg-circle circle-3" })
|
|
2725
2794
|
], -1)),
|
|
2726
|
-
e("div",
|
|
2795
|
+
e("div", Rn, [
|
|
2727
2796
|
s[5] || (s[5] = Ae('<div class="error-code" data-v-c36cc0ad><span class="code-digit" data-v-c36cc0ad>4</span><span class="code-zero" data-v-c36cc0ad><span class="zero-inner" data-v-c36cc0ad>0</span></span><span class="code-digit" data-v-c36cc0ad>4</span></div><div class="error-illustration" data-v-c36cc0ad><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c36cc0ad><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--xto-fill-color, #F2F3F5)" stroke="var(--xto-border-color, #D9DCE1)" stroke-width="2" data-v-c36cc0ad></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--xto-bg-color, #FFFFFF)" data-v-c36cc0ad></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--xto-border-color-light, #E5E6EB)" stroke-width="2" data-v-c36cc0ad></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--xto-border-color-light, #E5E6EB)" stroke-width="2" data-v-c36cc0ad></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--xto-border-color-light, #E5E6EB)" stroke-width="2" data-v-c36cc0ad></line><text x="100" y="75" text-anchor="middle" fill="var(--xto-color-primary, #4F46E5)" font-size="24" font-weight="600" data-v-c36cc0ad>?</text><circle cx="150" cy="35" r="12" stroke="var(--xto-color-primary, #4F46E5)" stroke-width="2" fill="none" data-v-c36cc0ad></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--xto-color-primary, #4F46E5)" stroke-width="2" stroke-linecap="round" data-v-c36cc0ad></line></svg></div><h1 class="error-title" data-v-c36cc0ad>页面不存在</h1><p class="error-desc" data-v-c36cc0ad>抱歉,您访问的页面不存在或已被删除</p>', 4)),
|
|
2728
|
-
e("div",
|
|
2729
|
-
y(
|
|
2797
|
+
e("div", Kn, [
|
|
2798
|
+
y(n(Ne), {
|
|
2730
2799
|
type: "primary",
|
|
2731
2800
|
size: "large",
|
|
2732
2801
|
onClick: p
|
|
2733
2802
|
}, {
|
|
2734
|
-
icon:
|
|
2803
|
+
icon: x(() => [...s[1] || (s[1] = [
|
|
2735
2804
|
e("svg", {
|
|
2736
2805
|
viewBox: "0 0 24 24",
|
|
2737
2806
|
fill: "none",
|
|
@@ -2742,16 +2811,16 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2742
2811
|
e("polyline", { points: "9,22 9,12 15,12 15,22" })
|
|
2743
2812
|
], -1)
|
|
2744
2813
|
])]),
|
|
2745
|
-
default:
|
|
2746
|
-
s[2] || (s[2] =
|
|
2814
|
+
default: x(() => [
|
|
2815
|
+
s[2] || (s[2] = oe(" 返回首页 ", -1))
|
|
2747
2816
|
]),
|
|
2748
2817
|
_: 1
|
|
2749
2818
|
}),
|
|
2750
|
-
y(
|
|
2819
|
+
y(n(Ne), {
|
|
2751
2820
|
size: "large",
|
|
2752
|
-
onClick: s[0] || (s[0] = (
|
|
2821
|
+
onClick: s[0] || (s[0] = (m) => n(o).go(-1))
|
|
2753
2822
|
}, {
|
|
2754
|
-
icon:
|
|
2823
|
+
icon: x(() => [...s[3] || (s[3] = [
|
|
2755
2824
|
e("svg", {
|
|
2756
2825
|
viewBox: "0 0 24 24",
|
|
2757
2826
|
fill: "none",
|
|
@@ -2761,8 +2830,8 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2761
2830
|
e("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
2762
2831
|
], -1)
|
|
2763
2832
|
])]),
|
|
2764
|
-
default:
|
|
2765
|
-
s[4] || (s[4] =
|
|
2833
|
+
default: x(() => [
|
|
2834
|
+
s[4] || (s[4] = oe(" 返回上一页 ", -1))
|
|
2766
2835
|
]),
|
|
2767
2836
|
_: 1
|
|
2768
2837
|
})
|
|
@@ -2779,31 +2848,31 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2779
2848
|
])
|
|
2780
2849
|
]));
|
|
2781
2850
|
}
|
|
2782
|
-
}),
|
|
2851
|
+
}), Wn = /* @__PURE__ */ ne(jn, [["__scopeId", "data-v-c36cc0ad"]]), gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2783
2852
|
__proto__: null,
|
|
2784
|
-
default:
|
|
2785
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2853
|
+
default: Wn
|
|
2854
|
+
}, Symbol.toStringTag, { value: "Module" })), qn = { class: "error-page" }, Hn = { class: "error-container" }, Yn = { class: "error-content" }, Gn = { class: "error-actions" }, Xn = /* @__PURE__ */ ae({
|
|
2786
2855
|
__name: "403",
|
|
2787
2856
|
setup(t) {
|
|
2788
|
-
const o =
|
|
2857
|
+
const o = we(), p = () => {
|
|
2789
2858
|
o.push("/");
|
|
2790
2859
|
};
|
|
2791
|
-
return (
|
|
2792
|
-
e("div",
|
|
2860
|
+
return (l, s) => (a(), d("div", qn, [
|
|
2861
|
+
e("div", Hn, [
|
|
2793
2862
|
s[7] || (s[7] = e("div", { class: "error-bg" }, [
|
|
2794
2863
|
e("div", { class: "bg-circle circle-1" }),
|
|
2795
2864
|
e("div", { class: "bg-circle circle-2" }),
|
|
2796
2865
|
e("div", { class: "bg-circle circle-3" })
|
|
2797
2866
|
], -1)),
|
|
2798
|
-
e("div",
|
|
2867
|
+
e("div", Yn, [
|
|
2799
2868
|
s[5] || (s[5] = Ae('<div class="error-code" data-v-e6e1f7ac><span class="code-digit" data-v-e6e1f7ac>4</span><span class="code-zero warning" data-v-e6e1f7ac><span class="zero-inner" data-v-e6e1f7ac>0</span></span><span class="code-digit" data-v-e6e1f7ac>3</span></div><div class="error-illustration" data-v-e6e1f7ac><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-e6e1f7ac><path d="M100 15 L150 35 L150 70 C150 95 100 110 100 110 C100 110 50 95 50 70 L50 35 Z" fill="var(--xto-color-warning-light-9, #FFF3E8)" stroke="var(--xto-color-warning, #FF7D00)" stroke-width="2" data-v-e6e1f7ac></path><rect x="85" y="55" width="30" height="25" rx="4" fill="var(--xto-color-warning, #FF7D00)" data-v-e6e1f7ac></rect><path d="M92 55 V48 A8 8 0 0 1 108 48 V55" fill="none" stroke="var(--xto-color-warning, #FF7D00)" stroke-width="3" data-v-e6e1f7ac></path><circle cx="100" cy="67" r="6" fill="none" stroke="#fff" stroke-width="2" data-v-e6e1f7ac></circle><line x1="96" y1="63" x2="104" y2="71" stroke="#fff" stroke-width="2" data-v-e6e1f7ac></line></svg></div><h1 class="error-title" data-v-e6e1f7ac>无访问权限</h1><p class="error-desc" data-v-e6e1f7ac>抱歉,您没有权限访问此页面,请联系管理员获取权限</p>', 4)),
|
|
2800
|
-
e("div",
|
|
2801
|
-
y(
|
|
2869
|
+
e("div", Gn, [
|
|
2870
|
+
y(n(Ne), {
|
|
2802
2871
|
type: "primary",
|
|
2803
2872
|
size: "large",
|
|
2804
2873
|
onClick: p
|
|
2805
2874
|
}, {
|
|
2806
|
-
icon:
|
|
2875
|
+
icon: x(() => [...s[1] || (s[1] = [
|
|
2807
2876
|
e("svg", {
|
|
2808
2877
|
viewBox: "0 0 24 24",
|
|
2809
2878
|
fill: "none",
|
|
@@ -2814,16 +2883,16 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2814
2883
|
e("polyline", { points: "9,22 9,12 15,12 15,22" })
|
|
2815
2884
|
], -1)
|
|
2816
2885
|
])]),
|
|
2817
|
-
default:
|
|
2818
|
-
s[2] || (s[2] =
|
|
2886
|
+
default: x(() => [
|
|
2887
|
+
s[2] || (s[2] = oe(" 返回首页 ", -1))
|
|
2819
2888
|
]),
|
|
2820
2889
|
_: 1
|
|
2821
2890
|
}),
|
|
2822
|
-
y(
|
|
2891
|
+
y(n(Ne), {
|
|
2823
2892
|
size: "large",
|
|
2824
|
-
onClick: s[0] || (s[0] = (
|
|
2893
|
+
onClick: s[0] || (s[0] = (m) => n(o).go(-1))
|
|
2825
2894
|
}, {
|
|
2826
|
-
icon:
|
|
2895
|
+
icon: x(() => [...s[3] || (s[3] = [
|
|
2827
2896
|
e("svg", {
|
|
2828
2897
|
viewBox: "0 0 24 24",
|
|
2829
2898
|
fill: "none",
|
|
@@ -2833,8 +2902,8 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2833
2902
|
e("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
2834
2903
|
], -1)
|
|
2835
2904
|
])]),
|
|
2836
|
-
default:
|
|
2837
|
-
s[4] || (s[4] =
|
|
2905
|
+
default: x(() => [
|
|
2906
|
+
s[4] || (s[4] = oe(" 返回上一页 ", -1))
|
|
2838
2907
|
]),
|
|
2839
2908
|
_: 1
|
|
2840
2909
|
})
|
|
@@ -2851,17 +2920,17 @@ const rl = /* @__PURE__ */ re(pn, [["render", hn], ["__scopeId", "data-v-ac63e34
|
|
|
2851
2920
|
])
|
|
2852
2921
|
]));
|
|
2853
2922
|
}
|
|
2854
|
-
}),
|
|
2855
|
-
function
|
|
2856
|
-
const t = fe(), o = me(), p = Fe(),
|
|
2923
|
+
}), yl = /* @__PURE__ */ ne(Xn, [["__scopeId", "data-v-e6e1f7ac"]]);
|
|
2924
|
+
function bl() {
|
|
2925
|
+
const t = fe(), o = me(), p = Fe(), l = k(() => o.userName || ""), s = k(() => o.userInfo), m = k(() => t.appName), r = k(() => p.isLoggedIn), v = k(() => t.isDark), h = k(() => t.theme), u = k(() => t.isCollapsed), f = k(() => t.layout);
|
|
2857
2926
|
return {
|
|
2858
|
-
userName:
|
|
2927
|
+
userName: l,
|
|
2859
2928
|
userInfo: s,
|
|
2860
|
-
appName:
|
|
2929
|
+
appName: m,
|
|
2861
2930
|
isLoggedIn: r,
|
|
2862
2931
|
isDark: v,
|
|
2863
|
-
theme:
|
|
2864
|
-
isCollapsed:
|
|
2932
|
+
theme: h,
|
|
2933
|
+
isCollapsed: u,
|
|
2865
2934
|
layout: f,
|
|
2866
2935
|
toggleTheme: () => {
|
|
2867
2936
|
t.toggleTheme();
|
|
@@ -2871,106 +2940,106 @@ function dl() {
|
|
|
2871
2940
|
}
|
|
2872
2941
|
};
|
|
2873
2942
|
}
|
|
2874
|
-
function
|
|
2943
|
+
function kl() {
|
|
2875
2944
|
const t = me();
|
|
2876
2945
|
return {
|
|
2877
|
-
isLoggedIn:
|
|
2946
|
+
isLoggedIn: k(() => t.isLoggedIn)
|
|
2878
2947
|
};
|
|
2879
2948
|
}
|
|
2880
|
-
function
|
|
2881
|
-
const { rules: p, onSubmit:
|
|
2882
|
-
c(),
|
|
2949
|
+
function wl(t, o = {}) {
|
|
2950
|
+
const { rules: p, onSubmit: l } = o, s = b(), m = Qe({ ...t }), r = b(!1), v = b(!1), h = b(!1), u = () => {
|
|
2951
|
+
c(), h.value = !1, v.value = !0;
|
|
2883
2952
|
}, f = (z) => {
|
|
2884
|
-
Object.assign(
|
|
2885
|
-
},
|
|
2953
|
+
Object.assign(m, z), h.value = !0, v.value = !0;
|
|
2954
|
+
}, g = () => {
|
|
2886
2955
|
v.value = !1, c();
|
|
2887
2956
|
}, c = () => {
|
|
2888
2957
|
var z;
|
|
2889
|
-
Object.keys(t).forEach((
|
|
2890
|
-
|
|
2958
|
+
Object.keys(t).forEach((D) => {
|
|
2959
|
+
m[D] = t[D];
|
|
2891
2960
|
}), (z = s.value) == null || z.resetFields();
|
|
2892
2961
|
};
|
|
2893
2962
|
return {
|
|
2894
2963
|
formRef: s,
|
|
2895
|
-
formData:
|
|
2964
|
+
formData: m,
|
|
2896
2965
|
rules: p,
|
|
2897
2966
|
loading: r,
|
|
2898
2967
|
visible: v,
|
|
2899
|
-
isEdit:
|
|
2900
|
-
openAdd:
|
|
2968
|
+
isEdit: h,
|
|
2969
|
+
openAdd: u,
|
|
2901
2970
|
openEdit: f,
|
|
2902
|
-
close:
|
|
2971
|
+
close: g,
|
|
2903
2972
|
resetForm: c,
|
|
2904
2973
|
handleSubmit: async () => {
|
|
2905
2974
|
var z;
|
|
2906
2975
|
try {
|
|
2907
|
-
await ((z = s.value) == null ? void 0 : z.validate()), r.value = !0, await (
|
|
2908
|
-
} catch (
|
|
2909
|
-
console.error(
|
|
2976
|
+
await ((z = s.value) == null ? void 0 : z.validate()), r.value = !0, await (l == null ? void 0 : l(m)), g();
|
|
2977
|
+
} catch (D) {
|
|
2978
|
+
console.error(D);
|
|
2910
2979
|
} finally {
|
|
2911
2980
|
r.value = !1;
|
|
2912
2981
|
}
|
|
2913
2982
|
}
|
|
2914
2983
|
};
|
|
2915
2984
|
}
|
|
2916
|
-
function
|
|
2917
|
-
const { fetchData: o, defaultPageSize: p = 10 } = t,
|
|
2918
|
-
|
|
2985
|
+
function xl(t) {
|
|
2986
|
+
const { fetchData: o, defaultPageSize: p = 10 } = t, l = b(!1), s = b([]), m = b(0), r = b(1), v = b(p), h = Qe({}), u = async () => {
|
|
2987
|
+
l.value = !0;
|
|
2919
2988
|
try {
|
|
2920
2989
|
const O = {
|
|
2921
|
-
...
|
|
2990
|
+
...h,
|
|
2922
2991
|
page: r.value,
|
|
2923
2992
|
pageSize: v.value
|
|
2924
2993
|
}, R = await o(O);
|
|
2925
|
-
s.value = R.list,
|
|
2994
|
+
s.value = R.list, m.value = R.total;
|
|
2926
2995
|
} catch (O) {
|
|
2927
2996
|
console.error(O);
|
|
2928
2997
|
} finally {
|
|
2929
|
-
|
|
2998
|
+
l.value = !1;
|
|
2930
2999
|
}
|
|
2931
3000
|
}, f = () => {
|
|
2932
|
-
r.value = 1,
|
|
2933
|
-
},
|
|
2934
|
-
Object.keys(
|
|
2935
|
-
|
|
2936
|
-
}), r.value = 1,
|
|
3001
|
+
r.value = 1, u();
|
|
3002
|
+
}, g = () => {
|
|
3003
|
+
Object.keys(h).forEach((O) => {
|
|
3004
|
+
h[O] = void 0;
|
|
3005
|
+
}), r.value = 1, u();
|
|
2937
3006
|
}, c = (O) => {
|
|
2938
|
-
r.value = O,
|
|
3007
|
+
r.value = O, u();
|
|
2939
3008
|
}, V = (O) => {
|
|
2940
|
-
v.value = O, r.value = 1,
|
|
3009
|
+
v.value = O, r.value = 1, u();
|
|
2941
3010
|
}, z = () => {
|
|
2942
|
-
|
|
2943
|
-
},
|
|
3011
|
+
u();
|
|
3012
|
+
}, D = k(() => ({
|
|
2944
3013
|
current: r.value,
|
|
2945
3014
|
pageSize: v.value,
|
|
2946
|
-
total:
|
|
3015
|
+
total: m.value
|
|
2947
3016
|
}));
|
|
2948
3017
|
return {
|
|
2949
|
-
loading:
|
|
3018
|
+
loading: l,
|
|
2950
3019
|
data: s,
|
|
2951
|
-
total:
|
|
3020
|
+
total: m,
|
|
2952
3021
|
currentPage: r,
|
|
2953
3022
|
pageSize: v,
|
|
2954
|
-
searchParams:
|
|
2955
|
-
pagination:
|
|
2956
|
-
getData:
|
|
3023
|
+
searchParams: h,
|
|
3024
|
+
pagination: D,
|
|
3025
|
+
getData: u,
|
|
2957
3026
|
handleSearch: f,
|
|
2958
|
-
handleReset:
|
|
3027
|
+
handleReset: g,
|
|
2959
3028
|
handlePageChange: c,
|
|
2960
3029
|
handleSizeChange: V,
|
|
2961
3030
|
refresh: z
|
|
2962
3031
|
};
|
|
2963
3032
|
}
|
|
2964
3033
|
const ot = Pe("locale", () => {
|
|
2965
|
-
const t = U.get("locale") || "zh-CN", o =
|
|
2966
|
-
const c =
|
|
3034
|
+
const t = U.get("locale") || "zh-CN", o = Ht(t), p = b(t), l = Yt(), { t: s, messages: m, setLocale: r, mergeMessages: v } = Gt(), h = k(() => {
|
|
3035
|
+
const c = l.find((V) => V.code === p.value);
|
|
2967
3036
|
return (c == null ? void 0 : c.name) || p.value;
|
|
2968
3037
|
});
|
|
2969
3038
|
return {
|
|
2970
3039
|
locale: p,
|
|
2971
|
-
localeName:
|
|
2972
|
-
locales:
|
|
2973
|
-
messages:
|
|
3040
|
+
localeName: h,
|
|
3041
|
+
locales: l,
|
|
3042
|
+
messages: m,
|
|
2974
3043
|
t: s,
|
|
2975
3044
|
changeLocale: (c) => {
|
|
2976
3045
|
p.value = c, r(c), U.set("locale", c), o.setLocale(c);
|
|
@@ -2983,11 +3052,11 @@ const ot = Pe("locale", () => {
|
|
|
2983
3052
|
},
|
|
2984
3053
|
provider: o
|
|
2985
3054
|
};
|
|
2986
|
-
}),
|
|
3055
|
+
}), Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2987
3056
|
__proto__: null,
|
|
2988
3057
|
useLocaleStore: ot
|
|
2989
3058
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2990
|
-
function
|
|
3059
|
+
function Cl() {
|
|
2991
3060
|
const t = ot();
|
|
2992
3061
|
return {
|
|
2993
3062
|
/** 当前语言代码 */
|
|
@@ -3006,39 +3075,39 @@ function hl() {
|
|
|
3006
3075
|
addMessages: t.addMessages
|
|
3007
3076
|
};
|
|
3008
3077
|
}
|
|
3009
|
-
function
|
|
3078
|
+
function $l() {
|
|
3010
3079
|
return ot().t;
|
|
3011
3080
|
}
|
|
3012
|
-
function
|
|
3081
|
+
function Ll(t) {
|
|
3013
3082
|
const o = me(), p = ge();
|
|
3014
3083
|
return o.isLoggedIn ? p.hasPermission(t) : !1;
|
|
3015
3084
|
}
|
|
3016
|
-
function
|
|
3085
|
+
function Ml(t) {
|
|
3017
3086
|
return me().isLoggedIn;
|
|
3018
3087
|
}
|
|
3019
|
-
function
|
|
3088
|
+
function Sl() {
|
|
3020
3089
|
return !0;
|
|
3021
3090
|
}
|
|
3022
|
-
const
|
|
3091
|
+
const yt = [
|
|
3023
3092
|
{
|
|
3024
3093
|
path: "/login",
|
|
3025
3094
|
name: "Login",
|
|
3026
|
-
component: () => Promise.resolve().then(() =>
|
|
3095
|
+
component: () => Promise.resolve().then(() => Bn),
|
|
3027
3096
|
meta: {
|
|
3028
3097
|
title: "登录",
|
|
3029
3098
|
hidden: !0
|
|
3030
3099
|
}
|
|
3031
3100
|
}
|
|
3032
|
-
],
|
|
3101
|
+
], bt = {
|
|
3033
3102
|
path: "/",
|
|
3034
3103
|
name: "Layout",
|
|
3035
|
-
component: () => Promise.resolve().then(() =>
|
|
3104
|
+
component: () => Promise.resolve().then(() => hn),
|
|
3036
3105
|
redirect: "/dashboard",
|
|
3037
3106
|
children: [
|
|
3038
3107
|
{
|
|
3039
3108
|
path: "/dashboard",
|
|
3040
3109
|
name: "Dashboard",
|
|
3041
|
-
component: () => import("./index-
|
|
3110
|
+
component: () => import("./index-BXcy4Waf.js"),
|
|
3042
3111
|
meta: {
|
|
3043
3112
|
title: "仪表盘",
|
|
3044
3113
|
icon: "dashboard",
|
|
@@ -3049,7 +3118,7 @@ const gt = [
|
|
|
3049
3118
|
{
|
|
3050
3119
|
path: "/system/user",
|
|
3051
3120
|
name: "SystemUser",
|
|
3052
|
-
component: () => import("./index-
|
|
3121
|
+
component: () => import("./index-B1Mm04GL.js"),
|
|
3053
3122
|
meta: {
|
|
3054
3123
|
title: "用户管理",
|
|
3055
3124
|
icon: "user",
|
|
@@ -3059,7 +3128,7 @@ const gt = [
|
|
|
3059
3128
|
{
|
|
3060
3129
|
path: "/system/role",
|
|
3061
3130
|
name: "SystemRole",
|
|
3062
|
-
component: () => import("./index-
|
|
3131
|
+
component: () => import("./index-ChjL51Io.js"),
|
|
3063
3132
|
meta: {
|
|
3064
3133
|
title: "角色管理",
|
|
3065
3134
|
icon: "role",
|
|
@@ -3069,7 +3138,7 @@ const gt = [
|
|
|
3069
3138
|
{
|
|
3070
3139
|
path: "/system/menu",
|
|
3071
3140
|
name: "SystemMenu",
|
|
3072
|
-
component: () => import("./index-
|
|
3141
|
+
component: () => import("./index-CEMQH6PX.js"),
|
|
3073
3142
|
meta: {
|
|
3074
3143
|
title: "菜单管理",
|
|
3075
3144
|
icon: "menu",
|
|
@@ -3080,18 +3149,18 @@ const gt = [
|
|
|
3080
3149
|
{
|
|
3081
3150
|
path: "/:pathMatch(.*)*",
|
|
3082
3151
|
name: "CatchAll",
|
|
3083
|
-
component: () => Promise.resolve().then(() =>
|
|
3152
|
+
component: () => Promise.resolve().then(() => gt),
|
|
3084
3153
|
meta: {
|
|
3085
3154
|
title: "404",
|
|
3086
3155
|
hidden: !0
|
|
3087
3156
|
}
|
|
3088
3157
|
}
|
|
3089
3158
|
]
|
|
3090
|
-
},
|
|
3159
|
+
}, Il = [
|
|
3091
3160
|
{
|
|
3092
3161
|
path: "/dashboard",
|
|
3093
3162
|
name: "Dashboard",
|
|
3094
|
-
component: () => import("./index-
|
|
3163
|
+
component: () => import("./index-BXcy4Waf.js"),
|
|
3095
3164
|
meta: {
|
|
3096
3165
|
title: "仪表盘",
|
|
3097
3166
|
icon: "dashboard",
|
|
@@ -3111,7 +3180,7 @@ const gt = [
|
|
|
3111
3180
|
{
|
|
3112
3181
|
path: "user",
|
|
3113
3182
|
name: "SystemUser",
|
|
3114
|
-
component: () => import("./index-
|
|
3183
|
+
component: () => import("./index-B1Mm04GL.js"),
|
|
3115
3184
|
meta: {
|
|
3116
3185
|
title: "用户管理",
|
|
3117
3186
|
icon: "user",
|
|
@@ -3121,7 +3190,7 @@ const gt = [
|
|
|
3121
3190
|
{
|
|
3122
3191
|
path: "role",
|
|
3123
3192
|
name: "SystemRole",
|
|
3124
|
-
component: () => import("./index-
|
|
3193
|
+
component: () => import("./index-ChjL51Io.js"),
|
|
3125
3194
|
meta: {
|
|
3126
3195
|
title: "角色管理",
|
|
3127
3196
|
icon: "role",
|
|
@@ -3131,7 +3200,7 @@ const gt = [
|
|
|
3131
3200
|
{
|
|
3132
3201
|
path: "menu",
|
|
3133
3202
|
name: "SystemMenu",
|
|
3134
|
-
component: () => import("./index-
|
|
3203
|
+
component: () => import("./index-CEMQH6PX.js"),
|
|
3135
3204
|
meta: {
|
|
3136
3205
|
title: "菜单管理",
|
|
3137
3206
|
icon: "menu",
|
|
@@ -3140,7 +3209,7 @@ const gt = [
|
|
|
3140
3209
|
}
|
|
3141
3210
|
]
|
|
3142
3211
|
}
|
|
3143
|
-
],
|
|
3212
|
+
], Qn = [
|
|
3144
3213
|
{
|
|
3145
3214
|
menuCode: "dashboard",
|
|
3146
3215
|
menuName: "仪表盘",
|
|
@@ -3188,14 +3257,14 @@ const gt = [
|
|
|
3188
3257
|
}
|
|
3189
3258
|
]
|
|
3190
3259
|
}
|
|
3191
|
-
],
|
|
3260
|
+
], kt = Ze({
|
|
3192
3261
|
history: et(),
|
|
3193
|
-
routes: [...
|
|
3262
|
+
routes: [...yt, bt],
|
|
3194
3263
|
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
3195
|
-
}),
|
|
3196
|
-
|
|
3197
|
-
const
|
|
3198
|
-
if (
|
|
3264
|
+
}), Zn = ["/login"];
|
|
3265
|
+
kt.beforeEach(async (t, o, p) => {
|
|
3266
|
+
const l = fe();
|
|
3267
|
+
if (l.initTheme(), mt())
|
|
3199
3268
|
if (t.path === "/login")
|
|
3200
3269
|
p({ path: "/" });
|
|
3201
3270
|
else {
|
|
@@ -3209,23 +3278,23 @@ bt.beforeEach(async (t, o, p) => {
|
|
|
3209
3278
|
mobilePhone: "13800138000",
|
|
3210
3279
|
positionName: "管理员",
|
|
3211
3280
|
avatar: ""
|
|
3212
|
-
}), ge().setMenuList(
|
|
3281
|
+
}), ge().setMenuList(Qn)), t.name && t.meta.keepAlive && l.addCachedView(t.name), p();
|
|
3213
3282
|
}
|
|
3214
3283
|
else
|
|
3215
|
-
|
|
3284
|
+
Zn.includes(t.path) ? p() : p("/login");
|
|
3216
3285
|
});
|
|
3217
|
-
function
|
|
3218
|
-
const t =
|
|
3286
|
+
function El() {
|
|
3287
|
+
const t = Ze({
|
|
3219
3288
|
history: et(),
|
|
3220
|
-
routes: [...
|
|
3289
|
+
routes: [...yt, bt]
|
|
3221
3290
|
});
|
|
3222
|
-
|
|
3291
|
+
kt.matcher = t.matcher;
|
|
3223
3292
|
}
|
|
3224
|
-
function
|
|
3225
|
-
const p = o.indexPath || "/dashboard",
|
|
3293
|
+
function Nl(t, o = {}) {
|
|
3294
|
+
const p = o.indexPath || "/dashboard", l = o.logoSrc, s = {
|
|
3226
3295
|
path: "/:pathMatch(.*)*",
|
|
3227
3296
|
name: "CatchAll",
|
|
3228
|
-
component: () => Promise.resolve().then(() =>
|
|
3297
|
+
component: () => Promise.resolve().then(() => gt),
|
|
3229
3298
|
meta: {
|
|
3230
3299
|
title: "404"
|
|
3231
3300
|
}
|
|
@@ -3233,84 +3302,84 @@ function wl(t, o = {}) {
|
|
|
3233
3302
|
return {
|
|
3234
3303
|
path: "/",
|
|
3235
3304
|
name: "Layout",
|
|
3236
|
-
component:
|
|
3305
|
+
component: ae({
|
|
3237
3306
|
name: "LayoutWrapper",
|
|
3238
3307
|
render() {
|
|
3239
|
-
return
|
|
3308
|
+
return At(ft, { logoSrc: l || ze("/vite.svg") });
|
|
3240
3309
|
}
|
|
3241
3310
|
}),
|
|
3242
3311
|
redirect: p,
|
|
3243
3312
|
children: [...t, s]
|
|
3244
3313
|
};
|
|
3245
3314
|
}
|
|
3246
|
-
function
|
|
3247
|
-
const p = o.base ||
|
|
3248
|
-
return
|
|
3315
|
+
function Tl(t, o = {}) {
|
|
3316
|
+
const p = o.base || xt();
|
|
3317
|
+
return Ze({
|
|
3249
3318
|
history: et(p),
|
|
3250
3319
|
routes: t,
|
|
3251
3320
|
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
3252
3321
|
});
|
|
3253
3322
|
}
|
|
3254
|
-
const
|
|
3255
|
-
function
|
|
3323
|
+
const el = ["login", "404", "403", "/login", "/404", "/403"];
|
|
3324
|
+
function tl(t, o) {
|
|
3256
3325
|
if (o.includes(t)) return !0;
|
|
3257
3326
|
const p = t.startsWith("/") ? t.slice(1) : t;
|
|
3258
3327
|
return o.includes(p);
|
|
3259
3328
|
}
|
|
3260
|
-
function
|
|
3261
|
-
const p = o.whiteList ||
|
|
3262
|
-
t.beforeEach(async (
|
|
3263
|
-
const r = fe(), v = me(),
|
|
3264
|
-
if (r.initTheme(),
|
|
3265
|
-
if (
|
|
3266
|
-
|
|
3329
|
+
function Ul(t, o = {}) {
|
|
3330
|
+
const p = o.whiteList || el;
|
|
3331
|
+
t.beforeEach(async (l, s, m) => {
|
|
3332
|
+
const r = fe(), v = me(), h = ge(), u = r.loginPath || o.loginPath || "/login";
|
|
3333
|
+
if (r.initTheme(), dt())
|
|
3334
|
+
if (l.path === u || l.name === "Login")
|
|
3335
|
+
m({ name: "Dashboard" });
|
|
3267
3336
|
else if (v.isLoggedIn) {
|
|
3268
|
-
if (!
|
|
3337
|
+
if (!h.hasMenu)
|
|
3269
3338
|
try {
|
|
3270
|
-
const
|
|
3271
|
-
|
|
3272
|
-
} catch (
|
|
3273
|
-
console.warn("补拉菜单失败:",
|
|
3339
|
+
const g = o.fetchMenu ? await o.fetchMenu() : await lt(o.appId);
|
|
3340
|
+
h.setMenuList(g);
|
|
3341
|
+
} catch (g) {
|
|
3342
|
+
console.warn("补拉菜单失败:", g);
|
|
3274
3343
|
}
|
|
3275
|
-
|
|
3344
|
+
l.name && l.meta.keepAlive && r.addCachedView(l.name), m();
|
|
3276
3345
|
} else
|
|
3277
3346
|
try {
|
|
3278
3347
|
if (o.fetchUserInfo) {
|
|
3279
|
-
const
|
|
3280
|
-
v.setUserInfo(
|
|
3348
|
+
const g = await o.fetchUserInfo();
|
|
3349
|
+
v.setUserInfo(g);
|
|
3281
3350
|
} else {
|
|
3282
|
-
const
|
|
3283
|
-
v.setUserInfo(
|
|
3351
|
+
const g = await Ct();
|
|
3352
|
+
v.setUserInfo(g);
|
|
3284
3353
|
}
|
|
3285
3354
|
if (o.fetchMenu) {
|
|
3286
|
-
const
|
|
3287
|
-
|
|
3355
|
+
const g = await o.fetchMenu();
|
|
3356
|
+
h.setMenuList(g);
|
|
3288
3357
|
} else {
|
|
3289
|
-
const
|
|
3290
|
-
|
|
3358
|
+
const g = await lt(o.appId);
|
|
3359
|
+
h.setMenuList(g);
|
|
3291
3360
|
}
|
|
3292
|
-
o.onLoginSuccess && o.onLoginSuccess(),
|
|
3293
|
-
} catch (
|
|
3294
|
-
console.error("获取用户信息失败:",
|
|
3361
|
+
o.onLoginSuccess && o.onLoginSuccess(), l.name && l.meta.keepAlive && r.addCachedView(l.name), m({ ...l, replace: !0 });
|
|
3362
|
+
} catch (g) {
|
|
3363
|
+
console.error("获取用户信息失败:", g), v.clearUserInfo(), h.clearMenu(), pt(), m({ name: "Login", query: { redirect: l.fullPath } });
|
|
3295
3364
|
}
|
|
3296
3365
|
else
|
|
3297
|
-
|
|
3366
|
+
tl(l.path, p) || l.name === "Login" || l.name === "NotFound" || l.name === "Forbidden" ? m() : m({ name: "Login", query: { redirect: l.fullPath } });
|
|
3298
3367
|
}), t.afterEach(() => {
|
|
3299
3368
|
});
|
|
3300
3369
|
}
|
|
3301
|
-
var
|
|
3302
|
-
const
|
|
3370
|
+
var sl = /* @__PURE__ */ ((t) => (t[t.ENABLED = 1] = "ENABLED", t[t.DISABLED = 0] = "DISABLED", t))(sl || {}), ol = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.MALE = 1] = "MALE", t[t.FEMALE = 2] = "FEMALE", t))(ol || {}), al = /* @__PURE__ */ ((t) => (t[t.DIRECTORY = 0] = "DIRECTORY", t[t.MENU = 1] = "MENU", t[t.BUTTON = 2] = "BUTTON", t))(al || {});
|
|
3371
|
+
const zl = {
|
|
3303
3372
|
1: "启用",
|
|
3304
3373
|
0: "禁用"
|
|
3305
|
-
},
|
|
3374
|
+
}, Pl = {
|
|
3306
3375
|
0: "未知",
|
|
3307
3376
|
1: "男",
|
|
3308
3377
|
2: "女"
|
|
3309
|
-
},
|
|
3378
|
+
}, Fl = {
|
|
3310
3379
|
0: "目录",
|
|
3311
3380
|
1: "菜单",
|
|
3312
3381
|
2: "按钮"
|
|
3313
|
-
},
|
|
3382
|
+
}, Dl = [
|
|
3314
3383
|
{
|
|
3315
3384
|
label: "启用",
|
|
3316
3385
|
value: 1
|
|
@@ -3321,7 +3390,7 @@ const $l = {
|
|
|
3321
3390
|
value: 0
|
|
3322
3391
|
/* DISABLED */
|
|
3323
3392
|
}
|
|
3324
|
-
],
|
|
3393
|
+
], Al = [
|
|
3325
3394
|
{
|
|
3326
3395
|
label: "未知",
|
|
3327
3396
|
value: 0
|
|
@@ -3337,7 +3406,7 @@ const $l = {
|
|
|
3337
3406
|
value: 2
|
|
3338
3407
|
/* FEMALE */
|
|
3339
3408
|
}
|
|
3340
|
-
],
|
|
3409
|
+
], Bl = [
|
|
3341
3410
|
{
|
|
3342
3411
|
label: "目录",
|
|
3343
3412
|
value: 0
|
|
@@ -3353,48 +3422,48 @@ const $l = {
|
|
|
3353
3422
|
value: 2
|
|
3354
3423
|
/* BUTTON */
|
|
3355
3424
|
}
|
|
3356
|
-
],
|
|
3425
|
+
], Ol = {
|
|
3357
3426
|
mounted(t, o) {
|
|
3358
3427
|
var r, v;
|
|
3359
|
-
const p = me(),
|
|
3428
|
+
const p = me(), l = ge();
|
|
3360
3429
|
if (!p.isLoggedIn) {
|
|
3361
3430
|
(r = t.parentNode) == null || r.removeChild(t);
|
|
3362
3431
|
return;
|
|
3363
3432
|
}
|
|
3364
|
-
const s = o.value,
|
|
3365
|
-
|
|
3433
|
+
const s = o.value, m = Array.isArray(s) ? s : [s];
|
|
3434
|
+
l.hasPermission(m) || (v = t.parentNode) == null || v.removeChild(t);
|
|
3366
3435
|
}
|
|
3367
3436
|
};
|
|
3368
|
-
async function
|
|
3369
|
-
await
|
|
3437
|
+
async function Vl(t) {
|
|
3438
|
+
await $t(t.basePath);
|
|
3370
3439
|
const o = rt();
|
|
3371
|
-
o &&
|
|
3440
|
+
o && Lt(o), Mt({
|
|
3372
3441
|
appId: t.appId,
|
|
3373
3442
|
clientId: t.clientId,
|
|
3374
3443
|
apiBaseUrl: o || t.apiBaseUrl,
|
|
3375
3444
|
basePath: t.basePath
|
|
3376
|
-
}), t.basePath &&
|
|
3377
|
-
const p = typeof window < "u" && window.location.pathname.includes("/h5/"),
|
|
3378
|
-
if (
|
|
3445
|
+
}), t.basePath && St(t.basePath);
|
|
3446
|
+
const p = typeof window < "u" && window.location.pathname.includes("/h5/"), l = t.appId || Se();
|
|
3447
|
+
if (l && !p)
|
|
3379
3448
|
try {
|
|
3380
3449
|
const s = await Promise.race([
|
|
3381
|
-
|
|
3382
|
-
new Promise((
|
|
3450
|
+
It(l),
|
|
3451
|
+
new Promise((m) => setTimeout(() => m(null), 2e3))
|
|
3383
3452
|
]);
|
|
3384
|
-
s && typeof s == "object" &&
|
|
3453
|
+
s && typeof s == "object" && Et(s);
|
|
3385
3454
|
} catch (s) {
|
|
3386
3455
|
console.warn("加载应用界面配置失败,使用内置默认", s);
|
|
3387
3456
|
}
|
|
3388
|
-
return Promise.resolve().then(() =>
|
|
3389
|
-
const
|
|
3390
|
-
t.appName &&
|
|
3391
|
-
}), t.locale && Promise.resolve().then(() =>
|
|
3457
|
+
return Promise.resolve().then(() => Qt).then(({ useAppStore: s }) => {
|
|
3458
|
+
const m = s();
|
|
3459
|
+
t.appName && m.setAppName(t.appName), t.indexPath && m.setIndexPath(t.indexPath), t.loginPath && m.setLoginPath(t.loginPath);
|
|
3460
|
+
}), t.locale && Promise.resolve().then(() => Jn).then(({ useLocaleStore: s }) => {
|
|
3392
3461
|
s().changeLocale(t.locale);
|
|
3393
3462
|
}), {
|
|
3394
3463
|
config: {
|
|
3395
3464
|
appName: t.appName || "XTO App",
|
|
3396
3465
|
appId: Se(),
|
|
3397
|
-
clientId:
|
|
3466
|
+
clientId: ht(),
|
|
3398
3467
|
apiBaseUrl: rt(),
|
|
3399
3468
|
basePath: t.basePath || "/",
|
|
3400
3469
|
indexPath: t.indexPath || "/dashboard",
|
|
@@ -3404,49 +3473,50 @@ async function Tl(t) {
|
|
|
3404
3473
|
};
|
|
3405
3474
|
}
|
|
3406
3475
|
export {
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
Tl as
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3476
|
+
Ul as A,
|
|
3477
|
+
yt as B,
|
|
3478
|
+
bl as C,
|
|
3479
|
+
fe as D,
|
|
3480
|
+
kl as E,
|
|
3481
|
+
_l as F,
|
|
3482
|
+
ol as G,
|
|
3483
|
+
to as H,
|
|
3484
|
+
Fe as I,
|
|
3485
|
+
wl as J,
|
|
3486
|
+
Cl as K,
|
|
3487
|
+
ft as L,
|
|
3488
|
+
al as M,
|
|
3489
|
+
ot as N,
|
|
3490
|
+
ge as O,
|
|
3491
|
+
xl as P,
|
|
3492
|
+
me as Q,
|
|
3493
|
+
sl as S,
|
|
3494
|
+
gl as T,
|
|
3495
|
+
ne as _,
|
|
3496
|
+
Dl as a,
|
|
3497
|
+
Bl as b,
|
|
3498
|
+
hl as c,
|
|
3499
|
+
yl as d,
|
|
3500
|
+
Al as e,
|
|
3501
|
+
Pl as f,
|
|
3502
|
+
Fl as g,
|
|
3503
|
+
Wn as h,
|
|
3504
|
+
An as i,
|
|
3505
|
+
ut as j,
|
|
3506
|
+
zl as k,
|
|
3507
|
+
fl as l,
|
|
3508
|
+
vl as m,
|
|
3509
|
+
Nl as n,
|
|
3510
|
+
Tl as o,
|
|
3511
|
+
$l as p,
|
|
3512
|
+
Vl as q,
|
|
3513
|
+
Il as r,
|
|
3514
|
+
Ll as s,
|
|
3515
|
+
Ml as t,
|
|
3516
|
+
Sl as u,
|
|
3517
|
+
bt as v,
|
|
3518
|
+
Qn as w,
|
|
3519
|
+
Ol as x,
|
|
3520
|
+
El as y,
|
|
3521
|
+
kt as z
|
|
3452
3522
|
};
|