mamba-layout 0.1.0 → 0.3.0

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 (47) hide show
  1. package/dist/components/UserAvatar/src/UserAvatar.vue2.js +4 -4
  2. package/dist/layout/BaseLayout.css +1 -1
  3. package/dist/layout/BaseLayout.vue.js +2 -2
  4. package/dist/layout/BaseLayout.vue2.js +81 -45
  5. package/dist/layout/components/AppSelect.vue2.js +10 -10
  6. package/dist/layout/components/AsideBar.vue2.js +9 -9
  7. package/dist/layout/components/AsideSubMenuItem.vue.js +5 -5
  8. package/dist/layout/components/AsideSubMenus.vue.js +4 -4
  9. package/dist/layout/components/AsideTabMenus.vue.js +4 -4
  10. package/dist/layout/components/AsideUser.vue.js +1 -1
  11. package/dist/layout/components/HeaderBar.vue2.js +1 -1
  12. package/dist/layout/components/HeaderMenuToggle.vue.js +1 -1
  13. package/dist/layout/components/LanguageSelect.vue2.js +32 -33
  14. package/dist/layout/components/LayoutBreadcrumb.css +1 -1
  15. package/dist/layout/components/LayoutBreadcrumb.vue.d.ts +1 -1
  16. package/dist/layout/components/LayoutBreadcrumb.vue2.js +1 -1
  17. package/dist/layout/components/MenuDrawer.vue.js +1 -1
  18. package/dist/layout/components/MenuItemIcon.vue2.js +4 -4
  19. package/dist/layout/components/NavIconBtn.vue2.js +8 -8
  20. package/dist/layout/components/SHeaderRight.css +1 -1
  21. package/dist/layout/components/SHeaderRight.vue.js +2 -2
  22. package/dist/layout/components/SHeaderRight.vue2.js +37 -49
  23. package/dist/layout/components/ThemeToggle.vue2.js +3 -3
  24. package/dist/layout/components/TimezoneSelect.vue2.js +29 -29
  25. package/dist/layout/components/UserInfo.vue.js +2 -2
  26. package/dist/layout/components/UserInfo.vue2.js +1 -1
  27. package/dist/layout/components/UserInfo2.css +1 -1
  28. package/dist/layout/components/mobile/AppSelectMobile.vue.js +19 -19
  29. package/dist/layout/components/mobile/AsideBarMobile.css +1 -1
  30. package/dist/layout/components/mobile/AsideBarMobile.vue.js +3 -3
  31. package/dist/layout/components/mobile/AsideBarMobile.vue2.js +25 -23
  32. package/dist/layout/components/mobile/AsideUserMobile.vue2.js +3 -3
  33. package/dist/layout/components/mobile/AsideUserMobilePopover.vue2.js +2 -2
  34. package/dist/layout/components/mobile/HeaderRightMobile.css +1 -1
  35. package/dist/layout/components/mobile/HeaderRightMobile.vue.js +1 -1
  36. package/dist/layout/components/mobile/HeaderRightMobile.vue2.js +21 -25
  37. package/dist/layout/components/mobile/MobileMenuToggle.css +1 -1
  38. package/dist/layout/components/mobile/MobileMenuToggle.vue.js +1 -1
  39. package/dist/layout/components/mobile/MobileMenuToggle.vue2.js +15 -13
  40. package/dist/layout/hooks/useSetting.d.ts +1 -2
  41. package/dist/layout/hooks/useState.d.ts +98 -514
  42. package/dist/layout/hooks/useState.js +56 -55
  43. package/dist/layout.css +1 -1
  44. package/dist/layout.es.js +43244 -45315
  45. package/dist/layout.global.js +84 -54
  46. package/dist/utils/repoUtils.js +3 -3
  47. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, ref as w, computed as a, watch as A, resolveComponent as n, createBlock as u, openBlock as s, mergeProps as C, withCtx as v, createElementBlock as y, createCommentVNode as F, toDisplayString as N, createVNode as B, unref as E } from "vue";
1
+ import { defineComponent as b, ref as w, computed as a, watch as A, resolveComponent as n, openBlock as s, createBlock as u, mergeProps as C, withCtx as v, createElementBlock as y, toDisplayString as F, createVNode as N, unref as B, createCommentVNode as E } from "vue";
2
2
  import { User as g } from "@element-plus/icons-vue";
3
3
  const x = {
4
4
  key: 0,
@@ -40,16 +40,16 @@ const x = {
40
40
  onError: f
41
41
  }), {
42
42
  default: v(() => [
43
- i.value ? (s(), y("span", x, N(m.value), 1)) : _.value ? (s(), u(k, {
43
+ i.value ? (s(), y("span", x, F(m.value), 1)) : _.value ? (s(), u(k, {
44
44
  key: 1,
45
45
  class: "user-avatar__icon",
46
46
  "aria-hidden": "true"
47
47
  }, {
48
48
  default: v(() => [
49
- B(E(g))
49
+ N(B(g))
50
50
  ]),
51
51
  _: 1
52
- })) : F("", !0)
52
+ })) : E("", !0)
53
53
  ]),
54
54
  _: 1
55
55
  }, 16, ["src", "data-src", "alt", "class"]);
