xto-fronted 0.8.4 → 0.9.1

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.
@@ -1,105 +1,117 @@
1
- import { x as N, y as Ee, z as nt, A as lt, B as rt, C as it, D as Ue, o as ft, E as ct, F as gt, i as tt, m as yt, G as bt, H as st, I as kt, J as wt, K as xt } from "./user-BfEOXV7Q.js";
2
- import { ref as y, computed as k, watch as Ce, defineComponent as ie, resolveComponent as ut, openBlock as o, createBlock as D, unref as n, withCtx as M, createElementBlock as c, Fragment as W, renderList as Z, createElementVNode as e, toDisplayString as x, createCommentVNode as P, normalizeClass as Q, withDirectives as Fe, vShow as Ct, createVNode as b, createTextVNode as be, onMounted as We, onUnmounted as qe, vModelText as He, Transition as $e, withModifiers as De, normalizeStyle as Ie, reactive as Ye, createStaticVNode as Te, withKeys as $t, h as Lt } from "vue";
3
- import { defineStore as ze } from "pinia";
4
- import { useRoute as Me, useRouter as fe, createRouter as Ge, createWebHistory as Xe } from "vue-router";
5
- import { SubMenu as je, MenuItem as Ne, Menu as Je, Tabs as Mt, TabPane as St } from "@xto/navigation";
6
- import { Icon as I, Button as Le } from "@xto/base";
7
- import { Drawer as Ze, Message as Nt } from "@xto/feedback";
8
- import { Form as It, FormItem as Ae, Input as ot, Checkbox as Et } from "@xto/form";
9
- import { createLocaleProvider as Ut, getSupportedLocales as zt, useLocale as Pt } from "@xto/core/locale";
10
- function Tt(t) {
11
- const l = /^#?([0-9a-f]{6})$/i.exec(t.trim());
12
- if (!l) return null;
13
- const d = parseInt(l[1], 16);
14
- return [d >> 16 & 255, d >> 8 & 255, d & 255];
1
+ import { y as T, z as st, A as Me, B as rt, C as it, D as ct, E as ut, F as Te, p as yt, G as dt, H as bt, j as ot, n as wt, I as kt, J as at, K as xt, L as Ct, M as $t, h as Lt, N as Mt } from "./user-B0q24FmO.js";
2
+ import { ref as y, computed as k, watch as Le, defineComponent as ce, resolveComponent as mt, openBlock as o, createBlock as A, unref as l, withCtx as S, createElementBlock as c, Fragment as j, renderList as J, createElementVNode as e, toDisplayString as x, createCommentVNode as z, normalizeClass as Z, withDirectives as De, vShow as St, createVNode as w, createTextVNode as Ce, onMounted as qe, onUnmounted as He, vModelText as Ye, Transition as Se, withModifiers as Ae, normalizeStyle as Ue, reactive as Ge, createStaticVNode as Fe, withKeys as Nt, h as Et } from "vue";
3
+ import { defineStore as Pe } from "pinia";
4
+ import { useRoute as Ee, useRouter as be, createRouter as Xe, createWebHistory as Je } from "vue-router";
5
+ import { SubMenu as We, MenuItem as Ie, Menu as Ze, Tabs as It, TabPane as Ut } from "@xto/navigation";
6
+ import { Icon as U, Button as Ne } from "@xto/base";
7
+ import { Drawer as Qe, Message as Tt } from "@xto/feedback";
8
+ import { Form as Pt, FormItem as Be, Input as nt, Checkbox as zt } from "@xto/form";
9
+ import { createLocaleProvider as Ft, getSupportedLocales as Dt, useLocale as At } from "@xto/core/locale";
10
+ function Bt(t) {
11
+ const n = /^#?([0-9a-f]{6})$/i.exec(t.trim());
12
+ if (!n) return null;
13
+ const m = parseInt(n[1], 16);
14
+ return [m >> 16 & 255, m >> 8 & 255, m & 255];
15
15
  }
16
- const he = ze("app", () => {
17
- const t = y(N.get("appName") || "XTO App"), l = y(N.get("indexPath") || "/dashboard"), d = y(N.get("loginPath") || "/login"), s = y(N.get("isDark") || !1), a = y(N.get("theme") || "light"), h = y(N.get("layout") || "sidebar"), i = y(N.get("isCollapsed") || !1), v = y(N.get("showTabs") ?? !0), m = y(N.get("showFooter") ?? !0), f = y(N.get("showBreadcrumb") ?? !0), _ = y(N.get("primaryColor") || "#4F46E5"), g = y([]), u = y([]), q = k(() => s.value ? "dark" : "light"), A = (E) => {
18
- t.value = E, N.set("appName", E);
19
- }, O = (E) => {
20
- l.value = E, N.set("indexPath", E);
21
- }, B = (E) => {
22
- d.value = E, N.set("loginPath", E);
23
- }, R = () => {
24
- s.value = !s.value, a.value = s.value ? "dark" : "light", H();
25
- }, G = (E) => {
26
- a.value = E, s.value = E === "dark", H();
27
- }, H = () => {
28
- const E = document.documentElement;
29
- s.value ? E.classList.add("dark") : E.classList.remove("dark"), N.set("isDark", s.value), N.set("theme", a.value);
16
+ function $e(t) {
17
+ const n = T.get(t);
18
+ return n === null || n === "" ? void 0 : n;
19
+ }
20
+ const Vt = ["layout", "primaryColor", "theme", "isDark", "showTabs", "showBreadcrumb", "showFooter"], _e = Pe("app", () => {
21
+ const t = st(), n = t.features || {}, m = y(T.get("appName") || "XTO App"), a = y(T.get("indexPath") || "/dashboard"), s = y(T.get("loginPath") || "/login"), p = y($e("theme") ?? t.theme ?? "light"), i = y(p.value === "dark"), h = y($e("layout") ?? t.layout ?? "sidebar"), d = y(T.get("isCollapsed") || !1), f = y($e("showTabs") ?? n.showTabs ?? !0), _ = y($e("showFooter") ?? n.showFooter ?? !0), g = y($e("showBreadcrumb") ?? n.showBreadcrumb ?? !0), u = y($e("primaryColor") ?? t.primaryColor ?? "#4F46E5"), W = y(t.allowUserOverride !== !1), P = y([]), B = y([]), V = k(() => i.value ? "dark" : "light"), R = (M) => {
22
+ m.value = M, T.set("appName", M);
23
+ }, H = (M) => {
24
+ a.value = M, T.set("indexPath", M);
25
+ }, Q = (M) => {
26
+ s.value = M, T.set("loginPath", M);
27
+ }, G = () => {
28
+ const M = document.documentElement;
29
+ i.value ? M.classList.add("dark") : M.classList.remove("dark");
30
+ }, ee = () => {
31
+ i.value = !i.value, p.value = i.value ? "dark" : "light", te();
32
+ }, Y = (M) => {
33
+ p.value = M, i.value = M === "dark", te();
30
34
  }, te = () => {
31
- i.value = !i.value, N.set("isCollapsed", i.value);
32
- }, ee = (E) => {
33
- h.value = E, N.set("layout", E);
34
- }, X = () => {
35
- v.value = !v.value, N.set("showTabs", v.value);
36
- }, se = () => {
37
- m.value = !m.value, N.set("showFooter", m.value);
35
+ G(), T.set("isDark", i.value), T.set("theme", p.value);
36
+ }, D = () => {
37
+ d.value = !d.value, T.set("isCollapsed", d.value);
38
+ }, E = (M) => {
39
+ h.value = M, T.set("layout", M);
38
40
  }, F = () => {
39
- f.value = !f.value, N.set("showBreadcrumb", f.value);
40
- }, S = (E) => {
41
- _.value = E;
42
- const Y = document.documentElement;
43
- Y.style.setProperty("--xto-color-primary", E);
44
- const ae = Tt(E);
45
- if (ae) {
46
- const de = (j, re) => {
47
- const ge = re ? [255, 255, 255] : [0, 0, 0];
48
- return `#${ae.map((me, ye) => Math.round(me + (ge[ye] - me) * j)).map((me) => me.toString(16).padStart(2, "0")).join("")}`;
41
+ f.value = !f.value, T.set("showTabs", f.value);
42
+ }, X = () => {
43
+ _.value = !_.value, T.set("showFooter", _.value);
44
+ }, K = () => {
45
+ g.value = !g.value, T.set("showBreadcrumb", g.value);
46
+ }, oe = (M) => {
47
+ const q = document.documentElement;
48
+ q.style.setProperty("--xto-color-primary", M);
49
+ const pe = Bt(M);
50
+ if (pe) {
51
+ const ve = (ne, ke) => {
52
+ const ye = ke ? [255, 255, 255] : [0, 0, 0];
53
+ return `#${pe.map((I, b) => Math.round(I + (ye[b] - I) * ne)).map((I) => I.toString(16).padStart(2, "0")).join("")}`;
49
54
  };
50
- for (let j = 1; j <= 9; j++)
51
- Y.style.setProperty(`--xto-color-primary-light-${j}`, de(j * 0.1, !0));
52
- Y.style.setProperty("--xto-color-primary-dark-1", de(0.12, !1)), Y.style.setProperty("--xto-color-primary-dark-2", de(0.28, !1)), Y.style.setProperty("--xto-color-primary-dark-3", de(0.45, !1)), Y.style.setProperty("--xto-color-ring", E);
55
+ for (let ne = 1; ne <= 9; ne++)
56
+ q.style.setProperty(`--xto-color-primary-light-${ne}`, ve(ne * 0.1, !0));
57
+ q.style.setProperty("--xto-color-primary-dark-1", ve(0.12, !1)), q.style.setProperty("--xto-color-primary-dark-2", ve(0.28, !1)), q.style.setProperty("--xto-color-primary-dark-3", ve(0.45, !1)), q.style.setProperty("--xto-color-ring", M);
53
58
  }
54
- N.set("primaryColor", E);
55
- }, T = (E) => {
56
- g.value.includes(E) || g.value.push(E);
57
- }, J = (E) => {
58
- const Y = g.value.indexOf(E);
59
- Y > -1 && g.value.splice(Y, 1);
60
- }, K = () => {
61
- g.value = [];
62
- }, le = (E) => {
63
- u.value = E;
64
- }, ve = () => {
65
- H(), _.value !== "#4F46E5" && document.documentElement.style.setProperty("--xto-color-primary", _.value);
59
+ }, he = (M) => {
60
+ u.value = M, oe(M), T.set("primaryColor", M);
61
+ }, we = () => {
62
+ Vt.forEach((pe) => T.remove(pe));
63
+ const M = st(), q = M.features || {};
64
+ h.value = M.layout ?? "sidebar", u.value = M.primaryColor ?? "#4F46E5", p.value = M.theme ?? "light", i.value = p.value === "dark", f.value = q.showTabs ?? !0, _.value = q.showFooter ?? !0, g.value = q.showBreadcrumb ?? !0, G(), oe(u.value);
65
+ }, re = (M) => {
66
+ P.value.includes(M) || P.value.push(M);
67
+ }, me = (M) => {
68
+ const q = P.value.indexOf(M);
69
+ q > -1 && P.value.splice(q, 1);
70
+ }, ge = () => {
71
+ P.value = [];
72
+ }, ie = (M) => {
73
+ B.value = M;
74
+ }, ae = () => {
75
+ G(), oe(u.value);
66
76
  };
67
- return Ce(s, H), {
68
- appName: t,
69
- indexPath: l,
70
- loginPath: d,
71
- isDark: s,
72
- theme: a,
77
+ return Le(i, G), {
78
+ appName: m,
79
+ indexPath: a,
80
+ loginPath: s,
81
+ isDark: i,
82
+ theme: p,
73
83
  layout: h,
74
- isCollapsed: i,
75
- showTabs: v,
76
- showFooter: m,
77
- showBreadcrumb: f,
78
- primaryColor: _,
79
- cachedViews: g,
80
- mixSubMenus: u,
81
- themeClass: q,
82
- setAppName: A,
83
- setIndexPath: O,
84
- setLoginPath: B,
85
- toggleTheme: R,
86
- toggleCollapse: te,
87
- setTheme: G,
88
- setLayout: ee,
89
- toggleTabs: X,
90
- toggleFooter: se,
91
- toggleBreadcrumb: F,
92
- setPrimaryColor: S,
93
- addCachedView: T,
94
- removeCachedView: J,
95
- clearCachedViews: K,
96
- setMixSubMenus: le,
97
- initTheme: ve
84
+ isCollapsed: d,
85
+ showTabs: f,
86
+ showFooter: _,
87
+ showBreadcrumb: g,
88
+ primaryColor: u,
89
+ allowUserOverride: W,
90
+ cachedViews: P,
91
+ mixSubMenus: B,
92
+ themeClass: V,
93
+ setAppName: R,
94
+ setIndexPath: H,
95
+ setLoginPath: Q,
96
+ toggleTheme: ee,
97
+ toggleCollapse: D,
98
+ setTheme: Y,
99
+ setLayout: E,
100
+ toggleTabs: F,
101
+ toggleFooter: X,
102
+ toggleBreadcrumb: K,
103
+ setPrimaryColor: he,
104
+ resetToServerDefaults: we,
105
+ addCachedView: re,
106
+ removeCachedView: me,
107
+ clearCachedViews: ge,
108
+ setMixSubMenus: ie,
109
+ initTheme: ae
98
110
  };
99
- }), Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
111
+ }), Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
100
112
  __proto__: null,
101
- useAppStore: he
102
- }, Symbol.toStringTag, { value: "Module" })), Dt = "menu_list", At = "permission_list", Be = () => `${Dt}_${Ee()}`, Ve = () => `${At}_${Ee()}`, Bt = {
113
+ useAppStore: _e
114
+ }, Symbol.toStringTag, { value: "Module" })), Rt = "menu_list", Kt = "permission_list", Ve = () => `${Rt}_${Me()}`, Oe = () => `${Kt}_${Me()}`, jt = {
103
115
  menuCode: "home",
104
116
  menuName: "首页",
105
117
  menuUrl: "/dashboard",
@@ -108,57 +120,57 @@ const he = ze("app", () => {
108
120
  isDefault: !1,
109
121
  isOut: !1
110
122
  };
111
- function dt(t) {
112
- return t.filter((l) => l.type !== 1).map((l) => ({
113
- ...l,
114
- children: l.children ? dt(l.children) : void 0
123
+ function pt(t) {
124
+ return t.filter((n) => n.type !== 1).map((n) => ({
125
+ ...n,
126
+ children: n.children ? pt(n.children) : void 0
115
127
  }));
116
128
  }
117
- function Vt(t) {
118
- const l = [];
119
- function d(s) {
120
- s.forEach((a) => {
121
- a.type === 1 && a.menuCode && l.push(a.menuCode), a.children && d(a.children);
129
+ function Wt(t) {
130
+ const n = [];
131
+ function m(a) {
132
+ a.forEach((s) => {
133
+ s.type === 1 && s.menuCode && n.push(s.menuCode), s.children && m(s.children);
122
134
  });
123
135
  }
124
- return d(t), l;
136
+ return m(t), n;
125
137
  }
126
- const _e = ze("menu", () => {
127
- const t = y(N.get(Be()) || []), l = y(N.get(Ve()) || []), d = k(() => t.value.length > 0);
138
+ const fe = Pe("menu", () => {
139
+ const t = y(T.get(Ve()) || []), n = y(T.get(Oe()) || []), m = k(() => t.value.length > 0);
128
140
  return {
129
141
  menuList: t,
130
- permissions: l,
131
- hasMenu: d,
142
+ permissions: n,
143
+ hasMenu: m,
132
144
  setMenuList: (i) => {
133
- l.value = Vt(i), N.set(Ve(), l.value);
134
- const v = dt(i);
135
- t.value = [Bt, ...v], N.set(Be(), t.value);
145
+ n.value = Wt(i), T.set(Oe(), n.value);
146
+ const h = pt(i);
147
+ t.value = [jt, ...h], T.set(Ve(), t.value);
136
148
  },
137
149
  clearMenu: () => {
138
- t.value = [], l.value = [], N.remove(Be()), N.remove(Ve());
150
+ t.value = [], n.value = [], T.remove(Ve()), T.remove(Oe());
139
151
  },
140
- hasPermission: (i) => Array.isArray(i) ? i.some((v) => l.value.includes(v)) : l.value.includes(i)
152
+ hasPermission: (i) => Array.isArray(i) ? i.some((h) => n.value.includes(h)) : n.value.includes(i)
141
153
  };
142
- }), Oe = "user_info", ce = ze("user", () => {
143
- const t = y(N.get(Oe)), l = k(() => !!t.value), d = k(() => {
154
+ }), Re = "user_info", ue = Pe("user", () => {
155
+ const t = y(T.get(Re)), n = k(() => !!t.value), m = k(() => {
144
156
  var u;
145
157
  return ((u = t.value) == null ? void 0 : u.userId) || "";
146
- }), s = k(() => {
158
+ }), a = k(() => {
147
159
  var u;
148
160
  return ((u = t.value) == null ? void 0 : u.userName) || "";
149
- }), a = k(() => {
161
+ }), s = k(() => {
150
162
  var u;
151
163
  return ((u = t.value) == null ? void 0 : u.departmentName) || "";
152
- }), h = k(() => {
164
+ }), p = k(() => {
153
165
  var u;
154
166
  return ((u = t.value) == null ? void 0 : u.roleName) || "";
155
167
  }), i = k(() => {
156
168
  var u;
157
169
  return ((u = t.value) == null ? void 0 : u.email) || "";
158
- }), v = k(() => {
170
+ }), h = k(() => {
159
171
  var u;
160
172
  return ((u = t.value) == null ? void 0 : u.mobilePhone) || "";
161
- }), m = k(() => {
173
+ }), d = k(() => {
162
174
  var u;
163
175
  return ((u = t.value) == null ? void 0 : u.positionName) || "";
164
176
  }), f = k(() => {
@@ -167,66 +179,66 @@ const _e = ze("menu", () => {
167
179
  });
168
180
  return {
169
181
  userInfo: t,
170
- isLoggedIn: l,
171
- userId: d,
172
- userName: s,
173
- departmentName: a,
174
- roleName: h,
182
+ isLoggedIn: n,
183
+ userId: m,
184
+ userName: a,
185
+ departmentName: s,
186
+ roleName: p,
175
187
  email: i,
176
- mobilePhone: v,
177
- positionName: m,
188
+ mobilePhone: h,
189
+ positionName: d,
178
190
  avatar: f,
179
191
  setUserInfo: (u) => {
180
- t.value = u, N.set(Oe, u);
192
+ t.value = u, T.set(Re, u);
181
193
  },
182
194
  clearUserInfo: () => {
183
- t.value = null, N.remove(Oe);
195
+ t.value = null, T.remove(Re);
184
196
  }
185
197
  };
186
- }), Pe = ze("auth", () => {
187
- const t = y(nt()), l = k(() => lt()), d = y(""), s = y(""), a = y(""), h = y("/login");
198
+ }), ze = Pe("auth", () => {
199
+ const t = y(rt()), n = k(() => it()), m = y(""), a = y(""), s = y(""), p = y("/login");
188
200
  return {
189
201
  token: t,
190
- isLoggedIn: l,
191
- baseUrl: d,
192
- appId: s,
193
- clientId: a,
194
- loginPath: h,
202
+ isLoggedIn: n,
203
+ baseUrl: m,
204
+ appId: a,
205
+ clientId: s,
206
+ loginPath: p,
195
207
  login: (u) => {
196
- t.value = u.access_token, it(u);
208
+ t.value = u.access_token, ut(u);
197
209
  },
198
210
  logout: () => {
199
- t.value = null, rt();
211
+ t.value = null, ct();
200
212
  },
201
213
  setBaseUrl: (u) => {
202
- d.value = u;
214
+ m.value = u;
203
215
  },
204
216
  setAppId: (u) => {
205
- s.value = u;
217
+ a.value = u;
206
218
  },
207
219
  setClientId: (u) => {
208
- a.value = u;
220
+ s.value = u;
209
221
  },
210
222
  setLoginPath: (u) => {
211
- h.value = u;
223
+ p.value = u;
212
224
  }
213
225
  };
214
- }), Ot = { class: "menu-item__content" }, Rt = { class: "menu-item__icon" }, Kt = {
226
+ }), qt = { class: "menu-item__content" }, Ht = { class: "menu-item__icon" }, Yt = {
215
227
  key: 1,
216
228
  class: "menu-item__char"
217
- }, jt = { class: "menu-item__text" }, Wt = { class: "menu-item__content" }, qt = {
229
+ }, Gt = { class: "menu-item__text" }, Xt = { class: "menu-item__content" }, Jt = {
218
230
  key: 0,
219
231
  class: "menu-item__icon"
220
- }, Ht = {
232
+ }, Zt = {
221
233
  key: 1,
222
234
  class: "menu-item__char"
223
- }, Yt = { class: "menu-item__text" }, Gt = /* @__PURE__ */ ie({
235
+ }, Qt = { class: "menu-item__text" }, es = /* @__PURE__ */ ce({
224
236
  __name: "SidebarMenuItem",
225
237
  props: {
226
238
  menu: {}
227
239
  },
228
240
  setup(t) {
229
- const l = t, d = /* @__PURE__ */ new Set([
241
+ const n = t, m = /* @__PURE__ */ new Set([
230
242
  "arrow-up",
231
243
  "arrow-down",
232
244
  "arrow-left",
@@ -328,10 +340,10 @@ const _e = ze("menu", () => {
328
340
  "sun",
329
341
  "theme",
330
342
  "skin"
331
- ]), s = (m) => {
332
- if (!m || m === "") return "";
333
- if (m.startsWith("tineco-icon-")) {
334
- const _ = m.replace("tineco-icon-", "");
343
+ ]), a = (d) => {
344
+ if (!d || d === "") return "";
345
+ if (d.startsWith("tineco-icon-")) {
346
+ const _ = d.replace("tineco-icon-", "");
335
347
  return {
336
348
  home: "home",
337
349
  dashboard: "dashboard",
@@ -364,65 +376,65 @@ const _e = ze("menu", () => {
364
376
  app: "app",
365
377
  list: "list",
366
378
  grid: "grid"
367
- }[m] || m;
368
- }, a = (m) => m ? m.charAt(0) : "", h = (m) => d.has(m), i = k(() => l.menu.menuId || l.menu.menuCode || l.menu.menuUrl || ""), v = k(() => l.menu.children && l.menu.children.length > 0);
369
- return (m, f) => {
370
- const _ = ut("SidebarMenuItem", !0);
371
- return v.value ? (o(), D(n(je), {
379
+ }[d] || d;
380
+ }, s = (d) => d ? d.charAt(0) : "", p = (d) => m.has(d), i = k(() => n.menu.menuId || n.menu.menuCode || n.menu.menuUrl || ""), h = k(() => n.menu.children && n.menu.children.length > 0);
381
+ return (d, f) => {
382
+ const _ = mt("SidebarMenuItem", !0);
383
+ return h.value ? (o(), A(l(We), {
372
384
  key: 0,
373
385
  index: i.value
374
386
  }, {
375
- title: M(() => [
376
- e("span", Ot, [
377
- e("span", Rt, [
378
- h(s(t.menu.icon)) ? (o(), D(n(I), {
387
+ title: S(() => [
388
+ e("span", qt, [
389
+ e("span", Ht, [
390
+ p(a(t.menu.icon)) ? (o(), A(l(U), {
379
391
  key: 0,
380
- name: s(t.menu.icon),
392
+ name: a(t.menu.icon),
381
393
  size: 16
382
- }, null, 8, ["name"])) : (o(), c("span", Kt, x(a(t.menu.menuName)), 1))
394
+ }, null, 8, ["name"])) : (o(), c("span", Yt, x(s(t.menu.menuName)), 1))
383
395
  ]),
384
- e("span", jt, x(t.menu.menuName), 1)
396
+ e("span", Gt, x(t.menu.menuName), 1)
385
397
  ])
386
398
  ]),
387
- default: M(() => [
388
- (o(!0), c(W, null, Z(t.menu.children, (g) => (o(), D(_, {
399
+ default: S(() => [
400
+ (o(!0), c(j, null, J(t.menu.children, (g) => (o(), A(_, {
389
401
  key: g.menuId || g.menuCode || g.menuUrl,
390
402
  menu: g
391
403
  }, null, 8, ["menu"]))), 128))
392
404
  ]),
393
405
  _: 1
394
- }, 8, ["index"])) : (o(), D(n(Ne), {
406
+ }, 8, ["index"])) : (o(), A(l(Ie), {
395
407
  key: 1,
396
408
  index: t.menu.menuUrl || i.value
397
409
  }, {
398
- default: M(() => [
399
- e("span", Wt, [
400
- t.menu.menuName !== "首页" ? (o(), c("span", qt, [
401
- h(s(t.menu.icon)) ? (o(), D(n(I), {
410
+ default: S(() => [
411
+ e("span", Xt, [
412
+ t.menu.menuName !== "首页" ? (o(), c("span", Jt, [
413
+ p(a(t.menu.icon)) ? (o(), A(l(U), {
402
414
  key: 0,
403
- name: s(t.menu.icon),
415
+ name: a(t.menu.icon),
404
416
  size: 16
405
- }, null, 8, ["name"])) : (o(), c("span", Ht, x(a(t.menu.menuName)), 1))
406
- ])) : P("", !0),
407
- e("span", Yt, x(t.menu.menuName), 1)
417
+ }, null, 8, ["name"])) : (o(), c("span", Zt, x(s(t.menu.menuName)), 1))
418
+ ])) : z("", !0),
419
+ e("span", Qt, x(t.menu.menuName), 1)
408
420
  ])
409
421
  ]),
410
422
  _: 1
411
423
  }, 8, ["index"]));
412
424
  };
413
425
  }
414
- }), ue = (t, l) => {
415
- const d = t.__vccOpts || t;
416
- for (const [s, a] of l)
417
- d[s] = a;
418
- return d;
419
- }, Xt = /* @__PURE__ */ ue(Gt, [["__scopeId", "data-v-03a4d35c"]]), Jt = {
426
+ }), de = (t, n) => {
427
+ const m = t.__vccOpts || t;
428
+ for (const [a, s] of n)
429
+ m[a] = s;
430
+ return m;
431
+ }, ts = /* @__PURE__ */ de(es, [["__scopeId", "data-v-03a4d35c"]]), ss = {
420
432
  key: 0,
421
433
  class: "sidebar__logo"
422
- }, Zt = ["src"], Qt = {
434
+ }, os = ["src"], as = {
423
435
  key: 1,
424
436
  class: "sidebar__user"
425
- }, es = { class: "sidebar__user-info" }, ts = { class: "sidebar__user-name" }, ss = { class: "sidebar__user-role" }, Re = "sidebar_opened_menus", Ke = "sidebar_menu_list_key", os = /* @__PURE__ */ ie({
437
+ }, ns = { class: "sidebar__user-info" }, ls = { class: "sidebar__user-name" }, rs = { class: "sidebar__user-role" }, Ke = "sidebar_opened_menus", je = "sidebar_menu_list_key", is = /* @__PURE__ */ ce({
426
438
  __name: "Sidebar",
427
439
  props: {
428
440
  menuList: { default: () => [] },
@@ -431,149 +443,149 @@ const _e = ze("menu", () => {
431
443
  logoSrc: {}
432
444
  },
433
445
  setup(t) {
434
- const l = t, d = k(() => l.logoSrc || Ue("/vite.svg")), s = Me(), a = fe(), h = _e(), i = ce(), v = Pe(), m = he(), f = k(() => l.menuList.length > 0 ? l.menuList : h.menuList), _ = k(() => m.isCollapsed), g = k(() => s.path), u = (F) => F.menuId || F.menuCode || F.menuUrl || "", q = () => f.value.map(u).join(","), A = N.get(Ke) || "", O = q(), B = A === O ? N.get(Re) || [] : [], R = y(B);
435
- Ce(R, (F) => {
436
- N.set(Re, F), N.set(Ke, q());
446
+ const n = t, m = k(() => n.logoSrc || Te("/vite.svg")), a = Ee(), s = be(), p = fe(), i = ue(), h = ze(), d = _e(), f = k(() => n.menuList.length > 0 ? n.menuList : p.menuList), _ = k(() => d.isCollapsed), g = k(() => a.path), u = (D) => D.menuId || D.menuCode || D.menuUrl || "", W = () => f.value.map(u).join(","), P = T.get(je) || "", B = W(), V = P === B ? T.get(Ke) || [] : [], R = y(V);
447
+ Le(R, (D) => {
448
+ T.set(Ke, D), T.set(je, W());
437
449
  }, { deep: !0 });
438
- const G = (F, S, T = []) => {
439
- var J;
440
- for (const K of F) {
441
- if (K.menuUrl && (S === K.menuUrl || S.startsWith(K.menuUrl + "/")))
442
- return [...T, u(K)];
443
- if ((J = K.children) != null && J.length) {
444
- const le = G(K.children, S, [...T, u(K)]);
445
- if (le) return le;
450
+ const H = (D, E, F = []) => {
451
+ var X;
452
+ for (const K of D) {
453
+ if (K.menuUrl && (E === K.menuUrl || E.startsWith(K.menuUrl + "/")))
454
+ return [...F, u(K)];
455
+ if ((X = K.children) != null && X.length) {
456
+ const oe = H(K.children, E, [...F, u(K)]);
457
+ if (oe) return oe;
446
458
  }
447
459
  }
448
460
  return null;
449
461
  };
450
- Ce([() => s.path, f], ([F, S]) => {
451
- if (S.length > 0) {
452
- const T = G(S, F);
453
- if (T) {
454
- const J = T.slice(0, -1), K = /* @__PURE__ */ new Set([...R.value, ...J]);
462
+ Le([() => a.path, f], ([D, E]) => {
463
+ if (E.length > 0) {
464
+ const F = H(E, D);
465
+ if (F) {
466
+ const X = F.slice(0, -1), K = /* @__PURE__ */ new Set([...R.value, ...X]);
455
467
  R.value = Array.from(K);
456
468
  }
457
469
  }
458
- }, { immediate: !0 }), Ce(f, (F, S) => {
459
- F !== S && (R.value = [], N.set(Re, []), N.set(Ke, q()));
470
+ }, { immediate: !0 }), Le(f, (D, E) => {
471
+ D !== E && (R.value = [], T.set(Ke, []), T.set(je, W()));
460
472
  }, { immediate: !1 });
461
- const H = k(() => m.isDark ? "#161B21" : "#fff"), te = k(() => m.isDark ? "#D9DCE1" : "#4E5566"), ee = k(() => m.isDark ? "#818CF8" : "#4F46E5"), X = (F) => {
462
- F && F !== s.path && a.push(F);
463
- }, se = () => {
464
- v.logout(), i.clearUserInfo(), h.clearMenu(), a.push(m.loginPath);
473
+ const Q = k(() => d.isDark ? "#161B21" : "#fff"), G = k(() => d.isDark ? "#D9DCE1" : "#4E5566"), ee = k(() => d.isDark ? "#818CF8" : "#4F46E5"), Y = (D) => {
474
+ D && D !== a.path && s.push(D);
475
+ }, te = () => {
476
+ h.logout(), i.clearUserInfo(), p.clearMenu(), s.push(d.loginPath);
465
477
  };
466
- return (F, S) => (o(), c("div", {
467
- class: Q(["sidebar", { "sidebar--collapsed": _.value }])
478
+ return (D, E) => (o(), c("div", {
479
+ class: Z(["sidebar", { "sidebar--collapsed": _.value }])
468
480
  }, [
469
- l.showLogo ? (o(), c("div", Jt, [
481
+ n.showLogo ? (o(), c("div", ss, [
470
482
  e("img", {
471
- src: d.value,
483
+ src: m.value,
472
484
  alt: "Logo",
473
485
  class: "sidebar__logo-img"
474
- }, null, 8, Zt),
475
- Fe(e("span", { class: "sidebar__logo-text" }, x(n(m).appName), 513), [
476
- [Ct, !_.value]
486
+ }, null, 8, os),
487
+ De(e("span", { class: "sidebar__logo-text" }, x(l(d).appName), 513), [
488
+ [St, !_.value]
477
489
  ])
478
- ])) : P("", !0),
479
- b(n(Je), {
490
+ ])) : z("", !0),
491
+ w(l(Ze), {
480
492
  modelValue: g.value,
481
- "onUpdate:modelValue": S[0] || (S[0] = (T) => g.value = T),
493
+ "onUpdate:modelValue": E[0] || (E[0] = (F) => g.value = F),
482
494
  openeds: R.value,
483
- "onUpdate:openeds": S[1] || (S[1] = (T) => R.value = T),
495
+ "onUpdate:openeds": E[1] || (E[1] = (F) => R.value = F),
484
496
  mode: "vertical",
485
497
  collapse: _.value,
486
498
  "collapse-transition": !1,
487
- "background-color": H.value,
488
- "text-color": te.value,
499
+ "background-color": Q.value,
500
+ "text-color": G.value,
489
501
  "active-text-color": ee.value,
490
502
  class: "sidebar__menu",
491
- onSelect: X
503
+ onSelect: Y
492
504
  }, {
493
- default: M(() => [
494
- (o(!0), c(W, null, Z(f.value, (T) => (o(), D(Xt, {
495
- key: u(T),
496
- menu: T
505
+ default: S(() => [
506
+ (o(!0), c(j, null, J(f.value, (F) => (o(), A(ts, {
507
+ key: u(F),
508
+ menu: F
497
509
  }, null, 8, ["menu"]))), 128))
498
510
  ]),
499
511
  _: 1
500
512
  }, 8, ["modelValue", "openeds", "collapse", "background-color", "text-color", "active-text-color"]),
501
- l.showUser && !_.value ? (o(), c("div", Qt, [
502
- e("div", es, [
503
- e("span", ts, x(n(i).userName), 1),
504
- e("span", ss, x(n(i).departmentName), 1)
513
+ n.showUser && !_.value ? (o(), c("div", as, [
514
+ e("div", ns, [
515
+ e("span", ls, x(l(i).userName), 1),
516
+ e("span", rs, x(l(i).departmentName), 1)
505
517
  ]),
506
- b(n(Le), {
518
+ w(l(Ne), {
507
519
  type: "text",
508
520
  size: "small",
509
- onClick: se
521
+ onClick: te
510
522
  }, {
511
- default: M(() => [...S[2] || (S[2] = [
512
- be("退出", -1)
523
+ default: S(() => [...E[2] || (E[2] = [
524
+ Ce("退出", -1)
513
525
  ])]),
514
526
  _: 1
515
527
  })
516
- ])) : P("", !0)
528
+ ])) : z("", !0)
517
529
  ], 2));
518
530
  }
519
- }), at = /* @__PURE__ */ ue(os, [["__scopeId", "data-v-3145ea3a"]]), as = { class: "header" }, ns = { class: "header__left" }, ls = {
531
+ }), lt = /* @__PURE__ */ de(is, [["__scopeId", "data-v-3145ea3a"]]), cs = { class: "header" }, us = { class: "header__left" }, ds = {
520
532
  key: 0,
521
533
  class: "header__breadcrumb"
522
- }, rs = {
534
+ }, ms = {
523
535
  key: 0,
524
536
  class: "breadcrumb-separator"
525
- }, is = { class: "header__right" }, cs = {
537
+ }, ps = { class: "header__right" }, vs = {
526
538
  key: 0,
527
539
  class: "header__search-dropdown"
528
- }, us = {
540
+ }, hs = {
529
541
  key: 0,
530
542
  class: "header__search-results"
531
- }, ds = ["onClick"], ms = {
543
+ }, _s = ["onClick"], fs = {
532
544
  key: 0,
533
545
  class: "header__search-icon"
534
- }, ps = {
546
+ }, gs = {
535
547
  key: 1,
536
548
  class: "header__search-char"
537
- }, vs = { class: "header__search-item-title" }, hs = {
549
+ }, ys = { class: "header__search-item-title" }, bs = {
538
550
  key: 1,
539
551
  class: "header__search-item-parent"
540
- }, _s = {
552
+ }, ws = {
541
553
  key: 1,
542
554
  class: "header__search-empty"
543
- }, fs = ["title"], gs = { class: "header__avatar" }, ys = { class: "header__user-name" }, bs = {
555
+ }, ks = ["title"], xs = { class: "header__avatar" }, Cs = { class: "header__user-name" }, $s = {
544
556
  key: 0,
545
557
  class: "header__dropdown"
546
- }, ks = { class: "header__dropdown-header" }, ws = { class: "header__dropdown-avatar" }, xs = { class: "header__dropdown-info" }, Cs = { class: "header__dropdown-name" }, $s = { class: "header__dropdown-role" }, Ls = { class: "header__dropdown-menu" }, Ms = { class: "settings-drawer" }, Ss = { class: "settings-section" }, Ns = { class: "settings-layout-options" }, Is = ["onClick"], Es = { class: "layout-option__preview" }, Us = {
558
+ }, Ls = { class: "header__dropdown-header" }, Ms = { class: "header__dropdown-avatar" }, Ss = { class: "header__dropdown-info" }, Ns = { class: "header__dropdown-name" }, Es = { class: "header__dropdown-role" }, Is = { class: "header__dropdown-menu" }, Us = { class: "settings-drawer" }, Ts = { class: "settings-section" }, Ps = { class: "settings-layout-options" }, zs = ["onClick"], Fs = { class: "layout-option__preview" }, Ds = {
547
559
  key: 0,
548
560
  class: "layout-preview-sidebar"
549
- }, zs = {
561
+ }, As = {
550
562
  key: 1,
551
563
  class: "layout-preview-top"
552
- }, Ps = {
564
+ }, Bs = {
553
565
  key: 2,
554
566
  class: "layout-preview-mix"
555
- }, Ts = { class: "layout-option__label" }, Fs = { class: "settings-section" }, Ds = { class: "settings-color-options" }, As = ["title", "onClick"], Bs = { class: "settings-section" }, Vs = { class: "settings-switch-list" }, Os = { class: "settings-switch-item" }, Rs = { class: "settings-switch-item" }, Ks = /* @__PURE__ */ ie({
567
+ }, Vs = { class: "layout-option__label" }, Os = { class: "settings-section" }, Rs = { class: "settings-color-options" }, Ks = ["title", "onClick"], js = { class: "settings-section" }, Ws = { class: "settings-switch-list" }, qs = { class: "settings-switch-item" }, Hs = { class: "settings-switch-item" }, Ys = { class: "settings-section" }, Gs = /* @__PURE__ */ ce({
556
568
  __name: "Header",
557
569
  setup(t) {
558
- const l = Me(), d = fe(), s = he(), a = ce(), h = Pe(), i = _e(), v = y(!1), m = y(!1), f = y(null), _ = y(!1), g = y(!1), u = y(""), q = y(null), A = y(!1), O = [
570
+ const n = Ee(), m = be(), a = _e(), s = ue(), p = ze(), i = fe(), h = y(!1), d = y(!1), f = y(null), _ = y(!1), g = y(!1), u = y(""), W = y(null), P = y(!1), B = [
559
571
  { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
560
572
  { value: "top", label: "顶部菜单", icon: "menu" },
561
573
  { value: "mix", label: "混合菜单", icon: "grid" }
562
- ], B = [
574
+ ], V = [
563
575
  { value: "#4F46E5", label: "品牌蓝" },
564
576
  { value: "#0F6FDE", label: "企业蓝" },
565
577
  { value: "#00A870", label: "翡翠绿" },
566
578
  { value: "#D46B08", label: "琥珀橙" },
567
579
  { value: "#1F2329", label: "石墨黑" }
568
- ], R = k(() => l.matched.filter((w) => w.meta && w.meta.title).map((w) => ({
569
- title: w.meta.title,
570
- path: w.path
571
- }))), G = (z, w = "") => {
572
- const oe = [];
573
- return z.forEach(($) => {
574
- $.children && $.children.length > 0 ? oe.push(...G($.children, $.menuName)) : oe.push({ ...$, parentTitle: w, title: $.menuName, path: $.menuUrl });
575
- }), oe;
576
- }, H = /* @__PURE__ */ new Set([
580
+ ], R = k(() => n.matched.filter((b) => b.meta && b.meta.title).map((b) => ({
581
+ title: b.meta.title,
582
+ path: b.path
583
+ }))), H = (I, b = "") => {
584
+ const se = [];
585
+ return I.forEach(($) => {
586
+ $.children && $.children.length > 0 ? se.push(...H($.children, $.menuName)) : se.push({ ...$, parentTitle: b, title: $.menuName, path: $.menuUrl });
587
+ }), se;
588
+ }, Q = /* @__PURE__ */ new Set([
577
589
  "arrow-up",
578
590
  "arrow-down",
579
591
  "arrow-left",
@@ -675,10 +687,10 @@ const _e = ze("menu", () => {
675
687
  "sun",
676
688
  "theme",
677
689
  "skin"
678
- ]), te = (z) => {
679
- if (!z || z === "") return "";
680
- if (z.startsWith("tineco-icon-")) {
681
- const oe = z.replace("tineco-icon-", "");
690
+ ]), G = (I) => {
691
+ if (!I || I === "") return "";
692
+ if (I.startsWith("tineco-icon-")) {
693
+ const se = I.replace("tineco-icon-", "");
682
694
  return {
683
695
  home: "home",
684
696
  dashboard: "dashboard",
@@ -692,7 +704,7 @@ const _e = ze("menu", () => {
692
704
  chart: "chart",
693
705
  report: "report",
694
706
  analytics: "analytics"
695
- }[oe] || oe;
707
+ }[se] || se;
696
708
  }
697
709
  return {
698
710
  dashboard: "dashboard",
@@ -711,150 +723,153 @@ const _e = ze("menu", () => {
711
723
  app: "app",
712
724
  list: "list",
713
725
  grid: "grid"
714
- }[z] || z;
715
- }, ee = (z) => z ? z.charAt(0) : "", X = (z) => H.has(z), se = k(() => u.value.trim() ? G(i.menuList).filter(
716
- (w) => w.title.toLowerCase().includes(u.value.toLowerCase())
717
- ) : []), F = k(() => s.layout), S = () => {
718
- s.toggleCollapse();
719
- }, T = () => {
720
- s.toggleTheme();
721
- }, J = () => {
722
- m.value = !0;
723
- }, K = (z) => {
724
- s.setLayout(z), m.value = !1;
725
- }, le = (z) => {
726
- A.value = z;
727
- const w = document.documentElement;
728
- z ? w.classList.add("grey-mode") : w.classList.remove("grey-mode");
729
- }, ve = () => {
730
- le(!A.value), m.value = !1;
731
- }, E = () => {
732
- s.toggleTheme(), m.value = !1;
733
- }, Y = () => {
726
+ }[I] || I;
727
+ }, ee = (I) => I ? I.charAt(0) : "", Y = (I) => Q.has(I), te = k(() => u.value.trim() ? H(i.menuList).filter(
728
+ (b) => b.title.toLowerCase().includes(u.value.toLowerCase())
729
+ ) : []), D = k(() => a.layout), E = () => {
730
+ a.toggleCollapse();
731
+ }, F = () => {
732
+ a.toggleTheme();
733
+ }, X = () => {
734
+ d.value = !0;
735
+ }, K = (I) => {
736
+ a.setLayout(I), d.value = !1;
737
+ }, oe = (I) => {
738
+ P.value = I;
739
+ const b = document.documentElement;
740
+ I ? b.classList.add("grey-mode") : b.classList.remove("grey-mode");
741
+ }, he = () => {
742
+ oe(!P.value), d.value = !1;
743
+ }, we = () => {
744
+ a.toggleTheme(), d.value = !1;
745
+ }, re = () => {
746
+ a.resetToServerDefaults(), d.value = !1;
747
+ }, me = () => {
734
748
  document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
735
- }, ae = () => {
749
+ }, ge = () => {
736
750
  _.value = !!document.fullscreenElement;
737
- }, de = () => {
738
- v.value = !v.value;
739
- }, j = () => {
740
- v.value = !1;
741
- }, re = () => {
751
+ }, ie = () => {
752
+ h.value = !h.value;
753
+ }, ae = () => {
754
+ h.value = !1;
755
+ }, M = () => {
742
756
  g.value = !1, u.value = "";
743
- }, ge = (z) => {
744
- d.push(z), re();
745
- }, ke = (z) => {
746
- s.setPrimaryColor(z), m.value = !1;
747
- }, me = () => {
748
- j(), d.push("/profile");
749
- }, ye = () => {
750
- j(), d.push("/change-password");
751
- }, Se = () => {
752
- j(), h.logout(), a.clearUserInfo(), i.clearMenu(), d.push(s.loginPath);
753
- }, we = (z) => {
754
- f.value && !f.value.contains(z.target) && j(), q.value && !q.value.contains(z.target) && re();
755
- }, xe = (z) => {
756
- z.key === "Escape" && (re(), j());
757
+ }, q = (I) => {
758
+ m.push(I), M();
759
+ }, pe = (I) => {
760
+ a.setPrimaryColor(I), d.value = !1;
761
+ }, ve = () => {
762
+ ae(), m.push("/profile");
763
+ }, ne = () => {
764
+ ae(), m.push("/change-password");
765
+ }, ke = () => {
766
+ ae(), p.logout(), s.clearUserInfo(), i.clearMenu(), m.push(a.loginPath);
767
+ }, ye = (I) => {
768
+ f.value && !f.value.contains(I.target) && ae(), W.value && !W.value.contains(I.target) && M();
769
+ }, xe = (I) => {
770
+ I.key === "Escape" && (M(), ae());
757
771
  };
758
- return We(() => {
759
- document.addEventListener("click", we), document.addEventListener("fullscreenchange", ae), document.addEventListener("keydown", xe), s.initTheme(), A.value = document.documentElement.classList.contains("grey-mode");
760
- }), qe(() => {
761
- document.removeEventListener("click", we), document.removeEventListener("fullscreenchange", ae), document.removeEventListener("keydown", xe);
762
- }), (z, w) => {
763
- var oe;
764
- return o(), c("div", as, [
765
- e("div", ns, [
772
+ return qe(() => {
773
+ document.addEventListener("click", ye), document.addEventListener("fullscreenchange", ge), document.addEventListener("keydown", xe), a.initTheme(), P.value = document.documentElement.classList.contains("grey-mode");
774
+ }), He(() => {
775
+ document.removeEventListener("click", ye), document.removeEventListener("fullscreenchange", ge), document.removeEventListener("keydown", xe);
776
+ }), (I, b) => {
777
+ var se;
778
+ return o(), c("div", cs, [
779
+ e("div", us, [
766
780
  e("div", {
767
781
  class: "header__collapse",
768
- onClick: S
782
+ onClick: E
769
783
  }, [
770
- b(n(I), {
771
- name: n(s).isCollapsed ? "menu-unfold" : "menu-fold",
784
+ w(l(U), {
785
+ name: l(a).isCollapsed ? "menu-unfold" : "menu-fold",
772
786
  size: 18
773
787
  }, null, 8, ["name"])
774
788
  ]),
775
- n(s).showBreadcrumb ? (o(), c("div", ls, [
776
- (o(!0), c(W, null, Z(R.value, ($, pe) => (o(), c("span", {
789
+ l(a).showBreadcrumb ? (o(), c("div", ds, [
790
+ (o(!0), c(j, null, J(R.value, ($, N) => (o(), c("span", {
777
791
  key: $.path
778
792
  }, [
779
- pe > 0 ? (o(), c("span", rs, "/")) : P("", !0),
793
+ N > 0 ? (o(), c("span", ms, "/")) : z("", !0),
780
794
  e("span", {
781
- class: Q({ "is-current": pe === R.value.length - 1 })
795
+ class: Z({ "is-current": N === R.value.length - 1 })
782
796
  }, x($.title), 3)
783
797
  ]))), 128))
784
- ])) : P("", !0)
798
+ ])) : z("", !0)
785
799
  ]),
786
- e("div", is, [
800
+ e("div", ps, [
787
801
  e("div", {
788
802
  class: "header__search",
789
803
  ref_key: "searchRef",
790
- ref: q
804
+ ref: W
791
805
  }, [
792
- b(n(I), {
806
+ w(l(U), {
793
807
  name: "search",
794
808
  size: 14,
795
809
  class: "header__search-icon"
796
810
  }),
797
- Fe(e("input", {
798
- "onUpdate:modelValue": w[0] || (w[0] = ($) => u.value = $),
811
+ De(e("input", {
812
+ "onUpdate:modelValue": b[0] || (b[0] = ($) => u.value = $),
799
813
  type: "text",
800
814
  class: "header__search-input",
801
815
  placeholder: "搜索菜单...",
802
- onFocus: w[1] || (w[1] = ($) => g.value = !0)
816
+ onFocus: b[1] || (b[1] = ($) => g.value = !0)
803
817
  }, null, 544), [
804
- [He, u.value]
818
+ [Ye, u.value]
805
819
  ]),
806
- b($e, { name: "search-dropdown" }, {
807
- default: M(() => [
808
- g.value && (se.value.length > 0 || u.value) ? (o(), c("div", cs, [
809
- se.value.length > 0 ? (o(), c("div", us, [
810
- (o(!0), c(W, null, Z(se.value, ($) => (o(), c("div", {
820
+ w(Se, { name: "search-dropdown" }, {
821
+ default: S(() => [
822
+ g.value && (te.value.length > 0 || u.value) ? (o(), c("div", vs, [
823
+ te.value.length > 0 ? (o(), c("div", hs, [
824
+ (o(!0), c(j, null, J(te.value, ($) => (o(), c("div", {
811
825
  key: $.path,
812
826
  class: "header__search-item",
813
- onClick: (pe) => ge($.path)
827
+ onClick: (N) => q($.path)
814
828
  }, [
815
- $.title !== "首页" ? (o(), c("span", ms, [
816
- X(te($.icon)) ? (o(), D(n(I), {
829
+ $.title !== "首页" ? (o(), c("span", fs, [
830
+ Y(G($.icon)) ? (o(), A(l(U), {
817
831
  key: 0,
818
- name: te($.icon),
832
+ name: G($.icon),
819
833
  size: 16
820
- }, null, 8, ["name"])) : (o(), c("span", ps, x(ee($.title)), 1))
821
- ])) : P("", !0),
822
- e("span", vs, x($.title), 1),
823
- $.parentTitle ? (o(), c("span", hs, x($.parentTitle), 1)) : P("", !0)
824
- ], 8, ds))), 128))
825
- ])) : (o(), c("div", _s, " 未找到匹配的菜单 "))
826
- ])) : P("", !0)
834
+ }, null, 8, ["name"])) : (o(), c("span", gs, x(ee($.title)), 1))
835
+ ])) : z("", !0),
836
+ e("span", ys, x($.title), 1),
837
+ $.parentTitle ? (o(), c("span", bs, x($.parentTitle), 1)) : z("", !0)
838
+ ], 8, _s))), 128))
839
+ ])) : (o(), c("div", ws, " 未找到匹配的菜单 "))
840
+ ])) : z("", !0)
827
841
  ]),
828
842
  _: 1
829
843
  })
830
844
  ], 512),
831
845
  e("div", {
832
846
  class: "header__action",
833
- onClick: Y,
847
+ onClick: me,
834
848
  title: _.value ? "退出全屏" : "全屏"
835
849
  }, [
836
- b(n(I), {
850
+ w(l(U), {
837
851
  name: _.value ? "fullscreen-exit" : "fullscreen",
838
852
  size: 16
839
853
  }, null, 8, ["name"])
840
- ], 8, fs),
841
- e("div", {
854
+ ], 8, ks),
855
+ l(a).allowUserOverride ? (o(), c("div", {
856
+ key: 0,
842
857
  class: "header__action",
843
- onClick: J,
858
+ onClick: X,
844
859
  title: "换肤设置"
845
860
  }, [
846
- b(n(I), {
861
+ w(l(U), {
847
862
  name: "skin",
848
863
  size: 16
849
864
  })
850
- ]),
865
+ ])) : z("", !0),
851
866
  e("div", {
852
867
  class: "header__action",
853
- onClick: T,
868
+ onClick: F,
854
869
  title: "切换主题"
855
870
  }, [
856
- b(n(I), {
857
- name: n(s).isDark ? "sun" : "moon",
871
+ w(l(U), {
872
+ name: l(a).isDark ? "sun" : "moon",
858
873
  size: 16
859
874
  }, null, 8, ["name"])
860
875
  ]),
@@ -865,15 +880,15 @@ const _e = ze("menu", () => {
865
880
  }, [
866
881
  e("div", {
867
882
  class: "header__user-trigger",
868
- onClick: De(de, ["stop"])
883
+ onClick: Ae(ie, ["stop"])
869
884
  }, [
870
- e("div", gs, [
871
- e("span", null, x(((oe = n(a).userName) == null ? void 0 : oe.charAt(0)) || "U"), 1)
885
+ e("div", xs, [
886
+ e("span", null, x(((se = l(s).userName) == null ? void 0 : se.charAt(0)) || "U"), 1)
872
887
  ]),
873
- e("span", ys, x(n(a).userName), 1),
888
+ e("span", Cs, x(l(s).userName), 1),
874
889
  e("span", {
875
- class: Q(["header__user-arrow", { "is-active": v.value }])
876
- }, [...w[3] || (w[3] = [
890
+ class: Z(["header__user-arrow", { "is-active": h.value }])
891
+ }, [...b[3] || (b[3] = [
877
892
  e("svg", {
878
893
  viewBox: "0 0 12 12",
879
894
  width: "10",
@@ -888,89 +903,89 @@ const _e = ze("menu", () => {
888
903
  ], -1)
889
904
  ])], 2)
890
905
  ]),
891
- b($e, { name: "dropdown" }, {
892
- default: M(() => {
906
+ w(Se, { name: "dropdown" }, {
907
+ default: S(() => {
893
908
  var $;
894
909
  return [
895
- v.value ? (o(), c("div", bs, [
896
- e("div", ks, [
897
- e("div", ws, [
898
- e("span", null, x((($ = n(a).userName) == null ? void 0 : $.charAt(0)) || "U"), 1)
910
+ h.value ? (o(), c("div", $s, [
911
+ e("div", Ls, [
912
+ e("div", Ms, [
913
+ e("span", null, x((($ = l(s).userName) == null ? void 0 : $.charAt(0)) || "U"), 1)
899
914
  ]),
900
- e("div", xs, [
901
- e("div", Cs, x(n(a).userName), 1),
902
- e("div", $s, x(n(a).roleName || n(a).departmentName), 1)
915
+ e("div", Ss, [
916
+ e("div", Ns, x(l(s).userName), 1),
917
+ e("div", Es, x(l(s).roleName || l(s).departmentName), 1)
903
918
  ])
904
919
  ]),
905
- w[8] || (w[8] = e("div", { class: "header__dropdown-divider" }, null, -1)),
906
- e("div", Ls, [
920
+ b[8] || (b[8] = e("div", { class: "header__dropdown-divider" }, null, -1)),
921
+ e("div", Is, [
907
922
  e("div", {
908
923
  class: "header__dropdown-item",
909
- onClick: me
924
+ onClick: ve
910
925
  }, [
911
- b(n(I), {
926
+ w(l(U), {
912
927
  name: "user",
913
928
  size: 16
914
929
  }),
915
- w[4] || (w[4] = e("span", null, "个人信息", -1))
930
+ b[4] || (b[4] = e("span", null, "个人信息", -1))
916
931
  ]),
917
932
  e("div", {
918
933
  class: "header__dropdown-item",
919
- onClick: ye
934
+ onClick: ne
920
935
  }, [
921
- b(n(I), {
936
+ w(l(U), {
922
937
  name: "lock",
923
938
  size: 16
924
939
  }),
925
- w[5] || (w[5] = e("span", null, "修改密码", -1))
940
+ b[5] || (b[5] = e("span", null, "修改密码", -1))
926
941
  ]),
927
- w[7] || (w[7] = e("div", { class: "header__dropdown-divider" }, null, -1)),
942
+ b[7] || (b[7] = e("div", { class: "header__dropdown-divider" }, null, -1)),
928
943
  e("div", {
929
944
  class: "header__dropdown-item header__dropdown-item--danger",
930
- onClick: Se
945
+ onClick: ke
931
946
  }, [
932
- b(n(I), {
947
+ w(l(U), {
933
948
  name: "logout",
934
949
  size: 16
935
950
  }),
936
- w[6] || (w[6] = e("span", null, "退出登录", -1))
951
+ b[6] || (b[6] = e("span", null, "退出登录", -1))
937
952
  ])
938
953
  ])
939
- ])) : P("", !0)
954
+ ])) : z("", !0)
940
955
  ];
941
956
  }),
942
957
  _: 1
943
958
  })
944
959
  ], 512)
945
960
  ]),
946
- b(n(Ze), {
947
- modelValue: m.value,
948
- "onUpdate:modelValue": w[2] || (w[2] = ($) => m.value = $),
961
+ w(l(Qe), {
962
+ modelValue: d.value,
963
+ "onUpdate:modelValue": b[2] || (b[2] = ($) => d.value = $),
949
964
  title: "换肤设置",
950
965
  direction: "rtl",
951
966
  size: "320px"
952
967
  }, {
953
- default: M(() => [
954
- e("div", Ms, [
955
- e("div", Ss, [
956
- w[12] || (w[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
957
- e("div", Ns, [
958
- (o(), c(W, null, Z(O, ($) => e("div", {
968
+ default: S(() => [
969
+ e("div", Us, [
970
+ e("div", Ts, [
971
+ b[12] || (b[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
972
+ e("div", Ps, [
973
+ (o(), c(j, null, J(B, ($) => e("div", {
959
974
  key: $.value,
960
- class: Q(["layout-option", { "is-active": F.value === $.value }]),
961
- onClick: (pe) => K($.value)
975
+ class: Z(["layout-option", { "is-active": D.value === $.value }]),
976
+ onClick: (N) => K($.value)
962
977
  }, [
963
- e("div", Es, [
964
- $.value === "sidebar" ? (o(), c("div", Us, [...w[9] || (w[9] = [
978
+ e("div", Fs, [
979
+ $.value === "sidebar" ? (o(), c("div", Ds, [...b[9] || (b[9] = [
965
980
  e("div", { class: "preview-aside" }, null, -1),
966
981
  e("div", { class: "preview-main" }, [
967
982
  e("div", { class: "preview-header" }),
968
983
  e("div", { class: "preview-content" })
969
984
  ], -1)
970
- ])])) : $.value === "top" ? (o(), c("div", zs, [...w[10] || (w[10] = [
985
+ ])])) : $.value === "top" ? (o(), c("div", As, [...b[10] || (b[10] = [
971
986
  e("div", { class: "preview-header-full" }, null, -1),
972
987
  e("div", { class: "preview-content-full" }, null, -1)
973
- ])])) : (o(), c("div", Ps, [...w[11] || (w[11] = [
988
+ ])])) : (o(), c("div", Bs, [...b[11] || (b[11] = [
974
989
  e("div", { class: "preview-header-mix" }, [
975
990
  e("div", { class: "preview-mix-left" })
976
991
  ], -1),
@@ -980,51 +995,63 @@ const _e = ze("menu", () => {
980
995
  ], -1)
981
996
  ])]))
982
997
  ]),
983
- e("span", Ts, x($.label), 1)
984
- ], 10, Is)), 64))
998
+ e("span", Vs, x($.label), 1)
999
+ ], 10, zs)), 64))
985
1000
  ])
986
1001
  ]),
987
- e("div", Fs, [
988
- w[13] || (w[13] = e("div", { class: "settings-title" }, "主题色", -1)),
989
- e("div", Ds, [
990
- (o(), c(W, null, Z(B, ($) => e("div", {
1002
+ e("div", Os, [
1003
+ b[13] || (b[13] = e("div", { class: "settings-title" }, "主题色", -1)),
1004
+ e("div", Rs, [
1005
+ (o(), c(j, null, J(V, ($) => e("div", {
991
1006
  key: $.value,
992
- class: Q(["color-option", { "is-active": n(s).primaryColor === $.value }]),
993
- style: Ie({ backgroundColor: $.value }),
1007
+ class: Z(["color-option", { "is-active": l(a).primaryColor === $.value }]),
1008
+ style: Ue({ backgroundColor: $.value }),
994
1009
  title: $.label,
995
- onClick: (pe) => ke($.value)
1010
+ onClick: (N) => pe($.value)
996
1011
  }, [
997
- n(s).primaryColor === $.value ? (o(), D(n(I), {
1012
+ l(a).primaryColor === $.value ? (o(), A(l(U), {
998
1013
  key: 0,
999
1014
  name: "check",
1000
1015
  size: 12,
1001
1016
  color: "#fff"
1002
- })) : P("", !0)
1003
- ], 14, As)), 64))
1017
+ })) : z("", !0)
1018
+ ], 14, Ks)), 64))
1004
1019
  ])
1005
1020
  ]),
1006
- e("div", Bs, [
1007
- w[18] || (w[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
1008
- e("div", Vs, [
1009
- e("div", Os, [
1010
- w[15] || (w[15] = e("span", null, "灰色模式", -1)),
1021
+ e("div", js, [
1022
+ b[18] || (b[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
1023
+ e("div", Ws, [
1024
+ e("div", qs, [
1025
+ b[15] || (b[15] = e("span", null, "灰色模式", -1)),
1011
1026
  e("div", {
1012
- class: Q(["switch-wrapper", { "is-checked": A.value }]),
1013
- onClick: ve
1014
- }, [...w[14] || (w[14] = [
1027
+ class: Z(["switch-wrapper", { "is-checked": P.value }]),
1028
+ onClick: he
1029
+ }, [...b[14] || (b[14] = [
1015
1030
  e("span", { class: "switch-core" }, null, -1)
1016
1031
  ])], 2)
1017
1032
  ]),
1018
- e("div", Rs, [
1019
- w[17] || (w[17] = e("span", null, "暗黑模式", -1)),
1033
+ e("div", Hs, [
1034
+ b[17] || (b[17] = e("span", null, "暗黑模式", -1)),
1020
1035
  e("div", {
1021
- class: Q(["switch-wrapper", { "is-checked": n(s).isDark }]),
1022
- onClick: E
1023
- }, [...w[16] || (w[16] = [
1036
+ class: Z(["switch-wrapper", { "is-checked": l(a).isDark }]),
1037
+ onClick: we
1038
+ }, [...b[16] || (b[16] = [
1024
1039
  e("span", { class: "switch-core" }, null, -1)
1025
1040
  ])], 2)
1026
1041
  ])
1027
1042
  ])
1043
+ ]),
1044
+ e("div", Ys, [
1045
+ e("div", {
1046
+ class: "settings-reset",
1047
+ onClick: re
1048
+ }, [
1049
+ w(l(U), {
1050
+ name: "refresh",
1051
+ size: 14
1052
+ }),
1053
+ b[19] || (b[19] = e("span", null, "恢复默认", -1))
1054
+ ])
1028
1055
  ])
1029
1056
  ])
1030
1057
  ]),
@@ -1033,73 +1060,73 @@ const _e = ze("menu", () => {
1033
1060
  ]);
1034
1061
  };
1035
1062
  }
1036
- }), js = /* @__PURE__ */ ue(Ks, [["__scopeId", "data-v-11f8bfa7"]]), Ws = { class: "top-menu" }, qs = { class: "top-menu__logo" }, Hs = ["src"], Ys = { class: "top-menu__logo-text" }, Gs = { class: "top-menu__menu-content" }, Xs = {
1063
+ }), Xs = /* @__PURE__ */ de(Gs, [["__scopeId", "data-v-21769fe5"]]), Js = { class: "top-menu" }, Zs = { class: "top-menu__logo" }, Qs = ["src"], eo = { class: "top-menu__logo-text" }, to = { class: "top-menu__menu-content" }, so = {
1037
1064
  key: 0,
1038
1065
  class: "top-menu__menu-icon"
1039
- }, Js = {
1066
+ }, oo = {
1040
1067
  key: 1,
1041
1068
  class: "top-menu__menu-char"
1042
- }, Zs = { class: "top-menu__menu-text" }, Qs = { class: "top-menu__menu-content" }, eo = { class: "top-menu__menu-icon" }, to = {
1069
+ }, ao = { class: "top-menu__menu-text" }, no = { class: "top-menu__menu-content" }, lo = { class: "top-menu__menu-icon" }, ro = {
1043
1070
  key: 1,
1044
1071
  class: "top-menu__menu-char"
1045
- }, so = { class: "top-menu__menu-text" }, oo = { class: "top-menu__menu-content" }, ao = { class: "top-menu__menu-icon" }, no = {
1072
+ }, io = { class: "top-menu__menu-text" }, co = { class: "top-menu__menu-content" }, uo = { class: "top-menu__menu-icon" }, mo = {
1046
1073
  key: 1,
1047
1074
  class: "top-menu__menu-char"
1048
- }, lo = { class: "top-menu__menu-text" }, ro = { class: "top-menu__menu-content" }, io = { class: "top-menu__menu-icon" }, co = {
1075
+ }, po = { class: "top-menu__menu-text" }, vo = { class: "top-menu__menu-content" }, ho = { class: "top-menu__menu-icon" }, _o = {
1049
1076
  key: 1,
1050
1077
  class: "top-menu__menu-char"
1051
- }, uo = { class: "top-menu__menu-text" }, mo = { class: "top-menu__menu-content" }, po = {
1078
+ }, fo = { class: "top-menu__menu-text" }, go = { class: "top-menu__menu-content" }, yo = {
1052
1079
  key: 0,
1053
1080
  class: "top-menu__menu-icon"
1054
- }, vo = {
1081
+ }, bo = {
1055
1082
  key: 1,
1056
1083
  class: "top-menu__menu-char"
1057
- }, ho = { class: "top-menu__menu-text" }, _o = { class: "top-menu__actions" }, fo = {
1084
+ }, wo = { class: "top-menu__menu-text" }, ko = { class: "top-menu__actions" }, xo = {
1058
1085
  key: 0,
1059
1086
  class: "top-menu__search-dropdown"
1060
- }, go = {
1087
+ }, Co = {
1061
1088
  key: 0,
1062
1089
  class: "top-menu__search-results"
1063
- }, yo = ["onClick"], bo = {
1090
+ }, $o = ["onClick"], Lo = {
1064
1091
  key: 0,
1065
1092
  class: "top-menu__search-icon-item"
1066
- }, ko = {
1093
+ }, Mo = {
1067
1094
  key: 1,
1068
1095
  class: "top-menu__search-char"
1069
- }, wo = { class: "top-menu__search-item-title" }, xo = {
1096
+ }, So = { class: "top-menu__search-item-title" }, No = {
1070
1097
  key: 1,
1071
1098
  class: "top-menu__search-item-parent"
1072
- }, Co = {
1099
+ }, Eo = {
1073
1100
  key: 1,
1074
1101
  class: "top-menu__search-empty"
1075
- }, $o = ["title"], Lo = { class: "top-menu__avatar" }, Mo = { class: "top-menu__user-name" }, So = {
1102
+ }, Io = ["title"], Uo = { class: "top-menu__avatar" }, To = { class: "top-menu__user-name" }, Po = {
1076
1103
  key: 0,
1077
1104
  class: "top-menu__dropdown"
1078
- }, No = { class: "top-menu__dropdown-header" }, Io = { class: "top-menu__dropdown-avatar" }, Eo = { class: "top-menu__dropdown-info" }, Uo = { class: "top-menu__dropdown-name" }, zo = { class: "top-menu__dropdown-role" }, Po = { class: "top-menu__dropdown-menu" }, To = { class: "settings-drawer" }, Fo = { class: "settings-section" }, Do = { class: "settings-layout-options" }, Ao = ["onClick"], Bo = { class: "layout-option__preview" }, Vo = {
1105
+ }, zo = { class: "top-menu__dropdown-header" }, Fo = { class: "top-menu__dropdown-avatar" }, Do = { class: "top-menu__dropdown-info" }, Ao = { class: "top-menu__dropdown-name" }, Bo = { class: "top-menu__dropdown-role" }, Vo = { class: "top-menu__dropdown-menu" }, Oo = { class: "settings-drawer" }, Ro = { class: "settings-section" }, Ko = { class: "settings-layout-options" }, jo = ["onClick"], Wo = { class: "layout-option__preview" }, qo = {
1079
1106
  key: 0,
1080
1107
  class: "layout-preview-sidebar"
1081
- }, Oo = {
1108
+ }, Ho = {
1082
1109
  key: 1,
1083
1110
  class: "layout-preview-top"
1084
- }, Ro = {
1111
+ }, Yo = {
1085
1112
  key: 2,
1086
1113
  class: "layout-preview-mix"
1087
- }, Ko = { class: "layout-option__label" }, jo = { class: "settings-section" }, Wo = { class: "settings-color-options" }, qo = ["title", "onClick"], Ho = { class: "settings-section" }, Yo = { class: "settings-switch-list" }, Go = { class: "settings-switch-item" }, Xo = { class: "settings-switch-item" }, Jo = /* @__PURE__ */ ie({
1114
+ }, Go = { class: "layout-option__label" }, Xo = { class: "settings-section" }, Jo = { class: "settings-color-options" }, Zo = ["title", "onClick"], Qo = { class: "settings-section" }, ea = { class: "settings-switch-list" }, ta = { class: "settings-switch-item" }, sa = { class: "settings-switch-item" }, oa = /* @__PURE__ */ ce({
1088
1115
  __name: "TopMenu",
1089
1116
  props: {
1090
1117
  logoSrc: {}
1091
1118
  },
1092
1119
  setup(t) {
1093
- const l = t, d = k(() => l.logoSrc || Ue("/vite.svg")), s = Me(), a = fe(), h = _e(), i = he(), v = ce(), m = Pe(), f = k(() => s.path), _ = (U, C = "") => {
1094
- const ne = [];
1095
- return U.forEach((r) => {
1096
- r.children && r.children.length > 0 ? ne.push(..._(r.children, r.menuName)) : ne.push({ ...r, parentTitle: C, title: r.menuName, path: r.menuUrl });
1097
- }), ne;
1098
- }, g = k(() => ee.value.trim() ? _(h.menuList).filter(
1120
+ const n = t, m = k(() => n.logoSrc || Te("/vite.svg")), a = Ee(), s = be(), p = fe(), i = _e(), h = ue(), d = ze(), f = k(() => a.path), _ = (N, C = "") => {
1121
+ const le = [];
1122
+ return N.forEach((r) => {
1123
+ r.children && r.children.length > 0 ? le.push(..._(r.children, r.menuName)) : le.push({ ...r, parentTitle: C, title: r.menuName, path: r.menuUrl });
1124
+ }), le;
1125
+ }, g = k(() => ee.value.trim() ? _(p.menuList).filter(
1099
1126
  (C) => C.title.toLowerCase().includes(ee.value.toLowerCase())
1100
- ) : []), u = k(() => i.isDark ? "#1d1e1f" : "#fff"), q = k(() => i.isDark ? "#cfd3dc" : "#303133"), A = k(() => "#409eff"), O = y(!1), B = y(null), R = y(!1), G = y(!1), H = y(!1), te = y(!1), ee = y(""), X = y(null), se = (U) => {
1101
- U && U !== s.path && a.push(U);
1102
- }, F = /* @__PURE__ */ new Set([
1127
+ ) : []), u = k(() => i.isDark ? "#1d1e1f" : "#fff"), W = k(() => i.isDark ? "#cfd3dc" : "#303133"), P = k(() => "#409eff"), B = y(!1), V = y(null), R = y(!1), H = y(!1), Q = y(!1), G = y(!1), ee = y(""), Y = y(null), te = (N) => {
1128
+ N && N !== a.path && s.push(N);
1129
+ }, D = /* @__PURE__ */ new Set([
1103
1130
  "arrow-up",
1104
1131
  "arrow-down",
1105
1132
  "arrow-left",
@@ -1201,10 +1228,10 @@ const _e = ze("menu", () => {
1201
1228
  "sun",
1202
1229
  "theme",
1203
1230
  "skin"
1204
- ]), S = (U) => {
1205
- if (!U || U === "") return "";
1206
- if (U.startsWith("tineco-icon-")) {
1207
- const ne = U.replace("tineco-icon-", "");
1231
+ ]), E = (N) => {
1232
+ if (!N || N === "") return "";
1233
+ if (N.startsWith("tineco-icon-")) {
1234
+ const le = N.replace("tineco-icon-", "");
1208
1235
  return {
1209
1236
  home: "home",
1210
1237
  dashboard: "dashboard",
@@ -1218,7 +1245,7 @@ const _e = ze("menu", () => {
1218
1245
  chart: "chart",
1219
1246
  report: "report",
1220
1247
  analytics: "analytics"
1221
- }[ne] || ne;
1248
+ }[le] || le;
1222
1249
  }
1223
1250
  return {
1224
1251
  dashboard: "dashboard",
@@ -1237,155 +1264,155 @@ const _e = ze("menu", () => {
1237
1264
  app: "app",
1238
1265
  list: "list",
1239
1266
  grid: "grid"
1240
- }[U] || U;
1241
- }, T = (U) => U ? U.charAt(0) : "", J = (U) => F.has(U), K = () => {
1242
- i.toggleTheme(), G.value = !1;
1243
- }, le = () => {
1267
+ }[N] || N;
1268
+ }, F = (N) => N ? N.charAt(0) : "", X = (N) => D.has(N), K = () => {
1269
+ i.toggleTheme(), H.value = !1;
1270
+ }, oe = () => {
1244
1271
  document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1245
- }, ve = () => {
1272
+ }, he = () => {
1246
1273
  R.value = !!document.fullscreenElement;
1247
- }, E = () => {
1248
- O.value = !O.value;
1249
- }, Y = () => {
1250
- O.value = !1;
1251
- }, ae = () => {
1252
- te.value = !1, ee.value = "";
1253
- }, de = (U) => {
1254
- a.push(U), ae();
1255
- }, j = () => {
1256
- G.value = !0;
1257
- }, re = (U) => {
1258
- H.value = U;
1274
+ }, we = () => {
1275
+ B.value = !B.value;
1276
+ }, re = () => {
1277
+ B.value = !1;
1278
+ }, me = () => {
1279
+ G.value = !1, ee.value = "";
1280
+ }, ge = (N) => {
1281
+ s.push(N), me();
1282
+ }, ie = () => {
1283
+ H.value = !0;
1284
+ }, ae = (N) => {
1285
+ Q.value = N;
1259
1286
  const C = document.documentElement;
1260
- U ? C.classList.add("grey-mode") : C.classList.remove("grey-mode");
1261
- }, ge = () => {
1262
- re(!H.value), G.value = !1;
1263
- }, ke = () => {
1264
- i.toggleTheme(), G.value = !1;
1265
- }, me = [
1287
+ N ? C.classList.add("grey-mode") : C.classList.remove("grey-mode");
1288
+ }, M = () => {
1289
+ ae(!Q.value), H.value = !1;
1290
+ }, q = () => {
1291
+ i.toggleTheme(), H.value = !1;
1292
+ }, pe = [
1266
1293
  { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1267
1294
  { value: "top", label: "顶部菜单", icon: "menu" },
1268
1295
  { value: "mix", label: "混合菜单", icon: "grid" }
1269
- ], ye = k(() => i.layout), Se = (U) => {
1270
- i.setLayout(U), G.value = !1;
1271
- }, we = [
1296
+ ], ve = k(() => i.layout), ne = (N) => {
1297
+ i.setLayout(N), H.value = !1;
1298
+ }, ke = [
1272
1299
  { value: "#409eff", label: "默认蓝" },
1273
1300
  { value: "#0F6FDE", label: "企业蓝" },
1274
1301
  { value: "#00A870", label: "翡翠绿" },
1275
1302
  { value: "#D46B08", label: "琥珀橙" },
1276
1303
  { value: "#1F2329", label: "石墨黑" }
1277
- ], xe = (U) => {
1278
- i.setPrimaryColor(U), G.value = !1;
1279
- }, z = () => {
1280
- Y(), a.push("/profile");
1281
- }, w = () => {
1282
- Y(), a.push("/change-password");
1283
- }, oe = () => {
1284
- Y(), m.logout(), v.clearUserInfo(), h.clearMenu(), a.push(i.loginPath);
1285
- }, $ = (U) => {
1286
- B.value && !B.value.contains(U.target) && Y(), X.value && !X.value.contains(U.target) && ae();
1287
- }, pe = (U) => {
1288
- U.key === "Escape" && (ae(), Y());
1304
+ ], ye = (N) => {
1305
+ i.setPrimaryColor(N), H.value = !1;
1306
+ }, xe = () => {
1307
+ re(), s.push("/profile");
1308
+ }, I = () => {
1309
+ re(), s.push("/change-password");
1310
+ }, b = () => {
1311
+ re(), d.logout(), h.clearUserInfo(), p.clearMenu(), s.push(i.loginPath);
1312
+ }, se = (N) => {
1313
+ V.value && !V.value.contains(N.target) && re(), Y.value && !Y.value.contains(N.target) && me();
1314
+ }, $ = (N) => {
1315
+ N.key === "Escape" && (me(), re());
1289
1316
  };
1290
- return We(() => {
1291
- document.addEventListener("click", $), document.addEventListener("fullscreenchange", ve), document.addEventListener("keydown", pe), H.value = document.documentElement.classList.contains("grey-mode");
1292
- }), qe(() => {
1293
- document.removeEventListener("click", $), document.removeEventListener("fullscreenchange", ve), document.removeEventListener("keydown", pe);
1294
- }), (U, C) => {
1295
- var ne;
1296
- return o(), c("div", Ws, [
1297
- e("div", qs, [
1317
+ return qe(() => {
1318
+ document.addEventListener("click", se), document.addEventListener("fullscreenchange", he), document.addEventListener("keydown", $), Q.value = document.documentElement.classList.contains("grey-mode");
1319
+ }), He(() => {
1320
+ document.removeEventListener("click", se), document.removeEventListener("fullscreenchange", he), document.removeEventListener("keydown", $);
1321
+ }), (N, C) => {
1322
+ var le;
1323
+ return o(), c("div", Js, [
1324
+ e("div", Zs, [
1298
1325
  e("img", {
1299
- src: d.value,
1326
+ src: m.value,
1300
1327
  alt: "Logo",
1301
1328
  class: "top-menu__logo-img"
1302
- }, null, 8, Hs),
1303
- e("span", Ys, x(n(i).appName), 1)
1329
+ }, null, 8, Qs),
1330
+ e("span", eo, x(l(i).appName), 1)
1304
1331
  ]),
1305
- b(n(Je), {
1332
+ w(l(Ze), {
1306
1333
  "model-value": f.value,
1307
1334
  mode: "horizontal",
1308
1335
  "background-color": u.value,
1309
- "text-color": q.value,
1310
- "active-text-color": A.value,
1336
+ "text-color": W.value,
1337
+ "active-text-color": P.value,
1311
1338
  class: "top-menu__menu",
1312
- onSelect: se
1339
+ onSelect: te
1313
1340
  }, {
1314
- default: M(() => [
1315
- (o(!0), c(W, null, Z(n(h).menuList, (r) => (o(), c(W, {
1341
+ default: S(() => [
1342
+ (o(!0), c(j, null, J(l(p).menuList, (r) => (o(), c(j, {
1316
1343
  key: r.menuUrl
1317
1344
  }, [
1318
- r.children && r.children.length > 0 ? (o(), D(n(je), {
1345
+ r.children && r.children.length > 0 ? (o(), A(l(We), {
1319
1346
  key: 0,
1320
1347
  index: r.menuUrl
1321
1348
  }, {
1322
- title: M(() => [
1323
- e("span", Gs, [
1324
- r.menuName !== "首页" ? (o(), c("span", Xs, [
1325
- J(S(r.icon)) ? (o(), D(n(I), {
1349
+ title: S(() => [
1350
+ e("span", to, [
1351
+ r.menuName !== "首页" ? (o(), c("span", so, [
1352
+ X(E(r.icon)) ? (o(), A(l(U), {
1326
1353
  key: 0,
1327
- name: S(r.icon),
1354
+ name: E(r.icon),
1328
1355
  size: 16
1329
- }, null, 8, ["name"])) : (o(), c("span", Js, x(T(r.menuName)), 1))
1330
- ])) : P("", !0),
1331
- e("span", Zs, x(r.menuName), 1)
1356
+ }, null, 8, ["name"])) : (o(), c("span", oo, x(F(r.menuName)), 1))
1357
+ ])) : z("", !0),
1358
+ e("span", ao, x(r.menuName), 1)
1332
1359
  ])
1333
1360
  ]),
1334
- default: M(() => [
1335
- (o(!0), c(W, null, Z(r.children, (p) => (o(), c(W, {
1336
- key: p.menuUrl
1361
+ default: S(() => [
1362
+ (o(!0), c(j, null, J(r.children, (v) => (o(), c(j, {
1363
+ key: v.menuUrl
1337
1364
  }, [
1338
- p.children && p.children.length > 0 ? (o(), D(n(je), {
1365
+ v.children && v.children.length > 0 ? (o(), A(l(We), {
1339
1366
  key: 0,
1340
- index: p.menuUrl
1367
+ index: v.menuUrl
1341
1368
  }, {
1342
- title: M(() => [
1343
- e("span", Qs, [
1344
- e("span", eo, [
1345
- J(S(p.icon)) ? (o(), D(n(I), {
1369
+ title: S(() => [
1370
+ e("span", no, [
1371
+ e("span", lo, [
1372
+ X(E(v.icon)) ? (o(), A(l(U), {
1346
1373
  key: 0,
1347
- name: S(p.icon),
1374
+ name: E(v.icon),
1348
1375
  size: 16
1349
- }, null, 8, ["name"])) : (o(), c("span", to, x(T(p.menuName)), 1))
1376
+ }, null, 8, ["name"])) : (o(), c("span", ro, x(F(v.menuName)), 1))
1350
1377
  ]),
1351
- e("span", so, x(p.menuName), 1)
1378
+ e("span", io, x(v.menuName), 1)
1352
1379
  ])
1353
1380
  ]),
1354
- default: M(() => [
1355
- (o(!0), c(W, null, Z(p.children, (V) => (o(), D(n(Ne), {
1356
- key: V.menuUrl,
1357
- index: V.menuUrl
1381
+ default: S(() => [
1382
+ (o(!0), c(j, null, J(v.children, (O) => (o(), A(l(Ie), {
1383
+ key: O.menuUrl,
1384
+ index: O.menuUrl
1358
1385
  }, {
1359
- default: M(() => [
1360
- e("span", oo, [
1361
- e("span", ao, [
1362
- J(S(V.icon)) ? (o(), D(n(I), {
1386
+ default: S(() => [
1387
+ e("span", co, [
1388
+ e("span", uo, [
1389
+ X(E(O.icon)) ? (o(), A(l(U), {
1363
1390
  key: 0,
1364
- name: S(V.icon),
1391
+ name: E(O.icon),
1365
1392
  size: 16
1366
- }, null, 8, ["name"])) : (o(), c("span", no, x(T(V.menuName)), 1))
1393
+ }, null, 8, ["name"])) : (o(), c("span", mo, x(F(O.menuName)), 1))
1367
1394
  ]),
1368
- e("span", lo, x(V.menuName), 1)
1395
+ e("span", po, x(O.menuName), 1)
1369
1396
  ])
1370
1397
  ]),
1371
1398
  _: 2
1372
1399
  }, 1032, ["index"]))), 128))
1373
1400
  ]),
1374
1401
  _: 2
1375
- }, 1032, ["index"])) : (o(), D(n(Ne), {
1402
+ }, 1032, ["index"])) : (o(), A(l(Ie), {
1376
1403
  key: 1,
1377
- index: p.menuUrl
1404
+ index: v.menuUrl
1378
1405
  }, {
1379
- default: M(() => [
1380
- e("span", ro, [
1381
- e("span", io, [
1382
- J(S(p.icon)) ? (o(), D(n(I), {
1406
+ default: S(() => [
1407
+ e("span", vo, [
1408
+ e("span", ho, [
1409
+ X(E(v.icon)) ? (o(), A(l(U), {
1383
1410
  key: 0,
1384
- name: S(p.icon),
1411
+ name: E(v.icon),
1385
1412
  size: 16
1386
- }, null, 8, ["name"])) : (o(), c("span", co, x(T(p.menuName)), 1))
1413
+ }, null, 8, ["name"])) : (o(), c("span", _o, x(F(v.menuName)), 1))
1387
1414
  ]),
1388
- e("span", uo, x(p.menuName), 1)
1415
+ e("span", fo, x(v.menuName), 1)
1389
1416
  ])
1390
1417
  ]),
1391
1418
  _: 2
@@ -1393,20 +1420,20 @@ const _e = ze("menu", () => {
1393
1420
  ], 64))), 128))
1394
1421
  ]),
1395
1422
  _: 2
1396
- }, 1032, ["index"])) : (o(), D(n(Ne), {
1423
+ }, 1032, ["index"])) : (o(), A(l(Ie), {
1397
1424
  key: 1,
1398
1425
  index: r.menuUrl
1399
1426
  }, {
1400
- default: M(() => [
1401
- e("span", mo, [
1402
- r.menuName !== "首页" ? (o(), c("span", po, [
1403
- J(S(r.icon)) ? (o(), D(n(I), {
1427
+ default: S(() => [
1428
+ e("span", go, [
1429
+ r.menuName !== "首页" ? (o(), c("span", yo, [
1430
+ X(E(r.icon)) ? (o(), A(l(U), {
1404
1431
  key: 0,
1405
- name: S(r.icon),
1432
+ name: E(r.icon),
1406
1433
  size: 16
1407
- }, null, 8, ["name"])) : (o(), c("span", vo, x(T(r.menuName)), 1))
1408
- ])) : P("", !0),
1409
- e("span", ho, x(r.menuName), 1)
1434
+ }, null, 8, ["name"])) : (o(), c("span", bo, x(F(r.menuName)), 1))
1435
+ ])) : z("", !0),
1436
+ e("span", wo, x(r.menuName), 1)
1410
1437
  ])
1411
1438
  ]),
1412
1439
  _: 2
@@ -1415,67 +1442,67 @@ const _e = ze("menu", () => {
1415
1442
  ]),
1416
1443
  _: 1
1417
1444
  }, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
1418
- e("div", _o, [
1445
+ e("div", ko, [
1419
1446
  e("div", {
1420
1447
  class: "top-menu__search",
1421
1448
  ref_key: "searchRef",
1422
- ref: X
1449
+ ref: Y
1423
1450
  }, [
1424
- b(n(I), {
1451
+ w(l(U), {
1425
1452
  name: "search",
1426
1453
  size: 14,
1427
1454
  class: "top-menu__search-icon"
1428
1455
  }),
1429
- Fe(e("input", {
1456
+ De(e("input", {
1430
1457
  "onUpdate:modelValue": C[0] || (C[0] = (r) => ee.value = r),
1431
1458
  type: "text",
1432
1459
  class: "top-menu__search-input",
1433
1460
  placeholder: "搜索菜单...",
1434
- onFocus: C[1] || (C[1] = (r) => te.value = !0)
1461
+ onFocus: C[1] || (C[1] = (r) => G.value = !0)
1435
1462
  }, null, 544), [
1436
- [He, ee.value]
1463
+ [Ye, ee.value]
1437
1464
  ]),
1438
- b($e, { name: "search-dropdown" }, {
1439
- default: M(() => [
1440
- te.value && (g.value.length > 0 || ee.value) ? (o(), c("div", fo, [
1441
- g.value.length > 0 ? (o(), c("div", go, [
1442
- (o(!0), c(W, null, Z(g.value, (r) => (o(), c("div", {
1465
+ w(Se, { name: "search-dropdown" }, {
1466
+ default: S(() => [
1467
+ G.value && (g.value.length > 0 || ee.value) ? (o(), c("div", xo, [
1468
+ g.value.length > 0 ? (o(), c("div", Co, [
1469
+ (o(!0), c(j, null, J(g.value, (r) => (o(), c("div", {
1443
1470
  key: r.path,
1444
1471
  class: "top-menu__search-item",
1445
- onClick: (p) => de(r.path)
1472
+ onClick: (v) => ge(r.path)
1446
1473
  }, [
1447
- r.title !== "首页" ? (o(), c("span", bo, [
1448
- J(S(r.icon)) ? (o(), D(n(I), {
1474
+ r.title !== "首页" ? (o(), c("span", Lo, [
1475
+ X(E(r.icon)) ? (o(), A(l(U), {
1449
1476
  key: 0,
1450
- name: S(r.icon),
1477
+ name: E(r.icon),
1451
1478
  size: 16
1452
- }, null, 8, ["name"])) : (o(), c("span", ko, x(T(r.title)), 1))
1453
- ])) : P("", !0),
1454
- e("span", wo, x(r.title), 1),
1455
- r.parentTitle ? (o(), c("span", xo, x(r.parentTitle), 1)) : P("", !0)
1456
- ], 8, yo))), 128))
1457
- ])) : (o(), c("div", Co, " 未找到匹配的菜单 "))
1458
- ])) : P("", !0)
1479
+ }, null, 8, ["name"])) : (o(), c("span", Mo, x(F(r.title)), 1))
1480
+ ])) : z("", !0),
1481
+ e("span", So, x(r.title), 1),
1482
+ r.parentTitle ? (o(), c("span", No, x(r.parentTitle), 1)) : z("", !0)
1483
+ ], 8, $o))), 128))
1484
+ ])) : (o(), c("div", Eo, " 未找到匹配的菜单 "))
1485
+ ])) : z("", !0)
1459
1486
  ]),
1460
1487
  _: 1
1461
1488
  })
1462
1489
  ], 512),
1463
1490
  e("div", {
1464
1491
  class: "top-menu__action",
1465
- onClick: le,
1492
+ onClick: oe,
1466
1493
  title: R.value ? "退出全屏" : "全屏"
1467
1494
  }, [
1468
- b(n(I), {
1495
+ w(l(U), {
1469
1496
  name: R.value ? "fullscreen-exit" : "fullscreen",
1470
1497
  size: 16
1471
1498
  }, null, 8, ["name"])
1472
- ], 8, $o),
1499
+ ], 8, Io),
1473
1500
  e("div", {
1474
1501
  class: "top-menu__action",
1475
- onClick: j,
1502
+ onClick: ie,
1476
1503
  title: "换肤设置"
1477
1504
  }, [
1478
- b(n(I), {
1505
+ w(l(U), {
1479
1506
  name: "skin",
1480
1507
  size: 16
1481
1508
  })
@@ -1485,26 +1512,26 @@ const _e = ze("menu", () => {
1485
1512
  onClick: K,
1486
1513
  title: "切换主题"
1487
1514
  }, [
1488
- b(n(I), {
1489
- name: n(i).isDark ? "sun" : "moon",
1515
+ w(l(U), {
1516
+ name: l(i).isDark ? "sun" : "moon",
1490
1517
  size: 16
1491
1518
  }, null, 8, ["name"])
1492
1519
  ]),
1493
1520
  e("div", {
1494
1521
  class: "top-menu__user",
1495
1522
  ref_key: "dropdownRef",
1496
- ref: B
1523
+ ref: V
1497
1524
  }, [
1498
1525
  e("div", {
1499
1526
  class: "top-menu__user-trigger",
1500
- onClick: De(E, ["stop"])
1527
+ onClick: Ae(we, ["stop"])
1501
1528
  }, [
1502
- e("div", Lo, [
1503
- e("span", null, x(((ne = n(v).userName) == null ? void 0 : ne.charAt(0)) || "U"), 1)
1529
+ e("div", Uo, [
1530
+ e("span", null, x(((le = l(h).userName) == null ? void 0 : le.charAt(0)) || "U"), 1)
1504
1531
  ]),
1505
- e("span", Mo, x(n(v).userName), 1),
1532
+ e("span", To, x(l(h).userName), 1),
1506
1533
  e("span", {
1507
- class: Q(["top-menu__user-arrow", { "is-active": O.value }])
1534
+ class: Z(["top-menu__user-arrow", { "is-active": B.value }])
1508
1535
  }, [...C[3] || (C[3] = [
1509
1536
  e("svg", {
1510
1537
  viewBox: "0 0 12 12",
@@ -1520,27 +1547,27 @@ const _e = ze("menu", () => {
1520
1547
  ], -1)
1521
1548
  ])], 2)
1522
1549
  ]),
1523
- b($e, { name: "dropdown" }, {
1524
- default: M(() => {
1550
+ w(Se, { name: "dropdown" }, {
1551
+ default: S(() => {
1525
1552
  var r;
1526
1553
  return [
1527
- O.value ? (o(), c("div", So, [
1528
- e("div", No, [
1529
- e("div", Io, [
1530
- e("span", null, x(((r = n(v).userName) == null ? void 0 : r.charAt(0)) || "U"), 1)
1554
+ B.value ? (o(), c("div", Po, [
1555
+ e("div", zo, [
1556
+ e("div", Fo, [
1557
+ e("span", null, x(((r = l(h).userName) == null ? void 0 : r.charAt(0)) || "U"), 1)
1531
1558
  ]),
1532
- e("div", Eo, [
1533
- e("div", Uo, x(n(v).userName), 1),
1534
- e("div", zo, x(n(v).departmentName), 1)
1559
+ e("div", Do, [
1560
+ e("div", Ao, x(l(h).userName), 1),
1561
+ e("div", Bo, x(l(h).departmentName), 1)
1535
1562
  ])
1536
1563
  ]),
1537
1564
  C[8] || (C[8] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1538
- e("div", Po, [
1565
+ e("div", Vo, [
1539
1566
  e("div", {
1540
1567
  class: "top-menu__dropdown-item",
1541
- onClick: z
1568
+ onClick: xe
1542
1569
  }, [
1543
- b(n(I), {
1570
+ w(l(U), {
1544
1571
  name: "user",
1545
1572
  size: 16
1546
1573
  }),
@@ -1548,9 +1575,9 @@ const _e = ze("menu", () => {
1548
1575
  ]),
1549
1576
  e("div", {
1550
1577
  class: "top-menu__dropdown-item",
1551
- onClick: w
1578
+ onClick: I
1552
1579
  }, [
1553
- b(n(I), {
1580
+ w(l(U), {
1554
1581
  name: "lock",
1555
1582
  size: 16
1556
1583
  }),
@@ -1559,50 +1586,50 @@ const _e = ze("menu", () => {
1559
1586
  C[7] || (C[7] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1560
1587
  e("div", {
1561
1588
  class: "top-menu__dropdown-item top-menu__dropdown-item--danger",
1562
- onClick: oe
1589
+ onClick: b
1563
1590
  }, [
1564
- b(n(I), {
1591
+ w(l(U), {
1565
1592
  name: "logout",
1566
1593
  size: 16
1567
1594
  }),
1568
1595
  C[6] || (C[6] = e("span", null, "退出登录", -1))
1569
1596
  ])
1570
1597
  ])
1571
- ])) : P("", !0)
1598
+ ])) : z("", !0)
1572
1599
  ];
1573
1600
  }),
1574
1601
  _: 1
1575
1602
  })
1576
1603
  ], 512)
1577
1604
  ]),
1578
- b(n(Ze), {
1579
- modelValue: G.value,
1580
- "onUpdate:modelValue": C[2] || (C[2] = (r) => G.value = r),
1605
+ w(l(Qe), {
1606
+ modelValue: H.value,
1607
+ "onUpdate:modelValue": C[2] || (C[2] = (r) => H.value = r),
1581
1608
  title: "换肤设置",
1582
1609
  direction: "rtl",
1583
1610
  size: "320px"
1584
1611
  }, {
1585
- default: M(() => [
1586
- e("div", To, [
1587
- e("div", Fo, [
1612
+ default: S(() => [
1613
+ e("div", Oo, [
1614
+ e("div", Ro, [
1588
1615
  C[12] || (C[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
1589
- e("div", Do, [
1590
- (o(), c(W, null, Z(me, (r) => e("div", {
1616
+ e("div", Ko, [
1617
+ (o(), c(j, null, J(pe, (r) => e("div", {
1591
1618
  key: r.value,
1592
- class: Q(["layout-option", { "is-active": ye.value === r.value }]),
1593
- onClick: (p) => Se(r.value)
1619
+ class: Z(["layout-option", { "is-active": ve.value === r.value }]),
1620
+ onClick: (v) => ne(r.value)
1594
1621
  }, [
1595
- e("div", Bo, [
1596
- r.value === "sidebar" ? (o(), c("div", Vo, [...C[9] || (C[9] = [
1622
+ e("div", Wo, [
1623
+ r.value === "sidebar" ? (o(), c("div", qo, [...C[9] || (C[9] = [
1597
1624
  e("div", { class: "preview-aside" }, null, -1),
1598
1625
  e("div", { class: "preview-main" }, [
1599
1626
  e("div", { class: "preview-header" }),
1600
1627
  e("div", { class: "preview-content" })
1601
1628
  ], -1)
1602
- ])])) : r.value === "top" ? (o(), c("div", Oo, [...C[10] || (C[10] = [
1629
+ ])])) : r.value === "top" ? (o(), c("div", Ho, [...C[10] || (C[10] = [
1603
1630
  e("div", { class: "preview-header-full" }, null, -1),
1604
1631
  e("div", { class: "preview-content-full" }, null, -1)
1605
- ])])) : (o(), c("div", Ro, [...C[11] || (C[11] = [
1632
+ ])])) : (o(), c("div", Yo, [...C[11] || (C[11] = [
1606
1633
  e("div", { class: "preview-header-mix" }, [
1607
1634
  e("div", { class: "preview-mix-left" })
1608
1635
  ], -1),
@@ -1612,46 +1639,46 @@ const _e = ze("menu", () => {
1612
1639
  ], -1)
1613
1640
  ])]))
1614
1641
  ]),
1615
- e("span", Ko, x(r.label), 1)
1616
- ], 10, Ao)), 64))
1642
+ e("span", Go, x(r.label), 1)
1643
+ ], 10, jo)), 64))
1617
1644
  ])
1618
1645
  ]),
1619
- e("div", jo, [
1646
+ e("div", Xo, [
1620
1647
  C[13] || (C[13] = e("div", { class: "settings-title" }, "主题色", -1)),
1621
- e("div", Wo, [
1622
- (o(), c(W, null, Z(we, (r) => e("div", {
1648
+ e("div", Jo, [
1649
+ (o(), c(j, null, J(ke, (r) => e("div", {
1623
1650
  key: r.value,
1624
- class: Q(["color-option", { "is-active": n(i).primaryColor === r.value }]),
1625
- style: Ie({ backgroundColor: r.value }),
1651
+ class: Z(["color-option", { "is-active": l(i).primaryColor === r.value }]),
1652
+ style: Ue({ backgroundColor: r.value }),
1626
1653
  title: r.label,
1627
- onClick: (p) => xe(r.value)
1654
+ onClick: (v) => ye(r.value)
1628
1655
  }, [
1629
- n(i).primaryColor === r.value ? (o(), D(n(I), {
1656
+ l(i).primaryColor === r.value ? (o(), A(l(U), {
1630
1657
  key: 0,
1631
1658
  name: "check",
1632
1659
  size: 12,
1633
1660
  color: "#fff"
1634
- })) : P("", !0)
1635
- ], 14, qo)), 64))
1661
+ })) : z("", !0)
1662
+ ], 14, Zo)), 64))
1636
1663
  ])
1637
1664
  ]),
1638
- e("div", Ho, [
1665
+ e("div", Qo, [
1639
1666
  C[18] || (C[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
1640
- e("div", Yo, [
1641
- e("div", Go, [
1667
+ e("div", ea, [
1668
+ e("div", ta, [
1642
1669
  C[15] || (C[15] = e("span", null, "灰色模式", -1)),
1643
1670
  e("div", {
1644
- class: Q(["switch-wrapper", { "is-checked": H.value }]),
1645
- onClick: ge
1671
+ class: Z(["switch-wrapper", { "is-checked": Q.value }]),
1672
+ onClick: M
1646
1673
  }, [...C[14] || (C[14] = [
1647
1674
  e("span", { class: "switch-core" }, null, -1)
1648
1675
  ])], 2)
1649
1676
  ]),
1650
- e("div", Xo, [
1677
+ e("div", sa, [
1651
1678
  C[17] || (C[17] = e("span", null, "暗黑模式", -1)),
1652
1679
  e("div", {
1653
- class: Q(["switch-wrapper", { "is-checked": n(i).isDark }]),
1654
- onClick: ke
1680
+ class: Z(["switch-wrapper", { "is-checked": l(i).isDark }]),
1681
+ onClick: q
1655
1682
  }, [...C[16] || (C[16] = [
1656
1683
  e("span", { class: "switch-core" }, null, -1)
1657
1684
  ])], 2)
@@ -1665,76 +1692,76 @@ const _e = ze("menu", () => {
1665
1692
  ]);
1666
1693
  };
1667
1694
  }
1668
- }), Zo = /* @__PURE__ */ ue(Jo, [["__scopeId", "data-v-711d5b8d"]]), Qo = { class: "mix-top-menu" }, ea = { class: "mix-top-menu__logo" }, ta = ["src"], sa = { class: "mix-top-menu__logo-text" }, oa = { class: "mix-top-menu__menu-content" }, aa = {
1695
+ }), aa = /* @__PURE__ */ de(oa, [["__scopeId", "data-v-711d5b8d"]]), na = { class: "mix-top-menu" }, la = { class: "mix-top-menu__logo" }, ra = ["src"], ia = { class: "mix-top-menu__logo-text" }, ca = { class: "mix-top-menu__menu-content" }, ua = {
1669
1696
  key: 0,
1670
1697
  class: "mix-top-menu__menu-icon"
1671
- }, na = {
1698
+ }, da = {
1672
1699
  key: 1,
1673
1700
  class: "mix-top-menu__menu-char"
1674
- }, la = { class: "mix-top-menu__menu-text" }, ra = { class: "mix-top-menu__actions" }, ia = {
1701
+ }, ma = { class: "mix-top-menu__menu-text" }, pa = { class: "mix-top-menu__actions" }, va = {
1675
1702
  key: 0,
1676
1703
  class: "mix-top-menu__search-dropdown"
1677
- }, ca = {
1704
+ }, ha = {
1678
1705
  key: 0,
1679
1706
  class: "mix-top-menu__search-results"
1680
- }, ua = ["onClick"], da = {
1707
+ }, _a = ["onClick"], fa = {
1681
1708
  key: 0,
1682
1709
  class: "mix-top-menu__search-icon-item"
1683
- }, ma = {
1710
+ }, ga = {
1684
1711
  key: 1,
1685
1712
  class: "mix-top-menu__search-char"
1686
- }, pa = { class: "mix-top-menu__search-item-title" }, va = {
1713
+ }, ya = { class: "mix-top-menu__search-item-title" }, ba = {
1687
1714
  key: 1,
1688
1715
  class: "mix-top-menu__search-item-parent"
1689
- }, ha = {
1716
+ }, wa = {
1690
1717
  key: 1,
1691
1718
  class: "mix-top-menu__search-empty"
1692
- }, _a = ["title"], fa = { class: "mix-top-menu__avatar" }, ga = { class: "mix-top-menu__user-name" }, ya = {
1719
+ }, ka = ["title"], xa = { class: "mix-top-menu__avatar" }, Ca = { class: "mix-top-menu__user-name" }, $a = {
1693
1720
  key: 0,
1694
1721
  class: "mix-top-menu__dropdown"
1695
- }, ba = { class: "mix-top-menu__dropdown-header" }, ka = { class: "mix-top-menu__dropdown-avatar" }, wa = { class: "mix-top-menu__dropdown-info" }, xa = { class: "mix-top-menu__dropdown-name" }, Ca = { class: "mix-top-menu__dropdown-role" }, $a = { class: "mix-top-menu__dropdown-menu" }, La = { class: "settings-drawer" }, Ma = { class: "settings-section" }, Sa = { class: "settings-layout-options" }, Na = ["onClick"], Ia = { class: "layout-option__preview" }, Ea = {
1722
+ }, La = { class: "mix-top-menu__dropdown-header" }, Ma = { class: "mix-top-menu__dropdown-avatar" }, Sa = { class: "mix-top-menu__dropdown-info" }, Na = { class: "mix-top-menu__dropdown-name" }, Ea = { class: "mix-top-menu__dropdown-role" }, Ia = { class: "mix-top-menu__dropdown-menu" }, Ua = { class: "settings-drawer" }, Ta = { class: "settings-section" }, Pa = { class: "settings-layout-options" }, za = ["onClick"], Fa = { class: "layout-option__preview" }, Da = {
1696
1723
  key: 0,
1697
1724
  class: "layout-preview-sidebar"
1698
- }, Ua = {
1725
+ }, Aa = {
1699
1726
  key: 1,
1700
1727
  class: "layout-preview-top"
1701
- }, za = {
1728
+ }, Ba = {
1702
1729
  key: 2,
1703
1730
  class: "layout-preview-mix"
1704
- }, Pa = { class: "layout-option__label" }, Ta = { class: "settings-section" }, Fa = { class: "settings-color-options" }, Da = ["title", "onClick"], Aa = { class: "settings-section" }, Ba = { class: "settings-switch-list" }, Va = { class: "settings-switch-item" }, Oa = { class: "settings-switch-item" }, Ra = /* @__PURE__ */ ie({
1731
+ }, Va = { class: "layout-option__label" }, Oa = { class: "settings-section" }, Ra = { class: "settings-color-options" }, Ka = ["title", "onClick"], ja = { class: "settings-section" }, Wa = { class: "settings-switch-list" }, qa = { class: "settings-switch-item" }, Ha = { class: "settings-switch-item" }, Ya = /* @__PURE__ */ ce({
1705
1732
  __name: "MixTopMenu",
1706
1733
  props: {
1707
1734
  logoSrc: {}
1708
1735
  },
1709
1736
  setup(t) {
1710
- const l = t, d = k(() => l.logoSrc || Ue("/vite.svg")), s = Me(), a = fe(), h = _e(), i = he(), v = ce(), m = Pe(), f = y(""), _ = (r, p = "") => {
1711
- const V = [];
1737
+ const n = t, m = k(() => n.logoSrc || Te("/vite.svg")), a = Ee(), s = be(), p = fe(), i = _e(), h = ue(), d = ze(), f = y(""), _ = (r, v = "") => {
1738
+ const O = [];
1712
1739
  return r.forEach((L) => {
1713
- L.children && L.children.length > 0 ? V.push(..._(L.children, L.menuName)) : V.push({ ...L, parentTitle: p, title: L.menuName, path: L.menuUrl });
1714
- }), V;
1715
- }, g = k(() => S.value.trim() ? _(h.menuList).filter(
1716
- (p) => p.title.toLowerCase().includes(S.value.toLowerCase())
1740
+ L.children && L.children.length > 0 ? O.push(..._(L.children, L.menuName)) : O.push({ ...L, parentTitle: v, title: L.menuName, path: L.menuUrl });
1741
+ }), O;
1742
+ }, g = k(() => E.value.trim() ? _(p.menuList).filter(
1743
+ (v) => v.title.toLowerCase().includes(E.value.toLowerCase())
1717
1744
  ) : []), u = k(() => {
1718
- const r = h.menuList.find((p) => p.menuUrl === f.value);
1745
+ const r = p.menuList.find((v) => v.menuUrl === f.value);
1719
1746
  return (r == null ? void 0 : r.children) || [];
1720
- }), q = k(() => h.menuList.find((r) => !!(s.path === r.menuUrl || r.children && r.children.some((p) => s.path.startsWith(p.menuUrl) || s.path === p.menuUrl)))), A = () => {
1721
- q.value ? f.value = q.value.menuUrl : h.menuList.length > 0 && (f.value = h.menuList[0].menuUrl);
1722
- }, O = (r) => {
1747
+ }), W = k(() => p.menuList.find((r) => !!(a.path === r.menuUrl || r.children && r.children.some((v) => a.path.startsWith(v.menuUrl) || a.path === v.menuUrl)))), P = () => {
1748
+ W.value ? f.value = W.value.menuUrl : p.menuList.length > 0 && (f.value = p.menuList[0].menuUrl);
1749
+ }, B = (r) => {
1723
1750
  f.value = r;
1724
- const p = h.menuList.find((V) => V.menuUrl === r);
1725
- if (p)
1726
- if (p.children && p.children.length > 0) {
1727
- const V = p.children[0].menuUrl;
1728
- s.path !== V && a.push(V);
1751
+ const v = p.menuList.find((O) => O.menuUrl === r);
1752
+ if (v)
1753
+ if (v.children && v.children.length > 0) {
1754
+ const O = v.children[0].menuUrl;
1755
+ a.path !== O && s.push(O);
1729
1756
  } else
1730
- s.path !== r && a.push(r);
1731
- }, B = k(() => i.isDark ? "#1d1e1f" : "#fff"), R = k(() => i.isDark ? "#cfd3dc" : "#303133"), G = k(() => "#409eff"), H = y(!1), te = y(null), ee = y(!1), X = y(!1), se = y(!1), F = y(!1), S = y(""), T = y(null);
1732
- Ce(() => s.path, () => {
1733
- A(), i.setMixSubMenus(u.value);
1734
- }), Ce(() => h.menuList, (r) => {
1735
- r && r.length > 0 && (A(), i.setMixSubMenus(u.value));
1757
+ a.path !== r && s.push(r);
1758
+ }, V = k(() => i.isDark ? "#1d1e1f" : "#fff"), R = k(() => i.isDark ? "#cfd3dc" : "#303133"), H = k(() => "#409eff"), Q = y(!1), G = y(null), ee = y(!1), Y = y(!1), te = y(!1), D = y(!1), E = y(""), F = y(null);
1759
+ Le(() => a.path, () => {
1760
+ P(), i.setMixSubMenus(u.value);
1761
+ }), Le(() => p.menuList, (r) => {
1762
+ r && r.length > 0 && (P(), i.setMixSubMenus(u.value));
1736
1763
  }, { immediate: !0 });
1737
- const J = /* @__PURE__ */ new Set([
1764
+ const X = /* @__PURE__ */ new Set([
1738
1765
  "arrow-up",
1739
1766
  "arrow-down",
1740
1767
  "arrow-left",
@@ -1839,7 +1866,7 @@ const _e = ze("menu", () => {
1839
1866
  ]), K = (r) => {
1840
1867
  if (!r || r === "") return "";
1841
1868
  if (r.startsWith("tineco-icon-")) {
1842
- const V = r.replace("tineco-icon-", "");
1869
+ const O = r.replace("tineco-icon-", "");
1843
1870
  return {
1844
1871
  home: "home",
1845
1872
  dashboard: "dashboard",
@@ -1853,7 +1880,7 @@ const _e = ze("menu", () => {
1853
1880
  chart: "chart",
1854
1881
  report: "report",
1855
1882
  analytics: "analytics"
1856
- }[V] || V;
1883
+ }[O] || O;
1857
1884
  }
1858
1885
  return {
1859
1886
  dashboard: "dashboard",
@@ -1873,94 +1900,94 @@ const _e = ze("menu", () => {
1873
1900
  list: "list",
1874
1901
  grid: "grid"
1875
1902
  }[r] || r;
1876
- }, le = (r) => r ? r.charAt(0) : "", ve = (r) => J.has(r), E = () => {
1877
- i.toggleTheme(), X.value = !1;
1878
- }, Y = () => {
1903
+ }, oe = (r) => r ? r.charAt(0) : "", he = (r) => X.has(r), we = () => {
1904
+ i.toggleTheme(), Y.value = !1;
1905
+ }, re = () => {
1879
1906
  document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1880
- }, ae = () => {
1907
+ }, me = () => {
1881
1908
  ee.value = !!document.fullscreenElement;
1882
- }, de = () => {
1883
- H.value = !H.value;
1884
- }, j = () => {
1885
- H.value = !1;
1886
- }, re = () => {
1887
- F.value = !1, S.value = "";
1888
- }, ge = (r) => {
1889
- a.push(r), re();
1890
- }, ke = () => {
1891
- X.value = !0;
1892
- }, me = (r) => {
1893
- se.value = r;
1894
- const p = document.documentElement;
1895
- r ? p.classList.add("grey-mode") : p.classList.remove("grey-mode");
1896
- }, ye = () => {
1897
- me(!se.value), X.value = !1;
1898
- }, Se = () => {
1899
- i.toggleTheme(), X.value = !1;
1900
- }, we = [
1909
+ }, ge = () => {
1910
+ Q.value = !Q.value;
1911
+ }, ie = () => {
1912
+ Q.value = !1;
1913
+ }, ae = () => {
1914
+ D.value = !1, E.value = "";
1915
+ }, M = (r) => {
1916
+ s.push(r), ae();
1917
+ }, q = () => {
1918
+ Y.value = !0;
1919
+ }, pe = (r) => {
1920
+ te.value = r;
1921
+ const v = document.documentElement;
1922
+ r ? v.classList.add("grey-mode") : v.classList.remove("grey-mode");
1923
+ }, ve = () => {
1924
+ pe(!te.value), Y.value = !1;
1925
+ }, ne = () => {
1926
+ i.toggleTheme(), Y.value = !1;
1927
+ }, ke = [
1901
1928
  { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1902
1929
  { value: "top", label: "顶部菜单", icon: "menu" },
1903
1930
  { value: "mix", label: "混合菜单", icon: "grid" }
1904
- ], xe = k(() => i.layout), z = (r) => {
1905
- i.setLayout(r), X.value = !1;
1906
- }, w = [
1931
+ ], ye = k(() => i.layout), xe = (r) => {
1932
+ i.setLayout(r), Y.value = !1;
1933
+ }, I = [
1907
1934
  { value: "#409eff", label: "默认蓝" },
1908
1935
  { value: "#0F6FDE", label: "企业蓝" },
1909
1936
  { value: "#00A870", label: "翡翠绿" },
1910
1937
  { value: "#D46B08", label: "琥珀橙" },
1911
1938
  { value: "#1F2329", label: "石墨黑" }
1912
- ], oe = (r) => {
1913
- i.setPrimaryColor(r), X.value = !1;
1939
+ ], b = (r) => {
1940
+ i.setPrimaryColor(r), Y.value = !1;
1941
+ }, se = () => {
1942
+ ie(), s.push("/profile");
1914
1943
  }, $ = () => {
1915
- j(), a.push("/profile");
1916
- }, pe = () => {
1917
- j(), a.push("/change-password");
1918
- }, U = () => {
1919
- j(), m.logout(), v.clearUserInfo(), h.clearMenu(), a.push(i.loginPath);
1944
+ ie(), s.push("/change-password");
1945
+ }, N = () => {
1946
+ ie(), d.logout(), h.clearUserInfo(), p.clearMenu(), s.push(i.loginPath);
1920
1947
  }, C = (r) => {
1921
- te.value && !te.value.contains(r.target) && j(), T.value && !T.value.contains(r.target) && re();
1922
- }, ne = (r) => {
1923
- r.key === "Escape" && (re(), j());
1948
+ G.value && !G.value.contains(r.target) && ie(), F.value && !F.value.contains(r.target) && ae();
1949
+ }, le = (r) => {
1950
+ r.key === "Escape" && (ae(), ie());
1924
1951
  };
1925
- return We(() => {
1926
- document.addEventListener("click", C), document.addEventListener("fullscreenchange", ae), document.addEventListener("keydown", ne), se.value = document.documentElement.classList.contains("grey-mode"), A();
1927
- }), qe(() => {
1928
- document.removeEventListener("click", C), document.removeEventListener("fullscreenchange", ae), document.removeEventListener("keydown", ne);
1929
- }), (r, p) => {
1930
- var V;
1931
- return o(), c("div", Qo, [
1932
- e("div", ea, [
1952
+ return qe(() => {
1953
+ document.addEventListener("click", C), document.addEventListener("fullscreenchange", me), document.addEventListener("keydown", le), te.value = document.documentElement.classList.contains("grey-mode"), P();
1954
+ }), He(() => {
1955
+ document.removeEventListener("click", C), document.removeEventListener("fullscreenchange", me), document.removeEventListener("keydown", le);
1956
+ }), (r, v) => {
1957
+ var O;
1958
+ return o(), c("div", na, [
1959
+ e("div", la, [
1933
1960
  e("img", {
1934
- src: d.value,
1961
+ src: m.value,
1935
1962
  alt: "Logo",
1936
1963
  class: "mix-top-menu__logo-img"
1937
- }, null, 8, ta),
1938
- e("span", sa, x(n(i).appName), 1)
1964
+ }, null, 8, ra),
1965
+ e("span", ia, x(l(i).appName), 1)
1939
1966
  ]),
1940
- b(n(Je), {
1967
+ w(l(Ze), {
1941
1968
  "model-value": f.value,
1942
1969
  mode: "horizontal",
1943
- "background-color": B.value,
1970
+ "background-color": V.value,
1944
1971
  "text-color": R.value,
1945
- "active-text-color": G.value,
1972
+ "active-text-color": H.value,
1946
1973
  class: "mix-top-menu__menu",
1947
- onSelect: O
1974
+ onSelect: B
1948
1975
  }, {
1949
- default: M(() => [
1950
- (o(!0), c(W, null, Z(n(h).menuList, (L) => (o(), D(n(Ne), {
1976
+ default: S(() => [
1977
+ (o(!0), c(j, null, J(l(p).menuList, (L) => (o(), A(l(Ie), {
1951
1978
  key: L.menuUrl,
1952
1979
  index: L.menuUrl
1953
1980
  }, {
1954
- default: M(() => [
1955
- e("span", oa, [
1956
- L.menuName !== "首页" ? (o(), c("span", aa, [
1957
- ve(K(L.icon)) ? (o(), D(n(I), {
1981
+ default: S(() => [
1982
+ e("span", ca, [
1983
+ L.menuName !== "首页" ? (o(), c("span", ua, [
1984
+ he(K(L.icon)) ? (o(), A(l(U), {
1958
1985
  key: 0,
1959
1986
  name: K(L.icon),
1960
1987
  size: 16
1961
- }, null, 8, ["name"])) : (o(), c("span", na, x(le(L.menuName)), 1))
1962
- ])) : P("", !0),
1963
- e("span", la, x(L.menuName), 1)
1988
+ }, null, 8, ["name"])) : (o(), c("span", da, x(oe(L.menuName)), 1))
1989
+ ])) : z("", !0),
1990
+ e("span", ma, x(L.menuName), 1)
1964
1991
  ])
1965
1992
  ]),
1966
1993
  _: 2
@@ -1968,97 +1995,97 @@ const _e = ze("menu", () => {
1968
1995
  ]),
1969
1996
  _: 1
1970
1997
  }, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
1971
- e("div", ra, [
1998
+ e("div", pa, [
1972
1999
  e("div", {
1973
2000
  class: "mix-top-menu__search",
1974
2001
  ref_key: "searchRef",
1975
- ref: T
2002
+ ref: F
1976
2003
  }, [
1977
- b(n(I), {
2004
+ w(l(U), {
1978
2005
  name: "search",
1979
2006
  size: 14,
1980
2007
  class: "mix-top-menu__search-icon"
1981
2008
  }),
1982
- Fe(e("input", {
1983
- "onUpdate:modelValue": p[0] || (p[0] = (L) => S.value = L),
2009
+ De(e("input", {
2010
+ "onUpdate:modelValue": v[0] || (v[0] = (L) => E.value = L),
1984
2011
  type: "text",
1985
2012
  class: "mix-top-menu__search-input",
1986
2013
  placeholder: "搜索菜单...",
1987
- onFocus: p[1] || (p[1] = (L) => F.value = !0)
2014
+ onFocus: v[1] || (v[1] = (L) => D.value = !0)
1988
2015
  }, null, 544), [
1989
- [He, S.value]
2016
+ [Ye, E.value]
1990
2017
  ]),
1991
- b($e, { name: "search-dropdown" }, {
1992
- default: M(() => [
1993
- F.value && (g.value.length > 0 || S.value) ? (o(), c("div", ia, [
1994
- g.value.length > 0 ? (o(), c("div", ca, [
1995
- (o(!0), c(W, null, Z(g.value, (L) => (o(), c("div", {
2018
+ w(Se, { name: "search-dropdown" }, {
2019
+ default: S(() => [
2020
+ D.value && (g.value.length > 0 || E.value) ? (o(), c("div", va, [
2021
+ g.value.length > 0 ? (o(), c("div", ha, [
2022
+ (o(!0), c(j, null, J(g.value, (L) => (o(), c("div", {
1996
2023
  key: L.path,
1997
2024
  class: "mix-top-menu__search-item",
1998
- onClick: (et) => ge(L.path)
2025
+ onClick: (tt) => M(L.path)
1999
2026
  }, [
2000
- L.title !== "首页" ? (o(), c("span", da, [
2001
- ve(K(L.icon)) ? (o(), D(n(I), {
2027
+ L.title !== "首页" ? (o(), c("span", fa, [
2028
+ he(K(L.icon)) ? (o(), A(l(U), {
2002
2029
  key: 0,
2003
2030
  name: K(L.icon),
2004
2031
  size: 16
2005
- }, null, 8, ["name"])) : (o(), c("span", ma, x(le(L.title)), 1))
2006
- ])) : P("", !0),
2007
- e("span", pa, x(L.title), 1),
2008
- L.parentTitle ? (o(), c("span", va, x(L.parentTitle), 1)) : P("", !0)
2009
- ], 8, ua))), 128))
2010
- ])) : (o(), c("div", ha, " 未找到匹配的菜单 "))
2011
- ])) : P("", !0)
2032
+ }, null, 8, ["name"])) : (o(), c("span", ga, x(oe(L.title)), 1))
2033
+ ])) : z("", !0),
2034
+ e("span", ya, x(L.title), 1),
2035
+ L.parentTitle ? (o(), c("span", ba, x(L.parentTitle), 1)) : z("", !0)
2036
+ ], 8, _a))), 128))
2037
+ ])) : (o(), c("div", wa, " 未找到匹配的菜单 "))
2038
+ ])) : z("", !0)
2012
2039
  ]),
2013
2040
  _: 1
2014
2041
  })
2015
2042
  ], 512),
2016
2043
  e("div", {
2017
2044
  class: "mix-top-menu__action",
2018
- onClick: Y,
2045
+ onClick: re,
2019
2046
  title: ee.value ? "退出全屏" : "全屏"
2020
2047
  }, [
2021
- b(n(I), {
2048
+ w(l(U), {
2022
2049
  name: ee.value ? "fullscreen-exit" : "fullscreen",
2023
2050
  size: 16
2024
2051
  }, null, 8, ["name"])
2025
- ], 8, _a),
2052
+ ], 8, ka),
2026
2053
  e("div", {
2027
2054
  class: "mix-top-menu__action",
2028
- onClick: ke,
2055
+ onClick: q,
2029
2056
  title: "换肤设置"
2030
2057
  }, [
2031
- b(n(I), {
2058
+ w(l(U), {
2032
2059
  name: "skin",
2033
2060
  size: 16
2034
2061
  })
2035
2062
  ]),
2036
2063
  e("div", {
2037
2064
  class: "mix-top-menu__action",
2038
- onClick: E,
2065
+ onClick: we,
2039
2066
  title: "切换主题"
2040
2067
  }, [
2041
- b(n(I), {
2042
- name: n(i).isDark ? "sun" : "moon",
2068
+ w(l(U), {
2069
+ name: l(i).isDark ? "sun" : "moon",
2043
2070
  size: 16
2044
2071
  }, null, 8, ["name"])
2045
2072
  ]),
2046
2073
  e("div", {
2047
2074
  class: "mix-top-menu__user",
2048
2075
  ref_key: "dropdownRef",
2049
- ref: te
2076
+ ref: G
2050
2077
  }, [
2051
2078
  e("div", {
2052
2079
  class: "mix-top-menu__user-trigger",
2053
- onClick: De(de, ["stop"])
2080
+ onClick: Ae(ge, ["stop"])
2054
2081
  }, [
2055
- e("div", fa, [
2056
- e("span", null, x(((V = n(v).userName) == null ? void 0 : V.charAt(0)) || "U"), 1)
2082
+ e("div", xa, [
2083
+ e("span", null, x(((O = l(h).userName) == null ? void 0 : O.charAt(0)) || "U"), 1)
2057
2084
  ]),
2058
- e("span", ga, x(n(v).userName), 1),
2085
+ e("span", Ca, x(l(h).userName), 1),
2059
2086
  e("span", {
2060
- class: Q(["mix-top-menu__user-arrow", { "is-active": H.value }])
2061
- }, [...p[3] || (p[3] = [
2087
+ class: Z(["mix-top-menu__user-arrow", { "is-active": Q.value }])
2088
+ }, [...v[3] || (v[3] = [
2062
2089
  e("svg", {
2063
2090
  viewBox: "0 0 12 12",
2064
2091
  width: "10",
@@ -2073,89 +2100,89 @@ const _e = ze("menu", () => {
2073
2100
  ], -1)
2074
2101
  ])], 2)
2075
2102
  ]),
2076
- b($e, { name: "dropdown" }, {
2077
- default: M(() => {
2103
+ w(Se, { name: "dropdown" }, {
2104
+ default: S(() => {
2078
2105
  var L;
2079
2106
  return [
2080
- H.value ? (o(), c("div", ya, [
2081
- e("div", ba, [
2082
- e("div", ka, [
2083
- e("span", null, x(((L = n(v).userName) == null ? void 0 : L.charAt(0)) || "U"), 1)
2107
+ Q.value ? (o(), c("div", $a, [
2108
+ e("div", La, [
2109
+ e("div", Ma, [
2110
+ e("span", null, x(((L = l(h).userName) == null ? void 0 : L.charAt(0)) || "U"), 1)
2084
2111
  ]),
2085
- e("div", wa, [
2086
- e("div", xa, x(n(v).userName), 1),
2087
- e("div", Ca, x(n(v).departmentName), 1)
2112
+ e("div", Sa, [
2113
+ e("div", Na, x(l(h).userName), 1),
2114
+ e("div", Ea, x(l(h).departmentName), 1)
2088
2115
  ])
2089
2116
  ]),
2090
- p[8] || (p[8] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2091
- e("div", $a, [
2117
+ v[8] || (v[8] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2118
+ e("div", Ia, [
2092
2119
  e("div", {
2093
2120
  class: "mix-top-menu__dropdown-item",
2094
- onClick: $
2121
+ onClick: se
2095
2122
  }, [
2096
- b(n(I), {
2123
+ w(l(U), {
2097
2124
  name: "user",
2098
2125
  size: 16
2099
2126
  }),
2100
- p[4] || (p[4] = e("span", null, "个人信息", -1))
2127
+ v[4] || (v[4] = e("span", null, "个人信息", -1))
2101
2128
  ]),
2102
2129
  e("div", {
2103
2130
  class: "mix-top-menu__dropdown-item",
2104
- onClick: pe
2131
+ onClick: $
2105
2132
  }, [
2106
- b(n(I), {
2133
+ w(l(U), {
2107
2134
  name: "lock",
2108
2135
  size: 16
2109
2136
  }),
2110
- p[5] || (p[5] = e("span", null, "修改密码", -1))
2137
+ v[5] || (v[5] = e("span", null, "修改密码", -1))
2111
2138
  ]),
2112
- p[7] || (p[7] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2139
+ v[7] || (v[7] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2113
2140
  e("div", {
2114
2141
  class: "mix-top-menu__dropdown-item mix-top-menu__dropdown-item--danger",
2115
- onClick: U
2142
+ onClick: N
2116
2143
  }, [
2117
- b(n(I), {
2144
+ w(l(U), {
2118
2145
  name: "logout",
2119
2146
  size: 16
2120
2147
  }),
2121
- p[6] || (p[6] = e("span", null, "退出登录", -1))
2148
+ v[6] || (v[6] = e("span", null, "退出登录", -1))
2122
2149
  ])
2123
2150
  ])
2124
- ])) : P("", !0)
2151
+ ])) : z("", !0)
2125
2152
  ];
2126
2153
  }),
2127
2154
  _: 1
2128
2155
  })
2129
2156
  ], 512)
2130
2157
  ]),
2131
- b(n(Ze), {
2132
- modelValue: X.value,
2133
- "onUpdate:modelValue": p[2] || (p[2] = (L) => X.value = L),
2158
+ w(l(Qe), {
2159
+ modelValue: Y.value,
2160
+ "onUpdate:modelValue": v[2] || (v[2] = (L) => Y.value = L),
2134
2161
  title: "换肤设置",
2135
2162
  direction: "rtl",
2136
2163
  size: "320px"
2137
2164
  }, {
2138
- default: M(() => [
2139
- e("div", La, [
2140
- e("div", Ma, [
2141
- p[12] || (p[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
2142
- e("div", Sa, [
2143
- (o(), c(W, null, Z(we, (L) => e("div", {
2165
+ default: S(() => [
2166
+ e("div", Ua, [
2167
+ e("div", Ta, [
2168
+ v[12] || (v[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
2169
+ e("div", Pa, [
2170
+ (o(), c(j, null, J(ke, (L) => e("div", {
2144
2171
  key: L.value,
2145
- class: Q(["layout-option", { "is-active": xe.value === L.value }]),
2146
- onClick: (et) => z(L.value)
2172
+ class: Z(["layout-option", { "is-active": ye.value === L.value }]),
2173
+ onClick: (tt) => xe(L.value)
2147
2174
  }, [
2148
- e("div", Ia, [
2149
- L.value === "sidebar" ? (o(), c("div", Ea, [...p[9] || (p[9] = [
2175
+ e("div", Fa, [
2176
+ L.value === "sidebar" ? (o(), c("div", Da, [...v[9] || (v[9] = [
2150
2177
  e("div", { class: "preview-aside" }, null, -1),
2151
2178
  e("div", { class: "preview-main" }, [
2152
2179
  e("div", { class: "preview-header" }),
2153
2180
  e("div", { class: "preview-content" })
2154
2181
  ], -1)
2155
- ])])) : L.value === "top" ? (o(), c("div", Ua, [...p[10] || (p[10] = [
2182
+ ])])) : L.value === "top" ? (o(), c("div", Aa, [...v[10] || (v[10] = [
2156
2183
  e("div", { class: "preview-header-full" }, null, -1),
2157
2184
  e("div", { class: "preview-content-full" }, null, -1)
2158
- ])])) : (o(), c("div", za, [...p[11] || (p[11] = [
2185
+ ])])) : (o(), c("div", Ba, [...v[11] || (v[11] = [
2159
2186
  e("div", { class: "preview-header-mix" }, [
2160
2187
  e("div", { class: "preview-mix-left" })
2161
2188
  ], -1),
@@ -2165,47 +2192,47 @@ const _e = ze("menu", () => {
2165
2192
  ], -1)
2166
2193
  ])]))
2167
2194
  ]),
2168
- e("span", Pa, x(L.label), 1)
2169
- ], 10, Na)), 64))
2195
+ e("span", Va, x(L.label), 1)
2196
+ ], 10, za)), 64))
2170
2197
  ])
2171
2198
  ]),
2172
- e("div", Ta, [
2173
- p[13] || (p[13] = e("div", { class: "settings-title" }, "主题色", -1)),
2174
- e("div", Fa, [
2175
- (o(), c(W, null, Z(w, (L) => e("div", {
2199
+ e("div", Oa, [
2200
+ v[13] || (v[13] = e("div", { class: "settings-title" }, "主题色", -1)),
2201
+ e("div", Ra, [
2202
+ (o(), c(j, null, J(I, (L) => e("div", {
2176
2203
  key: L.value,
2177
- class: Q(["color-option", { "is-active": n(i).primaryColor === L.value }]),
2178
- style: Ie({ backgroundColor: L.value }),
2204
+ class: Z(["color-option", { "is-active": l(i).primaryColor === L.value }]),
2205
+ style: Ue({ backgroundColor: L.value }),
2179
2206
  title: L.label,
2180
- onClick: (et) => oe(L.value)
2207
+ onClick: (tt) => b(L.value)
2181
2208
  }, [
2182
- n(i).primaryColor === L.value ? (o(), D(n(I), {
2209
+ l(i).primaryColor === L.value ? (o(), A(l(U), {
2183
2210
  key: 0,
2184
2211
  name: "check",
2185
2212
  size: 12,
2186
2213
  color: "#fff"
2187
- })) : P("", !0)
2188
- ], 14, Da)), 64))
2214
+ })) : z("", !0)
2215
+ ], 14, Ka)), 64))
2189
2216
  ])
2190
2217
  ]),
2191
- e("div", Aa, [
2192
- p[18] || (p[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
2193
- e("div", Ba, [
2194
- e("div", Va, [
2195
- p[15] || (p[15] = e("span", null, "灰色模式", -1)),
2218
+ e("div", ja, [
2219
+ v[18] || (v[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
2220
+ e("div", Wa, [
2221
+ e("div", qa, [
2222
+ v[15] || (v[15] = e("span", null, "灰色模式", -1)),
2196
2223
  e("div", {
2197
- class: Q(["switch-wrapper", { "is-checked": se.value }]),
2198
- onClick: ye
2199
- }, [...p[14] || (p[14] = [
2224
+ class: Z(["switch-wrapper", { "is-checked": te.value }]),
2225
+ onClick: ve
2226
+ }, [...v[14] || (v[14] = [
2200
2227
  e("span", { class: "switch-core" }, null, -1)
2201
2228
  ])], 2)
2202
2229
  ]),
2203
- e("div", Oa, [
2204
- p[17] || (p[17] = e("span", null, "暗黑模式", -1)),
2230
+ e("div", Ha, [
2231
+ v[17] || (v[17] = e("span", null, "暗黑模式", -1)),
2205
2232
  e("div", {
2206
- class: Q(["switch-wrapper", { "is-checked": n(i).isDark }]),
2207
- onClick: Se
2208
- }, [...p[16] || (p[16] = [
2233
+ class: Z(["switch-wrapper", { "is-checked": l(i).isDark }]),
2234
+ onClick: ne
2235
+ }, [...v[16] || (v[16] = [
2209
2236
  e("span", { class: "switch-core" }, null, -1)
2210
2237
  ])], 2)
2211
2238
  ])
@@ -2218,130 +2245,130 @@ const _e = ze("menu", () => {
2218
2245
  ]);
2219
2246
  };
2220
2247
  }
2221
- }), Ka = /* @__PURE__ */ ue(Ra, [["__scopeId", "data-v-ec17777f"]]), ja = {
2248
+ }), Ga = /* @__PURE__ */ de(Ya, [["__scopeId", "data-v-ec17777f"]]), Xa = {
2222
2249
  key: 0,
2223
2250
  class: "layout layout--sidebar"
2224
- }, Wa = { class: "layout__main" }, qa = { class: "layout__header" }, Ha = { class: "layout__content" }, Ya = {
2251
+ }, Ja = { class: "layout__main" }, Za = { class: "layout__header" }, Qa = { class: "layout__content" }, en = {
2225
2252
  key: 1,
2226
2253
  class: "layout layout--top"
2227
- }, Ga = { class: "layout__top-menu" }, Xa = { class: "layout__main" }, Ja = { class: "layout__content" }, Za = {
2254
+ }, tn = { class: "layout__top-menu" }, sn = { class: "layout__main" }, on = { class: "layout__content" }, an = {
2228
2255
  key: 2,
2229
2256
  class: "layout layout--mix"
2230
- }, Qa = { class: "layout__mix-top-menu" }, en = { class: "layout__mix-body" }, tn = { class: "layout__content" }, sn = /* @__PURE__ */ ie({
2257
+ }, nn = { class: "layout__mix-top-menu" }, ln = { class: "layout__mix-body" }, rn = { class: "layout__content" }, cn = /* @__PURE__ */ ce({
2231
2258
  __name: "index",
2232
2259
  props: {
2233
2260
  logoSrc: {}
2234
2261
  },
2235
2262
  setup(t) {
2236
- const l = t, d = k(() => l.logoSrc || Ue("/vite.svg")), s = he(), a = _e(), h = k(
2237
- () => s.isCollapsed ? "64px" : "210px"
2238
- ), i = k(() => s.layout), v = k(() => i.value === "mix"), m = k(() => i.value === "sidebar" ? a.menuList : i.value === "mix" ? s.mixSubMenus : []), f = k(() => v.value ? m.value.length > 0 : !1);
2263
+ const n = t, m = k(() => n.logoSrc || Te("/vite.svg")), a = _e(), s = fe(), p = k(
2264
+ () => a.isCollapsed ? "64px" : "210px"
2265
+ ), i = k(() => a.layout), h = k(() => i.value === "mix"), d = k(() => i.value === "sidebar" ? s.menuList : i.value === "mix" ? a.mixSubMenus : []), f = k(() => h.value ? d.value.length > 0 : !1);
2239
2266
  return (_, g) => {
2240
- const u = ut("router-view");
2241
- return o(), c(W, null, [
2242
- i.value === "sidebar" ? (o(), c("div", ja, [
2267
+ const u = mt("router-view");
2268
+ return o(), c(j, null, [
2269
+ i.value === "sidebar" ? (o(), c("div", Xa, [
2243
2270
  e("aside", {
2244
2271
  class: "layout__aside",
2245
- style: Ie({ width: h.value })
2272
+ style: Ue({ width: p.value })
2246
2273
  }, [
2247
- b(at, {
2248
- "menu-list": m.value,
2274
+ w(lt, {
2275
+ "menu-list": d.value,
2249
2276
  "show-logo": !0,
2250
2277
  "show-user": !0,
2251
- "logo-src": d.value
2278
+ "logo-src": m.value
2252
2279
  }, null, 8, ["menu-list", "logo-src"])
2253
2280
  ], 4),
2254
- e("div", Wa, [
2255
- e("header", qa, [
2256
- b(js)
2281
+ e("div", Ja, [
2282
+ e("header", Za, [
2283
+ w(Xs)
2257
2284
  ]),
2258
- e("main", Ha, [
2259
- b(u)
2285
+ e("main", Qa, [
2286
+ w(u)
2260
2287
  ])
2261
2288
  ])
2262
- ])) : P("", !0),
2263
- i.value === "top" ? (o(), c("div", Ya, [
2264
- e("div", Ga, [
2265
- b(Zo, { "logo-src": d.value }, null, 8, ["logo-src"])
2289
+ ])) : z("", !0),
2290
+ i.value === "top" ? (o(), c("div", en, [
2291
+ e("div", tn, [
2292
+ w(aa, { "logo-src": m.value }, null, 8, ["logo-src"])
2266
2293
  ]),
2267
- e("div", Xa, [
2268
- e("main", Ja, [
2269
- b(u)
2294
+ e("div", sn, [
2295
+ e("main", on, [
2296
+ w(u)
2270
2297
  ])
2271
2298
  ])
2272
- ])) : P("", !0),
2273
- i.value === "mix" ? (o(), c("div", Za, [
2274
- e("div", Qa, [
2275
- b(Ka, { "logo-src": d.value }, null, 8, ["logo-src"])
2299
+ ])) : z("", !0),
2300
+ i.value === "mix" ? (o(), c("div", an, [
2301
+ e("div", nn, [
2302
+ w(Ga, { "logo-src": m.value }, null, 8, ["logo-src"])
2276
2303
  ]),
2277
- e("div", en, [
2304
+ e("div", ln, [
2278
2305
  f.value ? (o(), c("aside", {
2279
2306
  key: 0,
2280
2307
  class: "layout__aside",
2281
- style: Ie({ width: h.value })
2308
+ style: Ue({ width: p.value })
2282
2309
  }, [
2283
- b(at, {
2284
- "menu-list": m.value,
2310
+ w(lt, {
2311
+ "menu-list": d.value,
2285
2312
  "show-logo": !1,
2286
2313
  "show-user": !1
2287
2314
  }, null, 8, ["menu-list"])
2288
- ], 4)) : P("", !0),
2289
- e("main", tn, [
2290
- b(u)
2315
+ ], 4)) : z("", !0),
2316
+ e("main", rn, [
2317
+ w(u)
2291
2318
  ])
2292
2319
  ])
2293
- ])) : P("", !0)
2320
+ ])) : z("", !0)
2294
2321
  ], 64);
2295
2322
  };
2296
2323
  }
2297
- }), mt = /* @__PURE__ */ ue(sn, [["__scopeId", "data-v-4e5f3bf5"]]), on = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2324
+ }), vt = /* @__PURE__ */ de(cn, [["__scopeId", "data-v-4e5f3bf5"]]), un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2298
2325
  __proto__: null,
2299
- default: mt
2300
- }, Symbol.toStringTag, { value: "Module" })), an = { class: "tabs-wrapper" }, nn = { class: "tab-label" }, ln = ["onClick"], rn = /* @__PURE__ */ ie({
2326
+ default: vt
2327
+ }, Symbol.toStringTag, { value: "Module" })), dn = { class: "tabs-wrapper" }, mn = { class: "tab-label" }, pn = ["onClick"], vn = /* @__PURE__ */ ce({
2301
2328
  __name: "Tabs",
2302
2329
  setup(t) {
2303
- const l = Me(), d = fe(), s = k(() => {
2304
- const v = [];
2305
- return l.matched.forEach((m) => {
2330
+ const n = Ee(), m = be(), a = k(() => {
2331
+ const h = [];
2332
+ return n.matched.forEach((d) => {
2306
2333
  var f;
2307
- (f = m.meta) != null && f.affix && v.push({
2308
- name: m.name,
2309
- title: m.meta.title,
2310
- path: m.path,
2334
+ (f = d.meta) != null && f.affix && h.push({
2335
+ name: d.name,
2336
+ title: d.meta.title,
2337
+ path: d.path,
2311
2338
  affix: !0
2312
2339
  });
2313
- }), v;
2314
- }), a = k(() => l.path), h = (v) => {
2315
- d.push(v);
2316
- }, i = (v) => {
2317
- const m = s.value.find((f) => f.path === v);
2318
- if (!(m != null && m.affix) && v === a.value) {
2319
- const f = s.value.findIndex((g) => g.path === v), _ = s.value[f - 1] || s.value[f + 1];
2320
- _ && d.push(_.path);
2340
+ }), h;
2341
+ }), s = k(() => n.path), p = (h) => {
2342
+ m.push(h);
2343
+ }, i = (h) => {
2344
+ const d = a.value.find((f) => f.path === h);
2345
+ if (!(d != null && d.affix) && h === s.value) {
2346
+ const f = a.value.findIndex((g) => g.path === h), _ = a.value[f - 1] || a.value[f + 1];
2347
+ _ && m.push(_.path);
2321
2348
  }
2322
2349
  };
2323
- return (v, m) => (o(), c("div", an, [
2324
- b(n(Mt), {
2325
- modelValue: a.value,
2326
- "onUpdate:modelValue": m[0] || (m[0] = (f) => a.value = f),
2350
+ return (h, d) => (o(), c("div", dn, [
2351
+ w(l(It), {
2352
+ modelValue: s.value,
2353
+ "onUpdate:modelValue": d[0] || (d[0] = (f) => s.value = f),
2327
2354
  type: "card",
2328
- onTabClick: h
2355
+ onTabClick: p
2329
2356
  }, {
2330
- default: M(() => [
2331
- (o(!0), c(W, null, Z(s.value, (f) => (o(), D(n(St), {
2357
+ default: S(() => [
2358
+ (o(!0), c(j, null, J(a.value, (f) => (o(), A(l(Ut), {
2332
2359
  key: f.path,
2333
2360
  name: f.path,
2334
2361
  label: f.title,
2335
2362
  closable: !f.affix
2336
2363
  }, {
2337
- label: M(() => [
2338
- e("span", nn, [
2339
- be(x(f.title) + " ", 1),
2340
- f.affix ? P("", !0) : (o(), c("span", {
2364
+ label: S(() => [
2365
+ e("span", mn, [
2366
+ Ce(x(f.title) + " ", 1),
2367
+ f.affix ? z("", !0) : (o(), c("span", {
2341
2368
  key: 0,
2342
2369
  class: "tab-close",
2343
- onClick: De((_) => i(f.path), ["stop"])
2344
- }, " ✕ ", 8, ln))
2370
+ onClick: Ae((_) => i(f.path), ["stop"])
2371
+ }, " ✕ ", 8, pn))
2345
2372
  ])
2346
2373
  ]),
2347
2374
  _: 2
@@ -2351,16 +2378,16 @@ const _e = ze("menu", () => {
2351
2378
  }, 8, ["modelValue"])
2352
2379
  ]));
2353
2380
  }
2354
- }), Jn = /* @__PURE__ */ ue(rn, [["__scopeId", "data-v-0a4ca30d"]]), cn = {}, un = { class: "footer" };
2355
- function dn(t, l) {
2356
- return o(), c("div", un, [...l[0] || (l[0] = [
2381
+ }), ol = /* @__PURE__ */ de(vn, [["__scopeId", "data-v-0a4ca30d"]]), hn = {}, _n = { class: "footer" };
2382
+ function fn(t, n) {
2383
+ return o(), c("div", _n, [...n[0] || (n[0] = [
2357
2384
  e("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
2358
2385
  ])]);
2359
2386
  }
2360
- const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e349"]]), mn = { class: "login-page" }, pn = { class: "login-form-section" }, vn = { class: "form-container" }, hn = { class: "input-wrapper" }, _n = { class: "input-wrapper" }, fn = { class: "form-options" }, gn = { key: 0 }, yn = { key: 1 }, bn = /* @__PURE__ */ ie({
2387
+ const al = /* @__PURE__ */ de(hn, [["render", fn], ["__scopeId", "data-v-ac63e349"]]), gn = { class: "login-page" }, yn = { class: "login-form-section" }, bn = { class: "form-container" }, wn = { class: "input-wrapper" }, kn = { class: "input-wrapper" }, xn = { class: "form-options" }, Cn = { key: 0 }, $n = { key: 1 }, Ln = /* @__PURE__ */ ce({
2361
2388
  __name: "index",
2362
2389
  setup(t) {
2363
- const l = fe(), d = Me(), s = y(!1), a = y(!1), h = Ye({
2390
+ const n = be(), m = Ee(), a = y(!1), s = y(!1), p = Ge({
2364
2391
  uid: "",
2365
2392
  password: ""
2366
2393
  }), i = {
@@ -2371,55 +2398,55 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2371
2398
  { required: !0, message: "请输入密码", trigger: "blur" },
2372
2399
  { min: 6, message: "密码长度至少6位", trigger: "blur" }
2373
2400
  ]
2374
- }, v = y(), m = async () => {
2401
+ }, h = y(), d = async () => {
2375
2402
  var f;
2376
2403
  try {
2377
- await ((f = v.value) == null ? void 0 : f.validate()), s.value = !0;
2378
- const _ = await ft({
2379
- appId: Ee(),
2380
- clientId: ct(),
2381
- uid: h.uid,
2382
- password: h.password,
2404
+ await ((f = h.value) == null ? void 0 : f.validate()), a.value = !0;
2405
+ const _ = await yt({
2406
+ appId: Me(),
2407
+ clientId: dt(),
2408
+ uid: p.uid,
2409
+ password: p.password,
2383
2410
  code: !0
2384
2411
  });
2385
- it(_), Nt.success("登录成功");
2386
- const g = d.query.redirect;
2387
- g ? l.push(g) : l.push({ name: "Dashboard" });
2412
+ ut(_), Tt.success("登录成功");
2413
+ const g = m.query.redirect;
2414
+ g ? n.push(g) : n.push({ name: "Dashboard" });
2388
2415
  } catch (_) {
2389
2416
  console.error("登录失败:", _);
2390
2417
  } finally {
2391
- s.value = !1;
2418
+ a.value = !1;
2392
2419
  }
2393
2420
  };
2394
- return (f, _) => (o(), c("div", mn, [
2395
- _[10] || (_[10] = Te('<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)),
2396
- e("div", pn, [
2397
- e("div", vn, [
2421
+ return (f, _) => (o(), c("div", gn, [
2422
+ _[10] || (_[10] = Fe('<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)),
2423
+ e("div", yn, [
2424
+ e("div", bn, [
2398
2425
  _[7] || (_[7] = e("div", { class: "form-header" }, [
2399
2426
  e("h2", null, "欢迎登录"),
2400
2427
  e("p", null, "请输入您的账户信息")
2401
2428
  ], -1)),
2402
- b(n(It), {
2429
+ w(l(Pt), {
2403
2430
  ref_key: "formRef",
2404
- ref: v,
2405
- model: h,
2431
+ ref: h,
2432
+ model: p,
2406
2433
  rules: i,
2407
2434
  class: "login-form",
2408
2435
  "label-width": "0"
2409
2436
  }, {
2410
- default: M(() => [
2411
- b(n(Ae), { prop: "uid" }, {
2412
- default: M(() => [
2413
- e("div", hn, [
2437
+ default: S(() => [
2438
+ w(l(Be), { prop: "uid" }, {
2439
+ default: S(() => [
2440
+ e("div", wn, [
2414
2441
  _[3] || (_[3] = e("label", { class: "input-label" }, "用户名", -1)),
2415
- b(n(ot), {
2416
- modelValue: h.uid,
2417
- "onUpdate:modelValue": _[0] || (_[0] = (g) => h.uid = g),
2442
+ w(l(nt), {
2443
+ modelValue: p.uid,
2444
+ "onUpdate:modelValue": _[0] || (_[0] = (g) => p.uid = g),
2418
2445
  placeholder: "请输入用户名",
2419
2446
  size: "large"
2420
2447
  }, {
2421
- prefix: M(() => [
2422
- b(n(I), {
2448
+ prefix: S(() => [
2449
+ w(l(U), {
2423
2450
  name: "user",
2424
2451
  size: 18
2425
2452
  })
@@ -2430,21 +2457,21 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2430
2457
  ]),
2431
2458
  _: 1
2432
2459
  }),
2433
- b(n(Ae), { prop: "password" }, {
2434
- default: M(() => [
2435
- e("div", _n, [
2460
+ w(l(Be), { prop: "password" }, {
2461
+ default: S(() => [
2462
+ e("div", kn, [
2436
2463
  _[4] || (_[4] = e("label", { class: "input-label" }, "密码", -1)),
2437
- b(n(ot), {
2438
- modelValue: h.password,
2439
- "onUpdate:modelValue": _[1] || (_[1] = (g) => h.password = g),
2464
+ w(l(nt), {
2465
+ modelValue: p.password,
2466
+ "onUpdate:modelValue": _[1] || (_[1] = (g) => p.password = g),
2440
2467
  type: "password",
2441
2468
  placeholder: "请输入密码",
2442
2469
  size: "large",
2443
2470
  "show-password": "",
2444
- onKeyup: $t(m, ["enter"])
2471
+ onKeyup: Nt(d, ["enter"])
2445
2472
  }, {
2446
- prefix: M(() => [
2447
- b(n(I), {
2473
+ prefix: S(() => [
2474
+ w(l(U), {
2448
2475
  name: "lock",
2449
2476
  size: 18
2450
2477
  })
@@ -2455,13 +2482,13 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2455
2482
  ]),
2456
2483
  _: 1
2457
2484
  }),
2458
- e("div", fn, [
2459
- b(n(Et), {
2460
- modelValue: a.value,
2461
- "onUpdate:modelValue": _[2] || (_[2] = (g) => a.value = g)
2485
+ e("div", xn, [
2486
+ w(l(zt), {
2487
+ modelValue: s.value,
2488
+ "onUpdate:modelValue": _[2] || (_[2] = (g) => s.value = g)
2462
2489
  }, {
2463
- default: M(() => [..._[5] || (_[5] = [
2464
- be("记住我", -1)
2490
+ default: S(() => [..._[5] || (_[5] = [
2491
+ Ce("记住我", -1)
2465
2492
  ])]),
2466
2493
  _: 1
2467
2494
  }, 8, ["modelValue"]),
@@ -2470,17 +2497,17 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2470
2497
  class: "forgot-link"
2471
2498
  }, "忘记密码?", -1))
2472
2499
  ]),
2473
- b(n(Ae), null, {
2474
- default: M(() => [
2475
- b(n(Le), {
2500
+ w(l(Be), null, {
2501
+ default: S(() => [
2502
+ w(l(Ne), {
2476
2503
  type: "primary",
2477
2504
  size: "large",
2478
- loading: s.value,
2505
+ loading: a.value,
2479
2506
  class: "login-btn",
2480
- onClick: m
2507
+ onClick: d
2481
2508
  }, {
2482
- default: M(() => [
2483
- s.value ? (o(), c("span", yn, "登录中...")) : (o(), c("span", gn, "登 录"))
2509
+ default: S(() => [
2510
+ a.value ? (o(), c("span", $n, "登录中...")) : (o(), c("span", Cn, "登 录"))
2484
2511
  ]),
2485
2512
  _: 1
2486
2513
  }, 8, ["loading"])
@@ -2490,7 +2517,7 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2490
2517
  ]),
2491
2518
  _: 1
2492
2519
  }, 8, ["model"]),
2493
- _[8] || (_[8] = Te('<div class="form-footer" data-v-20b19b53><p data-v-20b19b53>其他登录方式</p><div class="social-login" data-v-20b19b53><button class="social-btn" title="企业微信" data-v-20b19b53><svg viewBox="0 0 24 24" fill="currentColor" data-v-20b19b53><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" data-v-20b19b53></path></svg></button><button class="social-btn" title="钉钉" data-v-20b19b53><svg viewBox="0 0 24 24" fill="currentColor" data-v-20b19b53><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z" data-v-20b19b53></path></svg></button><button class="social-btn" title="飞书" data-v-20b19b53><svg viewBox="0 0 24 24" fill="currentColor" data-v-20b19b53><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" data-v-20b19b53></path></svg></button></div></div>', 1))
2520
+ _[8] || (_[8] = Fe('<div class="form-footer" data-v-20b19b53><p data-v-20b19b53>其他登录方式</p><div class="social-login" data-v-20b19b53><button class="social-btn" title="企业微信" data-v-20b19b53><svg viewBox="0 0 24 24" fill="currentColor" data-v-20b19b53><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" data-v-20b19b53></path></svg></button><button class="social-btn" title="钉钉" data-v-20b19b53><svg viewBox="0 0 24 24" fill="currentColor" data-v-20b19b53><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z" data-v-20b19b53></path></svg></button><button class="social-btn" title="飞书" data-v-20b19b53><svg viewBox="0 0 24 24" fill="currentColor" data-v-20b19b53><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" data-v-20b19b53></path></svg></button></div></div>', 1))
2494
2521
  ]),
2495
2522
  _[9] || (_[9] = e("div", { class: "copyright" }, [
2496
2523
  e("p", null, "© 2024 XTO Team. All rights reserved.")
@@ -2498,31 +2525,31 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2498
2525
  ])
2499
2526
  ]));
2500
2527
  }
2501
- }), kn = /* @__PURE__ */ ue(bn, [["__scopeId", "data-v-20b19b53"]]), wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2528
+ }), Mn = /* @__PURE__ */ de(Ln, [["__scopeId", "data-v-20b19b53"]]), Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2502
2529
  __proto__: null,
2503
- default: kn
2504
- }, Symbol.toStringTag, { value: "Module" })), xn = { class: "error-page" }, Cn = { class: "error-container" }, $n = { class: "error-content" }, Ln = { class: "error-actions" }, Mn = /* @__PURE__ */ ie({
2530
+ default: Mn
2531
+ }, Symbol.toStringTag, { value: "Module" })), Nn = { class: "error-page" }, En = { class: "error-container" }, In = { class: "error-content" }, Un = { class: "error-actions" }, Tn = /* @__PURE__ */ ce({
2505
2532
  __name: "404",
2506
2533
  setup(t) {
2507
- const l = fe(), d = () => {
2508
- l.push("/");
2534
+ const n = be(), m = () => {
2535
+ n.push("/");
2509
2536
  };
2510
- return (s, a) => (o(), c("div", xn, [
2511
- e("div", Cn, [
2512
- a[7] || (a[7] = e("div", { class: "error-bg" }, [
2537
+ return (a, s) => (o(), c("div", Nn, [
2538
+ e("div", En, [
2539
+ s[7] || (s[7] = e("div", { class: "error-bg" }, [
2513
2540
  e("div", { class: "bg-circle circle-1" }),
2514
2541
  e("div", { class: "bg-circle circle-2" }),
2515
2542
  e("div", { class: "bg-circle circle-3" })
2516
2543
  ], -1)),
2517
- e("div", $n, [
2518
- a[5] || (a[5] = Te('<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)),
2519
- e("div", Ln, [
2520
- b(n(Le), {
2544
+ e("div", In, [
2545
+ s[5] || (s[5] = Fe('<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)),
2546
+ e("div", Un, [
2547
+ w(l(Ne), {
2521
2548
  type: "primary",
2522
2549
  size: "large",
2523
- onClick: d
2550
+ onClick: m
2524
2551
  }, {
2525
- icon: M(() => [...a[1] || (a[1] = [
2552
+ icon: S(() => [...s[1] || (s[1] = [
2526
2553
  e("svg", {
2527
2554
  viewBox: "0 0 24 24",
2528
2555
  fill: "none",
@@ -2533,16 +2560,16 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2533
2560
  e("polyline", { points: "9,22 9,12 15,12 15,22" })
2534
2561
  ], -1)
2535
2562
  ])]),
2536
- default: M(() => [
2537
- a[2] || (a[2] = be(" 返回首页 ", -1))
2563
+ default: S(() => [
2564
+ s[2] || (s[2] = Ce(" 返回首页 ", -1))
2538
2565
  ]),
2539
2566
  _: 1
2540
2567
  }),
2541
- b(n(Le), {
2568
+ w(l(Ne), {
2542
2569
  size: "large",
2543
- onClick: a[0] || (a[0] = (h) => n(l).go(-1))
2570
+ onClick: s[0] || (s[0] = (p) => l(n).go(-1))
2544
2571
  }, {
2545
- icon: M(() => [...a[3] || (a[3] = [
2572
+ icon: S(() => [...s[3] || (s[3] = [
2546
2573
  e("svg", {
2547
2574
  viewBox: "0 0 24 24",
2548
2575
  fill: "none",
@@ -2552,13 +2579,13 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2552
2579
  e("path", { d: "M19 12H5M12 19l-7-7 7-7" })
2553
2580
  ], -1)
2554
2581
  ])]),
2555
- default: M(() => [
2556
- a[4] || (a[4] = be(" 返回上一页 ", -1))
2582
+ default: S(() => [
2583
+ s[4] || (s[4] = Ce(" 返回上一页 ", -1))
2557
2584
  ]),
2558
2585
  _: 1
2559
2586
  })
2560
2587
  ]),
2561
- a[6] || (a[6] = e("div", { class: "error-tip" }, [
2588
+ s[6] || (s[6] = e("div", { class: "error-tip" }, [
2562
2589
  e("p", null, "您可以尝试:"),
2563
2590
  e("ul", null, [
2564
2591
  e("li", null, "检查您输入的网址是否正确"),
@@ -2570,31 +2597,31 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2570
2597
  ])
2571
2598
  ]));
2572
2599
  }
2573
- }), Sn = /* @__PURE__ */ ue(Mn, [["__scopeId", "data-v-c36cc0ad"]]), pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2600
+ }), Pn = /* @__PURE__ */ de(Tn, [["__scopeId", "data-v-c36cc0ad"]]), ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2574
2601
  __proto__: null,
2575
- default: Sn
2576
- }, Symbol.toStringTag, { value: "Module" })), Nn = { class: "error-page" }, In = { class: "error-container" }, En = { class: "error-content" }, Un = { class: "error-actions" }, zn = /* @__PURE__ */ ie({
2602
+ default: Pn
2603
+ }, Symbol.toStringTag, { value: "Module" })), zn = { class: "error-page" }, Fn = { class: "error-container" }, Dn = { class: "error-content" }, An = { class: "error-actions" }, Bn = /* @__PURE__ */ ce({
2577
2604
  __name: "403",
2578
2605
  setup(t) {
2579
- const l = fe(), d = () => {
2580
- l.push("/");
2606
+ const n = be(), m = () => {
2607
+ n.push("/");
2581
2608
  };
2582
- return (s, a) => (o(), c("div", Nn, [
2583
- e("div", In, [
2584
- a[7] || (a[7] = e("div", { class: "error-bg" }, [
2609
+ return (a, s) => (o(), c("div", zn, [
2610
+ e("div", Fn, [
2611
+ s[7] || (s[7] = e("div", { class: "error-bg" }, [
2585
2612
  e("div", { class: "bg-circle circle-1" }),
2586
2613
  e("div", { class: "bg-circle circle-2" }),
2587
2614
  e("div", { class: "bg-circle circle-3" })
2588
2615
  ], -1)),
2589
- e("div", En, [
2590
- a[5] || (a[5] = Te('<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)),
2591
- e("div", Un, [
2592
- b(n(Le), {
2616
+ e("div", Dn, [
2617
+ s[5] || (s[5] = Fe('<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)),
2618
+ e("div", An, [
2619
+ w(l(Ne), {
2593
2620
  type: "primary",
2594
2621
  size: "large",
2595
- onClick: d
2622
+ onClick: m
2596
2623
  }, {
2597
- icon: M(() => [...a[1] || (a[1] = [
2624
+ icon: S(() => [...s[1] || (s[1] = [
2598
2625
  e("svg", {
2599
2626
  viewBox: "0 0 24 24",
2600
2627
  fill: "none",
@@ -2605,16 +2632,16 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2605
2632
  e("polyline", { points: "9,22 9,12 15,12 15,22" })
2606
2633
  ], -1)
2607
2634
  ])]),
2608
- default: M(() => [
2609
- a[2] || (a[2] = be(" 返回首页 ", -1))
2635
+ default: S(() => [
2636
+ s[2] || (s[2] = Ce(" 返回首页 ", -1))
2610
2637
  ]),
2611
2638
  _: 1
2612
2639
  }),
2613
- b(n(Le), {
2640
+ w(l(Ne), {
2614
2641
  size: "large",
2615
- onClick: a[0] || (a[0] = (h) => n(l).go(-1))
2642
+ onClick: s[0] || (s[0] = (p) => l(n).go(-1))
2616
2643
  }, {
2617
- icon: M(() => [...a[3] || (a[3] = [
2644
+ icon: S(() => [...s[3] || (s[3] = [
2618
2645
  e("svg", {
2619
2646
  viewBox: "0 0 24 24",
2620
2647
  fill: "none",
@@ -2624,13 +2651,13 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2624
2651
  e("path", { d: "M19 12H5M12 19l-7-7 7-7" })
2625
2652
  ], -1)
2626
2653
  ])]),
2627
- default: M(() => [
2628
- a[4] || (a[4] = be(" 返回上一页 ", -1))
2654
+ default: S(() => [
2655
+ s[4] || (s[4] = Ce(" 返回上一页 ", -1))
2629
2656
  ]),
2630
2657
  _: 1
2631
2658
  })
2632
2659
  ]),
2633
- a[6] || (a[6] = e("div", { class: "error-tip" }, [
2660
+ s[6] || (s[6] = e("div", { class: "error-tip" }, [
2634
2661
  e("p", null, "可能的原因:"),
2635
2662
  e("ul", null, [
2636
2663
  e("li", null, "您的账号权限不足"),
@@ -2642,16 +2669,16 @@ const Zn = /* @__PURE__ */ ue(cn, [["render", dn], ["__scopeId", "data-v-ac63e34
2642
2669
  ])
2643
2670
  ]));
2644
2671
  }
2645
- }), Qn = /* @__PURE__ */ ue(zn, [["__scopeId", "data-v-e6e1f7ac"]]);
2646
- function el() {
2647
- const t = he(), l = ce(), d = Pe(), s = k(() => l.userName || ""), a = k(() => l.userInfo), h = k(() => t.appName), i = k(() => d.isLoggedIn), v = k(() => t.isDark), m = k(() => t.theme), f = k(() => t.isCollapsed), _ = k(() => t.layout);
2672
+ }), nl = /* @__PURE__ */ de(Bn, [["__scopeId", "data-v-e6e1f7ac"]]);
2673
+ function ll() {
2674
+ const t = _e(), n = ue(), m = ze(), a = k(() => n.userName || ""), s = k(() => n.userInfo), p = k(() => t.appName), i = k(() => m.isLoggedIn), h = k(() => t.isDark), d = k(() => t.theme), f = k(() => t.isCollapsed), _ = k(() => t.layout);
2648
2675
  return {
2649
- userName: s,
2650
- userInfo: a,
2651
- appName: h,
2676
+ userName: a,
2677
+ userInfo: s,
2678
+ appName: p,
2652
2679
  isLoggedIn: i,
2653
- isDark: v,
2654
- theme: m,
2680
+ isDark: h,
2681
+ theme: d,
2655
2682
  isCollapsed: f,
2656
2683
  layout: _,
2657
2684
  toggleTheme: () => {
@@ -2662,124 +2689,124 @@ function el() {
2662
2689
  }
2663
2690
  };
2664
2691
  }
2665
- function tl() {
2666
- const t = ce();
2692
+ function rl() {
2693
+ const t = ue();
2667
2694
  return {
2668
2695
  isLoggedIn: k(() => t.isLoggedIn)
2669
2696
  };
2670
2697
  }
2671
- function sl(t, l = {}) {
2672
- const { rules: d, onSubmit: s } = l, a = y(), h = Ye({ ...t }), i = y(!1), v = y(!1), m = y(!1), f = () => {
2673
- u(), m.value = !1, v.value = !0;
2674
- }, _ = (A) => {
2675
- Object.assign(h, A), m.value = !0, v.value = !0;
2698
+ function il(t, n = {}) {
2699
+ const { rules: m, onSubmit: a } = n, s = y(), p = Ge({ ...t }), i = y(!1), h = y(!1), d = y(!1), f = () => {
2700
+ u(), d.value = !1, h.value = !0;
2701
+ }, _ = (P) => {
2702
+ Object.assign(p, P), d.value = !0, h.value = !0;
2676
2703
  }, g = () => {
2677
- v.value = !1, u();
2704
+ h.value = !1, u();
2678
2705
  }, u = () => {
2679
- var A;
2680
- Object.keys(t).forEach((O) => {
2681
- h[O] = t[O];
2682
- }), (A = a.value) == null || A.resetFields();
2706
+ var P;
2707
+ Object.keys(t).forEach((B) => {
2708
+ p[B] = t[B];
2709
+ }), (P = s.value) == null || P.resetFields();
2683
2710
  };
2684
2711
  return {
2685
- formRef: a,
2686
- formData: h,
2687
- rules: d,
2712
+ formRef: s,
2713
+ formData: p,
2714
+ rules: m,
2688
2715
  loading: i,
2689
- visible: v,
2690
- isEdit: m,
2716
+ visible: h,
2717
+ isEdit: d,
2691
2718
  openAdd: f,
2692
2719
  openEdit: _,
2693
2720
  close: g,
2694
2721
  resetForm: u,
2695
2722
  handleSubmit: async () => {
2696
- var A;
2723
+ var P;
2697
2724
  try {
2698
- await ((A = a.value) == null ? void 0 : A.validate()), i.value = !0, await (s == null ? void 0 : s(h)), g();
2699
- } catch (O) {
2700
- console.error(O);
2725
+ await ((P = s.value) == null ? void 0 : P.validate()), i.value = !0, await (a == null ? void 0 : a(p)), g();
2726
+ } catch (B) {
2727
+ console.error(B);
2701
2728
  } finally {
2702
2729
  i.value = !1;
2703
2730
  }
2704
2731
  }
2705
2732
  };
2706
2733
  }
2707
- function ol(t) {
2708
- const { fetchData: l, defaultPageSize: d = 10 } = t, s = y(!1), a = y([]), h = y(0), i = y(1), v = y(d), m = Ye({}), f = async () => {
2709
- s.value = !0;
2734
+ function cl(t) {
2735
+ const { fetchData: n, defaultPageSize: m = 10 } = t, a = y(!1), s = y([]), p = y(0), i = y(1), h = y(m), d = Ge({}), f = async () => {
2736
+ a.value = !0;
2710
2737
  try {
2711
- const B = {
2712
- ...m,
2738
+ const V = {
2739
+ ...d,
2713
2740
  page: i.value,
2714
- pageSize: v.value
2715
- }, R = await l(B);
2716
- a.value = R.list, h.value = R.total;
2717
- } catch (B) {
2718
- console.error(B);
2741
+ pageSize: h.value
2742
+ }, R = await n(V);
2743
+ s.value = R.list, p.value = R.total;
2744
+ } catch (V) {
2745
+ console.error(V);
2719
2746
  } finally {
2720
- s.value = !1;
2747
+ a.value = !1;
2721
2748
  }
2722
2749
  }, _ = () => {
2723
2750
  i.value = 1, f();
2724
2751
  }, g = () => {
2725
- Object.keys(m).forEach((B) => {
2726
- m[B] = void 0;
2752
+ Object.keys(d).forEach((V) => {
2753
+ d[V] = void 0;
2727
2754
  }), i.value = 1, f();
2728
- }, u = (B) => {
2729
- i.value = B, f();
2730
- }, q = (B) => {
2731
- v.value = B, i.value = 1, f();
2732
- }, A = () => {
2755
+ }, u = (V) => {
2756
+ i.value = V, f();
2757
+ }, W = (V) => {
2758
+ h.value = V, i.value = 1, f();
2759
+ }, P = () => {
2733
2760
  f();
2734
- }, O = k(() => ({
2761
+ }, B = k(() => ({
2735
2762
  current: i.value,
2736
- pageSize: v.value,
2737
- total: h.value
2763
+ pageSize: h.value,
2764
+ total: p.value
2738
2765
  }));
2739
2766
  return {
2740
- loading: s,
2741
- data: a,
2742
- total: h,
2767
+ loading: a,
2768
+ data: s,
2769
+ total: p,
2743
2770
  currentPage: i,
2744
- pageSize: v,
2745
- searchParams: m,
2746
- pagination: O,
2771
+ pageSize: h,
2772
+ searchParams: d,
2773
+ pagination: B,
2747
2774
  getData: f,
2748
2775
  handleSearch: _,
2749
2776
  handleReset: g,
2750
2777
  handlePageChange: u,
2751
- handleSizeChange: q,
2752
- refresh: A
2778
+ handleSizeChange: W,
2779
+ refresh: P
2753
2780
  };
2754
2781
  }
2755
- const Qe = ze("locale", () => {
2756
- const t = N.get("locale") || "zh-CN", l = Ut(t), d = y(t), s = zt(), { t: a, messages: h, setLocale: i, mergeMessages: v } = Pt(), m = k(() => {
2757
- const u = s.find((q) => q.code === d.value);
2758
- return (u == null ? void 0 : u.name) || d.value;
2782
+ const et = Pe("locale", () => {
2783
+ const t = T.get("locale") || "zh-CN", n = Ft(t), m = y(t), a = Dt(), { t: s, messages: p, setLocale: i, mergeMessages: h } = At(), d = k(() => {
2784
+ const u = a.find((W) => W.code === m.value);
2785
+ return (u == null ? void 0 : u.name) || m.value;
2759
2786
  });
2760
2787
  return {
2761
- locale: d,
2762
- localeName: m,
2763
- locales: s,
2764
- messages: h,
2765
- t: a,
2788
+ locale: m,
2789
+ localeName: d,
2790
+ locales: a,
2791
+ messages: p,
2792
+ t: s,
2766
2793
  changeLocale: (u) => {
2767
- d.value = u, i(u), N.set("locale", u), l.setLocale(u);
2794
+ m.value = u, i(u), T.set("locale", u), n.setLocale(u);
2768
2795
  },
2769
2796
  addMessages: (u) => {
2770
- v(u);
2797
+ h(u);
2771
2798
  },
2772
2799
  initLocale: () => {
2773
2800
  i(t);
2774
2801
  },
2775
- provider: l
2802
+ provider: n
2776
2803
  };
2777
- }), Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2804
+ }), Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2778
2805
  __proto__: null,
2779
- useLocaleStore: Qe
2806
+ useLocaleStore: et
2780
2807
  }, Symbol.toStringTag, { value: "Module" }));
2781
- function al() {
2782
- const t = Qe();
2808
+ function ul() {
2809
+ const t = et();
2783
2810
  return {
2784
2811
  /** 当前语言代码 */
2785
2812
  locale: t.locale,
@@ -2797,39 +2824,39 @@ function al() {
2797
2824
  addMessages: t.addMessages
2798
2825
  };
2799
2826
  }
2800
- function nl() {
2801
- return Qe().t;
2827
+ function dl() {
2828
+ return et().t;
2802
2829
  }
2803
- function ll(t) {
2804
- const l = ce(), d = _e();
2805
- return l.isLoggedIn ? d.hasPermission(t) : !1;
2830
+ function ml(t) {
2831
+ const n = ue(), m = fe();
2832
+ return n.isLoggedIn ? m.hasPermission(t) : !1;
2806
2833
  }
2807
- function rl(t) {
2808
- return ce().isLoggedIn;
2834
+ function pl(t) {
2835
+ return ue().isLoggedIn;
2809
2836
  }
2810
- function il() {
2837
+ function vl() {
2811
2838
  return !0;
2812
2839
  }
2813
- const vt = [
2840
+ const _t = [
2814
2841
  {
2815
2842
  path: "/login",
2816
2843
  name: "Login",
2817
- component: () => Promise.resolve().then(() => wn),
2844
+ component: () => Promise.resolve().then(() => Sn),
2818
2845
  meta: {
2819
2846
  title: "登录",
2820
2847
  hidden: !0
2821
2848
  }
2822
2849
  }
2823
- ], ht = {
2850
+ ], ft = {
2824
2851
  path: "/",
2825
2852
  name: "Layout",
2826
- component: () => Promise.resolve().then(() => on),
2853
+ component: () => Promise.resolve().then(() => un),
2827
2854
  redirect: "/dashboard",
2828
2855
  children: [
2829
2856
  {
2830
2857
  path: "/dashboard",
2831
2858
  name: "Dashboard",
2832
- component: () => import("./index-DaSr411h.js"),
2859
+ component: () => import("./index-cytRUeAK.js"),
2833
2860
  meta: {
2834
2861
  title: "仪表盘",
2835
2862
  icon: "dashboard",
@@ -2840,7 +2867,7 @@ const vt = [
2840
2867
  {
2841
2868
  path: "/system/user",
2842
2869
  name: "SystemUser",
2843
- component: () => import("./index-HqCkg98V.js"),
2870
+ component: () => import("./index-CsQthEv2.js"),
2844
2871
  meta: {
2845
2872
  title: "用户管理",
2846
2873
  icon: "user",
@@ -2850,7 +2877,7 @@ const vt = [
2850
2877
  {
2851
2878
  path: "/system/role",
2852
2879
  name: "SystemRole",
2853
- component: () => import("./index-D2ArmTvR.js"),
2880
+ component: () => import("./index-C4x3PSxY.js"),
2854
2881
  meta: {
2855
2882
  title: "角色管理",
2856
2883
  icon: "role",
@@ -2860,7 +2887,7 @@ const vt = [
2860
2887
  {
2861
2888
  path: "/system/menu",
2862
2889
  name: "SystemMenu",
2863
- component: () => import("./index-BIRzoxFQ.js"),
2890
+ component: () => import("./index-BYChodrz.js"),
2864
2891
  meta: {
2865
2892
  title: "菜单管理",
2866
2893
  icon: "menu",
@@ -2871,18 +2898,18 @@ const vt = [
2871
2898
  {
2872
2899
  path: "/:pathMatch(.*)*",
2873
2900
  name: "CatchAll",
2874
- component: () => Promise.resolve().then(() => pt),
2901
+ component: () => Promise.resolve().then(() => ht),
2875
2902
  meta: {
2876
2903
  title: "404",
2877
2904
  hidden: !0
2878
2905
  }
2879
2906
  }
2880
2907
  ]
2881
- }, cl = [
2908
+ }, hl = [
2882
2909
  {
2883
2910
  path: "/dashboard",
2884
2911
  name: "Dashboard",
2885
- component: () => import("./index-DaSr411h.js"),
2912
+ component: () => import("./index-cytRUeAK.js"),
2886
2913
  meta: {
2887
2914
  title: "仪表盘",
2888
2915
  icon: "dashboard",
@@ -2902,7 +2929,7 @@ const vt = [
2902
2929
  {
2903
2930
  path: "user",
2904
2931
  name: "SystemUser",
2905
- component: () => import("./index-HqCkg98V.js"),
2932
+ component: () => import("./index-CsQthEv2.js"),
2906
2933
  meta: {
2907
2934
  title: "用户管理",
2908
2935
  icon: "user",
@@ -2912,7 +2939,7 @@ const vt = [
2912
2939
  {
2913
2940
  path: "role",
2914
2941
  name: "SystemRole",
2915
- component: () => import("./index-D2ArmTvR.js"),
2942
+ component: () => import("./index-C4x3PSxY.js"),
2916
2943
  meta: {
2917
2944
  title: "角色管理",
2918
2945
  icon: "role",
@@ -2922,7 +2949,7 @@ const vt = [
2922
2949
  {
2923
2950
  path: "menu",
2924
2951
  name: "SystemMenu",
2925
- component: () => import("./index-BIRzoxFQ.js"),
2952
+ component: () => import("./index-BYChodrz.js"),
2926
2953
  meta: {
2927
2954
  title: "菜单管理",
2928
2955
  icon: "menu",
@@ -2931,7 +2958,7 @@ const vt = [
2931
2958
  }
2932
2959
  ]
2933
2960
  }
2934
- ], Tn = [
2961
+ ], On = [
2935
2962
  {
2936
2963
  menuCode: "dashboard",
2937
2964
  menuName: "仪表盘",
@@ -2979,20 +3006,20 @@ const vt = [
2979
3006
  }
2980
3007
  ]
2981
3008
  }
2982
- ], _t = Ge({
2983
- history: Xe(),
2984
- routes: [...vt, ht],
3009
+ ], gt = Xe({
3010
+ history: Je(),
3011
+ routes: [..._t, ft],
2985
3012
  scrollBehavior: () => ({ left: 0, top: 0 })
2986
- }), Fn = ["/login"];
2987
- _t.beforeEach(async (t, l, d) => {
2988
- const s = he();
2989
- if (s.initTheme(), lt())
3013
+ }), Rn = ["/login"];
3014
+ gt.beforeEach(async (t, n, m) => {
3015
+ const a = _e();
3016
+ if (a.initTheme(), it())
2990
3017
  if (t.path === "/login")
2991
- d({ path: "/" });
3018
+ m({ path: "/" });
2992
3019
  else {
2993
- const a = ce();
2994
- a.isLoggedIn || (a.setUserInfo({
2995
- appId: Ee(),
3020
+ const s = ue();
3021
+ s.isLoggedIn || (s.setUserInfo({
3022
+ appId: Me(),
2996
3023
  userId: "1",
2997
3024
  userName: "管理员",
2998
3025
  departmentName: "技术部",
@@ -3000,23 +3027,23 @@ _t.beforeEach(async (t, l, d) => {
3000
3027
  mobilePhone: "13800138000",
3001
3028
  positionName: "管理员",
3002
3029
  avatar: ""
3003
- }), _e().setMenuList(Tn)), t.name && t.meta.keepAlive && s.addCachedView(t.name), d();
3030
+ }), fe().setMenuList(On)), t.name && t.meta.keepAlive && a.addCachedView(t.name), m();
3004
3031
  }
3005
3032
  else
3006
- Fn.includes(t.path) ? d() : d("/login");
3033
+ Rn.includes(t.path) ? m() : m("/login");
3007
3034
  });
3008
- function ul() {
3009
- const t = Ge({
3010
- history: Xe(),
3011
- routes: [...vt, ht]
3035
+ function _l() {
3036
+ const t = Xe({
3037
+ history: Je(),
3038
+ routes: [..._t, ft]
3012
3039
  });
3013
- _t.matcher = t.matcher;
3040
+ gt.matcher = t.matcher;
3014
3041
  }
3015
- function dl(t, l = {}) {
3016
- const d = l.indexPath || "/dashboard", s = l.logoSrc, a = {
3042
+ function fl(t, n = {}) {
3043
+ const m = n.indexPath || "/dashboard", a = n.logoSrc, s = {
3017
3044
  path: "/:pathMatch(.*)*",
3018
3045
  name: "CatchAll",
3019
- component: () => Promise.resolve().then(() => pt),
3046
+ component: () => Promise.resolve().then(() => ht),
3020
3047
  meta: {
3021
3048
  title: "404"
3022
3049
  }
@@ -3024,84 +3051,84 @@ function dl(t, l = {}) {
3024
3051
  return {
3025
3052
  path: "/",
3026
3053
  name: "Layout",
3027
- component: ie({
3054
+ component: ce({
3028
3055
  name: "LayoutWrapper",
3029
3056
  render() {
3030
- return Lt(mt, { logoSrc: s || Ue("/vite.svg") });
3057
+ return Et(vt, { logoSrc: a || Te("/vite.svg") });
3031
3058
  }
3032
3059
  }),
3033
- redirect: d,
3034
- children: [...t, a]
3060
+ redirect: m,
3061
+ children: [...t, s]
3035
3062
  };
3036
3063
  }
3037
- function ml(t, l = {}) {
3038
- const d = l.base || gt();
3039
- return Ge({
3040
- history: Xe(d),
3064
+ function gl(t, n = {}) {
3065
+ const m = n.base || bt();
3066
+ return Xe({
3067
+ history: Je(m),
3041
3068
  routes: t,
3042
3069
  scrollBehavior: () => ({ left: 0, top: 0 })
3043
3070
  });
3044
3071
  }
3045
- const Dn = ["login", "404", "403", "/login", "/404", "/403"];
3046
- function An(t, l) {
3047
- if (l.includes(t)) return !0;
3048
- const d = t.startsWith("/") ? t.slice(1) : t;
3049
- return l.includes(d);
3072
+ const Kn = ["login", "404", "403", "/login", "/404", "/403"];
3073
+ function jn(t, n) {
3074
+ if (n.includes(t)) return !0;
3075
+ const m = t.startsWith("/") ? t.slice(1) : t;
3076
+ return n.includes(m);
3050
3077
  }
3051
- function pl(t, l = {}) {
3052
- const d = l.whiteList || Dn;
3053
- t.beforeEach(async (s, a, h) => {
3054
- const i = he(), v = ce(), m = _e(), f = i.loginPath || l.loginPath || "/login";
3055
- if (i.initTheme(), nt())
3056
- if (s.path === f || s.name === "Login")
3057
- h({ name: "Dashboard" });
3058
- else if (v.isLoggedIn) {
3059
- if (!m.hasMenu)
3078
+ function yl(t, n = {}) {
3079
+ const m = n.whiteList || Kn;
3080
+ t.beforeEach(async (a, s, p) => {
3081
+ const i = _e(), h = ue(), d = fe(), f = i.loginPath || n.loginPath || "/login";
3082
+ if (i.initTheme(), rt())
3083
+ if (a.path === f || a.name === "Login")
3084
+ p({ name: "Dashboard" });
3085
+ else if (h.isLoggedIn) {
3086
+ if (!d.hasMenu)
3060
3087
  try {
3061
- const g = l.fetchMenu ? await l.fetchMenu() : await tt(l.appId);
3062
- m.setMenuList(g);
3088
+ const g = n.fetchMenu ? await n.fetchMenu() : await ot(n.appId);
3089
+ d.setMenuList(g);
3063
3090
  } catch (g) {
3064
3091
  console.warn("补拉菜单失败:", g);
3065
3092
  }
3066
- s.name && s.meta.keepAlive && i.addCachedView(s.name), h();
3093
+ a.name && a.meta.keepAlive && i.addCachedView(a.name), p();
3067
3094
  } else
3068
3095
  try {
3069
- if (l.fetchUserInfo) {
3070
- const g = await l.fetchUserInfo();
3071
- v.setUserInfo(g);
3096
+ if (n.fetchUserInfo) {
3097
+ const g = await n.fetchUserInfo();
3098
+ h.setUserInfo(g);
3072
3099
  } else {
3073
- const g = await yt();
3074
- v.setUserInfo(g);
3100
+ const g = await wt();
3101
+ h.setUserInfo(g);
3075
3102
  }
3076
- if (l.fetchMenu) {
3077
- const g = await l.fetchMenu();
3078
- m.setMenuList(g);
3103
+ if (n.fetchMenu) {
3104
+ const g = await n.fetchMenu();
3105
+ d.setMenuList(g);
3079
3106
  } else {
3080
- const g = await tt(l.appId);
3081
- m.setMenuList(g);
3107
+ const g = await ot(n.appId);
3108
+ d.setMenuList(g);
3082
3109
  }
3083
- l.onLoginSuccess && l.onLoginSuccess(), s.name && s.meta.keepAlive && i.addCachedView(s.name), h({ ...s, replace: !0 });
3110
+ n.onLoginSuccess && n.onLoginSuccess(), a.name && a.meta.keepAlive && i.addCachedView(a.name), p({ ...a, replace: !0 });
3084
3111
  } catch (g) {
3085
- console.error("获取用户信息失败:", g), v.clearUserInfo(), m.clearMenu(), rt(), h({ name: "Login", query: { redirect: s.fullPath } });
3112
+ console.error("获取用户信息失败:", g), h.clearUserInfo(), d.clearMenu(), ct(), p({ name: "Login", query: { redirect: a.fullPath } });
3086
3113
  }
3087
3114
  else
3088
- An(s.path, d) || s.name === "Login" || s.name === "NotFound" || s.name === "Forbidden" ? h() : h({ name: "Login", query: { redirect: s.fullPath } });
3115
+ jn(a.path, m) || a.name === "Login" || a.name === "NotFound" || a.name === "Forbidden" ? p() : p({ name: "Login", query: { redirect: a.fullPath } });
3089
3116
  }), t.afterEach(() => {
3090
3117
  });
3091
3118
  }
3092
- var Bn = /* @__PURE__ */ ((t) => (t[t.ENABLED = 1] = "ENABLED", t[t.DISABLED = 0] = "DISABLED", t))(Bn || {}), Vn = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.MALE = 1] = "MALE", t[t.FEMALE = 2] = "FEMALE", t))(Vn || {}), On = /* @__PURE__ */ ((t) => (t[t.DIRECTORY = 0] = "DIRECTORY", t[t.MENU = 1] = "MENU", t[t.BUTTON = 2] = "BUTTON", t))(On || {});
3093
- const vl = {
3119
+ var Wn = /* @__PURE__ */ ((t) => (t[t.ENABLED = 1] = "ENABLED", t[t.DISABLED = 0] = "DISABLED", t))(Wn || {}), qn = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.MALE = 1] = "MALE", t[t.FEMALE = 2] = "FEMALE", t))(qn || {}), Hn = /* @__PURE__ */ ((t) => (t[t.DIRECTORY = 0] = "DIRECTORY", t[t.MENU = 1] = "MENU", t[t.BUTTON = 2] = "BUTTON", t))(Hn || {});
3120
+ const bl = {
3094
3121
  1: "启用",
3095
3122
  0: "禁用"
3096
- }, hl = {
3123
+ }, wl = {
3097
3124
  0: "未知",
3098
3125
  1: "男",
3099
3126
  2: "女"
3100
- }, _l = {
3127
+ }, kl = {
3101
3128
  0: "目录",
3102
3129
  1: "菜单",
3103
3130
  2: "按钮"
3104
- }, fl = [
3131
+ }, xl = [
3105
3132
  {
3106
3133
  label: "启用",
3107
3134
  value: 1
@@ -3112,7 +3139,7 @@ const vl = {
3112
3139
  value: 0
3113
3140
  /* DISABLED */
3114
3141
  }
3115
- ], gl = [
3142
+ ], Cl = [
3116
3143
  {
3117
3144
  label: "未知",
3118
3145
  value: 0
@@ -3128,7 +3155,7 @@ const vl = {
3128
3155
  value: 2
3129
3156
  /* FEMALE */
3130
3157
  }
3131
- ], yl = [
3158
+ ], $l = [
3132
3159
  {
3133
3160
  label: "目录",
3134
3161
  value: 0
@@ -3144,37 +3171,49 @@ const vl = {
3144
3171
  value: 2
3145
3172
  /* BUTTON */
3146
3173
  }
3147
- ], bl = {
3148
- mounted(t, l) {
3149
- var i, v;
3150
- const d = ce(), s = _e();
3151
- if (!d.isLoggedIn) {
3174
+ ], Ll = {
3175
+ mounted(t, n) {
3176
+ var i, h;
3177
+ const m = ue(), a = fe();
3178
+ if (!m.isLoggedIn) {
3152
3179
  (i = t.parentNode) == null || i.removeChild(t);
3153
3180
  return;
3154
3181
  }
3155
- const a = l.value, h = Array.isArray(a) ? a : [a];
3156
- s.hasPermission(h) || (v = t.parentNode) == null || v.removeChild(t);
3182
+ const s = n.value, p = Array.isArray(s) ? s : [s];
3183
+ a.hasPermission(p) || (h = t.parentNode) == null || h.removeChild(t);
3157
3184
  }
3158
3185
  };
3159
- async function kl(t) {
3160
- await bt(t.basePath);
3161
- const l = st();
3162
- return l && kt(l), wt({
3186
+ async function Ml(t) {
3187
+ await kt(t.basePath);
3188
+ const n = at();
3189
+ n && xt(n), Ct({
3163
3190
  appId: t.appId,
3164
3191
  clientId: t.clientId,
3165
- apiBaseUrl: l || t.apiBaseUrl,
3192
+ apiBaseUrl: n || t.apiBaseUrl,
3166
3193
  basePath: t.basePath
3167
- }), t.basePath && xt(t.basePath), Promise.resolve().then(() => Ft).then(({ useAppStore: d }) => {
3168
- const s = d();
3194
+ }), t.basePath && $t(t.basePath);
3195
+ const m = t.appId || Me();
3196
+ if (m)
3197
+ try {
3198
+ const a = await Promise.race([
3199
+ Lt(m),
3200
+ new Promise((s) => setTimeout(() => s(null), 2e3))
3201
+ ]);
3202
+ a && typeof a == "object" && Mt(a);
3203
+ } catch (a) {
3204
+ console.warn("加载应用界面配置失败,使用内置默认", a);
3205
+ }
3206
+ return Promise.resolve().then(() => Ot).then(({ useAppStore: a }) => {
3207
+ const s = a();
3169
3208
  t.appName && s.setAppName(t.appName), t.indexPath && s.setIndexPath(t.indexPath), t.loginPath && s.setLoginPath(t.loginPath);
3170
- }), t.locale && Promise.resolve().then(() => Pn).then(({ useLocaleStore: d }) => {
3171
- d().changeLocale(t.locale);
3209
+ }), t.locale && Promise.resolve().then(() => Vn).then(({ useLocaleStore: a }) => {
3210
+ a().changeLocale(t.locale);
3172
3211
  }), {
3173
3212
  config: {
3174
3213
  appName: t.appName || "XTO App",
3175
- appId: Ee(),
3176
- clientId: ct(),
3177
- apiBaseUrl: st(),
3214
+ appId: Me(),
3215
+ clientId: dt(),
3216
+ apiBaseUrl: at(),
3178
3217
  basePath: t.basePath || "/",
3179
3218
  indexPath: t.indexPath || "/dashboard",
3180
3219
  loginPath: t.loginPath || "/login",
@@ -3183,47 +3222,47 @@ async function kl(t) {
3183
3222
  };
3184
3223
  }
3185
3224
  export {
3186
- he as A,
3187
- tl as B,
3188
- Pe as C,
3189
- sl as D,
3190
- al as E,
3191
- Zn as F,
3192
- Vn as G,
3193
- js as H,
3194
- Qe as I,
3195
- _e as J,
3196
- ol as K,
3197
- mt as L,
3198
- On as M,
3199
- ce as N,
3200
- Bn as S,
3201
- Jn as T,
3202
- ue as _,
3203
- fl as a,
3204
- yl as b,
3205
- Qn as c,
3206
- gl as d,
3207
- hl as e,
3208
- _l as f,
3209
- Sn as g,
3210
- at as h,
3211
- kn as i,
3212
- vl as j,
3213
- dl as k,
3214
- ml as l,
3215
- nl as m,
3216
- kl as n,
3217
- cl as o,
3218
- ll as p,
3219
- rl as q,
3220
- il as r,
3221
- ht as s,
3222
- Tn as t,
3223
- bl as u,
3224
- ul as v,
3225
- _t as w,
3226
- pl as x,
3227
- vt as y,
3228
- el as z
3225
+ _e as A,
3226
+ rl as B,
3227
+ ze as C,
3228
+ il as D,
3229
+ ul as E,
3230
+ al as F,
3231
+ qn as G,
3232
+ Xs as H,
3233
+ et as I,
3234
+ fe as J,
3235
+ cl as K,
3236
+ vt as L,
3237
+ Hn as M,
3238
+ ue as N,
3239
+ Wn as S,
3240
+ ol as T,
3241
+ de as _,
3242
+ xl as a,
3243
+ $l as b,
3244
+ nl as c,
3245
+ Cl as d,
3246
+ wl as e,
3247
+ kl as f,
3248
+ Pn as g,
3249
+ lt as h,
3250
+ Mn as i,
3251
+ bl as j,
3252
+ fl as k,
3253
+ gl as l,
3254
+ dl as m,
3255
+ Ml as n,
3256
+ hl as o,
3257
+ ml as p,
3258
+ pl as q,
3259
+ vl as r,
3260
+ ft as s,
3261
+ On as t,
3262
+ Ll as u,
3263
+ _l as v,
3264
+ gt as w,
3265
+ yl as x,
3266
+ _t as y,
3267
+ ll as z
3229
3268
  };