jmash-core 0.1.17 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/{401-B-xPz9LF.mjs → 401-CQMri0nX.mjs} +9 -9
  2. package/dist/{404-D6qLFrds.mjs → 404-CDfv-CCs.mjs} +4 -4
  3. package/dist/{BarChart-DUGSmZyQ.mjs → BarChart-CACxjw71.mjs} +6 -6
  4. package/dist/{index-CIsDsOWA.mjs → index-BD4Gujon.mjs} +9593 -9219
  5. package/dist/index-BLIB9EUa.mjs +2163 -0
  6. package/dist/{index-AwPbizZV.mjs → index-Dl15NUoZ.mjs} +21 -21
  7. package/dist/index-VxSky12H.mjs +257 -0
  8. package/dist/{index-DCziYkYK.mjs → index-dkuM7C9F.mjs} +14 -14
  9. package/dist/{index-CZJ3UhUM.mjs → index-gUMOTzZ1.mjs} +7 -7
  10. package/dist/index.mjs +61 -59
  11. package/dist/{profile-GQvC9C8o.mjs → profile-CeMFTyxu.mjs} +29 -29
  12. package/dist/{runAs-Dwg7Iuqd.mjs → runAs-CKJ26HTt.mjs} +1 -1
  13. package/dist/{runAs.vue_vue_type_script_setup_true_lang-BtQpSMZg.mjs → runAs.vue_vue_type_script_setup_true_lang-CIsxY_vn.mjs} +138 -138
  14. package/dist/style.css +1 -1
  15. package/dist/{types-BuuQJDxb.mjs → types-D9Z0uPWX.mjs} +10 -10
  16. package/dist/{updatePwd-5svDyP7G.mjs → updatePwd-D4kZMk8p.mjs} +1 -1
  17. package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-C8rArYsn.mjs → updatePwd.vue_vue_type_script_setup_true_lang-C8mlen_N.mjs} +10 -10
  18. package/dts/src/api/auth/index.d.ts +2 -1
  19. package/dts/src/api/auth/types.d.ts +12 -0
  20. package/dts/src/api/change/index.d.ts +5 -0
  21. package/dts/src/api/change/types.d.ts +11 -5
  22. package/dts/src/components/ForgetPwd/index.vue.d.ts +6 -0
  23. package/dts/src/components/ForgotPwd/index.vue.d.ts +6 -0
  24. package/dts/src/components/GraphicValidate/index.vue.d.ts +8 -0
  25. package/dts/src/components/JmashMultiImageUpload/index.vue.d.ts +1 -1
  26. package/dts/src/components/NameValidate/index.vue.d.ts +63 -0
  27. package/dts/src/index.d.ts +4 -3
  28. package/dts/src/lang/package/zh-cn.d.ts +36 -1
  29. package/dts/src/layout/components/NavBar/components/ChangeWechatBind.vue.d.ts +6 -2
  30. package/dts/src/layout/components/NavBar/components/QrCode.vue.d.ts +18 -0
  31. package/package.json +1 -1
  32. package/dist/index-CNS2LvqZ.mjs +0 -244
  33. package/dist/index-Cb2jBye0.mjs +0 -1817
