@morningfast/platform 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/main/style.css +1 -1
- package/dist/assets/sub/style.css +1 -1
- package/dist/chunks/{main-CA2I4UGE.js → main-BVdwJu-s.js} +162 -144
- package/dist/chunks/{route-items-CIUjZc6w.js → route-items-84k92f3O.js} +180 -158
- package/dist/index.js +2 -2
- package/dist/main/stores/app.d.ts +11 -2
- package/dist/main.js +2 -2
- package/dist/sub.js +1 -1
- package/package.json +1 -1
|
@@ -2,14 +2,14 @@ import { clearAuth as e, emitAuthExpired as t, getAccessToken as n, onAuthExpire
|
|
|
2
2
|
import { createRequestClient as i } from "../request.js";
|
|
3
3
|
import { t as a } from "./auth-C3RvRgcW.js";
|
|
4
4
|
import { i as o, n as s, r as c, t as l } from "./system-DZaKDrG6.js";
|
|
5
|
-
import { a as u, i as d, r as f } from "./route-items-
|
|
5
|
+
import { a as u, i as d, r as f } from "./route-items-84k92f3O.js";
|
|
6
6
|
import { t as p } from "./_plugin-vue_export-helper-DvRHjpsZ.js";
|
|
7
7
|
import { createRouter as m, createWebHistory as h, useRoute as g, useRouter as _ } from "vue-router";
|
|
8
8
|
import v from "nprogress";
|
|
9
9
|
import y, { ElMessage as b } from "element-plus";
|
|
10
|
-
import { Fragment as x, Teleport as S, Transition as C, TransitionGroup as w, computed as T, createApp as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createTextVNode as j, createVNode as M, defineComponent as N, nextTick as P, normalizeClass as F, normalizeStyle as I, onBeforeUnmount as ee, onMounted as te, onUnmounted as ne, openBlock as L, ref as R, renderList as z, resolveComponent as B, resolveDynamicComponent as V, toDisplayString as H, unref as U, watch as W, watchEffect as G, withCtx as K, withKeys as
|
|
11
|
-
import { createPinia as
|
|
12
|
-
import { ArrowDown as
|
|
10
|
+
import { Fragment as x, Teleport as S, Transition as C, TransitionGroup as w, computed as T, createApp as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createTextVNode as j, createVNode as M, defineComponent as N, nextTick as P, normalizeClass as F, normalizeStyle as I, onBeforeUnmount as ee, onMounted as te, onUnmounted as ne, openBlock as L, ref as R, renderList as z, resolveComponent as B, resolveDynamicComponent as V, toDisplayString as H, unref as U, watch as W, watchEffect as G, withCtx as K, withKeys as re, withModifiers as q } from "vue";
|
|
11
|
+
import { createPinia as ie, defineStore as J } from "pinia";
|
|
12
|
+
import { ArrowDown as ae, ArrowRight as oe, ArrowUp as se, Back as ce, Brush as le, Close as ue, Connection as de, DArrowLeft as fe, DArrowRight as pe, Expand as me, Fold as he, FolderDelete as ge, House as _e, Monitor as ve, Moon as ye, Operation as be, RefreshRight as xe, Search as Y, Setting as Se, Sunny as Ce, SwitchButton as we, TopRight as Te, User as Ee } from "@element-plus/icons-vue";
|
|
13
13
|
import { MpDrawer as De, MpLoadingService as Oe, registerMpFormFieldComponents as ke } from "morningfast-plus/components";
|
|
14
14
|
import Ae from "sortablejs";
|
|
15
15
|
import je from "element-plus/es/locale/lang/zh-cn";
|
|
@@ -132,7 +132,7 @@ function Ye(e) {
|
|
|
132
132
|
lastActiveTab: e.lastActiveTab
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
var Q =
|
|
135
|
+
var Q = J("tabs", () => {
|
|
136
136
|
let e = R([Z()]), t = R(X), n = R(""), r = R(!1), i = T(() => e.value.map((e) => e.path));
|
|
137
137
|
async function a() {
|
|
138
138
|
r.value && await o(We, Ye({
|
|
@@ -264,12 +264,12 @@ var Q = Y("tabs", () => {
|
|
|
264
264
|
{
|
|
265
265
|
label: "深色",
|
|
266
266
|
value: "dark",
|
|
267
|
-
icon:
|
|
267
|
+
icon: ye
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
270
|
label: "跟随系统",
|
|
271
271
|
value: "system",
|
|
272
|
-
icon:
|
|
272
|
+
icon: ve
|
|
273
273
|
}
|
|
274
274
|
], i = [
|
|
275
275
|
{
|
|
@@ -311,11 +311,11 @@ var Q = Y("tabs", () => {
|
|
|
311
311
|
], o = [{
|
|
312
312
|
label: "顶部搜索",
|
|
313
313
|
value: "header",
|
|
314
|
-
icon:
|
|
314
|
+
icon: Y
|
|
315
315
|
}, {
|
|
316
316
|
label: "侧边搜索",
|
|
317
317
|
value: "sidebar",
|
|
318
|
-
icon:
|
|
318
|
+
icon: be
|
|
319
319
|
}];
|
|
320
320
|
function s(e) {
|
|
321
321
|
e && t.setThemeColor(e);
|
|
@@ -379,7 +379,7 @@ var Q = Y("tabs", () => {
|
|
|
379
379
|
"onUpdate:modelValue": s
|
|
380
380
|
}, null, 8, ["model-value"]),
|
|
381
381
|
A("span", gt, [M(d, { size: 18 }, {
|
|
382
|
-
default: K(() => [M(U(
|
|
382
|
+
default: K(() => [M(U(le))]),
|
|
383
383
|
_: 1
|
|
384
384
|
})]),
|
|
385
385
|
l[3] ||= A("span", { class: "settings-color-card__label" }, "自定义", -1)
|
|
@@ -471,7 +471,7 @@ var Q = Y("tabs", () => {
|
|
|
471
471
|
title: U(t).isDark ? "切换浅色模式" : "切换深色模式",
|
|
472
472
|
onClick: n
|
|
473
473
|
}, [M(i, { size: 20 }, {
|
|
474
|
-
default: K(() => [(L(), D(V(U(t).isDark ? U(Ce) : U(
|
|
474
|
+
default: K(() => [(L(), D(V(U(t).isDark ? U(Ce) : U(ye))))]),
|
|
475
475
|
_: 1
|
|
476
476
|
})], 8, At);
|
|
477
477
|
};
|
|
@@ -480,7 +480,7 @@ var Q = Y("tabs", () => {
|
|
|
480
480
|
//#endregion
|
|
481
481
|
//#region src/main/layouts/composables/useAppMenus.ts
|
|
482
482
|
function Mt() {
|
|
483
|
-
let e = g(), t = _(), n = f(), r = a(), i = T(() => Nt(t.options.routes.find((e) => e.path === "/")?.children ?? [], "", r.hasPermission)), o = T(() => i.value), s = T(() => n.layoutMode
|
|
483
|
+
let e = g(), t = _(), n = f(), r = a(), i = T(() => Nt(t.options.routes.find((e) => e.path === "/")?.children ?? [], "", r.hasPermission)), o = T(() => i.value), s = T(() => n.isMobileViewport || n.layoutMode !== "mix" ? i.value : i.value.find((e) => e.fullPath === n.selectedTopMenuPath)?.children ?? []), c = T(() => Pt(i.value).filter((e) => !e.children?.length)), l = T(() => Pt(s.value).filter((e) => !e.children?.length));
|
|
484
484
|
return {
|
|
485
485
|
activeMenu: T(() => e.path),
|
|
486
486
|
activeTopMenuPath: T(() => {
|
|
@@ -590,13 +590,13 @@ var Vt = ["src", "alt"], Ht = ["src", "alt"], Ut = /* @__PURE__ */ p(/* @__PURE_
|
|
|
590
590
|
}, null, 8, Ht)) : O("", !0)], 4));
|
|
591
591
|
}
|
|
592
592
|
}), [["__scopeId", "data-v-a42b8639"]]), Wt = {
|
|
593
|
-
Connection:
|
|
594
|
-
House:
|
|
593
|
+
Connection: de,
|
|
594
|
+
House: _e,
|
|
595
595
|
Setting: Se,
|
|
596
596
|
User: Ee
|
|
597
597
|
};
|
|
598
598
|
function $(e) {
|
|
599
|
-
return e ? Wt[e] ??
|
|
599
|
+
return e ? Wt[e] ?? _e : _e;
|
|
600
600
|
}
|
|
601
601
|
//#endregion
|
|
602
602
|
//#region src/main/layouts/components/AppHeaderMenuNode.vue
|
|
@@ -659,7 +659,7 @@ var Gt = /* @__PURE__ */ N({
|
|
|
659
659
|
role: "button",
|
|
660
660
|
tabindex: "0",
|
|
661
661
|
onClick: r[1] ||= (t) => n("select", e.item),
|
|
662
|
-
onKeydown: [r[2] ||= q(
|
|
662
|
+
onKeydown: [r[2] ||= re(q((t) => n("select", e.item), ["prevent"]), ["enter"]), r[3] ||= re(q((t) => n("select", e.item), ["prevent"]), ["space"])]
|
|
663
663
|
}, [
|
|
664
664
|
A("span", qt, [M(i, null, {
|
|
665
665
|
default: K(() => [(L(), D(V(U($)(e.item.icon))))]),
|
|
@@ -676,9 +676,9 @@ var Gt = /* @__PURE__ */ N({
|
|
|
676
676
|
class: "app-menu-search-item__remove",
|
|
677
677
|
type: "button",
|
|
678
678
|
"aria-label": "删除搜索历史",
|
|
679
|
-
onClick: r[0] ||=
|
|
679
|
+
onClick: r[0] ||= q((t) => n("remove", e.item), ["stop"])
|
|
680
680
|
}, [M(i, null, {
|
|
681
|
-
default: K(() => [M(U(
|
|
681
|
+
default: K(() => [M(U(ue))]),
|
|
682
682
|
_: 1
|
|
683
683
|
})])) : O("", !0)])) : O("", !0)]),
|
|
684
684
|
_: 1
|
|
@@ -706,19 +706,19 @@ var Gt = /* @__PURE__ */ N({
|
|
|
706
706
|
}) : []), m = T(() => c.value ? p.value : d.value), h = T(() => c.value ? !p.value.length : !d.value.length);
|
|
707
707
|
W(() => n.modelValue, (e) => {
|
|
708
708
|
if (!e) {
|
|
709
|
-
|
|
709
|
+
J();
|
|
710
710
|
return;
|
|
711
711
|
}
|
|
712
|
-
d.value = V(), c.value = "", u.value = d.value[0] ?? null, l.value = 0, document.body.classList.add("app-menu-search-open"),
|
|
712
|
+
d.value = V(), c.value = "", u.value = d.value[0] ?? null, l.value = 0, document.body.classList.add("app-menu-search-open"), ie(), P(() => {
|
|
713
713
|
o.value?.focus?.(), s.value?.setScrollTop?.(0);
|
|
714
714
|
});
|
|
715
715
|
}), W(p, (e) => {
|
|
716
716
|
u.value = e[0] ?? null, s.value?.setScrollTop?.(0);
|
|
717
717
|
}), ee(() => {
|
|
718
|
-
|
|
718
|
+
J();
|
|
719
719
|
});
|
|
720
720
|
function g() {
|
|
721
|
-
r("update:modelValue", !1),
|
|
721
|
+
r("update:modelValue", !1), J();
|
|
722
722
|
}
|
|
723
723
|
function v(e) {
|
|
724
724
|
u.value = e;
|
|
@@ -752,7 +752,7 @@ var Gt = /* @__PURE__ */ N({
|
|
|
752
752
|
function I(e) {
|
|
753
753
|
let t = m.value;
|
|
754
754
|
if (!t.length) return;
|
|
755
|
-
let n =
|
|
755
|
+
let n = re((u.value ? t.findIndex((e) => e.fullPath === u.value?.fullPath) : -1) + e, 0, t.length - 1), r = t[n];
|
|
756
756
|
r && (u.value = r, te(n));
|
|
757
757
|
}
|
|
758
758
|
function te(e) {
|
|
@@ -779,13 +779,13 @@ var Gt = /* @__PURE__ */ N({
|
|
|
779
779
|
}
|
|
780
780
|
localStorage.setItem(an, JSON.stringify(e));
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function re(e, t, n) {
|
|
783
783
|
return Math.min(Math.max(e, t), n);
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function ie() {
|
|
786
786
|
window.removeEventListener("keydown", F, !0), window.addEventListener("keydown", F, !0);
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function J() {
|
|
789
789
|
document.body.classList.remove("app-menu-search-open"), window.removeEventListener("keydown", F, !0);
|
|
790
790
|
}
|
|
791
791
|
return (t, n) => {
|
|
@@ -795,10 +795,10 @@ var Gt = /* @__PURE__ */ N({
|
|
|
795
795
|
key: 0,
|
|
796
796
|
class: "app-menu-search",
|
|
797
797
|
tabindex: "-1",
|
|
798
|
-
onClick:
|
|
798
|
+
onClick: q(g, ["self"])
|
|
799
799
|
}, [A("div", {
|
|
800
800
|
class: "app-menu-search__panel",
|
|
801
|
-
onClick: n[1] ||=
|
|
801
|
+
onClick: n[1] ||= q(() => {}, ["stop"])
|
|
802
802
|
}, [
|
|
803
803
|
A("div", $t, [M(i, {
|
|
804
804
|
ref_key: "searchInputRef",
|
|
@@ -810,7 +810,7 @@ var Gt = /* @__PURE__ */ N({
|
|
|
810
810
|
clearable: ""
|
|
811
811
|
}, {
|
|
812
812
|
prefix: K(() => [M(r, null, {
|
|
813
|
-
default: K(() => [M(U(
|
|
813
|
+
default: K(() => [M(U(Y))]),
|
|
814
814
|
_: 1
|
|
815
815
|
})]),
|
|
816
816
|
_: 1
|
|
@@ -865,11 +865,11 @@ var Gt = /* @__PURE__ */ N({
|
|
|
865
865
|
n[5] ||= A("span", null, [A("kbd", null, "Enter"), j("选择")], -1),
|
|
866
866
|
A("span", null, [
|
|
867
867
|
M(r, null, {
|
|
868
|
-
default: K(() => [M(U(
|
|
868
|
+
default: K(() => [M(U(ae))]),
|
|
869
869
|
_: 1
|
|
870
870
|
}),
|
|
871
871
|
M(r, null, {
|
|
872
|
-
default: K(() => [M(U(
|
|
872
|
+
default: K(() => [M(U(se))]),
|
|
873
873
|
_: 1
|
|
874
874
|
}),
|
|
875
875
|
n[4] ||= j("切换", -1)
|
|
@@ -908,7 +908,7 @@ var fn = { class: "app-menu-search-trigger__shortcut" }, pn = /* @__PURE__ */ N(
|
|
|
908
908
|
onClick: i[0] ||= (e) => n("open")
|
|
909
909
|
}, [
|
|
910
910
|
M(a, null, {
|
|
911
|
-
default: K(() => [M(U(
|
|
911
|
+
default: K(() => [M(U(Y))]),
|
|
912
912
|
_: 1
|
|
913
913
|
}),
|
|
914
914
|
i[1] ||= A("span", { class: "app-menu-search-trigger__text" }, "搜索页面", -1),
|
|
@@ -919,7 +919,7 @@ var fn = { class: "app-menu-search-trigger__shortcut" }, pn = /* @__PURE__ */ N(
|
|
|
919
919
|
}), mn = { class: "app-layout__header-left" }, hn = {
|
|
920
920
|
key: 0,
|
|
921
921
|
class: "app-layout__header-brand"
|
|
922
|
-
}, gn = { class: "app-layout__header-right" },
|
|
922
|
+
}, gn = ["title", "aria-label"], _n = { class: "app-layout__header-right" }, vn = { class: "app-layout__user" }, yn = { class: "app-layout__user-copy" }, bn = /* @__PURE__ */ N({
|
|
923
923
|
__name: "AppHeader",
|
|
924
924
|
props: { breadcrumbItems: {} },
|
|
925
925
|
setup(e) {
|
|
@@ -965,16 +965,18 @@ var fn = { class: "app-menu-search-trigger__shortcut" }, pn = /* @__PURE__ */ N(
|
|
|
965
965
|
"alt",
|
|
966
966
|
"text-inverted"
|
|
967
967
|
])])) : O("", !0),
|
|
968
|
-
U(n).layoutMode
|
|
968
|
+
U(n).layoutMode !== "top" || U(n).isMobileViewport ? (L(), k("button", {
|
|
969
969
|
key: 1,
|
|
970
970
|
type: "button",
|
|
971
971
|
class: "app-layout__header-tool-btn app-layout__header-tool-btn--collapse",
|
|
972
|
+
title: U(n).isMobileViewport ? "打开菜单" : U(n).sidebarCollapsed ? "展开侧边栏" : "折叠侧边栏",
|
|
973
|
+
"aria-label": U(n).isMobileViewport ? "打开菜单" : U(n).sidebarCollapsed ? "展开侧边栏" : "折叠侧边栏",
|
|
972
974
|
onClick: a[0] ||= (e) => U(n).toggleSidebar()
|
|
973
975
|
}, [M(o, null, {
|
|
974
|
-
default: K(() => [(L(), D(V(U(n).sidebarCollapsed ? U(
|
|
976
|
+
default: K(() => [(L(), D(V(U(n).sidebarCollapsed && !U(n).isMobileViewport ? U(me) : U(he))))]),
|
|
975
977
|
_: 1
|
|
976
|
-
})])),
|
|
977
|
-
U(n).layoutMode === "top" ? (L(), D(s, {
|
|
978
|
+
})], 8, gn)) : O("", !0),
|
|
979
|
+
U(n).layoutMode === "top" && !U(n).isMobileViewport ? (L(), D(s, {
|
|
978
980
|
key: 2,
|
|
979
981
|
mode: "horizontal",
|
|
980
982
|
ellipsis: !1,
|
|
@@ -987,7 +989,7 @@ var fn = { class: "app-menu-search-trigger__shortcut" }, pn = /* @__PURE__ */ N(
|
|
|
987
989
|
node: e
|
|
988
990
|
}, null, 8, ["node"]))), 128))]),
|
|
989
991
|
_: 1
|
|
990
|
-
}, 8, ["default-active"])) : U(n).layoutMode === "mix" ? (L(), D(s, {
|
|
992
|
+
}, 8, ["default-active"])) : U(n).layoutMode === "mix" && !U(n).isMobileViewport ? (L(), D(s, {
|
|
991
993
|
key: 3,
|
|
992
994
|
mode: "horizontal",
|
|
993
995
|
ellipsis: !1,
|
|
@@ -1006,7 +1008,7 @@ var fn = { class: "app-menu-search-trigger__shortcut" }, pn = /* @__PURE__ */ N(
|
|
|
1006
1008
|
}, 8, ["default-active"])) : O("", !0),
|
|
1007
1009
|
U(n).layoutMode === "default" || U(n).layoutMode === "side" ? (L(), D(p, {
|
|
1008
1010
|
key: 4,
|
|
1009
|
-
"separator-icon": U(
|
|
1011
|
+
"separator-icon": U(oe)
|
|
1010
1012
|
}, {
|
|
1011
1013
|
default: K(() => [(L(!0), k(x, null, z(e.breadcrumbItems, (e, t) => (L(), D(f, {
|
|
1012
1014
|
key: e.path || String(e.name),
|
|
@@ -1025,7 +1027,7 @@ var fn = { class: "app-menu-search-trigger__shortcut" }, pn = /* @__PURE__ */ N(
|
|
|
1025
1027
|
"layout-mode": U(n).layoutMode,
|
|
1026
1028
|
onOpen: N
|
|
1027
1029
|
}, null, 8, ["layout-mode"])], 2)) : O("", !0),
|
|
1028
|
-
A("div",
|
|
1030
|
+
A("div", _n, [
|
|
1029
1031
|
U(n).layoutMode === "mix" && !U(n).isSidebarMenuSearch ? (L(), D(pn, {
|
|
1030
1032
|
key: 0,
|
|
1031
1033
|
"layout-mode": U(n).layoutMode,
|
|
@@ -1040,7 +1042,7 @@ var fn = { class: "app-menu-search-trigger__shortcut" }, pn = /* @__PURE__ */ N(
|
|
|
1040
1042
|
size: 18,
|
|
1041
1043
|
class: "app-layout__header-tool-icon"
|
|
1042
1044
|
}, {
|
|
1043
|
-
default: K(() => [M(U(
|
|
1045
|
+
default: K(() => [M(U(le))]),
|
|
1044
1046
|
_: 1
|
|
1045
1047
|
})]),
|
|
1046
1048
|
M(jt),
|
|
@@ -1061,14 +1063,14 @@ var fn = { class: "app-menu-search-trigger__shortcut" }, pn = /* @__PURE__ */ N(
|
|
|
1061
1063
|
})]),
|
|
1062
1064
|
_: 1
|
|
1063
1065
|
})]),
|
|
1064
|
-
default: K(() => [A("div",
|
|
1066
|
+
default: K(() => [A("div", vn, [
|
|
1065
1067
|
M(m, { size: 32 }, {
|
|
1066
1068
|
default: K(() => [j(H(U(r).userName.slice(0, 1)), 1)]),
|
|
1067
1069
|
_: 1
|
|
1068
1070
|
}),
|
|
1069
|
-
A("div",
|
|
1071
|
+
A("div", yn, [A("strong", null, H(U(r).userName), 1), A("span", null, H(U(r).userRoleLabel), 1)]),
|
|
1070
1072
|
M(o, null, {
|
|
1071
|
-
default: K(() => [M(U(
|
|
1073
|
+
default: K(() => [M(U(ae))]),
|
|
1072
1074
|
_: 1
|
|
1073
1075
|
})
|
|
1074
1076
|
])]),
|
|
@@ -1086,40 +1088,40 @@ var fn = { class: "app-menu-search-trigger__shortcut" }, pn = /* @__PURE__ */ N(
|
|
|
1086
1088
|
});
|
|
1087
1089
|
//#endregion
|
|
1088
1090
|
//#region src/main/layouts/utils/menuSearch.ts
|
|
1089
|
-
function
|
|
1091
|
+
function xn(e, t) {
|
|
1090
1092
|
let n = t.trim().toLowerCase();
|
|
1091
1093
|
if (!n) return [...e];
|
|
1092
1094
|
let r = [];
|
|
1093
1095
|
for (let t of e) {
|
|
1094
|
-
let e =
|
|
1095
|
-
!(
|
|
1096
|
+
let e = xn(t.children ?? [], n);
|
|
1097
|
+
!(wn(t) && Cn(t, n)) && !e.length || r.push({
|
|
1096
1098
|
...t,
|
|
1097
1099
|
children: e.length ? e : void 0
|
|
1098
1100
|
});
|
|
1099
1101
|
}
|
|
1100
1102
|
return r;
|
|
1101
1103
|
}
|
|
1102
|
-
function
|
|
1103
|
-
let n =
|
|
1104
|
+
function Sn(e, t) {
|
|
1105
|
+
let n = Tn(e), r = t.trim();
|
|
1104
1106
|
if (!r) return n;
|
|
1105
1107
|
let i = Array.from(e), a = e.toLowerCase(), o = r.toLowerCase(), s = a.indexOf(o);
|
|
1106
|
-
return s < 0 ? n : `${
|
|
1108
|
+
return s < 0 ? n : `${Tn(i.slice(0, s).join(""))}<mark class="app-menu-search-highlight">${Tn(i.slice(s, s + r.length).join(""))}</mark>${Tn(i.slice(s + r.length).join(""))}`;
|
|
1107
1109
|
}
|
|
1108
|
-
function
|
|
1110
|
+
function Cn(e, t) {
|
|
1109
1111
|
return e.title.toLowerCase().includes(t);
|
|
1110
1112
|
}
|
|
1111
|
-
function
|
|
1113
|
+
function wn(e) {
|
|
1112
1114
|
return !e.children?.length;
|
|
1113
1115
|
}
|
|
1114
|
-
function
|
|
1116
|
+
function Tn(e) {
|
|
1115
1117
|
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
1116
1118
|
}
|
|
1117
1119
|
//#endregion
|
|
1118
1120
|
//#region src/main/layouts/components/AppSidebarSearch.vue?vue&type=script&setup=true&lang.ts
|
|
1119
|
-
var
|
|
1121
|
+
var En = {
|
|
1120
1122
|
key: 0,
|
|
1121
1123
|
class: "app-sidebar-search"
|
|
1122
|
-
},
|
|
1124
|
+
}, Dn = /* @__PURE__ */ N({
|
|
1123
1125
|
__name: "AppSidebarSearch",
|
|
1124
1126
|
props: {
|
|
1125
1127
|
collapsed: { type: Boolean },
|
|
@@ -1130,21 +1132,21 @@ var Tn = {
|
|
|
1130
1132
|
let n = t;
|
|
1131
1133
|
return (t, r) => {
|
|
1132
1134
|
let i = B("el-icon"), a = B("el-input");
|
|
1133
|
-
return e.collapsed ? O("", !0) : (L(), k("div",
|
|
1135
|
+
return e.collapsed ? O("", !0) : (L(), k("div", En, [M(a, {
|
|
1134
1136
|
"model-value": e.keyword,
|
|
1135
1137
|
placeholder: "搜索菜单",
|
|
1136
1138
|
clearable: "",
|
|
1137
1139
|
"onUpdate:modelValue": r[0] ||= (e) => n("update:keyword", e)
|
|
1138
1140
|
}, {
|
|
1139
1141
|
prefix: K(() => [M(i, null, {
|
|
1140
|
-
default: K(() => [M(U(
|
|
1142
|
+
default: K(() => [M(U(Y))]),
|
|
1141
1143
|
_: 1
|
|
1142
1144
|
})]),
|
|
1143
1145
|
_: 1
|
|
1144
1146
|
}, 8, ["model-value"])]));
|
|
1145
1147
|
};
|
|
1146
1148
|
}
|
|
1147
|
-
}),
|
|
1149
|
+
}), On = ["innerHTML"], kn = ["innerHTML"], An = /* @__PURE__ */ N({
|
|
1148
1150
|
name: "AppSidebarNode",
|
|
1149
1151
|
__name: "AppSidebarNode",
|
|
1150
1152
|
props: {
|
|
@@ -1152,7 +1154,7 @@ var Tn = {
|
|
|
1152
1154
|
keyword: {}
|
|
1153
1155
|
},
|
|
1154
1156
|
setup(e) {
|
|
1155
|
-
let t = e, n = T(() =>
|
|
1157
|
+
let t = e, n = T(() => Sn(t.node.title, t.keyword ?? ""));
|
|
1156
1158
|
return (t, r) => {
|
|
1157
1159
|
let i = B("el-icon"), a = B("AppSidebarNode", !0), o = B("el-sub-menu"), s = B("el-menu-item");
|
|
1158
1160
|
return e.node.children?.length ? (L(), D(o, {
|
|
@@ -1162,7 +1164,7 @@ var Tn = {
|
|
|
1162
1164
|
title: K(() => [M(i, null, {
|
|
1163
1165
|
default: K(() => [(L(), D(V(U($)(e.node.icon))))]),
|
|
1164
1166
|
_: 1
|
|
1165
|
-
}), A("span", { innerHTML: n.value }, null, 8,
|
|
1167
|
+
}), A("span", { innerHTML: n.value }, null, 8, On)]),
|
|
1166
1168
|
default: K(() => [(L(!0), k(x, null, z(e.node.children, (t) => (L(), D(a, {
|
|
1167
1169
|
key: t.fullPath,
|
|
1168
1170
|
node: t,
|
|
@@ -1173,43 +1175,44 @@ var Tn = {
|
|
|
1173
1175
|
key: 1,
|
|
1174
1176
|
index: e.node.fullPath
|
|
1175
1177
|
}, {
|
|
1176
|
-
default: K(() => [A("span", { innerHTML: n.value }, null, 8,
|
|
1178
|
+
default: K(() => [A("span", { innerHTML: n.value }, null, 8, kn)]),
|
|
1177
1179
|
_: 1
|
|
1178
1180
|
}, 8, ["index"]));
|
|
1179
1181
|
};
|
|
1180
1182
|
}
|
|
1181
|
-
}),
|
|
1183
|
+
}), jn = {
|
|
1182
1184
|
key: 0,
|
|
1183
1185
|
class: "app-layout__brand"
|
|
1184
|
-
},
|
|
1186
|
+
}, Mn = /* @__PURE__ */ N({
|
|
1185
1187
|
name: "AppSidebar",
|
|
1186
1188
|
__name: "AppSidebar",
|
|
1187
1189
|
setup(e) {
|
|
1188
|
-
let t = f(), n = l(), { activeMenu: r, sideMenus: i } = Mt(), a = R(""), o = T(() => t.themeColorPosition === "sidebar" || t.isDark), s = T(() => o.value ? n.logoHeader : n.logoExpanded), c = T(() => o.value && s.value === n.logoExpanded), u = T(() => t.isSidebarMenuSearch ?
|
|
1190
|
+
let t = f(), n = l(), { activeMenu: r, sideMenus: i } = Mt(), a = R(""), o = T(() => t.themeColorPosition === "sidebar" || t.isDark), s = T(() => o.value ? n.logoHeader : n.logoExpanded), c = T(() => o.value && s.value === n.logoExpanded), u = T(() => t.isMobileViewport ? !1 : t.sidebarCollapsed), d = T(() => t.layoutMode !== "top" || t.isMobileViewport), p = T(() => t.isSidebarMenuSearch ? xn(i.value, a.value) : i.value), m = T(() => !t.isSidebarMenuSearch || !a.value.trim() ? [] : h(p.value));
|
|
1189
1191
|
W(() => t.isSidebarMenuSearch, (e) => {
|
|
1190
1192
|
e || (a.value = "");
|
|
1191
1193
|
});
|
|
1192
|
-
function
|
|
1194
|
+
function h(e) {
|
|
1193
1195
|
let t = [];
|
|
1194
|
-
for (let n of e) n.children?.length && (t.push(n.fullPath), t.push(...
|
|
1196
|
+
for (let n of e) n.children?.length && (t.push(n.fullPath), t.push(...h(n.children)));
|
|
1195
1197
|
return t;
|
|
1196
1198
|
}
|
|
1197
1199
|
return (e, i) => {
|
|
1198
1200
|
let o = B("el-menu"), l = B("el-scrollbar"), f = B("el-aside");
|
|
1199
|
-
return
|
|
1201
|
+
return d.value ? (L(), D(f, {
|
|
1200
1202
|
key: 0,
|
|
1201
|
-
width:
|
|
1203
|
+
width: u.value ? "72px" : "220px",
|
|
1202
1204
|
class: F(["app-layout__aside", {
|
|
1203
1205
|
"is-mix-mode": U(t).layoutMode === "mix",
|
|
1204
|
-
"has-brand": U(t).layoutMode !== "default"
|
|
1206
|
+
"has-brand": U(t).layoutMode !== "default",
|
|
1207
|
+
"is-mobile-open": U(t).mobileSidebarVisible
|
|
1205
1208
|
}])
|
|
1206
1209
|
}, {
|
|
1207
1210
|
default: K(() => [
|
|
1208
|
-
U(t).layoutMode === "default" ? O("", !0) : (L(), k("div",
|
|
1211
|
+
U(t).layoutMode === "default" ? O("", !0) : (L(), k("div", jn, [M(C, {
|
|
1209
1212
|
name: "brand-fade",
|
|
1210
1213
|
mode: "out-in"
|
|
1211
1214
|
}, {
|
|
1212
|
-
default: K(() => [
|
|
1215
|
+
default: K(() => [u.value ? (L(), D(Ut, {
|
|
1213
1216
|
key: "collapsed",
|
|
1214
1217
|
src: U(n).logoCollapsed,
|
|
1215
1218
|
alt: U(n).systemName,
|
|
@@ -1227,22 +1230,23 @@ var Tn = {
|
|
|
1227
1230
|
]))]),
|
|
1228
1231
|
_: 1
|
|
1229
1232
|
})])),
|
|
1230
|
-
U(t).isSidebarMenuSearch ? (L(), D(
|
|
1233
|
+
U(t).isSidebarMenuSearch ? (L(), D(Dn, {
|
|
1231
1234
|
key: 1,
|
|
1232
|
-
collapsed:
|
|
1235
|
+
collapsed: u.value,
|
|
1233
1236
|
keyword: a.value,
|
|
1234
1237
|
"onUpdate:keyword": i[0] ||= (e) => a.value = e
|
|
1235
1238
|
}, null, 8, ["collapsed", "keyword"])) : O("", !0),
|
|
1236
1239
|
M(l, null, {
|
|
1237
1240
|
default: K(() => [M(o, {
|
|
1238
|
-
collapse:
|
|
1241
|
+
collapse: u.value,
|
|
1239
1242
|
"default-active": U(r),
|
|
1240
|
-
"default-openeds":
|
|
1243
|
+
"default-openeds": m.value,
|
|
1241
1244
|
class: "app-layout__menu",
|
|
1242
1245
|
router: "",
|
|
1243
|
-
"unique-opened": ""
|
|
1246
|
+
"unique-opened": "",
|
|
1247
|
+
onSelect: U(t).closeMobileSidebar
|
|
1244
1248
|
}, {
|
|
1245
|
-
default: K(() => [(L(!0), k(x, null, z(
|
|
1249
|
+
default: K(() => [(L(!0), k(x, null, z(p.value, (e) => (L(), D(An, {
|
|
1246
1250
|
key: e.fullPath,
|
|
1247
1251
|
node: e,
|
|
1248
1252
|
keyword: U(t).isSidebarMenuSearch ? a.value : ""
|
|
@@ -1251,19 +1255,20 @@ var Tn = {
|
|
|
1251
1255
|
}, 8, [
|
|
1252
1256
|
"collapse",
|
|
1253
1257
|
"default-active",
|
|
1254
|
-
"default-openeds"
|
|
1258
|
+
"default-openeds",
|
|
1259
|
+
"onSelect"
|
|
1255
1260
|
])]),
|
|
1256
1261
|
_: 1
|
|
1257
1262
|
})
|
|
1258
1263
|
]),
|
|
1259
1264
|
_: 1
|
|
1260
|
-
}, 8, ["width", "class"]));
|
|
1265
|
+
}, 8, ["width", "class"])) : O("", !0);
|
|
1261
1266
|
};
|
|
1262
1267
|
}
|
|
1263
1268
|
});
|
|
1264
1269
|
//#endregion
|
|
1265
1270
|
//#region src/main/composables/useSortable.ts
|
|
1266
|
-
function
|
|
1271
|
+
function Nn(e = {}) {
|
|
1267
1272
|
let t = R(null);
|
|
1268
1273
|
function n() {
|
|
1269
1274
|
t.value?.destroy(), t.value = null;
|
|
@@ -1305,7 +1310,7 @@ function Mn(e = {}) {
|
|
|
1305
1310
|
}
|
|
1306
1311
|
//#endregion
|
|
1307
1312
|
//#region src/main/layouts/components/AppTabsContextMenu.vue?vue&type=script&setup=true&lang.ts
|
|
1308
|
-
var
|
|
1313
|
+
var Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"], Ln = ["disabled"], Rn = ["disabled"], zn = /* @__PURE__ */ N({
|
|
1309
1314
|
__name: "AppTabsContextMenu",
|
|
1310
1315
|
props: {
|
|
1311
1316
|
hasLeftTabs: { type: Boolean },
|
|
@@ -1364,15 +1369,15 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1364
1369
|
left: `${e.position.x}px`,
|
|
1365
1370
|
top: `${e.position.y}px`
|
|
1366
1371
|
}),
|
|
1367
|
-
onMousedown: n[8] ||=
|
|
1368
|
-
onContextmenu: n[9] ||=
|
|
1372
|
+
onMousedown: n[8] ||= q(() => {}, ["stop"]),
|
|
1373
|
+
onContextmenu: n[9] ||= q(() => {}, ["prevent"])
|
|
1369
1374
|
}, [
|
|
1370
1375
|
A("button", {
|
|
1371
1376
|
class: "app-tabs-menu__item",
|
|
1372
1377
|
type: "button",
|
|
1373
1378
|
onClick: n[0] ||= (e) => i(a)
|
|
1374
1379
|
}, [M(f, null, {
|
|
1375
|
-
default: K(() => [M(U(
|
|
1380
|
+
default: K(() => [M(U(xe))]),
|
|
1376
1381
|
_: 1
|
|
1377
1382
|
}), n[10] ||= A("span", null, "重新加载", -1)]),
|
|
1378
1383
|
A("button", {
|
|
@@ -1381,9 +1386,9 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1381
1386
|
disabled: !e.hasLastActive,
|
|
1382
1387
|
onClick: n[1] ||= (t) => i(o, !e.hasLastActive)
|
|
1383
1388
|
}, [M(f, null, {
|
|
1384
|
-
default: K(() => [M(U(
|
|
1389
|
+
default: K(() => [M(U(ce))]),
|
|
1385
1390
|
_: 1
|
|
1386
|
-
}), n[11] ||= A("span", null, "切换上一个页签", -1)], 8,
|
|
1391
|
+
}), n[11] ||= A("span", null, "切换上一个页签", -1)], 8, Pn),
|
|
1387
1392
|
A("button", {
|
|
1388
1393
|
class: "app-tabs-menu__item",
|
|
1389
1394
|
type: "button",
|
|
@@ -1399,63 +1404,63 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1399
1404
|
disabled: e.isTargetHome,
|
|
1400
1405
|
onClick: n[3] ||= (t) => i(c, e.isTargetHome)
|
|
1401
1406
|
}, [M(f, null, {
|
|
1402
|
-
default: K(() => [M(U(
|
|
1407
|
+
default: K(() => [M(U(ue))]),
|
|
1403
1408
|
_: 1
|
|
1404
|
-
}), n[13] ||= A("span", null, "关闭当前页签", -1)], 8,
|
|
1409
|
+
}), n[13] ||= A("span", null, "关闭当前页签", -1)], 8, Fn),
|
|
1405
1410
|
A("button", {
|
|
1406
1411
|
class: "app-tabs-menu__item",
|
|
1407
1412
|
type: "button",
|
|
1408
1413
|
disabled: !e.hasMultipleTabs,
|
|
1409
1414
|
onClick: n[4] ||= (t) => i(l, !e.hasMultipleTabs)
|
|
1410
1415
|
}, [M(f, null, {
|
|
1411
|
-
default: K(() => [M(U(
|
|
1416
|
+
default: K(() => [M(U(be))]),
|
|
1412
1417
|
_: 1
|
|
1413
|
-
}), n[14] ||= A("span", null, "关闭其他页签", -1)], 8,
|
|
1418
|
+
}), n[14] ||= A("span", null, "关闭其他页签", -1)], 8, In),
|
|
1414
1419
|
A("button", {
|
|
1415
1420
|
class: "app-tabs-menu__item",
|
|
1416
1421
|
type: "button",
|
|
1417
1422
|
disabled: !e.hasLeftTabs,
|
|
1418
1423
|
onClick: n[5] ||= (t) => i(u, !e.hasLeftTabs)
|
|
1419
1424
|
}, [M(f, null, {
|
|
1420
|
-
default: K(() => [M(U(
|
|
1425
|
+
default: K(() => [M(U(fe))]),
|
|
1421
1426
|
_: 1
|
|
1422
|
-
}), n[15] ||= A("span", null, "关闭左侧页签", -1)], 8,
|
|
1427
|
+
}), n[15] ||= A("span", null, "关闭左侧页签", -1)], 8, Ln),
|
|
1423
1428
|
A("button", {
|
|
1424
1429
|
class: "app-tabs-menu__item",
|
|
1425
1430
|
type: "button",
|
|
1426
1431
|
disabled: !e.hasRightTabs,
|
|
1427
1432
|
onClick: n[6] ||= (t) => i(d, !e.hasRightTabs)
|
|
1428
1433
|
}, [M(f, null, {
|
|
1429
|
-
default: K(() => [M(U(
|
|
1434
|
+
default: K(() => [M(U(pe))]),
|
|
1430
1435
|
_: 1
|
|
1431
|
-
}), n[16] ||= A("span", null, "关闭右侧页签", -1)], 8,
|
|
1436
|
+
}), n[16] ||= A("span", null, "关闭右侧页签", -1)], 8, Rn),
|
|
1432
1437
|
n[19] ||= A("div", { class: "app-tabs-menu__divider" }, null, -1),
|
|
1433
1438
|
A("button", {
|
|
1434
1439
|
class: "app-tabs-menu__item",
|
|
1435
1440
|
type: "button",
|
|
1436
1441
|
onClick: n[7] ||= (e) => i(() => r("closeAll"))
|
|
1437
1442
|
}, [M(f, null, {
|
|
1438
|
-
default: K(() => [M(U(
|
|
1443
|
+
default: K(() => [M(U(ge))]),
|
|
1439
1444
|
_: 1
|
|
1440
1445
|
}), n[17] ||= A("span", null, "关闭全部页签", -1)])
|
|
1441
1446
|
], 36)) : O("", !0);
|
|
1442
1447
|
};
|
|
1443
1448
|
}
|
|
1444
|
-
}),
|
|
1449
|
+
}), Bn = {
|
|
1445
1450
|
key: 0,
|
|
1446
1451
|
class: "app-layout__tabs"
|
|
1447
|
-
},
|
|
1452
|
+
}, Vn = { class: "app-layout__tabs-bar" }, Hn = [
|
|
1448
1453
|
"data-path",
|
|
1449
1454
|
"onClick",
|
|
1450
1455
|
"onContextmenu"
|
|
1451
|
-
],
|
|
1456
|
+
], Un = { class: "app-layout__tab-label" }, Wn = ["onClick"], Gn = /* @__PURE__ */ N({
|
|
1452
1457
|
__name: "AppTabs",
|
|
1453
1458
|
emits: ["refresh"],
|
|
1454
1459
|
setup(e, { emit: t }) {
|
|
1455
1460
|
let n = t, r = _(), i = Q(), a = R(!1), o = R(!1), s = R(!1), c = R({
|
|
1456
1461
|
x: 0,
|
|
1457
1462
|
y: 0
|
|
1458
|
-
}), l = R(null), u = R(null), d = T(() => l.value ? i.tabs.findIndex((e) => e.path === l.value?.path) : -1), f = T(() => l.value?.path === i.activeTab), p = T(() => d.value > 0), m = T(() => d.value >= 0 && d.value < i.tabs.length - 1), h = T(() => i.tabs.length > 1), g = T(() => !!(i.lastActiveTab && i.tabPaths.includes(i.lastActiveTab))), { init: v } =
|
|
1463
|
+
}), l = R(null), u = R(null), d = T(() => l.value ? i.tabs.findIndex((e) => e.path === l.value?.path) : -1), f = T(() => l.value?.path === i.activeTab), p = T(() => d.value > 0), m = T(() => d.value >= 0 && d.value < i.tabs.length - 1), h = T(() => i.tabs.length > 1), g = T(() => !!(i.lastActiveTab && i.tabPaths.includes(i.lastActiveTab))), { init: v } = Nn({
|
|
1459
1464
|
animation: 150,
|
|
1460
1465
|
chosenClass: "sortable-chosen",
|
|
1461
1466
|
direction: "horizontal",
|
|
@@ -1536,26 +1541,26 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1536
1541
|
async function G(e) {
|
|
1537
1542
|
await i.closeLeftTabs(e), i.tabPaths.includes(i.activeTab) || await y(e);
|
|
1538
1543
|
}
|
|
1539
|
-
async function
|
|
1544
|
+
async function re(e) {
|
|
1540
1545
|
await i.closeRightTabs(e), i.tabPaths.includes(i.activeTab) || await y(e);
|
|
1541
1546
|
}
|
|
1542
|
-
async function
|
|
1547
|
+
async function ie() {
|
|
1543
1548
|
await i.closeAllTabs(), r.push(X);
|
|
1544
1549
|
}
|
|
1545
|
-
function
|
|
1550
|
+
function J() {
|
|
1546
1551
|
let e = i.lastActiveTab;
|
|
1547
1552
|
!e || !i.tabPaths.includes(e) || y(e);
|
|
1548
1553
|
}
|
|
1549
|
-
function
|
|
1554
|
+
function oe(e) {
|
|
1550
1555
|
window.open(e, "_blank", "noopener,noreferrer");
|
|
1551
1556
|
}
|
|
1552
|
-
function
|
|
1557
|
+
function se(e) {
|
|
1553
1558
|
e.button !== 2 && I();
|
|
1554
1559
|
}
|
|
1555
1560
|
return te(() => {
|
|
1556
|
-
document.addEventListener("mousedown",
|
|
1561
|
+
document.addEventListener("mousedown", se), v(u.value), N();
|
|
1557
1562
|
}), ne(() => {
|
|
1558
|
-
document.removeEventListener("mousedown",
|
|
1563
|
+
document.removeEventListener("mousedown", se);
|
|
1559
1564
|
}), W(() => i.tabs.map((e) => e.path).join("|"), () => {
|
|
1560
1565
|
a.value || P(() => {
|
|
1561
1566
|
v(u.value), N();
|
|
@@ -1564,7 +1569,7 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1564
1569
|
N();
|
|
1565
1570
|
}), (e, t) => {
|
|
1566
1571
|
let n = B("el-icon");
|
|
1567
|
-
return U(i).tabs.length ? (L(), k("div",
|
|
1572
|
+
return U(i).tabs.length ? (L(), k("div", Bn, [A("div", Vn, [
|
|
1568
1573
|
A("div", {
|
|
1569
1574
|
ref_key: "tabsScrollRef",
|
|
1570
1575
|
ref: u,
|
|
@@ -1584,21 +1589,21 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1584
1589
|
default: K(() => [(L(), D(V(U($)(e.icon))))]),
|
|
1585
1590
|
_: 2
|
|
1586
1591
|
}, 1024)) : O("", !0),
|
|
1587
|
-
A("span",
|
|
1592
|
+
A("span", Un, H(e.title), 1),
|
|
1588
1593
|
e.path === U("/dashboard") ? O("", !0) : (L(), k("button", {
|
|
1589
1594
|
key: 1,
|
|
1590
1595
|
class: "app-layout__tab-close",
|
|
1591
1596
|
type: "button",
|
|
1592
|
-
onClick:
|
|
1593
|
-
}, " × ", 8,
|
|
1594
|
-
], 42,
|
|
1597
|
+
onClick: q((t) => b(e.path), ["stop"])
|
|
1598
|
+
}, " × ", 8, Wn))
|
|
1599
|
+
], 42, Hn))), 128))], 544),
|
|
1595
1600
|
A("button", {
|
|
1596
1601
|
class: "app-layout__tabs-action",
|
|
1597
1602
|
type: "button",
|
|
1598
1603
|
title: "页签操作",
|
|
1599
1604
|
onClick: E
|
|
1600
1605
|
}, [M(n, null, {
|
|
1601
|
-
default: K(() => [M(U(
|
|
1606
|
+
default: K(() => [M(U(ae))]),
|
|
1602
1607
|
_: 1
|
|
1603
1608
|
})]),
|
|
1604
1609
|
A("button", {
|
|
@@ -1607,10 +1612,10 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1607
1612
|
title: "刷新当前页签",
|
|
1608
1613
|
onClick: t[0] ||= (e) => S(U(i).activeTab)
|
|
1609
1614
|
}, [M(n, { class: F({ "is-rotating": o.value }) }, {
|
|
1610
|
-
default: K(() => [M(U(
|
|
1615
|
+
default: K(() => [M(U(xe))]),
|
|
1611
1616
|
_: 1
|
|
1612
1617
|
}, 8, ["class"])])
|
|
1613
|
-
]), M(
|
|
1618
|
+
]), M(zn, {
|
|
1614
1619
|
visible: s.value,
|
|
1615
1620
|
"has-left-tabs": p.value,
|
|
1616
1621
|
"has-multiple-tabs": h.value,
|
|
@@ -1621,13 +1626,13 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1621
1626
|
position: c.value,
|
|
1622
1627
|
"target-tab": l.value,
|
|
1623
1628
|
onClose: I,
|
|
1624
|
-
onCloseAll:
|
|
1629
|
+
onCloseAll: ie,
|
|
1625
1630
|
onCloseLeft: G,
|
|
1626
1631
|
onCloseOthers: ee,
|
|
1627
|
-
onCloseRight:
|
|
1632
|
+
onCloseRight: re,
|
|
1628
1633
|
onCloseTab: b,
|
|
1629
|
-
onOpenInNewTab:
|
|
1630
|
-
onSwitchPrev:
|
|
1634
|
+
onOpenInNewTab: oe,
|
|
1635
|
+
onSwitchPrev: J,
|
|
1631
1636
|
onRefresh: S
|
|
1632
1637
|
}, null, 8, [
|
|
1633
1638
|
"visible",
|
|
@@ -1642,7 +1647,7 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1642
1647
|
])])) : O("", !0);
|
|
1643
1648
|
};
|
|
1644
1649
|
}
|
|
1645
|
-
}),
|
|
1650
|
+
}), Kn = /* @__PURE__ */ N({
|
|
1646
1651
|
__name: "AppLayout",
|
|
1647
1652
|
setup(e) {
|
|
1648
1653
|
let t = g(), n = Q(), r = f(), i = R(0), a = T(() => t.matched.filter((e) => e.meta?.title));
|
|
@@ -1667,14 +1672,27 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1667
1672
|
return (e, t) => {
|
|
1668
1673
|
let n = B("el-container");
|
|
1669
1674
|
return L(), k(x, null, [M(n, { class: "app-layout" }, {
|
|
1670
|
-
default: K(() => [
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1675
|
+
default: K(() => [
|
|
1676
|
+
M(Mn),
|
|
1677
|
+
M(n, { direction: "vertical" }, {
|
|
1678
|
+
default: K(() => [
|
|
1679
|
+
M(bn, { "breadcrumb-items": a.value }, null, 8, ["breadcrumb-items"]),
|
|
1680
|
+
M(Gn, { onRefresh: o }),
|
|
1681
|
+
M(kt, { "refresh-key": i.value }, null, 8, ["refresh-key"])
|
|
1682
|
+
]),
|
|
1683
|
+
_: 1
|
|
1684
|
+
}),
|
|
1685
|
+
M(C, { name: "app-mobile-mask" }, {
|
|
1686
|
+
default: K(() => [U(r).mobileSidebarVisible ? (L(), k("button", {
|
|
1687
|
+
key: 0,
|
|
1688
|
+
type: "button",
|
|
1689
|
+
class: "app-layout__mobile-mask",
|
|
1690
|
+
"aria-label": "关闭侧边栏",
|
|
1691
|
+
onClick: t[0] ||= (e) => U(r).closeMobileSidebar()
|
|
1692
|
+
})) : O("", !0)]),
|
|
1693
|
+
_: 1
|
|
1694
|
+
})
|
|
1695
|
+
]),
|
|
1678
1696
|
_: 1
|
|
1679
1697
|
}), M(Ot)], 64);
|
|
1680
1698
|
};
|
|
@@ -1682,7 +1700,7 @@ var Nn = ["disabled"], Pn = ["disabled"], Fn = ["disabled"], In = ["disabled"],
|
|
|
1682
1700
|
});
|
|
1683
1701
|
//#endregion
|
|
1684
1702
|
//#region src/main/router/base-routes.ts
|
|
1685
|
-
function
|
|
1703
|
+
function qn(e = []) {
|
|
1686
1704
|
return [{
|
|
1687
1705
|
path: "/login",
|
|
1688
1706
|
name: "login",
|
|
@@ -1693,7 +1711,7 @@ function Kn(e = []) {
|
|
|
1693
1711
|
}
|
|
1694
1712
|
}, {
|
|
1695
1713
|
path: "/",
|
|
1696
|
-
component:
|
|
1714
|
+
component: Kn,
|
|
1697
1715
|
redirect: "/dashboard",
|
|
1698
1716
|
children: [
|
|
1699
1717
|
{
|
|
@@ -1748,26 +1766,26 @@ function Kn(e = []) {
|
|
|
1748
1766
|
}
|
|
1749
1767
|
//#endregion
|
|
1750
1768
|
//#region src/main/router/index.ts
|
|
1751
|
-
function
|
|
1769
|
+
function Jn(e = []) {
|
|
1752
1770
|
let t = Array.isArray(e) ? { businessRoutes: e } : e, n = m({
|
|
1753
1771
|
history: t.history ?? h("/"),
|
|
1754
|
-
routes:
|
|
1772
|
+
routes: qn(t.businessRoutes ?? []),
|
|
1755
1773
|
scrollBehavior: t.scrollBehavior ?? (() => ({ top: 0 }))
|
|
1756
1774
|
});
|
|
1757
1775
|
return He(n), t.setupRouter?.(n), n;
|
|
1758
1776
|
}
|
|
1759
1777
|
//#endregion
|
|
1760
1778
|
//#region src/main/directives/index.ts
|
|
1761
|
-
var
|
|
1779
|
+
var Yn = {
|
|
1762
1780
|
mounted(e, t) {
|
|
1763
|
-
|
|
1781
|
+
Xn(e, t.value);
|
|
1764
1782
|
},
|
|
1765
1783
|
updated(e, t) {
|
|
1766
|
-
|
|
1784
|
+
Xn(e, t.value);
|
|
1767
1785
|
}
|
|
1768
1786
|
};
|
|
1769
|
-
function
|
|
1770
|
-
let n = a(), r =
|
|
1787
|
+
function Xn(e, t) {
|
|
1788
|
+
let n = a(), r = Zn(t), i = typeof t == "object" && !Array.isArray(t) && t.mode || "all", o = typeof t == "object" && !Array.isArray(t) ? !!t.disabled : !1, s = i === "any" ? r.some((e) => n.hasPermission(e)) : r.every((e) => n.hasPermission(e));
|
|
1771
1789
|
if (!r.length || s) {
|
|
1772
1790
|
e.style.display = "", e.hidden = !1, o && (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
|
|
1773
1791
|
return;
|
|
@@ -1778,29 +1796,29 @@ function Yn(e, t) {
|
|
|
1778
1796
|
}
|
|
1779
1797
|
e.style.display = "none", e.hidden = !0;
|
|
1780
1798
|
}
|
|
1781
|
-
function
|
|
1799
|
+
function Zn(e) {
|
|
1782
1800
|
return typeof e == "string" ? e ? [e] : [] : Array.isArray(e) ? e : e.permissions ?? [];
|
|
1783
1801
|
}
|
|
1784
|
-
function
|
|
1785
|
-
e.directive("permission",
|
|
1802
|
+
function Qn(e) {
|
|
1803
|
+
e.directive("permission", Yn);
|
|
1786
1804
|
}
|
|
1787
1805
|
//#endregion
|
|
1788
1806
|
//#region src/main/app/create-app.ts
|
|
1789
|
-
async function
|
|
1807
|
+
async function $n(e) {
|
|
1790
1808
|
Pe(e.appConfig), ze();
|
|
1791
|
-
let t =
|
|
1809
|
+
let t = Jn({
|
|
1792
1810
|
businessRoutes: e.businessRoutes,
|
|
1793
1811
|
history: e.routerHistory,
|
|
1794
1812
|
scrollBehavior: e.routerScrollBehavior,
|
|
1795
1813
|
setupRouter: e.setupRouter
|
|
1796
|
-
}), n = E(e.rootComponent), r =
|
|
1814
|
+
}), n = E(e.rootComponent), r = ie(), i = {
|
|
1797
1815
|
app: n,
|
|
1798
1816
|
router: t,
|
|
1799
1817
|
pinia: r,
|
|
1800
1818
|
http: Ie,
|
|
1801
1819
|
requestManager: Re
|
|
1802
1820
|
};
|
|
1803
|
-
ke(), n.use(y, { locale: je }), n.use(r), n.use(t),
|
|
1821
|
+
ke(), n.use(y, { locale: je }), n.use(r), n.use(t), Qn(n), Me(t), await e.setupApp?.(i), await e.beforePlatformInit?.(i);
|
|
1804
1822
|
let a = f(r), o = l(r), s = Q(r), c = Oe({ fullscreen: !0 });
|
|
1805
1823
|
try {
|
|
1806
1824
|
await Promise.all([
|
|
@@ -1819,4 +1837,4 @@ async function Qn(e) {
|
|
|
1819
1837
|
return await e.afterMount?.(d), n;
|
|
1820
1838
|
}
|
|
1821
1839
|
//#endregion
|
|
1822
|
-
export { X as a, Le as c, Me as d,
|
|
1840
|
+
export { X as a, Le as c, Me as d, Nn as i, Ie as l, Jn as n, Q as o, qn as r, ze as s, $n as t, Re as u };
|