xto-fronted 0.4.18 → 0.4.20

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