jmash-core 0.0.139 → 0.0.140

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 (31) hide show
  1. package/dist/{401-DZpC9YTs.mjs → 401-mTulvsgZ.mjs} +3 -3
  2. package/dist/{404-C8f86iDp.mjs → 404-DxlWduSf.mjs} +3 -3
  3. package/dist/{BarChart-DDRpEgTd.mjs → BarChart-CtUdxB_0.mjs} +5 -5
  4. package/dist/{FunnelChart-BzoTNn36.mjs → FunnelChart-D6-3qMKT.mjs} +5 -5
  5. package/dist/{PieChart-vvePUqxP.mjs → PieChart-pHMdR-Hx.mjs} +1 -1
  6. package/dist/{PieChart.vue_vue_type_script_setup_true_lang-B4J5buH_.mjs → PieChart.vue_vue_type_script_setup_true_lang-zNUDoKtb.mjs} +6 -6
  7. package/dist/{RadarChart-RsjrWpKm.mjs → RadarChart-CclJ-0mQ.mjs} +1 -1
  8. package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-CPbv9lgv.mjs → RadarChart.vue_vue_type_script_setup_true_lang-CkA5ajJ-.mjs} +6 -6
  9. package/dist/{index-DA53-ye2.mjs → index--_Po9Tig.mjs} +8536 -8435
  10. package/dist/index-C9nXRt5O.mjs +1630 -0
  11. package/dist/index-CfF_1UQn.mjs +38529 -0
  12. package/dist/{index-DJSD1vCB.mjs → index-DuxBd-8U.mjs} +8 -8
  13. package/dist/{index-uykKwY2Z.mjs → index-JBmY6Vt0.mjs} +2 -2
  14. package/dist/{index-DY1G0gQY.mjs → index-Mj1ROiut.mjs} +8 -8
  15. package/dist/{index-JbCMx997.mjs → index-pVhvMkbz.mjs} +4 -4
  16. package/dist/index.mjs +9 -9
  17. package/dist/{profile-39mdgGCy.mjs → profile-CGK99sh1.mjs} +22 -20
  18. package/dist/{runAs-DSDIc1wL.mjs → runAs-B8LJKe8Q.mjs} +1 -1
  19. package/dist/{runAs.vue_vue_type_script_setup_true_lang-CWaxRtUr.mjs → runAs.vue_vue_type_script_setup_true_lang-rKU04MVd.mjs} +13 -13
  20. package/dist/style.css +1 -1
  21. package/dist/{types-BS_5KYWk.mjs → types-BvEVzU5Z.mjs} +4 -4
  22. package/dist/{updatePwd-DC9_1R-9.mjs → updatePwd-BI8GFMwr.mjs} +1 -1
  23. package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-DcC1PWmC.mjs → updatePwd.vue_vue_type_script_setup_true_lang-DJXNzQb4.mjs} +3 -3
  24. package/dts/src/components/JmashEditor/index.vue.d.ts +2 -2
  25. package/dts/src/hooks/table.d.ts +2 -2
  26. package/dts/src/index.d.ts +1 -1
  27. package/dts/src/settings.d.ts +7 -0
  28. package/dts/src/stores/modules/tagsView.d.ts +10 -1
  29. package/package.json +14 -20
  30. package/dist/index-D2Kgkz0x.mjs +0 -43105
  31. package/dist/index-DIoh7ua9.mjs +0 -1644