@@ -0,0 +1,2163 @@
1
+ import { u as ne, _ as de, E as Ge, a as ue, s as Re, v as Ye, G as xe, b as ke, c as Je, d as Ze, e as et, f as X, S as tt, g as Te, h as le, D as ge, i as nt, j as ot, k as at, l as pe, m as Ne, r as qe, n as _e, T as ye, o as lt, p as it, q as rt, t as ve, w as st } from "./index-BD4Gujon.mjs";
2
+ import { defineComponent as B, ref as I, resolveComponent as w, createBlock as V, openBlock as f, withCtx as p, createElementVNode as k, createVNode as d, createElementBlock as S, Fragment as J, renderList as fe, unref as i, createTextVNode as R, toDisplayString as M, useModel as Ae, mergeModels as Se, reactive as ct, resolveDirective as ut, withDirectives as Be, computed as z, createCommentVNode as P, isRef as ae, watch as re, onBeforeMount as dt, TransitionGroup as ft, withModifiers as me, normalizeClass as G, Transition as Oe, KeepAlive as mt, resolveDynamicComponent as Ee, getCurrentInstance as pt, nextTick as De, onMounted as ze, normalizeStyle as vt, vShow as _t, normalizeProps as ht, guardReactiveProps as gt, renderSlot as bt, watchEffect as Ct } from "vue";
3
+ import { useRoute as he, useRouter as Me } from "vue-router";
4
+ import { _ as wt } from "./updatePwd.vue_vue_type_script_setup_true_lang-C8mlen_N.mjs";
5
+ import { useI18n as Pe } from "vue-i18n";
6
+ import { ElMessage as Fe } from "element-plus";
7
+ import { _ as yt, E as Vt } from "./runAs.vue_vue_type_script_setup_true_lang-CIsxY_vn.mjs";
8
+ import { storeToRefs as xt } from "pinia";
9
+ const kt = /* @__PURE__ */ B({
10
+ __name: "index",
11
+ setup(l) {
12
+ const e = ne(), t = I([
13
+ { label: "默认", value: "default" },
14
+ { label: "大型", value: "large" },
15
+ { label: "小型", value: "small" }
16
+ ]);
17
+ function o(s) {
18
+ e.changeSize(s), Ge.success("切换布局大小成功");
19
+ }
20
+ return (s, n) => {
21
+ const a = de, r = w("el-dropdown-item"), u = w("el-dropdown-menu"), v = w("el-dropdown");
22
+ return f(), V(v, {
23
+ trigger: "click",
24
+ onCommand: o
25
+ }, {
26
+ dropdown: p(() => [
27
+ d(u, null, {
28
+ default: p(() => [
29
+ (f(!0), S(J, null, fe(i(t), (_) => (f(), V(r, {
30
+ key: _.value,
31
+ disabled: i(e).size == _.value,
32
+ command: _.value
33
+ }, {
34
+ default: p(() => [
35
+ R(M(_.label), 1)
36
+ ]),
37
+ _: 2
38
+ }, 1032, ["disabled", "command"]))), 128))
39
+ ]),
40
+ _: 1
41
+ })
42
+ ]),
43
+ default: p(() => [
44
+ k("div", null, [
45
+ d(a, { "icon-class": "size" })
46
+ ])
47
+ ]),
48
+ _: 1
49
+ });
50
+ };
51
+ }
52
+ });
53
+ class St {
54
+ // 更换手机号邮箱
55
+ phoneEmail(e) {
56
+ return e.tenant = ue().user.tenant, Re({
57
+ url: "/v1/rbac/change/phone_email",
58
+ method: "post",
59
+ data: e
60
+ });
61
+ }
62
+ // 更换微信用户绑定
63
+ /**
64
+ * 绑定微信账号
65
+ * @param {WechatBindReq} data - 微信绑定请求参数
66
+ * @returns {AxiosPromise<boolean>} 返回绑定操作的结果Promise,成功时为true
67
+ */
68
+ wechatBind(e) {
69
+ return e.tenant = ue().user.tenant, e.authorizerAppid = Ye.APP_WECHAT_APPID, Re({
70
+ url: "/v1/rbac/change/wechat_bind",
71
+ method: "post",
72
+ data: e
73
+ });
74
+ }
75
+ }
76
+ const We = new St(), $t = { class: "dialog-footer" }, Tt = /* @__PURE__ */ B({
77
+ __name: "ChangePhoneEmail",
78
+ props: {
79
+ modelValue: { type: Boolean },
80
+ modelModifiers: {}
81
+ },
82
+ emits: ["update:modelValue"],
83
+ setup(l) {
84
+ var _, c;
85
+ const e = ue(), { t } = Pe(), o = Ae(l, "modelValue");
86
+ function s() {
87
+ o.value && (o.value = !1);
88
+ }
89
+ const n = I(), a = I({
90
+ newName: "",
91
+ newValidCode: "",
92
+ oldName: ((_ = e.user) == null ? void 0 : _.mobilePhoneIns) ?? ((c = e.user) == null ? void 0 : c.emailIns),
93
+ oldValidCode: "",
94
+ requestId: Math.random() * 10 + ""
95
+ }), r = (m, h, g) => {
96
+ h ? !Je(h) && !Ze(h) ? g(new Error(t("change.nameError"))) : g() : g(new Error(t(`change.${m.field}Required`)));
97
+ }, u = I({
98
+ oldName: [
99
+ {
100
+ required: !0,
101
+ message: t("change.oldNameRequired"),
102
+ trigger: "blur"
103
+ }
104
+ ],
105
+ oldCaptchaCode: [
106
+ {
107
+ required: !0,
108
+ message: t("change.oldCaptchaCodeRequired"),
109
+ trigger: "blur"
110
+ }
111
+ ],
112
+ newCaptchaCode: [
113
+ {
114
+ required: !0,
115
+ message: t("change.oldCaptchaCodeRequired"),
116
+ trigger: "blur"
117
+ }
118
+ ],
119
+ oldValidCode: [
120
+ {
121
+ required: !0,
122
+ message: t("change.oldValidCodeRequired"),
123
+ trigger: "blur"
124
+ }
125
+ ],
126
+ newName: [
127
+ {
128
+ required: !0,
129
+ validator: r,
130
+ trigger: "blur"
131
+ }
132
+ ],
133
+ newValidCode: [
134
+ {
135
+ required: !0,
136
+ message: t("change.newValidCodeRequired"),
137
+ trigger: "blur"
138
+ }
139
+ ]
140
+ });
141
+ function v() {
142
+ var m;
143
+ (m = n.value) == null || m.validate((h) => {
144
+ if (!h) return;
145
+ const g = {
146
+ requestId: a.value.requestId,
147
+ oldValidCode: a.value.oldValidCode,
148
+ newName: a.value.newName,
149
+ newValidCode: a.value.newValidCode
150
+ };
151
+ We.phoneEmail(g).then(($) => {
152
+ $.status === 200 && (s(), Fe.success(t("change.nameSuccess")), e.getUserInfo());
153
+ });
154
+ });
155
+ }
156
+ return (m, h) => {
157
+ const g = w("el-input"), $ = w("el-form-item"), x = w("el-col"), T = w("el-row"), q = w("el-form"), C = w("el-button"), N = w("el-dialog");
158
+ return f(), V(N, {
159
+ modelValue: o.value,
160
+ "onUpdate:modelValue": h[8] || (h[8] = (A) => o.value = A),
161
+ onClose: s
162
+ }, {
163
+ footer: p(() => [
164
+ k("div", $t, [
165
+ d(C, { onClick: s }, {
166
+ default: p(() => [
167
+ R(M(m.$t("common.cancel")), 1)
168
+ ]),
169
+ _: 1
170
+ }),
171
+ d(C, {
172
+ type: "primary",
173
+ onClick: v
174
+ }, {
175
+ default: p(() => [
176
+ R(M(m.$t("common.confirm")), 1)
177
+ ]),
178
+ _: 1
179
+ })
180
+ ])
181
+ ]),
182
+ default: p(() => [
183
+ d(q, {
184
+ ref_key: "formRef",
185
+ ref: n,
186
+ model: a.value,
187
+ rules: u.value,
188
+ size: "large"
189
+ }, {
190
+ default: p(() => [
191
+ d(T, null, {
192
+ default: p(() => [
193
+ d(x, { span: 24 }, {
194
+ default: p(() => [
195
+ d($, { prop: "oldName" }, {
196
+ default: p(() => [
197
+ d(g, {
198
+ modelValue: a.value.oldName,
199
+ "onUpdate:modelValue": h[0] || (h[0] = (A) => a.value.oldName = A),
200
+ readonly: ""
201
+ }, null, 8, ["modelValue"])
202
+ ]),
203
+ _: 1
204
+ })
205
+ ]),
206
+ _: 1
207
+ }),
208
+ d(x, { span: 24 }, {
209
+ default: p(() => [
210
+ d($, { prop: "oldCaptchaCode" }, {
211
+ default: p(() => [
212
+ d(xe, {
213
+ "captcha-id": a.value.oldCaptchaId,
214
+ "onUpdate:captchaId": h[1] || (h[1] = (A) => a.value.oldCaptchaId = A),
215
+ "captcha-code": a.value.oldCaptchaCode,
216
+ "onUpdate:captchaCode": h[2] || (h[2] = (A) => a.value.oldCaptchaCode = A),
217
+ placeholder: m.$t("change.oldCaptchaCode")
218
+ }, null, 8, ["captcha-id", "captcha-code", "placeholder"])
219
+ ]),
220
+ _: 1
221
+ })
222
+ ]),
223
+ _: 1
224
+ }),
225
+ d(x, { span: 24 }, {
226
+ default: p(() => [
227
+ d($, { prop: "oldValidCode" }, {
228
+ default: p(() => {
229
+ var A, L;
230
+ return [
231
+ d(ke, {
232
+ name: ((A = i(e).user) == null ? void 0 : A.mobilePhone) ?? ((L = i(e).user) == null ? void 0 : L.email),
233
+ "validate-field": ["oldName", "oldCaptchaCode"],
234
+ "captcha-id": a.value.oldCaptchaId,
235
+ "captcha-code": a.value.oldCaptchaCode,
236
+ "form-ref": n.value,
237
+ placeholder: m.$t("change.oldValidCode"),
238
+ modelValue: a.value.oldValidCode,
239
+ "onUpdate:modelValue": h[3] || (h[3] = (E) => a.value.oldValidCode = E)
240
+ }, null, 8, ["name", "captcha-id", "captcha-code", "form-ref", "placeholder", "modelValue"])
241
+ ];
242
+ }),
243
+ _: 1
244
+ })
245
+ ]),
246
+ _: 1
247
+ }),
248
+ d(x, { span: 24 }, {
249
+ default: p(() => [
250
+ d($, { prop: "newName" }, {
251
+ default: p(() => [
252
+ d(g, {
253
+ modelValue: a.value.newName,
254
+ "onUpdate:modelValue": h[4] || (h[4] = (A) => a.value.newName = A),
255
+ placeholder: m.$t("change.newName"),
256
+ "show-word-limit": "",
257
+ clearable: ""
258
+ }, null, 8, ["modelValue", "placeholder"])
259
+ ]),
260
+ _: 1
261
+ })
262
+ ]),
263
+ _: 1
264
+ }),
265
+ d(x, { span: 24 }, {
266
+ default: p(() => [
267
+ d($, { prop: "newCaptchaCode" }, {
268
+ default: p(() => [
269
+ d(xe, {
270
+ "captcha-id": a.value.newCaptchaId,
271
+ "onUpdate:captchaId": h[5] || (h[5] = (A) => a.value.newCaptchaId = A),
272
+ "captcha-code": a.value.newCaptchaCode,
273
+ "onUpdate:captchaCode": h[6] || (h[6] = (A) => a.value.newCaptchaCode = A),
274
+ placeholder: m.$t("change.newCaptchaCode")
275
+ }, null, 8, ["captcha-id", "captcha-code", "placeholder"])
276
+ ]),
277
+ _: 1
278
+ })
279
+ ]),
280
+ _: 1
281
+ }),
282
+ d(x, { span: 24 }, {
283
+ default: p(() => [
284
+ d($, { prop: "newValidCode" }, {
285
+ default: p(() => [
286
+ d(ke, {
287
+ name: a.value.newName,
288
+ "validate-field": ["newName", "newCaptchaCode"],
289
+ "captcha-id": a.value.newCaptchaId,
290
+ "captcha-code": a.value.newCaptchaCode,
291
+ "form-ref": n.value,
292
+ placeholder: m.$t("change.newValidCode"),
293
+ modelValue: a.value.newValidCode,
294
+ "onUpdate:modelValue": h[7] || (h[7] = (A) => a.value.newValidCode = A)
295
+ }, null, 8, ["name", "captcha-id", "captcha-code", "form-ref", "placeholder", "modelValue"])
296
+ ]),
297
+ _: 1
298
+ })
299
+ ]),
300
+ _: 1
301
+ })
302
+ ]),
303
+ _: 1
304
+ })
305
+ ]),
306
+ _: 1
307
+ }, 8, ["model", "rules"])
308
+ ]),
309
+ _: 1
310
+ }, 8, ["modelValue"]);
311
+ };
312
+ }
313
+ }), At = { class: "dialog-footer" }, Et = /* @__PURE__ */ B({
314
+ __name: "ChangeWechatBind",
315
+ props: {
316
+ modelValue: { type: Boolean },
317
+ modelModifiers: {}
318
+ },
319
+ emits: /* @__PURE__ */ Se(["next"], ["update:modelValue"]),
320
+ setup(l, { emit: e }) {
321
+ const { t } = Pe(), o = ue(), s = Ae(l, "modelValue");
322
+ function n() {
323
+ s.value && (s.value = !1);
324
+ }
325
+ const a = I(), r = I({
326
+ validCode: ""
327
+ }), u = ct({
328
+ captchaCode: [
329
+ {
330
+ required: !0,
331
+ message: t("change.oldCaptchaCodeRequired"),
332
+ trigger: "blur"
333
+ }
334
+ ],
335
+ validCode: [
336
+ {
337
+ required: !0,
338
+ message: t("change.validCodeRequired"),
339
+ trigger: "blur"
340
+ }
341
+ ]
342
+ }), v = e;
343
+ function _() {
344
+ var c;
345
+ (c = a.value) == null || c.validate((m) => {
346
+ m && v("next", r.value.validCode);
347
+ });
348
+ }
349
+ return (c, m) => {
350
+ const h = w("el-input"), g = w("el-form-item"), $ = w("el-col"), x = w("el-row"), T = w("el-form"), q = w("el-button"), C = w("el-dialog");
351
+ return f(), V(C, {
352
+ modelValue: s.value,
353
+ "onUpdate:modelValue": m[3] || (m[3] = (N) => s.value = N),
354
+ onClose: n
355
+ }, {
356
+ footer: p(() => [
357
+ k("div", At, [
358
+ d(q, { onClick: n }, {
359
+ default: p(() => [
360
+ R(M(c.$t("common.cancel")), 1)
361
+ ]),
362
+ _: 1
363
+ }),
364
+ d(q, {
365
+ type: "primary",
366
+ onClick: _
367
+ }, {
368
+ default: p(() => [
369
+ R(M(c.$t("common.next")), 1)
370
+ ]),
371
+ _: 1
372
+ })
373
+ ])
374
+ ]),
375
+ default: p(() => [
376
+ d(T, {
377
+ ref_key: "formRef",
378
+ ref: a,
379
+ model: r.value,
380
+ rules: i(u),
381
+ size: "large"
382
+ }, {
383
+ default: p(() => [
384
+ d(x, null, {
385
+ default: p(() => [
386
+ d($, { span: 24 }, {
387
+ default: p(() => [
388
+ d(g, null, {
389
+ default: p(() => {
390
+ var N, A;
391
+ return [
392
+ d(h, {
393
+ value: ((N = i(o).user) == null ? void 0 : N.mobilePhoneIns) ?? ((A = i(o).user) == null ? void 0 : A.emailIns),
394
+ placeholder: c.$t("change.name"),
395
+ readonly: ""
396
+ }, null, 8, ["value", "placeholder"])
397
+ ];
398
+ }),
399
+ _: 1
400
+ })
401
+ ]),
402
+ _: 1
403
+ }),
404
+ d($, { span: 24 }, {
405
+ default: p(() => [
406
+ d(g, { prop: "captchaCode" }, {
407
+ default: p(() => [
408
+ d(xe, {
409
+ "captcha-id": r.value.captchaId,
410
+ "onUpdate:captchaId": m[0] || (m[0] = (N) => r.value.captchaId = N),
411
+ "captcha-code": r.value.captchaCode,
412
+ "onUpdate:captchaCode": m[1] || (m[1] = (N) => r.value.captchaCode = N),
413
+ placeholder: c.$t("change.oldCaptchaCode")
414
+ }, null, 8, ["captcha-id", "captcha-code", "placeholder"])
415
+ ]),
416
+ _: 1
417
+ })
418
+ ]),
419
+ _: 1
420
+ }),
421
+ d($, { span: 24 }, {
422
+ default: p(() => [
423
+ d(g, { prop: "validCode" }, {
424
+ default: p(() => {
425
+ var N, A;
426
+ return [
427
+ d(ke, {
428
+ name: ((N = i(o).user) == null ? void 0 : N.mobilePhone) ?? ((A = i(o).user) == null ? void 0 : A.email),
429
+ "validate-field": ["name", "captchaCode"],
430
+ "captcha-id": r.value.captchaId,
431
+ "captcha-code": r.value.captchaCode,
432
+ "form-ref": a.value,
433
+ placeholder: c.$t("change.validCode"),
434
+ modelValue: r.value.validCode,
435
+ "onUpdate:modelValue": m[2] || (m[2] = (L) => r.value.validCode = L)
436
+ }, null, 8, ["name", "captcha-id", "captcha-code", "form-ref", "placeholder", "modelValue"])
437
+ ];
438
+ }),
439
+ _: 1
440
+ })
441
+ ]),
442
+ _: 1
443
+ })
444
+ ]),
445
+ _: 1
446
+ })
447
+ ]),
448
+ _: 1
449
+ }, 8, ["model", "rules"])
450
+ ]),
451
+ _: 1
452
+ }, 8, ["modelValue"]);
453
+ };
454
+ }
455
+ }), Mt = { class: "flex justify-center items-center" }, Pt = ["src"], Lt = { class: "dialog-footer" }, It = /* @__PURE__ */ B({
456
+ __name: "QrCode",
457
+ props: /* @__PURE__ */ Se({
458
+ validCode: {
459
+ type: String,
460
+ required: !0
461
+ }
462
+ }, {
463
+ modelValue: { type: Boolean },
464
+ modelModifiers: {}
465
+ }),
466
+ emits: /* @__PURE__ */ Se(["last"], ["update:modelValue"]),
467
+ setup(l, { emit: e }) {
468
+ const t = ue(), { t: o } = Pe(), s = Ae(l, "modelValue");
469
+ function n() {
470
+ s.value && (s.value = !1);
471
+ }
472
+ const r = I({
473
+ validCode: l.validCode
474
+ }), u = I(!0), v = I({});
475
+ function _() {
476
+ et().then(({ data: g }) => {
477
+ v.value = g, u.value = !1, r.value.ticket = g.ticket, r.value.requestId = Math.random() * 10 + "";
478
+ });
479
+ }
480
+ _();
481
+ const c = e;
482
+ function m() {
483
+ n(), c("last");
484
+ }
485
+ function h() {
486
+ We.wechatBind(r.value).then((g) => {
487
+ g.status === 200 ? (n(), Fe.success(o("change.wechatBindSuccess")), t.getUserInfo()) : m();
488
+ });
489
+ }
490
+ return (g, $) => {
491
+ const x = w("el-button"), T = w("el-dialog"), q = ut("loading");
492
+ return f(), V(T, {
493
+ modelValue: s.value,
494
+ "onUpdate:modelValue": $[0] || ($[0] = (C) => s.value = C),
495
+ onClose: n
496
+ }, {
497
+ footer: p(() => [
498
+ k("div", Lt, [
499
+ d(x, {
500
+ type: "primary",
501
+ onClick: m
502
+ }, {
503
+ default: p(() => [
504
+ R(M(g.$t("common.last")), 1)
505
+ ]),
506
+ _: 1
507
+ }),
508
+ d(x, {
509
+ type: "primary",
510
+ onClick: h
511
+ }, {
512
+ default: p(() => [
513
+ R(M(g.$t("common.confirm")), 1)
514
+ ]),
515
+ _: 1
516
+ })
517
+ ])
518
+ ]),
519
+ default: p(() => [
520
+ Be((f(), S("div", Mt, [
521
+ k("img", {
522
+ style: { width: "320px", height: "320px" },
523
+ src: v.value.qrcodeUrl,
524
+ alt: "二维码"
525
+ }, null, 8, Pt)
526
+ ])), [
527
+ [q, u.value]
528
+ ])
529
+ ]),
530
+ _: 1
531
+ }, 8, ["modelValue"]);
532
+ };
533
+ }
534
+ }), Rt = /* @__PURE__ */ X(It, [["__scopeId", "data-v-4f1f1fd3"]]), Nt = { class: "flex" }, qt = { class: "flex-center h100% p10px" }, Dt = ["src"], Ut = { key: 0 }, Bt = /* @__PURE__ */ B({
535
+ __name: "NavbarRight",
536
+ setup(l) {
537
+ const e = new tt(), t = ne(), o = Te(), s = ue(), n = le();
538
+ he();
539
+ const a = Me(), r = z(() => t.device === ge.MOBILE), u = I(!1), v = I(!1), { isFullscreen: _, toggle: c } = nt(), m = z(
540
+ () => ot.imageUrl(s.user.avatar, 48, 48)
541
+ ), h = (L) => {
542
+ L.target.src = "https://gh.sooyie.cn/v1/file/path/wxapp/images/user/avatar.png";
543
+ };
544
+ function g() {
545
+ v.value = !0;
546
+ }
547
+ function $() {
548
+ Vt.confirm("确定注销并退出系统吗?", "提示", {
549
+ confirmButtonText: "确定",
550
+ cancelButtonText: "取消",
551
+ type: "warning",
552
+ lockScroll: !1
553
+ }).then(() => {
554
+ s.logout().then(() => {
555
+ o.delAllViews();
556
+ }).then(() => {
557
+ a.push("/login");
558
+ });
559
+ });
560
+ }
561
+ const x = I(!1), T = I(!1), q = I(""), C = I(!1);
562
+ function N(L) {
563
+ q.value = L, T.value = !1, C.value = !0;
564
+ }
565
+ function A(L) {
566
+ u.value = L;
567
+ }
568
+ return (L, E) => {
569
+ const ie = de, H = kt, O = w("el-tooltip"), Q = at, oe = w("router-link"), j = w("el-dropdown-item"), Ce = w("el-dropdown-menu"), we = w("el-dropdown");
570
+ return f(), S("div", Nt, [
571
+ i(r) ? P("", !0) : (f(), S(J, { key: 0 }, [
572
+ k("div", {
573
+ class: "setting-item",
574
+ onClick: E[0] || (E[0] = //@ts-ignore
575
+ (...F) => i(c) && i(c)(...F))
576
+ }, [
577
+ d(ie, {
578
+ "icon-class": i(_) ? "fullscreen-exit" : "fullscreen"
579
+ }, null, 8, ["icon-class"])
580
+ ]),
581
+ d(O, {
582
+ content: L.$t("sizeSelect.tooltip"),
583
+ effect: "dark",
584
+ placement: "bottom"
585
+ }, {
586
+ default: p(() => [
587
+ d(H, { class: "setting-item" })
588
+ ]),
589
+ _: 1
590
+ }, 8, ["content"]),
591
+ d(Q, { class: "setting-item" })
592
+ ], 64)),
593
+ d(we, {
594
+ class: "setting-item",
595
+ trigger: "click"
596
+ }, {
597
+ dropdown: p(() => [
598
+ d(Ce, null, {
599
+ default: p(() => [
600
+ d(j, null, {
601
+ default: p(() => [
602
+ d(oe, { to: "/" }, {
603
+ default: p(() => [
604
+ R(M(L.$t("navbar.Dashboard")), 1)
605
+ ]),
606
+ _: 1
607
+ })
608
+ ]),
609
+ _: 1
610
+ }),
611
+ d(j, null, {
612
+ default: p(() => [
613
+ d(oe, { to: "/my/profile" }, {
614
+ default: p(() => [
615
+ R(M(L.$t("navbar.profile")), 1)
616
+ ]),
617
+ _: 1
618
+ })
619
+ ]),
620
+ _: 1
621
+ }),
622
+ d(j, {
623
+ onClick: E[1] || (E[1] = (F) => u.value = !0)
624
+ }, {
625
+ default: p(() => [
626
+ R(M(L.$t("navbar.changePwd")), 1)
627
+ ]),
628
+ _: 1
629
+ }),
630
+ d(j, {
631
+ onClick: E[2] || (E[2] = (F) => x.value = !0)
632
+ }, {
633
+ default: p(() => [
634
+ R(M(L.$t("navbar.changePhoneEmail")), 1)
635
+ ]),
636
+ _: 1
637
+ }),
638
+ d(j, {
639
+ onClick: E[3] || (E[3] = (F) => T.value = !0)
640
+ }, {
641
+ default: p(() => [
642
+ R(M(L.$t("navbar.changeWechatBind")), 1)
643
+ ]),
644
+ _: 1
645
+ }),
646
+ i(e).hasRole("tester") || i(e).userInfo().runAs ? (f(), S("div", Ut, [
647
+ d(j, { onClick: g }, {
648
+ default: p(() => [
649
+ R(M(L.$t("navbar.runAs")), 1)
650
+ ]),
651
+ _: 1
652
+ })
653
+ ])) : P("", !0),
654
+ d(j, {
655
+ divided: "",
656
+ onClick: $
657
+ }, {
658
+ default: p(() => [
659
+ R(M(L.$t("navbar.logout")), 1)
660
+ ]),
661
+ _: 1
662
+ })
663
+ ]),
664
+ _: 1
665
+ })
666
+ ]),
667
+ default: p(() => [
668
+ k("div", qt, [
669
+ k("img", {
670
+ src: i(m),
671
+ class: "rounded-full mr-10px w24px w24px",
672
+ onError: h
673
+ }, null, 40, Dt),
674
+ k("span", null, M(i(s).user.nickName), 1)
675
+ ])
676
+ ]),
677
+ _: 1
678
+ }),
679
+ i(pe).showSettings ? (f(), S("div", {
680
+ key: 1,
681
+ class: "setting-item",
682
+ onClick: E[4] || (E[4] = (F) => i(n).settingsVisible = !0)
683
+ }, [
684
+ d(ie, { "icon-class": "setting" })
685
+ ])) : P("", !0),
686
+ i(u) ? (f(), V(wt, {
687
+ key: 2,
688
+ "pwd-visible": i(u),
689
+ onDialogActionChange: A
690
+ }, null, 8, ["pwd-visible"])) : P("", !0),
691
+ i(v) ? (f(), V(yt, {
692
+ key: 3,
693
+ modelValue: i(v),
694
+ "onUpdate:modelValue": E[5] || (E[5] = (F) => ae(v) ? v.value = F : null)
695
+ }, null, 8, ["modelValue"])) : P("", !0),
696
+ i(x) ? (f(), V(Tt, {
697
+ key: 4,
698
+ width: "400",
699
+ modelValue: i(x),
700
+ "onUpdate:modelValue": E[6] || (E[6] = (F) => ae(x) ? x.value = F : null),
701
+ title: L.$t("navbar.changePhoneEmail")
702
+ }, null, 8, ["modelValue", "title"])) : P("", !0),
703
+ i(T) ? (f(), V(Et, {
704
+ key: 5,
705
+ width: "400",
706
+ modelValue: i(T),
707
+ "onUpdate:modelValue": E[7] || (E[7] = (F) => ae(T) ? T.value = F : null),
708
+ title: L.$t("navbar.changeWechatBind"),
709
+ onNext: N
710
+ }, null, 8, ["modelValue", "title"])) : P("", !0),
711
+ i(C) ? (f(), V(Rt, {
712
+ key: 6,
713
+ width: "400",
714
+ modelValue: i(C),
715
+ "onUpdate:modelValue": E[8] || (E[8] = (F) => ae(C) ? C.value = F : null),
716
+ "valid-code": i(q),
717
+ title: L.$t("change.pleaseScanCode"),
718
+ onLast: E[9] || (E[9] = (F) => T.value = !0)
719
+ }, null, 8, ["modelValue", "valid-code", "title"])) : P("", !0)
720
+ ]);
721
+ };
722
+ }
723
+ }), He = /* @__PURE__ */ X(Bt, [["__scopeId", "data-v-5a598d72"]]);
724
+ function Ot(l) {
725
+ for (var e = [], t = 0; t < l.length; ) {
726
+ var o = l[t];
727
+ if (o === "*" || o === "+" || o === "?") {
728
+ e.push({ type: "MODIFIER", index: t, value: l[t++] });
729
+ continue;
730
+ }
731
+ if (o === "\\") {
732
+ e.push({ type: "ESCAPED_CHAR", index: t++, value: l[t++] });
733
+ continue;
734
+ }
735
+ if (o === "{") {
736
+ e.push({ type: "OPEN", index: t, value: l[t++] });
737
+ continue;
738
+ }
739
+ if (o === "}") {
740
+ e.push({ type: "CLOSE", index: t, value: l[t++] });
741
+ continue;
742
+ }
743
+ if (o === ":") {
744
+ for (var s = "", n = t + 1; n < l.length; ) {
745
+ var a = l.charCodeAt(n);
746
+ if (
747
+ // `0-9`
748
+ a >= 48 && a <= 57 || // `A-Z`
749
+ a >= 65 && a <= 90 || // `a-z`
750
+ a >= 97 && a <= 122 || // `_`
751
+ a === 95
752
+ ) {
753
+ s += l[n++];
754
+ continue;
755
+ }
756
+ break;
757
+ }
758
+ if (!s)
759
+ throw new TypeError("Missing parameter name at ".concat(t));
760
+ e.push({ type: "NAME", index: t, value: s }), t = n;
761
+ continue;
762
+ }
763
+ if (o === "(") {
764
+ var r = 1, u = "", n = t + 1;
765
+ if (l[n] === "?")
766
+ throw new TypeError('Pattern cannot start with "?" at '.concat(n));
767
+ for (; n < l.length; ) {
768
+ if (l[n] === "\\") {
769
+ u += l[n++] + l[n++];
770
+ continue;
771
+ }
772
+ if (l[n] === ")") {
773
+ if (r--, r === 0) {
774
+ n++;
775
+ break;
776
+ }
777
+ } else if (l[n] === "(" && (r++, l[n + 1] !== "?"))
778
+ throw new TypeError("Capturing groups are not allowed at ".concat(n));
779
+ u += l[n++];
780
+ }
781
+ if (r)
782
+ throw new TypeError("Unbalanced pattern at ".concat(t));
783
+ if (!u)
784
+ throw new TypeError("Missing pattern at ".concat(t));
785
+ e.push({ type: "PATTERN", index: t, value: u }), t = n;
786
+ continue;
787
+ }
788
+ e.push({ type: "CHAR", index: t, value: l[t++] });
789
+ }
790
+ return e.push({ type: "END", index: t, value: "" }), e;
791
+ }
792
+ function zt(l, e) {
793
+ e === void 0 && (e = {});
794
+ for (var t = Ot(l), o = e.prefixes, s = o === void 0 ? "./" : o, n = e.delimiter, a = n === void 0 ? "/#?" : n, r = [], u = 0, v = 0, _ = "", c = function(H) {
795
+ if (v < t.length && t[v].type === H)
796
+ return t[v++].value;
797
+ }, m = function(H) {
798
+ var O = c(H);
799
+ if (O !== void 0)
800
+ return O;
801
+ var Q = t[v], oe = Q.type, j = Q.index;
802
+ throw new TypeError("Unexpected ".concat(oe, " at ").concat(j, ", expected ").concat(H));
803
+ }, h = function() {
804
+ for (var H = "", O; O = c("CHAR") || c("ESCAPED_CHAR"); )
805
+ H += O;
806
+ return H;
807
+ }, g = function(H) {
808
+ for (var O = 0, Q = a; O < Q.length; O++) {
809
+ var oe = Q[O];
810
+ if (H.indexOf(oe) > -1)
811
+ return !0;
812
+ }
813
+ return !1;
814
+ }, $ = function(H) {
815
+ var O = r[r.length - 1], Q = H || (O && typeof O == "string" ? O : "");
816
+ if (O && !Q)
817
+ throw new TypeError('Must have text between two parameters, missing text after "'.concat(O.name, '"'));
818
+ return !Q || g(Q) ? "[^".concat(Ve(a), "]+?") : "(?:(?!".concat(Ve(Q), ")[^").concat(Ve(a), "])+?");
819
+ }; v < t.length; ) {
820
+ var x = c("CHAR"), T = c("NAME"), q = c("PATTERN");
821
+ if (T || q) {
822
+ var C = x || "";
823
+ s.indexOf(C) === -1 && (_ += C, C = ""), _ && (r.push(_), _ = ""), r.push({
824
+ name: T || u++,
825
+ prefix: C,
826
+ suffix: "",
827
+ pattern: q || $(C),
828
+ modifier: c("MODIFIER") || ""
829
+ });
830
+ continue;
831
+ }
832
+ var N = x || c("ESCAPED_CHAR");
833
+ if (N) {
834
+ _ += N;
835
+ continue;
836
+ }
837
+ _ && (r.push(_), _ = "");
838
+ var A = c("OPEN");
839
+ if (A) {
840
+ var C = h(), L = c("NAME") || "", E = c("PATTERN") || "", ie = h();
841
+ m("CLOSE"), r.push({
842
+ name: L || (E ? u++ : ""),
843
+ pattern: L && !E ? $(C) : E,
844
+ prefix: C,
845
+ suffix: ie,
846
+ modifier: c("MODIFIER") || ""
847
+ });
848
+ continue;
849
+ }
850
+ m("END");
851
+ }
852
+ return r;
853
+ }
854
+ function Ft(l, e) {
855
+ return Wt(zt(l, e), e);
856
+ }
857
+ function Wt(l, e) {
858
+ e === void 0 && (e = {});
859
+ var t = Ht(e), o = e.encode, s = o === void 0 ? function(u) {
860
+ return u;
861
+ } : o, n = e.validate, a = n === void 0 ? !0 : n, r = l.map(function(u) {
862
+ if (typeof u == "object")
863
+ return new RegExp("^(?:".concat(u.pattern, ")$"), t);
864
+ });
865
+ return function(u) {
866
+ for (var v = "", _ = 0; _ < l.length; _++) {
867
+ var c = l[_];
868
+ if (typeof c == "string") {
869
+ v += c;
870
+ continue;
871
+ }
872
+ var m = u ? u[c.name] : void 0, h = c.modifier === "?" || c.modifier === "*", g = c.modifier === "*" || c.modifier === "+";
873
+ if (Array.isArray(m)) {
874
+ if (!g)
875
+ throw new TypeError('Expected "'.concat(c.name, '" to not repeat, but got an array'));
876
+ if (m.length === 0) {
877
+ if (h)
878
+ continue;
879
+ throw new TypeError('Expected "'.concat(c.name, '" to not be empty'));
880
+ }
881
+ for (var $ = 0; $ < m.length; $++) {
882
+ var x = s(m[$], c);
883
+ if (a && !r[_].test(x))
884
+ throw new TypeError('Expected all "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(x, '"'));
885
+ v += c.prefix + x + c.suffix;
886
+ }
887
+ continue;
888
+ }
889
+ if (typeof m == "string" || typeof m == "number") {
890
+ var x = s(String(m), c);
891
+ if (a && !r[_].test(x))
892
+ throw new TypeError('Expected "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(x, '"'));
893
+ v += c.prefix + x + c.suffix;
894
+ continue;
895
+ }
896
+ if (!h) {
897
+ var T = g ? "an array" : "a string";
898
+ throw new TypeError('Expected "'.concat(c.name, '" to be ').concat(T));
899
+ }
900
+ }
901
+ return v;
902
+ };
903
+ }
904
+ function Ve(l) {
905
+ return l.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
906
+ }
907
+ function Ht(l) {
908
+ return l && l.sensitive ? "" : "i";
909
+ }
910
+ function $e(l) {
911
+ var e, t;
912
+ return be((e = l.name) == null ? void 0 : e.toString(), (t = l.meta) == null ? void 0 : t.title);
913
+ }
914
+ function Kt(l) {
915
+ return be(l.name, l.title);
916
+ }
917
+ function be(l, e) {
918
+ let t = l && l != "" ? l : e;
919
+ return Ne.global.te("route." + t) ? Ne.global.t("route." + t) : e || l;
920
+ }
921
+ const Qt = {
922
+ key: 0,
923
+ class: "color-gray-400"
924
+ }, Xt = ["onClick"], jt = /* @__PURE__ */ B({
925
+ __name: "index",
926
+ setup(l) {
927
+ const e = he(), t = (r) => {
928
+ const { params: u } = e;
929
+ return Ft(r)(u);
930
+ }, o = I([]);
931
+ function s() {
932
+ let r = e.matched.filter(
933
+ (v) => v.meta && v.meta.title
934
+ );
935
+ const u = r[0];
936
+ n(u) || (r = [
937
+ { path: "/dashboard", meta: { title: "Dashboard" } }
938
+ ].concat(r)), o.value = r.filter((v) => v.meta && v.meta.title && v.meta.breadcrumb !== !1);
939
+ }
940
+ function n(r) {
941
+ const u = r && r.name;
942
+ return u ? u.toString().trim().toLocaleLowerCase() === "Dashboard".toLocaleLowerCase() : !1;
943
+ }
944
+ function a(r) {
945
+ const { redirect: u, path: v } = r;
946
+ if (u) {
947
+ qe.value.push(u).catch((_) => {
948
+ console.warn(_);
949
+ });
950
+ return;
951
+ }
952
+ qe.value.push(t(v)).catch((_) => {
953
+ console.warn(_);
954
+ });
955
+ }
956
+ return re(
957
+ () => e.path,
958
+ (r) => {
959
+ r.startsWith("/redirect/") || s();
960
+ }
961
+ ), dt(() => {
962
+ s();
963
+ }), (r, u) => {
964
+ const v = w("el-breadcrumb-item"), _ = w("el-breadcrumb");
965
+ return f(), V(_, { class: "flex-y-center" }, {
966
+ default: p(() => [
967
+ d(ft, { "enter-active-class": "animate__animated animate__fadeInRight" }, {
968
+ default: p(() => [
969
+ (f(!0), S(J, null, fe(i(o), (c, m) => (f(), V(v, {
970
+ key: c.path
971
+ }, {
972
+ default: p(() => [
973
+ c.redirect === "noredirect" || m === i(o).length - 1 ? (f(), S("span", Qt, M(i($e)(c)), 1)) : (f(), S("a", {
974
+ key: 1,
975
+ onClick: me((h) => a(c), ["prevent"])
976
+ }, M(i($e)(c)), 9, Xt))
977
+ ]),
978
+ _: 2
979
+ }, 1024))), 128))
980
+ ]),
981
+ _: 1
982
+ })
983
+ ]),
984
+ _: 1
985
+ });
986
+ };
987
+ }
988
+ }), Gt = /* @__PURE__ */ X(jt, [["__scopeId", "data-v-6109c28e"]]), Yt = /* @__PURE__ */ B({
989
+ __name: "index",
990
+ props: {
991
+ isActive: {
992
+ required: !0,
993
+ type: Boolean,
994
+ default: !1
995
+ }
996
+ },
997
+ emits: ["toggleClick"],
998
+ setup(l, { emit: e }) {
999
+ const t = e;
1000
+ function o() {
1001
+ t("toggleClick");
1002
+ }
1003
+ return (s, n) => {
1004
+ const a = de;
1005
+ return f(), S("div", {
1006
+ class: "px-[15px] flex items-center justify-center color-[var(--el-text-color-regular)]",
1007
+ onClick: o
1008
+ }, [
1009
+ d(a, {
1010
+ class: G(["hamburger", { "is-active": l.isActive }]),
1011
+ "icon-class": "indent-decrease"
1012
+ }, null, 8, ["class"])
1013
+ ]);
1014
+ };
1015
+ }
1016
+ }), Ke = /* @__PURE__ */ X(Yt, [["__scopeId", "data-v-42e37629"]]), Jt = { class: "flex" }, Zt = /* @__PURE__ */ B({
1017
+ __name: "NavbarLeft",
1018
+ setup(l) {
1019
+ const e = ne();
1020
+ function t() {
1021
+ e.toggleSidebar();
1022
+ }
1023
+ return (o, s) => {
1024
+ const n = Ke, a = Gt;
1025
+ return f(), S("div", Jt, [
1026
+ d(n, {
1027
+ "is-active": i(e).sidebar.opened,
1028
+ onToggleClick: t
1029
+ }, null, 8, ["is-active"]),
1030
+ d(a)
1031
+ ]);
1032
+ };
1033
+ }
1034
+ }), en = {}, tn = { class: "navbar-container" };
1035
+ function nn(l, e) {
1036
+ const t = Zt, o = He;
1037
+ return f(), S("div", tn, [
1038
+ d(t),
1039
+ d(o)
1040
+ ]);
1041
+ }
1042
+ const on = /* @__PURE__ */ X(en, [["render", nn], ["__scopeId", "data-v-b1624593"]]);
1043
+ var te = /* @__PURE__ */ ((l) => (l.LEFT = "left", l.TOP = "top", l.MIX = "mix", l))(te || {});
1044
+ const an = { class: "flex flex-wrap justify-around w-full h-12" }, ln = /* @__PURE__ */ B({
1045
+ __name: "LayoutSelect",
1046
+ props: {
1047
+ modelValue: String
1048
+ },
1049
+ emits: ["update:modelValue"],
1050
+ setup(l, { emit: e }) {
1051
+ const t = e;
1052
+ function o(s) {
1053
+ t("update:modelValue", s);
1054
+ }
1055
+ return (s, n) => {
1056
+ const a = w("el-tooltip");
1057
+ return f(), S("div", an, [
1058
+ d(a, {
1059
+ content: "左侧模式",
1060
+ placement: "bottom"
1061
+ }, {
1062
+ default: p(() => [
1063
+ k("div", {
1064
+ class: G(["layout-item left", { "is-active": l.modelValue === i(te).LEFT }]),
1065
+ onClick: n[0] || (n[0] = (r) => o(i(te).LEFT))
1066
+ }, n[3] || (n[3] = [
1067
+ k("div", null, null, -1),
1068
+ k("div", null, null, -1)
1069
+ ]), 2)
1070
+ ]),
1071
+ _: 1
1072
+ }),
1073
+ d(a, {
1074
+ content: "顶部模式",
1075
+ placement: "bottom"
1076
+ }, {
1077
+ default: p(() => [
1078
+ k("div", {
1079
+ class: G(["layout-item top", { "is-active": l.modelValue === i(te).TOP }]),
1080
+ onClick: n[1] || (n[1] = (r) => o(i(te).TOP))
1081
+ }, n[4] || (n[4] = [
1082
+ k("div", null, null, -1),
1083
+ k("div", null, null, -1)
1084
+ ]), 2)
1085
+ ]),
1086
+ _: 1
1087
+ }),
1088
+ d(a, {
1089
+ content: "混合模式",
1090
+ placement: "bottom"
1091
+ }, {
1092
+ default: p(() => [
1093
+ k("div", {
1094
+ class: G(["layout-item mix", { "is-active": l.modelValue === i(te).MIX }]),
1095
+ onClick: n[2] || (n[2] = (r) => o(i(te).MIX))
1096
+ }, n[5] || (n[5] = [
1097
+ k("div", null, null, -1),
1098
+ k("div", null, null, -1)
1099
+ ]), 2)
1100
+ ]),
1101
+ _: 1
1102
+ })
1103
+ ]);
1104
+ };
1105
+ }
1106
+ }), rn = /* @__PURE__ */ X(ln, [["__scopeId", "data-v-2bdf1403"]]), sn = /* @__PURE__ */ B({
1107
+ __name: "ThemeColorPicker",
1108
+ props: {
1109
+ modelValue: String
1110
+ },
1111
+ emits: ["update:modelValue"],
1112
+ setup(l, { emit: e }) {
1113
+ const t = l, o = e, s = [
1114
+ "#409EFF",
1115
+ "#ff4500",
1116
+ "#ff8c00",
1117
+ "#90ee90",
1118
+ "#00ced1",
1119
+ "#1e90ff",
1120
+ "#c71585",
1121
+ "rgba(255, 69, 0, 0.68)",
1122
+ "rgb(255, 120, 0)",
1123
+ "hsva(120, 40, 94)"
1124
+ ], n = I(t.modelValue);
1125
+ return re(n, (a) => {
1126
+ o("update:modelValue", a);
1127
+ }), (a, r) => {
1128
+ const u = w("el-color-picker");
1129
+ return f(), V(u, {
1130
+ modelValue: i(n),
1131
+ "onUpdate:modelValue": r[0] || (r[0] = (v) => ae(n) ? n.value = v : null),
1132
+ predefine: s,
1133
+ "popper-class": "theme-picker-dropdown"
1134
+ }, null, 8, ["modelValue"]);
1135
+ };
1136
+ }
1137
+ }), cn = /* @__PURE__ */ X(sn, [["__scopeId", "data-v-92c1fd79"]]), un = { class: "flex-center" }, dn = { class: "settings-option" }, fn = { class: "text-xs" }, mn = { class: "settings-option" }, pn = { class: "text-xs" }, vn = { class: "settings-option" }, _n = { class: "text-xs" }, hn = { class: "settings-option" }, gn = { class: "text-xs" }, bn = { class: "settings-option" }, Cn = { class: "text-xs" }, wn = /* @__PURE__ */ B({
1138
+ __name: "index",
1139
+ setup(l) {
1140
+ const e = he(), t = ne(), o = le(), s = _e(), n = z({
1141
+ get() {
1142
+ return o.settingsVisible;
1143
+ },
1144
+ set() {
1145
+ o.settingsVisible = !1;
1146
+ }
1147
+ });
1148
+ function a(m) {
1149
+ o.changeThemeColor(m);
1150
+ }
1151
+ const r = I(o.theme === ye.DARK), u = (m) => {
1152
+ r.value = m, o.changeTheme(r.value ? ye.DARK : ye.LIGHT);
1153
+ };
1154
+ function v(m) {
1155
+ o.changeLayout(m), m === te.MIX ? e.name && _(e.name) : m === te.TOP && t.openSideBar();
1156
+ }
1157
+ function _(m) {
1158
+ const h = c(s.routes, m);
1159
+ t.activeTopMenu !== h.path && t.activeTopMenu(h.path);
1160
+ }
1161
+ function c(m, h) {
1162
+ let g = {};
1163
+ function $(T, q) {
1164
+ if (g[T.name] = q, T.children)
1165
+ for (let C = 0; C < T.children.length; C++)
1166
+ $(T.children[C], T);
1167
+ }
1168
+ for (let T = 0; T < m.length; T++)
1169
+ $(m[T], null);
1170
+ let x = g[h];
1171
+ for (; x; ) {
1172
+ if (!g[x.name])
1173
+ return x;
1174
+ x = g[x.name];
1175
+ }
1176
+ return null;
1177
+ }
1178
+ return (m, h) => {
1179
+ const g = w("el-divider"), $ = w("el-switch"), x = cn, T = rn, q = w("el-drawer");
1180
+ return f(), V(q, {
1181
+ modelValue: i(n),
1182
+ "onUpdate:modelValue": h[7] || (h[7] = (C) => ae(n) ? n.value = C : null),
1183
+ size: "300",
1184
+ title: m.$t("settings.project")
1185
+ }, {
1186
+ default: p(() => [
1187
+ d(g, null, {
1188
+ default: p(() => [
1189
+ R(M(m.$t("settings.theme")), 1)
1190
+ ]),
1191
+ _: 1
1192
+ }),
1193
+ k("div", un, [
1194
+ d($, {
1195
+ modelValue: i(r),
1196
+ "onUpdate:modelValue": h[0] || (h[0] = (C) => ae(r) ? r.value = C : null),
1197
+ "active-icon": i(it),
1198
+ "inactive-icon": i(lt),
1199
+ onChange: u
1200
+ }, null, 8, ["modelValue", "active-icon", "inactive-icon"])
1201
+ ]),
1202
+ d(g, null, {
1203
+ default: p(() => [
1204
+ R(M(m.$t("settings.interface")), 1)
1205
+ ]),
1206
+ _: 1
1207
+ }),
1208
+ k("div", dn, [
1209
+ k("span", fn, M(m.$t("settings.themeColor")), 1),
1210
+ d(x, {
1211
+ modelValue: i(o).themeColor,
1212
+ "onUpdate:modelValue": [
1213
+ h[1] || (h[1] = (C) => i(o).themeColor = C),
1214
+ a
1215
+ ]
1216
+ }, null, 8, ["modelValue"])
1217
+ ]),
1218
+ k("div", mn, [
1219
+ k("span", pn, M(m.$t("settings.tagsView")), 1),
1220
+ d($, {
1221
+ modelValue: i(o).tagsView,
1222
+ "onUpdate:modelValue": h[2] || (h[2] = (C) => i(o).tagsView = C)
1223
+ }, null, 8, ["modelValue"])
1224
+ ]),
1225
+ k("div", vn, [
1226
+ k("span", _n, M(m.$t("settings.fixedHeader")), 1),
1227
+ d($, {
1228
+ modelValue: i(o).fixedHeader,
1229
+ "onUpdate:modelValue": h[3] || (h[3] = (C) => i(o).fixedHeader = C)
1230
+ }, null, 8, ["modelValue"])
1231
+ ]),
1232
+ k("div", hn, [
1233
+ k("span", gn, M(m.$t("settings.sidebarLogo")), 1),
1234
+ d($, {
1235
+ modelValue: i(o).sidebarLogo,
1236
+ "onUpdate:modelValue": h[4] || (h[4] = (C) => i(o).sidebarLogo = C)
1237
+ }, null, 8, ["modelValue"])
1238
+ ]),
1239
+ k("div", bn, [
1240
+ k("span", Cn, M(m.$t("settings.watermark")), 1),
1241
+ d($, {
1242
+ modelValue: i(o).watermarkEnabled,
1243
+ "onUpdate:modelValue": h[5] || (h[5] = (C) => i(o).watermarkEnabled = C)
1244
+ }, null, 8, ["modelValue"])
1245
+ ]),
1246
+ d(g, null, {
1247
+ default: p(() => [
1248
+ R(M(m.$t("settings.navigation")), 1)
1249
+ ]),
1250
+ _: 1
1251
+ }),
1252
+ d(T, {
1253
+ modelValue: i(o).layout,
1254
+ "onUpdate:modelValue": [
1255
+ h[6] || (h[6] = (C) => i(o).layout = C),
1256
+ v
1257
+ ]
1258
+ }, null, 8, ["modelValue"])
1259
+ ]),
1260
+ _: 1
1261
+ }, 8, ["modelValue", "title"]);
1262
+ };
1263
+ }
1264
+ }), yn = /* @__PURE__ */ X(wn, [["__scopeId", "data-v-70f5bf10"]]), Vn = { class: "app-main" }, xn = /* @__PURE__ */ B({
1265
+ __name: "index",
1266
+ setup(l) {
1267
+ const e = z(() => Te().cachedViews);
1268
+ return (t, o) => {
1269
+ const s = w("router-view");
1270
+ return f(), S("section", Vn, [
1271
+ d(s, null, {
1272
+ default: p(({ Component: n, route: a }) => [
1273
+ d(Oe, {
1274
+ "enter-active-class": "animate__animated animate__fadeIn",
1275
+ mode: "out-in"
1276
+ }, {
1277
+ default: p(() => [
1278
+ (f(), V(mt, {
1279
+ include: i(e),
1280
+ max: 9
1281
+ }, [
1282
+ (f(), V(Ee(n), {
1283
+ key: a.path
1284
+ }))
1285
+ ], 1032, ["include"]))
1286
+ ]),
1287
+ _: 2
1288
+ }, 1024)
1289
+ ]),
1290
+ _: 1
1291
+ })
1292
+ ]);
1293
+ };
1294
+ }
1295
+ }), kn = /* @__PURE__ */ X(xn, [["__scopeId", "data-v-f32946ce"]]), Sn = {
1296
+ viewBox: "0 0 1024 1024",
1297
+ width: "1.2em",
1298
+ height: "1.2em"
1299
+ };
1300
+ function $n(l, e) {
1301
+ return f(), S("svg", Sn, e[0] || (e[0] = [
1302
+ k("path", {
1303
+ fill: "currentColor",
1304
+ d: "M764.288 214.592L512 466.88L259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512L214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
1305
+ }, null, -1)
1306
+ ]));
1307
+ }
1308
+ const Tn = { name: "ep-close", render: $n };
1309
+ function ee(l) {
1310
+ if (typeof l != "string")
1311
+ throw new TypeError("Path must be a string. Received " + JSON.stringify(l));
1312
+ }
1313
+ function Ue(l, e) {
1314
+ for (var t = "", o = 0, s = -1, n = 0, a, r = 0; r <= l.length; ++r) {
1315
+ if (r < l.length)
1316
+ a = l.charCodeAt(r);
1317
+ else {
1318
+ if (a === 47)
1319
+ break;
1320
+ a = 47;
1321
+ }
1322
+ if (a === 47) {
1323
+ if (!(s === r - 1 || n === 1)) if (s !== r - 1 && n === 2) {
1324
+ if (t.length < 2 || o !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) {
1325
+ if (t.length > 2) {
1326
+ var u = t.lastIndexOf("/");
1327
+ if (u !== t.length - 1) {
1328
+ u === -1 ? (t = "", o = 0) : (t = t.slice(0, u), o = t.length - 1 - t.lastIndexOf("/")), s = r, n = 0;
1329
+ continue;
1330
+ }
1331
+ } else if (t.length === 2 || t.length === 1) {
1332
+ t = "", o = 0, s = r, n = 0;
1333
+ continue;
1334
+ }
1335
+ }
1336
+ e && (t.length > 0 ? t += "/.." : t = "..", o = 2);
1337
+ } else
1338
+ t.length > 0 ? t += "/" + l.slice(s + 1, r) : t = l.slice(s + 1, r), o = r - s - 1;
1339
+ s = r, n = 0;
1340
+ } else a === 46 && n !== -1 ? ++n : n = -1;
1341
+ }
1342
+ return t;
1343
+ }
1344
+ function An(l, e) {
1345
+ var t = e.dir || e.root, o = e.base || (e.name || "") + (e.ext || "");
1346
+ return t ? t === e.root ? t + o : t + l + o : o;
1347
+ }
1348
+ var se = {
1349
+ // path.resolve([from ...], to)
1350
+ resolve: function() {
1351
+ for (var e = "", t = !1, o, s = arguments.length - 1; s >= -1 && !t; s--) {
1352
+ var n;
1353
+ s >= 0 ? n = arguments[s] : (o === void 0 && (o = process.cwd()), n = o), ee(n), n.length !== 0 && (e = n + "/" + e, t = n.charCodeAt(0) === 47);
1354
+ }
1355
+ return e = Ue(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
1356
+ },
1357
+ normalize: function(e) {
1358
+ if (ee(e), e.length === 0) return ".";
1359
+ var t = e.charCodeAt(0) === 47, o = e.charCodeAt(e.length - 1) === 47;
1360
+ return e = Ue(e, !t), e.length === 0 && !t && (e = "."), e.length > 0 && o && (e += "/"), t ? "/" + e : e;
1361
+ },
1362
+ isAbsolute: function(e) {
1363
+ return ee(e), e.length > 0 && e.charCodeAt(0) === 47;
1364
+ },
1365
+ join: function() {
1366
+ if (arguments.length === 0)
1367
+ return ".";
1368
+ for (var e, t = 0; t < arguments.length; ++t) {
1369
+ var o = arguments[t];
1370
+ ee(o), o.length > 0 && (e === void 0 ? e = o : e += "/" + o);
1371
+ }
1372
+ return e === void 0 ? "." : se.normalize(e);
1373
+ },
1374
+ relative: function(e, t) {
1375
+ if (ee(e), ee(t), e === t || (e = se.resolve(e), t = se.resolve(t), e === t)) return "";
1376
+ for (var o = 1; o < e.length && e.charCodeAt(o) === 47; ++o)
1377
+ ;
1378
+ for (var s = e.length, n = s - o, a = 1; a < t.length && t.charCodeAt(a) === 47; ++a)
1379
+ ;
1380
+ for (var r = t.length, u = r - a, v = n < u ? n : u, _ = -1, c = 0; c <= v; ++c) {
1381
+ if (c === v) {
1382
+ if (u > v) {
1383
+ if (t.charCodeAt(a + c) === 47)
1384
+ return t.slice(a + c + 1);
1385
+ if (c === 0)
1386
+ return t.slice(a + c);
1387
+ } else n > v && (e.charCodeAt(o + c) === 47 ? _ = c : c === 0 && (_ = 0));
1388
+ break;
1389
+ }
1390
+ var m = e.charCodeAt(o + c), h = t.charCodeAt(a + c);
1391
+ if (m !== h)
1392
+ break;
1393
+ m === 47 && (_ = c);
1394
+ }
1395
+ var g = "";
1396
+ for (c = o + _ + 1; c <= s; ++c)
1397
+ (c === s || e.charCodeAt(c) === 47) && (g.length === 0 ? g += ".." : g += "/..");
1398
+ return g.length > 0 ? g + t.slice(a + _) : (a += _, t.charCodeAt(a) === 47 && ++a, t.slice(a));
1399
+ },
1400
+ _makeLong: function(e) {
1401
+ return e;
1402
+ },
1403
+ dirname: function(e) {
1404
+ if (ee(e), e.length === 0) return ".";
1405
+ for (var t = e.charCodeAt(0), o = t === 47, s = -1, n = !0, a = e.length - 1; a >= 1; --a)
1406
+ if (t = e.charCodeAt(a), t === 47) {
1407
+ if (!n) {
1408
+ s = a;
1409
+ break;
1410
+ }
1411
+ } else
1412
+ n = !1;
1413
+ return s === -1 ? o ? "/" : "." : o && s === 1 ? "//" : e.slice(0, s);
1414
+ },
1415
+ basename: function(e, t) {
1416
+ if (t !== void 0 && typeof t != "string") throw new TypeError('"ext" argument must be a string');
1417
+ ee(e);
1418
+ var o = 0, s = -1, n = !0, a;
1419
+ if (t !== void 0 && t.length > 0 && t.length <= e.length) {
1420
+ if (t.length === e.length && t === e) return "";
1421
+ var r = t.length - 1, u = -1;
1422
+ for (a = e.length - 1; a >= 0; --a) {
1423
+ var v = e.charCodeAt(a);
1424
+ if (v === 47) {
1425
+ if (!n) {
1426
+ o = a + 1;
1427
+ break;
1428
+ }
1429
+ } else
1430
+ u === -1 && (n = !1, u = a + 1), r >= 0 && (v === t.charCodeAt(r) ? --r === -1 && (s = a) : (r = -1, s = u));
1431
+ }
1432
+ return o === s ? s = u : s === -1 && (s = e.length), e.slice(o, s);
1433
+ } else {
1434
+ for (a = e.length - 1; a >= 0; --a)
1435
+ if (e.charCodeAt(a) === 47) {
1436
+ if (!n) {
1437
+ o = a + 1;
1438
+ break;
1439
+ }
1440
+ } else s === -1 && (n = !1, s = a + 1);
1441
+ return s === -1 ? "" : e.slice(o, s);
1442
+ }
1443
+ },
1444
+ extname: function(e) {
1445
+ ee(e);
1446
+ for (var t = -1, o = 0, s = -1, n = !0, a = 0, r = e.length - 1; r >= 0; --r) {
1447
+ var u = e.charCodeAt(r);
1448
+ if (u === 47) {
1449
+ if (!n) {
1450
+ o = r + 1;
1451
+ break;
1452
+ }
1453
+ continue;
1454
+ }
1455
+ s === -1 && (n = !1, s = r + 1), u === 46 ? t === -1 ? t = r : a !== 1 && (a = 1) : t !== -1 && (a = -1);
1456
+ }
1457
+ return t === -1 || s === -1 || // We saw a non-dot character immediately before the dot
1458
+ a === 0 || // The (right-most) trimmed path component is exactly '..'
1459
+ a === 1 && t === s - 1 && t === o + 1 ? "" : e.slice(t, s);
1460
+ },
1461
+ format: function(e) {
1462
+ if (e === null || typeof e != "object")
1463
+ throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
1464
+ return An("/", e);
1465
+ },
1466
+ parse: function(e) {
1467
+ ee(e);
1468
+ var t = { root: "", dir: "", base: "", ext: "", name: "" };
1469
+ if (e.length === 0) return t;
1470
+ var o = e.charCodeAt(0), s = o === 47, n;
1471
+ s ? (t.root = "/", n = 1) : n = 0;
1472
+ for (var a = -1, r = 0, u = -1, v = !0, _ = e.length - 1, c = 0; _ >= n; --_) {
1473
+ if (o = e.charCodeAt(_), o === 47) {
1474
+ if (!v) {
1475
+ r = _ + 1;
1476
+ break;
1477
+ }
1478
+ continue;
1479
+ }
1480
+ u === -1 && (v = !1, u = _ + 1), o === 46 ? a === -1 ? a = _ : c !== 1 && (c = 1) : a !== -1 && (c = -1);
1481
+ }
1482
+ return a === -1 || u === -1 || // We saw a non-dot character immediately before the dot
1483
+ c === 0 || // The (right-most) trimmed path component is exactly '..'
1484
+ c === 1 && a === u - 1 && a === r + 1 ? u !== -1 && (r === 0 && s ? t.base = t.name = e.slice(1, u) : t.base = t.name = e.slice(r, u)) : (r === 0 && s ? (t.name = e.slice(1, a), t.base = e.slice(1, u)) : (t.name = e.slice(r, a), t.base = e.slice(r, u)), t.ext = e.slice(a, u)), r > 0 ? t.dir = e.slice(0, r - 1) : s && (t.dir = "/"), t;
1485
+ },
1486
+ sep: "/",
1487
+ delimiter: ":",
1488
+ win32: null,
1489
+ posix: null
1490
+ };
1491
+ se.posix = se;
1492
+ var Qe = se;
1493
+ const Xe = /* @__PURE__ */ rt(Qe), En = { class: "tags-container" }, Mn = /* @__PURE__ */ B({
1494
+ __name: "index",
1495
+ setup(l) {
1496
+ const { proxy: e } = pt(), t = Me(), o = he(), s = _e(), n = Te(), a = ne(), { visitedViews: r } = xt(n), u = le(), v = z(() => u.layout), _ = I({
1497
+ path: "",
1498
+ query: "",
1499
+ fullPath: "",
1500
+ name: "",
1501
+ title: "",
1502
+ affix: !1,
1503
+ keepAlive: !1
1504
+ }), c = I([]), m = I(0), h = I(0);
1505
+ re(
1506
+ o,
1507
+ () => {
1508
+ T(), q();
1509
+ },
1510
+ {
1511
+ immediate: !0
1512
+ //初始化立即执行
1513
+ }
1514
+ );
1515
+ const g = I(!1);
1516
+ re(g, (y) => {
1517
+ y ? document.body.addEventListener("click", j) : document.body.removeEventListener("click", j);
1518
+ });
1519
+ function $(y, b = "/") {
1520
+ let K = [];
1521
+ return y.forEach((W) => {
1522
+ var D, U, Z, Le;
1523
+ const Y = Qe.resolve(b, W.path);
1524
+ if ((D = W.meta) != null && D.affix && K.push({
1525
+ path: Y,
1526
+ fullPath: Y,
1527
+ name: String(W.name),
1528
+ title: ((U = W.meta) == null ? void 0 : U.title) || "no-name",
1529
+ affix: (Z = W.meta) == null ? void 0 : Z.affix,
1530
+ keepAlive: (Le = W.meta) == null ? void 0 : Le.keepAlive
1531
+ }), W.children) {
1532
+ const Ie = $(W.children, b + W.path);
1533
+ Ie.length >= 1 && (K = [...K, ...Ie]);
1534
+ }
1535
+ }), K;
1536
+ }
1537
+ function x() {
1538
+ const y = $(s.routes);
1539
+ c.value = y;
1540
+ for (const b of y)
1541
+ b.name && n.addVisitedView(b);
1542
+ }
1543
+ function T() {
1544
+ var y, b;
1545
+ o.meta.title && n.addView({
1546
+ name: o.name,
1547
+ title: o.meta.title,
1548
+ path: o.path,
1549
+ fullPath: o.fullPath,
1550
+ affix: (y = o.meta) == null ? void 0 : y.affix,
1551
+ keepAlive: (b = o.meta) == null ? void 0 : b.keepAlive,
1552
+ query: o.query
1553
+ });
1554
+ }
1555
+ function q() {
1556
+ De(() => {
1557
+ var y, b;
1558
+ for (const K of r.value)
1559
+ K.path === o.path && K.fullPath !== o.fullPath && n.updateVisitedView({
1560
+ name: o.name,
1561
+ title: o.meta.title || "",
1562
+ path: o.path,
1563
+ fullPath: o.fullPath,
1564
+ affix: (y = o.meta) == null ? void 0 : y.affix,
1565
+ keepAlive: (b = o.meta) == null ? void 0 : b.keepAlive,
1566
+ query: o.query
1567
+ });
1568
+ });
1569
+ }
1570
+ function C(y) {
1571
+ return y == null ? void 0 : y.affix;
1572
+ }
1573
+ function N() {
1574
+ return n.visitedViews.length <= 1 ? !1 : _.value.path === "/dashboard" || _.value.fullPath === n.visitedViews[1].fullPath;
1575
+ }
1576
+ function A() {
1577
+ return n.visitedViews.length <= 1 ? !1 : _.value.fullPath === n.visitedViews[n.visitedViews.length - 1].fullPath;
1578
+ }
1579
+ function L(y) {
1580
+ n.delCachedView(y);
1581
+ const { fullPath: b } = y;
1582
+ De(() => {
1583
+ t.replace({ path: "/redirect" + b });
1584
+ });
1585
+ }
1586
+ function E(y) {
1587
+ n.delView(y).then((b) => {
1588
+ n.isActive(y) && n.toLastView(b.visitedViews, y);
1589
+ });
1590
+ }
1591
+ function ie() {
1592
+ n.delLeftViews(_.value).then((y) => {
1593
+ y.visitedViews.find((b) => b.path === o.path) || n.toLastView(y.visitedViews);
1594
+ });
1595
+ }
1596
+ function H() {
1597
+ n.delRightViews(_.value).then((y) => {
1598
+ y.visitedViews.find((b) => b.path === o.path) || n.toLastView(y.visitedViews);
1599
+ });
1600
+ }
1601
+ function O() {
1602
+ t.push(_.value), n.delOtherViews(_.value).then(() => {
1603
+ q();
1604
+ });
1605
+ }
1606
+ function Q(y) {
1607
+ n.delAllViews().then((b) => {
1608
+ n.toLastView(b.visitedViews, y);
1609
+ });
1610
+ }
1611
+ function oe(y, b) {
1612
+ const W = e == null ? void 0 : e.$el.getBoundingClientRect().left, D = (e == null ? void 0 : e.$el.offsetWidth) - 105, U = b.clientX - W + 15;
1613
+ U > D ? m.value = D : m.value = U, v.value === "mix" ? h.value = b.clientY - 50 : h.value = b.clientY, g.value = !0, _.value = y;
1614
+ }
1615
+ function j() {
1616
+ g.value = !1;
1617
+ }
1618
+ function Ce() {
1619
+ j();
1620
+ }
1621
+ function we(y, b) {
1622
+ let K = {};
1623
+ function W(D, U) {
1624
+ if (K[D.name] = U, D.children)
1625
+ for (let Z = 0; Z < D.children.length; Z++)
1626
+ W(D.children[Z], D);
1627
+ }
1628
+ for (let D = 0; D < y.length; D++)
1629
+ W(y[D], null);
1630
+ let Y = K[b];
1631
+ for (; Y; ) {
1632
+ if (!K[Y.name])
1633
+ return Y;
1634
+ Y = K[Y.name];
1635
+ }
1636
+ return null;
1637
+ }
1638
+ const F = (y) => {
1639
+ if (v.value !== "mix") return;
1640
+ const b = we(s.routes, y);
1641
+ a.activeTopMenu !== b.path && a.activeTopMenu(b.path);
1642
+ };
1643
+ return re(
1644
+ () => o.name,
1645
+ (y) => {
1646
+ y && F(y);
1647
+ },
1648
+ {
1649
+ deep: !0
1650
+ }
1651
+ ), ze(() => {
1652
+ x();
1653
+ }), (y, b) => {
1654
+ const K = Tn, W = w("router-link"), Y = w("el-scrollbar"), D = de;
1655
+ return f(), S("div", En, [
1656
+ d(Y, {
1657
+ class: "scroll-container",
1658
+ vertical: !1,
1659
+ onWheel: me(Ce, ["prevent"])
1660
+ }, {
1661
+ default: p(() => [
1662
+ (f(!0), S(J, null, fe(i(r), (U) => (f(), V(W, {
1663
+ ref_for: !0,
1664
+ ref: "tagRef",
1665
+ key: U.fullPath,
1666
+ class: G("tags-item " + (i(n).isActive(U) ? "active" : "")),
1667
+ to: { path: U.path, query: U.query },
1668
+ onMouseup: me((Z) => C(U) ? "" : E(U), ["middle"]),
1669
+ onContextmenu: me((Z) => oe(U, Z), ["prevent"])
1670
+ }, {
1671
+ default: p(() => [
1672
+ R(M(i(Kt)(U)) + " ", 1),
1673
+ C(U) ? P("", !0) : (f(), V(K, {
1674
+ key: 0,
1675
+ class: "close-icon",
1676
+ size: "12px",
1677
+ onClick: me((Z) => E(U), ["prevent", "stop"])
1678
+ }, null, 8, ["onClick"]))
1679
+ ]),
1680
+ _: 2
1681
+ }, 1032, ["class", "to", "onMouseup", "onContextmenu"]))), 128))
1682
+ ]),
1683
+ _: 1
1684
+ }),
1685
+ Be(k("ul", {
1686
+ class: "contextmenu",
1687
+ style: vt({ left: i(m) + "px", top: i(h) + "px" })
1688
+ }, [
1689
+ k("li", {
1690
+ onClick: b[0] || (b[0] = (U) => L(i(_)))
1691
+ }, [
1692
+ d(D, { "icon-class": "refresh" }),
1693
+ b[3] || (b[3] = R(" 刷新 "))
1694
+ ]),
1695
+ C(i(_)) ? P("", !0) : (f(), S("li", {
1696
+ key: 0,
1697
+ onClick: b[1] || (b[1] = (U) => E(i(_)))
1698
+ }, [
1699
+ d(D, { "icon-class": "close" }),
1700
+ b[4] || (b[4] = R(" 关闭 "))
1701
+ ])),
1702
+ k("li", { onClick: O }, [
1703
+ d(D, { "icon-class": "close_other" }),
1704
+ b[5] || (b[5] = R(" 关闭其它 "))
1705
+ ]),
1706
+ N() ? P("", !0) : (f(), S("li", {
1707
+ key: 1,
1708
+ onClick: ie
1709
+ }, [
1710
+ d(D, { "icon-class": "close_left" }),
1711
+ b[6] || (b[6] = R(" 关闭左侧 "))
1712
+ ])),
1713
+ A() ? P("", !0) : (f(), S("li", {
1714
+ key: 2,
1715
+ onClick: H
1716
+ }, [
1717
+ d(D, { "icon-class": "close_right" }),
1718
+ b[7] || (b[7] = R(" 关闭右侧 "))
1719
+ ])),
1720
+ k("li", {
1721
+ onClick: b[2] || (b[2] = (U) => Q(i(_)))
1722
+ }, [
1723
+ d(D, { "icon-class": "close_all" }),
1724
+ b[8] || (b[8] = R(" 关闭所有 "))
1725
+ ])
1726
+ ], 4), [
1727
+ [_t, i(g)]
1728
+ ])
1729
+ ]);
1730
+ };
1731
+ }
1732
+ }), Pn = /* @__PURE__ */ X(Mn, [["__scopeId", "data-v-77bfe9a5"]]), Ln = /* @__PURE__ */ B({
1733
+ name: "AppLink",
1734
+ inheritAttrs: !1,
1735
+ __name: "index",
1736
+ props: {
1737
+ to: {
1738
+ type: String,
1739
+ required: !0
1740
+ }
1741
+ },
1742
+ setup(l) {
1743
+ const e = l, t = z(() => ve(e.to)), o = z(() => t.value ? "a" : "router-link"), s = (n) => t.value ? { href: n, target: "_blank", rel: "noopener noreferrer" } : { to: n };
1744
+ return (n, a) => (f(), V(Ee(i(o)), ht(gt(s(l.to))), {
1745
+ default: p(() => [
1746
+ bt(n.$slots, "default")
1747
+ ]),
1748
+ _: 3
1749
+ }, 16));
1750
+ }
1751
+ }), In = {
1752
+ key: 3,
1753
+ class: "ml-1"
1754
+ }, Rn = /* @__PURE__ */ B({
1755
+ __name: "SidebarMenuItemTitle",
1756
+ props: {
1757
+ icon: {
1758
+ type: String,
1759
+ default: ""
1760
+ },
1761
+ name: {
1762
+ type: String,
1763
+ default: ""
1764
+ },
1765
+ title: {
1766
+ type: String,
1767
+ default: ""
1768
+ }
1769
+ },
1770
+ setup(l) {
1771
+ return (e, t) => {
1772
+ const o = w("el-icon"), s = de;
1773
+ return f(), S(J, null, [
1774
+ l.icon && l.icon.startsWith("el-icon") ? (f(), V(o, {
1775
+ key: 0,
1776
+ class: "sub-el-icon"
1777
+ }, {
1778
+ default: p(() => [
1779
+ (f(), V(Ee(l.icon.replace("el-icon-", ""))))
1780
+ ]),
1781
+ _: 1
1782
+ })) : l.icon ? (f(), V(s, {
1783
+ key: 1,
1784
+ "icon-class": l.icon
1785
+ }, null, 8, ["icon-class"])) : (f(), V(s, {
1786
+ key: 2,
1787
+ "icon-class": "menu"
1788
+ })),
1789
+ l.title ? (f(), S("span", In, M(i(be)(l.name, l.title)), 1)) : P("", !0)
1790
+ ], 64);
1791
+ };
1792
+ }
1793
+ }), Nn = /* @__PURE__ */ X(Rn, [["__scopeId", "data-v-992a058f"]]), qn = { key: 0 }, Dn = /* @__PURE__ */ B({
1794
+ name: "SidebarMenuItem",
1795
+ inheritAttrs: !1,
1796
+ __name: "SidebarMenuItem",
1797
+ props: {
1798
+ /**
1799
+ * 路由(eg:user)
1800
+ */
1801
+ item: {
1802
+ type: Object,
1803
+ required: !0
1804
+ },
1805
+ /**
1806
+ * 父层级完整路由路径(eg:/system)
1807
+ */
1808
+ basePath: {
1809
+ type: String,
1810
+ required: !0
1811
+ },
1812
+ isNest: {
1813
+ type: Boolean,
1814
+ default: !1
1815
+ }
1816
+ },
1817
+ setup(l) {
1818
+ const e = l, t = I();
1819
+ function o(n = [], a) {
1820
+ const r = n.filter((u) => {
1821
+ var v;
1822
+ return (v = u.meta) != null && v.hidden ? !1 : (u.meta.hidden = !1, t.value = u, !0);
1823
+ });
1824
+ return r.length === 1 ? !0 : r.length === 0 ? (t.value = { ...a, path: "", noShowingChildren: !0 }, !0) : !1;
1825
+ }
1826
+ function s(n) {
1827
+ return ve(n) ? n : ve(e.basePath) ? e.basePath : Xe.resolve(e.basePath, n);
1828
+ }
1829
+ return (n, a) => {
1830
+ var m;
1831
+ const r = Nn, u = w("el-menu-item"), v = Ln, _ = w("SidebarMenuItem", !0), c = w("el-sub-menu");
1832
+ return !l.item.meta || !l.item.meta.hidden ? (f(), S("div", qn, [
1833
+ o(l.item.children, l.item) && (!i(t).children || i(t).noShowingChildren) && !((m = l.item.meta) != null && m.alwaysShow) ? (f(), S(J, { key: 0 }, [
1834
+ i(t).meta ? (f(), V(v, {
1835
+ key: 0,
1836
+ to: s(i(t).path)
1837
+ }, {
1838
+ default: p(() => [
1839
+ d(u, {
1840
+ index: s(i(t).path),
1841
+ class: G({ "submenu-title-noDropdown": !l.isNest })
1842
+ }, {
1843
+ default: p(() => [
1844
+ d(r, {
1845
+ icon: i(t).meta.icon || l.item.meta && l.item.meta.icon,
1846
+ title: i(t).meta.title,
1847
+ name: i(t).name
1848
+ }, null, 8, ["icon", "title", "name"])
1849
+ ]),
1850
+ _: 1
1851
+ }, 8, ["index", "class"])
1852
+ ]),
1853
+ _: 1
1854
+ }, 8, ["to"])) : P("", !0)
1855
+ ], 64)) : (f(), V(c, {
1856
+ key: 1,
1857
+ index: s(l.item.path),
1858
+ teleported: ""
1859
+ }, {
1860
+ title: p(() => [
1861
+ l.item.meta ? (f(), V(r, {
1862
+ key: 0,
1863
+ icon: l.item.meta && l.item.meta.icon,
1864
+ title: l.item.meta.title,
1865
+ name: l.item.name
1866
+ }, null, 8, ["icon", "title", "name"])) : P("", !0)
1867
+ ]),
1868
+ default: p(() => [
1869
+ (f(!0), S(J, null, fe(l.item.children, (h) => (f(), V(_, {
1870
+ key: h.path,
1871
+ "is-nest": !0,
1872
+ item: h,
1873
+ "base-path": s(h.path)
1874
+ }, null, 8, ["item", "base-path"]))), 128))
1875
+ ]),
1876
+ _: 1
1877
+ }, 8, ["index"]))
1878
+ ])) : P("", !0);
1879
+ };
1880
+ }
1881
+ }), Un = "_dark_1sua6_13", ce = {
1882
+ "sidebar-width": "210px",
1883
+ "navbar-height": "50px",
1884
+ "menu-background": "var(--menu-background)",
1885
+ "menu-text": "var(--menu-text)",
1886
+ "menu-active-text": "var(--menu-active-text)",
1887
+ "menu-hover": "var(--menu-hover)",
1888
+ dark: Un
1889
+ }, je = /* @__PURE__ */ B({
1890
+ __name: "SidebarMenu",
1891
+ props: {
1892
+ menuList: {
1893
+ required: !0,
1894
+ default: () => [],
1895
+ type: Array
1896
+ },
1897
+ basePath: {
1898
+ type: String,
1899
+ required: !0
1900
+ }
1901
+ },
1902
+ setup(l) {
1903
+ const e = le(), t = ne(), o = he(), s = z(() => e.layout), n = l;
1904
+ function a(r) {
1905
+ return ve(r) ? r : ve(n.basePath) ? n.basePath : Xe.resolve(n.basePath, r);
1906
+ }
1907
+ return (r, u) => {
1908
+ const v = Dn, _ = w("el-menu");
1909
+ return f(), V(_, {
1910
+ "default-active": i(o).path,
1911
+ collapse: !i(t).sidebar.opened,
1912
+ "background-color": i(ce)["menu-background"],
1913
+ "text-color": i(ce)["menu-text"],
1914
+ "active-text-color": i(ce)["menu-active-text"],
1915
+ "unique-opened": !1,
1916
+ "collapse-transition": !1,
1917
+ mode: i(s) === "top" ? "horizontal" : "vertical"
1918
+ }, {
1919
+ default: p(() => [
1920
+ (f(!0), S(J, null, fe(l.menuList, (c) => (f(), V(v, {
1921
+ key: c.path,
1922
+ item: c,
1923
+ "base-path": a(c.path),
1924
+ "is-collapse": !i(t).sidebar.opened
1925
+ }, null, 8, ["item", "base-path", "is-collapse"]))), 128))
1926
+ ]),
1927
+ _: 1
1928
+ }, 8, ["default-active", "collapse", "background-color", "text-color", "active-text-color", "mode"]);
1929
+ };
1930
+ }
1931
+ }), Bn = { key: 1 }, On = {
1932
+ key: 0,
1933
+ class: "ml-1"
1934
+ }, zn = /* @__PURE__ */ B({
1935
+ __name: "SidebarMixTopMenu",
1936
+ setup(l) {
1937
+ const e = ne(), t = _e(), o = Me(), s = z(() => e.activeTopMenuPath), n = I([]), a = (u) => {
1938
+ e.activeTopMenu(u), t.setMixLeftMenus(u);
1939
+ const v = t.mixLeftMenus;
1940
+ r(v);
1941
+ }, r = (u) => {
1942
+ if (u.length === 0) return;
1943
+ const [v] = u;
1944
+ v.children && v.children.length > 0 ? r(v.children) : v.name && o.push({
1945
+ name: v.name
1946
+ });
1947
+ };
1948
+ return ze(() => {
1949
+ n.value = t.routes.filter(
1950
+ (u) => !u.meta || !u.meta.hidden
1951
+ );
1952
+ }), (u, v) => {
1953
+ const _ = de, c = w("el-menu-item"), m = w("el-menu"), h = w("el-scrollbar");
1954
+ return f(), V(h, null, {
1955
+ default: p(() => [
1956
+ d(m, {
1957
+ mode: "horizontal",
1958
+ "default-active": i(s),
1959
+ "background-color": i(ce)["menu-background"],
1960
+ "text-color": i(ce)["menu-text"],
1961
+ "active-text-color": i(ce)["menu-active-text"],
1962
+ onSelect: a
1963
+ }, {
1964
+ default: p(() => [
1965
+ (f(!0), S(J, null, fe(i(n), (g) => (f(), V(c, {
1966
+ key: g.path,
1967
+ index: g.path
1968
+ }, {
1969
+ title: p(() => [
1970
+ g.meta && g.meta.icon ? (f(), V(_, {
1971
+ key: 0,
1972
+ "icon-class": g.meta.icon
1973
+ }, null, 8, ["icon-class"])) : P("", !0),
1974
+ g.path === "/" ? (f(), S("span", Bn, M(i(be)("Dashboard", "首页")), 1)) : (f(), S(J, { key: 2 }, [
1975
+ g.meta && g.meta.title ? (f(), S("span", On, M(i($e)(g)), 1)) : P("", !0)
1976
+ ], 64))
1977
+ ]),
1978
+ _: 2
1979
+ }, 1032, ["index"]))), 128))
1980
+ ]),
1981
+ _: 1
1982
+ }, 8, ["default-active", "background-color", "text-color", "active-text-color"])
1983
+ ]),
1984
+ _: 1
1985
+ });
1986
+ };
1987
+ }
1988
+ }), Fn = { class: "logo-container" }, Wn = ["src"], Hn = ["src"], Kn = { class: "logo-title" }, Qn = /* @__PURE__ */ B({
1989
+ __name: "SidebarLogo",
1990
+ props: {
1991
+ collapse: {
1992
+ type: Boolean,
1993
+ required: !0
1994
+ }
1995
+ },
1996
+ setup(l) {
1997
+ const e = le(), t = pe.logo;
1998
+ return (o, s) => {
1999
+ const n = w("router-link");
2000
+ return f(), S("div", Fn, [
2001
+ d(Oe, { "enter-active-class": "animate__animated animate__fadeInLeft" }, {
2002
+ default: p(() => [
2003
+ l.collapse ? (f(), V(n, {
2004
+ key: 0,
2005
+ class: "wh-full flex-center",
2006
+ to: "/"
2007
+ }, {
2008
+ default: p(() => [
2009
+ i(e).sidebarLogo ? (f(), S("img", {
2010
+ key: 0,
2011
+ src: i(t),
2012
+ class: "logo-image"
2013
+ }, null, 8, Wn)) : P("", !0)
2014
+ ]),
2015
+ _: 1
2016
+ })) : (f(), V(n, {
2017
+ key: 1,
2018
+ class: "wh-full flex-center",
2019
+ to: "/"
2020
+ }, {
2021
+ default: p(() => [
2022
+ i(e).sidebarLogo ? (f(), S("img", {
2023
+ key: 0,
2024
+ src: i(t),
2025
+ class: "logo-image"
2026
+ }, null, 8, Hn)) : P("", !0),
2027
+ k("span", Kn, M(i(pe).title), 1)
2028
+ ]),
2029
+ _: 1
2030
+ }))
2031
+ ]),
2032
+ _: 1
2033
+ })
2034
+ ]);
2035
+ };
2036
+ }
2037
+ }), Xn = /* @__PURE__ */ X(Qn, [["__scopeId", "data-v-210c85a9"]]), jn = {
2038
+ key: 0,
2039
+ class: "flex w-full"
2040
+ }, Gn = /* @__PURE__ */ B({
2041
+ __name: "index",
2042
+ setup(l) {
2043
+ const e = ne(), t = le(), o = _e(), s = z(() => t.sidebarLogo), n = z(() => t.layout);
2044
+ return (a, r) => {
2045
+ const u = Xn, v = zn, _ = He, c = je, m = w("el-scrollbar");
2046
+ return f(), S("div", {
2047
+ class: G({ "has-logo": i(s) })
2048
+ }, [
2049
+ i(n) == "mix" ? (f(), S("div", jn, [
2050
+ i(s) ? (f(), V(u, {
2051
+ key: 0,
2052
+ collapse: !i(e).sidebar.opened
2053
+ }, null, 8, ["collapse"])) : P("", !0),
2054
+ d(v, { class: "flex-1" }),
2055
+ d(_)
2056
+ ])) : (f(), S(J, { key: 1 }, [
2057
+ i(s) ? (f(), V(u, {
2058
+ key: 0,
2059
+ collapse: !i(e).sidebar.opened
2060
+ }, null, 8, ["collapse"])) : P("", !0),
2061
+ d(m, null, {
2062
+ default: p(() => [
2063
+ d(c, {
2064
+ "menu-list": i(o).routes,
2065
+ "base-path": ""
2066
+ }, null, 8, ["menu-list"])
2067
+ ]),
2068
+ _: 1
2069
+ }),
2070
+ i(n) === "top" ? (f(), V(_, { key: 1 })) : P("", !0)
2071
+ ], 64))
2072
+ ], 2);
2073
+ };
2074
+ }
2075
+ }), Yn = /* @__PURE__ */ X(Gn, [["__scopeId", "data-v-a6d3f8e9"]]), Jn = {
2076
+ key: 1,
2077
+ class: "mix-container"
2078
+ }, Zn = { class: "mix-container__left" }, eo = { class: "sidebar-toggle" }, to = 992, no = /* @__PURE__ */ B({
2079
+ __name: "index",
2080
+ setup(l) {
2081
+ const e = ne(), t = le(), o = _e(), s = z(() => t.fixedHeader), n = z(() => t.tagsView), a = z(() => t.layout), r = z(() => e.activeTopMenuPath), u = z(() => o.mixLeftMenus);
2082
+ re(
2083
+ () => r.value,
2084
+ (h) => {
2085
+ o.setMixLeftMenus(h);
2086
+ },
2087
+ {
2088
+ deep: !0,
2089
+ immediate: !0
2090
+ }
2091
+ );
2092
+ const v = z(() => ({
2093
+ hideSidebar: !e.sidebar.opened,
2094
+ openSidebar: e.sidebar.opened,
2095
+ mobile: e.device === ge.MOBILE,
2096
+ "layout-left": a.value === "left",
2097
+ "layout-top": a.value === "top",
2098
+ "layout-mix": a.value === "mix"
2099
+ })), _ = st().width;
2100
+ Ct(() => {
2101
+ _.value < to ? (e.toggleDevice(ge.MOBILE), e.closeSideBar()) : (e.toggleDevice(ge.DESKTOP), _.value >= 1200 ? e.openSideBar() : e.closeSideBar());
2102
+ });
2103
+ function c() {
2104
+ e.closeSideBar();
2105
+ }
2106
+ function m() {
2107
+ e.toggleSidebar();
2108
+ }
2109
+ return (h, g) => {
2110
+ const $ = Yn, x = je, T = Ke, q = Pn, C = kn, N = yn, A = on;
2111
+ return f(), S("div", {
2112
+ class: G(["wh-full", i(v)])
2113
+ }, [
2114
+ i(v).mobile && i(v).openSidebar ? (f(), S("div", {
2115
+ key: 0,
2116
+ class: "wh-full fixed-lt z-999 bg-black bg-opacity-30",
2117
+ onClick: c
2118
+ })) : P("", !0),
2119
+ d($, { class: "sidebar-container" }),
2120
+ i(a) === "mix" ? (f(), S("div", Jn, [
2121
+ k("div", Zn, [
2122
+ d(x, {
2123
+ "menu-list": i(u),
2124
+ "base-path": i(r)
2125
+ }, null, 8, ["menu-list", "base-path"]),
2126
+ k("div", eo, [
2127
+ d(T, {
2128
+ "is-active": i(e).sidebar.opened,
2129
+ onToggleClick: m
2130
+ }, null, 8, ["is-active"])
2131
+ ])
2132
+ ]),
2133
+ k("div", {
2134
+ class: G([{ hasTagsView: i(n) }, "main-container"])
2135
+ }, [
2136
+ k("div", {
2137
+ class: G({ "fixed-header": i(s) })
2138
+ }, [
2139
+ i(n) ? (f(), V(q, { key: 0 })) : P("", !0)
2140
+ ], 2),
2141
+ d(C),
2142
+ i(pe).showSettings ? (f(), V(N, { key: 0 })) : P("", !0)
2143
+ ], 2)
2144
+ ])) : (f(), S("div", {
2145
+ key: 2,
2146
+ class: G([{ hasTagsView: i(n) }, "main-container"])
2147
+ }, [
2148
+ k("div", {
2149
+ class: G({ "fixed-header": i(s) })
2150
+ }, [
2151
+ i(a) === "left" ? (f(), V(A, { key: 0 })) : P("", !0),
2152
+ i(n) ? (f(), V(q, { key: 1 })) : P("", !0)
2153
+ ], 2),
2154
+ d(C),
2155
+ i(pe).showSettings ? (f(), V(N, { key: 0 })) : P("", !0)
2156
+ ], 2))
2157
+ ], 2);
2158
+ };
2159
+ }
2160
+ }), fo = /* @__PURE__ */ X(no, [["__scopeId", "data-v-71891bc2"]]);
2161
+ export {
2162
+ fo as default
2163
+ };