@@ -1 +1 @@
1
- .layout-shell[data-v-259cbdf0]{background:var(--ui-topnav-bg);color:var(--ui-text-primary)}.layout-shell__overlay[data-v-259cbdf0]{background:#000000b3}.layout-page-view[data-v-259cbdf0]{display:flex;flex:1 1 auto;flex-direction:column;width:100%;min-width:0;min-height:0;background:var(--ui-bg-page);contain:paint}.layout-page-enter-active[data-v-259cbdf0],.layout-page-leave-active[data-v-259cbdf0]{transition:opacity var(--ui-transition-base),transform var(--ui-transition-base);will-change:opacity,transform}.layout-page-enter-from[data-v-259cbdf0]{opacity:0;transform:translate3d(8px,0,0)}.layout-page-leave-to[data-v-259cbdf0]{opacity:0;transform:translate3d(-6px,0,0)}@media (prefers-reduced-motion: reduce){.layout-page-enter-active[data-v-259cbdf0],.layout-page-leave-active[data-v-259cbdf0]{transition:none}.layout-page-enter-from[data-v-259cbdf0],.layout-page-leave-to[data-v-259cbdf0]{opacity:1;transform:none}}
1
+ .layout-shell[data-v-b3392308]{background:var(--ui-topnav-bg);color:var(--ui-text-primary)}.layout-shell__overlay[data-v-b3392308]{background:#000000b3}.layout-page-view[data-v-b3392308]{display:flex;flex:1 1 auto;flex-direction:column;width:100%;min-width:0;min-height:0;background:var(--ui-bg-page);contain:paint}.layout-page-enter-active[data-v-b3392308],.layout-page-leave-active[data-v-b3392308]{transition:opacity var(--ui-transition-base),transform var(--ui-transition-base);will-change:opacity,transform}.layout-page-enter-from[data-v-b3392308]{opacity:0;transform:translate3d(8px,0,0)}.layout-page-leave-to[data-v-b3392308]{opacity:0;transform:translate3d(-6px,0,0)}@media(prefers-reduced-motion:reduce){.layout-page-enter-active[data-v-b3392308],.layout-page-leave-active[data-v-b3392308]{transition:none}.layout-page-enter-from[data-v-b3392308],.layout-page-leave-to[data-v-b3392308]{opacity:1;transform:none}}
@@ -1,7 +1,7 @@
1
1
  import o from "./BaseLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-259cbdf0"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b3392308"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,56 +1,87 @@
1
- import { defineComponent as x, computed as w, watchEffect as k, resolveComponent as L, createElementBlock as r, openBlock as o, createVNode as u, createElementVNode as c, createCommentVNode as b, withCtx as d, renderSlot as B, createBlock as m, unref as f, Transition as C, resolveDynamicComponent as S, normalizeClass as M } from "vue";
2
- import E from "./components/AsideBar.vue.js";
3
- import N from "./components/HeaderBar.vue.js";
4
- import V from "./components/mobile/AsideBarMobile.vue.js";
5
- import z from "../assets/logo.png.js";
6
- import { provideSetting as A } from "./hooks/useSetting.js";
7
- import { useStateHook as H } from "./hooks/useState.js";
8
- const O = { class: "layout-shell w-full h-screen flex flex-col" }, D = { class: "flex flex-1 min-h-0 rounded-[var(--ui-body-radius)] overflow-hidden" }, T = { class: "flex flex-col flex-1 min-h-0 min-w-0 h-full" }, $ = { class: "flex-1 w-full min-h-0 flex flex-col overflow-hidden bg-[var(--ui-color-background)]" }, P = /* @__PURE__ */ x({
1
+ import { defineComponent as E, computed as A, watchEffect as C, watch as S, onMounted as M, onUnmounted as N, resolveComponent as j, openBlock as s, createElementBlock as f, createVNode as u, withCtx as c, renderSlot as K, createElementVNode as p, unref as y, createBlock as v, Transition as k, resolveDynamicComponent as O, createCommentVNode as R } from "vue";
2
+ import V from "./components/AsideBar.vue.js";
3
+ import $ from "./components/HeaderBar.vue.js";
4
+ import H from "./components/mobile/AsideBarMobile.vue.js";
5
+ import P from "../assets/logo.png.js";
6
+ import { provideSetting as D } from "./hooks/useSetting.js";
7
+ import { useStateHook as T } from "./hooks/useState.js";
8
+ const U = { class: "layout-shell w-full flex flex-col" }, q = { class: "layout-shell__body flex flex-1 min-h-0 overflow-hidden" }, z = { class: "layout-shell__main flex flex-col flex-1 min-h-0 min-w-0 h-full" }, F = { class: "layout-shell__content flex-1 w-full min-h-0 flex flex-col overflow-hidden" }, Z = /* @__PURE__ */ E({
9
9
  __name: "BaseLayout",
10
10
  props: {
11
11
  setting: {}
12
12
  },
13
- setup(_) {
14
- const e = _, h = w(() => {
15
- var n, a, l, i, t, g, v;
13
+ setup(x) {
14
+ const l = x, L = A(() => {
15
+ var e, o, a, t, n, g, w;
16
16
  return {
17
- ...e.setting || {},
18
- logo: ((n = e.setting) == null ? void 0 : n.logo) || z,
19
- menus: ((a = e.setting) == null ? void 0 : a.menus) || [],
20
- accountMenu: ((l = e.setting) == null ? void 0 : l.accountMenu) || [],
21
- user: ((i = e.setting) == null ? void 0 : i.user) ?? null,
22
- appList: ((t = e.setting) == null ? void 0 : t.appList) || [],
23
- onLogin: (g = e.setting) == null ? void 0 : g.onLogin,
24
- onLogout: (v = e.setting) == null ? void 0 : v.onLogout
17
+ ...l.setting || {},
18
+ logo: ((e = l.setting) == null ? void 0 : e.logo) || P,
19
+ menus: ((o = l.setting) == null ? void 0 : o.menus) || [],
20
+ accountMenu: ((a = l.setting) == null ? void 0 : a.accountMenu) || [],
21
+ user: ((t = l.setting) == null ? void 0 : t.user) ?? null,
22
+ appList: ((n = l.setting) == null ? void 0 : n.appList) || [],
23
+ onLogin: (g = l.setting) == null ? void 0 : g.onLogin,
24
+ onLogout: (w = l.setting) == null ? void 0 : w.onLogout
25
25
  };
26
26
  });
27
- k(() => void A(h.value));
28
- const { isMobile: p, sideOpen: s } = H(), y = () => void (s.value = !s.value);
29
- return (n, a) => {
30
- const l = L("router-view");
31
- return o(), r("div", O, [
32
- u(N, null, {
33
- default: d(() => [
34
- B(n.$slots, "header-right", {}, void 0, !0)
27
+ C(() => void D(L.value));
28
+ const { isMobile: i, sideOpen: d } = T();
29
+ let m = "", r = !1;
30
+ const h = () => void (d.value = !1), B = (e) => {
31
+ const o = e.matched[1];
32
+ if (!o) return e.path;
33
+ const a = b(o, e);
34
+ return [o.path, a].filter(Boolean).join("|");
35
+ }, b = (e, o) => Array.from(
36
+ e.path.matchAll(/:(\w+)/g),
37
+ ([, t]) => t
38
+ ).map((t) => {
39
+ const n = o.params[t];
40
+ return `${t}:${Array.isArray(n) ? n.join(",") : n || ""}`;
41
+ }).join("|"), _ = (e) => {
42
+ e.key === "Escape" && i.value && d.value && h();
43
+ };
44
+ return S(
45
+ () => i.value && d.value,
46
+ (e) => {
47
+ if (!(typeof document > "u")) {
48
+ if (e && !r) {
49
+ m = document.body.style.overflow, document.body.style.overflow = "hidden", r = !0;
50
+ return;
51
+ }
52
+ !e && r && (document.body.style.overflow = m, r = !1);
53
+ }
54
+ },
55
+ { immediate: !0 }
56
+ ), M(() => {
57
+ window.addEventListener("keydown", _);
58
+ }), N(() => {
59
+ window.removeEventListener("keydown", _), typeof document < "u" && r && (document.body.style.overflow = m);
60
+ }), (e, o) => {
61
+ const a = j("router-view");
62
+ return s(), f("div", U, [
63
+ u($, null, {
64
+ default: c(() => [
65
+ K(e.$slots, "header-right", {}, void 0, !0)
35
66
  ]),
36
67
  _: 3
37
68
  }),
38
- c("div", D, [
39
- f(p) ? (o(), m(V, { key: 1 })) : (o(), m(E, { key: 0 })),
40
- c("div", T, [
41
- c("div", $, [
42
- u(l, null, {
43
- default: d(({ Component: i, route: t }) => [
44
- u(C, {
45
- name: String(t.meta.transition || "layout-page"),
69
+ p("div", q, [
70
+ y(i) ? (s(), v(H, { key: 1 })) : (s(), v(V, { key: 0 })),
71
+ p("main", z, [
72
+ p("div", F, [
73
+ u(a, null, {
74
+ default: c(({ Component: t, route: n }) => [
75
+ u(k, {
76
+ name: String(n.meta.transition || "layout-page"),
46
77
  mode: "out-in"
47
78
  }, {
48
- default: d(() => [
49
- (o(), r("div", {
50
- key: t.path,
79
+ default: c(() => [
80
+ (s(), f("div", {
81
+ key: B(n),
51
82
  class: "layout-page-view"
52
83
  }, [
53
- (o(), m(S(i)))
84
+ (s(), v(O(t)))
54
85
  ]))
55
86
  ]),
56
87
  _: 2
@@ -61,15 +92,20 @@ const O = { class: "layout-shell w-full h-screen flex flex-col" }, D = { class:
61
92
  ])
62
93
  ])
63
94
  ]),
64
- f(p) ? (o(), r("div", {
65
- key: 0,
66
- class: M(["layout-shell__overlay fixed top-0 left-0 w-full h-full z-100 transition-all", [f(s) ? "visible opacity-100" : "invisible opacity-0"]]),
67
- onClick: y
68
- }, null, 2)) : b("", !0)
95
+ u(k, { name: "layout-overlay" }, {
96
+ default: c(() => [
97
+ y(i) && y(d) ? (s(), f("div", {
98
+ key: 0,
99
+ class: "layout-shell__overlay",
100
+ onClick: h
101
+ })) : R("", !0)
102
+ ]),
103
+ _: 1
104
+ })
69
105
  ]);
70
106
  };
71
107
  }
72
108
  });
73
109
  export {
74
- P as default
110
+ Z as default
75
111
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as x, resolveComponent as y, createElementBlock as s, createCommentVNode as a, unref as p, openBlock as t, Fragment as g, renderList as w, createElementVNode as o, normalizeClass as _, createBlock as A, toDisplayString as d, withCtx as C, createVNode as I } from "vue";
1
+ import { defineComponent as x, resolveComponent as y, unref as p, openBlock as t, createElementBlock as s, Fragment as g, renderList as w, createElementVNode as o, normalizeClass as a, toDisplayString as _, createBlock as A, withCtx as C, createVNode as I, createCommentVNode as d } from "vue";
2
2
  import { ArrowDown as B } from "@element-plus/icons-vue";
3
3
  import { useApp as L } from "../hooks/useApp.js";
4
4
  import { injectLayoutContext as N } from "../hooks/useState.js";
@@ -26,41 +26,41 @@ const V = {
26
26
  class: "app-select__group"
27
27
  }, [
28
28
  o("a", {
29
- class: _(["app-select__link", {
29
+ class: a(["app-select__link", {
30
30
  "app-select__link--active": h(e)
31
31
  }]),
32
32
  href: p(m)(e) || void 0
33
33
  }, [
34
- o("span", null, d(e.name), 1),
34
+ o("span", null, _(e.name), 1),
35
35
  (f = e.children) != null && f.length ? (t(), A(l, { key: 0 }, {
36
36
  default: C(() => [
37
37
  I(p(B))
38
38
  ]),
39
39
  _: 1
40
- })) : a("", !0)
40
+ })) : d("", !0)
41
41
  ], 10, D),
42
42
  (k = e.children) != null && k.length ? (t(), s("div", E, [
43
43
  (t(!0), s(g, null, w(e.children, (n) => (t(), s("a", {
44
44
  key: n.appId,
45
- class: _(["app-select__dropdown-item", {
45
+ class: a(["app-select__dropdown-item", {
46
46
  "app-select__dropdown-item--active": h(n)
47
47
  }]),
48
48
  href: p(m)(n) || void 0
49
49
  }, [
50
50
  o("span", j, [
51
51
  o("i", {
52
- class: _(n.icon || "metisicon-moxingku")
52
+ class: a(n.icon || "metisicon-moxingku")
53
53
  }, null, 2)
54
54
  ]),
55
55
  o("div", null, [
56
- o("div", null, d(n.name), 1),
57
- o("div", z, d(n.desc), 1)
56
+ o("div", null, _(n.name), 1),
57
+ o("div", z, _(n.desc), 1)
58
58
  ])
59
59
  ], 10, S))), 128))
60
- ])) : a("", !0)
60
+ ])) : d("", !0)
61
61
  ]);
62
62
  }), 128))
63
- ])) : a("", !0);
63
+ ])) : d("", !0);
64
64
  };
65
65
  }
66
66
  });
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, resolveComponent as s, createElementBlock as i, createCommentVNode as a, unref as e, openBlock as c, normalizeClass as b, createVNode as t, renderSlot as x, createElementVNode as d, withCtx as m } from "vue";
1
+ import { defineComponent as u, resolveComponent as s, unref as e, openBlock as i, createElementBlock as a, normalizeClass as b, createElementVNode as c, createVNode as t, withCtx as d, createCommentVNode as m, renderSlot as x } from "vue";
2
2
  import { Fold as h } from "@element-plus/icons-vue";
3
3
  import { injectLayoutContext as v } from "../hooks/useState.js";
4
4
  import C from "./AsideSubMenus.vue.js";
@@ -11,36 +11,36 @@ const g = {
11
11
  const { menus: l, isMobile: n, sideOpen: o } = v(), _ = () => void (o.value = !o.value);
12
12
  return (r, y) => {
13
13
  const p = s("el-icon"), f = s("el-scrollbar");
14
- return e(l).length && !r.$route.meta.hideSidebar ? (c(), i("div", {
14
+ return e(l).length && !r.$route.meta.hideSidebar ? (i(), a("div", {
15
15
  key: 0,
16
16
  class: b(["aside-bar flex flex-col h-full min-h-0 w-64 min-width-50", [
17
17
  e(n) ? "fixed top-0 left-0 z-200 transition-all" : "",
18
18
  e(o) ? "translate-x-[0px]" : "translate-x-[-100%]"
19
19
  ]])
20
20
  }, [
21
- e(n) ? (c(), i("div", g, [
22
- d("div", {
21
+ e(n) ? (i(), a("div", g, [
22
+ c("div", {
23
23
  class: "aside-bar__close text-lg cursor-pointer p-2 leading-4",
24
24
  onClick: _
25
25
  }, [
26
26
  t(p, null, {
27
- default: m(() => [
27
+ default: d(() => [
28
28
  t(e(h))
29
29
  ]),
30
30
  _: 1
31
31
  })
32
32
  ])
33
- ])) : a("", !0),
33
+ ])) : m("", !0),
34
34
  t(f, { ref: "leftScrollRef" }, {
35
- default: m(() => [
36
- d("div", k, [
35
+ default: d(() => [
36
+ c("div", k, [
37
37
  t(C, { menus: e(l) }, null, 8, ["menus"])
38
38
  ])
39
39
  ]),
40
40
  _: 1
41
41
  }, 512),
42
42
  x(r.$slots, "sidebar-foot", {}, void 0, !0)
43
- ], 2)) : a("", !0);
43
+ ], 2)) : m("", !0);
44
44
  };
45
45
  }
46
46
  });
@@ -1,4 +1,4 @@
1
- import { defineComponent as S, computed as l, resolveComponent as A, createElementBlock as m, openBlock as n, Fragment as b, createBlock as s, createCommentVNode as y, resolveDynamicComponent as M, mergeProps as N, unref as i, withCtx as B, createElementVNode as L, normalizeClass as x, toDisplayString as j, renderList as D } from "vue";
1
+ import { defineComponent as S, computed as l, resolveComponent as A, openBlock as n, createElementBlock as m, Fragment as b, createBlock as s, resolveDynamicComponent as M, mergeProps as N, unref as i, withCtx as B, normalizeClass as y, createCommentVNode as x, createElementVNode as L, toDisplayString as j, renderList as D } from "vue";
2
2
  import { useRouter as E } from "vue-router";
3
3
  import { hasRoutePermission as R, replaceName as V, tname as W } from "../../utils/repoUtils.js";
4
4
  import { injectLayoutContext as w } from "../hooks/useState.js";
@@ -54,15 +54,15 @@ const F = { key: 0 }, J = /* @__PURE__ */ S({
54
54
  default: B(() => {
55
55
  var o, u, f, g;
56
56
  return [
57
- (o = r.value) != null && o.length ? y("", !0) : (n(), s(z, {
57
+ (o = r.value) != null && o.length ? x("", !0) : (n(), s(z, {
58
58
  key: 0,
59
59
  icon: P.value,
60
- class: x(["text-md", [
60
+ class: y(["text-md", [
61
61
  e.menu.path == i(c) ? "opacity-100" : "opacity-60"
62
62
  ]])
63
63
  }, null, 8, ["icon", "class"])),
64
64
  L("div", {
65
- class: x(["truncate", (u = r.value) != null && u.length ? "text-xs text-gray-400" : ""])
65
+ class: y(["truncate", (u = r.value) != null && u.length ? "text-xs text-gray-400" : ""])
66
66
  }, j(i(V)(i(W)(((g = (f = e.menu) == null ? void 0 : f.meta) == null ? void 0 : g.translations) || {}, "name"))), 3)
67
67
  ];
68
68
  }),
@@ -74,7 +74,7 @@ const F = { key: 0 }, J = /* @__PURE__ */ S({
74
74
  key: u,
75
75
  level: e.level + 1
76
76
  }, null, 8, ["menu", "level"]))), 128))
77
- ])) : y("", !0)
77
+ ])) : x("", !0)
78
78
  ], 64);
79
79
  };
80
80
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, withDirectives as c, createElementBlock as s, openBlock as t, createCommentVNode as l, Fragment as i, renderList as a, createBlock as _, vShow as p } from "vue";
1
+ import { defineComponent as u, withDirectives as c, openBlock as t, createElementBlock as s, Fragment as l, renderList as i, createBlock as a, createCommentVNode as _, vShow as p } from "vue";
2
2
  import d from "./AsideSubMenuItem.vue.js";
3
3
  const f = { class: "h-full" }, h = {
4
4
  key: 0,
@@ -17,14 +17,14 @@ const f = { class: "h-full" }, h = {
17
17
  var o;
18
18
  return c((t(), s("div", f, [
19
19
  (o = n.menus) != null && o.length ? (t(), s("div", h, [
20
- (t(!0), s(i, null, a(n.menus.filter((r) => {
20
+ (t(!0), s(l, null, i(n.menus.filter((r) => {
21
21
  var e;
22
22
  return ((e = r.meta) == null ? void 0 : e.visible) != "0";
23
- }), (r, e) => (t(), _(d, {
23
+ }), (r, e) => (t(), a(d, {
24
24
  key: e,
25
25
  menu: r
26
26
  }, null, 8, ["menu"]))), 128))
27
- ])) : l("", !0)
27
+ ])) : _("", !0)
28
28
  ], 512)), [
29
29
  [p, n.menus.length]
30
30
  ]);
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, createElementBlock as o, openBlock as r, Fragment as _, renderList as f, unref as a, normalizeClass as i, createCommentVNode as m, createElementVNode as u, toDisplayString as x } from "vue";
1
+ import { defineComponent as h, openBlock as o, createElementBlock as r, Fragment as _, renderList as f, unref as a, normalizeClass as i, createElementVNode as u, createCommentVNode as m, toDisplayString as x } from "vue";
2
2
  import { useRouter as g } from "vue-router";
3
3
  import { injectLayoutContext as v } from "../hooks/useState.js";
4
4
  const b = { class: "flex-1 p-2 w-full" }, y = ["onClick"], k = {
@@ -18,15 +18,15 @@ const b = { class: "flex-1 p-2 w-full" }, y = ["onClick"], k = {
18
18
  t.path && l.push(t.path);
19
19
  }
20
20
  };
21
- return (n, s) => (r(), o("div", b, [
22
- (r(!0), o(_, null, f(a(p), (e, t) => (r(), o("div", {
21
+ return (n, s) => (o(), r("div", b, [
22
+ (o(!0), r(_, null, f(a(p), (e, t) => (o(), r("div", {
23
23
  key: t,
24
24
  class: i(["pt-2 pb-2 mt-1 mb-1 flex flex-col items-center cursor-pointer rounded-2xl hover:bg-gray-100", [
25
25
  a(c) == e.path ? "bg-gray-100 text-blue-500" : "text-gray-500"
26
26
  ]]),
27
27
  onClick: (B) => d(e)
28
28
  }, [
29
- e.icon ? (r(), o("div", k, [
29
+ e.icon ? (o(), r("div", k, [
30
30
  u("i", {
31
31
  class: i(e.icon)
32
32
  }, null, 2)
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, computed as c, resolveComponent as y, createBlock as x, openBlock as n, withCtx as i, createElementVNode as t, createElementBlock as u, createCommentVNode as p, toDisplayString as a, unref as k } from "vue";
1
+ import { defineComponent as b, computed as c, resolveComponent as y, openBlock as n, createBlock as x, withCtx as i, createElementVNode as t, createElementBlock as u, createCommentVNode as p, toDisplayString as a, unref as k } from "vue";
2
2
  import { useRouter as C } from "vue-router";
3
3
  import h from "../../locales/index.js";
4
4
  import { useSetting as T } from "../hooks/useSetting.js";
@@ -1,4 +1,4 @@
1
- import { defineComponent as m, computed as u, resolveComponent as p, createElementBlock as d, openBlock as e, createElementVNode as a, createBlock as i, createCommentVNode as r, unref as o, createVNode as h, renderSlot as f } from "vue";
1
+ import { defineComponent as m, computed as u, resolveComponent as p, openBlock as e, createElementBlock as d, createElementVNode as a, unref as o, createBlock as i, createCommentVNode as r, createVNode as h, renderSlot as f } from "vue";
2
2
  import { useSetting as g } from "../hooks/useSetting.js";
3
3
  import { injectLayoutContext as v } from "../hooks/useState.js";
4
4
  import b from "./AppSelect.vue.js";
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, ref as r, resolveComponent as p, createElementBlock as d, openBlock as t, Fragment as _, createElementVNode as l, createVNode as a, withCtx as v, createBlock as s, unref as c } from "vue";
1
+ import { defineComponent as f, ref as r, resolveComponent as p, openBlock as t, createElementBlock as d, Fragment as _, createElementVNode as l, createVNode as a, withCtx as v, createBlock as s, unref as c } from "vue";
2
2
  import { Expand as x, Close as g } from "@element-plus/icons-vue";
3
3
  import k from "./MenuDrawer.vue.js";
4
4
  /* empty css */
@@ -1,47 +1,47 @@
1
- import { defineComponent as b, computed as k, resolveComponent as d, createBlock as m, openBlock as o, withCtx as l, createElementVNode as t, createElementBlock as r, Fragment as C, renderList as y, unref as s, normalizeClass as L, toDisplayString as _, createVNode as c, renderSlot as B, createCommentVNode as v } from "vue";
1
+ import { defineComponent as k, computed as C, resolveComponent as m, openBlock as o, createBlock as _, withCtx as l, createElementVNode as t, createElementBlock as c, Fragment as y, renderList as L, unref as s, normalizeClass as x, toDisplayString as v, createVNode as i, renderSlot as B, createCommentVNode as f } from "vue";
2
2
  import { ArrowDown as N } from "@element-plus/icons-vue";
3
3
  import S from "../../locales/index.js";
4
- import { Storage as x } from "../../utils/repoUtils.js";
5
- import { messages as i } from "../../locales/messages.js";
6
- import V from "./NavIconBtn.vue.js";
7
- const j = {
4
+ import { Storage as V } from "../../utils/repoUtils.js";
5
+ import { messages as u } from "../../locales/messages.js";
6
+ import j from "./NavIconBtn.vue.js";
7
+ const D = {
8
8
  key: 0,
9
9
  class: "language-select__current"
10
- }, D = { class: "language-select__panel" }, E = ["onClick"], G = /* @__PURE__ */ b({
10
+ }, E = { class: "language-select__panel" }, M = ["onClick"], G = /* @__PURE__ */ k({
11
11
  __name: "LanguageSelect",
12
12
  props: {
13
13
  showLabel: { type: Boolean, default: !1 }
14
14
  },
15
- setup(M) {
16
- const { locale: u } = S.global, n = k(
17
- () => i[u.value].name
18
- ), f = Object.keys(i).map((e) => ({
19
- label: i[e].name,
15
+ setup(n) {
16
+ const { locale: g } = S.global, r = C(
17
+ () => u[g.value].name
18
+ ), h = Object.keys(u).map((e) => ({
19
+ label: u[e].name,
20
20
  value: e
21
- })), h = (e) => {
22
- x.set("locale", e), location.reload();
21
+ })), w = (e) => {
22
+ V.set("locale", e), location.reload();
23
23
  };
24
24
  return (e, p) => {
25
- const g = d("el-icon"), w = d("el-popover");
26
- return o(), m(w, {
25
+ const d = m("el-icon"), b = m("el-popover");
26
+ return o(), _(b, {
27
27
  placement: "bottom",
28
28
  width: 180,
29
29
  trigger: "hover",
30
30
  "popper-class": "top-language-popover"
31
31
  }, {
32
32
  reference: l(() => [
33
- c(V, {
33
+ i(j, {
34
34
  "langselect-toggle": "",
35
35
  tag: "div",
36
36
  class: "language-select",
37
- "icon-only": !e.showLabel,
38
- title: n.value,
39
- "aria-label": n.value
37
+ "icon-only": !n.showLabel,
38
+ title: r.value,
39
+ "aria-label": r.value
40
40
  }, {
41
41
  default: l(() => [
42
42
  B(e.$slots, "prefix", {}, void 0, !0),
43
- c(g, null, {
44
- default: l(() => p[0] || (p[0] = [
43
+ i(d, null, {
44
+ default: l(() => [...p[0] || (p[0] = [
45
45
  t("svg", {
46
46
  xmlns: "http://www.w3.org/2000/svg",
47
47
  width: "24",
@@ -64,31 +64,30 @@ const j = {
64
64
  t("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
65
65
  t("path", { d: "M2 12h20" })
66
66
  ], -1)
67
- ])),
68
- _: 1,
69
- __: [0]
67
+ ])]),
68
+ _: 1
70
69
  }),
71
- e.showLabel ? (o(), r("span", j, _(n.value), 1)) : v("", !0),
72
- e.showLabel ? (o(), m(g, {
70
+ n.showLabel ? (o(), c("span", D, v(r.value), 1)) : f("", !0),
71
+ n.showLabel ? (o(), _(d, {
73
72
  key: 1,
74
73
  class: "language-select__caret"
75
74
  }, {
76
75
  default: l(() => [
77
- c(s(N))
76
+ i(s(N))
78
77
  ]),
79
78
  _: 1
80
- })) : v("", !0)
79
+ })) : f("", !0)
81
80
  ]),
82
81
  _: 3
83
82
  }, 8, ["icon-only", "title", "aria-label"])
84
83
  ]),
85
84
  default: l(() => [
86
- t("div", D, [
87
- (o(!0), r(C, null, y(s(f), (a) => (o(), r("div", {
85
+ t("div", E, [
86
+ (o(!0), c(y, null, L(s(h), (a) => (o(), c("div", {
88
87
  key: a.value,
89
- class: L(["language-select__option", { "language-select__option--active": a.value === s(u) }]),
90
- onClick: ($) => h(a.value)
91
- }, _(a.label), 11, E))), 128))
88
+ class: x(["language-select__option", { "language-select__option--active": a.value === s(g) }]),
89
+ onClick: ($) => w(a.value)
90
+ }, v(a.label), 11, M))), 128))
92
91
  ])
93
92
  ]),
94
93
  _: 3
@@ -1 +1 @@
1
- .layout-breadcrumb[data-v-21c4b2fb]{display:flex;min-width:0;align-items:center;gap:6px;color:var(--ui-text-placeholder);line-height:1.4}.layout-breadcrumb__back[data-v-21c4b2fb]{display:inline-flex;width:24px;height:24px;flex:0 0 auto;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--ui-radius-sm);padding:0;background:transparent;color:var(--ui-text-placeholder);cursor:pointer;font:inherit;transition:background-color var(--ui-transition-fast),border-color var(--ui-transition-fast),color var(--ui-transition-fast)}.layout-breadcrumb__back[data-v-21c4b2fb]:hover{background:var(--ui-bg-muted);color:var(--ui-text-muted)}.layout-breadcrumb__back[data-v-21c4b2fb]:focus-visible{outline:2px solid var(--ui-ring);outline-offset:2px}.layout-breadcrumb__separator[data-v-21c4b2fb]{flex:0 0 auto;color:var(--ui-text-disabled);font-size:11px}.layout-breadcrumb__link[data-v-21c4b2fb],.layout-breadcrumb__current[data-v-21c4b2fb]{display:inline-block;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layout-breadcrumb__link[data-v-21c4b2fb]{border:0;padding:0;background:transparent;color:var(--ui-text-placeholder);cursor:pointer;font:inherit;transition:color var(--ui-transition-fast)}.layout-breadcrumb__link[data-v-21c4b2fb]:hover{color:var(--ui-text-muted)}.layout-breadcrumb__link[data-v-21c4b2fb]:focus-visible{outline:2px solid var(--ui-ring);outline-offset:2px;border-radius:var(--ui-radius-sm)}.layout-breadcrumb__current[data-v-21c4b2fb]{color:var(--ui-text-muted);font-weight:500}@media (max-width: 768px){.layout-breadcrumb__link[data-v-21c4b2fb],.layout-breadcrumb__current[data-v-21c4b2fb]{max-width:44vw}}
1
+ .layout-breadcrumb[data-v-21c4b2fb]{display:flex;min-width:0;align-items:center;gap:6px;color:var(--ui-text-placeholder);line-height:1.4}.layout-breadcrumb__back[data-v-21c4b2fb]{display:inline-flex;width:24px;height:24px;flex:0 0 auto;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--ui-radius-sm);padding:0;background:transparent;color:var(--ui-text-placeholder);cursor:pointer;font:inherit;transition:background-color var(--ui-transition-fast),border-color var(--ui-transition-fast),color var(--ui-transition-fast)}.layout-breadcrumb__back[data-v-21c4b2fb]:hover{background:var(--ui-bg-muted);color:var(--ui-text-muted)}.layout-breadcrumb__back[data-v-21c4b2fb]:focus-visible{outline:2px solid var(--ui-ring);outline-offset:2px}.layout-breadcrumb__separator[data-v-21c4b2fb]{flex:0 0 auto;color:var(--ui-text-disabled);font-size:11px}.layout-breadcrumb__link[data-v-21c4b2fb],.layout-breadcrumb__current[data-v-21c4b2fb]{display:inline-block;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layout-breadcrumb__link[data-v-21c4b2fb]{border:0;padding:0;background:transparent;color:var(--ui-text-placeholder);cursor:pointer;font:inherit;transition:color var(--ui-transition-fast)}.layout-breadcrumb__link[data-v-21c4b2fb]:hover{color:var(--ui-text-muted)}.layout-breadcrumb__link[data-v-21c4b2fb]:focus-visible{outline:2px solid var(--ui-ring);outline-offset:2px;border-radius:var(--ui-radius-sm)}.layout-breadcrumb__current[data-v-21c4b2fb]{color:var(--ui-text-muted);font-weight:500}@media(max-width:768px){.layout-breadcrumb__link[data-v-21c4b2fb],.layout-breadcrumb__current[data-v-21c4b2fb]{max-width:44vw}}
@@ -18,8 +18,8 @@ type __VLS_Props = {
18
18
  };
19
19
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
20
  parentPath: string;
21
- currentTitle: string;
22
21
  items: LayoutBreadcrumbItem[];
22
+ currentTitle: string;
23
23
  preserveQueryKeys: string[];
24
24
  showCurrent: boolean;
25
25
  showBack: boolean;
@@ -1,4 +1,4 @@
1
- import { defineComponent as I, computed as U, resolveComponent as W, createElementBlock as u, createCommentVNode as _, openBlock as c, createVNode as w, withCtx as z, unref as M, Fragment as X, renderList as Y, createBlock as Z, toDisplayString as B } from "vue";
1
+ import { defineComponent as I, computed as U, resolveComponent as W, openBlock as c, createElementBlock as u, createVNode as w, withCtx as z, unref as M, createCommentVNode as _, Fragment as X, renderList as Y, createBlock as Z, toDisplayString as B } from "vue";
2
2
  import { ArrowLeft as tt, ArrowRight as et } from "@element-plus/icons-vue";
3
3
  import { useRoute as nt, useRouter as rt } from "vue-router";
4
4
  import { replaceName as at, tname as ot } from "../../utils/repoUtils.js";
@@ -1,4 +1,4 @@
1
- import { defineComponent as $, computed as D, useModel as q, resolveComponent as B, createBlock as E, openBlock as d, withCtx as b, createVNode as H, createElementVNode as a, createElementBlock as m, Fragment as x, renderList as g, toDisplayString as v, normalizeClass as M, unref as p, resolveDynamicComponent as J, mergeProps as K } from "vue";
1
+ import { defineComponent as $, computed as D, useModel as q, resolveComponent as B, openBlock as d, createBlock as E, withCtx as b, createVNode as H, createElementVNode as a, createElementBlock as m, Fragment as x, renderList as g, toDisplayString as v, normalizeClass as M, unref as p, resolveDynamicComponent as J, mergeProps as K } from "vue";
2
2
  import { replaceName as y, tname as I } from "../../utils/repoUtils.js";
3
3
  import { useApp as Q } from "../hooks/useApp.js";
4
4
  import { useSetting as Y } from "../hooks/useSetting.js";
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, computed as o, createElementBlock as n, openBlock as t, normalizeClass as v } from "vue";
1
+ import { defineComponent as g, computed as o, openBlock as n, createElementBlock as t, normalizeClass as v } from "vue";
2
2
  const f = { class: "menu-item-icon" }, S = ["innerHTML"], I = /* @__PURE__ */ g({
3
3
  __name: "MenuItemIcon",
4
4
  props: {
@@ -6,12 +6,12 @@ const f = { class: "menu-item-icon" }, S = ["innerHTML"], I = /* @__PURE__ */ g(
6
6
  },
7
7
  setup(i) {
8
8
  const a = i, s = o(() => a.icon || "metisicon-yingyong"), r = /^\s*<svg[\s>]/i, l = /\son[a-z]+\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi, _ = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, p = /\s(?:href|xlink:href)\s*=\s*("\s*javascript:[^"]*"|'\s*javascript:[^']*')/gi, c = (e) => !!e && r.test(e), u = (e) => !e || !c(e) ? "" : e.replace(_, "").replace(l, "").replace(p, ""), m = o(() => u(s.value));
9
- return (e, E) => (t(), n("div", f, [
10
- c(s.value) ? (t(), n("span", {
9
+ return (e, E) => (n(), t("div", f, [
10
+ c(s.value) ? (n(), t("span", {
11
11
  key: 0,
12
12
  class: "menu-item-icon__svg",
13
13
  innerHTML: m.value
14
- }, null, 8, S)) : (t(), n("i", {
14
+ }, null, 8, S)) : (n(), t("i", {
15
15
  key: 1,
16
16
  class: v(s.value)
17
17
  }, null, 2))
@@ -1,23 +1,23 @@
1
- import { defineComponent as e, createBlock as n, openBlock as o, resolveDynamicComponent as a, normalizeClass as l, withCtx as r, renderSlot as p } from "vue";
2
- const c = /* @__PURE__ */ e({
1
+ import { defineComponent as n, openBlock as o, createBlock as a, resolveDynamicComponent as l, normalizeClass as c, withCtx as u, renderSlot as i } from "vue";
2
+ const d = /* @__PURE__ */ n({
3
3
  __name: "NavIconBtn",
4
4
  props: {
5
5
  tag: { default: "button" },
6
6
  type: { default: "button" },
7
7
  iconOnly: { type: Boolean, default: !0 }
8
8
  },
9
- setup(s) {
10
- return (t, u) => (o(), n(a(t.tag), {
9
+ setup(t) {
10
+ return (e, r) => (o(), a(l(t.tag), {
11
11
  type: t.tag === "button" ? t.type : void 0,
12
- class: l(["nav-icon-btn", { "nav-icon-btn--icon-only": t.iconOnly }])
12
+ class: c(["nav-icon-btn", { "nav-icon-btn--icon-only": t.iconOnly }])
13
13
  }, {
14
- default: r(() => [
15
- p(t.$slots, "default", {}, void 0, !0)
14
+ default: u(() => [
15
+ i(e.$slots, "default", {}, void 0, !0)
16
16
  ]),
17
17
  _: 3
18
18
  }, 8, ["type", "class"]));
19
19
  }
20
20
  });
21
21
  export {
22
- c as default
22
+ d as default
23
23
  };