@@ -1,1644 +0,0 @@
1
- import { u as Q, E as Ue, _ as le, S as qe, a as we, b as He, c as ne, D as pe, d as We, f as Ke, e as ue, g as Xe, h as je, i as U, j as Ve, r as $e, k as fe, T as be, m as Ge, s as Ye, l as Je, n as de, o as Qe } from "./index-D2Kgkz0x.mjs";
2
- import { defineComponent as R, ref as F, resolveComponent as V, openBlock as d, createBlock as S, withCtx as b, createVNode as p, createElementBlock as x, Fragment as j, renderList as se, unref as l, createTextVNode as N, toDisplayString as E, createElementVNode as k, computed as B, createCommentVNode as $, isRef as _e, watch as oe, onBeforeMount as Ze, TransitionGroup as et, withModifiers as ce, normalizeClass as H, Transition as Pe, KeepAlive as tt, resolveDynamicComponent as ke, getCurrentInstance as nt, nextTick as Ae, onMounted as Ee, withDirectives as ot, normalizeStyle as it, vShow as at, normalizeProps as lt, guardReactiveProps as st, renderSlot as rt, watchEffect as ct } from "vue";
3
- import { useRoute as me, useRouter as Se } from "vue-router";
4
- import { _ as ut } from "./updatePwd.vue_vue_type_script_setup_true_lang-DcC1PWmC.mjs";
5
- import { _ as dt } from "./runAs.vue_vue_type_script_setup_true_lang-CWaxRtUr.mjs";
6
- import { storeToRefs as ft } from "pinia";
7
- const mt = /* @__PURE__ */ R({
8
- __name: "index",
9
- setup(i) {
10
- const e = Q(), t = F([
11
- { label: "默认", value: "default" },
12
- { label: "大型", value: "large" },
13
- { label: "小型", value: "small" }
14
- ]);
15
- function n(r) {
16
- e.changeSize(r), Ue.success("切换布局大小成功");
17
- }
18
- return (r, o) => {
19
- const a = le, s = V("el-dropdown-item"), c = V("el-dropdown-menu"), f = V("el-dropdown");
20
- return d(), S(f, {
21
- trigger: "click",
22
- onCommand: n
23
- }, {
24
- dropdown: b(() => [
25
- p(c, null, {
26
- default: b(() => [
27
- (d(!0), x(j, null, se(l(t), (m) => (d(), S(s, {
28
- key: m.value,
29
- disabled: l(e).size == m.value,
30
- command: m.value
31
- }, {
32
- default: b(() => [
33
- N(E(m.label), 1)
34
- ]),
35
- _: 2
36
- }, 1032, ["disabled", "command"]))), 128))
37
- ]),
38
- _: 1
39
- })
40
- ]),
41
- default: b(() => [
42
- k("div", null, [
43
- p(a, { "icon-class": "size" })
44
- ])
45
- ]),
46
- _: 1
47
- });
48
- };
49
- }
50
- }), pt = { class: "flex" }, _t = { class: "flex-center h100% p10px" }, vt = ["src"], ht = { key: 0 }, gt = /* @__PURE__ */ R({
51
- __name: "NavbarRight",
52
- setup(i) {
53
- const e = new qe(), t = Q(), n = we(), r = He(), o = ne();
54
- me();
55
- const a = Se(), s = B(() => t.device === pe.MOBILE), c = F(!1), f = F(!1), { isFullscreen: m, toggle: u } = We(), v = B(() => Ke.imageUrl(r.user.avatar, 48, 48));
56
- function g() {
57
- f.value = !0;
58
- }
59
- function y() {
60
- Xe.confirm("确定注销并退出系统吗?", "提示", {
61
- confirmButtonText: "确定",
62
- cancelButtonText: "取消",
63
- type: "warning",
64
- lockScroll: !1
65
- }).then(() => {
66
- r.logout().then(() => {
67
- n.delAllViews();
68
- }).then(() => {
69
- a.push("/login");
70
- });
71
- });
72
- }
73
- function M(C) {
74
- c.value = C;
75
- }
76
- return (C, T) => {
77
- const z = le, w = mt, W = V("el-tooltip"), ee = je, te = V("router-link"), K = V("el-dropdown-item"), Z = V("el-dropdown-menu"), D = V("el-dropdown");
78
- return d(), x("div", pt, [
79
- l(s) ? $("", !0) : (d(), x(j, { key: 0 }, [
80
- k("div", {
81
- class: "setting-item",
82
- onClick: T[0] || (T[0] = //@ts-ignore
83
- (...A) => l(u) && l(u)(...A))
84
- }, [
85
- p(z, {
86
- "icon-class": l(m) ? "fullscreen-exit" : "fullscreen"
87
- }, null, 8, ["icon-class"])
88
- ]),
89
- p(W, {
90
- content: C.$t("sizeSelect.tooltip"),
91
- effect: "dark",
92
- placement: "bottom"
93
- }, {
94
- default: b(() => [
95
- p(w, { class: "setting-item" })
96
- ]),
97
- _: 1
98
- }, 8, ["content"]),
99
- p(ee, { class: "setting-item" })
100
- ], 64)),
101
- p(D, {
102
- class: "setting-item",
103
- trigger: "click"
104
- }, {
105
- dropdown: b(() => [
106
- p(Z, null, {
107
- default: b(() => [
108
- p(K, null, {
109
- default: b(() => [
110
- p(te, { to: "/" }, {
111
- default: b(() => [
112
- N(E(C.$t("navbar.Dashboard")), 1)
113
- ]),
114
- _: 1
115
- })
116
- ]),
117
- _: 1
118
- }),
119
- p(K, null, {
120
- default: b(() => [
121
- p(te, { to: "/my/profile" }, {
122
- default: b(() => [
123
- N(E(C.$t("navbar.profile")), 1)
124
- ]),
125
- _: 1
126
- })
127
- ]),
128
- _: 1
129
- }),
130
- p(K, {
131
- onClick: T[1] || (T[1] = (A) => c.value = !0)
132
- }, {
133
- default: b(() => [
134
- N(E(C.$t("navbar.changePwd")), 1)
135
- ]),
136
- _: 1
137
- }),
138
- l(e).hasRole("tester") || l(e).userInfo().runAs ? (d(), x("div", ht, [
139
- p(K, { onClick: g }, {
140
- default: b(() => [
141
- N(E(C.$t("navbar.runAs")), 1)
142
- ]),
143
- _: 1
144
- })
145
- ])) : $("", !0),
146
- p(K, {
147
- divided: "",
148
- onClick: y
149
- }, {
150
- default: b(() => [
151
- N(E(C.$t("navbar.logout")), 1)
152
- ]),
153
- _: 1
154
- })
155
- ]),
156
- _: 1
157
- })
158
- ]),
159
- default: b(() => [
160
- k("div", _t, [
161
- k("img", {
162
- src: l(v),
163
- class: "rounded-full mr-10px w24px w24px"
164
- }, null, 8, vt),
165
- k("span", null, E(l(r).user.nickName), 1)
166
- ])
167
- ]),
168
- _: 1
169
- }),
170
- l(ue).showSettings ? (d(), x("div", {
171
- key: 1,
172
- class: "setting-item",
173
- onClick: T[2] || (T[2] = (A) => l(o).settingsVisible = !0)
174
- }, [
175
- p(z, { "icon-class": "setting" })
176
- ])) : $("", !0),
177
- l(c) ? (d(), S(ut, {
178
- key: 2,
179
- "pwd-visible": l(c),
180
- onDialogActionChange: M
181
- }, null, 8, ["pwd-visible"])) : $("", !0),
182
- l(f) ? (d(), S(dt, {
183
- key: 3,
184
- modelValue: l(f),
185
- "onUpdate:modelValue": T[3] || (T[3] = (A) => _e(f) ? f.value = A : null)
186
- }, null, 8, ["modelValue"])) : $("", !0)
187
- ]);
188
- };
189
- }
190
- }), Le = /* @__PURE__ */ U(gt, [["__scopeId", "data-v-70f27c82"]]);
191
- function bt(i) {
192
- for (var e = [], t = 0; t < i.length; ) {
193
- var n = i[t];
194
- if (n === "*" || n === "+" || n === "?") {
195
- e.push({ type: "MODIFIER", index: t, value: i[t++] });
196
- continue;
197
- }
198
- if (n === "\\") {
199
- e.push({ type: "ESCAPED_CHAR", index: t++, value: i[t++] });
200
- continue;
201
- }
202
- if (n === "{") {
203
- e.push({ type: "OPEN", index: t, value: i[t++] });
204
- continue;
205
- }
206
- if (n === "}") {
207
- e.push({ type: "CLOSE", index: t, value: i[t++] });
208
- continue;
209
- }
210
- if (n === ":") {
211
- for (var r = "", o = t + 1; o < i.length; ) {
212
- var a = i.charCodeAt(o);
213
- if (
214
- // `0-9`
215
- a >= 48 && a <= 57 || // `A-Z`
216
- a >= 65 && a <= 90 || // `a-z`
217
- a >= 97 && a <= 122 || // `_`
218
- a === 95
219
- ) {
220
- r += i[o++];
221
- continue;
222
- }
223
- break;
224
- }
225
- if (!r)
226
- throw new TypeError("Missing parameter name at ".concat(t));
227
- e.push({ type: "NAME", index: t, value: r }), t = o;
228
- continue;
229
- }
230
- if (n === "(") {
231
- var s = 1, c = "", o = t + 1;
232
- if (i[o] === "?")
233
- throw new TypeError('Pattern cannot start with "?" at '.concat(o));
234
- for (; o < i.length; ) {
235
- if (i[o] === "\\") {
236
- c += i[o++] + i[o++];
237
- continue;
238
- }
239
- if (i[o] === ")") {
240
- if (s--, s === 0) {
241
- o++;
242
- break;
243
- }
244
- } else if (i[o] === "(" && (s++, i[o + 1] !== "?"))
245
- throw new TypeError("Capturing groups are not allowed at ".concat(o));
246
- c += i[o++];
247
- }
248
- if (s)
249
- throw new TypeError("Unbalanced pattern at ".concat(t));
250
- if (!c)
251
- throw new TypeError("Missing pattern at ".concat(t));
252
- e.push({ type: "PATTERN", index: t, value: c }), t = o;
253
- continue;
254
- }
255
- e.push({ type: "CHAR", index: t, value: i[t++] });
256
- }
257
- return e.push({ type: "END", index: t, value: "" }), e;
258
- }
259
- function xt(i, e) {
260
- e === void 0 && (e = {});
261
- for (var t = bt(i), n = e.prefixes, r = n === void 0 ? "./" : n, o = e.delimiter, a = o === void 0 ? "/#?" : o, s = [], c = 0, f = 0, m = "", u = function(D) {
262
- if (f < t.length && t[f].type === D)
263
- return t[f++].value;
264
- }, v = function(D) {
265
- var A = u(D);
266
- if (A !== void 0)
267
- return A;
268
- var q = t[f], re = q.type, he = q.index;
269
- throw new TypeError("Unexpected ".concat(re, " at ").concat(he, ", expected ").concat(D));
270
- }, g = function() {
271
- for (var D = "", A; A = u("CHAR") || u("ESCAPED_CHAR"); )
272
- D += A;
273
- return D;
274
- }, y = function(D) {
275
- for (var A = 0, q = a; A < q.length; A++) {
276
- var re = q[A];
277
- if (D.indexOf(re) > -1)
278
- return !0;
279
- }
280
- return !1;
281
- }, M = function(D) {
282
- var A = s[s.length - 1], q = D || (A && typeof A == "string" ? A : "");
283
- if (A && !q)
284
- throw new TypeError('Must have text between two parameters, missing text after "'.concat(A.name, '"'));
285
- return !q || y(q) ? "[^".concat(xe(a), "]+?") : "(?:(?!".concat(xe(q), ")[^").concat(xe(a), "])+?");
286
- }; f < t.length; ) {
287
- var C = u("CHAR"), T = u("NAME"), z = u("PATTERN");
288
- if (T || z) {
289
- var w = C || "";
290
- r.indexOf(w) === -1 && (m += w, w = ""), m && (s.push(m), m = ""), s.push({
291
- name: T || c++,
292
- prefix: w,
293
- suffix: "",
294
- pattern: z || M(w),
295
- modifier: u("MODIFIER") || ""
296
- });
297
- continue;
298
- }
299
- var W = C || u("ESCAPED_CHAR");
300
- if (W) {
301
- m += W;
302
- continue;
303
- }
304
- m && (s.push(m), m = "");
305
- var ee = u("OPEN");
306
- if (ee) {
307
- var w = g(), te = u("NAME") || "", K = u("PATTERN") || "", Z = g();
308
- v("CLOSE"), s.push({
309
- name: te || (K ? c++ : ""),
310
- pattern: te && !K ? M(w) : K,
311
- prefix: w,
312
- suffix: Z,
313
- modifier: u("MODIFIER") || ""
314
- });
315
- continue;
316
- }
317
- v("END");
318
- }
319
- return s;
320
- }
321
- function yt(i, e) {
322
- return wt(xt(i, e), e);
323
- }
324
- function wt(i, e) {
325
- e === void 0 && (e = {});
326
- var t = kt(e), n = e.encode, r = n === void 0 ? function(c) {
327
- return c;
328
- } : n, o = e.validate, a = o === void 0 ? !0 : o, s = i.map(function(c) {
329
- if (typeof c == "object")
330
- return new RegExp("^(?:".concat(c.pattern, ")$"), t);
331
- });
332
- return function(c) {
333
- for (var f = "", m = 0; m < i.length; m++) {
334
- var u = i[m];
335
- if (typeof u == "string") {
336
- f += u;
337
- continue;
338
- }
339
- var v = c ? c[u.name] : void 0, g = u.modifier === "?" || u.modifier === "*", y = u.modifier === "*" || u.modifier === "+";
340
- if (Array.isArray(v)) {
341
- if (!y)
342
- throw new TypeError('Expected "'.concat(u.name, '" to not repeat, but got an array'));
343
- if (v.length === 0) {
344
- if (g)
345
- continue;
346
- throw new TypeError('Expected "'.concat(u.name, '" to not be empty'));
347
- }
348
- for (var M = 0; M < v.length; M++) {
349
- var C = r(v[M], u);
350
- if (a && !s[m].test(C))
351
- throw new TypeError('Expected all "'.concat(u.name, '" to match "').concat(u.pattern, '", but got "').concat(C, '"'));
352
- f += u.prefix + C + u.suffix;
353
- }
354
- continue;
355
- }
356
- if (typeof v == "string" || typeof v == "number") {
357
- var C = r(String(v), u);
358
- if (a && !s[m].test(C))
359
- throw new TypeError('Expected "'.concat(u.name, '" to match "').concat(u.pattern, '", but got "').concat(C, '"'));
360
- f += u.prefix + C + u.suffix;
361
- continue;
362
- }
363
- if (!g) {
364
- var T = y ? "an array" : "a string";
365
- throw new TypeError('Expected "'.concat(u.name, '" to be ').concat(T));
366
- }
367
- }
368
- return f;
369
- };
370
- }
371
- function xe(i) {
372
- return i.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
373
- }
374
- function kt(i) {
375
- return i && i.sensitive ? "" : "i";
376
- }
377
- function ye(i) {
378
- var e, t;
379
- return ve((e = i.name) == null ? void 0 : e.toString(), (t = i.meta) == null ? void 0 : t.title);
380
- }
381
- function St(i) {
382
- return ve(i.name, i.title);
383
- }
384
- function ve(i, e) {
385
- let t = i && i != "" ? i : e;
386
- return Ve.global.te("route." + t) ? Ve.global.t("route." + t) : e || i;
387
- }
388
- const Ct = {
389
- key: 0,
390
- class: "color-gray-400"
391
- }, Tt = ["onClick"], Vt = /* @__PURE__ */ R({
392
- __name: "index",
393
- setup(i) {
394
- const e = me(), t = (s) => {
395
- const { params: c } = e;
396
- return yt(s)(c);
397
- }, n = F([]);
398
- function r() {
399
- let s = e.matched.filter(
400
- (f) => f.meta && f.meta.title
401
- );
402
- const c = s[0];
403
- o(c) || (s = [
404
- { path: "/dashboard", meta: { title: "Dashboard" } }
405
- ].concat(s)), n.value = s.filter((f) => f.meta && f.meta.title && f.meta.breadcrumb !== !1);
406
- }
407
- function o(s) {
408
- const c = s && s.name;
409
- return c ? c.toString().trim().toLocaleLowerCase() === "Dashboard".toLocaleLowerCase() : !1;
410
- }
411
- function a(s) {
412
- const { redirect: c, path: f } = s;
413
- if (c) {
414
- $e.value.push(c).catch((m) => {
415
- console.warn(m);
416
- });
417
- return;
418
- }
419
- $e.value.push(t(f)).catch((m) => {
420
- console.warn(m);
421
- });
422
- }
423
- return oe(
424
- () => e.path,
425
- (s) => {
426
- s.startsWith("/redirect/") || r();
427
- }
428
- ), Ze(() => {
429
- r();
430
- }), (s, c) => {
431
- const f = V("el-breadcrumb-item"), m = V("el-breadcrumb");
432
- return d(), S(m, { class: "flex-y-center" }, {
433
- default: b(() => [
434
- p(et, { "enter-active-class": "animate__animated animate__fadeInRight" }, {
435
- default: b(() => [
436
- (d(!0), x(j, null, se(l(n), (u, v) => (d(), S(f, {
437
- key: u.path
438
- }, {
439
- default: b(() => [
440
- u.redirect === "noredirect" || v === l(n).length - 1 ? (d(), x("span", Ct, E(l(ye)(u)), 1)) : (d(), x("a", {
441
- key: 1,
442
- onClick: ce((g) => a(u), ["prevent"])
443
- }, E(l(ye)(u)), 9, Tt))
444
- ]),
445
- _: 2
446
- }, 1024))), 128))
447
- ]),
448
- _: 1
449
- })
450
- ]),
451
- _: 1
452
- });
453
- };
454
- }
455
- }), $t = /* @__PURE__ */ U(Vt, [["__scopeId", "data-v-6109c28e"]]), At = /* @__PURE__ */ R({
456
- __name: "index",
457
- props: {
458
- isActive: {
459
- required: !0,
460
- type: Boolean,
461
- default: !1
462
- }
463
- },
464
- emits: ["toggleClick"],
465
- setup(i, { emit: e }) {
466
- const t = e;
467
- function n() {
468
- t("toggleClick");
469
- }
470
- return (r, o) => {
471
- const a = le;
472
- return d(), x("div", {
473
- class: "px-[15px] flex items-center justify-center color-[var(--el-text-color-regular)]",
474
- onClick: n
475
- }, [
476
- p(a, {
477
- class: H(["hamburger", { "is-active": i.isActive }]),
478
- "icon-class": "indent-decrease"
479
- }, null, 8, ["class"])
480
- ]);
481
- };
482
- }
483
- }), Ie = /* @__PURE__ */ U(At, [["__scopeId", "data-v-42e37629"]]), Mt = { class: "flex" }, Pt = /* @__PURE__ */ R({
484
- __name: "NavbarLeft",
485
- setup(i) {
486
- const e = Q();
487
- function t() {
488
- e.toggleSidebar();
489
- }
490
- return (n, r) => {
491
- const o = Ie, a = $t;
492
- return d(), x("div", Mt, [
493
- p(o, {
494
- "is-active": l(e).sidebar.opened,
495
- onToggleClick: t
496
- }, null, 8, ["is-active"]),
497
- p(a)
498
- ]);
499
- };
500
- }
501
- }), Et = {}, Lt = { class: "navbar-container" };
502
- function It(i, e) {
503
- const t = Pt, n = Le;
504
- return d(), x("div", Lt, [
505
- p(t),
506
- p(n)
507
- ]);
508
- }
509
- const Rt = /* @__PURE__ */ U(Et, [["render", It], ["__scopeId", "data-v-b1624593"]]);
510
- var J = /* @__PURE__ */ ((i) => (i.LEFT = "left", i.TOP = "top", i.MIX = "mix", i))(J || {});
511
- const Dt = { class: "flex flex-wrap justify-around w-full h-12" }, Bt = /* @__PURE__ */ R({
512
- __name: "LayoutSelect",
513
- props: {
514
- modelValue: String
515
- },
516
- emits: ["update:modelValue"],
517
- setup(i, { emit: e }) {
518
- const t = e;
519
- function n(r) {
520
- t("update:modelValue", r);
521
- }
522
- return (r, o) => {
523
- const a = V("el-tooltip");
524
- return d(), x("div", Dt, [
525
- p(a, {
526
- content: "左侧模式",
527
- placement: "bottom"
528
- }, {
529
- default: b(() => [
530
- k("div", {
531
- class: H(["layout-item left", { "is-active": i.modelValue === l(J).LEFT }]),
532
- onClick: o[0] || (o[0] = (s) => n(l(J).LEFT))
533
- }, o[3] || (o[3] = [
534
- k("div", null, null, -1),
535
- k("div", null, null, -1)
536
- ]), 2)
537
- ]),
538
- _: 1
539
- }),
540
- p(a, {
541
- content: "顶部模式",
542
- placement: "bottom"
543
- }, {
544
- default: b(() => [
545
- k("div", {
546
- class: H(["layout-item top", { "is-active": i.modelValue === l(J).TOP }]),
547
- onClick: o[1] || (o[1] = (s) => n(l(J).TOP))
548
- }, o[4] || (o[4] = [
549
- k("div", null, null, -1),
550
- k("div", null, null, -1)
551
- ]), 2)
552
- ]),
553
- _: 1
554
- }),
555
- p(a, {
556
- content: "混合模式",
557
- placement: "bottom"
558
- }, {
559
- default: b(() => [
560
- k("div", {
561
- class: H(["layout-item mix", { "is-active": i.modelValue === l(J).MIX }]),
562
- onClick: o[2] || (o[2] = (s) => n(l(J).MIX))
563
- }, o[5] || (o[5] = [
564
- k("div", null, null, -1),
565
- k("div", null, null, -1)
566
- ]), 2)
567
- ]),
568
- _: 1
569
- })
570
- ]);
571
- };
572
- }
573
- }), Ot = /* @__PURE__ */ U(Bt, [["__scopeId", "data-v-2bdf1403"]]), Nt = /* @__PURE__ */ R({
574
- __name: "ThemeColorPicker",
575
- props: {
576
- modelValue: String
577
- },
578
- emits: ["update:modelValue"],
579
- setup(i, { emit: e }) {
580
- const t = i, n = e, r = [
581
- "#409EFF",
582
- "#ff4500",
583
- "#ff8c00",
584
- "#90ee90",
585
- "#00ced1",
586
- "#1e90ff",
587
- "#c71585",
588
- "rgba(255, 69, 0, 0.68)",
589
- "rgb(255, 120, 0)",
590
- "hsva(120, 40, 94)"
591
- ], o = F(t.modelValue);
592
- return oe(o, (a) => {
593
- n("update:modelValue", a);
594
- }), (a, s) => {
595
- const c = V("el-color-picker");
596
- return d(), S(c, {
597
- modelValue: l(o),
598
- "onUpdate:modelValue": s[0] || (s[0] = (f) => _e(o) ? o.value = f : null),
599
- predefine: r,
600
- "popper-class": "theme-picker-dropdown"
601
- }, null, 8, ["modelValue"]);
602
- };
603
- }
604
- }), zt = /* @__PURE__ */ U(Nt, [["__scopeId", "data-v-92c1fd79"]]), Ft = { class: "flex-center" }, Ut = { class: "settings-option" }, qt = { class: "text-xs" }, Ht = { class: "settings-option" }, Wt = { class: "text-xs" }, Kt = { class: "settings-option" }, Xt = { class: "text-xs" }, jt = { class: "settings-option" }, Gt = { class: "text-xs" }, Yt = { class: "settings-option" }, Jt = { class: "text-xs" }, Qt = /* @__PURE__ */ R({
605
- __name: "index",
606
- setup(i) {
607
- const e = me(), t = Q(), n = ne(), r = fe(), o = B({
608
- get() {
609
- return n.settingsVisible;
610
- },
611
- set() {
612
- n.settingsVisible = !1;
613
- }
614
- });
615
- function a(v) {
616
- n.changeThemeColor(v);
617
- }
618
- const s = F(n.theme === be.DARK), c = (v) => {
619
- s.value = v, n.changeTheme(s.value ? be.DARK : be.LIGHT);
620
- };
621
- function f(v) {
622
- n.changeLayout(v), v === J.MIX ? e.name && m(e.name) : v === J.TOP && t.openSideBar();
623
- }
624
- function m(v) {
625
- const g = u(r.routes, v);
626
- t.activeTopMenu !== g.path && t.activeTopMenu(g.path);
627
- }
628
- function u(v, g) {
629
- let y = {};
630
- function M(T, z) {
631
- if (y[T.name] = z, T.children)
632
- for (let w = 0; w < T.children.length; w++)
633
- M(T.children[w], T);
634
- }
635
- for (let T = 0; T < v.length; T++)
636
- M(v[T], null);
637
- let C = y[g];
638
- for (; C; ) {
639
- if (!y[C.name])
640
- return C;
641
- C = y[C.name];
642
- }
643
- return null;
644
- }
645
- return (v, g) => {
646
- const y = V("el-divider"), M = V("el-switch"), C = zt, T = Ot, z = V("el-drawer");
647
- return d(), S(z, {
648
- modelValue: l(o),
649
- "onUpdate:modelValue": g[7] || (g[7] = (w) => _e(o) ? o.value = w : null),
650
- size: "300",
651
- title: v.$t("settings.project")
652
- }, {
653
- default: b(() => [
654
- p(y, null, {
655
- default: b(() => [
656
- N(E(v.$t("settings.theme")), 1)
657
- ]),
658
- _: 1
659
- }),
660
- k("div", Ft, [
661
- p(M, {
662
- modelValue: l(s),
663
- "onUpdate:modelValue": g[0] || (g[0] = (w) => _e(s) ? s.value = w : null),
664
- "active-icon": l(Ge),
665
- "inactive-icon": l(Ye),
666
- onChange: c
667
- }, null, 8, ["modelValue", "active-icon", "inactive-icon"])
668
- ]),
669
- p(y, null, {
670
- default: b(() => [
671
- N(E(v.$t("settings.interface")), 1)
672
- ]),
673
- _: 1
674
- }),
675
- k("div", Ut, [
676
- k("span", qt, E(v.$t("settings.themeColor")), 1),
677
- p(C, {
678
- modelValue: l(n).themeColor,
679
- "onUpdate:modelValue": [
680
- g[1] || (g[1] = (w) => l(n).themeColor = w),
681
- a
682
- ]
683
- }, null, 8, ["modelValue"])
684
- ]),
685
- k("div", Ht, [
686
- k("span", Wt, E(v.$t("settings.tagsView")), 1),
687
- p(M, {
688
- modelValue: l(n).tagsView,
689
- "onUpdate:modelValue": g[2] || (g[2] = (w) => l(n).tagsView = w)
690
- }, null, 8, ["modelValue"])
691
- ]),
692
- k("div", Kt, [
693
- k("span", Xt, E(v.$t("settings.fixedHeader")), 1),
694
- p(M, {
695
- modelValue: l(n).fixedHeader,
696
- "onUpdate:modelValue": g[3] || (g[3] = (w) => l(n).fixedHeader = w)
697
- }, null, 8, ["modelValue"])
698
- ]),
699
- k("div", jt, [
700
- k("span", Gt, E(v.$t("settings.sidebarLogo")), 1),
701
- p(M, {
702
- modelValue: l(n).sidebarLogo,
703
- "onUpdate:modelValue": g[4] || (g[4] = (w) => l(n).sidebarLogo = w)
704
- }, null, 8, ["modelValue"])
705
- ]),
706
- k("div", Yt, [
707
- k("span", Jt, E(v.$t("settings.watermark")), 1),
708
- p(M, {
709
- modelValue: l(n).watermarkEnabled,
710
- "onUpdate:modelValue": g[5] || (g[5] = (w) => l(n).watermarkEnabled = w)
711
- }, null, 8, ["modelValue"])
712
- ]),
713
- p(y, null, {
714
- default: b(() => [
715
- N(E(v.$t("settings.navigation")), 1)
716
- ]),
717
- _: 1
718
- }),
719
- p(T, {
720
- modelValue: l(n).layout,
721
- "onUpdate:modelValue": [
722
- g[6] || (g[6] = (w) => l(n).layout = w),
723
- f
724
- ]
725
- }, null, 8, ["modelValue"])
726
- ]),
727
- _: 1
728
- }, 8, ["modelValue", "title"]);
729
- };
730
- }
731
- }), Zt = /* @__PURE__ */ U(Qt, [["__scopeId", "data-v-70f5bf10"]]), en = { class: "app-main" }, tn = /* @__PURE__ */ R({
732
- __name: "index",
733
- setup(i) {
734
- const e = B(() => we().cachedViews);
735
- return (t, n) => {
736
- const r = V("router-view");
737
- return d(), x("section", en, [
738
- p(r, null, {
739
- default: b(({ Component: o, route: a }) => [
740
- p(Pe, {
741
- "enter-active-class": "animate__animated animate__fadeIn",
742
- mode: "out-in"
743
- }, {
744
- default: b(() => [
745
- (d(), S(tt, { include: l(e) }, [
746
- (d(), S(ke(o), {
747
- key: a.path
748
- }))
749
- ], 1032, ["include"]))
750
- ]),
751
- _: 2
752
- }, 1024)
753
- ]),
754
- _: 1
755
- })
756
- ]);
757
- };
758
- }
759
- }), nn = /* @__PURE__ */ U(tn, [["__scopeId", "data-v-37d096bd"]]), on = {
760
- viewBox: "0 0 1024 1024",
761
- width: "1.2em",
762
- height: "1.2em"
763
- };
764
- function an(i, e) {
765
- return d(), x("svg", on, e[0] || (e[0] = [
766
- k("path", {
767
- fill: "currentColor",
768
- 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"
769
- }, null, -1)
770
- ]));
771
- }
772
- const ln = { name: "ep-close", render: an };
773
- function Y(i) {
774
- if (typeof i != "string")
775
- throw new TypeError("Path must be a string. Received " + JSON.stringify(i));
776
- }
777
- function Me(i, e) {
778
- for (var t = "", n = 0, r = -1, o = 0, a, s = 0; s <= i.length; ++s) {
779
- if (s < i.length)
780
- a = i.charCodeAt(s);
781
- else {
782
- if (a === 47)
783
- break;
784
- a = 47;
785
- }
786
- if (a === 47) {
787
- if (!(r === s - 1 || o === 1)) if (r !== s - 1 && o === 2) {
788
- if (t.length < 2 || n !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) {
789
- if (t.length > 2) {
790
- var c = t.lastIndexOf("/");
791
- if (c !== t.length - 1) {
792
- c === -1 ? (t = "", n = 0) : (t = t.slice(0, c), n = t.length - 1 - t.lastIndexOf("/")), r = s, o = 0;
793
- continue;
794
- }
795
- } else if (t.length === 2 || t.length === 1) {
796
- t = "", n = 0, r = s, o = 0;
797
- continue;
798
- }
799
- }
800
- e && (t.length > 0 ? t += "/.." : t = "..", n = 2);
801
- } else
802
- t.length > 0 ? t += "/" + i.slice(r + 1, s) : t = i.slice(r + 1, s), n = s - r - 1;
803
- r = s, o = 0;
804
- } else a === 46 && o !== -1 ? ++o : o = -1;
805
- }
806
- return t;
807
- }
808
- function sn(i, e) {
809
- var t = e.dir || e.root, n = e.base || (e.name || "") + (e.ext || "");
810
- return t ? t === e.root ? t + n : t + i + n : n;
811
- }
812
- var ie = {
813
- // path.resolve([from ...], to)
814
- resolve: function() {
815
- for (var e = "", t = !1, n, r = arguments.length - 1; r >= -1 && !t; r--) {
816
- var o;
817
- r >= 0 ? o = arguments[r] : (n === void 0 && (n = process.cwd()), o = n), Y(o), o.length !== 0 && (e = o + "/" + e, t = o.charCodeAt(0) === 47);
818
- }
819
- return e = Me(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
820
- },
821
- normalize: function(e) {
822
- if (Y(e), e.length === 0) return ".";
823
- var t = e.charCodeAt(0) === 47, n = e.charCodeAt(e.length - 1) === 47;
824
- return e = Me(e, !t), e.length === 0 && !t && (e = "."), e.length > 0 && n && (e += "/"), t ? "/" + e : e;
825
- },
826
- isAbsolute: function(e) {
827
- return Y(e), e.length > 0 && e.charCodeAt(0) === 47;
828
- },
829
- join: function() {
830
- if (arguments.length === 0)
831
- return ".";
832
- for (var e, t = 0; t < arguments.length; ++t) {
833
- var n = arguments[t];
834
- Y(n), n.length > 0 && (e === void 0 ? e = n : e += "/" + n);
835
- }
836
- return e === void 0 ? "." : ie.normalize(e);
837
- },
838
- relative: function(e, t) {
839
- if (Y(e), Y(t), e === t || (e = ie.resolve(e), t = ie.resolve(t), e === t)) return "";
840
- for (var n = 1; n < e.length && e.charCodeAt(n) === 47; ++n)
841
- ;
842
- for (var r = e.length, o = r - n, a = 1; a < t.length && t.charCodeAt(a) === 47; ++a)
843
- ;
844
- for (var s = t.length, c = s - a, f = o < c ? o : c, m = -1, u = 0; u <= f; ++u) {
845
- if (u === f) {
846
- if (c > f) {
847
- if (t.charCodeAt(a + u) === 47)
848
- return t.slice(a + u + 1);
849
- if (u === 0)
850
- return t.slice(a + u);
851
- } else o > f && (e.charCodeAt(n + u) === 47 ? m = u : u === 0 && (m = 0));
852
- break;
853
- }
854
- var v = e.charCodeAt(n + u), g = t.charCodeAt(a + u);
855
- if (v !== g)
856
- break;
857
- v === 47 && (m = u);
858
- }
859
- var y = "";
860
- for (u = n + m + 1; u <= r; ++u)
861
- (u === r || e.charCodeAt(u) === 47) && (y.length === 0 ? y += ".." : y += "/..");
862
- return y.length > 0 ? y + t.slice(a + m) : (a += m, t.charCodeAt(a) === 47 && ++a, t.slice(a));
863
- },
864
- _makeLong: function(e) {
865
- return e;
866
- },
867
- dirname: function(e) {
868
- if (Y(e), e.length === 0) return ".";
869
- for (var t = e.charCodeAt(0), n = t === 47, r = -1, o = !0, a = e.length - 1; a >= 1; --a)
870
- if (t = e.charCodeAt(a), t === 47) {
871
- if (!o) {
872
- r = a;
873
- break;
874
- }
875
- } else
876
- o = !1;
877
- return r === -1 ? n ? "/" : "." : n && r === 1 ? "//" : e.slice(0, r);
878
- },
879
- basename: function(e, t) {
880
- if (t !== void 0 && typeof t != "string") throw new TypeError('"ext" argument must be a string');
881
- Y(e);
882
- var n = 0, r = -1, o = !0, a;
883
- if (t !== void 0 && t.length > 0 && t.length <= e.length) {
884
- if (t.length === e.length && t === e) return "";
885
- var s = t.length - 1, c = -1;
886
- for (a = e.length - 1; a >= 0; --a) {
887
- var f = e.charCodeAt(a);
888
- if (f === 47) {
889
- if (!o) {
890
- n = a + 1;
891
- break;
892
- }
893
- } else
894
- c === -1 && (o = !1, c = a + 1), s >= 0 && (f === t.charCodeAt(s) ? --s === -1 && (r = a) : (s = -1, r = c));
895
- }
896
- return n === r ? r = c : r === -1 && (r = e.length), e.slice(n, r);
897
- } else {
898
- for (a = e.length - 1; a >= 0; --a)
899
- if (e.charCodeAt(a) === 47) {
900
- if (!o) {
901
- n = a + 1;
902
- break;
903
- }
904
- } else r === -1 && (o = !1, r = a + 1);
905
- return r === -1 ? "" : e.slice(n, r);
906
- }
907
- },
908
- extname: function(e) {
909
- Y(e);
910
- for (var t = -1, n = 0, r = -1, o = !0, a = 0, s = e.length - 1; s >= 0; --s) {
911
- var c = e.charCodeAt(s);
912
- if (c === 47) {
913
- if (!o) {
914
- n = s + 1;
915
- break;
916
- }
917
- continue;
918
- }
919
- r === -1 && (o = !1, r = s + 1), c === 46 ? t === -1 ? t = s : a !== 1 && (a = 1) : t !== -1 && (a = -1);
920
- }
921
- return t === -1 || r === -1 || // We saw a non-dot character immediately before the dot
922
- a === 0 || // The (right-most) trimmed path component is exactly '..'
923
- a === 1 && t === r - 1 && t === n + 1 ? "" : e.slice(t, r);
924
- },
925
- format: function(e) {
926
- if (e === null || typeof e != "object")
927
- throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
928
- return sn("/", e);
929
- },
930
- parse: function(e) {
931
- Y(e);
932
- var t = { root: "", dir: "", base: "", ext: "", name: "" };
933
- if (e.length === 0) return t;
934
- var n = e.charCodeAt(0), r = n === 47, o;
935
- r ? (t.root = "/", o = 1) : o = 0;
936
- for (var a = -1, s = 0, c = -1, f = !0, m = e.length - 1, u = 0; m >= o; --m) {
937
- if (n = e.charCodeAt(m), n === 47) {
938
- if (!f) {
939
- s = m + 1;
940
- break;
941
- }
942
- continue;
943
- }
944
- c === -1 && (f = !1, c = m + 1), n === 46 ? a === -1 ? a = m : u !== 1 && (u = 1) : a !== -1 && (u = -1);
945
- }
946
- return a === -1 || c === -1 || // We saw a non-dot character immediately before the dot
947
- u === 0 || // The (right-most) trimmed path component is exactly '..'
948
- u === 1 && a === c - 1 && a === s + 1 ? c !== -1 && (s === 0 && r ? t.base = t.name = e.slice(1, c) : t.base = t.name = e.slice(s, c)) : (s === 0 && r ? (t.name = e.slice(1, a), t.base = e.slice(1, c)) : (t.name = e.slice(s, a), t.base = e.slice(s, c)), t.ext = e.slice(a, c)), s > 0 ? t.dir = e.slice(0, s - 1) : r && (t.dir = "/"), t;
949
- },
950
- sep: "/",
951
- delimiter: ":",
952
- win32: null,
953
- posix: null
954
- };
955
- ie.posix = ie;
956
- var Re = ie;
957
- const De = /* @__PURE__ */ Je(Re), rn = { class: "tags-container" }, cn = /* @__PURE__ */ R({
958
- __name: "index",
959
- setup(i) {
960
- const { proxy: e } = nt(), t = Se(), n = me(), r = fe(), o = we(), a = Q(), { visitedViews: s } = ft(o), c = ne(), f = B(() => c.layout), m = F({
961
- path: "",
962
- query: "",
963
- fullPath: "",
964
- name: "",
965
- title: "",
966
- affix: !1,
967
- keepAlive: !1
968
- }), u = F([]), v = F(0), g = F(0);
969
- oe(
970
- n,
971
- () => {
972
- T(), z();
973
- },
974
- {
975
- immediate: !0
976
- //初始化立即执行
977
- }
978
- );
979
- const y = F(!1);
980
- oe(y, (h) => {
981
- h ? document.body.addEventListener("click", ge) : document.body.removeEventListener("click", ge);
982
- });
983
- function M(h, _ = "/") {
984
- let I = [];
985
- return h.forEach((O) => {
986
- var P, L, G, Ce;
987
- const X = Re.resolve(_, O.path);
988
- if ((P = O.meta) != null && P.affix && I.push({
989
- path: X,
990
- fullPath: X,
991
- name: String(O.name),
992
- title: ((L = O.meta) == null ? void 0 : L.title) || "no-name",
993
- affix: (G = O.meta) == null ? void 0 : G.affix,
994
- keepAlive: (Ce = O.meta) == null ? void 0 : Ce.keepAlive
995
- }), O.children) {
996
- const Te = M(O.children, _ + O.path);
997
- Te.length >= 1 && (I = [...I, ...Te]);
998
- }
999
- }), I;
1000
- }
1001
- function C() {
1002
- const h = M(r.routes);
1003
- u.value = h;
1004
- for (const _ of h)
1005
- _.name && o.addVisitedView(_);
1006
- }
1007
- function T() {
1008
- var h, _;
1009
- n.meta.title && o.addView({
1010
- name: n.name,
1011
- title: n.meta.title,
1012
- path: n.path,
1013
- query: n.query,
1014
- fullPath: n.fullPath,
1015
- affix: (h = n.meta) == null ? void 0 : h.affix,
1016
- keepAlive: (_ = n.meta) == null ? void 0 : _.keepAlive
1017
- });
1018
- }
1019
- function z() {
1020
- Ae(() => {
1021
- var h, _;
1022
- for (const I of s.value)
1023
- I.path === n.path && I.fullPath !== n.fullPath && o.updateVisitedView({
1024
- name: n.name,
1025
- title: n.meta.title || "",
1026
- path: n.path,
1027
- query: n.query,
1028
- fullPath: n.fullPath,
1029
- affix: (h = n.meta) == null ? void 0 : h.affix,
1030
- keepAlive: (_ = n.meta) == null ? void 0 : _.keepAlive
1031
- });
1032
- });
1033
- }
1034
- function w(h) {
1035
- return h.path === n.path;
1036
- }
1037
- function W(h) {
1038
- return h == null ? void 0 : h.affix;
1039
- }
1040
- function ee() {
1041
- try {
1042
- return m.value.path === "/dashboard" || m.value.fullPath === o.visitedViews[1].fullPath;
1043
- } catch {
1044
- return !1;
1045
- }
1046
- }
1047
- function te() {
1048
- try {
1049
- return m.value.fullPath === o.visitedViews[o.visitedViews.length - 1].fullPath;
1050
- } catch {
1051
- return !1;
1052
- }
1053
- }
1054
- function K(h) {
1055
- o.delCachedView(h);
1056
- const { fullPath: _ } = h;
1057
- Ae(() => {
1058
- t.replace({ path: "/redirect" + _ });
1059
- });
1060
- }
1061
- function Z(h, _) {
1062
- const I = h.slice(-1)[0];
1063
- I && I.fullPath ? t.push(I.fullPath) : (_ == null ? void 0 : _.name) === "Dashboard" ? t.replace({ path: "/redirect" + _.fullPath }) : t.push("/");
1064
- }
1065
- function D(h) {
1066
- o.delView(h).then((_) => {
1067
- w(h) && Z(_.visitedViews, h);
1068
- });
1069
- }
1070
- function A() {
1071
- o.delLeftViews(m.value).then((h) => {
1072
- h.visitedViews.find((_) => _.path === n.path) || Z(h.visitedViews);
1073
- });
1074
- }
1075
- function q() {
1076
- o.delRightViews(m.value).then((h) => {
1077
- h.visitedViews.find((_) => _.path === n.path) || Z(h.visitedViews);
1078
- });
1079
- }
1080
- function re() {
1081
- t.push(m.value), o.delOtherViews(m.value).then(() => {
1082
- z();
1083
- });
1084
- }
1085
- function he(h) {
1086
- o.delAllViews().then((_) => {
1087
- Z(_.visitedViews, h);
1088
- });
1089
- }
1090
- function Oe(h, _) {
1091
- const O = e == null ? void 0 : e.$el.getBoundingClientRect().left, P = (e == null ? void 0 : e.$el.offsetWidth) - 105, L = _.clientX - O + 15;
1092
- L > P ? v.value = P : v.value = L, f.value === "mix" ? g.value = _.clientY - 50 : g.value = _.clientY, y.value = !0, m.value = h;
1093
- }
1094
- function ge() {
1095
- y.value = !1;
1096
- }
1097
- function Ne() {
1098
- ge();
1099
- }
1100
- function ze(h, _) {
1101
- let I = {};
1102
- function O(P, L) {
1103
- if (I[P.name] = L, P.children)
1104
- for (let G = 0; G < P.children.length; G++)
1105
- O(P.children[G], P);
1106
- }
1107
- for (let P = 0; P < h.length; P++)
1108
- O(h[P], null);
1109
- let X = I[_];
1110
- for (; X; ) {
1111
- if (!I[X.name])
1112
- return X;
1113
- X = I[X.name];
1114
- }
1115
- return null;
1116
- }
1117
- const Fe = (h) => {
1118
- if (f.value !== "mix") return;
1119
- const _ = ze(r.routes, h);
1120
- a.activeTopMenu !== _.path && a.activeTopMenu(_.path);
1121
- };
1122
- return oe(
1123
- () => n.name,
1124
- (h) => {
1125
- h && Fe(h);
1126
- },
1127
- {
1128
- deep: !0
1129
- }
1130
- ), Ee(() => {
1131
- C();
1132
- }), (h, _) => {
1133
- const I = ln, O = V("router-link"), X = V("el-scrollbar"), P = le;
1134
- return d(), x("div", rn, [
1135
- p(X, {
1136
- class: "scroll-container",
1137
- vertical: !1,
1138
- onWheel: ce(Ne, ["prevent"])
1139
- }, {
1140
- default: b(() => [
1141
- (d(!0), x(j, null, se(l(s), (L) => (d(), S(O, {
1142
- ref_for: !0,
1143
- ref: "tagRef",
1144
- key: L.fullPath,
1145
- class: H("tags-item " + (w(L) ? "active" : "")),
1146
- to: { path: L.path, query: L.query },
1147
- onMouseup: ce((G) => W(L) ? "" : D(L), ["middle"]),
1148
- onContextmenu: ce((G) => Oe(L, G), ["prevent"])
1149
- }, {
1150
- default: b(() => [
1151
- N(E(l(St)(L)) + " ", 1),
1152
- W(L) ? $("", !0) : (d(), S(I, {
1153
- key: 0,
1154
- class: "close-icon",
1155
- size: "12px",
1156
- onClick: ce((G) => D(L), ["prevent", "stop"])
1157
- }, null, 8, ["onClick"]))
1158
- ]),
1159
- _: 2
1160
- }, 1032, ["class", "to", "onMouseup", "onContextmenu"]))), 128))
1161
- ]),
1162
- _: 1
1163
- }),
1164
- ot(k("ul", {
1165
- class: "contextmenu",
1166
- style: it({ left: l(v) + "px", top: l(g) + "px" })
1167
- }, [
1168
- k("li", {
1169
- onClick: _[0] || (_[0] = (L) => K(l(m)))
1170
- }, [
1171
- p(P, { "icon-class": "refresh" }),
1172
- _[3] || (_[3] = N(" 刷新 "))
1173
- ]),
1174
- W(l(m)) ? $("", !0) : (d(), x("li", {
1175
- key: 0,
1176
- onClick: _[1] || (_[1] = (L) => D(l(m)))
1177
- }, [
1178
- p(P, { "icon-class": "close" }),
1179
- _[4] || (_[4] = N(" 关闭 "))
1180
- ])),
1181
- k("li", { onClick: re }, [
1182
- p(P, { "icon-class": "close_other" }),
1183
- _[5] || (_[5] = N(" 关闭其它 "))
1184
- ]),
1185
- ee() ? $("", !0) : (d(), x("li", {
1186
- key: 1,
1187
- onClick: A
1188
- }, [
1189
- p(P, { "icon-class": "close_left" }),
1190
- _[6] || (_[6] = N(" 关闭左侧 "))
1191
- ])),
1192
- te() ? $("", !0) : (d(), x("li", {
1193
- key: 2,
1194
- onClick: q
1195
- }, [
1196
- p(P, { "icon-class": "close_right" }),
1197
- _[7] || (_[7] = N(" 关闭右侧 "))
1198
- ])),
1199
- k("li", {
1200
- onClick: _[2] || (_[2] = (L) => he(l(m)))
1201
- }, [
1202
- p(P, { "icon-class": "close_all" }),
1203
- _[8] || (_[8] = N(" 关闭所有 "))
1204
- ])
1205
- ], 4), [
1206
- [at, l(y)]
1207
- ])
1208
- ]);
1209
- };
1210
- }
1211
- }), un = /* @__PURE__ */ U(cn, [["__scopeId", "data-v-226b9475"]]), dn = /* @__PURE__ */ R({
1212
- name: "AppLink",
1213
- inheritAttrs: !1,
1214
- __name: "index",
1215
- props: {
1216
- to: {
1217
- type: String,
1218
- required: !0
1219
- }
1220
- },
1221
- setup(i) {
1222
- const e = i, t = B(() => de(e.to));
1223
- console.log(t.value, e.to);
1224
- const n = B(() => t.value ? "a" : "router-link"), r = (o) => t.value ? { href: o, target: "_blank", rel: "noopener noreferrer" } : { to: o };
1225
- return (o, a) => (d(), S(ke(l(n)), lt(st(r(i.to))), {
1226
- default: b(() => [
1227
- rt(o.$slots, "default")
1228
- ]),
1229
- _: 3
1230
- }, 16));
1231
- }
1232
- }), fn = {
1233
- key: 3,
1234
- class: "ml-1"
1235
- }, mn = /* @__PURE__ */ R({
1236
- __name: "SidebarMenuItemTitle",
1237
- props: {
1238
- icon: {
1239
- type: String,
1240
- default: ""
1241
- },
1242
- name: {
1243
- type: String,
1244
- default: ""
1245
- },
1246
- title: {
1247
- type: String,
1248
- default: ""
1249
- }
1250
- },
1251
- setup(i) {
1252
- return (e, t) => {
1253
- const n = V("el-icon"), r = le;
1254
- return d(), x(j, null, [
1255
- i.icon && i.icon.startsWith("el-icon") ? (d(), S(n, {
1256
- key: 0,
1257
- class: "sub-el-icon"
1258
- }, {
1259
- default: b(() => [
1260
- (d(), S(ke(i.icon.replace("el-icon-", ""))))
1261
- ]),
1262
- _: 1
1263
- })) : i.icon ? (d(), S(r, {
1264
- key: 1,
1265
- "icon-class": i.icon
1266
- }, null, 8, ["icon-class"])) : (d(), S(r, {
1267
- key: 2,
1268
- "icon-class": "menu"
1269
- })),
1270
- i.title ? (d(), x("span", fn, E(l(ve)(i.name, i.title)), 1)) : $("", !0)
1271
- ], 64);
1272
- };
1273
- }
1274
- }), pn = /* @__PURE__ */ U(mn, [["__scopeId", "data-v-992a058f"]]), _n = { key: 0 }, vn = /* @__PURE__ */ R({
1275
- name: "SidebarMenuItem",
1276
- inheritAttrs: !1,
1277
- __name: "SidebarMenuItem",
1278
- props: {
1279
- /**
1280
- * 路由(eg:user)
1281
- */
1282
- item: {
1283
- type: Object,
1284
- required: !0
1285
- },
1286
- /**
1287
- * 父层级完整路由路径(eg:/system)
1288
- */
1289
- basePath: {
1290
- type: String,
1291
- required: !0
1292
- },
1293
- isNest: {
1294
- type: Boolean,
1295
- default: !1
1296
- }
1297
- },
1298
- setup(i) {
1299
- const e = i, t = F();
1300
- function n(o = [], a) {
1301
- const s = o.filter((c) => {
1302
- var f;
1303
- return (f = c.meta) != null && f.hidden ? !1 : (c.meta.hidden = !1, t.value = c, !0);
1304
- });
1305
- return s.length === 1 ? !0 : s.length === 0 ? (t.value = { ...a, path: "", noShowingChildren: !0 }, !0) : !1;
1306
- }
1307
- function r(o) {
1308
- return de(o) ? o : de(e.basePath) ? e.basePath : De.resolve(e.basePath, o);
1309
- }
1310
- return (o, a) => {
1311
- var v;
1312
- const s = pn, c = V("el-menu-item"), f = dn, m = V("SidebarMenuItem", !0), u = V("el-sub-menu");
1313
- return !i.item.meta || !i.item.meta.hidden ? (d(), x("div", _n, [
1314
- n(i.item.children, i.item) && (!l(t).children || l(t).noShowingChildren) && !((v = i.item.meta) != null && v.alwaysShow) ? (d(), x(j, { key: 0 }, [
1315
- l(t).meta ? (d(), S(f, {
1316
- key: 0,
1317
- to: r(l(t).path)
1318
- }, {
1319
- default: b(() => [
1320
- p(c, {
1321
- index: r(l(t).path),
1322
- class: H({ "submenu-title-noDropdown": !i.isNest })
1323
- }, {
1324
- default: b(() => [
1325
- p(s, {
1326
- icon: l(t).meta.icon || i.item.meta && i.item.meta.icon,
1327
- title: l(t).meta.title,
1328
- name: l(t).name
1329
- }, null, 8, ["icon", "title", "name"])
1330
- ]),
1331
- _: 1
1332
- }, 8, ["index", "class"])
1333
- ]),
1334
- _: 1
1335
- }, 8, ["to"])) : $("", !0)
1336
- ], 64)) : (d(), S(u, {
1337
- key: 1,
1338
- index: r(i.item.path),
1339
- teleported: ""
1340
- }, {
1341
- title: b(() => [
1342
- i.item.meta ? (d(), S(s, {
1343
- key: 0,
1344
- icon: i.item.meta && i.item.meta.icon,
1345
- title: i.item.meta.title,
1346
- name: i.item.name
1347
- }, null, 8, ["icon", "title", "name"])) : $("", !0)
1348
- ]),
1349
- default: b(() => [
1350
- (d(!0), x(j, null, se(i.item.children, (g) => (d(), S(m, {
1351
- key: g.path,
1352
- "is-nest": !0,
1353
- item: g,
1354
- "base-path": r(g.path)
1355
- }, null, 8, ["item", "base-path"]))), 128))
1356
- ]),
1357
- _: 1
1358
- }, 8, ["index"]))
1359
- ])) : $("", !0);
1360
- };
1361
- }
1362
- }), hn = "_dark_168i3_12", ae = {
1363
- "sidebar-width": "210px",
1364
- "navbar-height": "50px",
1365
- "menu-background": "var(--menu-background)",
1366
- "menu-text": "var(--menu-text)",
1367
- "menu-active-text": "var(--menu-active-text)",
1368
- "menu-hover": "var(--menu-hover)",
1369
- dark: hn
1370
- }, Be = /* @__PURE__ */ R({
1371
- __name: "SidebarMenu",
1372
- props: {
1373
- menuList: {
1374
- required: !0,
1375
- default: () => [],
1376
- type: Array
1377
- },
1378
- basePath: {
1379
- type: String,
1380
- required: !0
1381
- }
1382
- },
1383
- setup(i) {
1384
- const e = ne(), t = Q(), n = me(), r = B(() => e.layout), o = i;
1385
- function a(s) {
1386
- return de(s) ? s : de(o.basePath) ? o.basePath : De.resolve(o.basePath, s);
1387
- }
1388
- return (s, c) => {
1389
- const f = vn, m = V("el-menu");
1390
- return d(), S(m, {
1391
- "default-active": l(n).path,
1392
- collapse: !l(t).sidebar.opened,
1393
- "background-color": l(ae)["menu-background"],
1394
- "text-color": l(ae)["menu-text"],
1395
- "active-text-color": l(ae)["menu-active-text"],
1396
- "unique-opened": !1,
1397
- "collapse-transition": !1,
1398
- mode: l(r) === "top" ? "horizontal" : "vertical"
1399
- }, {
1400
- default: b(() => [
1401
- (d(!0), x(j, null, se(i.menuList, (u) => (d(), S(f, {
1402
- key: u.path,
1403
- item: u,
1404
- "base-path": a(u.path),
1405
- "is-collapse": !l(t).sidebar.opened
1406
- }, null, 8, ["item", "base-path", "is-collapse"]))), 128))
1407
- ]),
1408
- _: 1
1409
- }, 8, ["default-active", "collapse", "background-color", "text-color", "active-text-color", "mode"]);
1410
- };
1411
- }
1412
- }), gn = { key: 1 }, bn = {
1413
- key: 0,
1414
- class: "ml-1"
1415
- }, xn = /* @__PURE__ */ R({
1416
- __name: "SidebarMixTopMenu",
1417
- setup(i) {
1418
- const e = Q(), t = fe(), n = Se(), r = B(() => e.activeTopMenuPath), o = F([]), a = (c) => {
1419
- e.activeTopMenu(c), t.setMixLeftMenus(c);
1420
- const f = t.mixLeftMenus;
1421
- s(f);
1422
- }, s = (c) => {
1423
- if (c.length === 0) return;
1424
- const [f] = c;
1425
- f.children && f.children.length > 0 ? s(f.children) : f.name && n.push({
1426
- name: f.name
1427
- });
1428
- };
1429
- return Ee(() => {
1430
- o.value = t.routes.filter(
1431
- (c) => !c.meta || !c.meta.hidden
1432
- );
1433
- }), (c, f) => {
1434
- const m = le, u = V("el-menu-item"), v = V("el-menu"), g = V("el-scrollbar");
1435
- return d(), S(g, null, {
1436
- default: b(() => [
1437
- p(v, {
1438
- mode: "horizontal",
1439
- "default-active": l(r),
1440
- "background-color": l(ae)["menu-background"],
1441
- "text-color": l(ae)["menu-text"],
1442
- "active-text-color": l(ae)["menu-active-text"],
1443
- onSelect: a
1444
- }, {
1445
- default: b(() => [
1446
- (d(!0), x(j, null, se(l(o), (y) => (d(), S(u, {
1447
- key: y.path,
1448
- index: y.path
1449
- }, {
1450
- title: b(() => [
1451
- y.meta && y.meta.icon ? (d(), S(m, {
1452
- key: 0,
1453
- "icon-class": y.meta.icon
1454
- }, null, 8, ["icon-class"])) : $("", !0),
1455
- y.path === "/" ? (d(), x("span", gn, E(l(ve)("Dashboard", "首页")), 1)) : (d(), x(j, { key: 2 }, [
1456
- y.meta && y.meta.title ? (d(), x("span", bn, E(l(ye)(y)), 1)) : $("", !0)
1457
- ], 64))
1458
- ]),
1459
- _: 2
1460
- }, 1032, ["index"]))), 128))
1461
- ]),
1462
- _: 1
1463
- }, 8, ["default-active", "background-color", "text-color", "active-text-color"])
1464
- ]),
1465
- _: 1
1466
- });
1467
- };
1468
- }
1469
- }), yn = { class: "logo-container" }, wn = ["src"], kn = ["src"], Sn = { class: "logo-title" }, Cn = /* @__PURE__ */ R({
1470
- __name: "SidebarLogo",
1471
- props: {
1472
- collapse: {
1473
- type: Boolean,
1474
- required: !0
1475
- }
1476
- },
1477
- setup(i) {
1478
- const e = ne(), t = ue.logo;
1479
- return (n, r) => {
1480
- const o = V("router-link");
1481
- return d(), x("div", yn, [
1482
- p(Pe, { "enter-active-class": "animate__animated animate__fadeInLeft" }, {
1483
- default: b(() => [
1484
- i.collapse ? (d(), S(o, {
1485
- key: 0,
1486
- class: "wh-full flex-center",
1487
- to: "/"
1488
- }, {
1489
- default: b(() => [
1490
- l(e).sidebarLogo ? (d(), x("img", {
1491
- key: 0,
1492
- src: l(t),
1493
- class: "logo-image"
1494
- }, null, 8, wn)) : $("", !0)
1495
- ]),
1496
- _: 1
1497
- })) : (d(), S(o, {
1498
- key: 1,
1499
- class: "wh-full flex-center",
1500
- to: "/"
1501
- }, {
1502
- default: b(() => [
1503
- l(e).sidebarLogo ? (d(), x("img", {
1504
- key: 0,
1505
- src: l(t),
1506
- class: "logo-image"
1507
- }, null, 8, kn)) : $("", !0),
1508
- k("span", Sn, E(l(ue).title), 1)
1509
- ]),
1510
- _: 1
1511
- }))
1512
- ]),
1513
- _: 1
1514
- })
1515
- ]);
1516
- };
1517
- }
1518
- }), Tn = /* @__PURE__ */ U(Cn, [["__scopeId", "data-v-210c85a9"]]), Vn = {
1519
- key: 0,
1520
- class: "flex w-full"
1521
- }, $n = /* @__PURE__ */ R({
1522
- __name: "index",
1523
- setup(i) {
1524
- const e = Q(), t = ne(), n = fe(), r = B(() => t.sidebarLogo), o = B(() => t.layout);
1525
- return (a, s) => {
1526
- const c = Tn, f = xn, m = Le, u = Be, v = V("el-scrollbar");
1527
- return d(), x("div", {
1528
- class: H({ "has-logo": l(r) })
1529
- }, [
1530
- l(o) == "mix" ? (d(), x("div", Vn, [
1531
- l(r) ? (d(), S(c, {
1532
- key: 0,
1533
- collapse: !l(e).sidebar.opened
1534
- }, null, 8, ["collapse"])) : $("", !0),
1535
- p(f, { class: "flex-1" }),
1536
- p(m)
1537
- ])) : (d(), x(j, { key: 1 }, [
1538
- l(r) ? (d(), S(c, {
1539
- key: 0,
1540
- collapse: !l(e).sidebar.opened
1541
- }, null, 8, ["collapse"])) : $("", !0),
1542
- p(v, null, {
1543
- default: b(() => [
1544
- p(u, {
1545
- "menu-list": l(n).routes,
1546
- "base-path": ""
1547
- }, null, 8, ["menu-list"])
1548
- ]),
1549
- _: 1
1550
- }),
1551
- l(o) === "top" ? (d(), S(m, { key: 1 })) : $("", !0)
1552
- ], 64))
1553
- ], 2);
1554
- };
1555
- }
1556
- }), An = /* @__PURE__ */ U($n, [["__scopeId", "data-v-a6d3f8e9"]]), Mn = {
1557
- key: 1,
1558
- class: "mix-container"
1559
- }, Pn = { class: "mix-container__left" }, En = { class: "sidebar-toggle" }, Ln = 992, In = /* @__PURE__ */ R({
1560
- __name: "index",
1561
- setup(i) {
1562
- const e = Q(), t = ne(), n = fe(), r = B(() => t.fixedHeader), o = B(() => t.tagsView), a = B(() => t.layout), s = B(() => e.activeTopMenuPath), c = B(() => n.mixLeftMenus);
1563
- oe(
1564
- () => s.value,
1565
- (g) => {
1566
- n.setMixLeftMenus(g);
1567
- },
1568
- {
1569
- deep: !0,
1570
- immediate: !0
1571
- }
1572
- );
1573
- const f = B(() => ({
1574
- hideSidebar: !e.sidebar.opened,
1575
- openSidebar: e.sidebar.opened,
1576
- mobile: e.device === pe.MOBILE,
1577
- "layout-left": a.value === "left",
1578
- "layout-top": a.value === "top",
1579
- "layout-mix": a.value === "mix"
1580
- })), m = Qe().width;
1581
- ct(() => {
1582
- m.value < Ln ? (e.toggleDevice(pe.MOBILE), e.closeSideBar()) : (e.toggleDevice(pe.DESKTOP), m.value >= 1200 ? e.openSideBar() : e.closeSideBar());
1583
- });
1584
- function u() {
1585
- e.closeSideBar();
1586
- }
1587
- function v() {
1588
- e.toggleSidebar();
1589
- }
1590
- return (g, y) => {
1591
- const M = An, C = Be, T = Ie, z = un, w = nn, W = Zt, ee = Rt;
1592
- return d(), x("div", {
1593
- class: H(["wh-full", l(f)])
1594
- }, [
1595
- l(f).mobile && l(f).openSidebar ? (d(), x("div", {
1596
- key: 0,
1597
- class: "wh-full fixed-lt z-999 bg-black bg-opacity-30",
1598
- onClick: u
1599
- })) : $("", !0),
1600
- p(M, { class: "sidebar-container" }),
1601
- l(a) === "mix" ? (d(), x("div", Mn, [
1602
- k("div", Pn, [
1603
- p(C, {
1604
- "menu-list": l(c),
1605
- "base-path": l(s)
1606
- }, null, 8, ["menu-list", "base-path"]),
1607
- k("div", En, [
1608
- p(T, {
1609
- "is-active": l(e).sidebar.opened,
1610
- onToggleClick: v
1611
- }, null, 8, ["is-active"])
1612
- ])
1613
- ]),
1614
- k("div", {
1615
- class: H([{ hasTagsView: l(o) }, "main-container"])
1616
- }, [
1617
- k("div", {
1618
- class: H({ "fixed-header": l(r) })
1619
- }, [
1620
- l(o) ? (d(), S(z, { key: 0 })) : $("", !0)
1621
- ], 2),
1622
- p(w),
1623
- l(ue).showSettings ? (d(), S(W, { key: 0 })) : $("", !0)
1624
- ], 2)
1625
- ])) : (d(), x("div", {
1626
- key: 2,
1627
- class: H([{ hasTagsView: l(o) }, "main-container"])
1628
- }, [
1629
- k("div", {
1630
- class: H({ "fixed-header": l(r) })
1631
- }, [
1632
- l(a) === "left" ? (d(), S(ee, { key: 0 })) : $("", !0),
1633
- l(o) ? (d(), S(z, { key: 1 })) : $("", !0)
1634
- ], 2),
1635
- p(w),
1636
- l(ue).showSettings ? (d(), S(W, { key: 0 })) : $("", !0)
1637
- ], 2))
1638
- ], 2);
1639
- };
1640
- }
1641
- }), Fn = /* @__PURE__ */ U(In, [["__scopeId", "data-v-71891bc2"]]);
1642
- export {
1643
- Fn as default
1644
- };