xto-fronted 0.4.17 → 0.4.19

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,11 +1,11 @@
1
- import { ref as g, computed as y, watch as nt, defineComponent as H, openBlock as u, createElementBlock as _, normalizeClass as F, createElementVNode as t, withDirectives as Ae, toDisplayString as L, unref as r, vShow as rt, createVNode as S, withCtx as I, Fragment as A, renderList as K, createBlock as R, createTextVNode as G, createCommentVNode as O, onMounted as lt, onUnmounted as it, withModifiers as Be, Transition as ze, withKeys as Ve, vModelText as ut, normalizeStyle as Fe, resolveComponent as ct, reactive as we } from "vue";
1
+ import { ref as g, computed as y, watch as nt, defineComponent as H, openBlock as u, createElementBlock as _, normalizeClass as F, createElementVNode as t, withDirectives as Ae, toDisplayString as L, unref as r, vShow as rt, createVNode as S, withCtx as x, Fragment as A, renderList as K, createBlock as P, createTextVNode as G, createCommentVNode as O, onMounted as lt, onUnmounted as it, withModifiers as Be, Transition as ze, withKeys as Ve, vModelText as ut, normalizeStyle as Fe, resolveComponent as ct, reactive as we } from "vue";
2
2
  import { defineStore as pe } from "pinia";
3
3
  import { useRoute as ae, useRouter as X, createRouter as Ce, createWebHistory as Se } from "vue-router";
4
4
  import { Menu as Ke, SubMenu as je, MenuItem as ue, Tabs as dt, TabPane as mt } from "@xto/navigation";
5
- import { Icon as M, Button as he } from "@xto/base";
5
+ import { Icon as U, Button as he } from "@xto/base";
6
6
  import { Drawer as pt, Message as W } from "@xto/feedback";
