xto-fronted 0.4.91 → 0.4.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.vue.d.ts +2 -0
- package/dist/api/auth.d.ts +8 -0
- package/dist/api/system.d.ts +16 -0
- package/dist/api/user.d.ts +13 -0
- package/dist/components/Layout/Footer.vue.d.ts +2 -0
- package/dist/components/Layout/Header.vue.d.ts +5 -0
- package/dist/components/Layout/MixTopMenu.vue.d.ts +5 -0
- package/dist/components/Layout/Sidebar.vue.d.ts +11 -0
- package/dist/components/Layout/SidebarMenuItem.vue.d.ts +5 -0
- package/dist/components/Layout/Tabs.vue.d.ts +2 -0
- package/dist/components/Layout/TopMenu.vue.d.ts +5 -0
- package/dist/components/Layout/index.vue.d.ts +2 -0
- package/dist/composables/useApp.d.ts +29 -0
- package/dist/composables/useAuth.d.ts +6 -0
- package/dist/composables/useForm.d.ts +20 -0
- package/dist/composables/useI18n.d.ts +30 -0
- package/dist/composables/useTable.d.ts +29 -0
- package/dist/directives/permission.d.ts +4 -0
- package/dist/enums/index.d.ts +32 -0
- package/dist/index-B4U8Dy2W.js +641 -0
- package/dist/index-Cp8kqjtv.js +515 -0
- package/dist/index-D59X6HmM.js +479 -0
- package/dist/index-lJrh5CFc.js +189 -0
- package/dist/index-me_Uu2lk.js +4270 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.es.js +95 -0
- package/dist/index.umd.js +8 -0
- package/dist/main.d.ts +0 -0
- package/dist/router/dynamicRoutes.d.ts +30 -0
- package/dist/router/guards.d.ts +17 -0
- package/dist/router/index.d.ts +6 -0
- package/dist/router/layoutRoute.d.ts +22 -0
- package/dist/router/staticRoutes.d.ts +2 -0
- package/dist/stores/app.d.ts +93 -0
- package/dist/stores/auth.d.ts +41 -0
- package/dist/stores/index.d.ts +10 -0
- package/dist/stores/locale.d.ts +42 -0
- package/dist/stores/menu.d.ts +83 -0
- package/dist/stores/user.d.ts +92 -0
- package/dist/style.css +1 -0
- package/dist/utils/auth.d.ts +27 -0
- package/dist/utils/config.d.ts +30 -0
- package/dist/utils/permission.d.ts +17 -0
- package/dist/utils/request.d.ts +29 -0
- package/dist/utils/storage.d.ts +24 -0
- package/dist/views/dashboard/index.vue.d.ts +2 -0
- package/dist/views/error/403.vue.d.ts +2 -0
- package/dist/views/error/404.vue.d.ts +2 -0
- package/dist/views/login/index.vue.d.ts +4 -0
- package/dist/views/system/menu/index.vue.d.ts +4 -0
- package/dist/views/system/role/index.vue.d.ts +4 -0
- package/dist/views/system/user/index.vue.d.ts +4 -0
- package/package.json +1 -1
- package/src/components/Layout/Sidebar.vue +6 -6
- package/dist/assets/404-Bq0LY5Cd.js +0 -1
- package/dist/assets/404-Cw_4ZCL6.css +0 -1
- package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +0 -1
- package/dist/assets/index-7ZZxpSfk.js +0 -1
- package/dist/assets/index-BJUe8VUp.js +0 -1
- package/dist/assets/index-BRR97dc6.js +0 -1
- package/dist/assets/index-BlOR_ICg.js +0 -1
- package/dist/assets/index-BlRslYYI.css +0 -1
- package/dist/assets/index-BudArKxR.css +0 -1
- package/dist/assets/index-BzbOWBCV.js +0 -1
- package/dist/assets/index-CFhWBbxk.css +0 -1
- package/dist/assets/index-CH6aTfYg.css +0 -1
- package/dist/assets/index-CT5f37nN.js +0 -1
- package/dist/assets/index-Ce-kjtEM.js +0 -2
- package/dist/assets/index-Cpew6d-v.css +0 -1
- package/dist/assets/index-DkkuYBgT.css +0 -1
- package/dist/assets/index-vfvEFrCH.css +0 -1
- package/dist/assets/index-wVLLAoVp.js +0 -1
- package/dist/assets/vendor-DZmPBJ9d.js +0 -16
- package/dist/assets/vue-vendor-DjmFuEnG.js +0 -29
- package/dist/assets/xto-base-B5HYOo6i.js +0 -1
- package/dist/assets/xto-base-CL2NKZJJ.css +0 -1
- package/dist/assets/xto-business--V1F5Gwb.css +0 -1
- package/dist/assets/xto-core-DZYp_YAR.js +0 -1
- package/dist/assets/xto-data-MxZsiJgi.css +0 -1
- package/dist/assets/xto-data-ogck6x_i.js +0 -1
- package/dist/assets/xto-feedback-Bxx38c3P.css +0 -1
- package/dist/assets/xto-feedback-C0-6cAL6.js +0 -1
- package/dist/assets/xto-form-Cu6q3VLG.css +0 -1
- package/dist/assets/xto-form-IDg_78Vf.js +0 -1
- package/dist/assets/xto-layout-BDD6sSlM.css +0 -1
- package/dist/assets/xto-navigation-CPYLzfu7.js +0 -1
- package/dist/assets/xto-navigation-XfpyMpEo.css +0 -1
- package/dist/index.html +0 -28
|
@@ -0,0 +1,4270 @@
|
|
|
1
|
+
import { ref as P, computed as j, watch as Xe, defineComponent as Ae, resolveComponent as Rt, openBlock as w, createBlock as ce, unref as y, withCtx as X, createElementBlock as E, Fragment as he, renderList as ge, createElementVNode as s, toDisplayString as G, createCommentVNode as le, normalizeClass as _e, withDirectives as lt, vShow as ts, createVNode as R, createTextVNode as Fe, onMounted as wt, onUnmounted as yt, vModelText as bt, Transition as Ve, withModifiers as it, normalizeStyle as Ye, reactive as kt, createStaticVNode as nt, withKeys as ss } from "vue";
|
|
2
|
+
import { defineStore as Je } from "pinia";
|
|
3
|
+
import { useRoute as qe, useRouter as ze, createRouter as xt, createWebHistory as Ct } from "vue-router";
|
|
4
|
+
import { SubMenu as _t, MenuItem as He, Menu as Nt, Tabs as ns, TabPane as os } from "@xto/navigation";
|
|
5
|
+
import { Icon as Z, Button as je } from "@xto/base";
|
|
6
|
+
import { Drawer as Et, Message as Ie } from "@xto/feedback";
|
|
7
|
+
import { Form as rs, FormItem as mt, Input as Ut, Checkbox as as } from "@xto/form";
|
|
8
|
+
import ls from "axios";
|
|
9
|
+
import { createLocaleProvider as is, getSupportedLocales as cs, useLocale as us } from "@xto/core/locale";
|
|
10
|
+
const ot = P(""), rt = P(""), at = P("");
|
|
11
|
+
function ds(o) {
|
|
12
|
+
o.appId && (ot.value = o.appId), o.clientId && (rt.value = o.clientId), o.apiBaseUrl && (at.value = o.apiBaseUrl);
|
|
13
|
+
}
|
|
14
|
+
function ct() {
|
|
15
|
+
if (ot.value)
|
|
16
|
+
return ot.value;
|
|
17
|
+
try {
|
|
18
|
+
return "";
|
|
19
|
+
} catch {
|
|
20
|
+
return "";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function zt() {
|
|
24
|
+
if (rt.value)
|
|
25
|
+
return rt.value;
|
|
26
|
+
try {
|
|
27
|
+
return "";
|
|
28
|
+
} catch {
|
|
29
|
+
return "";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function fs() {
|
|
33
|
+
if (at.value)
|
|
34
|
+
return at.value;
|
|
35
|
+
try {
|
|
36
|
+
return "";
|
|
37
|
+
} catch {
|
|
38
|
+
return "";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const qa = {
|
|
42
|
+
appId: ot,
|
|
43
|
+
clientId: rt,
|
|
44
|
+
apiBaseUrl: at
|
|
45
|
+
}, Ke = "xto_", Dt = (o) => ({
|
|
46
|
+
get(i) {
|
|
47
|
+
const v = o.getItem(Ke + i);
|
|
48
|
+
if (!v) return null;
|
|
49
|
+
try {
|
|
50
|
+
return JSON.parse(v);
|
|
51
|
+
} catch {
|
|
52
|
+
return v;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
set(i, v) {
|
|
56
|
+
if (v == null) {
|
|
57
|
+
o.removeItem(Ke + i);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const m = typeof v == "string" ? v : JSON.stringify(v);
|
|
61
|
+
o.setItem(Ke + i, m);
|
|
62
|
+
},
|
|
63
|
+
remove(i) {
|
|
64
|
+
o.removeItem(Ke + i);
|
|
65
|
+
},
|
|
66
|
+
clear() {
|
|
67
|
+
Object.keys(o).forEach((v) => {
|
|
68
|
+
v.startsWith(Ke) && o.removeItem(v);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}), et = Dt(window.localStorage), tt = Dt(window.sessionStorage), q = {
|
|
72
|
+
get: et.get,
|
|
73
|
+
set: et.set,
|
|
74
|
+
remove: et.remove,
|
|
75
|
+
clear: et.clear
|
|
76
|
+
}, Ga = {
|
|
77
|
+
get: tt.get,
|
|
78
|
+
set: tt.set,
|
|
79
|
+
remove: tt.remove,
|
|
80
|
+
clear: tt.clear
|
|
81
|
+
}, De = Je("app", () => {
|
|
82
|
+
const o = P(q.get("appName") || "XTO App"), i = P(q.get("indexPath") || "/dashboard"), v = P(q.get("isDark") || !1), m = P(q.get("theme") || "light"), f = P(q.get("layout") || "sidebar"), k = P(q.get("isCollapsed") || !1), S = P(q.get("showTabs") ?? !0), g = P(q.get("showFooter") ?? !0), M = P(q.get("showBreadcrumb") ?? !0), _ = P(q.get("primaryColor") || "#409eff"), x = P([]), L = P([]), C = j(() => v.value ? "dark" : "light"), K = (D) => {
|
|
83
|
+
o.value = D, q.set("appName", D);
|
|
84
|
+
}, Q = (D) => {
|
|
85
|
+
i.value = D, q.set("indexPath", D);
|
|
86
|
+
}, U = () => {
|
|
87
|
+
v.value = !v.value, m.value = v.value ? "dark" : "light", V();
|
|
88
|
+
}, T = (D) => {
|
|
89
|
+
m.value = D, v.value = D === "dark", V();
|
|
90
|
+
}, V = () => {
|
|
91
|
+
const D = document.documentElement;
|
|
92
|
+
v.value ? D.classList.add("dark") : D.classList.remove("dark"), q.set("isDark", v.value), q.set("theme", m.value);
|
|
93
|
+
}, I = () => {
|
|
94
|
+
k.value = !k.value, q.set("isCollapsed", k.value);
|
|
95
|
+
}, W = (D) => {
|
|
96
|
+
f.value = D, q.set("layout", D);
|
|
97
|
+
}, Y = () => {
|
|
98
|
+
S.value = !S.value, q.set("showTabs", S.value);
|
|
99
|
+
}, ne = () => {
|
|
100
|
+
g.value = !g.value, q.set("showFooter", g.value);
|
|
101
|
+
}, O = () => {
|
|
102
|
+
M.value = !M.value, q.set("showBreadcrumb", M.value);
|
|
103
|
+
}, A = (D) => {
|
|
104
|
+
_.value = D, document.documentElement.style.setProperty("--color-primary", D), q.set("primaryColor", D);
|
|
105
|
+
}, J = (D) => {
|
|
106
|
+
x.value.includes(D) || x.value.push(D);
|
|
107
|
+
}, ee = (D) => {
|
|
108
|
+
const ie = x.value.indexOf(D);
|
|
109
|
+
ie > -1 && x.value.splice(ie, 1);
|
|
110
|
+
}, $ = () => {
|
|
111
|
+
x.value = [];
|
|
112
|
+
}, re = (D) => {
|
|
113
|
+
L.value = D;
|
|
114
|
+
}, te = () => {
|
|
115
|
+
V(), _.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", _.value);
|
|
116
|
+
};
|
|
117
|
+
return Xe(v, V), {
|
|
118
|
+
appName: o,
|
|
119
|
+
indexPath: i,
|
|
120
|
+
isDark: v,
|
|
121
|
+
theme: m,
|
|
122
|
+
layout: f,
|
|
123
|
+
isCollapsed: k,
|
|
124
|
+
showTabs: S,
|
|
125
|
+
showFooter: g,
|
|
126
|
+
showBreadcrumb: M,
|
|
127
|
+
primaryColor: _,
|
|
128
|
+
cachedViews: x,
|
|
129
|
+
mixSubMenus: L,
|
|
130
|
+
themeClass: C,
|
|
131
|
+
setAppName: K,
|
|
132
|
+
setIndexPath: Q,
|
|
133
|
+
toggleTheme: U,
|
|
134
|
+
toggleCollapse: I,
|
|
135
|
+
setTheme: T,
|
|
136
|
+
setLayout: W,
|
|
137
|
+
toggleTabs: Y,
|
|
138
|
+
toggleFooter: ne,
|
|
139
|
+
toggleBreadcrumb: O,
|
|
140
|
+
setPrimaryColor: A,
|
|
141
|
+
addCachedView: J,
|
|
142
|
+
removeCachedView: ee,
|
|
143
|
+
clearCachedViews: $,
|
|
144
|
+
setMixSubMenus: re,
|
|
145
|
+
initTheme: te
|
|
146
|
+
};
|
|
147
|
+
}), ht = "menu_list", vt = "permission_list", ps = {
|
|
148
|
+
menuCode: "home",
|
|
149
|
+
menuName: "首页",
|
|
150
|
+
menuUrl: "/dashboard",
|
|
151
|
+
icon: "home",
|
|
152
|
+
closable: !1,
|
|
153
|
+
isDefault: !1,
|
|
154
|
+
isOut: !1
|
|
155
|
+
};
|
|
156
|
+
function Ft(o) {
|
|
157
|
+
return o.filter((i) => i.type !== 1).map((i) => ({
|
|
158
|
+
...i,
|
|
159
|
+
children: i.children ? Ft(i.children) : void 0
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
function ms(o) {
|
|
163
|
+
const i = [];
|
|
164
|
+
function v(m) {
|
|
165
|
+
m.forEach((f) => {
|
|
166
|
+
f.type === 1 && f.menuCode && i.push(f.menuCode), f.children && v(f.children);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
return v(o), i;
|
|
170
|
+
}
|
|
171
|
+
const Pe = Je("menu", () => {
|
|
172
|
+
const o = P(q.get(ht) || []), i = P(q.get(vt) || []), v = j(() => o.value.length > 0);
|
|
173
|
+
return {
|
|
174
|
+
menuList: o,
|
|
175
|
+
permissions: i,
|
|
176
|
+
hasMenu: v,
|
|
177
|
+
setMenuList: (S) => {
|
|
178
|
+
i.value = ms(S), q.set(vt, i.value);
|
|
179
|
+
const g = Ft(S);
|
|
180
|
+
o.value = [ps, ...g], q.set(ht, o.value);
|
|
181
|
+
},
|
|
182
|
+
clearMenu: () => {
|
|
183
|
+
o.value = [], i.value = [], q.remove(ht), q.remove(vt);
|
|
184
|
+
},
|
|
185
|
+
hasPermission: (S) => Array.isArray(S) ? S.some((g) => i.value.includes(g)) : i.value.includes(S)
|
|
186
|
+
};
|
|
187
|
+
}), St = "/vite.svg", gt = "user_info", Se = Je("user", () => {
|
|
188
|
+
const o = P(q.get(gt)), i = j(() => !!o.value), v = j(() => {
|
|
189
|
+
var L;
|
|
190
|
+
return ((L = o.value) == null ? void 0 : L.userId) || "";
|
|
191
|
+
}), m = j(() => {
|
|
192
|
+
var L;
|
|
193
|
+
return ((L = o.value) == null ? void 0 : L.userName) || "";
|
|
194
|
+
}), f = j(() => {
|
|
195
|
+
var L;
|
|
196
|
+
return ((L = o.value) == null ? void 0 : L.departmentName) || "";
|
|
197
|
+
}), k = j(() => {
|
|
198
|
+
var L;
|
|
199
|
+
return ((L = o.value) == null ? void 0 : L.email) || "";
|
|
200
|
+
}), S = j(() => {
|
|
201
|
+
var L;
|
|
202
|
+
return ((L = o.value) == null ? void 0 : L.mobilePhone) || "";
|
|
203
|
+
}), g = j(() => {
|
|
204
|
+
var L;
|
|
205
|
+
return ((L = o.value) == null ? void 0 : L.positionName) || "";
|
|
206
|
+
}), M = j(() => {
|
|
207
|
+
var L;
|
|
208
|
+
return ((L = o.value) == null ? void 0 : L.avatar) || "";
|
|
209
|
+
});
|
|
210
|
+
return {
|
|
211
|
+
userInfo: o,
|
|
212
|
+
isLoggedIn: i,
|
|
213
|
+
userId: v,
|
|
214
|
+
userName: m,
|
|
215
|
+
departmentName: f,
|
|
216
|
+
email: k,
|
|
217
|
+
mobilePhone: S,
|
|
218
|
+
positionName: g,
|
|
219
|
+
avatar: M,
|
|
220
|
+
setUserInfo: (L) => {
|
|
221
|
+
o.value = L, q.set(gt, L);
|
|
222
|
+
},
|
|
223
|
+
clearUserInfo: () => {
|
|
224
|
+
o.value = null, q.remove(gt);
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
}), $t = "token", Mt = "token_type", Lt = "refresh_token", It = "expires_time", At = "refresh_time", Tt = "code", ut = () => q.get($t), hs = (o) => {
|
|
228
|
+
q.set($t, o);
|
|
229
|
+
}, vs = () => q.get(Mt), gs = (o) => {
|
|
230
|
+
q.set(Mt, o);
|
|
231
|
+
}, Ka = () => q.get(Lt), _s = (o) => {
|
|
232
|
+
q.set(Lt, o);
|
|
233
|
+
}, ws = () => q.get(It), ys = (o) => {
|
|
234
|
+
q.set(It, o);
|
|
235
|
+
}, Ha = () => q.get(At), bs = (o) => {
|
|
236
|
+
q.set(At, o);
|
|
237
|
+
}, Wa = () => q.get(Tt), ks = (o) => {
|
|
238
|
+
q.set(Tt, o);
|
|
239
|
+
}, Vt = (o) => {
|
|
240
|
+
hs(o.access_token), gs(o.token_type || "Bearer"), _s(o.refresh_token), ys(o.expires_time), bs(o.refresh_time), o.code && ks(o.code);
|
|
241
|
+
}, We = () => {
|
|
242
|
+
q.remove($t), q.remove(Mt), q.remove(Lt), q.remove(It), q.remove(At), q.remove(Tt);
|
|
243
|
+
}, xs = () => {
|
|
244
|
+
const o = ws();
|
|
245
|
+
return o ? Date.now() > o : !0;
|
|
246
|
+
}, jt = () => !!ut() && !xs(), Ze = Je("auth", () => {
|
|
247
|
+
const o = P(ut()), i = j(() => jt()), v = P(""), m = P(""), f = P(""), k = P("/login");
|
|
248
|
+
return {
|
|
249
|
+
token: o,
|
|
250
|
+
isLoggedIn: i,
|
|
251
|
+
baseUrl: v,
|
|
252
|
+
appId: m,
|
|
253
|
+
clientId: f,
|
|
254
|
+
loginPath: k,
|
|
255
|
+
login: (C) => {
|
|
256
|
+
o.value = C.access_token, Vt(C);
|
|
257
|
+
},
|
|
258
|
+
logout: () => {
|
|
259
|
+
o.value = null, We();
|
|
260
|
+
},
|
|
261
|
+
setBaseUrl: (C) => {
|
|
262
|
+
v.value = C;
|
|
263
|
+
},
|
|
264
|
+
setAppId: (C) => {
|
|
265
|
+
m.value = C;
|
|
266
|
+
},
|
|
267
|
+
setClientId: (C) => {
|
|
268
|
+
f.value = C;
|
|
269
|
+
},
|
|
270
|
+
setLoginPath: (C) => {
|
|
271
|
+
k.value = C;
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
}), Cs = { class: "menu-item__content" }, Ns = { class: "menu-item__icon" }, Es = {
|
|
275
|
+
key: 1,
|
|
276
|
+
class: "menu-item__char"
|
|
277
|
+
}, Ss = { class: "menu-item__text" }, $s = { class: "menu-item__content" }, Ms = {
|
|
278
|
+
key: 0,
|
|
279
|
+
class: "menu-item__icon"
|
|
280
|
+
}, Ls = {
|
|
281
|
+
key: 1,
|
|
282
|
+
class: "menu-item__char"
|
|
283
|
+
}, Is = { class: "menu-item__text" }, As = /* @__PURE__ */ Ae({
|
|
284
|
+
__name: "SidebarMenuItem",
|
|
285
|
+
props: {
|
|
286
|
+
menu: {}
|
|
287
|
+
},
|
|
288
|
+
setup(o) {
|
|
289
|
+
const i = o, v = /* @__PURE__ */ new Set([
|
|
290
|
+
"arrow-up",
|
|
291
|
+
"arrow-down",
|
|
292
|
+
"arrow-left",
|
|
293
|
+
"arrow-right",
|
|
294
|
+
"caret-down",
|
|
295
|
+
"caret-right",
|
|
296
|
+
"plus",
|
|
297
|
+
"minus",
|
|
298
|
+
"close",
|
|
299
|
+
"check",
|
|
300
|
+
"edit",
|
|
301
|
+
"delete",
|
|
302
|
+
"copy",
|
|
303
|
+
"download",
|
|
304
|
+
"upload",
|
|
305
|
+
"refresh",
|
|
306
|
+
"search",
|
|
307
|
+
"filter",
|
|
308
|
+
"more",
|
|
309
|
+
"setting",
|
|
310
|
+
"share",
|
|
311
|
+
"loading",
|
|
312
|
+
"info",
|
|
313
|
+
"success",
|
|
314
|
+
"warning",
|
|
315
|
+
"error",
|
|
316
|
+
"question",
|
|
317
|
+
"user",
|
|
318
|
+
"user-add",
|
|
319
|
+
"user-group",
|
|
320
|
+
"logout",
|
|
321
|
+
"login",
|
|
322
|
+
"file",
|
|
323
|
+
"folder",
|
|
324
|
+
"folder-open",
|
|
325
|
+
"document",
|
|
326
|
+
"image",
|
|
327
|
+
"video",
|
|
328
|
+
"music",
|
|
329
|
+
"camera",
|
|
330
|
+
"mail",
|
|
331
|
+
"phone",
|
|
332
|
+
"chat",
|
|
333
|
+
"bell",
|
|
334
|
+
"message",
|
|
335
|
+
"eye",
|
|
336
|
+
"eye-off",
|
|
337
|
+
"calendar",
|
|
338
|
+
"clock",
|
|
339
|
+
"history",
|
|
340
|
+
"timer",
|
|
341
|
+
"location",
|
|
342
|
+
"map",
|
|
343
|
+
"globe",
|
|
344
|
+
"star",
|
|
345
|
+
"heart",
|
|
346
|
+
"thumb-up",
|
|
347
|
+
"link",
|
|
348
|
+
"external-link",
|
|
349
|
+
"lock",
|
|
350
|
+
"unlock",
|
|
351
|
+
"key",
|
|
352
|
+
"home",
|
|
353
|
+
"menu",
|
|
354
|
+
"menu-fold",
|
|
355
|
+
"menu-unfold",
|
|
356
|
+
"sidebar-fold",
|
|
357
|
+
"sidebar-expand",
|
|
358
|
+
"sidebar-left",
|
|
359
|
+
"dashboard",
|
|
360
|
+
"chart",
|
|
361
|
+
"chart-pie",
|
|
362
|
+
"chart-line",
|
|
363
|
+
"report",
|
|
364
|
+
"analytics",
|
|
365
|
+
"system",
|
|
366
|
+
"permission",
|
|
367
|
+
"role",
|
|
368
|
+
"user-manage",
|
|
369
|
+
"log",
|
|
370
|
+
"notification",
|
|
371
|
+
"app",
|
|
372
|
+
"list",
|
|
373
|
+
"grid",
|
|
374
|
+
"fullscreen",
|
|
375
|
+
"fullscreen-exit",
|
|
376
|
+
"zoom-in",
|
|
377
|
+
"zoom-out",
|
|
378
|
+
"print",
|
|
379
|
+
"bookmark",
|
|
380
|
+
"tag",
|
|
381
|
+
"code",
|
|
382
|
+
"terminal",
|
|
383
|
+
"database",
|
|
384
|
+
"server",
|
|
385
|
+
"cloud",
|
|
386
|
+
"gift",
|
|
387
|
+
"moon",
|
|
388
|
+
"sun",
|
|
389
|
+
"theme",
|
|
390
|
+
"skin"
|
|
391
|
+
]), m = (g) => {
|
|
392
|
+
if (!g || g === "") return "";
|
|
393
|
+
if (g.startsWith("tineco-icon-")) {
|
|
394
|
+
const _ = g.replace("tineco-icon-", "");
|
|
395
|
+
return {
|
|
396
|
+
home: "home",
|
|
397
|
+
dashboard: "dashboard",
|
|
398
|
+
system: "system",
|
|
399
|
+
user: "user",
|
|
400
|
+
role: "role",
|
|
401
|
+
menu: "list",
|
|
402
|
+
setting: "setting",
|
|
403
|
+
file: "file",
|
|
404
|
+
folder: "folder",
|
|
405
|
+
chart: "chart",
|
|
406
|
+
report: "report",
|
|
407
|
+
analytics: "analytics"
|
|
408
|
+
}[_] || _;
|
|
409
|
+
}
|
|
410
|
+
return {
|
|
411
|
+
dashboard: "dashboard",
|
|
412
|
+
system: "system",
|
|
413
|
+
user: "user",
|
|
414
|
+
role: "role",
|
|
415
|
+
menu: "list",
|
|
416
|
+
setting: "setting",
|
|
417
|
+
home: "home",
|
|
418
|
+
chart: "chart",
|
|
419
|
+
report: "report",
|
|
420
|
+
analytics: "analytics",
|
|
421
|
+
permission: "permission",
|
|
422
|
+
log: "log",
|
|
423
|
+
notification: "notification",
|
|
424
|
+
app: "app",
|
|
425
|
+
list: "list",
|
|
426
|
+
grid: "grid"
|
|
427
|
+
}[g] || g;
|
|
428
|
+
}, f = (g) => g ? g.charAt(0) : "", k = (g) => v.has(g), S = j(() => i.menu.children && i.menu.children.length > 0);
|
|
429
|
+
return (g, M) => {
|
|
430
|
+
const _ = Rt("SidebarMenuItem", !0);
|
|
431
|
+
return S.value ? (w(), ce(y(_t), {
|
|
432
|
+
key: 0,
|
|
433
|
+
index: o.menu.menuUrl
|
|
434
|
+
}, {
|
|
435
|
+
title: X(() => [
|
|
436
|
+
s("span", Cs, [
|
|
437
|
+
s("span", Ns, [
|
|
438
|
+
k(m(o.menu.icon)) ? (w(), ce(y(Z), {
|
|
439
|
+
key: 0,
|
|
440
|
+
name: m(o.menu.icon),
|
|
441
|
+
size: 16
|
|
442
|
+
}, null, 8, ["name"])) : (w(), E("span", Es, G(f(o.menu.menuName)), 1))
|
|
443
|
+
]),
|
|
444
|
+
s("span", Ss, G(o.menu.menuName), 1)
|
|
445
|
+
])
|
|
446
|
+
]),
|
|
447
|
+
default: X(() => [
|
|
448
|
+
(w(!0), E(he, null, ge(o.menu.children, (x) => (w(), ce(_, {
|
|
449
|
+
key: x.menuUrl,
|
|
450
|
+
menu: x
|
|
451
|
+
}, null, 8, ["menu"]))), 128))
|
|
452
|
+
]),
|
|
453
|
+
_: 1
|
|
454
|
+
}, 8, ["index"])) : (w(), ce(y(He), {
|
|
455
|
+
key: 1,
|
|
456
|
+
index: o.menu.menuUrl
|
|
457
|
+
}, {
|
|
458
|
+
default: X(() => [
|
|
459
|
+
s("span", $s, [
|
|
460
|
+
o.menu.menuName !== "首页" ? (w(), E("span", Ms, [
|
|
461
|
+
k(m(o.menu.icon)) ? (w(), ce(y(Z), {
|
|
462
|
+
key: 0,
|
|
463
|
+
name: m(o.menu.icon),
|
|
464
|
+
size: 16
|
|
465
|
+
}, null, 8, ["name"])) : (w(), E("span", Ls, G(f(o.menu.menuName)), 1))
|
|
466
|
+
])) : le("", !0),
|
|
467
|
+
s("span", Is, G(o.menu.menuName), 1)
|
|
468
|
+
])
|
|
469
|
+
]),
|
|
470
|
+
_: 1
|
|
471
|
+
}, 8, ["index"]));
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
}), $e = (o, i) => {
|
|
475
|
+
const v = o.__vccOpts || o;
|
|
476
|
+
for (const [m, f] of i)
|
|
477
|
+
v[m] = f;
|
|
478
|
+
return v;
|
|
479
|
+
}, Ts = /* @__PURE__ */ $e(As, [["__scopeId", "data-v-d160ae6a"]]), Os = {
|
|
480
|
+
key: 0,
|
|
481
|
+
class: "sidebar__logo"
|
|
482
|
+
}, Us = {
|
|
483
|
+
key: 1,
|
|
484
|
+
class: "sidebar__user"
|
|
485
|
+
}, Bs = { class: "sidebar__user-info" }, Ps = { class: "sidebar__user-name" }, Rs = { class: "sidebar__user-role" }, Bt = "sidebar_opened_menus", zs = /* @__PURE__ */ Ae({
|
|
486
|
+
__name: "Sidebar",
|
|
487
|
+
props: {
|
|
488
|
+
menuList: { default: () => [] },
|
|
489
|
+
showLogo: { type: Boolean, default: !0 },
|
|
490
|
+
showUser: { type: Boolean, default: !0 }
|
|
491
|
+
},
|
|
492
|
+
setup(o) {
|
|
493
|
+
const i = o, v = qe(), m = ze(), f = Pe(), k = Se(), S = Ze(), g = De(), M = j(() => i.menuList.length > 0 ? i.menuList : f.menuList), _ = j(() => g.isCollapsed), x = j(() => v.path), L = P(q.get(Bt) || []);
|
|
494
|
+
Xe(L, (I) => {
|
|
495
|
+
q.set(Bt, I);
|
|
496
|
+
}, { deep: !0 });
|
|
497
|
+
const C = (I, W, Y = []) => {
|
|
498
|
+
var ne;
|
|
499
|
+
for (const O of I) {
|
|
500
|
+
if (W === O.menuUrl || W.startsWith(O.menuUrl + "/"))
|
|
501
|
+
return [...Y, O.menuUrl];
|
|
502
|
+
if ((ne = O.children) != null && ne.length) {
|
|
503
|
+
const A = C(O.children, W, [...Y, O.menuUrl]);
|
|
504
|
+
if (A) return A;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
return null;
|
|
508
|
+
};
|
|
509
|
+
Xe([() => v.path, M], ([I, W]) => {
|
|
510
|
+
if (W.length > 0) {
|
|
511
|
+
const Y = C(W, I);
|
|
512
|
+
if (Y) {
|
|
513
|
+
const ne = Y.slice(0, -1), O = /* @__PURE__ */ new Set([...L.value, ...ne]);
|
|
514
|
+
L.value = Array.from(O);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}, { immediate: !0 });
|
|
518
|
+
const K = j(() => g.isDark ? "#1d1e1f" : "#fff"), Q = j(() => g.isDark ? "#cfd3dc" : "#303133"), U = j(() => "#409eff"), T = (I) => {
|
|
519
|
+
I && I !== v.path && m.push(I);
|
|
520
|
+
}, V = () => {
|
|
521
|
+
S.logout(), k.clearUserInfo(), f.clearMenu(), m.push("/login");
|
|
522
|
+
};
|
|
523
|
+
return (I, W) => (w(), E("div", {
|
|
524
|
+
class: _e(["sidebar", { "sidebar--collapsed": _.value }])
|
|
525
|
+
}, [
|
|
526
|
+
i.showLogo ? (w(), E("div", Os, [
|
|
527
|
+
W[2] || (W[2] = s("img", {
|
|
528
|
+
src: St,
|
|
529
|
+
alt: "Logo",
|
|
530
|
+
class: "sidebar__logo-img"
|
|
531
|
+
}, null, -1)),
|
|
532
|
+
lt(s("span", { class: "sidebar__logo-text" }, G(y(g).appName), 513), [
|
|
533
|
+
[ts, !_.value]
|
|
534
|
+
])
|
|
535
|
+
])) : le("", !0),
|
|
536
|
+
R(y(Nt), {
|
|
537
|
+
modelValue: x.value,
|
|
538
|
+
"onUpdate:modelValue": W[0] || (W[0] = (Y) => x.value = Y),
|
|
539
|
+
openeds: L.value,
|
|
540
|
+
"onUpdate:openeds": W[1] || (W[1] = (Y) => L.value = Y),
|
|
541
|
+
mode: "vertical",
|
|
542
|
+
collapse: _.value,
|
|
543
|
+
"collapse-transition": !1,
|
|
544
|
+
"background-color": K.value,
|
|
545
|
+
"text-color": Q.value,
|
|
546
|
+
"active-text-color": U.value,
|
|
547
|
+
class: "sidebar__menu",
|
|
548
|
+
onSelect: T
|
|
549
|
+
}, {
|
|
550
|
+
default: X(() => [
|
|
551
|
+
(w(!0), E(he, null, ge(M.value, (Y) => (w(), ce(Ts, {
|
|
552
|
+
key: Y.menuUrl,
|
|
553
|
+
menu: Y
|
|
554
|
+
}, null, 8, ["menu"]))), 128))
|
|
555
|
+
]),
|
|
556
|
+
_: 1
|
|
557
|
+
}, 8, ["modelValue", "openeds", "collapse", "background-color", "text-color", "active-text-color"]),
|
|
558
|
+
i.showUser && !_.value ? (w(), E("div", Us, [
|
|
559
|
+
s("div", Bs, [
|
|
560
|
+
s("span", Ps, G(y(k).userName), 1),
|
|
561
|
+
s("span", Rs, G(y(k).departmentName), 1)
|
|
562
|
+
]),
|
|
563
|
+
R(y(je), {
|
|
564
|
+
type: "text",
|
|
565
|
+
size: "small",
|
|
566
|
+
onClick: V
|
|
567
|
+
}, {
|
|
568
|
+
default: X(() => [...W[3] || (W[3] = [
|
|
569
|
+
Fe("退出", -1)
|
|
570
|
+
])]),
|
|
571
|
+
_: 1
|
|
572
|
+
})
|
|
573
|
+
])) : le("", !0)
|
|
574
|
+
], 2));
|
|
575
|
+
}
|
|
576
|
+
}), Pt = /* @__PURE__ */ $e(zs, [["__scopeId", "data-v-4138a8d5"]]), Ds = { class: "header" }, Fs = { class: "header__left" }, Vs = {
|
|
577
|
+
key: 0,
|
|
578
|
+
class: "header__breadcrumb"
|
|
579
|
+
}, js = {
|
|
580
|
+
key: 0,
|
|
581
|
+
class: "breadcrumb-separator"
|
|
582
|
+
}, qs = { class: "header__right" }, Gs = {
|
|
583
|
+
key: 0,
|
|
584
|
+
class: "header__search-dropdown"
|
|
585
|
+
}, Ks = {
|
|
586
|
+
key: 0,
|
|
587
|
+
class: "header__search-results"
|
|
588
|
+
}, Hs = ["onClick"], Ws = {
|
|
589
|
+
key: 0,
|
|
590
|
+
class: "header__search-icon"
|
|
591
|
+
}, Xs = {
|
|
592
|
+
key: 1,
|
|
593
|
+
class: "header__search-char"
|
|
594
|
+
}, Ys = { class: "header__search-item-title" }, Js = {
|
|
595
|
+
key: 1,
|
|
596
|
+
class: "header__search-item-parent"
|
|
597
|
+
}, Zs = {
|
|
598
|
+
key: 1,
|
|
599
|
+
class: "header__search-empty"
|
|
600
|
+
}, Qs = ["title"], en = { class: "header__avatar" }, tn = { class: "header__user-name" }, sn = {
|
|
601
|
+
key: 0,
|
|
602
|
+
class: "header__dropdown"
|
|
603
|
+
}, nn = { class: "header__dropdown-header" }, on = { class: "header__dropdown-avatar" }, rn = { class: "header__dropdown-info" }, an = { class: "header__dropdown-name" }, ln = { class: "header__dropdown-role" }, cn = { class: "header__dropdown-menu" }, un = { class: "settings-drawer" }, dn = { class: "settings-section" }, fn = { class: "settings-layout-options" }, pn = ["onClick"], mn = { class: "layout-option__preview" }, hn = {
|
|
604
|
+
key: 0,
|
|
605
|
+
class: "layout-preview-sidebar"
|
|
606
|
+
}, vn = {
|
|
607
|
+
key: 1,
|
|
608
|
+
class: "layout-preview-top"
|
|
609
|
+
}, gn = {
|
|
610
|
+
key: 2,
|
|
611
|
+
class: "layout-preview-mix"
|
|
612
|
+
}, _n = { class: "layout-option__label" }, wn = { class: "settings-section" }, yn = { class: "settings-color-options" }, bn = ["title", "onClick"], kn = { class: "settings-section" }, xn = { class: "settings-switch-list" }, Cn = { class: "settings-switch-item" }, Nn = { class: "settings-switch-item" }, En = /* @__PURE__ */ Ae({
|
|
613
|
+
__name: "Header",
|
|
614
|
+
setup(o) {
|
|
615
|
+
const i = qe(), v = ze(), m = De(), f = Se(), k = Ze(), S = Pe(), g = P(!1), M = P(!1), _ = P(null), x = P(!1), L = P(!1), C = P(""), K = P(null), Q = P(!1), U = [
|
|
616
|
+
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
617
|
+
{ value: "top", label: "顶部菜单", icon: "menu" },
|
|
618
|
+
{ value: "mix", label: "混合菜单", icon: "grid" }
|
|
619
|
+
], T = [
|
|
620
|
+
{ value: "#409eff", label: "默认蓝" },
|
|
621
|
+
{ value: "#1890ff", label: "科技蓝" },
|
|
622
|
+
{ value: "#52c41a", label: "极光绿" },
|
|
623
|
+
{ value: "#faad14", label: "日落橙" },
|
|
624
|
+
{ value: "#f5222d", label: "薄暮红" },
|
|
625
|
+
{ value: "#722ed1", label: "酱紫" }
|
|
626
|
+
], V = j(() => i.matched.filter((B) => B.meta && B.meta.title).map((B) => ({
|
|
627
|
+
title: B.meta.title,
|
|
628
|
+
path: B.path
|
|
629
|
+
}))), I = (H, B = "") => {
|
|
630
|
+
const t = [];
|
|
631
|
+
return H.forEach((e) => {
|
|
632
|
+
e.children && e.children.length > 0 ? t.push(...I(e.children, e.menuName)) : t.push({ ...e, parentTitle: B, title: e.menuName, path: e.menuUrl });
|
|
633
|
+
}), t;
|
|
634
|
+
}, W = /* @__PURE__ */ new Set([
|
|
635
|
+
"arrow-up",
|
|
636
|
+
"arrow-down",
|
|
637
|
+
"arrow-left",
|
|
638
|
+
"arrow-right",
|
|
639
|
+
"caret-down",
|
|
640
|
+
"caret-right",
|
|
641
|
+
"plus",
|
|
642
|
+
"minus",
|
|
643
|
+
"close",
|
|
644
|
+
"check",
|
|
645
|
+
"edit",
|
|
646
|
+
"delete",
|
|
647
|
+
"copy",
|
|
648
|
+
"download",
|
|
649
|
+
"upload",
|
|
650
|
+
"refresh",
|
|
651
|
+
"search",
|
|
652
|
+
"filter",
|
|
653
|
+
"more",
|
|
654
|
+
"setting",
|
|
655
|
+
"share",
|
|
656
|
+
"loading",
|
|
657
|
+
"info",
|
|
658
|
+
"success",
|
|
659
|
+
"warning",
|
|
660
|
+
"error",
|
|
661
|
+
"question",
|
|
662
|
+
"user",
|
|
663
|
+
"user-add",
|
|
664
|
+
"user-group",
|
|
665
|
+
"logout",
|
|
666
|
+
"login",
|
|
667
|
+
"file",
|
|
668
|
+
"folder",
|
|
669
|
+
"folder-open",
|
|
670
|
+
"document",
|
|
671
|
+
"image",
|
|
672
|
+
"video",
|
|
673
|
+
"music",
|
|
674
|
+
"camera",
|
|
675
|
+
"mail",
|
|
676
|
+
"phone",
|
|
677
|
+
"chat",
|
|
678
|
+
"bell",
|
|
679
|
+
"message",
|
|
680
|
+
"eye",
|
|
681
|
+
"eye-off",
|
|
682
|
+
"calendar",
|
|
683
|
+
"clock",
|
|
684
|
+
"history",
|
|
685
|
+
"timer",
|
|
686
|
+
"location",
|
|
687
|
+
"map",
|
|
688
|
+
"globe",
|
|
689
|
+
"star",
|
|
690
|
+
"heart",
|
|
691
|
+
"thumb-up",
|
|
692
|
+
"link",
|
|
693
|
+
"external-link",
|
|
694
|
+
"lock",
|
|
695
|
+
"unlock",
|
|
696
|
+
"key",
|
|
697
|
+
"home",
|
|
698
|
+
"menu",
|
|
699
|
+
"menu-fold",
|
|
700
|
+
"menu-unfold",
|
|
701
|
+
"sidebar-fold",
|
|
702
|
+
"sidebar-expand",
|
|
703
|
+
"sidebar-left",
|
|
704
|
+
"dashboard",
|
|
705
|
+
"chart",
|
|
706
|
+
"chart-pie",
|
|
707
|
+
"chart-line",
|
|
708
|
+
"report",
|
|
709
|
+
"analytics",
|
|
710
|
+
"system",
|
|
711
|
+
"permission",
|
|
712
|
+
"role",
|
|
713
|
+
"user-manage",
|
|
714
|
+
"log",
|
|
715
|
+
"notification",
|
|
716
|
+
"app",
|
|
717
|
+
"list",
|
|
718
|
+
"grid",
|
|
719
|
+
"fullscreen",
|
|
720
|
+
"fullscreen-exit",
|
|
721
|
+
"zoom-in",
|
|
722
|
+
"zoom-out",
|
|
723
|
+
"print",
|
|
724
|
+
"bookmark",
|
|
725
|
+
"tag",
|
|
726
|
+
"code",
|
|
727
|
+
"terminal",
|
|
728
|
+
"database",
|
|
729
|
+
"server",
|
|
730
|
+
"cloud",
|
|
731
|
+
"gift",
|
|
732
|
+
"moon",
|
|
733
|
+
"sun",
|
|
734
|
+
"theme",
|
|
735
|
+
"skin"
|
|
736
|
+
]), Y = (H) => {
|
|
737
|
+
if (!H || H === "") return "";
|
|
738
|
+
if (H.startsWith("tineco-icon-")) {
|
|
739
|
+
const t = H.replace("tineco-icon-", "");
|
|
740
|
+
return {
|
|
741
|
+
home: "home",
|
|
742
|
+
dashboard: "dashboard",
|
|
743
|
+
system: "system",
|
|
744
|
+
user: "user",
|
|
745
|
+
role: "role",
|
|
746
|
+
menu: "list",
|
|
747
|
+
setting: "setting",
|
|
748
|
+
file: "file",
|
|
749
|
+
folder: "folder",
|
|
750
|
+
chart: "chart",
|
|
751
|
+
report: "report",
|
|
752
|
+
analytics: "analytics"
|
|
753
|
+
}[t] || t;
|
|
754
|
+
}
|
|
755
|
+
return {
|
|
756
|
+
dashboard: "dashboard",
|
|
757
|
+
system: "system",
|
|
758
|
+
user: "user",
|
|
759
|
+
role: "role",
|
|
760
|
+
menu: "list",
|
|
761
|
+
setting: "setting",
|
|
762
|
+
home: "home",
|
|
763
|
+
chart: "chart",
|
|
764
|
+
report: "report",
|
|
765
|
+
analytics: "analytics",
|
|
766
|
+
permission: "permission",
|
|
767
|
+
log: "log",
|
|
768
|
+
notification: "notification",
|
|
769
|
+
app: "app",
|
|
770
|
+
list: "list",
|
|
771
|
+
grid: "grid"
|
|
772
|
+
}[H] || H;
|
|
773
|
+
}, ne = (H) => H ? H.charAt(0) : "", O = (H) => W.has(H), A = j(() => C.value.trim() ? I(S.menuList).filter(
|
|
774
|
+
(B) => B.title.toLowerCase().includes(C.value.toLowerCase())
|
|
775
|
+
) : []), J = j(() => m.layout), ee = () => {
|
|
776
|
+
m.toggleCollapse();
|
|
777
|
+
}, $ = () => {
|
|
778
|
+
m.toggleTheme();
|
|
779
|
+
}, re = () => {
|
|
780
|
+
M.value = !0;
|
|
781
|
+
}, te = (H) => {
|
|
782
|
+
m.setLayout(H), M.value = !1;
|
|
783
|
+
}, D = (H) => {
|
|
784
|
+
Q.value = H;
|
|
785
|
+
const B = document.documentElement;
|
|
786
|
+
H ? B.classList.add("grey-mode") : B.classList.remove("grey-mode");
|
|
787
|
+
}, ie = () => {
|
|
788
|
+
D(!Q.value), M.value = !1;
|
|
789
|
+
}, de = () => {
|
|
790
|
+
m.toggleTheme(), M.value = !1;
|
|
791
|
+
}, Ce = () => {
|
|
792
|
+
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
793
|
+
}, fe = () => {
|
|
794
|
+
x.value = !!document.fullscreenElement;
|
|
795
|
+
}, be = () => {
|
|
796
|
+
g.value = !g.value;
|
|
797
|
+
}, ke = () => {
|
|
798
|
+
g.value = !1;
|
|
799
|
+
}, we = () => {
|
|
800
|
+
L.value = !1, C.value = "";
|
|
801
|
+
}, Te = (H) => {
|
|
802
|
+
v.push(H), we();
|
|
803
|
+
}, Ne = (H) => {
|
|
804
|
+
m.setPrimaryColor(H), M.value = !1;
|
|
805
|
+
}, Oe = () => {
|
|
806
|
+
ke(), v.push("/profile");
|
|
807
|
+
}, N = () => {
|
|
808
|
+
ke(), v.push("/change-password");
|
|
809
|
+
}, Ue = () => {
|
|
810
|
+
ke(), k.logout(), f.clearUserInfo(), S.clearMenu(), v.push("/login");
|
|
811
|
+
}, Be = (H) => {
|
|
812
|
+
_.value && !_.value.contains(H.target) && ke(), K.value && !K.value.contains(H.target) && we();
|
|
813
|
+
}, Me = (H) => {
|
|
814
|
+
H.key === "Escape" && (we(), ke());
|
|
815
|
+
};
|
|
816
|
+
return wt(() => {
|
|
817
|
+
document.addEventListener("click", Be), document.addEventListener("fullscreenchange", fe), document.addEventListener("keydown", Me), m.initTheme(), Q.value = document.documentElement.classList.contains("grey-mode");
|
|
818
|
+
}), yt(() => {
|
|
819
|
+
document.removeEventListener("click", Be), document.removeEventListener("fullscreenchange", fe), document.removeEventListener("keydown", Me);
|
|
820
|
+
}), (H, B) => {
|
|
821
|
+
var t;
|
|
822
|
+
return w(), E("div", Ds, [
|
|
823
|
+
s("div", Fs, [
|
|
824
|
+
s("div", {
|
|
825
|
+
class: "header__collapse",
|
|
826
|
+
onClick: ee
|
|
827
|
+
}, [
|
|
828
|
+
R(y(Z), {
|
|
829
|
+
name: y(m).isCollapsed ? "menu-unfold" : "menu-fold",
|
|
830
|
+
size: 18
|
|
831
|
+
}, null, 8, ["name"])
|
|
832
|
+
]),
|
|
833
|
+
y(m).showBreadcrumb ? (w(), E("div", Vs, [
|
|
834
|
+
(w(!0), E(he, null, ge(V.value, (e, r) => (w(), E("span", {
|
|
835
|
+
key: e.path
|
|
836
|
+
}, [
|
|
837
|
+
r > 0 ? (w(), E("span", js, "/")) : le("", !0),
|
|
838
|
+
s("span", {
|
|
839
|
+
class: _e({ "is-current": r === V.value.length - 1 })
|
|
840
|
+
}, G(e.title), 3)
|
|
841
|
+
]))), 128))
|
|
842
|
+
])) : le("", !0)
|
|
843
|
+
]),
|
|
844
|
+
s("div", qs, [
|
|
845
|
+
s("div", {
|
|
846
|
+
class: "header__search",
|
|
847
|
+
ref_key: "searchRef",
|
|
848
|
+
ref: K
|
|
849
|
+
}, [
|
|
850
|
+
R(y(Z), {
|
|
851
|
+
name: "search",
|
|
852
|
+
size: 14,
|
|
853
|
+
class: "header__search-icon"
|
|
854
|
+
}),
|
|
855
|
+
lt(s("input", {
|
|
856
|
+
"onUpdate:modelValue": B[0] || (B[0] = (e) => C.value = e),
|
|
857
|
+
type: "text",
|
|
858
|
+
class: "header__search-input",
|
|
859
|
+
placeholder: "搜索菜单...",
|
|
860
|
+
onFocus: B[1] || (B[1] = (e) => L.value = !0)
|
|
861
|
+
}, null, 544), [
|
|
862
|
+
[bt, C.value]
|
|
863
|
+
]),
|
|
864
|
+
R(Ve, { name: "search-dropdown" }, {
|
|
865
|
+
default: X(() => [
|
|
866
|
+
L.value && (A.value.length > 0 || C.value) ? (w(), E("div", Gs, [
|
|
867
|
+
A.value.length > 0 ? (w(), E("div", Ks, [
|
|
868
|
+
(w(!0), E(he, null, ge(A.value, (e) => (w(), E("div", {
|
|
869
|
+
key: e.path,
|
|
870
|
+
class: "header__search-item",
|
|
871
|
+
onClick: (r) => Te(e.path)
|
|
872
|
+
}, [
|
|
873
|
+
e.title !== "首页" ? (w(), E("span", Ws, [
|
|
874
|
+
O(Y(e.icon)) ? (w(), ce(y(Z), {
|
|
875
|
+
key: 0,
|
|
876
|
+
name: Y(e.icon),
|
|
877
|
+
size: 16
|
|
878
|
+
}, null, 8, ["name"])) : (w(), E("span", Xs, G(ne(e.title)), 1))
|
|
879
|
+
])) : le("", !0),
|
|
880
|
+
s("span", Ys, G(e.title), 1),
|
|
881
|
+
e.parentTitle ? (w(), E("span", Js, G(e.parentTitle), 1)) : le("", !0)
|
|
882
|
+
], 8, Hs))), 128))
|
|
883
|
+
])) : (w(), E("div", Zs, " 未找到匹配的菜单 "))
|
|
884
|
+
])) : le("", !0)
|
|
885
|
+
]),
|
|
886
|
+
_: 1
|
|
887
|
+
})
|
|
888
|
+
], 512),
|
|
889
|
+
s("div", {
|
|
890
|
+
class: "header__action",
|
|
891
|
+
onClick: Ce,
|
|
892
|
+
title: x.value ? "退出全屏" : "全屏"
|
|
893
|
+
}, [
|
|
894
|
+
R(y(Z), {
|
|
895
|
+
name: x.value ? "fullscreen-exit" : "fullscreen",
|
|
896
|
+
size: 16
|
|
897
|
+
}, null, 8, ["name"])
|
|
898
|
+
], 8, Qs),
|
|
899
|
+
s("div", {
|
|
900
|
+
class: "header__action",
|
|
901
|
+
onClick: re,
|
|
902
|
+
title: "换肤设置"
|
|
903
|
+
}, [
|
|
904
|
+
R(y(Z), {
|
|
905
|
+
name: "skin",
|
|
906
|
+
size: 16
|
|
907
|
+
})
|
|
908
|
+
]),
|
|
909
|
+
s("div", {
|
|
910
|
+
class: "header__action",
|
|
911
|
+
onClick: $,
|
|
912
|
+
title: "切换主题"
|
|
913
|
+
}, [
|
|
914
|
+
R(y(Z), {
|
|
915
|
+
name: y(m).isDark ? "sun" : "moon",
|
|
916
|
+
size: 16
|
|
917
|
+
}, null, 8, ["name"])
|
|
918
|
+
]),
|
|
919
|
+
s("div", {
|
|
920
|
+
class: "header__user",
|
|
921
|
+
ref_key: "dropdownRef",
|
|
922
|
+
ref: _
|
|
923
|
+
}, [
|
|
924
|
+
s("div", {
|
|
925
|
+
class: "header__user-trigger",
|
|
926
|
+
onClick: it(be, ["stop"])
|
|
927
|
+
}, [
|
|
928
|
+
s("div", en, [
|
|
929
|
+
s("span", null, G(((t = y(f).userName) == null ? void 0 : t.charAt(0)) || "U"), 1)
|
|
930
|
+
]),
|
|
931
|
+
s("span", tn, G(y(f).userName), 1),
|
|
932
|
+
s("span", {
|
|
933
|
+
class: _e(["header__user-arrow", { "is-active": g.value }])
|
|
934
|
+
}, "▼", 2)
|
|
935
|
+
]),
|
|
936
|
+
R(Ve, { name: "dropdown" }, {
|
|
937
|
+
default: X(() => {
|
|
938
|
+
var e;
|
|
939
|
+
return [
|
|
940
|
+
g.value ? (w(), E("div", sn, [
|
|
941
|
+
s("div", nn, [
|
|
942
|
+
s("div", on, [
|
|
943
|
+
s("span", null, G(((e = y(f).userName) == null ? void 0 : e.charAt(0)) || "U"), 1)
|
|
944
|
+
]),
|
|
945
|
+
s("div", rn, [
|
|
946
|
+
s("div", an, G(y(f).userName), 1),
|
|
947
|
+
s("div", ln, G(y(f).departmentName), 1)
|
|
948
|
+
])
|
|
949
|
+
]),
|
|
950
|
+
B[7] || (B[7] = s("div", { class: "header__dropdown-divider" }, null, -1)),
|
|
951
|
+
s("div", cn, [
|
|
952
|
+
s("div", {
|
|
953
|
+
class: "header__dropdown-item",
|
|
954
|
+
onClick: Oe
|
|
955
|
+
}, [
|
|
956
|
+
R(y(Z), {
|
|
957
|
+
name: "user",
|
|
958
|
+
size: 16
|
|
959
|
+
}),
|
|
960
|
+
B[3] || (B[3] = s("span", null, "个人信息", -1))
|
|
961
|
+
]),
|
|
962
|
+
s("div", {
|
|
963
|
+
class: "header__dropdown-item",
|
|
964
|
+
onClick: N
|
|
965
|
+
}, [
|
|
966
|
+
R(y(Z), {
|
|
967
|
+
name: "lock",
|
|
968
|
+
size: 16
|
|
969
|
+
}),
|
|
970
|
+
B[4] || (B[4] = s("span", null, "修改密码", -1))
|
|
971
|
+
]),
|
|
972
|
+
B[6] || (B[6] = s("div", { class: "header__dropdown-divider" }, null, -1)),
|
|
973
|
+
s("div", {
|
|
974
|
+
class: "header__dropdown-item header__dropdown-item--danger",
|
|
975
|
+
onClick: Ue
|
|
976
|
+
}, [
|
|
977
|
+
R(y(Z), {
|
|
978
|
+
name: "logout",
|
|
979
|
+
size: 16
|
|
980
|
+
}),
|
|
981
|
+
B[5] || (B[5] = s("span", null, "退出登录", -1))
|
|
982
|
+
])
|
|
983
|
+
])
|
|
984
|
+
])) : le("", !0)
|
|
985
|
+
];
|
|
986
|
+
}),
|
|
987
|
+
_: 1
|
|
988
|
+
})
|
|
989
|
+
], 512)
|
|
990
|
+
]),
|
|
991
|
+
R(y(Et), {
|
|
992
|
+
modelValue: M.value,
|
|
993
|
+
"onUpdate:modelValue": B[2] || (B[2] = (e) => M.value = e),
|
|
994
|
+
title: "换肤设置",
|
|
995
|
+
direction: "rtl",
|
|
996
|
+
size: "320px"
|
|
997
|
+
}, {
|
|
998
|
+
default: X(() => [
|
|
999
|
+
s("div", un, [
|
|
1000
|
+
s("div", dn, [
|
|
1001
|
+
B[11] || (B[11] = s("div", { class: "settings-title" }, "布局模式", -1)),
|
|
1002
|
+
s("div", fn, [
|
|
1003
|
+
(w(), E(he, null, ge(U, (e) => s("div", {
|
|
1004
|
+
key: e.value,
|
|
1005
|
+
class: _e(["layout-option", { "is-active": J.value === e.value }]),
|
|
1006
|
+
onClick: (r) => te(e.value)
|
|
1007
|
+
}, [
|
|
1008
|
+
s("div", mn, [
|
|
1009
|
+
e.value === "sidebar" ? (w(), E("div", hn, [...B[8] || (B[8] = [
|
|
1010
|
+
s("div", { class: "preview-aside" }, null, -1),
|
|
1011
|
+
s("div", { class: "preview-main" }, [
|
|
1012
|
+
s("div", { class: "preview-header" }),
|
|
1013
|
+
s("div", { class: "preview-content" })
|
|
1014
|
+
], -1)
|
|
1015
|
+
])])) : e.value === "top" ? (w(), E("div", vn, [...B[9] || (B[9] = [
|
|
1016
|
+
s("div", { class: "preview-header-full" }, null, -1),
|
|
1017
|
+
s("div", { class: "preview-content-full" }, null, -1)
|
|
1018
|
+
])])) : (w(), E("div", gn, [...B[10] || (B[10] = [
|
|
1019
|
+
s("div", { class: "preview-header-mix" }, [
|
|
1020
|
+
s("div", { class: "preview-mix-left" })
|
|
1021
|
+
], -1),
|
|
1022
|
+
s("div", { class: "preview-mix-body" }, [
|
|
1023
|
+
s("div", { class: "preview-mix-aside" }),
|
|
1024
|
+
s("div", { class: "preview-mix-content" })
|
|
1025
|
+
], -1)
|
|
1026
|
+
])]))
|
|
1027
|
+
]),
|
|
1028
|
+
s("span", _n, G(e.label), 1)
|
|
1029
|
+
], 10, pn)), 64))
|
|
1030
|
+
])
|
|
1031
|
+
]),
|
|
1032
|
+
s("div", wn, [
|
|
1033
|
+
B[12] || (B[12] = s("div", { class: "settings-title" }, "主题色", -1)),
|
|
1034
|
+
s("div", yn, [
|
|
1035
|
+
(w(), E(he, null, ge(T, (e) => s("div", {
|
|
1036
|
+
key: e.value,
|
|
1037
|
+
class: _e(["color-option", { "is-active": y(m).primaryColor === e.value }]),
|
|
1038
|
+
style: Ye({ backgroundColor: e.value }),
|
|
1039
|
+
title: e.label,
|
|
1040
|
+
onClick: (r) => Ne(e.value)
|
|
1041
|
+
}, [
|
|
1042
|
+
y(m).primaryColor === e.value ? (w(), ce(y(Z), {
|
|
1043
|
+
key: 0,
|
|
1044
|
+
name: "check",
|
|
1045
|
+
size: 12,
|
|
1046
|
+
color: "#fff"
|
|
1047
|
+
})) : le("", !0)
|
|
1048
|
+
], 14, bn)), 64))
|
|
1049
|
+
])
|
|
1050
|
+
]),
|
|
1051
|
+
s("div", kn, [
|
|
1052
|
+
B[17] || (B[17] = s("div", { class: "settings-title" }, "功能设置", -1)),
|
|
1053
|
+
s("div", xn, [
|
|
1054
|
+
s("div", Cn, [
|
|
1055
|
+
B[14] || (B[14] = s("span", null, "灰色模式", -1)),
|
|
1056
|
+
s("div", {
|
|
1057
|
+
class: _e(["switch-wrapper", { "is-checked": Q.value }]),
|
|
1058
|
+
onClick: ie
|
|
1059
|
+
}, [...B[13] || (B[13] = [
|
|
1060
|
+
s("span", { class: "switch-core" }, null, -1)
|
|
1061
|
+
])], 2)
|
|
1062
|
+
]),
|
|
1063
|
+
s("div", Nn, [
|
|
1064
|
+
B[16] || (B[16] = s("span", null, "暗黑模式", -1)),
|
|
1065
|
+
s("div", {
|
|
1066
|
+
class: _e(["switch-wrapper", { "is-checked": y(m).isDark }]),
|
|
1067
|
+
onClick: de
|
|
1068
|
+
}, [...B[15] || (B[15] = [
|
|
1069
|
+
s("span", { class: "switch-core" }, null, -1)
|
|
1070
|
+
])], 2)
|
|
1071
|
+
])
|
|
1072
|
+
])
|
|
1073
|
+
])
|
|
1074
|
+
])
|
|
1075
|
+
]),
|
|
1076
|
+
_: 1
|
|
1077
|
+
}, 8, ["modelValue"])
|
|
1078
|
+
]);
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
}), Sn = /* @__PURE__ */ $e(En, [["__scopeId", "data-v-89179947"]]), $n = { class: "top-menu" }, Mn = { class: "top-menu__logo" }, Ln = { class: "top-menu__logo-text" }, In = { class: "top-menu__menu-content" }, An = {
|
|
1082
|
+
key: 0,
|
|
1083
|
+
class: "top-menu__menu-icon"
|
|
1084
|
+
}, Tn = {
|
|
1085
|
+
key: 1,
|
|
1086
|
+
class: "top-menu__menu-char"
|
|
1087
|
+
}, On = { class: "top-menu__menu-text" }, Un = { class: "top-menu__menu-content" }, Bn = { class: "top-menu__menu-icon" }, Pn = {
|
|
1088
|
+
key: 1,
|
|
1089
|
+
class: "top-menu__menu-char"
|
|
1090
|
+
}, Rn = { class: "top-menu__menu-text" }, zn = { class: "top-menu__menu-content" }, Dn = { class: "top-menu__menu-icon" }, Fn = {
|
|
1091
|
+
key: 1,
|
|
1092
|
+
class: "top-menu__menu-char"
|
|
1093
|
+
}, Vn = { class: "top-menu__menu-text" }, jn = { class: "top-menu__menu-content" }, qn = { class: "top-menu__menu-icon" }, Gn = {
|
|
1094
|
+
key: 1,
|
|
1095
|
+
class: "top-menu__menu-char"
|
|
1096
|
+
}, Kn = { class: "top-menu__menu-text" }, Hn = { class: "top-menu__menu-content" }, Wn = {
|
|
1097
|
+
key: 0,
|
|
1098
|
+
class: "top-menu__menu-icon"
|
|
1099
|
+
}, Xn = {
|
|
1100
|
+
key: 1,
|
|
1101
|
+
class: "top-menu__menu-char"
|
|
1102
|
+
}, Yn = { class: "top-menu__menu-text" }, Jn = { class: "top-menu__actions" }, Zn = {
|
|
1103
|
+
key: 0,
|
|
1104
|
+
class: "top-menu__search-dropdown"
|
|
1105
|
+
}, Qn = {
|
|
1106
|
+
key: 0,
|
|
1107
|
+
class: "top-menu__search-results"
|
|
1108
|
+
}, eo = ["onClick"], to = {
|
|
1109
|
+
key: 0,
|
|
1110
|
+
class: "top-menu__search-icon-item"
|
|
1111
|
+
}, so = {
|
|
1112
|
+
key: 1,
|
|
1113
|
+
class: "top-menu__search-char"
|
|
1114
|
+
}, no = { class: "top-menu__search-item-title" }, oo = {
|
|
1115
|
+
key: 1,
|
|
1116
|
+
class: "top-menu__search-item-parent"
|
|
1117
|
+
}, ro = {
|
|
1118
|
+
key: 1,
|
|
1119
|
+
class: "top-menu__search-empty"
|
|
1120
|
+
}, ao = ["title"], lo = { class: "top-menu__avatar" }, io = { class: "top-menu__user-name" }, co = {
|
|
1121
|
+
key: 0,
|
|
1122
|
+
class: "top-menu__dropdown"
|
|
1123
|
+
}, uo = { class: "top-menu__dropdown-header" }, fo = { class: "top-menu__dropdown-avatar" }, po = { class: "top-menu__dropdown-info" }, mo = { class: "top-menu__dropdown-name" }, ho = { class: "top-menu__dropdown-role" }, vo = { class: "top-menu__dropdown-menu" }, go = { class: "settings-drawer" }, _o = { class: "settings-section" }, wo = { class: "settings-layout-options" }, yo = ["onClick"], bo = { class: "layout-option__preview" }, ko = {
|
|
1124
|
+
key: 0,
|
|
1125
|
+
class: "layout-preview-sidebar"
|
|
1126
|
+
}, xo = {
|
|
1127
|
+
key: 1,
|
|
1128
|
+
class: "layout-preview-top"
|
|
1129
|
+
}, Co = {
|
|
1130
|
+
key: 2,
|
|
1131
|
+
class: "layout-preview-mix"
|
|
1132
|
+
}, No = { class: "layout-option__label" }, Eo = { class: "settings-section" }, So = { class: "settings-color-options" }, $o = ["title", "onClick"], Mo = { class: "settings-section" }, Lo = { class: "settings-switch-list" }, Io = { class: "settings-switch-item" }, Ao = { class: "settings-switch-item" }, To = /* @__PURE__ */ Ae({
|
|
1133
|
+
__name: "TopMenu",
|
|
1134
|
+
setup(o) {
|
|
1135
|
+
const i = qe(), v = ze(), m = Pe(), f = De(), k = Se(), S = Ze(), g = j(() => i.path), M = (e, r = "") => {
|
|
1136
|
+
const u = [];
|
|
1137
|
+
return e.forEach((n) => {
|
|
1138
|
+
n.children && n.children.length > 0 ? u.push(...M(n.children, n.menuName)) : u.push({ ...n, parentTitle: r, title: n.menuName, path: n.menuUrl });
|
|
1139
|
+
}), u;
|
|
1140
|
+
}, _ = j(() => W.value.trim() ? M(m.menuList).filter(
|
|
1141
|
+
(r) => r.title.toLowerCase().includes(W.value.toLowerCase())
|
|
1142
|
+
) : []), x = j(() => f.isDark ? "#1d1e1f" : "#fff"), L = j(() => f.isDark ? "#cfd3dc" : "#303133"), C = j(() => "#409eff"), K = P(!1), Q = P(null), U = P(!1), T = P(!1), V = P(!1), I = P(!1), W = P(""), Y = P(null), ne = (e) => {
|
|
1143
|
+
e && e !== i.path && v.push(e);
|
|
1144
|
+
}, O = /* @__PURE__ */ new Set([
|
|
1145
|
+
"arrow-up",
|
|
1146
|
+
"arrow-down",
|
|
1147
|
+
"arrow-left",
|
|
1148
|
+
"arrow-right",
|
|
1149
|
+
"caret-down",
|
|
1150
|
+
"caret-right",
|
|
1151
|
+
"plus",
|
|
1152
|
+
"minus",
|
|
1153
|
+
"close",
|
|
1154
|
+
"check",
|
|
1155
|
+
"edit",
|
|
1156
|
+
"delete",
|
|
1157
|
+
"copy",
|
|
1158
|
+
"download",
|
|
1159
|
+
"upload",
|
|
1160
|
+
"refresh",
|
|
1161
|
+
"search",
|
|
1162
|
+
"filter",
|
|
1163
|
+
"more",
|
|
1164
|
+
"setting",
|
|
1165
|
+
"share",
|
|
1166
|
+
"loading",
|
|
1167
|
+
"info",
|
|
1168
|
+
"success",
|
|
1169
|
+
"warning",
|
|
1170
|
+
"error",
|
|
1171
|
+
"question",
|
|
1172
|
+
"user",
|
|
1173
|
+
"user-add",
|
|
1174
|
+
"user-group",
|
|
1175
|
+
"logout",
|
|
1176
|
+
"login",
|
|
1177
|
+
"file",
|
|
1178
|
+
"folder",
|
|
1179
|
+
"folder-open",
|
|
1180
|
+
"document",
|
|
1181
|
+
"image",
|
|
1182
|
+
"video",
|
|
1183
|
+
"music",
|
|
1184
|
+
"camera",
|
|
1185
|
+
"mail",
|
|
1186
|
+
"phone",
|
|
1187
|
+
"chat",
|
|
1188
|
+
"bell",
|
|
1189
|
+
"message",
|
|
1190
|
+
"eye",
|
|
1191
|
+
"eye-off",
|
|
1192
|
+
"calendar",
|
|
1193
|
+
"clock",
|
|
1194
|
+
"history",
|
|
1195
|
+
"timer",
|
|
1196
|
+
"location",
|
|
1197
|
+
"map",
|
|
1198
|
+
"globe",
|
|
1199
|
+
"star",
|
|
1200
|
+
"heart",
|
|
1201
|
+
"thumb-up",
|
|
1202
|
+
"link",
|
|
1203
|
+
"external-link",
|
|
1204
|
+
"lock",
|
|
1205
|
+
"unlock",
|
|
1206
|
+
"key",
|
|
1207
|
+
"home",
|
|
1208
|
+
"menu",
|
|
1209
|
+
"menu-fold",
|
|
1210
|
+
"menu-unfold",
|
|
1211
|
+
"sidebar-fold",
|
|
1212
|
+
"sidebar-expand",
|
|
1213
|
+
"sidebar-left",
|
|
1214
|
+
"dashboard",
|
|
1215
|
+
"chart",
|
|
1216
|
+
"chart-pie",
|
|
1217
|
+
"chart-line",
|
|
1218
|
+
"report",
|
|
1219
|
+
"analytics",
|
|
1220
|
+
"system",
|
|
1221
|
+
"permission",
|
|
1222
|
+
"role",
|
|
1223
|
+
"user-manage",
|
|
1224
|
+
"log",
|
|
1225
|
+
"notification",
|
|
1226
|
+
"app",
|
|
1227
|
+
"list",
|
|
1228
|
+
"grid",
|
|
1229
|
+
"fullscreen",
|
|
1230
|
+
"fullscreen-exit",
|
|
1231
|
+
"zoom-in",
|
|
1232
|
+
"zoom-out",
|
|
1233
|
+
"print",
|
|
1234
|
+
"bookmark",
|
|
1235
|
+
"tag",
|
|
1236
|
+
"code",
|
|
1237
|
+
"terminal",
|
|
1238
|
+
"database",
|
|
1239
|
+
"server",
|
|
1240
|
+
"cloud",
|
|
1241
|
+
"gift",
|
|
1242
|
+
"moon",
|
|
1243
|
+
"sun",
|
|
1244
|
+
"theme",
|
|
1245
|
+
"skin"
|
|
1246
|
+
]), A = (e) => {
|
|
1247
|
+
if (!e || e === "") return "";
|
|
1248
|
+
if (e.startsWith("tineco-icon-")) {
|
|
1249
|
+
const u = e.replace("tineco-icon-", "");
|
|
1250
|
+
return {
|
|
1251
|
+
home: "home",
|
|
1252
|
+
dashboard: "dashboard",
|
|
1253
|
+
system: "system",
|
|
1254
|
+
user: "user",
|
|
1255
|
+
role: "role",
|
|
1256
|
+
menu: "list",
|
|
1257
|
+
setting: "setting",
|
|
1258
|
+
file: "file",
|
|
1259
|
+
folder: "folder",
|
|
1260
|
+
chart: "chart",
|
|
1261
|
+
report: "report",
|
|
1262
|
+
analytics: "analytics"
|
|
1263
|
+
}[u] || u;
|
|
1264
|
+
}
|
|
1265
|
+
return {
|
|
1266
|
+
dashboard: "dashboard",
|
|
1267
|
+
system: "system",
|
|
1268
|
+
user: "user",
|
|
1269
|
+
role: "role",
|
|
1270
|
+
menu: "list",
|
|
1271
|
+
setting: "setting",
|
|
1272
|
+
home: "home",
|
|
1273
|
+
chart: "chart",
|
|
1274
|
+
report: "report",
|
|
1275
|
+
analytics: "analytics",
|
|
1276
|
+
permission: "permission",
|
|
1277
|
+
log: "log",
|
|
1278
|
+
notification: "notification",
|
|
1279
|
+
app: "app",
|
|
1280
|
+
list: "list",
|
|
1281
|
+
grid: "grid"
|
|
1282
|
+
}[e] || e;
|
|
1283
|
+
}, J = (e) => e ? e.charAt(0) : "", ee = (e) => O.has(e), $ = () => {
|
|
1284
|
+
f.toggleTheme(), T.value = !1;
|
|
1285
|
+
}, re = () => {
|
|
1286
|
+
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
1287
|
+
}, te = () => {
|
|
1288
|
+
U.value = !!document.fullscreenElement;
|
|
1289
|
+
}, D = () => {
|
|
1290
|
+
K.value = !K.value;
|
|
1291
|
+
}, ie = () => {
|
|
1292
|
+
K.value = !1;
|
|
1293
|
+
}, de = () => {
|
|
1294
|
+
I.value = !1, W.value = "";
|
|
1295
|
+
}, Ce = (e) => {
|
|
1296
|
+
v.push(e), de();
|
|
1297
|
+
}, fe = () => {
|
|
1298
|
+
T.value = !0;
|
|
1299
|
+
}, be = (e) => {
|
|
1300
|
+
V.value = e;
|
|
1301
|
+
const r = document.documentElement;
|
|
1302
|
+
e ? r.classList.add("grey-mode") : r.classList.remove("grey-mode");
|
|
1303
|
+
}, ke = () => {
|
|
1304
|
+
be(!V.value), T.value = !1;
|
|
1305
|
+
}, we = () => {
|
|
1306
|
+
f.toggleTheme(), T.value = !1;
|
|
1307
|
+
}, Te = [
|
|
1308
|
+
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
1309
|
+
{ value: "top", label: "顶部菜单", icon: "menu" },
|
|
1310
|
+
{ value: "mix", label: "混合菜单", icon: "grid" }
|
|
1311
|
+
], Ne = j(() => f.layout), Oe = (e) => {
|
|
1312
|
+
f.setLayout(e), T.value = !1;
|
|
1313
|
+
}, N = [
|
|
1314
|
+
{ value: "#409eff", label: "默认蓝" },
|
|
1315
|
+
{ value: "#1890ff", label: "科技蓝" },
|
|
1316
|
+
{ value: "#52c41a", label: "极光绿" },
|
|
1317
|
+
{ value: "#faad14", label: "日落橙" },
|
|
1318
|
+
{ value: "#f5222d", label: "薄暮红" },
|
|
1319
|
+
{ value: "#722ed1", label: "酱紫" }
|
|
1320
|
+
], Ue = (e) => {
|
|
1321
|
+
f.setPrimaryColor(e), T.value = !1;
|
|
1322
|
+
}, Be = () => {
|
|
1323
|
+
ie(), v.push("/profile");
|
|
1324
|
+
}, Me = () => {
|
|
1325
|
+
ie(), v.push("/change-password");
|
|
1326
|
+
}, H = () => {
|
|
1327
|
+
ie(), S.logout(), k.clearUserInfo(), m.clearMenu(), v.push("/login");
|
|
1328
|
+
}, B = (e) => {
|
|
1329
|
+
Q.value && !Q.value.contains(e.target) && ie(), Y.value && !Y.value.contains(e.target) && de();
|
|
1330
|
+
}, t = (e) => {
|
|
1331
|
+
e.key === "Escape" && (de(), ie());
|
|
1332
|
+
};
|
|
1333
|
+
return wt(() => {
|
|
1334
|
+
document.addEventListener("click", B), document.addEventListener("fullscreenchange", te), document.addEventListener("keydown", t), V.value = document.documentElement.classList.contains("grey-mode");
|
|
1335
|
+
}), yt(() => {
|
|
1336
|
+
document.removeEventListener("click", B), document.removeEventListener("fullscreenchange", te), document.removeEventListener("keydown", t);
|
|
1337
|
+
}), (e, r) => {
|
|
1338
|
+
var u;
|
|
1339
|
+
return w(), E("div", $n, [
|
|
1340
|
+
s("div", Mn, [
|
|
1341
|
+
r[3] || (r[3] = s("img", {
|
|
1342
|
+
src: St,
|
|
1343
|
+
alt: "Logo",
|
|
1344
|
+
class: "top-menu__logo-img"
|
|
1345
|
+
}, null, -1)),
|
|
1346
|
+
s("span", Ln, G(y(f).appName), 1)
|
|
1347
|
+
]),
|
|
1348
|
+
R(y(Nt), {
|
|
1349
|
+
"model-value": g.value,
|
|
1350
|
+
mode: "horizontal",
|
|
1351
|
+
"background-color": x.value,
|
|
1352
|
+
"text-color": L.value,
|
|
1353
|
+
"active-text-color": C.value,
|
|
1354
|
+
class: "top-menu__menu",
|
|
1355
|
+
onSelect: ne
|
|
1356
|
+
}, {
|
|
1357
|
+
default: X(() => [
|
|
1358
|
+
(w(!0), E(he, null, ge(y(m).menuList, (n) => (w(), E(he, {
|
|
1359
|
+
key: n.menuUrl
|
|
1360
|
+
}, [
|
|
1361
|
+
n.children && n.children.length > 0 ? (w(), ce(y(_t), {
|
|
1362
|
+
key: 0,
|
|
1363
|
+
index: n.menuUrl
|
|
1364
|
+
}, {
|
|
1365
|
+
title: X(() => [
|
|
1366
|
+
s("span", In, [
|
|
1367
|
+
n.menuName !== "首页" ? (w(), E("span", An, [
|
|
1368
|
+
ee(A(n.icon)) ? (w(), ce(y(Z), {
|
|
1369
|
+
key: 0,
|
|
1370
|
+
name: A(n.icon),
|
|
1371
|
+
size: 16
|
|
1372
|
+
}, null, 8, ["name"])) : (w(), E("span", Tn, G(J(n.menuName)), 1))
|
|
1373
|
+
])) : le("", !0),
|
|
1374
|
+
s("span", On, G(n.menuName), 1)
|
|
1375
|
+
])
|
|
1376
|
+
]),
|
|
1377
|
+
default: X(() => [
|
|
1378
|
+
(w(!0), E(he, null, ge(n.children, (a) => (w(), E(he, {
|
|
1379
|
+
key: a.menuUrl
|
|
1380
|
+
}, [
|
|
1381
|
+
a.children && a.children.length > 0 ? (w(), ce(y(_t), {
|
|
1382
|
+
key: 0,
|
|
1383
|
+
index: a.menuUrl
|
|
1384
|
+
}, {
|
|
1385
|
+
title: X(() => [
|
|
1386
|
+
s("span", Un, [
|
|
1387
|
+
s("span", Bn, [
|
|
1388
|
+
ee(A(a.icon)) ? (w(), ce(y(Z), {
|
|
1389
|
+
key: 0,
|
|
1390
|
+
name: A(a.icon),
|
|
1391
|
+
size: 16
|
|
1392
|
+
}, null, 8, ["name"])) : (w(), E("span", Pn, G(J(a.menuName)), 1))
|
|
1393
|
+
]),
|
|
1394
|
+
s("span", Rn, G(a.menuName), 1)
|
|
1395
|
+
])
|
|
1396
|
+
]),
|
|
1397
|
+
default: X(() => [
|
|
1398
|
+
(w(!0), E(he, null, ge(a.children, (d) => (w(), ce(y(He), {
|
|
1399
|
+
key: d.menuUrl,
|
|
1400
|
+
index: d.menuUrl
|
|
1401
|
+
}, {
|
|
1402
|
+
default: X(() => [
|
|
1403
|
+
s("span", zn, [
|
|
1404
|
+
s("span", Dn, [
|
|
1405
|
+
ee(A(d.icon)) ? (w(), ce(y(Z), {
|
|
1406
|
+
key: 0,
|
|
1407
|
+
name: A(d.icon),
|
|
1408
|
+
size: 16
|
|
1409
|
+
}, null, 8, ["name"])) : (w(), E("span", Fn, G(J(d.menuName)), 1))
|
|
1410
|
+
]),
|
|
1411
|
+
s("span", Vn, G(d.menuName), 1)
|
|
1412
|
+
])
|
|
1413
|
+
]),
|
|
1414
|
+
_: 2
|
|
1415
|
+
}, 1032, ["index"]))), 128))
|
|
1416
|
+
]),
|
|
1417
|
+
_: 2
|
|
1418
|
+
}, 1032, ["index"])) : (w(), ce(y(He), {
|
|
1419
|
+
key: 1,
|
|
1420
|
+
index: a.menuUrl
|
|
1421
|
+
}, {
|
|
1422
|
+
default: X(() => [
|
|
1423
|
+
s("span", jn, [
|
|
1424
|
+
s("span", qn, [
|
|
1425
|
+
ee(A(a.icon)) ? (w(), ce(y(Z), {
|
|
1426
|
+
key: 0,
|
|
1427
|
+
name: A(a.icon),
|
|
1428
|
+
size: 16
|
|
1429
|
+
}, null, 8, ["name"])) : (w(), E("span", Gn, G(J(a.menuName)), 1))
|
|
1430
|
+
]),
|
|
1431
|
+
s("span", Kn, G(a.menuName), 1)
|
|
1432
|
+
])
|
|
1433
|
+
]),
|
|
1434
|
+
_: 2
|
|
1435
|
+
}, 1032, ["index"]))
|
|
1436
|
+
], 64))), 128))
|
|
1437
|
+
]),
|
|
1438
|
+
_: 2
|
|
1439
|
+
}, 1032, ["index"])) : (w(), ce(y(He), {
|
|
1440
|
+
key: 1,
|
|
1441
|
+
index: n.menuUrl
|
|
1442
|
+
}, {
|
|
1443
|
+
default: X(() => [
|
|
1444
|
+
s("span", Hn, [
|
|
1445
|
+
n.menuName !== "首页" ? (w(), E("span", Wn, [
|
|
1446
|
+
ee(A(n.icon)) ? (w(), ce(y(Z), {
|
|
1447
|
+
key: 0,
|
|
1448
|
+
name: A(n.icon),
|
|
1449
|
+
size: 16
|
|
1450
|
+
}, null, 8, ["name"])) : (w(), E("span", Xn, G(J(n.menuName)), 1))
|
|
1451
|
+
])) : le("", !0),
|
|
1452
|
+
s("span", Yn, G(n.menuName), 1)
|
|
1453
|
+
])
|
|
1454
|
+
]),
|
|
1455
|
+
_: 2
|
|
1456
|
+
}, 1032, ["index"]))
|
|
1457
|
+
], 64))), 128))
|
|
1458
|
+
]),
|
|
1459
|
+
_: 1
|
|
1460
|
+
}, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
|
|
1461
|
+
s("div", Jn, [
|
|
1462
|
+
s("div", {
|
|
1463
|
+
class: "top-menu__search",
|
|
1464
|
+
ref_key: "searchRef",
|
|
1465
|
+
ref: Y
|
|
1466
|
+
}, [
|
|
1467
|
+
R(y(Z), {
|
|
1468
|
+
name: "search",
|
|
1469
|
+
size: 14,
|
|
1470
|
+
class: "top-menu__search-icon"
|
|
1471
|
+
}),
|
|
1472
|
+
lt(s("input", {
|
|
1473
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => W.value = n),
|
|
1474
|
+
type: "text",
|
|
1475
|
+
class: "top-menu__search-input",
|
|
1476
|
+
placeholder: "搜索菜单...",
|
|
1477
|
+
onFocus: r[1] || (r[1] = (n) => I.value = !0)
|
|
1478
|
+
}, null, 544), [
|
|
1479
|
+
[bt, W.value]
|
|
1480
|
+
]),
|
|
1481
|
+
R(Ve, { name: "search-dropdown" }, {
|
|
1482
|
+
default: X(() => [
|
|
1483
|
+
I.value && (_.value.length > 0 || W.value) ? (w(), E("div", Zn, [
|
|
1484
|
+
_.value.length > 0 ? (w(), E("div", Qn, [
|
|
1485
|
+
(w(!0), E(he, null, ge(_.value, (n) => (w(), E("div", {
|
|
1486
|
+
key: n.path,
|
|
1487
|
+
class: "top-menu__search-item",
|
|
1488
|
+
onClick: (a) => Ce(n.path)
|
|
1489
|
+
}, [
|
|
1490
|
+
n.title !== "首页" ? (w(), E("span", to, [
|
|
1491
|
+
ee(A(n.icon)) ? (w(), ce(y(Z), {
|
|
1492
|
+
key: 0,
|
|
1493
|
+
name: A(n.icon),
|
|
1494
|
+
size: 16
|
|
1495
|
+
}, null, 8, ["name"])) : (w(), E("span", so, G(J(n.title)), 1))
|
|
1496
|
+
])) : le("", !0),
|
|
1497
|
+
s("span", no, G(n.title), 1),
|
|
1498
|
+
n.parentTitle ? (w(), E("span", oo, G(n.parentTitle), 1)) : le("", !0)
|
|
1499
|
+
], 8, eo))), 128))
|
|
1500
|
+
])) : (w(), E("div", ro, " 未找到匹配的菜单 "))
|
|
1501
|
+
])) : le("", !0)
|
|
1502
|
+
]),
|
|
1503
|
+
_: 1
|
|
1504
|
+
})
|
|
1505
|
+
], 512),
|
|
1506
|
+
s("div", {
|
|
1507
|
+
class: "top-menu__action",
|
|
1508
|
+
onClick: re,
|
|
1509
|
+
title: U.value ? "退出全屏" : "全屏"
|
|
1510
|
+
}, [
|
|
1511
|
+
R(y(Z), {
|
|
1512
|
+
name: U.value ? "fullscreen-exit" : "fullscreen",
|
|
1513
|
+
size: 16
|
|
1514
|
+
}, null, 8, ["name"])
|
|
1515
|
+
], 8, ao),
|
|
1516
|
+
s("div", {
|
|
1517
|
+
class: "top-menu__action",
|
|
1518
|
+
onClick: fe,
|
|
1519
|
+
title: "换肤设置"
|
|
1520
|
+
}, [
|
|
1521
|
+
R(y(Z), {
|
|
1522
|
+
name: "skin",
|
|
1523
|
+
size: 16
|
|
1524
|
+
})
|
|
1525
|
+
]),
|
|
1526
|
+
s("div", {
|
|
1527
|
+
class: "top-menu__action",
|
|
1528
|
+
onClick: $,
|
|
1529
|
+
title: "切换主题"
|
|
1530
|
+
}, [
|
|
1531
|
+
R(y(Z), {
|
|
1532
|
+
name: y(f).isDark ? "sun" : "moon",
|
|
1533
|
+
size: 16
|
|
1534
|
+
}, null, 8, ["name"])
|
|
1535
|
+
]),
|
|
1536
|
+
s("div", {
|
|
1537
|
+
class: "top-menu__user",
|
|
1538
|
+
ref_key: "dropdownRef",
|
|
1539
|
+
ref: Q
|
|
1540
|
+
}, [
|
|
1541
|
+
s("div", {
|
|
1542
|
+
class: "top-menu__user-trigger",
|
|
1543
|
+
onClick: it(D, ["stop"])
|
|
1544
|
+
}, [
|
|
1545
|
+
s("div", lo, [
|
|
1546
|
+
s("span", null, G(((u = y(k).userName) == null ? void 0 : u.charAt(0)) || "U"), 1)
|
|
1547
|
+
]),
|
|
1548
|
+
s("span", io, G(y(k).userName), 1),
|
|
1549
|
+
s("span", {
|
|
1550
|
+
class: _e(["top-menu__user-arrow", { "is-active": K.value }])
|
|
1551
|
+
}, "▼", 2)
|
|
1552
|
+
]),
|
|
1553
|
+
R(Ve, { name: "dropdown" }, {
|
|
1554
|
+
default: X(() => {
|
|
1555
|
+
var n;
|
|
1556
|
+
return [
|
|
1557
|
+
K.value ? (w(), E("div", co, [
|
|
1558
|
+
s("div", uo, [
|
|
1559
|
+
s("div", fo, [
|
|
1560
|
+
s("span", null, G(((n = y(k).userName) == null ? void 0 : n.charAt(0)) || "U"), 1)
|
|
1561
|
+
]),
|
|
1562
|
+
s("div", po, [
|
|
1563
|
+
s("div", mo, G(y(k).userName), 1),
|
|
1564
|
+
s("div", ho, G(y(k).departmentName), 1)
|
|
1565
|
+
])
|
|
1566
|
+
]),
|
|
1567
|
+
r[8] || (r[8] = s("div", { class: "top-menu__dropdown-divider" }, null, -1)),
|
|
1568
|
+
s("div", vo, [
|
|
1569
|
+
s("div", {
|
|
1570
|
+
class: "top-menu__dropdown-item",
|
|
1571
|
+
onClick: Be
|
|
1572
|
+
}, [
|
|
1573
|
+
R(y(Z), {
|
|
1574
|
+
name: "user",
|
|
1575
|
+
size: 16
|
|
1576
|
+
}),
|
|
1577
|
+
r[4] || (r[4] = s("span", null, "个人信息", -1))
|
|
1578
|
+
]),
|
|
1579
|
+
s("div", {
|
|
1580
|
+
class: "top-menu__dropdown-item",
|
|
1581
|
+
onClick: Me
|
|
1582
|
+
}, [
|
|
1583
|
+
R(y(Z), {
|
|
1584
|
+
name: "lock",
|
|
1585
|
+
size: 16
|
|
1586
|
+
}),
|
|
1587
|
+
r[5] || (r[5] = s("span", null, "修改密码", -1))
|
|
1588
|
+
]),
|
|
1589
|
+
r[7] || (r[7] = s("div", { class: "top-menu__dropdown-divider" }, null, -1)),
|
|
1590
|
+
s("div", {
|
|
1591
|
+
class: "top-menu__dropdown-item top-menu__dropdown-item--danger",
|
|
1592
|
+
onClick: H
|
|
1593
|
+
}, [
|
|
1594
|
+
R(y(Z), {
|
|
1595
|
+
name: "logout",
|
|
1596
|
+
size: 16
|
|
1597
|
+
}),
|
|
1598
|
+
r[6] || (r[6] = s("span", null, "退出登录", -1))
|
|
1599
|
+
])
|
|
1600
|
+
])
|
|
1601
|
+
])) : le("", !0)
|
|
1602
|
+
];
|
|
1603
|
+
}),
|
|
1604
|
+
_: 1
|
|
1605
|
+
})
|
|
1606
|
+
], 512)
|
|
1607
|
+
]),
|
|
1608
|
+
R(y(Et), {
|
|
1609
|
+
modelValue: T.value,
|
|
1610
|
+
"onUpdate:modelValue": r[2] || (r[2] = (n) => T.value = n),
|
|
1611
|
+
title: "换肤设置",
|
|
1612
|
+
direction: "rtl",
|
|
1613
|
+
size: "320px"
|
|
1614
|
+
}, {
|
|
1615
|
+
default: X(() => [
|
|
1616
|
+
s("div", go, [
|
|
1617
|
+
s("div", _o, [
|
|
1618
|
+
r[12] || (r[12] = s("div", { class: "settings-title" }, "布局模式", -1)),
|
|
1619
|
+
s("div", wo, [
|
|
1620
|
+
(w(), E(he, null, ge(Te, (n) => s("div", {
|
|
1621
|
+
key: n.value,
|
|
1622
|
+
class: _e(["layout-option", { "is-active": Ne.value === n.value }]),
|
|
1623
|
+
onClick: (a) => Oe(n.value)
|
|
1624
|
+
}, [
|
|
1625
|
+
s("div", bo, [
|
|
1626
|
+
n.value === "sidebar" ? (w(), E("div", ko, [...r[9] || (r[9] = [
|
|
1627
|
+
s("div", { class: "preview-aside" }, null, -1),
|
|
1628
|
+
s("div", { class: "preview-main" }, [
|
|
1629
|
+
s("div", { class: "preview-header" }),
|
|
1630
|
+
s("div", { class: "preview-content" })
|
|
1631
|
+
], -1)
|
|
1632
|
+
])])) : n.value === "top" ? (w(), E("div", xo, [...r[10] || (r[10] = [
|
|
1633
|
+
s("div", { class: "preview-header-full" }, null, -1),
|
|
1634
|
+
s("div", { class: "preview-content-full" }, null, -1)
|
|
1635
|
+
])])) : (w(), E("div", Co, [...r[11] || (r[11] = [
|
|
1636
|
+
s("div", { class: "preview-header-mix" }, [
|
|
1637
|
+
s("div", { class: "preview-mix-left" })
|
|
1638
|
+
], -1),
|
|
1639
|
+
s("div", { class: "preview-mix-body" }, [
|
|
1640
|
+
s("div", { class: "preview-mix-aside" }),
|
|
1641
|
+
s("div", { class: "preview-mix-content" })
|
|
1642
|
+
], -1)
|
|
1643
|
+
])]))
|
|
1644
|
+
]),
|
|
1645
|
+
s("span", No, G(n.label), 1)
|
|
1646
|
+
], 10, yo)), 64))
|
|
1647
|
+
])
|
|
1648
|
+
]),
|
|
1649
|
+
s("div", Eo, [
|
|
1650
|
+
r[13] || (r[13] = s("div", { class: "settings-title" }, "主题色", -1)),
|
|
1651
|
+
s("div", So, [
|
|
1652
|
+
(w(), E(he, null, ge(N, (n) => s("div", {
|
|
1653
|
+
key: n.value,
|
|
1654
|
+
class: _e(["color-option", { "is-active": y(f).primaryColor === n.value }]),
|
|
1655
|
+
style: Ye({ backgroundColor: n.value }),
|
|
1656
|
+
title: n.label,
|
|
1657
|
+
onClick: (a) => Ue(n.value)
|
|
1658
|
+
}, [
|
|
1659
|
+
y(f).primaryColor === n.value ? (w(), ce(y(Z), {
|
|
1660
|
+
key: 0,
|
|
1661
|
+
name: "check",
|
|
1662
|
+
size: 12,
|
|
1663
|
+
color: "#fff"
|
|
1664
|
+
})) : le("", !0)
|
|
1665
|
+
], 14, $o)), 64))
|
|
1666
|
+
])
|
|
1667
|
+
]),
|
|
1668
|
+
s("div", Mo, [
|
|
1669
|
+
r[18] || (r[18] = s("div", { class: "settings-title" }, "功能设置", -1)),
|
|
1670
|
+
s("div", Lo, [
|
|
1671
|
+
s("div", Io, [
|
|
1672
|
+
r[15] || (r[15] = s("span", null, "灰色模式", -1)),
|
|
1673
|
+
s("div", {
|
|
1674
|
+
class: _e(["switch-wrapper", { "is-checked": V.value }]),
|
|
1675
|
+
onClick: ke
|
|
1676
|
+
}, [...r[14] || (r[14] = [
|
|
1677
|
+
s("span", { class: "switch-core" }, null, -1)
|
|
1678
|
+
])], 2)
|
|
1679
|
+
]),
|
|
1680
|
+
s("div", Ao, [
|
|
1681
|
+
r[17] || (r[17] = s("span", null, "暗黑模式", -1)),
|
|
1682
|
+
s("div", {
|
|
1683
|
+
class: _e(["switch-wrapper", { "is-checked": y(f).isDark }]),
|
|
1684
|
+
onClick: we
|
|
1685
|
+
}, [...r[16] || (r[16] = [
|
|
1686
|
+
s("span", { class: "switch-core" }, null, -1)
|
|
1687
|
+
])], 2)
|
|
1688
|
+
])
|
|
1689
|
+
])
|
|
1690
|
+
])
|
|
1691
|
+
])
|
|
1692
|
+
]),
|
|
1693
|
+
_: 1
|
|
1694
|
+
}, 8, ["modelValue"])
|
|
1695
|
+
]);
|
|
1696
|
+
};
|
|
1697
|
+
}
|
|
1698
|
+
}), Oo = /* @__PURE__ */ $e(To, [["__scopeId", "data-v-5c8f8b91"]]), Uo = { class: "mix-top-menu" }, Bo = { class: "mix-top-menu__logo" }, Po = { class: "mix-top-menu__logo-text" }, Ro = { class: "mix-top-menu__menu-content" }, zo = {
|
|
1699
|
+
key: 0,
|
|
1700
|
+
class: "mix-top-menu__menu-icon"
|
|
1701
|
+
}, Do = {
|
|
1702
|
+
key: 1,
|
|
1703
|
+
class: "mix-top-menu__menu-char"
|
|
1704
|
+
}, Fo = { class: "mix-top-menu__menu-text" }, Vo = { class: "mix-top-menu__actions" }, jo = {
|
|
1705
|
+
key: 0,
|
|
1706
|
+
class: "mix-top-menu__search-dropdown"
|
|
1707
|
+
}, qo = {
|
|
1708
|
+
key: 0,
|
|
1709
|
+
class: "mix-top-menu__search-results"
|
|
1710
|
+
}, Go = ["onClick"], Ko = {
|
|
1711
|
+
key: 0,
|
|
1712
|
+
class: "mix-top-menu__search-icon-item"
|
|
1713
|
+
}, Ho = {
|
|
1714
|
+
key: 1,
|
|
1715
|
+
class: "mix-top-menu__search-char"
|
|
1716
|
+
}, Wo = { class: "mix-top-menu__search-item-title" }, Xo = {
|
|
1717
|
+
key: 1,
|
|
1718
|
+
class: "mix-top-menu__search-item-parent"
|
|
1719
|
+
}, Yo = {
|
|
1720
|
+
key: 1,
|
|
1721
|
+
class: "mix-top-menu__search-empty"
|
|
1722
|
+
}, Jo = ["title"], Zo = { class: "mix-top-menu__avatar" }, Qo = { class: "mix-top-menu__user-name" }, er = {
|
|
1723
|
+
key: 0,
|
|
1724
|
+
class: "mix-top-menu__dropdown"
|
|
1725
|
+
}, tr = { class: "mix-top-menu__dropdown-header" }, sr = { class: "mix-top-menu__dropdown-avatar" }, nr = { class: "mix-top-menu__dropdown-info" }, or = { class: "mix-top-menu__dropdown-name" }, rr = { class: "mix-top-menu__dropdown-role" }, ar = { class: "mix-top-menu__dropdown-menu" }, lr = { class: "settings-drawer" }, ir = { class: "settings-section" }, cr = { class: "settings-layout-options" }, ur = ["onClick"], dr = { class: "layout-option__preview" }, fr = {
|
|
1726
|
+
key: 0,
|
|
1727
|
+
class: "layout-preview-sidebar"
|
|
1728
|
+
}, pr = {
|
|
1729
|
+
key: 1,
|
|
1730
|
+
class: "layout-preview-top"
|
|
1731
|
+
}, mr = {
|
|
1732
|
+
key: 2,
|
|
1733
|
+
class: "layout-preview-mix"
|
|
1734
|
+
}, hr = { class: "layout-option__label" }, vr = { class: "settings-section" }, gr = { class: "settings-color-options" }, _r = ["title", "onClick"], wr = { class: "settings-section" }, yr = { class: "settings-switch-list" }, br = { class: "settings-switch-item" }, kr = { class: "settings-switch-item" }, xr = /* @__PURE__ */ Ae({
|
|
1735
|
+
__name: "MixTopMenu",
|
|
1736
|
+
setup(o) {
|
|
1737
|
+
const i = qe(), v = ze(), m = Pe(), f = De(), k = Se(), S = Ze(), g = P(""), M = (n, a = "") => {
|
|
1738
|
+
const d = [];
|
|
1739
|
+
return n.forEach((l) => {
|
|
1740
|
+
l.children && l.children.length > 0 ? d.push(...M(l.children, l.menuName)) : d.push({ ...l, parentTitle: a, title: l.menuName, path: l.menuUrl });
|
|
1741
|
+
}), d;
|
|
1742
|
+
}, _ = j(() => A.value.trim() ? M(m.menuList).filter(
|
|
1743
|
+
(a) => a.title.toLowerCase().includes(A.value.toLowerCase())
|
|
1744
|
+
) : []), x = j(() => {
|
|
1745
|
+
const n = m.menuList.find((a) => a.menuUrl === g.value);
|
|
1746
|
+
return (n == null ? void 0 : n.children) || [];
|
|
1747
|
+
}), L = j(() => m.menuList.find((n) => !!(i.path === n.menuUrl || n.children && n.children.some((a) => i.path.startsWith(a.menuUrl) || i.path === a.menuUrl)))), C = () => {
|
|
1748
|
+
L.value ? g.value = L.value.menuUrl : m.menuList.length > 0 && (g.value = m.menuList[0].menuUrl);
|
|
1749
|
+
}, K = (n) => {
|
|
1750
|
+
g.value = n;
|
|
1751
|
+
const a = m.menuList.find((d) => d.menuUrl === n);
|
|
1752
|
+
if (a)
|
|
1753
|
+
if (a.children && a.children.length > 0) {
|
|
1754
|
+
const d = a.children[0].menuUrl;
|
|
1755
|
+
i.path !== d && v.push(d);
|
|
1756
|
+
} else
|
|
1757
|
+
i.path !== n && v.push(n);
|
|
1758
|
+
}, Q = j(() => f.isDark ? "#1d1e1f" : "#fff"), U = j(() => f.isDark ? "#cfd3dc" : "#303133"), T = j(() => "#409eff"), V = P(!1), I = P(null), W = P(!1), Y = P(!1), ne = P(!1), O = P(!1), A = P(""), J = P(null);
|
|
1759
|
+
Xe(() => i.path, () => {
|
|
1760
|
+
C(), f.setMixSubMenus(x.value);
|
|
1761
|
+
}), Xe(() => m.menuList, (n) => {
|
|
1762
|
+
n && n.length > 0 && (C(), f.setMixSubMenus(x.value));
|
|
1763
|
+
}, { immediate: !0 });
|
|
1764
|
+
const ee = /* @__PURE__ */ new Set([
|
|
1765
|
+
"arrow-up",
|
|
1766
|
+
"arrow-down",
|
|
1767
|
+
"arrow-left",
|
|
1768
|
+
"arrow-right",
|
|
1769
|
+
"caret-down",
|
|
1770
|
+
"caret-right",
|
|
1771
|
+
"plus",
|
|
1772
|
+
"minus",
|
|
1773
|
+
"close",
|
|
1774
|
+
"check",
|
|
1775
|
+
"edit",
|
|
1776
|
+
"delete",
|
|
1777
|
+
"copy",
|
|
1778
|
+
"download",
|
|
1779
|
+
"upload",
|
|
1780
|
+
"refresh",
|
|
1781
|
+
"search",
|
|
1782
|
+
"filter",
|
|
1783
|
+
"more",
|
|
1784
|
+
"setting",
|
|
1785
|
+
"share",
|
|
1786
|
+
"loading",
|
|
1787
|
+
"info",
|
|
1788
|
+
"success",
|
|
1789
|
+
"warning",
|
|
1790
|
+
"error",
|
|
1791
|
+
"question",
|
|
1792
|
+
"user",
|
|
1793
|
+
"user-add",
|
|
1794
|
+
"user-group",
|
|
1795
|
+
"logout",
|
|
1796
|
+
"login",
|
|
1797
|
+
"file",
|
|
1798
|
+
"folder",
|
|
1799
|
+
"folder-open",
|
|
1800
|
+
"document",
|
|
1801
|
+
"image",
|
|
1802
|
+
"video",
|
|
1803
|
+
"music",
|
|
1804
|
+
"camera",
|
|
1805
|
+
"mail",
|
|
1806
|
+
"phone",
|
|
1807
|
+
"chat",
|
|
1808
|
+
"bell",
|
|
1809
|
+
"message",
|
|
1810
|
+
"eye",
|
|
1811
|
+
"eye-off",
|
|
1812
|
+
"calendar",
|
|
1813
|
+
"clock",
|
|
1814
|
+
"history",
|
|
1815
|
+
"timer",
|
|
1816
|
+
"location",
|
|
1817
|
+
"map",
|
|
1818
|
+
"globe",
|
|
1819
|
+
"star",
|
|
1820
|
+
"heart",
|
|
1821
|
+
"thumb-up",
|
|
1822
|
+
"link",
|
|
1823
|
+
"external-link",
|
|
1824
|
+
"lock",
|
|
1825
|
+
"unlock",
|
|
1826
|
+
"key",
|
|
1827
|
+
"home",
|
|
1828
|
+
"menu",
|
|
1829
|
+
"menu-fold",
|
|
1830
|
+
"menu-unfold",
|
|
1831
|
+
"sidebar-fold",
|
|
1832
|
+
"sidebar-expand",
|
|
1833
|
+
"sidebar-left",
|
|
1834
|
+
"dashboard",
|
|
1835
|
+
"chart",
|
|
1836
|
+
"chart-pie",
|
|
1837
|
+
"chart-line",
|
|
1838
|
+
"report",
|
|
1839
|
+
"analytics",
|
|
1840
|
+
"system",
|
|
1841
|
+
"permission",
|
|
1842
|
+
"role",
|
|
1843
|
+
"user-manage",
|
|
1844
|
+
"log",
|
|
1845
|
+
"notification",
|
|
1846
|
+
"app",
|
|
1847
|
+
"list",
|
|
1848
|
+
"grid",
|
|
1849
|
+
"fullscreen",
|
|
1850
|
+
"fullscreen-exit",
|
|
1851
|
+
"zoom-in",
|
|
1852
|
+
"zoom-out",
|
|
1853
|
+
"print",
|
|
1854
|
+
"bookmark",
|
|
1855
|
+
"tag",
|
|
1856
|
+
"code",
|
|
1857
|
+
"terminal",
|
|
1858
|
+
"database",
|
|
1859
|
+
"server",
|
|
1860
|
+
"cloud",
|
|
1861
|
+
"gift",
|
|
1862
|
+
"moon",
|
|
1863
|
+
"sun",
|
|
1864
|
+
"theme",
|
|
1865
|
+
"skin"
|
|
1866
|
+
]), $ = (n) => {
|
|
1867
|
+
if (!n || n === "") return "";
|
|
1868
|
+
if (n.startsWith("tineco-icon-")) {
|
|
1869
|
+
const d = n.replace("tineco-icon-", "");
|
|
1870
|
+
return {
|
|
1871
|
+
home: "home",
|
|
1872
|
+
dashboard: "dashboard",
|
|
1873
|
+
system: "system",
|
|
1874
|
+
user: "user",
|
|
1875
|
+
role: "role",
|
|
1876
|
+
menu: "list",
|
|
1877
|
+
setting: "setting",
|
|
1878
|
+
file: "file",
|
|
1879
|
+
folder: "folder",
|
|
1880
|
+
chart: "chart",
|
|
1881
|
+
report: "report",
|
|
1882
|
+
analytics: "analytics"
|
|
1883
|
+
}[d] || d;
|
|
1884
|
+
}
|
|
1885
|
+
return {
|
|
1886
|
+
dashboard: "dashboard",
|
|
1887
|
+
system: "system",
|
|
1888
|
+
user: "user",
|
|
1889
|
+
role: "role",
|
|
1890
|
+
menu: "list",
|
|
1891
|
+
setting: "setting",
|
|
1892
|
+
home: "home",
|
|
1893
|
+
chart: "chart",
|
|
1894
|
+
report: "report",
|
|
1895
|
+
analytics: "analytics",
|
|
1896
|
+
permission: "permission",
|
|
1897
|
+
log: "log",
|
|
1898
|
+
notification: "notification",
|
|
1899
|
+
app: "app",
|
|
1900
|
+
list: "list",
|
|
1901
|
+
grid: "grid"
|
|
1902
|
+
}[n] || n;
|
|
1903
|
+
}, re = (n) => n ? n.charAt(0) : "", te = (n) => ee.has(n), D = () => {
|
|
1904
|
+
f.toggleTheme(), Y.value = !1;
|
|
1905
|
+
}, ie = () => {
|
|
1906
|
+
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
1907
|
+
}, de = () => {
|
|
1908
|
+
W.value = !!document.fullscreenElement;
|
|
1909
|
+
}, Ce = () => {
|
|
1910
|
+
V.value = !V.value;
|
|
1911
|
+
}, fe = () => {
|
|
1912
|
+
V.value = !1;
|
|
1913
|
+
}, be = () => {
|
|
1914
|
+
O.value = !1, A.value = "";
|
|
1915
|
+
}, ke = (n) => {
|
|
1916
|
+
v.push(n), be();
|
|
1917
|
+
}, we = () => {
|
|
1918
|
+
Y.value = !0;
|
|
1919
|
+
}, Te = (n) => {
|
|
1920
|
+
ne.value = n;
|
|
1921
|
+
const a = document.documentElement;
|
|
1922
|
+
n ? a.classList.add("grey-mode") : a.classList.remove("grey-mode");
|
|
1923
|
+
}, Ne = () => {
|
|
1924
|
+
Te(!ne.value), Y.value = !1;
|
|
1925
|
+
}, Oe = () => {
|
|
1926
|
+
f.toggleTheme(), Y.value = !1;
|
|
1927
|
+
}, N = [
|
|
1928
|
+
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
1929
|
+
{ value: "top", label: "顶部菜单", icon: "menu" },
|
|
1930
|
+
{ value: "mix", label: "混合菜单", icon: "grid" }
|
|
1931
|
+
], Ue = j(() => f.layout), Be = (n) => {
|
|
1932
|
+
f.setLayout(n), Y.value = !1;
|
|
1933
|
+
}, Me = [
|
|
1934
|
+
{ value: "#409eff", label: "默认蓝" },
|
|
1935
|
+
{ value: "#1890ff", label: "科技蓝" },
|
|
1936
|
+
{ value: "#52c41a", label: "极光绿" },
|
|
1937
|
+
{ value: "#faad14", label: "日落橙" },
|
|
1938
|
+
{ value: "#f5222d", label: "薄暮红" },
|
|
1939
|
+
{ value: "#722ed1", label: "酱紫" }
|
|
1940
|
+
], H = (n) => {
|
|
1941
|
+
f.setPrimaryColor(n), Y.value = !1;
|
|
1942
|
+
}, B = () => {
|
|
1943
|
+
fe(), v.push("/profile");
|
|
1944
|
+
}, t = () => {
|
|
1945
|
+
fe(), v.push("/change-password");
|
|
1946
|
+
}, e = () => {
|
|
1947
|
+
fe(), S.logout(), k.clearUserInfo(), m.clearMenu(), v.push("/login");
|
|
1948
|
+
}, r = (n) => {
|
|
1949
|
+
I.value && !I.value.contains(n.target) && fe(), J.value && !J.value.contains(n.target) && be();
|
|
1950
|
+
}, u = (n) => {
|
|
1951
|
+
n.key === "Escape" && (be(), fe());
|
|
1952
|
+
};
|
|
1953
|
+
return wt(() => {
|
|
1954
|
+
document.addEventListener("click", r), document.addEventListener("fullscreenchange", de), document.addEventListener("keydown", u), ne.value = document.documentElement.classList.contains("grey-mode"), C();
|
|
1955
|
+
}), yt(() => {
|
|
1956
|
+
document.removeEventListener("click", r), document.removeEventListener("fullscreenchange", de), document.removeEventListener("keydown", u);
|
|
1957
|
+
}), (n, a) => {
|
|
1958
|
+
var d;
|
|
1959
|
+
return w(), E("div", Uo, [
|
|
1960
|
+
s("div", Bo, [
|
|
1961
|
+
a[3] || (a[3] = s("img", {
|
|
1962
|
+
src: St,
|
|
1963
|
+
alt: "Logo",
|
|
1964
|
+
class: "mix-top-menu__logo-img"
|
|
1965
|
+
}, null, -1)),
|
|
1966
|
+
s("span", Po, G(y(f).appName), 1)
|
|
1967
|
+
]),
|
|
1968
|
+
R(y(Nt), {
|
|
1969
|
+
"model-value": g.value,
|
|
1970
|
+
mode: "horizontal",
|
|
1971
|
+
"background-color": Q.value,
|
|
1972
|
+
"text-color": U.value,
|
|
1973
|
+
"active-text-color": T.value,
|
|
1974
|
+
class: "mix-top-menu__menu",
|
|
1975
|
+
onSelect: K
|
|
1976
|
+
}, {
|
|
1977
|
+
default: X(() => [
|
|
1978
|
+
(w(!0), E(he, null, ge(y(m).menuList, (l) => (w(), ce(y(He), {
|
|
1979
|
+
key: l.menuUrl,
|
|
1980
|
+
index: l.menuUrl
|
|
1981
|
+
}, {
|
|
1982
|
+
default: X(() => [
|
|
1983
|
+
s("span", Ro, [
|
|
1984
|
+
l.menuName !== "首页" ? (w(), E("span", zo, [
|
|
1985
|
+
te($(l.icon)) ? (w(), ce(y(Z), {
|
|
1986
|
+
key: 0,
|
|
1987
|
+
name: $(l.icon),
|
|
1988
|
+
size: 16
|
|
1989
|
+
}, null, 8, ["name"])) : (w(), E("span", Do, G(re(l.menuName)), 1))
|
|
1990
|
+
])) : le("", !0),
|
|
1991
|
+
s("span", Fo, G(l.menuName), 1)
|
|
1992
|
+
])
|
|
1993
|
+
]),
|
|
1994
|
+
_: 2
|
|
1995
|
+
}, 1032, ["index"]))), 128))
|
|
1996
|
+
]),
|
|
1997
|
+
_: 1
|
|
1998
|
+
}, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
|
|
1999
|
+
s("div", Vo, [
|
|
2000
|
+
s("div", {
|
|
2001
|
+
class: "mix-top-menu__search",
|
|
2002
|
+
ref_key: "searchRef",
|
|
2003
|
+
ref: J
|
|
2004
|
+
}, [
|
|
2005
|
+
R(y(Z), {
|
|
2006
|
+
name: "search",
|
|
2007
|
+
size: 14,
|
|
2008
|
+
class: "mix-top-menu__search-icon"
|
|
2009
|
+
}),
|
|
2010
|
+
lt(s("input", {
|
|
2011
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => A.value = l),
|
|
2012
|
+
type: "text",
|
|
2013
|
+
class: "mix-top-menu__search-input",
|
|
2014
|
+
placeholder: "搜索菜单...",
|
|
2015
|
+
onFocus: a[1] || (a[1] = (l) => O.value = !0)
|
|
2016
|
+
}, null, 544), [
|
|
2017
|
+
[bt, A.value]
|
|
2018
|
+
]),
|
|
2019
|
+
R(Ve, { name: "search-dropdown" }, {
|
|
2020
|
+
default: X(() => [
|
|
2021
|
+
O.value && (_.value.length > 0 || A.value) ? (w(), E("div", jo, [
|
|
2022
|
+
_.value.length > 0 ? (w(), E("div", qo, [
|
|
2023
|
+
(w(!0), E(he, null, ge(_.value, (l) => (w(), E("div", {
|
|
2024
|
+
key: l.path,
|
|
2025
|
+
class: "mix-top-menu__search-item",
|
|
2026
|
+
onClick: (c) => ke(l.path)
|
|
2027
|
+
}, [
|
|
2028
|
+
l.title !== "首页" ? (w(), E("span", Ko, [
|
|
2029
|
+
te($(l.icon)) ? (w(), ce(y(Z), {
|
|
2030
|
+
key: 0,
|
|
2031
|
+
name: $(l.icon),
|
|
2032
|
+
size: 16
|
|
2033
|
+
}, null, 8, ["name"])) : (w(), E("span", Ho, G(re(l.title)), 1))
|
|
2034
|
+
])) : le("", !0),
|
|
2035
|
+
s("span", Wo, G(l.title), 1),
|
|
2036
|
+
l.parentTitle ? (w(), E("span", Xo, G(l.parentTitle), 1)) : le("", !0)
|
|
2037
|
+
], 8, Go))), 128))
|
|
2038
|
+
])) : (w(), E("div", Yo, " 未找到匹配的菜单 "))
|
|
2039
|
+
])) : le("", !0)
|
|
2040
|
+
]),
|
|
2041
|
+
_: 1
|
|
2042
|
+
})
|
|
2043
|
+
], 512),
|
|
2044
|
+
s("div", {
|
|
2045
|
+
class: "mix-top-menu__action",
|
|
2046
|
+
onClick: ie,
|
|
2047
|
+
title: W.value ? "退出全屏" : "全屏"
|
|
2048
|
+
}, [
|
|
2049
|
+
R(y(Z), {
|
|
2050
|
+
name: W.value ? "fullscreen-exit" : "fullscreen",
|
|
2051
|
+
size: 16
|
|
2052
|
+
}, null, 8, ["name"])
|
|
2053
|
+
], 8, Jo),
|
|
2054
|
+
s("div", {
|
|
2055
|
+
class: "mix-top-menu__action",
|
|
2056
|
+
onClick: we,
|
|
2057
|
+
title: "换肤设置"
|
|
2058
|
+
}, [
|
|
2059
|
+
R(y(Z), {
|
|
2060
|
+
name: "skin",
|
|
2061
|
+
size: 16
|
|
2062
|
+
})
|
|
2063
|
+
]),
|
|
2064
|
+
s("div", {
|
|
2065
|
+
class: "mix-top-menu__action",
|
|
2066
|
+
onClick: D,
|
|
2067
|
+
title: "切换主题"
|
|
2068
|
+
}, [
|
|
2069
|
+
R(y(Z), {
|
|
2070
|
+
name: y(f).isDark ? "sun" : "moon",
|
|
2071
|
+
size: 16
|
|
2072
|
+
}, null, 8, ["name"])
|
|
2073
|
+
]),
|
|
2074
|
+
s("div", {
|
|
2075
|
+
class: "mix-top-menu__user",
|
|
2076
|
+
ref_key: "dropdownRef",
|
|
2077
|
+
ref: I
|
|
2078
|
+
}, [
|
|
2079
|
+
s("div", {
|
|
2080
|
+
class: "mix-top-menu__user-trigger",
|
|
2081
|
+
onClick: it(Ce, ["stop"])
|
|
2082
|
+
}, [
|
|
2083
|
+
s("div", Zo, [
|
|
2084
|
+
s("span", null, G(((d = y(k).userName) == null ? void 0 : d.charAt(0)) || "U"), 1)
|
|
2085
|
+
]),
|
|
2086
|
+
s("span", Qo, G(y(k).userName), 1),
|
|
2087
|
+
s("span", {
|
|
2088
|
+
class: _e(["mix-top-menu__user-arrow", { "is-active": V.value }])
|
|
2089
|
+
}, "▼", 2)
|
|
2090
|
+
]),
|
|
2091
|
+
R(Ve, { name: "dropdown" }, {
|
|
2092
|
+
default: X(() => {
|
|
2093
|
+
var l;
|
|
2094
|
+
return [
|
|
2095
|
+
V.value ? (w(), E("div", er, [
|
|
2096
|
+
s("div", tr, [
|
|
2097
|
+
s("div", sr, [
|
|
2098
|
+
s("span", null, G(((l = y(k).userName) == null ? void 0 : l.charAt(0)) || "U"), 1)
|
|
2099
|
+
]),
|
|
2100
|
+
s("div", nr, [
|
|
2101
|
+
s("div", or, G(y(k).userName), 1),
|
|
2102
|
+
s("div", rr, G(y(k).departmentName), 1)
|
|
2103
|
+
])
|
|
2104
|
+
]),
|
|
2105
|
+
a[8] || (a[8] = s("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
|
|
2106
|
+
s("div", ar, [
|
|
2107
|
+
s("div", {
|
|
2108
|
+
class: "mix-top-menu__dropdown-item",
|
|
2109
|
+
onClick: B
|
|
2110
|
+
}, [
|
|
2111
|
+
R(y(Z), {
|
|
2112
|
+
name: "user",
|
|
2113
|
+
size: 16
|
|
2114
|
+
}),
|
|
2115
|
+
a[4] || (a[4] = s("span", null, "个人信息", -1))
|
|
2116
|
+
]),
|
|
2117
|
+
s("div", {
|
|
2118
|
+
class: "mix-top-menu__dropdown-item",
|
|
2119
|
+
onClick: t
|
|
2120
|
+
}, [
|
|
2121
|
+
R(y(Z), {
|
|
2122
|
+
name: "lock",
|
|
2123
|
+
size: 16
|
|
2124
|
+
}),
|
|
2125
|
+
a[5] || (a[5] = s("span", null, "修改密码", -1))
|
|
2126
|
+
]),
|
|
2127
|
+
a[7] || (a[7] = s("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
|
|
2128
|
+
s("div", {
|
|
2129
|
+
class: "mix-top-menu__dropdown-item mix-top-menu__dropdown-item--danger",
|
|
2130
|
+
onClick: e
|
|
2131
|
+
}, [
|
|
2132
|
+
R(y(Z), {
|
|
2133
|
+
name: "logout",
|
|
2134
|
+
size: 16
|
|
2135
|
+
}),
|
|
2136
|
+
a[6] || (a[6] = s("span", null, "退出登录", -1))
|
|
2137
|
+
])
|
|
2138
|
+
])
|
|
2139
|
+
])) : le("", !0)
|
|
2140
|
+
];
|
|
2141
|
+
}),
|
|
2142
|
+
_: 1
|
|
2143
|
+
})
|
|
2144
|
+
], 512)
|
|
2145
|
+
]),
|
|
2146
|
+
R(y(Et), {
|
|
2147
|
+
modelValue: Y.value,
|
|
2148
|
+
"onUpdate:modelValue": a[2] || (a[2] = (l) => Y.value = l),
|
|
2149
|
+
title: "换肤设置",
|
|
2150
|
+
direction: "rtl",
|
|
2151
|
+
size: "320px"
|
|
2152
|
+
}, {
|
|
2153
|
+
default: X(() => [
|
|
2154
|
+
s("div", lr, [
|
|
2155
|
+
s("div", ir, [
|
|
2156
|
+
a[12] || (a[12] = s("div", { class: "settings-title" }, "布局模式", -1)),
|
|
2157
|
+
s("div", cr, [
|
|
2158
|
+
(w(), E(he, null, ge(N, (l) => s("div", {
|
|
2159
|
+
key: l.value,
|
|
2160
|
+
class: _e(["layout-option", { "is-active": Ue.value === l.value }]),
|
|
2161
|
+
onClick: (c) => Be(l.value)
|
|
2162
|
+
}, [
|
|
2163
|
+
s("div", dr, [
|
|
2164
|
+
l.value === "sidebar" ? (w(), E("div", fr, [...a[9] || (a[9] = [
|
|
2165
|
+
s("div", { class: "preview-aside" }, null, -1),
|
|
2166
|
+
s("div", { class: "preview-main" }, [
|
|
2167
|
+
s("div", { class: "preview-header" }),
|
|
2168
|
+
s("div", { class: "preview-content" })
|
|
2169
|
+
], -1)
|
|
2170
|
+
])])) : l.value === "top" ? (w(), E("div", pr, [...a[10] || (a[10] = [
|
|
2171
|
+
s("div", { class: "preview-header-full" }, null, -1),
|
|
2172
|
+
s("div", { class: "preview-content-full" }, null, -1)
|
|
2173
|
+
])])) : (w(), E("div", mr, [...a[11] || (a[11] = [
|
|
2174
|
+
s("div", { class: "preview-header-mix" }, [
|
|
2175
|
+
s("div", { class: "preview-mix-left" })
|
|
2176
|
+
], -1),
|
|
2177
|
+
s("div", { class: "preview-mix-body" }, [
|
|
2178
|
+
s("div", { class: "preview-mix-aside" }),
|
|
2179
|
+
s("div", { class: "preview-mix-content" })
|
|
2180
|
+
], -1)
|
|
2181
|
+
])]))
|
|
2182
|
+
]),
|
|
2183
|
+
s("span", hr, G(l.label), 1)
|
|
2184
|
+
], 10, ur)), 64))
|
|
2185
|
+
])
|
|
2186
|
+
]),
|
|
2187
|
+
s("div", vr, [
|
|
2188
|
+
a[13] || (a[13] = s("div", { class: "settings-title" }, "主题色", -1)),
|
|
2189
|
+
s("div", gr, [
|
|
2190
|
+
(w(), E(he, null, ge(Me, (l) => s("div", {
|
|
2191
|
+
key: l.value,
|
|
2192
|
+
class: _e(["color-option", { "is-active": y(f).primaryColor === l.value }]),
|
|
2193
|
+
style: Ye({ backgroundColor: l.value }),
|
|
2194
|
+
title: l.label,
|
|
2195
|
+
onClick: (c) => H(l.value)
|
|
2196
|
+
}, [
|
|
2197
|
+
y(f).primaryColor === l.value ? (w(), ce(y(Z), {
|
|
2198
|
+
key: 0,
|
|
2199
|
+
name: "check",
|
|
2200
|
+
size: 12,
|
|
2201
|
+
color: "#fff"
|
|
2202
|
+
})) : le("", !0)
|
|
2203
|
+
], 14, _r)), 64))
|
|
2204
|
+
])
|
|
2205
|
+
]),
|
|
2206
|
+
s("div", wr, [
|
|
2207
|
+
a[18] || (a[18] = s("div", { class: "settings-title" }, "功能设置", -1)),
|
|
2208
|
+
s("div", yr, [
|
|
2209
|
+
s("div", br, [
|
|
2210
|
+
a[15] || (a[15] = s("span", null, "灰色模式", -1)),
|
|
2211
|
+
s("div", {
|
|
2212
|
+
class: _e(["switch-wrapper", { "is-checked": ne.value }]),
|
|
2213
|
+
onClick: Ne
|
|
2214
|
+
}, [...a[14] || (a[14] = [
|
|
2215
|
+
s("span", { class: "switch-core" }, null, -1)
|
|
2216
|
+
])], 2)
|
|
2217
|
+
]),
|
|
2218
|
+
s("div", kr, [
|
|
2219
|
+
a[17] || (a[17] = s("span", null, "暗黑模式", -1)),
|
|
2220
|
+
s("div", {
|
|
2221
|
+
class: _e(["switch-wrapper", { "is-checked": y(f).isDark }]),
|
|
2222
|
+
onClick: Oe
|
|
2223
|
+
}, [...a[16] || (a[16] = [
|
|
2224
|
+
s("span", { class: "switch-core" }, null, -1)
|
|
2225
|
+
])], 2)
|
|
2226
|
+
])
|
|
2227
|
+
])
|
|
2228
|
+
])
|
|
2229
|
+
])
|
|
2230
|
+
]),
|
|
2231
|
+
_: 1
|
|
2232
|
+
}, 8, ["modelValue"])
|
|
2233
|
+
]);
|
|
2234
|
+
};
|
|
2235
|
+
}
|
|
2236
|
+
}), Cr = /* @__PURE__ */ $e(xr, [["__scopeId", "data-v-25806305"]]), Nr = {
|
|
2237
|
+
key: 0,
|
|
2238
|
+
class: "layout layout--sidebar"
|
|
2239
|
+
}, Er = { class: "layout__main" }, Sr = { class: "layout__header" }, $r = { class: "layout__content" }, Mr = {
|
|
2240
|
+
key: 1,
|
|
2241
|
+
class: "layout layout--top"
|
|
2242
|
+
}, Lr = { class: "layout__top-menu" }, Ir = { class: "layout__main" }, Ar = { class: "layout__content" }, Tr = {
|
|
2243
|
+
key: 2,
|
|
2244
|
+
class: "layout layout--mix"
|
|
2245
|
+
}, Or = { class: "layout__mix-top-menu" }, Ur = { class: "layout__mix-body" }, Br = { class: "layout__content" }, Pr = /* @__PURE__ */ Ae({
|
|
2246
|
+
__name: "index",
|
|
2247
|
+
setup(o) {
|
|
2248
|
+
const i = De(), v = Pe(), m = j(
|
|
2249
|
+
() => i.isCollapsed ? "64px" : "210px"
|
|
2250
|
+
), f = j(() => i.layout), k = j(() => f.value === "mix"), S = j(() => f.value === "sidebar" ? v.menuList : f.value === "mix" ? i.mixSubMenus : []), g = j(() => k.value ? S.value.length > 0 : !1);
|
|
2251
|
+
return (M, _) => {
|
|
2252
|
+
const x = Rt("router-view");
|
|
2253
|
+
return w(), E(he, null, [
|
|
2254
|
+
f.value === "sidebar" ? (w(), E("div", Nr, [
|
|
2255
|
+
s("aside", {
|
|
2256
|
+
class: "layout__aside",
|
|
2257
|
+
style: Ye({ width: m.value })
|
|
2258
|
+
}, [
|
|
2259
|
+
R(Pt, {
|
|
2260
|
+
"menu-list": S.value,
|
|
2261
|
+
"show-logo": !0,
|
|
2262
|
+
"show-user": !0
|
|
2263
|
+
}, null, 8, ["menu-list"])
|
|
2264
|
+
], 4),
|
|
2265
|
+
s("div", Er, [
|
|
2266
|
+
s("header", Sr, [
|
|
2267
|
+
R(Sn)
|
|
2268
|
+
]),
|
|
2269
|
+
s("main", $r, [
|
|
2270
|
+
R(x)
|
|
2271
|
+
])
|
|
2272
|
+
])
|
|
2273
|
+
])) : le("", !0),
|
|
2274
|
+
f.value === "top" ? (w(), E("div", Mr, [
|
|
2275
|
+
s("div", Lr, [
|
|
2276
|
+
R(Oo)
|
|
2277
|
+
]),
|
|
2278
|
+
s("div", Ir, [
|
|
2279
|
+
s("main", Ar, [
|
|
2280
|
+
R(x)
|
|
2281
|
+
])
|
|
2282
|
+
])
|
|
2283
|
+
])) : le("", !0),
|
|
2284
|
+
f.value === "mix" ? (w(), E("div", Tr, [
|
|
2285
|
+
s("div", Or, [
|
|
2286
|
+
R(Cr)
|
|
2287
|
+
]),
|
|
2288
|
+
s("div", Ur, [
|
|
2289
|
+
g.value ? (w(), E("aside", {
|
|
2290
|
+
key: 0,
|
|
2291
|
+
class: "layout__aside",
|
|
2292
|
+
style: Ye({ width: m.value })
|
|
2293
|
+
}, [
|
|
2294
|
+
R(Pt, {
|
|
2295
|
+
"menu-list": S.value,
|
|
2296
|
+
"show-logo": !1,
|
|
2297
|
+
"show-user": !1
|
|
2298
|
+
}, null, 8, ["menu-list"])
|
|
2299
|
+
], 4)) : le("", !0),
|
|
2300
|
+
s("main", Br, [
|
|
2301
|
+
R(x)
|
|
2302
|
+
])
|
|
2303
|
+
])
|
|
2304
|
+
])) : le("", !0)
|
|
2305
|
+
], 64);
|
|
2306
|
+
};
|
|
2307
|
+
}
|
|
2308
|
+
}), qt = /* @__PURE__ */ $e(Pr, [["__scopeId", "data-v-24c73186"]]), Rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2309
|
+
__proto__: null,
|
|
2310
|
+
default: qt
|
|
2311
|
+
}, Symbol.toStringTag, { value: "Module" })), zr = { class: "tabs-wrapper" }, Dr = { class: "tab-label" }, Fr = ["onClick"], Vr = /* @__PURE__ */ Ae({
|
|
2312
|
+
__name: "Tabs",
|
|
2313
|
+
setup(o) {
|
|
2314
|
+
const i = qe(), v = ze(), m = j(() => {
|
|
2315
|
+
const g = [];
|
|
2316
|
+
return i.matched.forEach((M) => {
|
|
2317
|
+
var _;
|
|
2318
|
+
(_ = M.meta) != null && _.affix && g.push({
|
|
2319
|
+
name: M.name,
|
|
2320
|
+
title: M.meta.title,
|
|
2321
|
+
path: M.path,
|
|
2322
|
+
affix: !0
|
|
2323
|
+
});
|
|
2324
|
+
}), g;
|
|
2325
|
+
}), f = j(() => i.path), k = (g) => {
|
|
2326
|
+
v.push(g);
|
|
2327
|
+
}, S = (g) => {
|
|
2328
|
+
const M = m.value.find((_) => _.path === g);
|
|
2329
|
+
if (!(M != null && M.affix) && g === f.value) {
|
|
2330
|
+
const _ = m.value.findIndex((L) => L.path === g), x = m.value[_ - 1] || m.value[_ + 1];
|
|
2331
|
+
x && v.push(x.path);
|
|
2332
|
+
}
|
|
2333
|
+
};
|
|
2334
|
+
return (g, M) => (w(), E("div", zr, [
|
|
2335
|
+
R(y(ns), {
|
|
2336
|
+
modelValue: f.value,
|
|
2337
|
+
"onUpdate:modelValue": M[0] || (M[0] = (_) => f.value = _),
|
|
2338
|
+
type: "card",
|
|
2339
|
+
onTabClick: k
|
|
2340
|
+
}, {
|
|
2341
|
+
default: X(() => [
|
|
2342
|
+
(w(!0), E(he, null, ge(m.value, (_) => (w(), ce(y(os), {
|
|
2343
|
+
key: _.path,
|
|
2344
|
+
name: _.path,
|
|
2345
|
+
label: _.title,
|
|
2346
|
+
closable: !_.affix
|
|
2347
|
+
}, {
|
|
2348
|
+
label: X(() => [
|
|
2349
|
+
s("span", Dr, [
|
|
2350
|
+
Fe(G(_.title) + " ", 1),
|
|
2351
|
+
_.affix ? le("", !0) : (w(), E("span", {
|
|
2352
|
+
key: 0,
|
|
2353
|
+
class: "tab-close",
|
|
2354
|
+
onClick: it((x) => S(_.path), ["stop"])
|
|
2355
|
+
}, " ✕ ", 8, Fr))
|
|
2356
|
+
])
|
|
2357
|
+
]),
|
|
2358
|
+
_: 2
|
|
2359
|
+
}, 1032, ["name", "label", "closable"]))), 128))
|
|
2360
|
+
]),
|
|
2361
|
+
_: 1
|
|
2362
|
+
}, 8, ["modelValue"])
|
|
2363
|
+
]));
|
|
2364
|
+
}
|
|
2365
|
+
}), Xa = /* @__PURE__ */ $e(Vr, [["__scopeId", "data-v-9156d8cd"]]), jr = {}, qr = { class: "footer" };
|
|
2366
|
+
function Gr(o, i) {
|
|
2367
|
+
return w(), E("div", qr, [...i[0] || (i[0] = [
|
|
2368
|
+
s("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
|
|
2369
|
+
])]);
|
|
2370
|
+
}
|
|
2371
|
+
const Ya = /* @__PURE__ */ $e(jr, [["render", Gr], ["__scopeId", "data-v-4852826a"]]);
|
|
2372
|
+
var Kr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2373
|
+
function Hr(o) {
|
|
2374
|
+
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
2375
|
+
}
|
|
2376
|
+
var dt = { exports: {} }, Gt = { exports: {} }, Kt = { exports: {} };
|
|
2377
|
+
(function(o) {
|
|
2378
|
+
(function(i) {
|
|
2379
|
+
var v, m = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, f = Math.ceil, k = Math.floor, S = "[BigNumber Error] ", g = S + "Number primitive has more than 15 significant digits: ", M = 1e14, _ = 14, x = 9007199254740991, L = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], C = 1e7, K = 1e9;
|
|
2380
|
+
function Q(O) {
|
|
2381
|
+
var A, J, ee, $ = N.prototype = { constructor: N, toString: null, valueOf: null }, re = new N(1), te = 20, D = 4, ie = -7, de = 21, Ce = -1e7, fe = 1e7, be = !1, ke = 1, we = 0, Te = {
|
|
2382
|
+
prefix: "",
|
|
2383
|
+
groupSize: 3,
|
|
2384
|
+
secondaryGroupSize: 0,
|
|
2385
|
+
groupSeparator: ",",
|
|
2386
|
+
decimalSeparator: ".",
|
|
2387
|
+
fractionGroupSize: 0,
|
|
2388
|
+
fractionGroupSeparator: " ",
|
|
2389
|
+
// non-breaking space
|
|
2390
|
+
suffix: ""
|
|
2391
|
+
}, Ne = "0123456789abcdefghijklmnopqrstuvwxyz", Oe = !0;
|
|
2392
|
+
function N(t, e) {
|
|
2393
|
+
var r, u, n, a, d, l, c, h, p = this;
|
|
2394
|
+
if (!(p instanceof N)) return new N(t, e);
|
|
2395
|
+
if (e == null) {
|
|
2396
|
+
if (t && t._isBigNumber === !0) {
|
|
2397
|
+
p.s = t.s, !t.c || t.e > fe ? p.c = p.e = null : t.e < Ce ? p.c = [p.e = 0] : (p.e = t.e, p.c = t.c.slice());
|
|
2398
|
+
return;
|
|
2399
|
+
}
|
|
2400
|
+
if ((l = typeof t == "number") && t * 0 == 0) {
|
|
2401
|
+
if (p.s = 1 / t < 0 ? (t = -t, -1) : 1, t === ~~t) {
|
|
2402
|
+
for (a = 0, d = t; d >= 10; d /= 10, a++) ;
|
|
2403
|
+
a > fe ? p.c = p.e = null : (p.e = a, p.c = [t]);
|
|
2404
|
+
return;
|
|
2405
|
+
}
|
|
2406
|
+
h = String(t);
|
|
2407
|
+
} else {
|
|
2408
|
+
if (!m.test(h = String(t))) return ee(p, h, l);
|
|
2409
|
+
p.s = h.charCodeAt(0) == 45 ? (h = h.slice(1), -1) : 1;
|
|
2410
|
+
}
|
|
2411
|
+
(a = h.indexOf(".")) > -1 && (h = h.replace(".", "")), (d = h.search(/e/i)) > 0 ? (a < 0 && (a = d), a += +h.slice(d + 1), h = h.substring(0, d)) : a < 0 && (a = h.length);
|
|
2412
|
+
} else {
|
|
2413
|
+
if (I(e, 2, Ne.length, "Base"), e == 10 && Oe)
|
|
2414
|
+
return p = new N(t), H(p, te + p.e + 1, D);
|
|
2415
|
+
if (h = String(t), l = typeof t == "number") {
|
|
2416
|
+
if (t * 0 != 0) return ee(p, h, l, e);
|
|
2417
|
+
if (p.s = 1 / t < 0 ? (h = h.slice(1), -1) : 1, N.DEBUG && h.replace(/^0\.0*|\./, "").length > 15)
|
|
2418
|
+
throw Error(g + t);
|
|
2419
|
+
} else
|
|
2420
|
+
p.s = h.charCodeAt(0) === 45 ? (h = h.slice(1), -1) : 1;
|
|
2421
|
+
for (r = Ne.slice(0, e), a = d = 0, c = h.length; d < c; d++)
|
|
2422
|
+
if (r.indexOf(u = h.charAt(d)) < 0) {
|
|
2423
|
+
if (u == ".") {
|
|
2424
|
+
if (d > a) {
|
|
2425
|
+
a = c;
|
|
2426
|
+
continue;
|
|
2427
|
+
}
|
|
2428
|
+
} else if (!n && (h == h.toUpperCase() && (h = h.toLowerCase()) || h == h.toLowerCase() && (h = h.toUpperCase()))) {
|
|
2429
|
+
n = !0, d = -1, a = 0;
|
|
2430
|
+
continue;
|
|
2431
|
+
}
|
|
2432
|
+
return ee(p, String(t), l, e);
|
|
2433
|
+
}
|
|
2434
|
+
l = !1, h = J(h, e, 10, p.s), (a = h.indexOf(".")) > -1 ? h = h.replace(".", "") : a = h.length;
|
|
2435
|
+
}
|
|
2436
|
+
for (d = 0; h.charCodeAt(d) === 48; d++) ;
|
|
2437
|
+
for (c = h.length; h.charCodeAt(--c) === 48; ) ;
|
|
2438
|
+
if (h = h.slice(d, ++c)) {
|
|
2439
|
+
if (c -= d, l && N.DEBUG && c > 15 && (t > x || t !== k(t)))
|
|
2440
|
+
throw Error(g + p.s * t);
|
|
2441
|
+
if ((a = a - d - 1) > fe)
|
|
2442
|
+
p.c = p.e = null;
|
|
2443
|
+
else if (a < Ce)
|
|
2444
|
+
p.c = [p.e = 0];
|
|
2445
|
+
else {
|
|
2446
|
+
if (p.e = a, p.c = [], d = (a + 1) % _, a < 0 && (d += _), d < c) {
|
|
2447
|
+
for (d && p.c.push(+h.slice(0, d)), c -= _; d < c; )
|
|
2448
|
+
p.c.push(+h.slice(d, d += _));
|
|
2449
|
+
d = _ - (h = h.slice(d)).length;
|
|
2450
|
+
} else
|
|
2451
|
+
d -= c;
|
|
2452
|
+
for (; d--; h += "0") ;
|
|
2453
|
+
p.c.push(+h);
|
|
2454
|
+
}
|
|
2455
|
+
} else
|
|
2456
|
+
p.c = [p.e = 0];
|
|
2457
|
+
}
|
|
2458
|
+
N.clone = Q, N.ROUND_UP = 0, N.ROUND_DOWN = 1, N.ROUND_CEIL = 2, N.ROUND_FLOOR = 3, N.ROUND_HALF_UP = 4, N.ROUND_HALF_DOWN = 5, N.ROUND_HALF_EVEN = 6, N.ROUND_HALF_CEIL = 7, N.ROUND_HALF_FLOOR = 8, N.EUCLID = 9, N.config = N.set = function(t) {
|
|
2459
|
+
var e, r;
|
|
2460
|
+
if (t != null)
|
|
2461
|
+
if (typeof t == "object") {
|
|
2462
|
+
if (t.hasOwnProperty(e = "DECIMAL_PLACES") && (r = t[e], I(r, 0, K, e), te = r), t.hasOwnProperty(e = "ROUNDING_MODE") && (r = t[e], I(r, 0, 8, e), D = r), t.hasOwnProperty(e = "EXPONENTIAL_AT") && (r = t[e], r && r.pop ? (I(r[0], -K, 0, e), I(r[1], 0, K, e), ie = r[0], de = r[1]) : (I(r, -K, K, e), ie = -(de = r < 0 ? -r : r))), t.hasOwnProperty(e = "RANGE"))
|
|
2463
|
+
if (r = t[e], r && r.pop)
|
|
2464
|
+
I(r[0], -K, -1, e), I(r[1], 1, K, e), Ce = r[0], fe = r[1];
|
|
2465
|
+
else if (I(r, -K, K, e), r)
|
|
2466
|
+
Ce = -(fe = r < 0 ? -r : r);
|
|
2467
|
+
else
|
|
2468
|
+
throw Error(S + e + " cannot be zero: " + r);
|
|
2469
|
+
if (t.hasOwnProperty(e = "CRYPTO"))
|
|
2470
|
+
if (r = t[e], r === !!r)
|
|
2471
|
+
if (r)
|
|
2472
|
+
if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
2473
|
+
be = r;
|
|
2474
|
+
else
|
|
2475
|
+
throw be = !r, Error(S + "crypto unavailable");
|
|
2476
|
+
else
|
|
2477
|
+
be = r;
|
|
2478
|
+
else
|
|
2479
|
+
throw Error(S + e + " not true or false: " + r);
|
|
2480
|
+
if (t.hasOwnProperty(e = "MODULO_MODE") && (r = t[e], I(r, 0, 9, e), ke = r), t.hasOwnProperty(e = "POW_PRECISION") && (r = t[e], I(r, 0, K, e), we = r), t.hasOwnProperty(e = "FORMAT"))
|
|
2481
|
+
if (r = t[e], typeof r == "object") Te = r;
|
|
2482
|
+
else throw Error(S + e + " not an object: " + r);
|
|
2483
|
+
if (t.hasOwnProperty(e = "ALPHABET"))
|
|
2484
|
+
if (r = t[e], typeof r == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(r))
|
|
2485
|
+
Oe = r.slice(0, 10) == "0123456789", Ne = r;
|
|
2486
|
+
else
|
|
2487
|
+
throw Error(S + e + " invalid: " + r);
|
|
2488
|
+
} else
|
|
2489
|
+
throw Error(S + "Object expected: " + t);
|
|
2490
|
+
return {
|
|
2491
|
+
DECIMAL_PLACES: te,
|
|
2492
|
+
ROUNDING_MODE: D,
|
|
2493
|
+
EXPONENTIAL_AT: [ie, de],
|
|
2494
|
+
RANGE: [Ce, fe],
|
|
2495
|
+
CRYPTO: be,
|
|
2496
|
+
MODULO_MODE: ke,
|
|
2497
|
+
POW_PRECISION: we,
|
|
2498
|
+
FORMAT: Te,
|
|
2499
|
+
ALPHABET: Ne
|
|
2500
|
+
};
|
|
2501
|
+
}, N.isBigNumber = function(t) {
|
|
2502
|
+
if (!t || t._isBigNumber !== !0) return !1;
|
|
2503
|
+
if (!N.DEBUG) return !0;
|
|
2504
|
+
var e, r, u = t.c, n = t.e, a = t.s;
|
|
2505
|
+
e: if ({}.toString.call(u) == "[object Array]") {
|
|
2506
|
+
if ((a === 1 || a === -1) && n >= -K && n <= K && n === k(n)) {
|
|
2507
|
+
if (u[0] === 0) {
|
|
2508
|
+
if (n === 0 && u.length === 1) return !0;
|
|
2509
|
+
break e;
|
|
2510
|
+
}
|
|
2511
|
+
if (e = (n + 1) % _, e < 1 && (e += _), String(u[0]).length == e) {
|
|
2512
|
+
for (e = 0; e < u.length; e++)
|
|
2513
|
+
if (r = u[e], r < 0 || r >= M || r !== k(r)) break e;
|
|
2514
|
+
if (r !== 0) return !0;
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
} else if (u === null && n === null && (a === null || a === 1 || a === -1))
|
|
2518
|
+
return !0;
|
|
2519
|
+
throw Error(S + "Invalid BigNumber: " + t);
|
|
2520
|
+
}, N.maximum = N.max = function() {
|
|
2521
|
+
return Be(arguments, -1);
|
|
2522
|
+
}, N.minimum = N.min = function() {
|
|
2523
|
+
return Be(arguments, 1);
|
|
2524
|
+
}, N.random = function() {
|
|
2525
|
+
var t = 9007199254740992, e = Math.random() * t & 2097151 ? function() {
|
|
2526
|
+
return k(Math.random() * t);
|
|
2527
|
+
} : function() {
|
|
2528
|
+
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
2529
|
+
};
|
|
2530
|
+
return function(r) {
|
|
2531
|
+
var u, n, a, d, l, c = 0, h = [], p = new N(re);
|
|
2532
|
+
if (r == null ? r = te : I(r, 0, K), d = f(r / _), be)
|
|
2533
|
+
if (crypto.getRandomValues) {
|
|
2534
|
+
for (u = crypto.getRandomValues(new Uint32Array(d *= 2)); c < d; )
|
|
2535
|
+
l = u[c] * 131072 + (u[c + 1] >>> 11), l >= 9e15 ? (n = crypto.getRandomValues(new Uint32Array(2)), u[c] = n[0], u[c + 1] = n[1]) : (h.push(l % 1e14), c += 2);
|
|
2536
|
+
c = d / 2;
|
|
2537
|
+
} else if (crypto.randomBytes) {
|
|
2538
|
+
for (u = crypto.randomBytes(d *= 7); c < d; )
|
|
2539
|
+
l = (u[c] & 31) * 281474976710656 + u[c + 1] * 1099511627776 + u[c + 2] * 4294967296 + u[c + 3] * 16777216 + (u[c + 4] << 16) + (u[c + 5] << 8) + u[c + 6], l >= 9e15 ? crypto.randomBytes(7).copy(u, c) : (h.push(l % 1e14), c += 7);
|
|
2540
|
+
c = d / 7;
|
|
2541
|
+
} else
|
|
2542
|
+
throw be = !1, Error(S + "crypto unavailable");
|
|
2543
|
+
if (!be)
|
|
2544
|
+
for (; c < d; )
|
|
2545
|
+
l = e(), l < 9e15 && (h[c++] = l % 1e14);
|
|
2546
|
+
for (d = h[--c], r %= _, d && r && (l = L[_ - r], h[c] = k(d / l) * l); h[c] === 0; h.pop(), c--) ;
|
|
2547
|
+
if (c < 0)
|
|
2548
|
+
h = [a = 0];
|
|
2549
|
+
else {
|
|
2550
|
+
for (a = -1; h[0] === 0; h.splice(0, 1), a -= _) ;
|
|
2551
|
+
for (c = 1, l = h[0]; l >= 10; l /= 10, c++) ;
|
|
2552
|
+
c < _ && (a -= _ - c);
|
|
2553
|
+
}
|
|
2554
|
+
return p.e = a, p.c = h, p;
|
|
2555
|
+
};
|
|
2556
|
+
}(), N.sum = function() {
|
|
2557
|
+
for (var t = 1, e = arguments, r = new N(e[0]); t < e.length; ) r = r.plus(e[t++]);
|
|
2558
|
+
return r;
|
|
2559
|
+
}, J = /* @__PURE__ */ function() {
|
|
2560
|
+
var t = "0123456789";
|
|
2561
|
+
function e(r, u, n, a) {
|
|
2562
|
+
for (var d, l = [0], c, h = 0, p = r.length; h < p; ) {
|
|
2563
|
+
for (c = l.length; c--; l[c] *= u) ;
|
|
2564
|
+
for (l[0] += a.indexOf(r.charAt(h++)), d = 0; d < l.length; d++)
|
|
2565
|
+
l[d] > n - 1 && (l[d + 1] == null && (l[d + 1] = 0), l[d + 1] += l[d] / n | 0, l[d] %= n);
|
|
2566
|
+
}
|
|
2567
|
+
return l.reverse();
|
|
2568
|
+
}
|
|
2569
|
+
return function(r, u, n, a, d) {
|
|
2570
|
+
var l, c, h, p, b, z, F, oe, pe = r.indexOf("."), ve = te, se = D;
|
|
2571
|
+
for (pe >= 0 && (p = we, we = 0, r = r.replace(".", ""), oe = new N(u), z = oe.pow(r.length - pe), we = p, oe.c = e(
|
|
2572
|
+
ne(T(z.c), z.e, "0"),
|
|
2573
|
+
10,
|
|
2574
|
+
n,
|
|
2575
|
+
t
|
|
2576
|
+
), oe.e = oe.c.length), F = e(r, u, n, d ? (l = Ne, t) : (l = t, Ne)), h = p = F.length; F[--p] == 0; F.pop()) ;
|
|
2577
|
+
if (!F[0]) return l.charAt(0);
|
|
2578
|
+
if (pe < 0 ? --h : (z.c = F, z.e = h, z.s = a, z = A(z, oe, ve, se, n), F = z.c, b = z.r, h = z.e), c = h + ve + 1, pe = F[c], p = n / 2, b = b || c < 0 || F[c + 1] != null, b = se < 4 ? (pe != null || b) && (se == 0 || se == (z.s < 0 ? 3 : 2)) : pe > p || pe == p && (se == 4 || b || se == 6 && F[c - 1] & 1 || se == (z.s < 0 ? 8 : 7)), c < 1 || !F[0])
|
|
2579
|
+
r = b ? ne(l.charAt(1), -ve, l.charAt(0)) : l.charAt(0);
|
|
2580
|
+
else {
|
|
2581
|
+
if (F.length = c, b)
|
|
2582
|
+
for (--n; ++F[--c] > n; )
|
|
2583
|
+
F[c] = 0, c || (++h, F = [1].concat(F));
|
|
2584
|
+
for (p = F.length; !F[--p]; ) ;
|
|
2585
|
+
for (pe = 0, r = ""; pe <= p; r += l.charAt(F[pe++])) ;
|
|
2586
|
+
r = ne(r, h, l.charAt(0));
|
|
2587
|
+
}
|
|
2588
|
+
return r;
|
|
2589
|
+
};
|
|
2590
|
+
}(), A = /* @__PURE__ */ function() {
|
|
2591
|
+
function t(u, n, a) {
|
|
2592
|
+
var d, l, c, h, p = 0, b = u.length, z = n % C, F = n / C | 0;
|
|
2593
|
+
for (u = u.slice(); b--; )
|
|
2594
|
+
c = u[b] % C, h = u[b] / C | 0, d = F * c + h * z, l = z * c + d % C * C + p, p = (l / a | 0) + (d / C | 0) + F * h, u[b] = l % a;
|
|
2595
|
+
return p && (u = [p].concat(u)), u;
|
|
2596
|
+
}
|
|
2597
|
+
function e(u, n, a, d) {
|
|
2598
|
+
var l, c;
|
|
2599
|
+
if (a != d)
|
|
2600
|
+
c = a > d ? 1 : -1;
|
|
2601
|
+
else
|
|
2602
|
+
for (l = c = 0; l < a; l++)
|
|
2603
|
+
if (u[l] != n[l]) {
|
|
2604
|
+
c = u[l] > n[l] ? 1 : -1;
|
|
2605
|
+
break;
|
|
2606
|
+
}
|
|
2607
|
+
return c;
|
|
2608
|
+
}
|
|
2609
|
+
function r(u, n, a, d) {
|
|
2610
|
+
for (var l = 0; a--; )
|
|
2611
|
+
u[a] -= l, l = u[a] < n[a] ? 1 : 0, u[a] = l * d + u[a] - n[a];
|
|
2612
|
+
for (; !u[0] && u.length > 1; u.splice(0, 1)) ;
|
|
2613
|
+
}
|
|
2614
|
+
return function(u, n, a, d, l) {
|
|
2615
|
+
var c, h, p, b, z, F, oe, pe, ve, se, ae, ye, Qe, ft, pt, Le, Ge, Ee = u.s == n.s ? 1 : -1, xe = u.c, me = n.c;
|
|
2616
|
+
if (!xe || !xe[0] || !me || !me[0])
|
|
2617
|
+
return new N(
|
|
2618
|
+
// Return NaN if either NaN, or both Infinity or 0.
|
|
2619
|
+
!u.s || !n.s || (xe ? me && xe[0] == me[0] : !me) ? NaN : (
|
|
2620
|
+
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
|
|
2621
|
+
xe && xe[0] == 0 || !me ? Ee * 0 : Ee / 0
|
|
2622
|
+
)
|
|
2623
|
+
);
|
|
2624
|
+
for (pe = new N(Ee), ve = pe.c = [], h = u.e - n.e, Ee = a + h + 1, l || (l = M, h = U(u.e / _) - U(n.e / _), Ee = Ee / _ | 0), p = 0; me[p] == (xe[p] || 0); p++) ;
|
|
2625
|
+
if (me[p] > (xe[p] || 0) && h--, Ee < 0)
|
|
2626
|
+
ve.push(1), b = !0;
|
|
2627
|
+
else {
|
|
2628
|
+
for (ft = xe.length, Le = me.length, p = 0, Ee += 2, z = k(l / (me[0] + 1)), z > 1 && (me = t(me, z, l), xe = t(xe, z, l), Le = me.length, ft = xe.length), Qe = Le, se = xe.slice(0, Le), ae = se.length; ae < Le; se[ae++] = 0) ;
|
|
2629
|
+
Ge = me.slice(), Ge = [0].concat(Ge), pt = me[0], me[1] >= l / 2 && pt++;
|
|
2630
|
+
do {
|
|
2631
|
+
if (z = 0, c = e(me, se, Le, ae), c < 0) {
|
|
2632
|
+
if (ye = se[0], Le != ae && (ye = ye * l + (se[1] || 0)), z = k(ye / pt), z > 1)
|
|
2633
|
+
for (z >= l && (z = l - 1), F = t(me, z, l), oe = F.length, ae = se.length; e(F, se, oe, ae) == 1; )
|
|
2634
|
+
z--, r(F, Le < oe ? Ge : me, oe, l), oe = F.length, c = 1;
|
|
2635
|
+
else
|
|
2636
|
+
z == 0 && (c = z = 1), F = me.slice(), oe = F.length;
|
|
2637
|
+
if (oe < ae && (F = [0].concat(F)), r(se, F, ae, l), ae = se.length, c == -1)
|
|
2638
|
+
for (; e(me, se, Le, ae) < 1; )
|
|
2639
|
+
z++, r(se, Le < ae ? Ge : me, ae, l), ae = se.length;
|
|
2640
|
+
} else c === 0 && (z++, se = [0]);
|
|
2641
|
+
ve[p++] = z, se[0] ? se[ae++] = xe[Qe] || 0 : (se = [xe[Qe]], ae = 1);
|
|
2642
|
+
} while ((Qe++ < ft || se[0] != null) && Ee--);
|
|
2643
|
+
b = se[0] != null, ve[0] || ve.splice(0, 1);
|
|
2644
|
+
}
|
|
2645
|
+
if (l == M) {
|
|
2646
|
+
for (p = 1, Ee = ve[0]; Ee >= 10; Ee /= 10, p++) ;
|
|
2647
|
+
H(pe, a + (pe.e = p + h * _ - 1) + 1, d, b);
|
|
2648
|
+
} else
|
|
2649
|
+
pe.e = h, pe.r = +b;
|
|
2650
|
+
return pe;
|
|
2651
|
+
};
|
|
2652
|
+
}();
|
|
2653
|
+
function Ue(t, e, r, u) {
|
|
2654
|
+
var n, a, d, l, c;
|
|
2655
|
+
if (r == null ? r = D : I(r, 0, 8), !t.c) return t.toString();
|
|
2656
|
+
if (n = t.c[0], d = t.e, e == null)
|
|
2657
|
+
c = T(t.c), c = u == 1 || u == 2 && (d <= ie || d >= de) ? Y(c, d) : ne(c, d, "0");
|
|
2658
|
+
else if (t = H(new N(t), e, r), a = t.e, c = T(t.c), l = c.length, u == 1 || u == 2 && (e <= a || a <= ie)) {
|
|
2659
|
+
for (; l < e; c += "0", l++) ;
|
|
2660
|
+
c = Y(c, a);
|
|
2661
|
+
} else if (e -= d + (u === 2 && a > d), c = ne(c, a, "0"), a + 1 > l) {
|
|
2662
|
+
if (--e > 0) for (c += "."; e--; c += "0") ;
|
|
2663
|
+
} else if (e += a - l, e > 0)
|
|
2664
|
+
for (a + 1 == l && (c += "."); e--; c += "0") ;
|
|
2665
|
+
return t.s < 0 && n ? "-" + c : c;
|
|
2666
|
+
}
|
|
2667
|
+
function Be(t, e) {
|
|
2668
|
+
for (var r, u, n = 1, a = new N(t[0]); n < t.length; n++)
|
|
2669
|
+
u = new N(t[n]), (!u.s || (r = V(a, u)) === e || r === 0 && a.s === e) && (a = u);
|
|
2670
|
+
return a;
|
|
2671
|
+
}
|
|
2672
|
+
function Me(t, e, r) {
|
|
2673
|
+
for (var u = 1, n = e.length; !e[--n]; e.pop()) ;
|
|
2674
|
+
for (n = e[0]; n >= 10; n /= 10, u++) ;
|
|
2675
|
+
return (r = u + r * _ - 1) > fe ? t.c = t.e = null : r < Ce ? t.c = [t.e = 0] : (t.e = r, t.c = e), t;
|
|
2676
|
+
}
|
|
2677
|
+
ee = /* @__PURE__ */ function() {
|
|
2678
|
+
var t = /^(-?)0([xbo])(?=\w[\w.]*$)/i, e = /^([^.]+)\.$/, r = /^\.([^.]+)$/, u = /^-?(Infinity|NaN)$/, n = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
2679
|
+
return function(a, d, l, c) {
|
|
2680
|
+
var h, p = l ? d : d.replace(n, "");
|
|
2681
|
+
if (u.test(p))
|
|
2682
|
+
a.s = isNaN(p) ? null : p < 0 ? -1 : 1;
|
|
2683
|
+
else {
|
|
2684
|
+
if (!l && (p = p.replace(t, function(b, z, F) {
|
|
2685
|
+
return h = (F = F.toLowerCase()) == "x" ? 16 : F == "b" ? 2 : 8, !c || c == h ? z : b;
|
|
2686
|
+
}), c && (h = c, p = p.replace(e, "$1").replace(r, "0.$1")), d != p))
|
|
2687
|
+
return new N(p, h);
|
|
2688
|
+
if (N.DEBUG)
|
|
2689
|
+
throw Error(S + "Not a" + (c ? " base " + c : "") + " number: " + d);
|
|
2690
|
+
a.s = null;
|
|
2691
|
+
}
|
|
2692
|
+
a.c = a.e = null;
|
|
2693
|
+
};
|
|
2694
|
+
}();
|
|
2695
|
+
function H(t, e, r, u) {
|
|
2696
|
+
var n, a, d, l, c, h, p, b = t.c, z = L;
|
|
2697
|
+
if (b) {
|
|
2698
|
+
e: {
|
|
2699
|
+
for (n = 1, l = b[0]; l >= 10; l /= 10, n++) ;
|
|
2700
|
+
if (a = e - n, a < 0)
|
|
2701
|
+
a += _, d = e, c = b[h = 0], p = k(c / z[n - d - 1] % 10);
|
|
2702
|
+
else if (h = f((a + 1) / _), h >= b.length)
|
|
2703
|
+
if (u) {
|
|
2704
|
+
for (; b.length <= h; b.push(0)) ;
|
|
2705
|
+
c = p = 0, n = 1, a %= _, d = a - _ + 1;
|
|
2706
|
+
} else
|
|
2707
|
+
break e;
|
|
2708
|
+
else {
|
|
2709
|
+
for (c = l = b[h], n = 1; l >= 10; l /= 10, n++) ;
|
|
2710
|
+
a %= _, d = a - _ + n, p = d < 0 ? 0 : k(c / z[n - d - 1] % 10);
|
|
2711
|
+
}
|
|
2712
|
+
if (u = u || e < 0 || // Are there any non-zero digits after the rounding digit?
|
|
2713
|
+
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
2714
|
+
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
2715
|
+
b[h + 1] != null || (d < 0 ? c : c % z[n - d - 1]), u = r < 4 ? (p || u) && (r == 0 || r == (t.s < 0 ? 3 : 2)) : p > 5 || p == 5 && (r == 4 || u || r == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
2716
|
+
(a > 0 ? d > 0 ? c / z[n - d] : 0 : b[h - 1]) % 10 & 1 || r == (t.s < 0 ? 8 : 7)), e < 1 || !b[0])
|
|
2717
|
+
return b.length = 0, u ? (e -= t.e + 1, b[0] = z[(_ - e % _) % _], t.e = -e || 0) : b[0] = t.e = 0, t;
|
|
2718
|
+
if (a == 0 ? (b.length = h, l = 1, h--) : (b.length = h + 1, l = z[_ - a], b[h] = d > 0 ? k(c / z[n - d] % z[d]) * l : 0), u)
|
|
2719
|
+
for (; ; )
|
|
2720
|
+
if (h == 0) {
|
|
2721
|
+
for (a = 1, d = b[0]; d >= 10; d /= 10, a++) ;
|
|
2722
|
+
for (d = b[0] += l, l = 1; d >= 10; d /= 10, l++) ;
|
|
2723
|
+
a != l && (t.e++, b[0] == M && (b[0] = 1));
|
|
2724
|
+
break;
|
|
2725
|
+
} else {
|
|
2726
|
+
if (b[h] += l, b[h] != M) break;
|
|
2727
|
+
b[h--] = 0, l = 1;
|
|
2728
|
+
}
|
|
2729
|
+
for (a = b.length; b[--a] === 0; b.pop()) ;
|
|
2730
|
+
}
|
|
2731
|
+
t.e > fe ? t.c = t.e = null : t.e < Ce && (t.c = [t.e = 0]);
|
|
2732
|
+
}
|
|
2733
|
+
return t;
|
|
2734
|
+
}
|
|
2735
|
+
function B(t) {
|
|
2736
|
+
var e, r = t.e;
|
|
2737
|
+
return r === null ? t.toString() : (e = T(t.c), e = r <= ie || r >= de ? Y(e, r) : ne(e, r, "0"), t.s < 0 ? "-" + e : e);
|
|
2738
|
+
}
|
|
2739
|
+
return $.absoluteValue = $.abs = function() {
|
|
2740
|
+
var t = new N(this);
|
|
2741
|
+
return t.s < 0 && (t.s = 1), t;
|
|
2742
|
+
}, $.comparedTo = function(t, e) {
|
|
2743
|
+
return V(this, new N(t, e));
|
|
2744
|
+
}, $.decimalPlaces = $.dp = function(t, e) {
|
|
2745
|
+
var r, u, n, a = this;
|
|
2746
|
+
if (t != null)
|
|
2747
|
+
return I(t, 0, K), e == null ? e = D : I(e, 0, 8), H(new N(a), t + a.e + 1, e);
|
|
2748
|
+
if (!(r = a.c)) return null;
|
|
2749
|
+
if (u = ((n = r.length - 1) - U(this.e / _)) * _, n = r[n]) for (; n % 10 == 0; n /= 10, u--) ;
|
|
2750
|
+
return u < 0 && (u = 0), u;
|
|
2751
|
+
}, $.dividedBy = $.div = function(t, e) {
|
|
2752
|
+
return A(this, new N(t, e), te, D);
|
|
2753
|
+
}, $.dividedToIntegerBy = $.idiv = function(t, e) {
|
|
2754
|
+
return A(this, new N(t, e), 0, 1);
|
|
2755
|
+
}, $.exponentiatedBy = $.pow = function(t, e) {
|
|
2756
|
+
var r, u, n, a, d, l, c, h, p, b = this;
|
|
2757
|
+
if (t = new N(t), t.c && !t.isInteger())
|
|
2758
|
+
throw Error(S + "Exponent not an integer: " + B(t));
|
|
2759
|
+
if (e != null && (e = new N(e)), l = t.e > 14, !b.c || !b.c[0] || b.c[0] == 1 && !b.e && b.c.length == 1 || !t.c || !t.c[0])
|
|
2760
|
+
return p = new N(Math.pow(+B(b), l ? t.s * (2 - W(t)) : +B(t))), e ? p.mod(e) : p;
|
|
2761
|
+
if (c = t.s < 0, e) {
|
|
2762
|
+
if (e.c ? !e.c[0] : !e.s) return new N(NaN);
|
|
2763
|
+
u = !c && b.isInteger() && e.isInteger(), u && (b = b.mod(e));
|
|
2764
|
+
} else {
|
|
2765
|
+
if (t.e > 9 && (b.e > 0 || b.e < -1 || (b.e == 0 ? b.c[0] > 1 || l && b.c[1] >= 24e7 : b.c[0] < 8e13 || l && b.c[0] <= 9999975e7)))
|
|
2766
|
+
return a = b.s < 0 && W(t) ? -0 : 0, b.e > -1 && (a = 1 / a), new N(c ? 1 / a : a);
|
|
2767
|
+
we && (a = f(we / _ + 2));
|
|
2768
|
+
}
|
|
2769
|
+
for (l ? (r = new N(0.5), c && (t.s = 1), h = W(t)) : (n = Math.abs(+B(t)), h = n % 2), p = new N(re); ; ) {
|
|
2770
|
+
if (h) {
|
|
2771
|
+
if (p = p.times(b), !p.c) break;
|
|
2772
|
+
a ? p.c.length > a && (p.c.length = a) : u && (p = p.mod(e));
|
|
2773
|
+
}
|
|
2774
|
+
if (n) {
|
|
2775
|
+
if (n = k(n / 2), n === 0) break;
|
|
2776
|
+
h = n % 2;
|
|
2777
|
+
} else if (t = t.times(r), H(t, t.e + 1, 1), t.e > 14)
|
|
2778
|
+
h = W(t);
|
|
2779
|
+
else {
|
|
2780
|
+
if (n = +B(t), n === 0) break;
|
|
2781
|
+
h = n % 2;
|
|
2782
|
+
}
|
|
2783
|
+
b = b.times(b), a ? b.c && b.c.length > a && (b.c.length = a) : u && (b = b.mod(e));
|
|
2784
|
+
}
|
|
2785
|
+
return u ? p : (c && (p = re.div(p)), e ? p.mod(e) : a ? H(p, we, D, d) : p);
|
|
2786
|
+
}, $.integerValue = function(t) {
|
|
2787
|
+
var e = new N(this);
|
|
2788
|
+
return t == null ? t = D : I(t, 0, 8), H(e, e.e + 1, t);
|
|
2789
|
+
}, $.isEqualTo = $.eq = function(t, e) {
|
|
2790
|
+
return V(this, new N(t, e)) === 0;
|
|
2791
|
+
}, $.isFinite = function() {
|
|
2792
|
+
return !!this.c;
|
|
2793
|
+
}, $.isGreaterThan = $.gt = function(t, e) {
|
|
2794
|
+
return V(this, new N(t, e)) > 0;
|
|
2795
|
+
}, $.isGreaterThanOrEqualTo = $.gte = function(t, e) {
|
|
2796
|
+
return (e = V(this, new N(t, e))) === 1 || e === 0;
|
|
2797
|
+
}, $.isInteger = function() {
|
|
2798
|
+
return !!this.c && U(this.e / _) > this.c.length - 2;
|
|
2799
|
+
}, $.isLessThan = $.lt = function(t, e) {
|
|
2800
|
+
return V(this, new N(t, e)) < 0;
|
|
2801
|
+
}, $.isLessThanOrEqualTo = $.lte = function(t, e) {
|
|
2802
|
+
return (e = V(this, new N(t, e))) === -1 || e === 0;
|
|
2803
|
+
}, $.isNaN = function() {
|
|
2804
|
+
return !this.s;
|
|
2805
|
+
}, $.isNegative = function() {
|
|
2806
|
+
return this.s < 0;
|
|
2807
|
+
}, $.isPositive = function() {
|
|
2808
|
+
return this.s > 0;
|
|
2809
|
+
}, $.isZero = function() {
|
|
2810
|
+
return !!this.c && this.c[0] == 0;
|
|
2811
|
+
}, $.minus = function(t, e) {
|
|
2812
|
+
var r, u, n, a, d = this, l = d.s;
|
|
2813
|
+
if (t = new N(t, e), e = t.s, !l || !e) return new N(NaN);
|
|
2814
|
+
if (l != e)
|
|
2815
|
+
return t.s = -e, d.plus(t);
|
|
2816
|
+
var c = d.e / _, h = t.e / _, p = d.c, b = t.c;
|
|
2817
|
+
if (!c || !h) {
|
|
2818
|
+
if (!p || !b) return p ? (t.s = -e, t) : new N(b ? d : NaN);
|
|
2819
|
+
if (!p[0] || !b[0])
|
|
2820
|
+
return b[0] ? (t.s = -e, t) : new N(p[0] ? d : (
|
|
2821
|
+
// IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
|
|
2822
|
+
D == 3 ? -0 : 0
|
|
2823
|
+
));
|
|
2824
|
+
}
|
|
2825
|
+
if (c = U(c), h = U(h), p = p.slice(), l = c - h) {
|
|
2826
|
+
for ((a = l < 0) ? (l = -l, n = p) : (h = c, n = b), n.reverse(), e = l; e--; n.push(0)) ;
|
|
2827
|
+
n.reverse();
|
|
2828
|
+
} else
|
|
2829
|
+
for (u = (a = (l = p.length) < (e = b.length)) ? l : e, l = e = 0; e < u; e++)
|
|
2830
|
+
if (p[e] != b[e]) {
|
|
2831
|
+
a = p[e] < b[e];
|
|
2832
|
+
break;
|
|
2833
|
+
}
|
|
2834
|
+
if (a && (n = p, p = b, b = n, t.s = -t.s), e = (u = b.length) - (r = p.length), e > 0) for (; e--; p[r++] = 0) ;
|
|
2835
|
+
for (e = M - 1; u > l; ) {
|
|
2836
|
+
if (p[--u] < b[u]) {
|
|
2837
|
+
for (r = u; r && !p[--r]; p[r] = e) ;
|
|
2838
|
+
--p[r], p[u] += M;
|
|
2839
|
+
}
|
|
2840
|
+
p[u] -= b[u];
|
|
2841
|
+
}
|
|
2842
|
+
for (; p[0] == 0; p.splice(0, 1), --h) ;
|
|
2843
|
+
return p[0] ? Me(t, p, h) : (t.s = D == 3 ? -1 : 1, t.c = [t.e = 0], t);
|
|
2844
|
+
}, $.modulo = $.mod = function(t, e) {
|
|
2845
|
+
var r, u, n = this;
|
|
2846
|
+
return t = new N(t, e), !n.c || !t.s || t.c && !t.c[0] ? new N(NaN) : !t.c || n.c && !n.c[0] ? new N(n) : (ke == 9 ? (u = t.s, t.s = 1, r = A(n, t, 0, 3), t.s = u, r.s *= u) : r = A(n, t, 0, ke), t = n.minus(r.times(t)), !t.c[0] && ke == 1 && (t.s = n.s), t);
|
|
2847
|
+
}, $.multipliedBy = $.times = function(t, e) {
|
|
2848
|
+
var r, u, n, a, d, l, c, h, p, b, z, F, oe, pe, ve, se = this, ae = se.c, ye = (t = new N(t, e)).c;
|
|
2849
|
+
if (!ae || !ye || !ae[0] || !ye[0])
|
|
2850
|
+
return !se.s || !t.s || ae && !ae[0] && !ye || ye && !ye[0] && !ae ? t.c = t.e = t.s = null : (t.s *= se.s, !ae || !ye ? t.c = t.e = null : (t.c = [0], t.e = 0)), t;
|
|
2851
|
+
for (u = U(se.e / _) + U(t.e / _), t.s *= se.s, c = ae.length, b = ye.length, c < b && (oe = ae, ae = ye, ye = oe, n = c, c = b, b = n), n = c + b, oe = []; n--; oe.push(0)) ;
|
|
2852
|
+
for (pe = M, ve = C, n = b; --n >= 0; ) {
|
|
2853
|
+
for (r = 0, z = ye[n] % ve, F = ye[n] / ve | 0, d = c, a = n + d; a > n; )
|
|
2854
|
+
h = ae[--d] % ve, p = ae[d] / ve | 0, l = F * h + p * z, h = z * h + l % ve * ve + oe[a] + r, r = (h / pe | 0) + (l / ve | 0) + F * p, oe[a--] = h % pe;
|
|
2855
|
+
oe[a] = r;
|
|
2856
|
+
}
|
|
2857
|
+
return r ? ++u : oe.splice(0, 1), Me(t, oe, u);
|
|
2858
|
+
}, $.negated = function() {
|
|
2859
|
+
var t = new N(this);
|
|
2860
|
+
return t.s = -t.s || null, t;
|
|
2861
|
+
}, $.plus = function(t, e) {
|
|
2862
|
+
var r, u = this, n = u.s;
|
|
2863
|
+
if (t = new N(t, e), e = t.s, !n || !e) return new N(NaN);
|
|
2864
|
+
if (n != e)
|
|
2865
|
+
return t.s = -e, u.minus(t);
|
|
2866
|
+
var a = u.e / _, d = t.e / _, l = u.c, c = t.c;
|
|
2867
|
+
if (!a || !d) {
|
|
2868
|
+
if (!l || !c) return new N(n / 0);
|
|
2869
|
+
if (!l[0] || !c[0]) return c[0] ? t : new N(l[0] ? u : n * 0);
|
|
2870
|
+
}
|
|
2871
|
+
if (a = U(a), d = U(d), l = l.slice(), n = a - d) {
|
|
2872
|
+
for (n > 0 ? (d = a, r = c) : (n = -n, r = l), r.reverse(); n--; r.push(0)) ;
|
|
2873
|
+
r.reverse();
|
|
2874
|
+
}
|
|
2875
|
+
for (n = l.length, e = c.length, n - e < 0 && (r = c, c = l, l = r, e = n), n = 0; e; )
|
|
2876
|
+
n = (l[--e] = l[e] + c[e] + n) / M | 0, l[e] = M === l[e] ? 0 : l[e] % M;
|
|
2877
|
+
return n && (l = [n].concat(l), ++d), Me(t, l, d);
|
|
2878
|
+
}, $.precision = $.sd = function(t, e) {
|
|
2879
|
+
var r, u, n, a = this;
|
|
2880
|
+
if (t != null && t !== !!t)
|
|
2881
|
+
return I(t, 1, K), e == null ? e = D : I(e, 0, 8), H(new N(a), t, e);
|
|
2882
|
+
if (!(r = a.c)) return null;
|
|
2883
|
+
if (n = r.length - 1, u = n * _ + 1, n = r[n]) {
|
|
2884
|
+
for (; n % 10 == 0; n /= 10, u--) ;
|
|
2885
|
+
for (n = r[0]; n >= 10; n /= 10, u++) ;
|
|
2886
|
+
}
|
|
2887
|
+
return t && a.e + 1 > u && (u = a.e + 1), u;
|
|
2888
|
+
}, $.shiftedBy = function(t) {
|
|
2889
|
+
return I(t, -x, x), this.times("1e" + t);
|
|
2890
|
+
}, $.squareRoot = $.sqrt = function() {
|
|
2891
|
+
var t, e, r, u, n, a = this, d = a.c, l = a.s, c = a.e, h = te + 4, p = new N("0.5");
|
|
2892
|
+
if (l !== 1 || !d || !d[0])
|
|
2893
|
+
return new N(!l || l < 0 && (!d || d[0]) ? NaN : d ? a : 1 / 0);
|
|
2894
|
+
if (l = Math.sqrt(+B(a)), l == 0 || l == 1 / 0 ? (e = T(d), (e.length + c) % 2 == 0 && (e += "0"), l = Math.sqrt(+e), c = U((c + 1) / 2) - (c < 0 || c % 2), l == 1 / 0 ? e = "5e" + c : (e = l.toExponential(), e = e.slice(0, e.indexOf("e") + 1) + c), r = new N(e)) : r = new N(l + ""), r.c[0]) {
|
|
2895
|
+
for (c = r.e, l = c + h, l < 3 && (l = 0); ; )
|
|
2896
|
+
if (n = r, r = p.times(n.plus(A(a, n, h, 1))), T(n.c).slice(0, l) === (e = T(r.c)).slice(0, l))
|
|
2897
|
+
if (r.e < c && --l, e = e.slice(l - 3, l + 1), e == "9999" || !u && e == "4999") {
|
|
2898
|
+
if (!u && (H(n, n.e + te + 2, 0), n.times(n).eq(a))) {
|
|
2899
|
+
r = n;
|
|
2900
|
+
break;
|
|
2901
|
+
}
|
|
2902
|
+
h += 4, l += 4, u = 1;
|
|
2903
|
+
} else {
|
|
2904
|
+
(!+e || !+e.slice(1) && e.charAt(0) == "5") && (H(r, r.e + te + 2, 1), t = !r.times(r).eq(a));
|
|
2905
|
+
break;
|
|
2906
|
+
}
|
|
2907
|
+
}
|
|
2908
|
+
return H(r, r.e + te + 1, D, t);
|
|
2909
|
+
}, $.toExponential = function(t, e) {
|
|
2910
|
+
return t != null && (I(t, 0, K), t++), Ue(this, t, e, 1);
|
|
2911
|
+
}, $.toFixed = function(t, e) {
|
|
2912
|
+
return t != null && (I(t, 0, K), t = t + this.e + 1), Ue(this, t, e);
|
|
2913
|
+
}, $.toFormat = function(t, e, r) {
|
|
2914
|
+
var u, n = this;
|
|
2915
|
+
if (r == null)
|
|
2916
|
+
t != null && e && typeof e == "object" ? (r = e, e = null) : t && typeof t == "object" ? (r = t, t = e = null) : r = Te;
|
|
2917
|
+
else if (typeof r != "object")
|
|
2918
|
+
throw Error(S + "Argument not an object: " + r);
|
|
2919
|
+
if (u = n.toFixed(t, e), n.c) {
|
|
2920
|
+
var a, d = u.split("."), l = +r.groupSize, c = +r.secondaryGroupSize, h = r.groupSeparator || "", p = d[0], b = d[1], z = n.s < 0, F = z ? p.slice(1) : p, oe = F.length;
|
|
2921
|
+
if (c && (a = l, l = c, c = a, oe -= a), l > 0 && oe > 0) {
|
|
2922
|
+
for (a = oe % l || l, p = F.substr(0, a); a < oe; a += l) p += h + F.substr(a, l);
|
|
2923
|
+
c > 0 && (p += h + F.slice(a)), z && (p = "-" + p);
|
|
2924
|
+
}
|
|
2925
|
+
u = b ? p + (r.decimalSeparator || "") + ((c = +r.fractionGroupSize) ? b.replace(
|
|
2926
|
+
new RegExp("\\d{" + c + "}\\B", "g"),
|
|
2927
|
+
"$&" + (r.fractionGroupSeparator || "")
|
|
2928
|
+
) : b) : p;
|
|
2929
|
+
}
|
|
2930
|
+
return (r.prefix || "") + u + (r.suffix || "");
|
|
2931
|
+
}, $.toFraction = function(t) {
|
|
2932
|
+
var e, r, u, n, a, d, l, c, h, p, b, z, F = this, oe = F.c;
|
|
2933
|
+
if (t != null && (l = new N(t), !l.isInteger() && (l.c || l.s !== 1) || l.lt(re)))
|
|
2934
|
+
throw Error(S + "Argument " + (l.isInteger() ? "out of range: " : "not an integer: ") + B(l));
|
|
2935
|
+
if (!oe) return new N(F);
|
|
2936
|
+
for (e = new N(re), h = r = new N(re), u = c = new N(re), z = T(oe), a = e.e = z.length - F.e - 1, e.c[0] = L[(d = a % _) < 0 ? _ + d : d], t = !t || l.comparedTo(e) > 0 ? a > 0 ? e : h : l, d = fe, fe = 1 / 0, l = new N(z), c.c[0] = 0; p = A(l, e, 0, 1), n = r.plus(p.times(u)), n.comparedTo(t) != 1; )
|
|
2937
|
+
r = u, u = n, h = c.plus(p.times(n = h)), c = n, e = l.minus(p.times(n = e)), l = n;
|
|
2938
|
+
return n = A(t.minus(r), u, 0, 1), c = c.plus(n.times(h)), r = r.plus(n.times(u)), c.s = h.s = F.s, a = a * 2, b = A(h, u, a, D).minus(F).abs().comparedTo(
|
|
2939
|
+
A(c, r, a, D).minus(F).abs()
|
|
2940
|
+
) < 1 ? [h, u] : [c, r], fe = d, b;
|
|
2941
|
+
}, $.toNumber = function() {
|
|
2942
|
+
return +B(this);
|
|
2943
|
+
}, $.toPrecision = function(t, e) {
|
|
2944
|
+
return t != null && I(t, 1, K), Ue(this, t, e, 2);
|
|
2945
|
+
}, $.toString = function(t) {
|
|
2946
|
+
var e, r = this, u = r.s, n = r.e;
|
|
2947
|
+
return n === null ? u ? (e = "Infinity", u < 0 && (e = "-" + e)) : e = "NaN" : (t == null ? e = n <= ie || n >= de ? Y(T(r.c), n) : ne(T(r.c), n, "0") : t === 10 && Oe ? (r = H(new N(r), te + n + 1, D), e = ne(T(r.c), r.e, "0")) : (I(t, 2, Ne.length, "Base"), e = J(ne(T(r.c), n, "0"), 10, t, u, !0)), u < 0 && r.c[0] && (e = "-" + e)), e;
|
|
2948
|
+
}, $.valueOf = $.toJSON = function() {
|
|
2949
|
+
return B(this);
|
|
2950
|
+
}, $._isBigNumber = !0, O != null && N.set(O), N;
|
|
2951
|
+
}
|
|
2952
|
+
function U(O) {
|
|
2953
|
+
var A = O | 0;
|
|
2954
|
+
return O > 0 || O === A ? A : A - 1;
|
|
2955
|
+
}
|
|
2956
|
+
function T(O) {
|
|
2957
|
+
for (var A, J, ee = 1, $ = O.length, re = O[0] + ""; ee < $; ) {
|
|
2958
|
+
for (A = O[ee++] + "", J = _ - A.length; J--; A = "0" + A) ;
|
|
2959
|
+
re += A;
|
|
2960
|
+
}
|
|
2961
|
+
for ($ = re.length; re.charCodeAt(--$) === 48; ) ;
|
|
2962
|
+
return re.slice(0, $ + 1 || 1);
|
|
2963
|
+
}
|
|
2964
|
+
function V(O, A) {
|
|
2965
|
+
var J, ee, $ = O.c, re = A.c, te = O.s, D = A.s, ie = O.e, de = A.e;
|
|
2966
|
+
if (!te || !D) return null;
|
|
2967
|
+
if (J = $ && !$[0], ee = re && !re[0], J || ee) return J ? ee ? 0 : -D : te;
|
|
2968
|
+
if (te != D) return te;
|
|
2969
|
+
if (J = te < 0, ee = ie == de, !$ || !re) return ee ? 0 : !$ ^ J ? 1 : -1;
|
|
2970
|
+
if (!ee) return ie > de ^ J ? 1 : -1;
|
|
2971
|
+
for (D = (ie = $.length) < (de = re.length) ? ie : de, te = 0; te < D; te++) if ($[te] != re[te]) return $[te] > re[te] ^ J ? 1 : -1;
|
|
2972
|
+
return ie == de ? 0 : ie > de ^ J ? 1 : -1;
|
|
2973
|
+
}
|
|
2974
|
+
function I(O, A, J, ee) {
|
|
2975
|
+
if (O < A || O > J || O !== k(O))
|
|
2976
|
+
throw Error(S + (ee || "Argument") + (typeof O == "number" ? O < A || O > J ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(O));
|
|
2977
|
+
}
|
|
2978
|
+
function W(O) {
|
|
2979
|
+
var A = O.c.length - 1;
|
|
2980
|
+
return U(O.e / _) == A && O.c[A] % 2 != 0;
|
|
2981
|
+
}
|
|
2982
|
+
function Y(O, A) {
|
|
2983
|
+
return (O.length > 1 ? O.charAt(0) + "." + O.slice(1) : O) + (A < 0 ? "e" : "e+") + A;
|
|
2984
|
+
}
|
|
2985
|
+
function ne(O, A, J) {
|
|
2986
|
+
var ee, $;
|
|
2987
|
+
if (A < 0) {
|
|
2988
|
+
for ($ = J + "."; ++A; $ += J) ;
|
|
2989
|
+
O = $ + O;
|
|
2990
|
+
} else if (ee = O.length, ++A > ee) {
|
|
2991
|
+
for ($ = J, A -= ee; --A; $ += J) ;
|
|
2992
|
+
O += $;
|
|
2993
|
+
} else A < ee && (O = O.slice(0, A) + "." + O.slice(A));
|
|
2994
|
+
return O;
|
|
2995
|
+
}
|
|
2996
|
+
v = Q(), v.default = v.BigNumber = v, o.exports ? o.exports = v : (i || (i = typeof self < "u" && self ? self : window), i.BigNumber = v);
|
|
2997
|
+
})(Kr);
|
|
2998
|
+
})(Kt);
|
|
2999
|
+
var Ht = Kt.exports;
|
|
3000
|
+
(function(o) {
|
|
3001
|
+
var i = Ht, v = o.exports;
|
|
3002
|
+
(function() {
|
|
3003
|
+
var m = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, f, k, S = {
|
|
3004
|
+
// table of character substitutions
|
|
3005
|
+
"\b": "\\b",
|
|
3006
|
+
" ": "\\t",
|
|
3007
|
+
"\n": "\\n",
|
|
3008
|
+
"\f": "\\f",
|
|
3009
|
+
"\r": "\\r",
|
|
3010
|
+
'"': '\\"',
|
|
3011
|
+
"\\": "\\\\"
|
|
3012
|
+
}, g;
|
|
3013
|
+
function M(x) {
|
|
3014
|
+
return m.lastIndex = 0, m.test(x) ? '"' + x.replace(m, function(L) {
|
|
3015
|
+
var C = S[L];
|
|
3016
|
+
return typeof C == "string" ? C : "\\u" + ("0000" + L.charCodeAt(0).toString(16)).slice(-4);
|
|
3017
|
+
}) + '"' : '"' + x + '"';
|
|
3018
|
+
}
|
|
3019
|
+
function _(x, L) {
|
|
3020
|
+
var C, K, Q, U, T = f, V, I = L[x], W = I != null && (I instanceof i || i.isBigNumber(I));
|
|
3021
|
+
switch (I && typeof I == "object" && typeof I.toJSON == "function" && (I = I.toJSON(x)), typeof g == "function" && (I = g.call(L, x, I)), typeof I) {
|
|
3022
|
+
case "string":
|
|
3023
|
+
return W ? I : M(I);
|
|
3024
|
+
case "number":
|
|
3025
|
+
return isFinite(I) ? String(I) : "null";
|
|
3026
|
+
case "boolean":
|
|
3027
|
+
case "null":
|
|
3028
|
+
case "bigint":
|
|
3029
|
+
return String(I);
|
|
3030
|
+
case "object":
|
|
3031
|
+
if (!I)
|
|
3032
|
+
return "null";
|
|
3033
|
+
if (f += k, V = [], Object.prototype.toString.apply(I) === "[object Array]") {
|
|
3034
|
+
for (U = I.length, C = 0; C < U; C += 1)
|
|
3035
|
+
V[C] = _(C, I) || "null";
|
|
3036
|
+
return Q = V.length === 0 ? "[]" : f ? `[
|
|
3037
|
+
` + f + V.join(`,
|
|
3038
|
+
` + f) + `
|
|
3039
|
+
` + T + "]" : "[" + V.join(",") + "]", f = T, Q;
|
|
3040
|
+
}
|
|
3041
|
+
if (g && typeof g == "object")
|
|
3042
|
+
for (U = g.length, C = 0; C < U; C += 1)
|
|
3043
|
+
typeof g[C] == "string" && (K = g[C], Q = _(K, I), Q && V.push(M(K) + (f ? ": " : ":") + Q));
|
|
3044
|
+
else
|
|
3045
|
+
Object.keys(I).forEach(function(Y) {
|
|
3046
|
+
var ne = _(Y, I);
|
|
3047
|
+
ne && V.push(M(Y) + (f ? ": " : ":") + ne);
|
|
3048
|
+
});
|
|
3049
|
+
return Q = V.length === 0 ? "{}" : f ? `{
|
|
3050
|
+
` + f + V.join(`,
|
|
3051
|
+
` + f) + `
|
|
3052
|
+
` + T + "}" : "{" + V.join(",") + "}", f = T, Q;
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
typeof v.stringify != "function" && (v.stringify = function(x, L, C) {
|
|
3056
|
+
var K;
|
|
3057
|
+
if (f = "", k = "", typeof C == "number")
|
|
3058
|
+
for (K = 0; K < C; K += 1)
|
|
3059
|
+
k += " ";
|
|
3060
|
+
else typeof C == "string" && (k = C);
|
|
3061
|
+
if (g = L, L && typeof L != "function" && (typeof L != "object" || typeof L.length != "number"))
|
|
3062
|
+
throw new Error("JSON.stringify");
|
|
3063
|
+
return _("", { "": x });
|
|
3064
|
+
});
|
|
3065
|
+
})();
|
|
3066
|
+
})(Gt);
|
|
3067
|
+
var Wr = Gt.exports, st = null;
|
|
3068
|
+
const Xr = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/, Yr = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
|
|
3069
|
+
var Jr = function(o) {
|
|
3070
|
+
var i = {
|
|
3071
|
+
strict: !1,
|
|
3072
|
+
// not being strict means do not generate syntax errors for "duplicate key"
|
|
3073
|
+
storeAsString: !1,
|
|
3074
|
+
// toggles whether the values should be stored as BigNumber (default) or a string
|
|
3075
|
+
alwaysParseAsBig: !1,
|
|
3076
|
+
// toggles whether all numbers should be Big
|
|
3077
|
+
useNativeBigInt: !1,
|
|
3078
|
+
// toggles whether to use native BigInt instead of bignumber.js
|
|
3079
|
+
protoAction: "error",
|
|
3080
|
+
constructorAction: "error"
|
|
3081
|
+
};
|
|
3082
|
+
if (o != null) {
|
|
3083
|
+
if (o.strict === !0 && (i.strict = !0), o.storeAsString === !0 && (i.storeAsString = !0), i.alwaysParseAsBig = o.alwaysParseAsBig === !0 ? o.alwaysParseAsBig : !1, i.useNativeBigInt = o.useNativeBigInt === !0 ? o.useNativeBigInt : !1, typeof o.constructorAction < "u")
|
|
3084
|
+
if (o.constructorAction === "error" || o.constructorAction === "ignore" || o.constructorAction === "preserve")
|
|
3085
|
+
i.constructorAction = o.constructorAction;
|
|
3086
|
+
else
|
|
3087
|
+
throw new Error(
|
|
3088
|
+
`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${o.constructorAction}`
|
|
3089
|
+
);
|
|
3090
|
+
if (typeof o.protoAction < "u")
|
|
3091
|
+
if (o.protoAction === "error" || o.protoAction === "ignore" || o.protoAction === "preserve")
|
|
3092
|
+
i.protoAction = o.protoAction;
|
|
3093
|
+
else
|
|
3094
|
+
throw new Error(
|
|
3095
|
+
`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${o.protoAction}`
|
|
3096
|
+
);
|
|
3097
|
+
}
|
|
3098
|
+
var v, m, f = {
|
|
3099
|
+
'"': '"',
|
|
3100
|
+
"\\": "\\",
|
|
3101
|
+
"/": "/",
|
|
3102
|
+
b: "\b",
|
|
3103
|
+
f: "\f",
|
|
3104
|
+
n: `
|
|
3105
|
+
`,
|
|
3106
|
+
r: "\r",
|
|
3107
|
+
t: " "
|
|
3108
|
+
}, k, S = function(U) {
|
|
3109
|
+
throw {
|
|
3110
|
+
name: "SyntaxError",
|
|
3111
|
+
message: U,
|
|
3112
|
+
at: v,
|
|
3113
|
+
text: k
|
|
3114
|
+
};
|
|
3115
|
+
}, g = function(U) {
|
|
3116
|
+
return U && U !== m && S("Expected '" + U + "' instead of '" + m + "'"), m = k.charAt(v), v += 1, m;
|
|
3117
|
+
}, M = function() {
|
|
3118
|
+
var U, T = "";
|
|
3119
|
+
for (m === "-" && (T = "-", g("-")); m >= "0" && m <= "9"; )
|
|
3120
|
+
T += m, g();
|
|
3121
|
+
if (m === ".")
|
|
3122
|
+
for (T += "."; g() && m >= "0" && m <= "9"; )
|
|
3123
|
+
T += m;
|
|
3124
|
+
if (m === "e" || m === "E")
|
|
3125
|
+
for (T += m, g(), (m === "-" || m === "+") && (T += m, g()); m >= "0" && m <= "9"; )
|
|
3126
|
+
T += m, g();
|
|
3127
|
+
if (U = +T, !isFinite(U))
|
|
3128
|
+
S("Bad number");
|
|
3129
|
+
else
|
|
3130
|
+
return st == null && (st = Ht), T.length > 15 ? i.storeAsString ? T : i.useNativeBigInt ? BigInt(T) : new st(T) : i.alwaysParseAsBig ? i.useNativeBigInt ? BigInt(U) : new st(U) : U;
|
|
3131
|
+
}, _ = function() {
|
|
3132
|
+
var U, T, V = "", I;
|
|
3133
|
+
if (m === '"')
|
|
3134
|
+
for (var W = v; g(); ) {
|
|
3135
|
+
if (m === '"')
|
|
3136
|
+
return v - 1 > W && (V += k.substring(W, v - 1)), g(), V;
|
|
3137
|
+
if (m === "\\") {
|
|
3138
|
+
if (v - 1 > W && (V += k.substring(W, v - 1)), g(), m === "u") {
|
|
3139
|
+
for (I = 0, T = 0; T < 4 && (U = parseInt(g(), 16), !!isFinite(U)); T += 1)
|
|
3140
|
+
I = I * 16 + U;
|
|
3141
|
+
V += String.fromCharCode(I);
|
|
3142
|
+
} else if (typeof f[m] == "string")
|
|
3143
|
+
V += f[m];
|
|
3144
|
+
else
|
|
3145
|
+
break;
|
|
3146
|
+
W = v;
|
|
3147
|
+
}
|
|
3148
|
+
}
|
|
3149
|
+
S("Bad string");
|
|
3150
|
+
}, x = function() {
|
|
3151
|
+
for (; m && m <= " "; )
|
|
3152
|
+
g();
|
|
3153
|
+
}, L = function() {
|
|
3154
|
+
switch (m) {
|
|
3155
|
+
case "t":
|
|
3156
|
+
return g("t"), g("r"), g("u"), g("e"), !0;
|
|
3157
|
+
case "f":
|
|
3158
|
+
return g("f"), g("a"), g("l"), g("s"), g("e"), !1;
|
|
3159
|
+
case "n":
|
|
3160
|
+
return g("n"), g("u"), g("l"), g("l"), null;
|
|
3161
|
+
}
|
|
3162
|
+
S("Unexpected '" + m + "'");
|
|
3163
|
+
}, C, K = function() {
|
|
3164
|
+
var U = [];
|
|
3165
|
+
if (m === "[") {
|
|
3166
|
+
if (g("["), x(), m === "]")
|
|
3167
|
+
return g("]"), U;
|
|
3168
|
+
for (; m; ) {
|
|
3169
|
+
if (U.push(C()), x(), m === "]")
|
|
3170
|
+
return g("]"), U;
|
|
3171
|
+
g(","), x();
|
|
3172
|
+
}
|
|
3173
|
+
}
|
|
3174
|
+
S("Bad array");
|
|
3175
|
+
}, Q = function() {
|
|
3176
|
+
var U, T = /* @__PURE__ */ Object.create(null);
|
|
3177
|
+
if (m === "{") {
|
|
3178
|
+
if (g("{"), x(), m === "}")
|
|
3179
|
+
return g("}"), T;
|
|
3180
|
+
for (; m; ) {
|
|
3181
|
+
if (U = _(), x(), g(":"), i.strict === !0 && Object.hasOwnProperty.call(T, U) && S('Duplicate key "' + U + '"'), Xr.test(U) === !0 ? i.protoAction === "error" ? S("Object contains forbidden prototype property") : i.protoAction === "ignore" ? C() : T[U] = C() : Yr.test(U) === !0 ? i.constructorAction === "error" ? S("Object contains forbidden constructor property") : i.constructorAction === "ignore" ? C() : T[U] = C() : T[U] = C(), x(), m === "}")
|
|
3182
|
+
return g("}"), T;
|
|
3183
|
+
g(","), x();
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
S("Bad object");
|
|
3187
|
+
};
|
|
3188
|
+
return C = function() {
|
|
3189
|
+
switch (x(), m) {
|
|
3190
|
+
case "{":
|
|
3191
|
+
return Q();
|
|
3192
|
+
case "[":
|
|
3193
|
+
return K();
|
|
3194
|
+
case '"':
|
|
3195
|
+
return _();
|
|
3196
|
+
case "-":
|
|
3197
|
+
return M();
|
|
3198
|
+
default:
|
|
3199
|
+
return m >= "0" && m <= "9" ? M() : L();
|
|
3200
|
+
}
|
|
3201
|
+
}, function(U, T) {
|
|
3202
|
+
var V;
|
|
3203
|
+
return k = U + "", v = 0, m = " ", V = C(), x(), m && S("Syntax error"), typeof T == "function" ? function I(W, Y) {
|
|
3204
|
+
var ne, O = W[Y];
|
|
3205
|
+
return O && typeof O == "object" && Object.keys(O).forEach(function(A) {
|
|
3206
|
+
ne = I(O, A), ne !== void 0 ? O[A] = ne : delete O[A];
|
|
3207
|
+
}), T.call(W, Y, O);
|
|
3208
|
+
}({ "": V }, "") : V;
|
|
3209
|
+
};
|
|
3210
|
+
}, Zr = Jr, Wt = Wr.stringify, Xt = Zr;
|
|
3211
|
+
dt.exports = function(o) {
|
|
3212
|
+
return {
|
|
3213
|
+
parse: Xt(o),
|
|
3214
|
+
stringify: Wt
|
|
3215
|
+
};
|
|
3216
|
+
};
|
|
3217
|
+
dt.exports.parse = Xt();
|
|
3218
|
+
dt.exports.stringify = Wt;
|
|
3219
|
+
var Qr = dt.exports;
|
|
3220
|
+
const ea = /* @__PURE__ */ Hr(Qr), ta = ea({ storeAsString: !0 });
|
|
3221
|
+
let Yt;
|
|
3222
|
+
function Ja(o) {
|
|
3223
|
+
Yt = o, Re && (Re.defaults.baseURL = o);
|
|
3224
|
+
}
|
|
3225
|
+
const sa = () => {
|
|
3226
|
+
const o = ls.create({
|
|
3227
|
+
timeout: 3e4,
|
|
3228
|
+
headers: {
|
|
3229
|
+
"Content-Type": "application/json"
|
|
3230
|
+
},
|
|
3231
|
+
// 使用 json-bigint 解析响应数据,避免大整数精度丢失
|
|
3232
|
+
transformResponse: [
|
|
3233
|
+
(i) => {
|
|
3234
|
+
if (typeof i == "string")
|
|
3235
|
+
try {
|
|
3236
|
+
return ta.parse(i);
|
|
3237
|
+
} catch {
|
|
3238
|
+
return i;
|
|
3239
|
+
}
|
|
3240
|
+
return i;
|
|
3241
|
+
}
|
|
3242
|
+
]
|
|
3243
|
+
});
|
|
3244
|
+
return o.interceptors.request.use(
|
|
3245
|
+
(i) => {
|
|
3246
|
+
const v = Yt || void 0;
|
|
3247
|
+
v && !i.baseURL && (i.baseURL = v);
|
|
3248
|
+
const m = ut(), f = vs() || "Bearer";
|
|
3249
|
+
return m && (i.headers.Authorization = `${f} ${m}`), i;
|
|
3250
|
+
},
|
|
3251
|
+
(i) => Promise.reject(i)
|
|
3252
|
+
), o.interceptors.response.use(
|
|
3253
|
+
(i) => {
|
|
3254
|
+
const { data: v } = i;
|
|
3255
|
+
return v.code === 200 || v.code === 0 ? v.data : v.code === 9121 ? (Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login", Promise.reject(new Error(v.message || "EXPIRED OR INVALID TOKEN"))) : (Ie.error(v.message || "请求失败"), Promise.reject(new Error(v.message || "请求失败")));
|
|
3256
|
+
},
|
|
3257
|
+
(i) => {
|
|
3258
|
+
var m;
|
|
3259
|
+
const { response: v } = i;
|
|
3260
|
+
if (v) {
|
|
3261
|
+
const { data: f } = v;
|
|
3262
|
+
if ((f == null ? void 0 : f.code) === 9121)
|
|
3263
|
+
return Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login", Promise.reject(i);
|
|
3264
|
+
switch (v.status) {
|
|
3265
|
+
case 401:
|
|
3266
|
+
Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login";
|
|
3267
|
+
break;
|
|
3268
|
+
case 403:
|
|
3269
|
+
Ie.error("没有权限访问");
|
|
3270
|
+
break;
|
|
3271
|
+
case 404:
|
|
3272
|
+
Ie.error("请求资源不存在");
|
|
3273
|
+
break;
|
|
3274
|
+
case 500:
|
|
3275
|
+
Ie.error("服务器错误");
|
|
3276
|
+
break;
|
|
3277
|
+
default:
|
|
3278
|
+
Ie.error(((m = v.data) == null ? void 0 : m.message) || "请求失败");
|
|
3279
|
+
}
|
|
3280
|
+
} else
|
|
3281
|
+
Ie.error("网络连接失败");
|
|
3282
|
+
return Promise.reject(i);
|
|
3283
|
+
}
|
|
3284
|
+
), o;
|
|
3285
|
+
}, Re = sa(), ue = {
|
|
3286
|
+
get(o, i) {
|
|
3287
|
+
return Re.get(o, i);
|
|
3288
|
+
},
|
|
3289
|
+
post(o, i, v) {
|
|
3290
|
+
return Re.post(o, i, v);
|
|
3291
|
+
},
|
|
3292
|
+
put(o, i, v) {
|
|
3293
|
+
return Re.put(o, i, v);
|
|
3294
|
+
},
|
|
3295
|
+
patch(o, i, v) {
|
|
3296
|
+
return Re.patch(o, i, v);
|
|
3297
|
+
},
|
|
3298
|
+
delete(o, i) {
|
|
3299
|
+
return Re.delete(o, i);
|
|
3300
|
+
},
|
|
3301
|
+
// 文件下载 - 返回 Blob 对象
|
|
3302
|
+
download(o, i) {
|
|
3303
|
+
return Re.get(o, { ...i, responseType: "blob" });
|
|
3304
|
+
}
|
|
3305
|
+
};
|
|
3306
|
+
function na(o) {
|
|
3307
|
+
return ue.post("/user/v1.0/login/by-domain", o);
|
|
3308
|
+
}
|
|
3309
|
+
function Za() {
|
|
3310
|
+
return ue.put("/user/v1.0/user/logout");
|
|
3311
|
+
}
|
|
3312
|
+
function oa() {
|
|
3313
|
+
return ue.get("/user/v1.0/user/get-me");
|
|
3314
|
+
}
|
|
3315
|
+
function Qa(o) {
|
|
3316
|
+
return ue.post("/user/v1.0/refresh", { refreshToken: o });
|
|
3317
|
+
}
|
|
3318
|
+
const ra = { class: "login-page" }, aa = { class: "login-form-section" }, la = { class: "form-container" }, ia = { class: "input-wrapper" }, ca = { class: "input-wrapper" }, ua = { class: "form-options" }, da = { key: 0 }, fa = { key: 1 }, pa = /* @__PURE__ */ Ae({
|
|
3319
|
+
__name: "index",
|
|
3320
|
+
setup(o) {
|
|
3321
|
+
const i = ze(), v = qe(), m = P(!1), f = P(!1), k = kt({
|
|
3322
|
+
uid: "",
|
|
3323
|
+
password: ""
|
|
3324
|
+
}), S = {
|
|
3325
|
+
uid: [
|
|
3326
|
+
{ required: !0, message: "请输入用户名", trigger: "blur" }
|
|
3327
|
+
],
|
|
3328
|
+
password: [
|
|
3329
|
+
{ required: !0, message: "请输入密码", trigger: "blur" },
|
|
3330
|
+
{ min: 6, message: "密码长度至少6位", trigger: "blur" }
|
|
3331
|
+
]
|
|
3332
|
+
}, g = P(), M = async () => {
|
|
3333
|
+
var _;
|
|
3334
|
+
try {
|
|
3335
|
+
await ((_ = g.value) == null ? void 0 : _.validate()), m.value = !0;
|
|
3336
|
+
const x = await na({
|
|
3337
|
+
appId: ct(),
|
|
3338
|
+
clientId: zt(),
|
|
3339
|
+
uid: k.uid,
|
|
3340
|
+
password: k.password,
|
|
3341
|
+
code: !0
|
|
3342
|
+
});
|
|
3343
|
+
Vt(x), Ie.success("登录成功");
|
|
3344
|
+
const L = v.query.redirect || "/";
|
|
3345
|
+
i.push(L);
|
|
3346
|
+
} catch (x) {
|
|
3347
|
+
console.error("登录失败:", x);
|
|
3348
|
+
} finally {
|
|
3349
|
+
m.value = !1;
|
|
3350
|
+
}
|
|
3351
|
+
};
|
|
3352
|
+
return (_, x) => (w(), E("div", ra, [
|
|
3353
|
+
x[10] || (x[10] = nt('<div class="login-brand" data-v-102cb5d3><div class="brand-content" data-v-102cb5d3><div class="brand-logo" data-v-102cb5d3><div class="logo-icon" data-v-102cb5d3><svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-102cb5d3><rect width="48" height="48" rx="12" fill="currentColor" data-v-102cb5d3></rect><path d="M14 24L20 30L34 16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" data-v-102cb5d3></path></svg></div><span class="logo-text" data-v-102cb5d3>XTO</span></div><div class="brand-slogan" data-v-102cb5d3><h1 data-v-102cb5d3>企业级后台管理解决方案</h1><p data-v-102cb5d3>开箱即用的中后台前端/设计解决方案</p></div><div class="brand-features" data-v-102cb5d3><div class="feature-item" data-v-102cb5d3><div class="feature-icon" data-v-102cb5d3><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-102cb5d3><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" data-v-102cb5d3></path></svg></div><div class="feature-text" data-v-102cb5d3><h4 data-v-102cb5d3>高性能</h4><p data-v-102cb5d3>极致的渲染性能与响应速度</p></div></div><div class="feature-item" data-v-102cb5d3><div class="feature-icon" data-v-102cb5d3><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-102cb5d3><rect x="3" y="3" width="18" height="18" rx="2" data-v-102cb5d3></rect><path d="M9 9h6M9 12h6M9 15h4" data-v-102cb5d3></path></svg></div><div class="feature-text" data-v-102cb5d3><h4 data-v-102cb5d3>丰富组件</h4><p data-v-102cb5d3>60+ 高质量业务组件</p></div></div><div class="feature-item" data-v-102cb5d3><div class="feature-icon" data-v-102cb5d3><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-102cb5d3><circle cx="12" cy="12" r="10" data-v-102cb5d3></circle><path d="M12 6v6l4 2" data-v-102cb5d3></path></svg></div><div class="feature-text" data-v-102cb5d3><h4 data-v-102cb5d3>持续更新</h4><p data-v-102cb5d3>活跃的社区与快速迭代</p></div></div></div><div class="brand-decoration" data-v-102cb5d3><div class="decoration-line" data-v-102cb5d3></div><div class="decoration-dots" data-v-102cb5d3><span data-v-102cb5d3></span><span data-v-102cb5d3></span><span data-v-102cb5d3></span></div></div></div><div class="brand-bg" data-v-102cb5d3><div class="bg-grid" data-v-102cb5d3></div><div class="bg-glow" data-v-102cb5d3></div><div class="bg-pattern" data-v-102cb5d3></div></div></div>', 1)),
|
|
3354
|
+
s("div", aa, [
|
|
3355
|
+
s("div", la, [
|
|
3356
|
+
x[7] || (x[7] = s("div", { class: "form-header" }, [
|
|
3357
|
+
s("h2", null, "欢迎登录"),
|
|
3358
|
+
s("p", null, "请输入您的账户信息")
|
|
3359
|
+
], -1)),
|
|
3360
|
+
R(y(rs), {
|
|
3361
|
+
ref_key: "formRef",
|
|
3362
|
+
ref: g,
|
|
3363
|
+
model: k,
|
|
3364
|
+
rules: S,
|
|
3365
|
+
class: "login-form",
|
|
3366
|
+
"label-width": "0"
|
|
3367
|
+
}, {
|
|
3368
|
+
default: X(() => [
|
|
3369
|
+
R(y(mt), { prop: "uid" }, {
|
|
3370
|
+
default: X(() => [
|
|
3371
|
+
s("div", ia, [
|
|
3372
|
+
x[3] || (x[3] = s("label", { class: "input-label" }, "用户名", -1)),
|
|
3373
|
+
R(y(Ut), {
|
|
3374
|
+
modelValue: k.uid,
|
|
3375
|
+
"onUpdate:modelValue": x[0] || (x[0] = (L) => k.uid = L),
|
|
3376
|
+
placeholder: "请输入用户名",
|
|
3377
|
+
size: "large"
|
|
3378
|
+
}, {
|
|
3379
|
+
prefix: X(() => [
|
|
3380
|
+
R(y(Z), {
|
|
3381
|
+
name: "user",
|
|
3382
|
+
size: 18
|
|
3383
|
+
})
|
|
3384
|
+
]),
|
|
3385
|
+
_: 1
|
|
3386
|
+
}, 8, ["modelValue"])
|
|
3387
|
+
])
|
|
3388
|
+
]),
|
|
3389
|
+
_: 1
|
|
3390
|
+
}),
|
|
3391
|
+
R(y(mt), { prop: "password" }, {
|
|
3392
|
+
default: X(() => [
|
|
3393
|
+
s("div", ca, [
|
|
3394
|
+
x[4] || (x[4] = s("label", { class: "input-label" }, "密码", -1)),
|
|
3395
|
+
R(y(Ut), {
|
|
3396
|
+
modelValue: k.password,
|
|
3397
|
+
"onUpdate:modelValue": x[1] || (x[1] = (L) => k.password = L),
|
|
3398
|
+
type: "password",
|
|
3399
|
+
placeholder: "请输入密码",
|
|
3400
|
+
size: "large",
|
|
3401
|
+
"show-password": "",
|
|
3402
|
+
onKeyup: ss(M, ["enter"])
|
|
3403
|
+
}, {
|
|
3404
|
+
prefix: X(() => [
|
|
3405
|
+
R(y(Z), {
|
|
3406
|
+
name: "lock",
|
|
3407
|
+
size: 18
|
|
3408
|
+
})
|
|
3409
|
+
]),
|
|
3410
|
+
_: 1
|
|
3411
|
+
}, 8, ["modelValue"])
|
|
3412
|
+
])
|
|
3413
|
+
]),
|
|
3414
|
+
_: 1
|
|
3415
|
+
}),
|
|
3416
|
+
s("div", ua, [
|
|
3417
|
+
R(y(as), {
|
|
3418
|
+
modelValue: f.value,
|
|
3419
|
+
"onUpdate:modelValue": x[2] || (x[2] = (L) => f.value = L)
|
|
3420
|
+
}, {
|
|
3421
|
+
default: X(() => [...x[5] || (x[5] = [
|
|
3422
|
+
Fe("记住我", -1)
|
|
3423
|
+
])]),
|
|
3424
|
+
_: 1
|
|
3425
|
+
}, 8, ["modelValue"]),
|
|
3426
|
+
x[6] || (x[6] = s("a", {
|
|
3427
|
+
href: "#",
|
|
3428
|
+
class: "forgot-link"
|
|
3429
|
+
}, "忘记密码?", -1))
|
|
3430
|
+
]),
|
|
3431
|
+
R(y(mt), null, {
|
|
3432
|
+
default: X(() => [
|
|
3433
|
+
R(y(je), {
|
|
3434
|
+
type: "primary",
|
|
3435
|
+
size: "large",
|
|
3436
|
+
loading: m.value,
|
|
3437
|
+
class: "login-btn",
|
|
3438
|
+
onClick: M
|
|
3439
|
+
}, {
|
|
3440
|
+
default: X(() => [
|
|
3441
|
+
m.value ? (w(), E("span", fa, "登录中...")) : (w(), E("span", da, "登 录"))
|
|
3442
|
+
]),
|
|
3443
|
+
_: 1
|
|
3444
|
+
}, 8, ["loading"])
|
|
3445
|
+
]),
|
|
3446
|
+
_: 1
|
|
3447
|
+
})
|
|
3448
|
+
]),
|
|
3449
|
+
_: 1
|
|
3450
|
+
}, 8, ["model"]),
|
|
3451
|
+
x[8] || (x[8] = nt('<div class="form-footer" data-v-102cb5d3><p data-v-102cb5d3>其他登录方式</p><div class="social-login" data-v-102cb5d3><button class="social-btn" title="企业微信" data-v-102cb5d3><svg viewBox="0 0 24 24" fill="currentColor" data-v-102cb5d3><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" data-v-102cb5d3></path></svg></button><button class="social-btn" title="钉钉" data-v-102cb5d3><svg viewBox="0 0 24 24" fill="currentColor" data-v-102cb5d3><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z" data-v-102cb5d3></path></svg></button><button class="social-btn" title="飞书" data-v-102cb5d3><svg viewBox="0 0 24 24" fill="currentColor" data-v-102cb5d3><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" data-v-102cb5d3></path></svg></button></div></div>', 1))
|
|
3452
|
+
]),
|
|
3453
|
+
x[9] || (x[9] = s("div", { class: "copyright" }, [
|
|
3454
|
+
s("p", null, "© 2024 XTO Team. All rights reserved.")
|
|
3455
|
+
], -1))
|
|
3456
|
+
])
|
|
3457
|
+
]));
|
|
3458
|
+
}
|
|
3459
|
+
}), ma = /* @__PURE__ */ $e(pa, [["__scopeId", "data-v-102cb5d3"]]), ha = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3460
|
+
__proto__: null,
|
|
3461
|
+
default: ma
|
|
3462
|
+
}, Symbol.toStringTag, { value: "Module" })), va = { class: "error-page" }, ga = { class: "error-container" }, _a = { class: "error-content" }, wa = { class: "error-actions" }, ya = /* @__PURE__ */ Ae({
|
|
3463
|
+
__name: "404",
|
|
3464
|
+
setup(o) {
|
|
3465
|
+
const i = ze(), v = () => {
|
|
3466
|
+
i.push("/");
|
|
3467
|
+
};
|
|
3468
|
+
return (m, f) => (w(), E("div", va, [
|
|
3469
|
+
s("div", ga, [
|
|
3470
|
+
f[7] || (f[7] = s("div", { class: "error-bg" }, [
|
|
3471
|
+
s("div", { class: "bg-circle circle-1" }),
|
|
3472
|
+
s("div", { class: "bg-circle circle-2" }),
|
|
3473
|
+
s("div", { class: "bg-circle circle-3" })
|
|
3474
|
+
], -1)),
|
|
3475
|
+
s("div", _a, [
|
|
3476
|
+
f[5] || (f[5] = nt('<div class="error-code" data-v-1b083153><span class="code-digit" data-v-1b083153>4</span><span class="code-zero" data-v-1b083153><span class="zero-inner" data-v-1b083153>0</span></span><span class="code-digit" data-v-1b083153>4</span></div><div class="error-illustration" data-v-1b083153><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-1b083153><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--color-fill)" stroke="var(--color-border)" stroke-width="2" data-v-1b083153></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--bg-color)" data-v-1b083153></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--color-border-light)" stroke-width="2" data-v-1b083153></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--color-border-light)" stroke-width="2" data-v-1b083153></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--color-border-light)" stroke-width="2" data-v-1b083153></line><text x="100" y="75" text-anchor="middle" fill="var(--color-primary)" font-size="24" font-weight="600" data-v-1b083153>?</text><circle cx="150" cy="35" r="12" stroke="var(--color-primary)" stroke-width="2" fill="none" data-v-1b083153></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--color-primary)" stroke-width="2" stroke-linecap="round" data-v-1b083153></line></svg></div><h1 class="error-title" data-v-1b083153>页面不存在</h1><p class="error-desc" data-v-1b083153>抱歉,您访问的页面不存在或已被删除</p>', 4)),
|
|
3477
|
+
s("div", wa, [
|
|
3478
|
+
R(y(je), {
|
|
3479
|
+
type: "primary",
|
|
3480
|
+
size: "large",
|
|
3481
|
+
onClick: v
|
|
3482
|
+
}, {
|
|
3483
|
+
icon: X(() => [...f[1] || (f[1] = [
|
|
3484
|
+
s("svg", {
|
|
3485
|
+
viewBox: "0 0 24 24",
|
|
3486
|
+
fill: "none",
|
|
3487
|
+
stroke: "currentColor",
|
|
3488
|
+
"stroke-width": "2"
|
|
3489
|
+
}, [
|
|
3490
|
+
s("path", { d: "M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
|
|
3491
|
+
s("polyline", { points: "9,22 9,12 15,12 15,22" })
|
|
3492
|
+
], -1)
|
|
3493
|
+
])]),
|
|
3494
|
+
default: X(() => [
|
|
3495
|
+
f[2] || (f[2] = Fe(" 返回首页 ", -1))
|
|
3496
|
+
]),
|
|
3497
|
+
_: 1
|
|
3498
|
+
}),
|
|
3499
|
+
R(y(je), {
|
|
3500
|
+
size: "large",
|
|
3501
|
+
onClick: f[0] || (f[0] = (k) => y(i).go(-1))
|
|
3502
|
+
}, {
|
|
3503
|
+
icon: X(() => [...f[3] || (f[3] = [
|
|
3504
|
+
s("svg", {
|
|
3505
|
+
viewBox: "0 0 24 24",
|
|
3506
|
+
fill: "none",
|
|
3507
|
+
stroke: "currentColor",
|
|
3508
|
+
"stroke-width": "2"
|
|
3509
|
+
}, [
|
|
3510
|
+
s("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
3511
|
+
], -1)
|
|
3512
|
+
])]),
|
|
3513
|
+
default: X(() => [
|
|
3514
|
+
f[4] || (f[4] = Fe(" 返回上一页 ", -1))
|
|
3515
|
+
]),
|
|
3516
|
+
_: 1
|
|
3517
|
+
})
|
|
3518
|
+
]),
|
|
3519
|
+
f[6] || (f[6] = s("div", { class: "error-tip" }, [
|
|
3520
|
+
s("p", null, "您可以尝试:"),
|
|
3521
|
+
s("ul", null, [
|
|
3522
|
+
s("li", null, "检查您输入的网址是否正确"),
|
|
3523
|
+
s("li", null, "返回首页重新浏览"),
|
|
3524
|
+
s("li", null, "联系管理员反馈问题")
|
|
3525
|
+
])
|
|
3526
|
+
], -1))
|
|
3527
|
+
])
|
|
3528
|
+
])
|
|
3529
|
+
]));
|
|
3530
|
+
}
|
|
3531
|
+
}), ba = /* @__PURE__ */ $e(ya, [["__scopeId", "data-v-1b083153"]]), Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3532
|
+
__proto__: null,
|
|
3533
|
+
default: ba
|
|
3534
|
+
}, Symbol.toStringTag, { value: "Module" })), ka = { class: "error-page" }, xa = { class: "error-container" }, Ca = { class: "error-content" }, Na = { class: "error-actions" }, Ea = /* @__PURE__ */ Ae({
|
|
3535
|
+
__name: "403",
|
|
3536
|
+
setup(o) {
|
|
3537
|
+
const i = ze(), v = () => {
|
|
3538
|
+
i.push("/");
|
|
3539
|
+
};
|
|
3540
|
+
return (m, f) => (w(), E("div", ka, [
|
|
3541
|
+
s("div", xa, [
|
|
3542
|
+
f[7] || (f[7] = s("div", { class: "error-bg" }, [
|
|
3543
|
+
s("div", { class: "bg-circle circle-1" }),
|
|
3544
|
+
s("div", { class: "bg-circle circle-2" }),
|
|
3545
|
+
s("div", { class: "bg-circle circle-3" })
|
|
3546
|
+
], -1)),
|
|
3547
|
+
s("div", Ca, [
|
|
3548
|
+
f[5] || (f[5] = nt('<div class="error-code" data-v-d167f981><span class="code-digit" data-v-d167f981>4</span><span class="code-zero warning" data-v-d167f981><span class="zero-inner" data-v-d167f981>0</span></span><span class="code-digit" data-v-d167f981>3</span></div><div class="error-illustration" data-v-d167f981><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d167f981><path d="M100 15 L150 35 L150 70 C150 95 100 110 100 110 C100 110 50 95 50 70 L50 35 Z" fill="var(--color-warning-lighter)" stroke="var(--color-warning)" stroke-width="2" data-v-d167f981></path><rect x="85" y="55" width="30" height="25" rx="4" fill="var(--color-warning)" data-v-d167f981></rect><path d="M92 55 V48 A8 8 0 0 1 108 48 V55" fill="none" stroke="var(--color-warning)" stroke-width="3" data-v-d167f981></path><circle cx="100" cy="67" r="6" fill="none" stroke="#fff" stroke-width="2" data-v-d167f981></circle><line x1="96" y1="63" x2="104" y2="71" stroke="#fff" stroke-width="2" data-v-d167f981></line></svg></div><h1 class="error-title" data-v-d167f981>无访问权限</h1><p class="error-desc" data-v-d167f981>抱歉,您没有权限访问此页面,请联系管理员获取权限</p>', 4)),
|
|
3549
|
+
s("div", Na, [
|
|
3550
|
+
R(y(je), {
|
|
3551
|
+
type: "primary",
|
|
3552
|
+
size: "large",
|
|
3553
|
+
onClick: v
|
|
3554
|
+
}, {
|
|
3555
|
+
icon: X(() => [...f[1] || (f[1] = [
|
|
3556
|
+
s("svg", {
|
|
3557
|
+
viewBox: "0 0 24 24",
|
|
3558
|
+
fill: "none",
|
|
3559
|
+
stroke: "currentColor",
|
|
3560
|
+
"stroke-width": "2"
|
|
3561
|
+
}, [
|
|
3562
|
+
s("path", { d: "M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
|
|
3563
|
+
s("polyline", { points: "9,22 9,12 15,12 15,22" })
|
|
3564
|
+
], -1)
|
|
3565
|
+
])]),
|
|
3566
|
+
default: X(() => [
|
|
3567
|
+
f[2] || (f[2] = Fe(" 返回首页 ", -1))
|
|
3568
|
+
]),
|
|
3569
|
+
_: 1
|
|
3570
|
+
}),
|
|
3571
|
+
R(y(je), {
|
|
3572
|
+
size: "large",
|
|
3573
|
+
onClick: f[0] || (f[0] = (k) => y(i).go(-1))
|
|
3574
|
+
}, {
|
|
3575
|
+
icon: X(() => [...f[3] || (f[3] = [
|
|
3576
|
+
s("svg", {
|
|
3577
|
+
viewBox: "0 0 24 24",
|
|
3578
|
+
fill: "none",
|
|
3579
|
+
stroke: "currentColor",
|
|
3580
|
+
"stroke-width": "2"
|
|
3581
|
+
}, [
|
|
3582
|
+
s("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
3583
|
+
], -1)
|
|
3584
|
+
])]),
|
|
3585
|
+
default: X(() => [
|
|
3586
|
+
f[4] || (f[4] = Fe(" 返回上一页 ", -1))
|
|
3587
|
+
]),
|
|
3588
|
+
_: 1
|
|
3589
|
+
})
|
|
3590
|
+
]),
|
|
3591
|
+
f[6] || (f[6] = s("div", { class: "error-tip" }, [
|
|
3592
|
+
s("p", null, "可能的原因:"),
|
|
3593
|
+
s("ul", null, [
|
|
3594
|
+
s("li", null, "您的账号权限不足"),
|
|
3595
|
+
s("li", null, "该页面需要特定角色才能访问"),
|
|
3596
|
+
s("li", null, "您的登录状态已过期")
|
|
3597
|
+
])
|
|
3598
|
+
], -1))
|
|
3599
|
+
])
|
|
3600
|
+
])
|
|
3601
|
+
]));
|
|
3602
|
+
}
|
|
3603
|
+
}), el = /* @__PURE__ */ $e(Ea, [["__scopeId", "data-v-d167f981"]]);
|
|
3604
|
+
function tl() {
|
|
3605
|
+
const o = De(), i = Se(), v = Ze(), m = j(() => i.userName || ""), f = j(() => i.userInfo), k = j(() => o.appName), S = j(() => v.isLoggedIn), g = j(() => o.isDark), M = j(() => o.theme), _ = j(() => o.isCollapsed), x = j(() => o.layout);
|
|
3606
|
+
return {
|
|
3607
|
+
userName: m,
|
|
3608
|
+
userInfo: f,
|
|
3609
|
+
appName: k,
|
|
3610
|
+
isLoggedIn: S,
|
|
3611
|
+
isDark: g,
|
|
3612
|
+
theme: M,
|
|
3613
|
+
isCollapsed: _,
|
|
3614
|
+
layout: x,
|
|
3615
|
+
toggleTheme: () => {
|
|
3616
|
+
o.toggleTheme();
|
|
3617
|
+
},
|
|
3618
|
+
toggleCollapse: () => {
|
|
3619
|
+
o.toggleCollapse();
|
|
3620
|
+
}
|
|
3621
|
+
};
|
|
3622
|
+
}
|
|
3623
|
+
function sl() {
|
|
3624
|
+
const o = Se();
|
|
3625
|
+
return {
|
|
3626
|
+
isLoggedIn: j(() => o.isLoggedIn)
|
|
3627
|
+
};
|
|
3628
|
+
}
|
|
3629
|
+
function nl(o, i = {}) {
|
|
3630
|
+
const { rules: v, onSubmit: m } = i, f = P(), k = kt({ ...o }), S = P(!1), g = P(!1), M = P(!1), _ = () => {
|
|
3631
|
+
C(), M.value = !1, g.value = !0;
|
|
3632
|
+
}, x = (Q) => {
|
|
3633
|
+
Object.assign(k, Q), M.value = !0, g.value = !0;
|
|
3634
|
+
}, L = () => {
|
|
3635
|
+
g.value = !1, C();
|
|
3636
|
+
}, C = () => {
|
|
3637
|
+
var Q;
|
|
3638
|
+
Object.keys(o).forEach((U) => {
|
|
3639
|
+
k[U] = o[U];
|
|
3640
|
+
}), (Q = f.value) == null || Q.resetFields();
|
|
3641
|
+
};
|
|
3642
|
+
return {
|
|
3643
|
+
formRef: f,
|
|
3644
|
+
formData: k,
|
|
3645
|
+
rules: v,
|
|
3646
|
+
loading: S,
|
|
3647
|
+
visible: g,
|
|
3648
|
+
isEdit: M,
|
|
3649
|
+
openAdd: _,
|
|
3650
|
+
openEdit: x,
|
|
3651
|
+
close: L,
|
|
3652
|
+
resetForm: C,
|
|
3653
|
+
handleSubmit: async () => {
|
|
3654
|
+
var Q;
|
|
3655
|
+
try {
|
|
3656
|
+
await ((Q = f.value) == null ? void 0 : Q.validate()), S.value = !0, await (m == null ? void 0 : m(k)), L();
|
|
3657
|
+
} catch (U) {
|
|
3658
|
+
console.error(U);
|
|
3659
|
+
} finally {
|
|
3660
|
+
S.value = !1;
|
|
3661
|
+
}
|
|
3662
|
+
}
|
|
3663
|
+
};
|
|
3664
|
+
}
|
|
3665
|
+
function ol(o) {
|
|
3666
|
+
const { fetchData: i, defaultPageSize: v = 10 } = o, m = P(!1), f = P([]), k = P(0), S = P(1), g = P(v), M = kt({}), _ = async () => {
|
|
3667
|
+
m.value = !0;
|
|
3668
|
+
try {
|
|
3669
|
+
const T = {
|
|
3670
|
+
...M,
|
|
3671
|
+
page: S.value,
|
|
3672
|
+
pageSize: g.value
|
|
3673
|
+
}, V = await i(T);
|
|
3674
|
+
f.value = V.list, k.value = V.total;
|
|
3675
|
+
} catch (T) {
|
|
3676
|
+
console.error(T);
|
|
3677
|
+
} finally {
|
|
3678
|
+
m.value = !1;
|
|
3679
|
+
}
|
|
3680
|
+
}, x = () => {
|
|
3681
|
+
S.value = 1, _();
|
|
3682
|
+
}, L = () => {
|
|
3683
|
+
Object.keys(M).forEach((T) => {
|
|
3684
|
+
M[T] = void 0;
|
|
3685
|
+
}), S.value = 1, _();
|
|
3686
|
+
}, C = (T) => {
|
|
3687
|
+
S.value = T, _();
|
|
3688
|
+
}, K = (T) => {
|
|
3689
|
+
g.value = T, S.value = 1, _();
|
|
3690
|
+
}, Q = () => {
|
|
3691
|
+
_();
|
|
3692
|
+
}, U = j(() => ({
|
|
3693
|
+
current: S.value,
|
|
3694
|
+
pageSize: g.value,
|
|
3695
|
+
total: k.value
|
|
3696
|
+
}));
|
|
3697
|
+
return {
|
|
3698
|
+
loading: m,
|
|
3699
|
+
data: f,
|
|
3700
|
+
total: k,
|
|
3701
|
+
currentPage: S,
|
|
3702
|
+
pageSize: g,
|
|
3703
|
+
searchParams: M,
|
|
3704
|
+
pagination: U,
|
|
3705
|
+
getData: _,
|
|
3706
|
+
handleSearch: x,
|
|
3707
|
+
handleReset: L,
|
|
3708
|
+
handlePageChange: C,
|
|
3709
|
+
handleSizeChange: K,
|
|
3710
|
+
refresh: Q
|
|
3711
|
+
};
|
|
3712
|
+
}
|
|
3713
|
+
const Ot = Je("locale", () => {
|
|
3714
|
+
const o = q.get("locale") || "zh-CN", i = is(o), v = P(o), m = cs(), { t: f, messages: k, setLocale: S, mergeMessages: g } = us(), M = j(() => {
|
|
3715
|
+
const C = m.find((K) => K.code === v.value);
|
|
3716
|
+
return (C == null ? void 0 : C.name) || v.value;
|
|
3717
|
+
});
|
|
3718
|
+
return {
|
|
3719
|
+
locale: v,
|
|
3720
|
+
localeName: M,
|
|
3721
|
+
locales: m,
|
|
3722
|
+
messages: k,
|
|
3723
|
+
t: f,
|
|
3724
|
+
changeLocale: (C) => {
|
|
3725
|
+
v.value = C, S(C), q.set("locale", C), i.setLocale(C);
|
|
3726
|
+
},
|
|
3727
|
+
addMessages: (C) => {
|
|
3728
|
+
g(C);
|
|
3729
|
+
},
|
|
3730
|
+
initLocale: () => {
|
|
3731
|
+
S(o);
|
|
3732
|
+
},
|
|
3733
|
+
provider: i
|
|
3734
|
+
};
|
|
3735
|
+
}), Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3736
|
+
__proto__: null,
|
|
3737
|
+
useLocaleStore: Ot
|
|
3738
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
3739
|
+
function rl() {
|
|
3740
|
+
const o = Ot();
|
|
3741
|
+
return {
|
|
3742
|
+
/** 当前语言代码 */
|
|
3743
|
+
locale: o.locale,
|
|
3744
|
+
/** 当前语言名称 */
|
|
3745
|
+
localeName: o.localeName,
|
|
3746
|
+
/** 支持的语言列表 */
|
|
3747
|
+
locales: o.locales,
|
|
3748
|
+
/** 翻译函数 */
|
|
3749
|
+
t: o.t,
|
|
3750
|
+
/** 当前语言包 */
|
|
3751
|
+
messages: o.messages,
|
|
3752
|
+
/** 切换语言 */
|
|
3753
|
+
setLocale: o.changeLocale,
|
|
3754
|
+
/** 添加自定义翻译 */
|
|
3755
|
+
addMessages: o.addMessages
|
|
3756
|
+
};
|
|
3757
|
+
}
|
|
3758
|
+
function al() {
|
|
3759
|
+
return Ot().t;
|
|
3760
|
+
}
|
|
3761
|
+
function ll(o) {
|
|
3762
|
+
const i = Se(), v = Pe();
|
|
3763
|
+
return i.isLoggedIn ? v.hasPermission(o) : !1;
|
|
3764
|
+
}
|
|
3765
|
+
function il(o) {
|
|
3766
|
+
return Se().isLoggedIn;
|
|
3767
|
+
}
|
|
3768
|
+
function cl() {
|
|
3769
|
+
return !0;
|
|
3770
|
+
}
|
|
3771
|
+
const Zt = [
|
|
3772
|
+
{
|
|
3773
|
+
path: "/login",
|
|
3774
|
+
name: "Login",
|
|
3775
|
+
component: () => Promise.resolve().then(() => ha),
|
|
3776
|
+
meta: {
|
|
3777
|
+
title: "登录",
|
|
3778
|
+
hidden: !0
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
], Qt = {
|
|
3782
|
+
path: "/",
|
|
3783
|
+
name: "Layout",
|
|
3784
|
+
component: () => Promise.resolve().then(() => Rr),
|
|
3785
|
+
redirect: "/dashboard",
|
|
3786
|
+
children: [
|
|
3787
|
+
{
|
|
3788
|
+
path: "/dashboard",
|
|
3789
|
+
name: "Dashboard",
|
|
3790
|
+
component: () => import("./index-lJrh5CFc.js"),
|
|
3791
|
+
meta: {
|
|
3792
|
+
title: "仪表盘",
|
|
3793
|
+
icon: "dashboard",
|
|
3794
|
+
keepAlive: !0,
|
|
3795
|
+
affix: !0
|
|
3796
|
+
}
|
|
3797
|
+
},
|
|
3798
|
+
{
|
|
3799
|
+
path: "/system/user",
|
|
3800
|
+
name: "SystemUser",
|
|
3801
|
+
component: () => import("./index-Cp8kqjtv.js"),
|
|
3802
|
+
meta: {
|
|
3803
|
+
title: "用户管理",
|
|
3804
|
+
icon: "user",
|
|
3805
|
+
keepAlive: !0
|
|
3806
|
+
}
|
|
3807
|
+
},
|
|
3808
|
+
{
|
|
3809
|
+
path: "/system/role",
|
|
3810
|
+
name: "SystemRole",
|
|
3811
|
+
component: () => import("./index-D59X6HmM.js"),
|
|
3812
|
+
meta: {
|
|
3813
|
+
title: "角色管理",
|
|
3814
|
+
icon: "role",
|
|
3815
|
+
keepAlive: !0
|
|
3816
|
+
}
|
|
3817
|
+
},
|
|
3818
|
+
{
|
|
3819
|
+
path: "/system/menu",
|
|
3820
|
+
name: "SystemMenu",
|
|
3821
|
+
component: () => import("./index-B4U8Dy2W.js"),
|
|
3822
|
+
meta: {
|
|
3823
|
+
title: "菜单管理",
|
|
3824
|
+
icon: "menu",
|
|
3825
|
+
keepAlive: !0
|
|
3826
|
+
}
|
|
3827
|
+
},
|
|
3828
|
+
// catch-all 路由:让 404 在 Layout 内部渲染,保持左侧菜单显示
|
|
3829
|
+
{
|
|
3830
|
+
path: "/:pathMatch(.*)*",
|
|
3831
|
+
name: "CatchAll",
|
|
3832
|
+
component: () => Promise.resolve().then(() => Jt),
|
|
3833
|
+
meta: {
|
|
3834
|
+
title: "404",
|
|
3835
|
+
hidden: !0
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
]
|
|
3839
|
+
}, ul = [
|
|
3840
|
+
{
|
|
3841
|
+
path: "/dashboard",
|
|
3842
|
+
name: "Dashboard",
|
|
3843
|
+
component: () => import("./index-lJrh5CFc.js"),
|
|
3844
|
+
meta: {
|
|
3845
|
+
title: "仪表盘",
|
|
3846
|
+
icon: "dashboard",
|
|
3847
|
+
keepAlive: !0,
|
|
3848
|
+
affix: !0
|
|
3849
|
+
}
|
|
3850
|
+
},
|
|
3851
|
+
{
|
|
3852
|
+
path: "/system",
|
|
3853
|
+
name: "System",
|
|
3854
|
+
redirect: "/system/user",
|
|
3855
|
+
meta: {
|
|
3856
|
+
title: "系统管理",
|
|
3857
|
+
icon: "setting"
|
|
3858
|
+
},
|
|
3859
|
+
children: [
|
|
3860
|
+
{
|
|
3861
|
+
path: "user",
|
|
3862
|
+
name: "SystemUser",
|
|
3863
|
+
component: () => import("./index-Cp8kqjtv.js"),
|
|
3864
|
+
meta: {
|
|
3865
|
+
title: "用户管理",
|
|
3866
|
+
icon: "user",
|
|
3867
|
+
keepAlive: !0
|
|
3868
|
+
}
|
|
3869
|
+
},
|
|
3870
|
+
{
|
|
3871
|
+
path: "role",
|
|
3872
|
+
name: "SystemRole",
|
|
3873
|
+
component: () => import("./index-D59X6HmM.js"),
|
|
3874
|
+
meta: {
|
|
3875
|
+
title: "角色管理",
|
|
3876
|
+
icon: "role",
|
|
3877
|
+
keepAlive: !0
|
|
3878
|
+
}
|
|
3879
|
+
},
|
|
3880
|
+
{
|
|
3881
|
+
path: "menu",
|
|
3882
|
+
name: "SystemMenu",
|
|
3883
|
+
component: () => import("./index-B4U8Dy2W.js"),
|
|
3884
|
+
meta: {
|
|
3885
|
+
title: "菜单管理",
|
|
3886
|
+
icon: "menu",
|
|
3887
|
+
keepAlive: !0
|
|
3888
|
+
}
|
|
3889
|
+
}
|
|
3890
|
+
]
|
|
3891
|
+
}
|
|
3892
|
+
], $a = [
|
|
3893
|
+
{
|
|
3894
|
+
menuCode: "dashboard",
|
|
3895
|
+
menuName: "仪表盘",
|
|
3896
|
+
menuUrl: "/dashboard",
|
|
3897
|
+
icon: "dashboard",
|
|
3898
|
+
closable: !0,
|
|
3899
|
+
isDefault: !0,
|
|
3900
|
+
isOut: !1
|
|
3901
|
+
},
|
|
3902
|
+
{
|
|
3903
|
+
menuCode: "system",
|
|
3904
|
+
menuName: "系统管理",
|
|
3905
|
+
menuUrl: "/system",
|
|
3906
|
+
icon: "setting",
|
|
3907
|
+
closable: !1,
|
|
3908
|
+
isDefault: !1,
|
|
3909
|
+
isOut: !1,
|
|
3910
|
+
children: [
|
|
3911
|
+
{
|
|
3912
|
+
menuCode: "system_user",
|
|
3913
|
+
menuName: "用户管理",
|
|
3914
|
+
menuUrl: "/system/user",
|
|
3915
|
+
icon: "user",
|
|
3916
|
+
closable: !0,
|
|
3917
|
+
isDefault: !1,
|
|
3918
|
+
isOut: !1
|
|
3919
|
+
},
|
|
3920
|
+
{
|
|
3921
|
+
menuCode: "system_role",
|
|
3922
|
+
menuName: "角色管理",
|
|
3923
|
+
menuUrl: "/system/role",
|
|
3924
|
+
icon: "role",
|
|
3925
|
+
closable: !0,
|
|
3926
|
+
isDefault: !1,
|
|
3927
|
+
isOut: !1
|
|
3928
|
+
},
|
|
3929
|
+
{
|
|
3930
|
+
menuCode: "system_menu",
|
|
3931
|
+
menuName: "菜单管理",
|
|
3932
|
+
menuUrl: "/system/menu",
|
|
3933
|
+
icon: "menu",
|
|
3934
|
+
closable: !0,
|
|
3935
|
+
isDefault: !1,
|
|
3936
|
+
isOut: !1
|
|
3937
|
+
}
|
|
3938
|
+
]
|
|
3939
|
+
}
|
|
3940
|
+
], es = xt({
|
|
3941
|
+
history: Ct(),
|
|
3942
|
+
routes: [...Zt, Qt],
|
|
3943
|
+
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
3944
|
+
}), Ma = ["/login"];
|
|
3945
|
+
es.beforeEach(async (o, i, v) => {
|
|
3946
|
+
const m = De();
|
|
3947
|
+
if (m.initTheme(), jt())
|
|
3948
|
+
if (o.path === "/login")
|
|
3949
|
+
v({ path: "/" });
|
|
3950
|
+
else {
|
|
3951
|
+
const f = Se();
|
|
3952
|
+
f.isLoggedIn || (f.setUserInfo({
|
|
3953
|
+
appId: ct(),
|
|
3954
|
+
userId: "1",
|
|
3955
|
+
userName: "管理员",
|
|
3956
|
+
departmentName: "技术部",
|
|
3957
|
+
email: "admin@example.com",
|
|
3958
|
+
mobilePhone: "13800138000",
|
|
3959
|
+
positionName: "管理员",
|
|
3960
|
+
avatar: ""
|
|
3961
|
+
}), Pe().setMenuList($a)), o.name && o.meta.keepAlive && m.addCachedView(o.name), v();
|
|
3962
|
+
}
|
|
3963
|
+
else
|
|
3964
|
+
Ma.includes(o.path) ? v() : v("/login");
|
|
3965
|
+
});
|
|
3966
|
+
function dl() {
|
|
3967
|
+
const o = xt({
|
|
3968
|
+
history: Ct(),
|
|
3969
|
+
routes: [...Zt, Qt]
|
|
3970
|
+
});
|
|
3971
|
+
es.matcher = o.matcher;
|
|
3972
|
+
}
|
|
3973
|
+
function fl(o, i = {}) {
|
|
3974
|
+
const v = i.indexPath || "/dashboard", m = {
|
|
3975
|
+
path: "/:pathMatch(.*)*",
|
|
3976
|
+
name: "CatchAll",
|
|
3977
|
+
component: () => Promise.resolve().then(() => Jt),
|
|
3978
|
+
meta: {
|
|
3979
|
+
title: "404"
|
|
3980
|
+
}
|
|
3981
|
+
};
|
|
3982
|
+
return {
|
|
3983
|
+
path: "/",
|
|
3984
|
+
name: "Layout",
|
|
3985
|
+
component: qt,
|
|
3986
|
+
redirect: v,
|
|
3987
|
+
children: [...o, m]
|
|
3988
|
+
};
|
|
3989
|
+
}
|
|
3990
|
+
function pl(o, i = {}) {
|
|
3991
|
+
return xt({
|
|
3992
|
+
history: Ct(i.base),
|
|
3993
|
+
routes: o,
|
|
3994
|
+
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
3995
|
+
});
|
|
3996
|
+
}
|
|
3997
|
+
function ml(o) {
|
|
3998
|
+
return ue.get("/role/list", { params: o });
|
|
3999
|
+
}
|
|
4000
|
+
function hl(o) {
|
|
4001
|
+
return ue.get(`/role/${o}`);
|
|
4002
|
+
}
|
|
4003
|
+
function vl(o) {
|
|
4004
|
+
return ue.post("/role", o);
|
|
4005
|
+
}
|
|
4006
|
+
function gl(o, i) {
|
|
4007
|
+
return ue.put(`/role/${o}`, i);
|
|
4008
|
+
}
|
|
4009
|
+
function _l(o) {
|
|
4010
|
+
return ue.delete(`/role/${o}`);
|
|
4011
|
+
}
|
|
4012
|
+
function wl(o, i) {
|
|
4013
|
+
return ue.patch(`/role/${o}/status`, { status: i });
|
|
4014
|
+
}
|
|
4015
|
+
function yl() {
|
|
4016
|
+
return ue.get("/user/v1.0/menu/list");
|
|
4017
|
+
}
|
|
4018
|
+
function La(o) {
|
|
4019
|
+
const i = o || ct();
|
|
4020
|
+
return ue.get(`/user/v1.0/menu/get-menu?appId=${i}`);
|
|
4021
|
+
}
|
|
4022
|
+
function bl(o) {
|
|
4023
|
+
return ue.post("/menu", o);
|
|
4024
|
+
}
|
|
4025
|
+
function kl(o, i) {
|
|
4026
|
+
return ue.put(`/menu/${o}`, i);
|
|
4027
|
+
}
|
|
4028
|
+
function xl(o) {
|
|
4029
|
+
return ue.delete(`/menu/${o}`);
|
|
4030
|
+
}
|
|
4031
|
+
const Ia = ["/login", "/404", "/403"];
|
|
4032
|
+
function Cl(o, i = {}) {
|
|
4033
|
+
const v = i.whiteList || Ia, m = i.loginPath || "/login", f = i.homePath || "/";
|
|
4034
|
+
o.beforeEach(async (k, S, g) => {
|
|
4035
|
+
const M = De(), _ = Se(), x = Pe();
|
|
4036
|
+
if (M.initTheme(), ut())
|
|
4037
|
+
if (k.path === m)
|
|
4038
|
+
g({ path: f });
|
|
4039
|
+
else if (_.isLoggedIn)
|
|
4040
|
+
k.name && k.meta.keepAlive && M.addCachedView(k.name), g();
|
|
4041
|
+
else
|
|
4042
|
+
try {
|
|
4043
|
+
if (i.fetchUserInfo) {
|
|
4044
|
+
const C = await i.fetchUserInfo();
|
|
4045
|
+
_.setUserInfo(C);
|
|
4046
|
+
} else {
|
|
4047
|
+
const C = await oa();
|
|
4048
|
+
_.setUserInfo(C);
|
|
4049
|
+
}
|
|
4050
|
+
if (i.fetchMenu) {
|
|
4051
|
+
const C = await i.fetchMenu();
|
|
4052
|
+
x.setMenuList(C);
|
|
4053
|
+
} else {
|
|
4054
|
+
const C = await La(i.appId);
|
|
4055
|
+
x.setMenuList(C);
|
|
4056
|
+
}
|
|
4057
|
+
i.onLoginSuccess && i.onLoginSuccess(), k.name && k.meta.keepAlive && M.addCachedView(k.name), g({ ...k, replace: !0 });
|
|
4058
|
+
} catch (C) {
|
|
4059
|
+
console.error("获取用户信息失败:", C), _.clearUserInfo(), x.clearMenu(), We(), g({ path: m, query: { redirect: k.fullPath } });
|
|
4060
|
+
}
|
|
4061
|
+
else
|
|
4062
|
+
v.includes(k.path) ? g() : g({ path: m, query: { redirect: k.fullPath } });
|
|
4063
|
+
}), o.afterEach(() => {
|
|
4064
|
+
});
|
|
4065
|
+
}
|
|
4066
|
+
function Nl(o) {
|
|
4067
|
+
return ue.get("/user/list", { params: o });
|
|
4068
|
+
}
|
|
4069
|
+
function El(o) {
|
|
4070
|
+
return ue.get(`/user/${o}`);
|
|
4071
|
+
}
|
|
4072
|
+
function Sl(o) {
|
|
4073
|
+
return ue.post("/user", o);
|
|
4074
|
+
}
|
|
4075
|
+
function $l(o, i) {
|
|
4076
|
+
return ue.put(`/user/${o}`, i);
|
|
4077
|
+
}
|
|
4078
|
+
function Ml(o) {
|
|
4079
|
+
return ue.delete(`/user/${o}`);
|
|
4080
|
+
}
|
|
4081
|
+
function Ll(o) {
|
|
4082
|
+
return ue.post("/user/batch-delete", { ids: o });
|
|
4083
|
+
}
|
|
4084
|
+
function Il(o, i) {
|
|
4085
|
+
return ue.patch(`/user/${o}/status`, { status: i });
|
|
4086
|
+
}
|
|
4087
|
+
function Al(o) {
|
|
4088
|
+
return ue.post(`/user/${o}/reset-password`);
|
|
4089
|
+
}
|
|
4090
|
+
var Aa = /* @__PURE__ */ ((o) => (o[o.ENABLED = 1] = "ENABLED", o[o.DISABLED = 0] = "DISABLED", o))(Aa || {}), Ta = /* @__PURE__ */ ((o) => (o[o.UNKNOWN = 0] = "UNKNOWN", o[o.MALE = 1] = "MALE", o[o.FEMALE = 2] = "FEMALE", o))(Ta || {}), Oa = /* @__PURE__ */ ((o) => (o[o.DIRECTORY = 0] = "DIRECTORY", o[o.MENU = 1] = "MENU", o[o.BUTTON = 2] = "BUTTON", o))(Oa || {});
|
|
4091
|
+
const Tl = {
|
|
4092
|
+
1: "启用",
|
|
4093
|
+
0: "禁用"
|
|
4094
|
+
}, Ol = {
|
|
4095
|
+
0: "未知",
|
|
4096
|
+
1: "男",
|
|
4097
|
+
2: "女"
|
|
4098
|
+
}, Ul = {
|
|
4099
|
+
0: "目录",
|
|
4100
|
+
1: "菜单",
|
|
4101
|
+
2: "按钮"
|
|
4102
|
+
}, Bl = [
|
|
4103
|
+
{
|
|
4104
|
+
label: "启用",
|
|
4105
|
+
value: 1
|
|
4106
|
+
/* ENABLED */
|
|
4107
|
+
},
|
|
4108
|
+
{
|
|
4109
|
+
label: "禁用",
|
|
4110
|
+
value: 0
|
|
4111
|
+
/* DISABLED */
|
|
4112
|
+
}
|
|
4113
|
+
], Pl = [
|
|
4114
|
+
{
|
|
4115
|
+
label: "未知",
|
|
4116
|
+
value: 0
|
|
4117
|
+
/* UNKNOWN */
|
|
4118
|
+
},
|
|
4119
|
+
{
|
|
4120
|
+
label: "男",
|
|
4121
|
+
value: 1
|
|
4122
|
+
/* MALE */
|
|
4123
|
+
},
|
|
4124
|
+
{
|
|
4125
|
+
label: "女",
|
|
4126
|
+
value: 2
|
|
4127
|
+
/* FEMALE */
|
|
4128
|
+
}
|
|
4129
|
+
], Rl = [
|
|
4130
|
+
{
|
|
4131
|
+
label: "目录",
|
|
4132
|
+
value: 0
|
|
4133
|
+
/* DIRECTORY */
|
|
4134
|
+
},
|
|
4135
|
+
{
|
|
4136
|
+
label: "菜单",
|
|
4137
|
+
value: 1
|
|
4138
|
+
/* MENU */
|
|
4139
|
+
},
|
|
4140
|
+
{
|
|
4141
|
+
label: "按钮",
|
|
4142
|
+
value: 2
|
|
4143
|
+
/* BUTTON */
|
|
4144
|
+
}
|
|
4145
|
+
], zl = {
|
|
4146
|
+
mounted(o, i) {
|
|
4147
|
+
var S, g;
|
|
4148
|
+
const v = Se(), m = Pe();
|
|
4149
|
+
if (!v.isLoggedIn) {
|
|
4150
|
+
(S = o.parentNode) == null || S.removeChild(o);
|
|
4151
|
+
return;
|
|
4152
|
+
}
|
|
4153
|
+
const f = i.value, k = Array.isArray(f) ? f : [f];
|
|
4154
|
+
m.hasPermission(k) || (g = o.parentNode) == null || g.removeChild(o);
|
|
4155
|
+
}
|
|
4156
|
+
};
|
|
4157
|
+
function Dl(o) {
|
|
4158
|
+
return ds({
|
|
4159
|
+
appId: o.appId,
|
|
4160
|
+
clientId: o.clientId,
|
|
4161
|
+
apiBaseUrl: o.apiBaseUrl
|
|
4162
|
+
}), o.locale && Promise.resolve().then(() => Sa).then(({ useLocaleStore: i }) => {
|
|
4163
|
+
i().changeLocale(o.locale);
|
|
4164
|
+
}), {
|
|
4165
|
+
config: {
|
|
4166
|
+
appName: o.appName || "XTO App",
|
|
4167
|
+
appId: ct(),
|
|
4168
|
+
clientId: zt(),
|
|
4169
|
+
apiBaseUrl: fs(),
|
|
4170
|
+
indexPath: o.indexPath || "/dashboard",
|
|
4171
|
+
loginPath: o.loginPath || "/login",
|
|
4172
|
+
locale: o.locale || "zh-CN"
|
|
4173
|
+
}
|
|
4174
|
+
};
|
|
4175
|
+
}
|
|
4176
|
+
export {
|
|
4177
|
+
cl as $,
|
|
4178
|
+
zt as A,
|
|
4179
|
+
Wa as B,
|
|
4180
|
+
yl as C,
|
|
4181
|
+
La as D,
|
|
4182
|
+
Ha as E,
|
|
4183
|
+
Ya as F,
|
|
4184
|
+
Ta as G,
|
|
4185
|
+
Sn as H,
|
|
4186
|
+
Ka as I,
|
|
4187
|
+
hl as J,
|
|
4188
|
+
ml as K,
|
|
4189
|
+
qt as L,
|
|
4190
|
+
Oa as M,
|
|
4191
|
+
ut as N,
|
|
4192
|
+
ws as O,
|
|
4193
|
+
vs as P,
|
|
4194
|
+
El as Q,
|
|
4195
|
+
oa as R,
|
|
4196
|
+
Aa as S,
|
|
4197
|
+
Xa as T,
|
|
4198
|
+
Nl as U,
|
|
4199
|
+
ll as V,
|
|
4200
|
+
il as W,
|
|
4201
|
+
jt as X,
|
|
4202
|
+
ue as Y,
|
|
4203
|
+
ds as Z,
|
|
4204
|
+
$e as _,
|
|
4205
|
+
Bl as a,
|
|
4206
|
+
xs as a0,
|
|
4207
|
+
Qt as a1,
|
|
4208
|
+
q as a2,
|
|
4209
|
+
et as a3,
|
|
4210
|
+
na as a4,
|
|
4211
|
+
Za as a5,
|
|
4212
|
+
$a as a6,
|
|
4213
|
+
zl as a7,
|
|
4214
|
+
Qa as a8,
|
|
4215
|
+
Al as a9,
|
|
4216
|
+
Pe as aA,
|
|
4217
|
+
ol as aB,
|
|
4218
|
+
Se as aC,
|
|
4219
|
+
dl as aa,
|
|
4220
|
+
es as ab,
|
|
4221
|
+
Ga as ac,
|
|
4222
|
+
tt as ad,
|
|
4223
|
+
Ja as ae,
|
|
4224
|
+
ks as af,
|
|
4225
|
+
bs as ag,
|
|
4226
|
+
_s as ah,
|
|
4227
|
+
hs as ai,
|
|
4228
|
+
ys as aj,
|
|
4229
|
+
Vt as ak,
|
|
4230
|
+
gs as al,
|
|
4231
|
+
Cl as am,
|
|
4232
|
+
Zt as an,
|
|
4233
|
+
kl as ao,
|
|
4234
|
+
gl as ap,
|
|
4235
|
+
wl as aq,
|
|
4236
|
+
$l as ar,
|
|
4237
|
+
Il as as,
|
|
4238
|
+
tl as at,
|
|
4239
|
+
De as au,
|
|
4240
|
+
sl as av,
|
|
4241
|
+
Ze as aw,
|
|
4242
|
+
nl as ax,
|
|
4243
|
+
rl as ay,
|
|
4244
|
+
Ot as az,
|
|
4245
|
+
Rl as b,
|
|
4246
|
+
el as c,
|
|
4247
|
+
Pl as d,
|
|
4248
|
+
Ol as e,
|
|
4249
|
+
Ul as f,
|
|
4250
|
+
ba as g,
|
|
4251
|
+
Pt as h,
|
|
4252
|
+
ma as i,
|
|
4253
|
+
Tl as j,
|
|
4254
|
+
qa as k,
|
|
4255
|
+
Ll as l,
|
|
4256
|
+
We as m,
|
|
4257
|
+
fl as n,
|
|
4258
|
+
bl as o,
|
|
4259
|
+
vl as p,
|
|
4260
|
+
pl as q,
|
|
4261
|
+
al as r,
|
|
4262
|
+
Sl as s,
|
|
4263
|
+
Dl as t,
|
|
4264
|
+
ul as u,
|
|
4265
|
+
xl as v,
|
|
4266
|
+
_l as w,
|
|
4267
|
+
Ml as x,
|
|
4268
|
+
fs as y,
|
|
4269
|
+
ct as z
|
|
4270
|
+
};
|