7
- import { Form as ht, FormItem as re, Input as Oe, Checkbox as ft } from "@xto/form";
8
- import vt from "axios";
7
+ import { Form as ht, FormItem as re, Input as Oe, Checkbox as vt } from "@xto/form";
8
+ import ft from "axios";
9
9
  const se = "xto_", qe = (e) => ({
10
10
  get(s) {
11
11
  const o = e.getItem(se + s);
@@ -32,44 +32,44 @@ const se = "xto_", qe = (e) => ({
32
32
  o.startsWith(se) && e.removeItem(o);
33
33
  });
34
34
  }
35
- }), le = qe(window.localStorage), ie = qe(window.sessionStorage), f = {
35
+ }), le = qe(window.localStorage), ie = qe(window.sessionStorage), v = {
36
36
  get: le.get,
37
37
  set: le.set,
38
38
  remove: le.remove,
39
39
  clear: le.clear
40
- }, No = {
40
+ }, $o = {
41
41
  get: ie.get,
42
42
  set: ie.set,
43
43
  remove: ie.remove,
44
44
  clear: ie.clear
45
45
  }, J = pe("app", () => {
46
- const e = g(f.get("appName") || "XTO App"), s = g(f.get("indexPath") || "/dashboard"), o = g(f.get("isDark") || !1), a = g(f.get("theme") || "light"), n = g(f.get("layout") || "sidebar"), c = g(f.get("isCollapsed") || !1), w = g(f.get("showTabs") ?? !0), d = g(f.get("showFooter") ?? !0), h = g(f.get("showBreadcrumb") ?? !0), l = g(f.get("primaryColor") || "#409eff"), p = g([]), i = y(() => o.value ? "dark" : "light"), v = (x) => {
47
- e.value = x, f.set("appName", x);
48
- }, D = (x) => {
49
- s.value = x, f.set("indexPath", x);
46
+ const e = g(v.get("appName") || "XTO App"), s = g(v.get("indexPath") || "/dashboard"), o = g(v.get("isDark") || !1), a = g(v.get("theme") || "light"), n = g(v.get("layout") || "sidebar"), d = g(v.get("isCollapsed") || !1), w = g(v.get("showTabs") ?? !0), c = g(v.get("showFooter") ?? !0), h = g(v.get("showBreadcrumb") ?? !0), l = g(v.get("primaryColor") || "#409eff"), p = g([]), i = y(() => o.value ? "dark" : "light"), f = (I) => {
47
+ e.value = I, v.set("appName", I);
48
+ }, R = (I) => {
49
+ s.value = I, v.set("indexPath", I);
50
50
  }, C = () => {
51
51
  o.value = !o.value, a.value = o.value ? "dark" : "light", b();
52
- }, P = (x) => {
53
- a.value = x, o.value = x === "dark", b();
52
+ }, D = (I) => {
53
+ a.value = I, o.value = I === "dark", b();
54
54
  }, b = () => {
55
- const x = document.documentElement;
56
- o.value ? x.classList.add("dark") : x.classList.remove("dark"), f.set("isDark", o.value), f.set("theme", a.value);
55
+ const I = document.documentElement;
56
+ o.value ? I.classList.add("dark") : I.classList.remove("dark"), v.set("isDark", o.value), v.set("theme", a.value);
57
57
  }, E = () => {
58
- c.value = !c.value, f.set("isCollapsed", c.value);
59
- }, Y = (x) => {
60
- n.value = x, f.set("layout", x);
58
+ d.value = !d.value, v.set("isCollapsed", d.value);
59
+ }, Y = (I) => {
60
+ n.value = I, v.set("layout", I);
61
61
  }, B = () => {
62
- w.value = !w.value, f.set("showTabs", w.value);
63
- }, $ = () => {
64
- d.value = !d.value, f.set("showFooter", d.value);
62
+ w.value = !w.value, v.set("showTabs", w.value);
63
+ }, M = () => {
64
+ c.value = !c.value, v.set("showFooter", c.value);
65
65
  }, V = () => {
66
- h.value = !h.value, f.set("showBreadcrumb", h.value);
67
- }, N = (x) => {
68
- l.value = x, document.documentElement.style.setProperty("--color-primary", x), f.set("primaryColor", x);
69
- }, z = (x) => {
70
- p.value.includes(x) || p.value.push(x);
71
- }, ve = (x) => {
72
- const ne = p.value.indexOf(x);
66
+ h.value = !h.value, v.set("showBreadcrumb", h.value);
67
+ }, N = (I) => {
68
+ l.value = I, document.documentElement.style.setProperty("--color-primary", I), v.set("primaryColor", I);
69
+ }, z = (I) => {
70
+ p.value.includes(I) || p.value.push(I);
71
+ }, fe = (I) => {
72
+ const ne = p.value.indexOf(I);
73
73
  ne > -1 && p.value.splice(ne, 1);
74
74
  }, _e = () => {
75
75
  p.value = [];
@@ -82,25 +82,25 @@ const se = "xto_", qe = (e) => ({
82
82
  isDark: o,
83
83
  theme: a,
84
84
  layout: n,
85
- isCollapsed: c,
85
+ isCollapsed: d,
86
86
  showTabs: w,
87
- showFooter: d,
87
+ showFooter: c,
88
88
  showBreadcrumb: h,
89
89
  primaryColor: l,
90
90
  cachedViews: p,
91
91
  themeClass: i,
92
- setAppName: v,
93
- setIndexPath: D,
92
+ setAppName: f,
93
+ setIndexPath: R,
94
94
  toggleTheme: C,
95
95
  toggleCollapse: E,
96
- setTheme: P,
96
+ setTheme: D,
97
97
  setLayout: Y,
98
98
  toggleTabs: B,
99
- toggleFooter: $,
99
+ toggleFooter: M,
100
100
  toggleBreadcrumb: V,
101
101
  setPrimaryColor: N,
102
102
  addCachedView: z,
103
- removeCachedView: ve,
103
+ removeCachedView: fe,
104
104
  clearCachedViews: _e,
105
105
  initTheme: ge
106
106
  };
@@ -113,19 +113,19 @@ const se = "xto_", qe = (e) => ({
113
113
  isDefault: !1,
114
114
  isOut: !1
115
115
  }, ee = pe("menu", () => {
116
- const e = g(f.get(ke) || []), s = y(() => e.value.length > 0);
116
+ const e = g(v.get(ke) || []), s = y(() => e.value.length > 0);
117
117
  return {
118
118
  menuList: e,
119
119
  hasMenu: s,
120
120
  setMenuList: (n) => {
121
- e.value = [_t, ...n], f.set(ke, e.value);
121
+ e.value = [_t, ...n], v.set(ke, e.value);
122
122
  },
123
123
  clearMenu: () => {
124
- e.value = [], f.remove(ke);
124
+ e.value = [], v.remove(ke);
125
125
  }
126
126
  };
127
127
  }), Ye = "/vite.svg", be = "user_info", j = pe("user", () => {
128
- const e = g(f.get(be)), s = y(() => !!e.value), o = y(() => {
128
+ const e = g(v.get(be)), s = y(() => !!e.value), o = y(() => {
129
129
  var i;
130
130
  return ((i = e.value) == null ? void 0 : i.userId) || "";
131
131
  }), a = y(() => {
@@ -134,13 +134,13 @@ const se = "xto_", qe = (e) => ({
134
134
  }), n = y(() => {
135
135
  var i;
136
136
  return ((i = e.value) == null ? void 0 : i.departmentName) || "";
137
- }), c = y(() => {
137
+ }), d = y(() => {
138
138
  var i;
139
139
  return ((i = e.value) == null ? void 0 : i.email) || "";
140
140
  }), w = y(() => {
141
141
  var i;
142
142
  return ((i = e.value) == null ? void 0 : i.mobilePhone) || "";
143
- }), d = y(() => {
143
+ }), c = y(() => {
144
144
  var i;
145
145
  return ((i = e.value) == null ? void 0 : i.positionName) || "";
146
146
  }), h = y(() => {
@@ -153,71 +153,71 @@ const se = "xto_", qe = (e) => ({
153
153
  userId: o,
154
154
  userName: a,
155
155
  departmentName: n,
156
- email: c,
156
+ email: d,
157
157
  mobilePhone: w,
158
- positionName: d,
158
+ positionName: c,
159
159
  avatar: h,
160
160
  setUserInfo: (i) => {
161
- e.value = i, f.set(be, i);
161
+ e.value = i, v.set(be, i);
162
162
  },
163
163
  clearUserInfo: () => {
164
- e.value = null, f.remove(be);
164
+ e.value = null, v.remove(be);
165
165
  }
166
166
  };
167
- }), Ie = "token", xe = "token_type", Le = "refresh_token", Te = "expires_time", Ee = "refresh_time", Ne = "code", fe = () => f.get(Ie), gt = (e) => {
168
- f.set(Ie, e);
169
- }, yt = () => f.get(xe), kt = (e) => {
170
- f.set(xe, e);
171
- }, Uo = () => f.get(Le), bt = (e) => {
172
- f.set(Le, e);
173
- }, wt = () => f.get(Te), Ct = (e) => {
174
- f.set(Te, e);
175
- }, $o = () => f.get(Ee), St = (e) => {
176
- f.set(Ee, e);
177
- }, Mo = () => f.get(Ne), It = (e) => {
178
- f.set(Ne, e);
167
+ }), xe = "token", Ie = "token_type", Le = "refresh_token", Te = "expires_time", Ee = "refresh_time", Ne = "code", ve = () => v.get(xe), gt = (e) => {
168
+ v.set(xe, e);
169
+ }, yt = () => v.get(Ie), kt = (e) => {
170
+ v.set(Ie, e);
171
+ }, Mo = () => v.get(Le), bt = (e) => {
172
+ v.set(Le, e);
173
+ }, wt = () => v.get(Te), Ct = (e) => {
174
+ v.set(Te, e);
175
+ }, Uo = () => v.get(Ee), St = (e) => {
176
+ v.set(Ee, e);
177
+ }, Ro = () => v.get(Ne), xt = (e) => {
178
+ v.set(Ne, e);
179
179
  }, We = (e) => {
180
- gt(e.access_token), kt(e.token_type || "Bearer"), bt(e.refresh_token), Ct(e.expires_time), St(e.refresh_time), e.code && It(e.code);
180
+ gt(e.access_token), kt(e.token_type || "Bearer"), bt(e.refresh_token), Ct(e.expires_time), St(e.refresh_time), e.code && xt(e.code);
181
181
  }, He = () => {
182
- f.remove(Ie), f.remove(xe), f.remove(Le), f.remove(Te), f.remove(Ee), f.remove(Ne);
183
- }, xt = () => {
182
+ v.remove(xe), v.remove(Ie), v.remove(Le), v.remove(Te), v.remove(Ee), v.remove(Ne);
183
+ }, It = () => {
184
184
  const e = wt();
185
185
  return e ? Date.now() > e : !0;
186
- }, Xe = () => !!fe() && !xt(), Ue = pe("auth", () => {
187
- const e = g(fe()), s = y(() => Xe()), o = g(""), a = g(""), n = g(""), c = g("/login");
186
+ }, Xe = () => !!ve() && !It(), $e = pe("auth", () => {
187
+ const e = g(ve()), s = y(() => Xe()), o = g(""), a = g(""), n = g(""), d = g("/login");
188
188
  return {
189
189
  token: e,
190
190
  isLoggedIn: s,
191
191
  baseUrl: o,
192
192
  appId: a,
193
193
  clientId: n,
194
- loginPath: c,
195
- login: (v) => {
196
- e.value = v.access_token, We(v);
194
+ loginPath: d,
195
+ login: (f) => {
196
+ e.value = f.access_token, We(f);
197
197
  },
198
198
  logout: () => {
199
199
  e.value = null, He();
200
200
  },
201
- setBaseUrl: (v) => {
202
- o.value = v;
201
+ setBaseUrl: (f) => {
202
+ o.value = f;
203
203
  },
204
- setAppId: (v) => {
205
- a.value = v;
204
+ setAppId: (f) => {
205
+ a.value = f;
206
206
  },
207
- setClientId: (v) => {
208
- n.value = v;
207
+ setClientId: (f) => {
208
+ n.value = f;
209
209
  },
210
- setLoginPath: (v) => {
211
- c.value = v;
210
+ setLoginPath: (f) => {
211
+ d.value = f;
212
212
  }
213
213
  };
214
214
  }), Lt = { class: "sidebar__logo" }, Tt = { class: "sidebar__menu-icon" }, Et = {
215
215
  key: 1,
216
216
  class: "sidebar__menu-char"
217
- }, Nt = { class: "sidebar__menu-icon" }, Ut = {
217
+ }, Nt = { class: "sidebar__menu-icon" }, $t = {
218
218
  key: 1,
219
219
  class: "sidebar__menu-char"
220
- }, $t = { class: "sidebar__menu-icon" }, Mt = {
220
+ }, Mt = { class: "sidebar__menu-icon" }, Ut = {
221
221
  key: 1,
222
222
  class: "sidebar__menu-char"
223
223
  }, Rt = {
@@ -229,10 +229,10 @@ const se = "xto_", qe = (e) => ({
229
229
  menuList: { default: () => [] }
230
230
  },
231
231
  setup(e) {
232
- const s = e, o = ae(), a = X(), n = ee(), c = j(), w = Ue(), d = J(), h = y(() => s.menuList.length > 0 ? s.menuList : n.menuList), l = y(() => d.isCollapsed), p = y(() => o.path), i = y(() => d.isDark ? "#1d1e1f" : "#fff"), v = y(() => d.isDark ? "#cfd3dc" : "#303133"), D = y(() => "#409eff"), C = ($) => {
233
- $ && $ !== o.path && a.push($);
234
- }, P = () => {
235
- w.logout(), c.clearUserInfo(), n.clearMenu(), a.push("/login");
232
+ const s = e, o = ae(), a = X(), n = ee(), d = j(), w = $e(), c = J(), h = y(() => s.menuList.length > 0 ? s.menuList : n.menuList), l = y(() => c.isCollapsed), p = y(() => o.path), i = y(() => c.isDark ? "#1d1e1f" : "#fff"), f = y(() => c.isDark ? "#cfd3dc" : "#303133"), R = y(() => "#409eff"), C = (M) => {
233
+ M && M !== o.path && a.push(M);
234
+ }, D = () => {
235
+ w.logout(), d.clearUserInfo(), n.clearMenu(), a.push("/login");
236
236
  }, b = /* @__PURE__ */ new Set([
237
237
  "arrow-up",
238
238
  "arrow-down",
@@ -335,10 +335,10 @@ const se = "xto_", qe = (e) => ({
335
335
  "sun",
336
336
  "theme",
337
337
  "skin"
338
- ]), E = ($) => {
339
- if (!$ || $ === "") return "";
340
- if ($.startsWith("tineco-icon-")) {
341
- const N = $.replace("tineco-icon-", "");
338
+ ]), E = (M) => {
339
+ if (!M || M === "") return "";
340
+ if (M.startsWith("tineco-icon-")) {
341
+ const N = M.replace("tineco-icon-", "");
342
342
  return {
343
343
  home: "home",
344
344
  dashboard: "dashboard",
@@ -371,9 +371,9 @@ const se = "xto_", qe = (e) => ({
371
371
  app: "app",
372
372
  list: "list",
373
373
  grid: "grid"
374
- }[$] || $;
375
- }, Y = ($) => $ ? $.charAt(0) : "", B = ($) => b.has($);
376
- return ($, V) => (u(), _("div", {
374
+ }[M] || M;
375
+ }, Y = (M) => M ? M.charAt(0) : "", B = (M) => b.has(M);
376
+ return (M, V) => (u(), _("div", {
377
377
  class: F(["sidebar", { "sidebar--collapsed": l.value }])
378
378
  }, [
379
379
  t("div", Lt, [
@@ -382,7 +382,7 @@ const se = "xto_", qe = (e) => ({
382
382
  alt: "Logo",
383
383
  class: "sidebar__logo-img"
384
384
  }, null, -1)),
385
- Ae(t("span", { class: "sidebar__logo-text" }, L(r(d).appName), 513), [
385
+ Ae(t("span", { class: "sidebar__logo-text" }, L(r(c).appName), 513), [
386
386
  [rt, !l.value]
387
387
  ])
388
388
  ]),
@@ -392,22 +392,22 @@ const se = "xto_", qe = (e) => ({
392
392
  collapse: l.value,
393
393
  "collapse-transition": !1,
394
394
  "background-color": i.value,
395
- "text-color": v.value,
396
- "active-text-color": D.value,
395
+ "text-color": f.value,
396
+ "active-text-color": R.value,
397
397
  class: "sidebar__menu",
398
398
  onSelect: C
399
399
  }, {
400
- default: I(() => [
400
+ default: x(() => [
401
401
  (u(!0), _(A, null, K(h.value, (N) => (u(), _(A, {
402
402
  key: N.menuUrl
403
403
  }, [
404
- N.children && N.children.length > 0 ? (u(), R(r(je), {
404
+ N.children && N.children.length > 0 ? (u(), P(r(je), {
405
405
  key: 0,
406
406
  index: N.menuUrl
407
407
  }, {
408
- title: I(() => [
408
+ title: x(() => [
409
409
  t("span", Tt, [
410
- B(E(N.icon)) ? (u(), R(r(M), {
410
+ B(E(N.icon)) ? (u(), P(r(U), {
411
411
  key: 0,
412
412
  name: E(N.icon),
413
413
  size: 16
@@ -415,18 +415,18 @@ const se = "xto_", qe = (e) => ({
415
415
  ]),
416
416
  t("span", null, L(N.menuName), 1)
417
417
  ]),
418
- default: I(() => [
419
- (u(!0), _(A, null, K(N.children, (z) => (u(), R(r(ue), {
418
+ default: x(() => [
419
+ (u(!0), _(A, null, K(N.children, (z) => (u(), P(r(ue), {
420
420
  key: z.menuUrl,
421
421
  index: z.menuUrl
422
422
  }, {
423
- default: I(() => [
423
+ default: x(() => [
424
424
  t("span", Nt, [
425
- B(E(z.icon)) ? (u(), R(r(M), {
425
+ B(E(z.icon)) ? (u(), P(r(U), {
426
426
  key: 0,
427
427
  name: E(z.icon),
428
428
  size: 16
429
- }, null, 8, ["name"])) : (u(), _("span", Ut, L(Y(z.menuName)), 1))
429
+ }, null, 8, ["name"])) : (u(), _("span", $t, L(Y(z.menuName)), 1))
430
430
  ]),
431
431
  t("span", null, L(z.menuName), 1)
432
432
  ]),
@@ -434,17 +434,17 @@ const se = "xto_", qe = (e) => ({
434
434
  }, 1032, ["index"]))), 128))
435
435
  ]),
436
436
  _: 2
437
- }, 1032, ["index"])) : (u(), R(r(ue), {
437
+ }, 1032, ["index"])) : (u(), P(r(ue), {
438
438
  key: 1,
439
439
  index: N.menuUrl
440
440
  }, {
441
- default: I(() => [
442
- t("span", $t, [
443
- B(E(N.icon)) ? (u(), R(r(M), {
441
+ default: x(() => [
442
+ t("span", Mt, [
443
+ B(E(N.icon)) ? (u(), P(r(U), {
444
444
  key: 0,
445
445
  name: E(N.icon),
446
446
  size: 16
447
- }, null, 8, ["name"])) : (u(), _("span", Mt, L(Y(N.menuName)), 1))
447
+ }, null, 8, ["name"])) : (u(), _("span", Ut, L(Y(N.menuName)), 1))
448
448
  ]),
449
449
  t("span", null, L(N.menuName), 1)
450
450
  ]),
@@ -456,15 +456,15 @@ const se = "xto_", qe = (e) => ({
456
456
  }, 8, ["default-active", "collapse", "background-color", "text-color", "active-text-color"]),
457
457
  l.value ? O("", !0) : (u(), _("div", Rt, [
458
458
  t("div", Dt, [
459
- t("span", Pt, L(r(c).userName), 1),
460
- t("span", zt, L(r(c).departmentName), 1)
459
+ t("span", Pt, L(r(d).userName), 1),
460
+ t("span", zt, L(r(d).departmentName), 1)
461
461
  ]),
462
462
  S(r(he), {
463
463
  type: "text",
464
464
  size: "small",
465
- onClick: P
465
+ onClick: D
466
466
  }, {
467
- default: I(() => [...V[1] || (V[1] = [
467
+ default: x(() => [...V[1] || (V[1] = [
468
468
  G("退出", -1)
469
469
  ])]),
470
470
  _: 1
@@ -498,16 +498,16 @@ const se = "xto_", qe = (e) => ({
498
498
  }, us = { class: "settings-drawer" }, cs = { class: "settings-section" }, ds = { class: "settings-layout-options" }, ms = ["onClick"], ps = { class: "layout-option__preview" }, hs = {
499
499
  key: 0,
500
500
  class: "layout-preview-sidebar"
501
- }, fs = {
501
+ }, vs = {
502
502
  key: 1,
503
503
  class: "layout-preview-top"
504
- }, vs = {
504
+ }, fs = {
505
505
  key: 2,
506
506
  class: "layout-preview-mix"
507
- }, _s = { class: "layout-option__label" }, gs = { class: "settings-section" }, ys = { class: "settings-color-options" }, ks = ["title", "onClick"], bs = { class: "settings-section" }, ws = { class: "settings-switch-list" }, Cs = { class: "settings-switch-item" }, Ss = { class: "settings-switch-item" }, Is = /* @__PURE__ */ H({
507
+ }, _s = { class: "layout-option__label" }, gs = { class: "settings-section" }, ys = { class: "settings-color-options" }, ks = ["title", "onClick"], bs = { class: "settings-section" }, ws = { class: "settings-switch-list" }, Cs = { class: "settings-switch-item" }, Ss = { class: "settings-switch-item" }, xs = /* @__PURE__ */ H({
508
508
  __name: "Header",
509
509
  setup(e) {
510
- const s = ae(), o = X(), a = J(), n = j(), c = Ue(), w = ee(), d = g(!1), h = g(!1), l = g(null), p = g(!1), i = g(!1), v = g(""), D = g(null), C = g(!1), P = [
510
+ const s = ae(), o = X(), a = J(), n = j(), d = $e(), w = ee(), c = g(!1), h = g(!1), l = g(null), p = g(!1), i = g(!1), f = g(""), R = g(null), C = g(!1), D = [
511
511
  { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
512
512
  { value: "top", label: "顶部菜单", icon: "menu" },
513
513
  { value: "mix", label: "混合菜单", icon: "grid" }
@@ -521,57 +521,57 @@ const se = "xto_", qe = (e) => ({
521
521
  ], E = y(() => s.matched.filter((m) => m.meta && m.meta.title).map((m) => ({
522
522
  title: m.meta.title,
523
523
  path: m.path
524
- }))), Y = (U, m = "") => {
524
+ }))), Y = ($, m = "") => {
525
525
  const Q = [];
526
- return U.forEach((k) => {
526
+ return $.forEach((k) => {
527
527
  k.children && k.children.length > 0 ? Q.push(...Y(k.children, k.title)) : Q.push({ ...k, parentTitle: m });
528
528
  }), Q;
529
- }, B = y(() => v.value.trim() ? Y(w.menuList).filter(
530
- (m) => m.title.toLowerCase().includes(v.value.toLowerCase())
531
- ) : []), $ = y(() => a.layout), V = () => {
529
+ }, B = y(() => f.value.trim() ? Y(w.menuList).filter(
530
+ (m) => m.title.toLowerCase().includes(f.value.toLowerCase())
531
+ ) : []), M = y(() => a.layout), V = () => {
532
532
  a.toggleCollapse();
533
533
  }, N = () => {
534
534
  a.toggleTheme();
535
535
  }, z = () => {
536
536
  h.value = !0;
537
- }, ve = (U) => {
538
- a.setLayout(U);
539
- }, _e = (U) => {
540
- C.value = U;
537
+ }, fe = ($) => {
538
+ a.setLayout($);
539
+ }, _e = ($) => {
540
+ C.value = $;
541
541
  const m = document.documentElement;
542
- U ? m.classList.add("grey-mode") : m.classList.remove("grey-mode");
542
+ $ ? m.classList.add("grey-mode") : m.classList.remove("grey-mode");
543
543
  }, ge = () => {
544
544
  document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
545
- }, x = () => {
545
+ }, I = () => {
546
546
  p.value = !!document.fullscreenElement;
547
547
  }, ne = () => {
548
- d.value = !d.value;
548
+ c.value = !c.value;
549
549
  }, te = () => {
550
- d.value = !1;
551
- }, Me = () => {
550
+ c.value = !1;
551
+ }, Ue = () => {
552
552
  i.value = !0;
553
553
  }, ye = () => {
554
- i.value = !1, v.value = "";
555
- }, Re = (U) => {
556
- o.push(U), ye();
557
- }, tt = (U) => {
558
- a.setPrimaryColor(U);
554
+ i.value = !1, f.value = "";
555
+ }, Re = ($) => {
556
+ o.push($), ye();
557
+ }, tt = ($) => {
558
+ a.setPrimaryColor($);
559
559
  }, st = () => {
560
560
  te(), o.push("/profile");
561
561
  }, ot = () => {
562
562
  te(), o.push("/change-password");
563
563
  }, at = () => {
564
- te(), c.logout(), n.clearUserInfo(), w.clearMenu(), o.push("/login");
565
- }, De = (U) => {
566
- l.value && !l.value.contains(U.target) && te(), D.value && !D.value.contains(U.target) && ye();
567
- }, Pe = (U) => {
568
- U.key === "Escape" && (ye(), te()), (U.ctrlKey || U.metaKey) && U.key === "k" && (U.preventDefault(), Me());
564
+ te(), d.logout(), n.clearUserInfo(), w.clearMenu(), o.push("/login");
565
+ }, De = ($) => {
566
+ l.value && !l.value.contains($.target) && te(), R.value && !R.value.contains($.target) && ye();
567
+ }, Pe = ($) => {
568
+ $.key === "Escape" && (ye(), te()), ($.ctrlKey || $.metaKey) && $.key === "k" && ($.preventDefault(), Ue());
569
569
  };
570
570
  return lt(() => {
571
- document.addEventListener("click", De), document.addEventListener("fullscreenchange", x), document.addEventListener("keydown", Pe), a.initTheme(), C.value = document.documentElement.classList.contains("grey-mode");
571
+ document.addEventListener("click", De), document.addEventListener("fullscreenchange", I), document.addEventListener("keydown", Pe), a.initTheme(), C.value = document.documentElement.classList.contains("grey-mode");
572
572
  }), it(() => {
573
- document.removeEventListener("click", De), document.removeEventListener("fullscreenchange", x), document.removeEventListener("keydown", Pe);
574
- }), (U, m) => {
573
+ document.removeEventListener("click", De), document.removeEventListener("fullscreenchange", I), document.removeEventListener("keydown", Pe);
574
+ }), ($, m) => {
575
575
  var Q;
576
576
  return u(), _("div", Bt, [
577
577
  t("div", Vt, [
@@ -579,7 +579,7 @@ const se = "xto_", qe = (e) => ({
579
579
  class: "header__collapse",
580
580
  onClick: V
581
581
  }, [
582
- S(r(M), {
582
+ S(r(U), {
583
583
  name: r(a).isCollapsed ? "menu-unfold" : "menu-fold",
584
584
  size: 18
585
585
  }, null, 8, ["name"])
@@ -598,10 +598,10 @@ const se = "xto_", qe = (e) => ({
598
598
  t("div", jt, [
599
599
  t("div", {
600
600
  class: "header__action",
601
- onClick: Me,
601
+ onClick: Ue,
602
602
  title: "搜索 (Ctrl+K)"
603
603
  }, [
604
- S(r(M), {
604
+ S(r(U), {
605
605
  name: "search",
606
606
  size: 16
607
607
  })
@@ -611,7 +611,7 @@ const se = "xto_", qe = (e) => ({
611
611
  onClick: ge,
612
612
  title: p.value ? "退出全屏" : "全屏"
613
613
  }, [
614
- S(r(M), {
614
+ S(r(U), {
615
615
  name: p.value ? "fullscreen-exit" : "fullscreen",
616
616
  size: 16
617
617
  }, null, 8, ["name"])
@@ -621,7 +621,7 @@ const se = "xto_", qe = (e) => ({
621
621
  onClick: z,
622
622
  title: "换肤设置"
623
623
  }, [
624
- S(r(M), {
624
+ S(r(U), {
625
625
  name: "skin",
626
626
  size: 16
627
627
  })
@@ -631,7 +631,7 @@ const se = "xto_", qe = (e) => ({
631
631
  onClick: N,
632
632
  title: "切换主题"
633
633
  }, [
634
- S(r(M), {
634
+ S(r(U), {
635
635
  name: r(a).isDark ? "sun" : "moon",
636
636
  size: 16
637
637
  }, null, 8, ["name"])
@@ -650,14 +650,14 @@ const se = "xto_", qe = (e) => ({
650
650
  ]),
651
651
  t("span", Wt, L(r(n).userName), 1),
652
652
  t("span", {
653
- class: F(["header__user-arrow", { "is-active": d.value }])
653
+ class: F(["header__user-arrow", { "is-active": c.value }])
654
654
  }, "▼", 2)
655
655
  ]),
656
656
  S(ze, { name: "dropdown" }, {
657
- default: I(() => {
657
+ default: x(() => {
658
658
  var k;
659
659
  return [
660
- d.value ? (u(), _("div", Ht, [
660
+ c.value ? (u(), _("div", Ht, [
661
661
  t("div", Xt, [
662
662
  t("div", Jt, [
663
663
  t("span", null, L(((k = r(n).userName) == null ? void 0 : k.charAt(0)) || "U"), 1)
@@ -673,7 +673,7 @@ const se = "xto_", qe = (e) => ({
673
673
  class: "header__dropdown-item",
674
674
  onClick: st
675
675
  }, [
676
- S(r(M), {
676
+ S(r(U), {
677
677
  name: "user",
678
678
  size: 16
679
679
  }),
@@ -683,7 +683,7 @@ const se = "xto_", qe = (e) => ({
683
683
  class: "header__dropdown-item",
684
684
  onClick: ot
685
685
  }, [
686
- S(r(M), {
686
+ S(r(U), {
687
687
  name: "lock",
688
688
  size: 16
689
689
  }),
@@ -694,7 +694,7 @@ const se = "xto_", qe = (e) => ({
694
694
  class: "header__dropdown-item header__dropdown-item--danger",
695
695
  onClick: at
696
696
  }, [
697
- S(r(M), {
697
+ S(r(U), {
698
698
  name: "logout",
699
699
  size: 16
700
700
  }),
@@ -709,29 +709,29 @@ const se = "xto_", qe = (e) => ({
709
709
  ], 512)
710
710
  ]),
711
711
  S(ze, { name: "search" }, {
712
- default: I(() => [
712
+ default: x(() => [
713
713
  i.value ? (u(), _("div", {
714
714
  key: 0,
715
715
  class: "header__search-modal",
716
716
  ref_key: "searchRef",
717
- ref: D
717
+ ref: R
718
718
  }, [
719
719
  t("div", ts, [
720
720
  t("div", ss, [
721
- S(r(M), {
721
+ S(r(U), {
722
722
  class: "search-icon",
723
723
  name: "search",
724
724
  size: 20
725
725
  }),
726
726
  Ae(t("input", {
727
- "onUpdate:modelValue": m[0] || (m[0] = (k) => v.value = k),
727
+ "onUpdate:modelValue": m[0] || (m[0] = (k) => f.value = k),
728
728
  type: "text",
729
729
  class: "search-input",
730
730
  placeholder: "搜索菜单...",
731
731
  autofocus: "",
732
732
  onKeyup: m[1] || (m[1] = Ve((k) => B.value[0] && Re(B.value[0].path), ["enter"]))
733
733
  }, null, 544), [
734
- [ut, v.value]
734
+ [ut, f.value]
735
735
  ]),
736
736
  m[9] || (m[9] = t("span", { class: "search-shortcut" }, "ESC 关闭", -1))
737
737
  ]),
@@ -739,9 +739,9 @@ const se = "xto_", qe = (e) => ({
739
739
  (u(!0), _(A, null, K(B.value, (k, Z) => (u(), _("div", {
740
740
  key: k.path,
741
741
  class: F(["search-result-item", { "is-first": Z === 0 }]),
742
- onClick: (bo) => Re(k.path)
742
+ onClick: (wo) => Re(k.path)
743
743
  }, [
744
- S(r(M), {
744
+ S(r(U), {
745
745
  class: "search-result-icon",
746
746
  name: k.icon || "file",
747
747
  size: 20
@@ -751,7 +751,7 @@ const se = "xto_", qe = (e) => ({
751
751
  k.parentTitle ? (u(), _("span", ls, L(k.parentTitle), 1)) : O("", !0)
752
752
  ])
753
753
  ], 10, as))), 128))
754
- ])) : v.value ? (u(), _("div", is, " 未找到匹配的菜单 ")) : O("", !0)
754
+ ])) : f.value ? (u(), _("div", is, " 未找到匹配的菜单 ")) : O("", !0)
755
755
  ])
756
756
  ], 512)) : O("", !0)
757
757
  ]),
@@ -764,15 +764,15 @@ const se = "xto_", qe = (e) => ({
764
764
  direction: "rtl",
765
765
  size: "320px"
766
766
  }, {
767
- default: I(() => [
767
+ default: x(() => [
768
768
  t("div", us, [
769
769
  t("div", cs, [
770
770
  m[13] || (m[13] = t("div", { class: "settings-title" }, "布局模式", -1)),
771
771
  t("div", ds, [
772
- (u(), _(A, null, K(P, (k) => t("div", {
772
+ (u(), _(A, null, K(D, (k) => t("div", {
773
773
  key: k.value,
774
- class: F(["layout-option", { "is-active": $.value === k.value }]),
775
- onClick: (Z) => ve(k.value)
774
+ class: F(["layout-option", { "is-active": M.value === k.value }]),
775
+ onClick: (Z) => fe(k.value)
776
776
  }, [
777
777
  t("div", ps, [
778
778
  k.value === "sidebar" ? (u(), _("div", hs, [...m[10] || (m[10] = [
@@ -781,10 +781,10 @@ const se = "xto_", qe = (e) => ({
781
781
  t("div", { class: "preview-header" }),
782
782
  t("div", { class: "preview-content" })
783
783
  ], -1)
784
- ])])) : k.value === "top" ? (u(), _("div", fs, [...m[11] || (m[11] = [
784
+ ])])) : k.value === "top" ? (u(), _("div", vs, [...m[11] || (m[11] = [
785
785
  t("div", { class: "preview-header-full" }, null, -1),
786
786
  t("div", { class: "preview-content-full" }, null, -1)
787
- ])])) : (u(), _("div", vs, [...m[12] || (m[12] = [
787
+ ])])) : (u(), _("div", fs, [...m[12] || (m[12] = [
788
788
  t("div", { class: "preview-header-mix" }, [
789
789
  t("div", { class: "preview-mix-left" })
790
790
  ], -1),
@@ -808,7 +808,7 @@ const se = "xto_", qe = (e) => ({
808
808
  title: k.label,
809
809
  onClick: (Z) => tt(k.value)
810
810
  }, [
811
- r(a).primaryColor === k.value ? (u(), R(r(M), {
811
+ r(a).primaryColor === k.value ? (u(), P(r(U), {
812
812
  key: 0,
813
813
  name: "check",
814
814
  size: 12,
@@ -847,19 +847,19 @@ const se = "xto_", qe = (e) => ({
847
847
  ]);
848
848
  };
849
849
  }
850
- }), xs = /* @__PURE__ */ q(Is, [["__scopeId", "data-v-9da60fc6"]]), Ls = { class: "top-menu" }, Ts = { class: "top-menu__menu-icon" }, Es = {
850
+ }), Is = /* @__PURE__ */ q(xs, [["__scopeId", "data-v-9da60fc6"]]), Ls = { class: "top-menu" }, Ts = { class: "top-menu__menu-icon" }, Es = {
851
851
  key: 1,
852
852
  class: "top-menu__menu-char"
853
- }, Ns = { class: "top-menu__menu-icon" }, Us = {
853
+ }, Ns = { class: "top-menu__menu-icon" }, $s = {
854
854
  key: 1,
855
855
  class: "top-menu__menu-char"
856
- }, $s = { class: "top-menu__menu-icon" }, Ms = {
856
+ }, Ms = { class: "top-menu__menu-icon" }, Us = {
857
857
  key: 1,
858
858
  class: "top-menu__menu-char"
859
859
  }, Rs = /* @__PURE__ */ H({
860
860
  __name: "TopMenu",
861
861
  setup(e) {
862
- const s = ae(), o = X(), a = ee(), n = J(), c = y(() => s.path), w = y(() => n.isDark ? "#1d1e1f" : "#fff"), d = y(() => n.isDark ? "#cfd3dc" : "#303133"), h = y(() => "#409eff"), l = (C) => {
862
+ const s = ae(), o = X(), a = ee(), n = J(), d = y(() => s.path), w = y(() => n.isDark ? "#1d1e1f" : "#fff"), c = y(() => n.isDark ? "#cfd3dc" : "#303133"), h = y(() => "#409eff"), l = (C) => {
863
863
  C && C !== s.path && o.push(C);
864
864
  }, p = /* @__PURE__ */ new Set([
865
865
  "arrow-up",
@@ -1000,47 +1000,47 @@ const se = "xto_", qe = (e) => ({
1000
1000
  list: "list",
1001
1001
  grid: "grid"
1002
1002
  }[C] || C;
1003
- }, v = (C) => C ? C.charAt(0) : "", D = (C) => p.has(C);
1004
- return (C, P) => (u(), _("div", Ls, [
1003
+ }, f = (C) => C ? C.charAt(0) : "", R = (C) => p.has(C);
1004
+ return (C, D) => (u(), _("div", Ls, [
1005
1005
  S(r(Ke), {
1006
- "default-active": c.value,
1006
+ "default-active": d.value,
1007
1007
  mode: "horizontal",
1008
1008
  "background-color": w.value,
1009
- "text-color": d.value,
1009
+ "text-color": c.value,
1010
1010
  "active-text-color": h.value,
1011
1011
  class: "top-menu__menu",
1012
1012
  onSelect: l
1013
1013
  }, {
1014
- default: I(() => [
1014
+ default: x(() => [
1015
1015
  (u(!0), _(A, null, K(r(a).menuList, (b) => (u(), _(A, {
1016
1016
  key: b.menuUrl
1017
1017
  }, [
1018
- b.children && b.children.length > 0 ? (u(), R(r(je), {
1018
+ b.children && b.children.length > 0 ? (u(), P(r(je), {
1019
1019
  key: 0,
1020
1020
  index: b.menuUrl
1021
1021
  }, {
1022
- title: I(() => [
1022
+ title: x(() => [
1023
1023
  t("span", Ts, [
1024
- D(i(b.icon)) ? (u(), R(r(M), {
1024
+ R(i(b.icon)) ? (u(), P(r(U), {
1025
1025
  key: 0,
1026
1026
  name: i(b.icon),
1027
1027
  size: 16
1028
- }, null, 8, ["name"])) : (u(), _("span", Es, L(v(b.menuName)), 1))
1028
+ }, null, 8, ["name"])) : (u(), _("span", Es, L(f(b.menuName)), 1))
1029
1029
  ]),
1030
1030
  t("span", null, L(b.menuName), 1)
1031
1031
  ]),
1032
- default: I(() => [
1033
- (u(!0), _(A, null, K(b.children, (E) => (u(), R(r(ue), {
1032
+ default: x(() => [
1033
+ (u(!0), _(A, null, K(b.children, (E) => (u(), P(r(ue), {
1034
1034
  key: E.menuUrl,
1035
1035
  index: E.menuUrl
1036
1036
  }, {
1037
- default: I(() => [
1037
+ default: x(() => [
1038
1038
  t("span", Ns, [
1039
- D(i(E.icon)) ? (u(), R(r(M), {
1039
+ R(i(E.icon)) ? (u(), P(r(U), {
1040
1040
  key: 0,
1041
1041
  name: i(E.icon),
1042
1042
  size: 16
1043
- }, null, 8, ["name"])) : (u(), _("span", Us, L(v(E.menuName)), 1))
1043
+ }, null, 8, ["name"])) : (u(), _("span", $s, L(f(E.menuName)), 1))
1044
1044
  ]),
1045
1045
  t("span", null, L(E.menuName), 1)
1046
1046
  ]),
@@ -1048,17 +1048,17 @@ const se = "xto_", qe = (e) => ({
1048
1048
  }, 1032, ["index"]))), 128))
1049
1049
  ]),
1050
1050
  _: 2
1051
- }, 1032, ["index"])) : (u(), R(r(ue), {
1051
+ }, 1032, ["index"])) : (u(), P(r(ue), {
1052
1052
  key: 1,
1053
1053
  index: b.menuUrl
1054
1054
  }, {
1055
- default: I(() => [
1056
- t("span", $s, [
1057
- D(i(b.icon)) ? (u(), R(r(M), {
1055
+ default: x(() => [
1056
+ t("span", Ms, [
1057
+ R(i(b.icon)) ? (u(), P(r(U), {
1058
1058
  key: 0,
1059
1059
  name: i(b.icon),
1060
1060
  size: 16
1061
- }, null, 8, ["name"])) : (u(), _("span", Ms, L(v(b.menuName)), 1))
1061
+ }, null, 8, ["name"])) : (u(), _("span", Us, L(f(b.menuName)), 1))
1062
1062
  ]),
1063
1063
  t("span", null, L(b.menuName), 1)
1064
1064
  ]),
@@ -1070,86 +1070,91 @@ const se = "xto_", qe = (e) => ({
1070
1070
  }, 8, ["default-active", "background-color", "text-color", "active-text-color"])
1071
1071
  ]));
1072
1072
  }
1073
- }), Ds = /* @__PURE__ */ q(Rs, [["__scopeId", "data-v-8b571a75"]]), Ps = { class: "layout__main" }, zs = { class: "layout__header" }, Os = { class: "layout__content" }, As = /* @__PURE__ */ H({
1073
+ }), Ds = /* @__PURE__ */ q(Rs, [["__scopeId", "data-v-8b571a75"]]), Ps = {
1074
+ key: 1,
1075
+ class: "layout__top-menu"
1076
+ }, zs = { class: "layout__main" }, Os = { class: "layout__header" }, As = { class: "layout__content" }, Bs = /* @__PURE__ */ H({
1074
1077
  __name: "index",
1075
1078
  setup(e) {
1076
1079
  const s = J(), o = ee(), a = y(
1077
1080
  () => s.isCollapsed ? "64px" : "210px"
1078
- ), n = y(() => s.layout), c = y(() => n.value === "sidebar"), w = y(() => n.value === "top");
1079
- return (d, h) => {
1080
- const l = ct("router-view");
1081
+ ), n = y(() => s.layout), d = y(() => n.value === "sidebar" || n.value === "mix"), w = y(() => n.value === "top"), c = y(() => (n.value !== "mix", o.menuList));
1082
+ return (h, l) => {
1083
+ const p = ct("router-view");
1081
1084
  return u(), _("div", {
1082
1085
  class: F(["layout", `layout--${n.value}`])
1083
1086
  }, [
1084
- c.value ? (u(), _("aside", {
1087
+ d.value ? (u(), _("aside", {
1085
1088
  key: 0,
1086
1089
  class: "layout__aside",
1087
1090
  style: Fe({ width: a.value })
1088
1091
  }, [
1089
1092
  S(At, {
1090
- "menu-list": r(o).menuList
1093
+ "menu-list": n.value === "mix" ? c.value : r(o).menuList
1091
1094
  }, null, 8, ["menu-list"])
1092
1095
  ], 4)) : O("", !0),
1093
- w.value ? (u(), R(Ds, { key: 1 })) : O("", !0),
1094
- t("div", Ps, [
1095
- t("header", zs, [
1096
- S(xs)
1096
+ w.value ? (u(), _("div", Ps, [
1097
+ S(Ds)
1098
+ ])) : O("", !0),
1099
+ t("div", zs, [
1100
+ t("header", Os, [
1101
+ S(Is)
1097
1102
  ]),
1098
- t("main", Os, [
1099
- S(l)
1103
+ t("main", As, [
1104
+ S(p)
1100
1105
  ])
1101
1106
  ])
1102
1107
  ], 2);
1103
1108
  };
1104
1109
  }
1105
- }), Je = /* @__PURE__ */ q(As, [["__scopeId", "data-v-c45071f5"]]), Bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1110
+ }), Je = /* @__PURE__ */ q(Bs, [["__scopeId", "data-v-0cb5ef3f"]]), Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1106
1111
  __proto__: null,
1107
1112
  default: Je
1108
- }, Symbol.toStringTag, { value: "Module" })), Vs = { class: "tabs-wrapper" }, Fs = { class: "tab-label" }, Ks = ["onClick"], js = /* @__PURE__ */ H({
1113
+ }, Symbol.toStringTag, { value: "Module" })), Fs = { class: "tabs-wrapper" }, Ks = { class: "tab-label" }, js = ["onClick"], qs = /* @__PURE__ */ H({
1109
1114
  __name: "Tabs",
1110
1115
  setup(e) {
1111
1116
  const s = ae(), o = X(), a = y(() => {
1112
- const d = [];
1117
+ const c = [];
1113
1118
  return s.matched.forEach((h) => {
1114
1119
  var l;
1115
- (l = h.meta) != null && l.affix && d.push({
1120
+ (l = h.meta) != null && l.affix && c.push({
1116
1121
  name: h.name,
1117
1122
  title: h.meta.title,
1118
1123
  path: h.path,
1119
1124
  affix: !0
1120
1125
  });
1121
- }), d;
1122
- }), n = y(() => s.path), c = (d) => {
1123
- o.push(d);
1124
- }, w = (d) => {
1125
- const h = a.value.find((l) => l.path === d);
1126
- if (!(h != null && h.affix) && d === n.value) {
1127
- const l = a.value.findIndex((i) => i.path === d), p = a.value[l - 1] || a.value[l + 1];
1126
+ }), c;
1127
+ }), n = y(() => s.path), d = (c) => {
1128
+ o.push(c);
1129
+ }, w = (c) => {
1130
+ const h = a.value.find((l) => l.path === c);
1131
+ if (!(h != null && h.affix) && c === n.value) {
1132
+ const l = a.value.findIndex((i) => i.path === c), p = a.value[l - 1] || a.value[l + 1];
1128
1133
  p && o.push(p.path);
1129
1134
  }
1130
1135
  };
1131
- return (d, h) => (u(), _("div", Vs, [
1136
+ return (c, h) => (u(), _("div", Fs, [
1132
1137
  S(r(dt), {
1133
1138
  modelValue: n.value,
1134
1139
  "onUpdate:modelValue": h[0] || (h[0] = (l) => n.value = l),
1135
1140
  type: "card",
1136
- onTabClick: c
1141
+ onTabClick: d
1137
1142
  }, {
1138
- default: I(() => [
1139
- (u(!0), _(A, null, K(a.value, (l) => (u(), R(r(mt), {
1143
+ default: x(() => [
1144
+ (u(!0), _(A, null, K(a.value, (l) => (u(), P(r(mt), {
1140
1145
  key: l.path,
1141
1146
  name: l.path,
1142
1147
  label: l.title,
1143
1148
  closable: !l.affix
1144
1149
  }, {
1145
- label: I(() => [
1146
- t("span", Fs, [
1150
+ label: x(() => [
1151
+ t("span", Ks, [
1147
1152
  G(L(l.title) + " ", 1),
1148
1153
  l.affix ? O("", !0) : (u(), _("span", {
1149
1154
  key: 0,
1150
1155
  class: "tab-close",
1151
1156
  onClick: Be((p) => w(l.path), ["stop"])
1152
- }, " ✕ ", 8, Ks))
1157
+ }, " ✕ ", 8, js))
1153
1158
  ])
1154
1159
  ]),
1155
1160
  _: 2
@@ -1159,14 +1164,14 @@ const se = "xto_", qe = (e) => ({
1159
1164
  }, 8, ["modelValue"])
1160
1165
  ]));
1161
1166
  }
1162
- }), Ro = /* @__PURE__ */ q(js, [["__scopeId", "data-v-9156d8cd"]]), qs = {}, Ys = { class: "footer" };
1163
- function Ws(e, s) {
1164
- return u(), _("div", Ys, [...s[0] || (s[0] = [
1167
+ }), Do = /* @__PURE__ */ q(qs, [["__scopeId", "data-v-9156d8cd"]]), Ys = {}, Ws = { class: "footer" };
1168
+ function Hs(e, s) {
1169
+ return u(), _("div", Ws, [...s[0] || (s[0] = [
1165
1170
  t("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
1166
1171
  ])]);
1167
1172
  }
1168
- const Do = /* @__PURE__ */ q(qs, [["render", Ws], ["__scopeId", "data-v-4852826a"]]), Hs = () => {
1169
- const e = vt.create({
1173
+ const Po = /* @__PURE__ */ q(Ys, [["render", Hs], ["__scopeId", "data-v-4852826a"]]), Xs = () => {
1174
+ const e = ft.create({
1170
1175
  baseURL: void 0,
1171
1176
  timeout: 3e4,
1172
1177
  headers: {
@@ -1175,7 +1180,7 @@ const Do = /* @__PURE__ */ q(qs, [["render", Ws], ["__scopeId", "data-v-4852826a
1175
1180
  });
1176
1181
  return e.interceptors.request.use(
1177
1182
  (s) => {
1178
- const o = fe(), a = yt() || "Bearer";
1183
+ const o = ve(), a = yt() || "Bearer";
1179
1184
  return o && (s.headers.Authorization = `${a} ${o}`), s;
1180
1185
  },
1181
1186
  (s) => Promise.reject(s)
@@ -1209,7 +1214,7 @@ const Do = /* @__PURE__ */ q(qs, [["render", Ws], ["__scopeId", "data-v-4852826a
1209
1214
  return Promise.reject(s);
1210
1215
  }
1211
1216
  ), e;
1212
- }, oe = Hs(), T = {
1217
+ }, oe = Xs(), T = {
1213
1218
  get(e, s) {
1214
1219
  return oe.get(e, s);
1215
1220
  },
@@ -1226,23 +1231,23 @@ const Do = /* @__PURE__ */ q(qs, [["render", Ws], ["__scopeId", "data-v-4852826a
1226
1231
  return oe.delete(e, s);
1227
1232
  }
1228
1233
  };
1229
- function Xs(e) {
1234
+ function Js(e) {
1230
1235
  return T.post("/user/v1.0/login/by-domain", e);
1231
1236
  }
1232
- function Po() {
1237
+ function zo() {
1233
1238
  return T.put("/user/v1.0/user/logout");
1234
1239
  }
1235
- function Js() {
1240
+ function Qs() {
1236
1241
  return T.get("/user/v1.0/user/get-me");
1237
1242
  }
1238
- function zo(e) {
1243
+ function Oo(e) {
1239
1244
  return T.post("/user/v1.0/refresh", { refreshToken: e });
1240
1245
  }
1241
1246
  const ce = g(""), de = g(""), me = g("");
1242
- function Oo(e) {
1247
+ function Ao(e) {
1243
1248
  e.appId && (ce.value = e.appId), e.clientId && (de.value = e.clientId), e.apiBaseUrl && (me.value = e.apiBaseUrl);
1244
1249
  }
1245
- function $e() {
1250
+ function Me() {
1246
1251
  if (ce.value)
1247
1252
  return ce.value;
1248
1253
  try {
@@ -1251,7 +1256,7 @@ function $e() {
1251
1256
  return "";
1252
1257
  }
1253
1258
  }
1254
- function Qs() {
1259
+ function Zs() {
1255
1260
  if (de.value)
1256
1261
  return de.value;
1257
1262
  try {
@@ -1260,7 +1265,7 @@ function Qs() {
1260
1265
  return "";
1261
1266
  }
1262
1267
  }
1263
- function Ao() {
1268
+ function Bo() {
1264
1269
  if (me.value)
1265
1270
  return me.value;
1266
1271
  try {
@@ -1269,14 +1274,14 @@ function Ao() {
1269
1274
  return "";
1270
1275
  }
1271
1276
  }
1272
- const Bo = {
1277
+ const Vo = {
1273
1278
  appId: ce,
1274
1279
  clientId: de,
1275
1280
  apiBaseUrl: me
1276
- }, Zs = { class: "login" }, Gs = { class: "login__container" }, eo = /* @__PURE__ */ H({
1281
+ }, Gs = { class: "login" }, eo = { class: "login__container" }, to = /* @__PURE__ */ H({
1277
1282
  __name: "index",
1278
1283
  setup(e) {
1279
- const s = X(), o = ae(), a = g(!1), n = g(!1), c = we({
1284
+ const s = X(), o = ae(), a = g(!1), n = g(!1), d = we({
1280
1285
  uid: "",
1281
1286
  password: ""
1282
1287
  }), w = {
@@ -1287,15 +1292,15 @@ const Bo = {
1287
1292
  { required: !0, message: "请输入密码", trigger: "blur" },
1288
1293
  { min: 6, message: "密码长度至少6位", trigger: "blur" }
1289
1294
  ]
1290
- }, d = g(), h = async () => {
1295
+ }, c = g(), h = async () => {
1291
1296
  var l;
1292
1297
  try {
1293
- await ((l = d.value) == null ? void 0 : l.validate()), a.value = !0;
1294
- const p = await Xs({
1295
- appId: $e(),
1296
- clientId: Qs(),
1297
- uid: c.uid,
1298
- password: c.password,
1298
+ await ((l = c.value) == null ? void 0 : l.validate()), a.value = !0;
1299
+ const p = await Js({
1300
+ appId: Me(),
1301
+ clientId: Zs(),
1302
+ uid: d.uid,
1303
+ password: d.password,
1299
1304
  code: !0
1300
1305
  });
1301
1306
  We(p), W.success("登录成功");
@@ -1307,8 +1312,8 @@ const Bo = {
1307
1312
  a.value = !1;
1308
1313
  }
1309
1314
  };
1310
- return (l, p) => (u(), _("div", Zs, [
1311
- t("div", Gs, [
1315
+ return (l, p) => (u(), _("div", Gs, [
1316
+ t("div", eo, [
1312
1317
  p[5] || (p[5] = t("div", { class: "login__header" }, [
1313
1318
  t("img", {
1314
1319
  src: Ye,
@@ -1320,23 +1325,23 @@ const Bo = {
1320
1325
  ], -1)),
1321
1326
  S(r(ht), {
1322
1327
  ref_key: "formRef",
1323
- ref: d,
1324
- model: c,
1328
+ ref: c,
1329
+ model: d,
1325
1330
  rules: w,
1326
1331
  class: "login__form",
1327
1332
  "label-width": "0"
1328
1333
  }, {
1329
- default: I(() => [
1334
+ default: x(() => [
1330
1335
  S(r(re), { prop: "uid" }, {
1331
- default: I(() => [
1336
+ default: x(() => [
1332
1337
  S(r(Oe), {
1333
- modelValue: c.uid,
1334
- "onUpdate:modelValue": p[0] || (p[0] = (i) => c.uid = i),
1338
+ modelValue: d.uid,
1339
+ "onUpdate:modelValue": p[0] || (p[0] = (i) => d.uid = i),
1335
1340
  placeholder: "用户名",
1336
1341
  size: "large"
1337
1342
  }, {
1338
- prefix: I(() => [
1339
- S(r(M), {
1343
+ prefix: x(() => [
1344
+ S(r(U), {
1340
1345
  name: "user",
1341
1346
  size: 18
1342
1347
  })
@@ -1347,18 +1352,18 @@ const Bo = {
1347
1352
  _: 1
1348
1353
  }),
1349
1354
  S(r(re), { prop: "password" }, {
1350
- default: I(() => [
1355
+ default: x(() => [
1351
1356
  S(r(Oe), {
1352
- modelValue: c.password,
1353
- "onUpdate:modelValue": p[1] || (p[1] = (i) => c.password = i),
1357
+ modelValue: d.password,
1358
+ "onUpdate:modelValue": p[1] || (p[1] = (i) => d.password = i),
1354
1359
  type: "password",
1355
1360
  placeholder: "密码",
1356
1361
  size: "large",
1357
1362
  "show-password": "",
1358
1363
  onKeyup: Ve(h, ["enter"])
1359
1364
  }, {
1360
- prefix: I(() => [
1361
- S(r(M), {
1365
+ prefix: x(() => [
1366
+ S(r(U), {
1362
1367
  name: "lock",
1363
1368
  size: 18
1364
1369
  })
@@ -1369,12 +1374,12 @@ const Bo = {
1369
1374
  _: 1
1370
1375
  }),
1371
1376
  S(r(re), null, {
1372
- default: I(() => [
1373
- S(r(ft), {
1377
+ default: x(() => [
1378
+ S(r(vt), {
1374
1379
  modelValue: n.value,
1375
1380
  "onUpdate:modelValue": p[2] || (p[2] = (i) => n.value = i)
1376
1381
  }, {
1377
- default: I(() => [...p[3] || (p[3] = [
1382
+ default: x(() => [...p[3] || (p[3] = [
1378
1383
  G("记住我", -1)
1379
1384
  ])]),
1380
1385
  _: 1
@@ -1383,7 +1388,7 @@ const Bo = {
1383
1388
  _: 1
1384
1389
  }),
1385
1390
  S(r(re), null, {
1386
- default: I(() => [
1391
+ default: x(() => [
1387
1392
  S(r(he), {
1388
1393
  type: "primary",
1389
1394
  size: "large",
@@ -1391,7 +1396,7 @@ const Bo = {
1391
1396
  class: "login__submit",
1392
1397
  onClick: h
1393
1398
  }, {
1394
- default: I(() => [...p[4] || (p[4] = [
1399
+ default: x(() => [...p[4] || (p[4] = [
1395
1400
  G(" 登录 ", -1)
1396
1401
  ])]),
1397
1402
  _: 1
@@ -1408,17 +1413,17 @@ const Bo = {
1408
1413
  ])
1409
1414
  ]));
1410
1415
  }
1411
- }), to = /* @__PURE__ */ q(eo, [["__scopeId", "data-v-f3e724b6"]]), so = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1416
+ }), so = /* @__PURE__ */ q(to, [["__scopeId", "data-v-f3e724b6"]]), oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1412
1417
  __proto__: null,
1413
- default: to
1414
- }, Symbol.toStringTag, { value: "Module" })), oo = { class: "error-page" }, ao = { class: "error-page__content" }, no = /* @__PURE__ */ H({
1418
+ default: so
1419
+ }, Symbol.toStringTag, { value: "Module" })), ao = { class: "error-page" }, no = { class: "error-page__content" }, ro = /* @__PURE__ */ H({
1415
1420
  __name: "404",
1416
1421
  setup(e) {
1417
1422
  const s = X(), o = () => {
1418
1423
  s.push("/");
1419
1424
  };
1420
- return (a, n) => (u(), _("div", oo, [
1421
- t("div", ao, [
1425
+ return (a, n) => (u(), _("div", ao, [
1426
+ t("div", no, [
1422
1427
  n[1] || (n[1] = t("div", { class: "error-page__code" }, "404", -1)),
1423
1428
  n[2] || (n[2] = t("div", { class: "error-page__title" }, "页面不存在", -1)),
1424
1429
  n[3] || (n[3] = t("div", { class: "error-page__desc" }, "抱歉,您访问的页面不存在或已被删除", -1)),
@@ -1426,7 +1431,7 @@ const Bo = {
1426
1431
  type: "primary",
1427
1432
  onClick: o
1428
1433
  }, {
1429
- default: I(() => [...n[0] || (n[0] = [
1434
+ default: x(() => [...n[0] || (n[0] = [
1430
1435
  G("返回首页", -1)
1431
1436
  ])]),
1432
1437
  _: 1
@@ -1434,17 +1439,17 @@ const Bo = {
1434
1439
  ])
1435
1440
  ]));
1436
1441
  }
1437
- }), ro = /* @__PURE__ */ q(no, [["__scopeId", "data-v-c3c12c24"]]), lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1442
+ }), lo = /* @__PURE__ */ q(ro, [["__scopeId", "data-v-c3c12c24"]]), io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1438
1443
  __proto__: null,
1439
- default: ro
1440
- }, Symbol.toStringTag, { value: "Module" })), io = { class: "error-page" }, uo = { class: "error-page__content" }, co = /* @__PURE__ */ H({
1444
+ default: lo
1445
+ }, Symbol.toStringTag, { value: "Module" })), uo = { class: "error-page" }, co = { class: "error-page__content" }, mo = /* @__PURE__ */ H({
1441
1446
  __name: "403",
1442
1447
  setup(e) {
1443
1448
  const s = X(), o = () => {
1444
1449
  s.push("/");
1445
1450
  };
1446
- return (a, n) => (u(), _("div", io, [
1447
- t("div", uo, [
1451
+ return (a, n) => (u(), _("div", uo, [
1452
+ t("div", co, [
1448
1453
  n[1] || (n[1] = t("div", { class: "error-page__code" }, "403", -1)),
1449
1454
  n[2] || (n[2] = t("div", { class: "error-page__title" }, "无访问权限", -1)),
1450
1455
  n[3] || (n[3] = t("div", { class: "error-page__desc" }, "抱歉,您没有权限访问此页面", -1)),
@@ -1452,7 +1457,7 @@ const Bo = {
1452
1457
  type: "primary",
1453
1458
  onClick: o
1454
1459
  }, {
1455
- default: I(() => [...n[0] || (n[0] = [
1460
+ default: x(() => [...n[0] || (n[0] = [
1456
1461
  G("返回首页", -1)
1457
1462
  ])]),
1458
1463
  _: 1
@@ -1460,18 +1465,18 @@ const Bo = {
1460
1465
  ])
1461
1466
  ]));
1462
1467
  }
1463
- }), mo = /* @__PURE__ */ q(co, [["__scopeId", "data-v-dd5f2795"]]), po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1468
+ }), po = /* @__PURE__ */ q(mo, [["__scopeId", "data-v-dd5f2795"]]), ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1464
1469
  __proto__: null,
1465
- default: mo
1470
+ default: po
1466
1471
  }, Symbol.toStringTag, { value: "Module" }));
1467
- function Vo() {
1468
- const e = J(), s = j(), o = Ue(), a = y(() => s.userName || ""), n = y(() => s.userInfo), c = y(() => e.appName), w = y(() => o.isLoggedIn), d = y(() => e.isDark), h = y(() => e.theme), l = y(() => e.isCollapsed), p = y(() => e.layout);
1472
+ function Fo() {
1473
+ const e = J(), s = j(), o = $e(), a = y(() => s.userName || ""), n = y(() => s.userInfo), d = y(() => e.appName), w = y(() => o.isLoggedIn), c = y(() => e.isDark), h = y(() => e.theme), l = y(() => e.isCollapsed), p = y(() => e.layout);
1469
1474
  return {
1470
1475
  userName: a,
1471
1476
  userInfo: n,
1472
- appName: c,
1477
+ appName: d,
1473
1478
  isLoggedIn: w,
1474
- isDark: d,
1479
+ isDark: c,
1475
1480
  theme: h,
1476
1481
  isCollapsed: l,
1477
1482
  layout: p,
@@ -1483,58 +1488,58 @@ function Vo() {
1483
1488
  }
1484
1489
  };
1485
1490
  }
1486
- function Fo() {
1491
+ function Ko() {
1487
1492
  const e = j();
1488
1493
  return {
1489
1494
  isLoggedIn: y(() => e.isLoggedIn)
1490
1495
  };
1491
1496
  }
1492
- function Ko(e, s = {}) {
1493
- const { rules: o, onSubmit: a } = s, n = g(), c = we({ ...e }), w = g(!1), d = g(!1), h = g(!1), l = () => {
1494
- v(), h.value = !1, d.value = !0;
1497
+ function jo(e, s = {}) {
1498
+ const { rules: o, onSubmit: a } = s, n = g(), d = we({ ...e }), w = g(!1), c = g(!1), h = g(!1), l = () => {
1499
+ f(), h.value = !1, c.value = !0;
1495
1500
  }, p = (C) => {
1496
- Object.assign(c, C), h.value = !0, d.value = !0;
1501
+ Object.assign(d, C), h.value = !0, c.value = !0;
1497
1502
  }, i = () => {
1498
- d.value = !1, v();
1499
- }, v = () => {
1503
+ c.value = !1, f();
1504
+ }, f = () => {
1500
1505
  var C;
1501
- Object.keys(e).forEach((P) => {
1502
- c[P] = e[P];
1506
+ Object.keys(e).forEach((D) => {
1507
+ d[D] = e[D];
1503
1508
  }), (C = n.value) == null || C.resetFields();
1504
1509
  };
1505
1510
  return {
1506
1511
  formRef: n,
1507
- formData: c,
1512
+ formData: d,
1508
1513
  rules: o,
1509
1514
  loading: w,
1510
- visible: d,
1515
+ visible: c,
1511
1516
  isEdit: h,
1512
1517
  openAdd: l,
1513
1518
  openEdit: p,
1514
1519
  close: i,
1515
- resetForm: v,
1520
+ resetForm: f,
1516
1521
  handleSubmit: async () => {
1517
1522
  var C;
1518
1523
  try {
1519
- await ((C = n.value) == null ? void 0 : C.validate()), w.value = !0, await (a == null ? void 0 : a(c)), i();
1520
- } catch (P) {
1521
- console.error(P);
1524
+ await ((C = n.value) == null ? void 0 : C.validate()), w.value = !0, await (a == null ? void 0 : a(d)), i();
1525
+ } catch (D) {
1526
+ console.error(D);
1522
1527
  } finally {
1523
1528
  w.value = !1;
1524
1529
  }
1525
1530
  }
1526
1531
  };
1527
1532
  }
1528
- function jo(e) {
1529
- const { fetchData: s, defaultPageSize: o = 10 } = e, a = g(!1), n = g([]), c = g(0), w = g(1), d = g(o), h = we({}), l = async () => {
1533
+ function qo(e) {
1534
+ const { fetchData: s, defaultPageSize: o = 10 } = e, a = g(!1), n = g([]), d = g(0), w = g(1), c = g(o), h = we({}), l = async () => {
1530
1535
  a.value = !0;
1531
1536
  try {
1532
1537
  const b = {
1533
1538
  ...h,
1534
1539
  page: w.value,
1535
- pageSize: d.value
1540
+ pageSize: c.value
1536
1541
  }, E = await s(b);
1537
- n.value = E.list, c.value = E.total;
1542
+ n.value = E.list, d.value = E.total;
1538
1543
  } catch (b) {
1539
1544
  console.error(b);
1540
1545
  } finally {
@@ -1546,47 +1551,47 @@ function jo(e) {
1546
1551
  Object.keys(h).forEach((b) => {
1547
1552
  h[b] = void 0;
1548
1553
  }), w.value = 1, l();
1549
- }, v = (b) => {
1554
+ }, f = (b) => {
1550
1555
  w.value = b, l();
1551
- }, D = (b) => {
1552
- d.value = b, w.value = 1, l();
1556
+ }, R = (b) => {
1557
+ c.value = b, w.value = 1, l();
1553
1558
  }, C = () => {
1554
1559
  l();
1555
- }, P = y(() => ({
1560
+ }, D = y(() => ({
1556
1561
  current: w.value,
1557
- pageSize: d.value,
1558
- total: c.value
1562
+ pageSize: c.value,
1563
+ total: d.value
1559
1564
  }));
1560
1565
  return {
1561
1566
  loading: a,
1562
1567
  data: n,
1563
- total: c,
1568
+ total: d,
1564
1569
  currentPage: w,
1565
- pageSize: d,
1570
+ pageSize: c,
1566
1571
  searchParams: h,
1567
- pagination: P,
1572
+ pagination: D,
1568
1573
  getData: l,
1569
1574
  handleSearch: p,
1570
1575
  handleReset: i,
1571
- handlePageChange: v,
1572
- handleSizeChange: D,
1576
+ handlePageChange: f,
1577
+ handleSizeChange: R,
1573
1578
  refresh: C
1574
1579
  };
1575
1580
  }
1576
- function qo(e) {
1581
+ function Yo(e) {
1577
1582
  return j().isLoggedIn;
1578
1583
  }
1579
- function Yo(e) {
1584
+ function Wo(e) {
1580
1585
  return j().isLoggedIn;
1581
1586
  }
1582
- function Wo() {
1587
+ function Ho() {
1583
1588
  return !0;
1584
1589
  }
1585
1590
  const Qe = [
1586
1591
  {
1587
1592
  path: "/login",
1588
1593
  name: "Login",
1589
- component: () => Promise.resolve().then(() => so),
1594
+ component: () => Promise.resolve().then(() => oo),
1590
1595
  meta: {
1591
1596
  title: "登录",
1592
1597
  hidden: !0
@@ -1595,7 +1600,7 @@ const Qe = [
1595
1600
  {
1596
1601
  path: "/404",
1597
1602
  name: "NotFound",
1598
- component: () => Promise.resolve().then(() => lo),
1603
+ component: () => Promise.resolve().then(() => io),
1599
1604
  meta: {
1600
1605
  title: "404",
1601
1606
  hidden: !0
@@ -1604,7 +1609,7 @@ const Qe = [
1604
1609
  {
1605
1610
  path: "/403",
1606
1611
  name: "Forbidden",
1607
- component: () => Promise.resolve().then(() => po),
1612
+ component: () => Promise.resolve().then(() => ho),
1608
1613
  meta: {
1609
1614
  title: "403",
1610
1615
  hidden: !0
@@ -1619,13 +1624,13 @@ const Qe = [
1619
1624
  }, Ge = {
1620
1625
  path: "/",
1621
1626
  name: "Layout",
1622
- component: () => Promise.resolve().then(() => Bs),
1627
+ component: () => Promise.resolve().then(() => Vs),
1623
1628
  redirect: "/dashboard",
1624
1629
  children: [
1625
1630
  {
1626
1631
  path: "/dashboard",
1627
1632
  name: "Dashboard",
1628
- component: () => import("./index-BvGKg7pX.js"),
1633
+ component: () => import("./index-CVMV9Tfg.js"),
1629
1634
  meta: {
1630
1635
  title: "仪表盘",
1631
1636
  icon: "dashboard",
@@ -1636,7 +1641,7 @@ const Qe = [
1636
1641
  {
1637
1642
  path: "/system/user",
1638
1643
  name: "SystemUser",
1639
- component: () => import("./index-CWqQlqFn.js"),
1644
+ component: () => import("./index-DzerABZq.js"),
1640
1645
  meta: {
1641
1646
  title: "用户管理",
1642
1647
  icon: "user",
@@ -1646,7 +1651,7 @@ const Qe = [
1646
1651
  {
1647
1652
  path: "/system/role",
1648
1653
  name: "SystemRole",
1649
- component: () => import("./index-BDELIN6f.js"),
1654
+ component: () => import("./index-3zeoNaqT.js"),
1650
1655
  meta: {
1651
1656
  title: "角色管理",
1652
1657
  icon: "role",
@@ -1656,7 +1661,7 @@ const Qe = [
1656
1661
  {
1657
1662
  path: "/system/menu",
1658
1663
  name: "SystemMenu",
1659
- component: () => import("./index-8tKP-ZZr.js"),
1664
+ component: () => import("./index-CbEIzXG9.js"),
1660
1665
  meta: {
1661
1666
  title: "菜单管理",
1662
1667
  icon: "menu",
@@ -1664,11 +1669,11 @@ const Qe = [
1664
1669
  }
1665
1670
  }
1666
1671
  ]
1667
- }, Ho = [
1672
+ }, Xo = [
1668
1673
  {
1669
1674
  path: "/dashboard",
1670
1675
  name: "Dashboard",
1671
- component: () => import("./index-BvGKg7pX.js"),
1676
+ component: () => import("./index-CVMV9Tfg.js"),
1672
1677
  meta: {
1673
1678
  title: "仪表盘",
1674
1679
  icon: "dashboard",
@@ -1688,7 +1693,7 @@ const Qe = [
1688
1693
  {
1689
1694
  path: "user",
1690
1695
  name: "SystemUser",
1691
- component: () => import("./index-CWqQlqFn.js"),
1696
+ component: () => import("./index-DzerABZq.js"),
1692
1697
  meta: {
1693
1698
  title: "用户管理",
1694
1699
  icon: "user",
@@ -1698,7 +1703,7 @@ const Qe = [
1698
1703
  {
1699
1704
  path: "role",
1700
1705
  name: "SystemRole",
1701
- component: () => import("./index-BDELIN6f.js"),
1706
+ component: () => import("./index-3zeoNaqT.js"),
1702
1707
  meta: {
1703
1708
  title: "角色管理",
1704
1709
  icon: "role",
@@ -1708,7 +1713,7 @@ const Qe = [
1708
1713
  {
1709
1714
  path: "menu",
1710
1715
  name: "SystemMenu",
1711
- component: () => import("./index-8tKP-ZZr.js"),
1716
+ component: () => import("./index-CbEIzXG9.js"),
1712
1717
  meta: {
1713
1718
  title: "菜单管理",
1714
1719
  icon: "menu",
@@ -1717,7 +1722,7 @@ const Qe = [
1717
1722
  }
1718
1723
  ]
1719
1724
  }
1720
- ], ho = [
1725
+ ], vo = [
1721
1726
  {
1722
1727
  menuCode: "dashboard",
1723
1728
  menuName: "仪表盘",
@@ -1778,7 +1783,7 @@ et.beforeEach(async (e, s, o) => {
1778
1783
  else {
1779
1784
  const n = j();
1780
1785
  n.isLoggedIn || (n.setUserInfo({
1781
- appId: $e(),
1786
+ appId: Me(),
1782
1787
  userId: "1",
1783
1788
  userName: "管理员",
1784
1789
  departmentName: "技术部",
@@ -1786,19 +1791,19 @@ et.beforeEach(async (e, s, o) => {
1786
1791
  mobilePhone: "13800138000",
1787
1792
  positionName: "管理员",
1788
1793
  avatar: ""
1789
- }), ee().setMenuList(ho)), e.name && e.meta.keepAlive && a.addCachedView(e.name), o();
1794
+ }), ee().setMenuList(vo)), e.name && e.meta.keepAlive && a.addCachedView(e.name), o();
1790
1795
  }
1791
1796
  else
1792
1797
  fo.includes(e.path) ? o() : o("/login");
1793
1798
  });
1794
- function Xo() {
1799
+ function Jo() {
1795
1800
  const e = Ce({
1796
1801
  history: Se(),
1797
1802
  routes: [...Qe, Ge, Ze]
1798
1803
  });
1799
1804
  et.matcher = e.matcher;
1800
1805
  }
1801
- function Jo(e, s = {}) {
1806
+ function Qo(e, s = {}) {
1802
1807
  const o = s.indexPath || "/dashboard";
1803
1808
  return {
1804
1809
  path: "/",
@@ -1808,119 +1813,119 @@ function Jo(e, s = {}) {
1808
1813
  children: e
1809
1814
  };
1810
1815
  }
1811
- function Qo(e) {
1816
+ function Zo(e) {
1812
1817
  return Ce({
1813
1818
  history: Se(),
1814
1819
  routes: e,
1815
1820
  scrollBehavior: () => ({ left: 0, top: 0 })
1816
1821
  });
1817
1822
  }
1818
- function Zo(e) {
1823
+ function Go(e) {
1819
1824
  return T.get("/role/list", { params: e });
1820
1825
  }
1821
- function Go(e) {
1826
+ function ea(e) {
1822
1827
  return T.get(`/role/${e}`);
1823
1828
  }
1824
- function ea(e) {
1829
+ function ta(e) {
1825
1830
  return T.post("/role", e);
1826
1831
  }
1827
- function ta(e, s) {
1832
+ function sa(e, s) {
1828
1833
  return T.put(`/role/${e}`, s);
1829
1834
  }
1830
- function sa(e) {
1835
+ function oa(e) {
1831
1836
  return T.delete(`/role/${e}`);
1832
1837
  }
1833
- function oa(e, s) {
1838
+ function aa(e, s) {
1834
1839
  return T.patch(`/role/${e}/status`, { status: s });
1835
1840
  }
1836
- function aa() {
1841
+ function na() {
1837
1842
  return T.get("/user/v1.0/menu/list");
1838
1843
  }
1839
- function vo(e) {
1840
- const s = e || $e();
1844
+ function _o(e) {
1845
+ const s = e || Me();
1841
1846
  return T.get(`/user/v1.0/menu/get-menu?appId=${s}`);
1842
1847
  }
1843
- function na(e) {
1848
+ function ra(e) {
1844
1849
  return T.post("/menu", e);
1845
1850
  }
1846
- function ra(e, s) {
1851
+ function la(e, s) {
1847
1852
  return T.put(`/menu/${e}`, s);
1848
1853
  }
1849
- function la(e) {
1854
+ function ia(e) {
1850
1855
  return T.delete(`/menu/${e}`);
1851
1856
  }
1852
- const _o = ["/login", "/404", "/403"];
1853
- function ia(e, s = {}) {
1854
- const o = s.whiteList || _o, a = s.loginPath || "/login", n = s.homePath || "/";
1855
- e.beforeEach(async (c, w, d) => {
1857
+ const go = ["/login", "/404", "/403"];
1858
+ function ua(e, s = {}) {
1859
+ const o = s.whiteList || go, a = s.loginPath || "/login", n = s.homePath || "/";
1860
+ e.beforeEach(async (d, w, c) => {
1856
1861
  const h = J(), l = j(), p = ee();
1857
- if (h.initTheme(), fe())
1858
- if (c.path === a)
1859
- d({ path: n });
1862
+ if (h.initTheme(), ve())
1863
+ if (d.path === a)
1864
+ c({ path: n });
1860
1865
  else if (l.isLoggedIn)
1861
- c.name && c.meta.keepAlive && h.addCachedView(c.name), d();
1866
+ d.name && d.meta.keepAlive && h.addCachedView(d.name), c();
1862
1867
  else
1863
1868
  try {
1864
1869
  if (s.fetchUserInfo) {
1865
- const v = await s.fetchUserInfo();
1866
- l.setUserInfo(v);
1870
+ const f = await s.fetchUserInfo();
1871
+ l.setUserInfo(f);
1867
1872
  } else {
1868
- const v = await Js();
1869
- l.setUserInfo(v);
1873
+ const f = await Qs();
1874
+ l.setUserInfo(f);
1870
1875
  }
1871
1876
  if (s.fetchMenu) {
1872
- const v = await s.fetchMenu();
1873
- p.setMenuList(v);
1877
+ const f = await s.fetchMenu();
1878
+ p.setMenuList(f);
1874
1879
  } else {
1875
- const v = await vo(s.appId);
1876
- p.setMenuList(v);
1880
+ const f = await _o(s.appId);
1881
+ p.setMenuList(f);
1877
1882
  }
1878
- s.onLoginSuccess && s.onLoginSuccess(), c.name && c.meta.keepAlive && h.addCachedView(c.name), d({ ...c, replace: !0 });
1879
- } catch (v) {
1880
- console.error("获取用户信息失败:", v), l.clearUserInfo(), p.clearMenu(), localStorage.removeItem("token"), localStorage.removeItem("token_type"), localStorage.removeItem("refresh_token"), d({ path: a, query: { redirect: c.fullPath } });
1883
+ s.onLoginSuccess && s.onLoginSuccess(), d.name && d.meta.keepAlive && h.addCachedView(d.name), c({ ...d, replace: !0 });
1884
+ } catch (f) {
1885
+ console.error("获取用户信息失败:", f), l.clearUserInfo(), p.clearMenu(), localStorage.removeItem("token"), localStorage.removeItem("token_type"), localStorage.removeItem("refresh_token"), c({ path: a, query: { redirect: d.fullPath } });
1881
1886
  }
1882
1887
  else
1883
- o.includes(c.path) ? d() : d({ path: a, query: { redirect: c.fullPath } });
1888
+ o.includes(d.path) ? c() : c({ path: a, query: { redirect: d.fullPath } });
1884
1889
  }), e.afterEach(() => {
1885
1890
  });
1886
1891
  }
1887
- function ua(e) {
1892
+ function ca(e) {
1888
1893
  return T.get("/user/list", { params: e });
1889
1894
  }
1890
- function ca(e) {
1895
+ function da(e) {
1891
1896
  return T.get(`/user/${e}`);
1892
1897
  }
1893
- function da(e) {
1898
+ function ma(e) {
1894
1899
  return T.post("/user", e);
1895
1900
  }
1896
- function ma(e, s) {
1901
+ function pa(e, s) {
1897
1902
  return T.put(`/user/${e}`, s);
1898
1903
  }
1899
- function pa(e) {
1904
+ function ha(e) {
1900
1905
  return T.delete(`/user/${e}`);
1901
1906
  }
1902
- function ha(e) {
1907
+ function va(e) {
1903
1908
  return T.post("/user/batch-delete", { ids: e });
1904
1909
  }
1905
1910
  function fa(e, s) {
1906
1911
  return T.patch(`/user/${e}/status`, { status: s });
1907
1912
  }
1908
- function va(e) {
1913
+ function _a(e) {
1909
1914
  return T.post(`/user/${e}/reset-password`);
1910
1915
  }
1911
- var go = /* @__PURE__ */ ((e) => (e[e.ENABLED = 1] = "ENABLED", e[e.DISABLED = 0] = "DISABLED", e))(go || {}), yo = /* @__PURE__ */ ((e) => (e[e.UNKNOWN = 0] = "UNKNOWN", e[e.MALE = 1] = "MALE", e[e.FEMALE = 2] = "FEMALE", e))(yo || {}), ko = /* @__PURE__ */ ((e) => (e[e.DIRECTORY = 0] = "DIRECTORY", e[e.MENU = 1] = "MENU", e[e.BUTTON = 2] = "BUTTON", e))(ko || {});
1912
- const _a = {
1916
+ var yo = /* @__PURE__ */ ((e) => (e[e.ENABLED = 1] = "ENABLED", e[e.DISABLED = 0] = "DISABLED", e))(yo || {}), ko = /* @__PURE__ */ ((e) => (e[e.UNKNOWN = 0] = "UNKNOWN", e[e.MALE = 1] = "MALE", e[e.FEMALE = 2] = "FEMALE", e))(ko || {}), bo = /* @__PURE__ */ ((e) => (e[e.DIRECTORY = 0] = "DIRECTORY", e[e.MENU = 1] = "MENU", e[e.BUTTON = 2] = "BUTTON", e))(bo || {});
1917
+ const ga = {
1913
1918
  1: "启用",
1914
1919
  0: "禁用"
1915
- }, ga = {
1920
+ }, ya = {
1916
1921
  0: "未知",
1917
1922
  1: "男",
1918
1923
  2: "女"
1919
- }, ya = {
1924
+ }, ka = {
1920
1925
  0: "目录",
1921
1926
  1: "菜单",
1922
1927
  2: "按钮"
1923
- }, ka = [
1928
+ }, ba = [
1924
1929
  {
1925
1930
  label: "启用",
1926
1931
  value: 1
@@ -1931,7 +1936,7 @@ const _a = {
1931
1936
  value: 0
1932
1937
  /* DISABLED */
1933
1938
  }
1934
- ], ba = [
1939
+ ], wa = [
1935
1940
  {
1936
1941
  label: "未知",
1937
1942
  value: 0
@@ -1947,7 +1952,7 @@ const _a = {
1947
1952
  value: 2
1948
1953
  /* FEMALE */
1949
1954
  }
1950
- ], wa = [
1955
+ ], Ca = [
1951
1956
  {
1952
1957
  label: "目录",
1953
1958
  value: 0
@@ -1963,100 +1968,100 @@ const _a = {
1963
1968
  value: 2
1964
1969
  /* BUTTON */
1965
1970
  }
1966
- ], Ca = {
1971
+ ], Sa = {
1967
1972
  mounted(e, s) {
1968
1973
  var a;
1969
1974
  j().isLoggedIn || (a = e.parentNode) == null || a.removeChild(e);
1970
1975
  }
1971
1976
  };
1972
1977
  export {
1973
- xt as $,
1974
- Mo as A,
1975
- aa as B,
1976
- vo as C,
1977
- $o as D,
1978
- Uo as E,
1979
- Do as F,
1980
- yo as G,
1981
- xs as H,
1982
- Go as I,
1983
- Zo as J,
1984
- fe as K,
1978
+ It as $,
1979
+ Ro as A,
1980
+ na as B,
1981
+ _o as C,
1982
+ Uo as D,
1983
+ Mo as E,
1984
+ Po as F,
1985
+ ko as G,
1986
+ Is as H,
1987
+ ea as I,
1988
+ Go as J,
1989
+ ve as K,
1985
1990
  Je as L,
1986
- ko as M,
1991
+ bo as M,
1987
1992
  wt as N,
1988
1993
  yt as O,
1989
- ca as P,
1990
- Js as Q,
1991
- ua as R,
1992
- go as S,
1993
- Ro as T,
1994
- qo as U,
1995
- Yo as V,
1994
+ da as P,
1995
+ Qs as Q,
1996
+ ca as R,
1997
+ yo as S,
1998
+ Do as T,
1999
+ Yo as U,
2000
+ Wo as V,
1996
2001
  Xe as W,
1997
2002
  T as X,
1998
- Oo as Y,
1999
- Wo as Z,
2003
+ Ao as Y,
2004
+ Ho as Z,
2000
2005
  q as _,
2001
- ka as a,
2006
+ ba as a,
2002
2007
  Ge as a0,
2003
- f as a1,
2008
+ v as a1,
2004
2009
  le as a2,
2005
- Xs as a3,
2006
- Po as a4,
2007
- ho as a5,
2008
- Ca as a6,
2009
- zo as a7,
2010
- va as a8,
2011
- Xo as a9,
2010
+ Js as a3,
2011
+ zo as a4,
2012
+ vo as a5,
2013
+ Sa as a6,
2014
+ Oo as a7,
2015
+ _a as a8,
2016
+ Jo as a9,
2012
2017
  et as aa,
2013
- No as ab,
2018
+ $o as ab,
2014
2019
  ie as ac,
2015
- It as ad,
2020
+ xt as ad,
2016
2021
  St as ae,
2017
2022
  bt as af,
2018
2023
  gt as ag,
2019
2024
  Ct as ah,
2020
2025
  We as ai,
2021
2026
  kt as aj,
2022
- ia as ak,
2027
+ ua as ak,
2023
2028
  Qe as al,
2024
- ra as am,
2025
- ta as an,
2026
- oa as ao,
2027
- ma as ap,
2029
+ la as am,
2030
+ sa as an,
2031
+ aa as ao,
2032
+ pa as ap,
2028
2033
  fa as aq,
2029
- Vo as ar,
2034
+ Fo as ar,
2030
2035
  J as as,
2031
- Fo as at,
2032
- Ue as au,
2033
- Ko as av,
2036
+ Ko as at,
2037
+ $e as au,
2038
+ jo as av,
2034
2039
  ee as aw,
2035
- jo as ax,
2040
+ qo as ax,
2036
2041
  j as ay,
2037
- wa as b,
2038
- mo as c,
2039
- ba as d,
2040
- ga as e,
2041
- ya as f,
2042
- ro as g,
2042
+ Ca as b,
2043
+ po as c,
2044
+ wa as d,
2045
+ ya as e,
2046
+ ka as f,
2047
+ lo as g,
2043
2048
  At as h,
2044
- to as i,
2045
- _a as j,
2046
- Bo as k,
2047
- ha as l,
2049
+ so as i,
2050
+ ga as j,
2051
+ Vo as k,
2052
+ va as l,
2048
2053
  He as m,
2049
- Jo as n,
2050
- na as o,
2051
- ea as p,
2052
- Qo as q,
2053
- da as r,
2054
- Ho as s,
2055
- la as t,
2056
- sa as u,
2057
- pa as v,
2054
+ Qo as n,
2055
+ ra as o,
2056
+ ta as p,
2057
+ Zo as q,
2058
+ ma as r,
2059
+ Xo as s,
2060
+ ia as t,
2061
+ oa as u,
2062
+ ha as v,
2058
2063
  Ze as w,
2059
- Ao as x,
2060
- $e as y,
2061
- Qs as z
2064
+ Bo as x,
2065
+ Me as y,
2066
+ Zs as z
2062
2067
  };