@done-coding/admin-core 0.8.2 → 0.9.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 (94) hide show
  1. package/es/bridge/config-hook.mjs +37 -0
  2. package/es/bridge/index.mjs +157 -62
  3. package/es/bridge/plugin.mjs +29 -0
  4. package/es/bridge/theme.mjs +62 -0
  5. package/es/components/app-layout/AppBody.vue.mjs +1 -1
  6. package/es/components/app-layout/AppBody.vue2.mjs +47 -49
  7. package/es/components/app-layout/AppBreadcrumb.vue.mjs +1 -1
  8. package/es/components/app-layout/AppBreadcrumb.vue2.mjs +35 -41
  9. package/es/components/app-layout/AppFooter.vue.mjs +2 -2
  10. package/es/components/app-layout/AppFooter.vue2.mjs +8 -8
  11. package/es/components/app-layout/AppHeader.vue.mjs +1 -1
  12. package/es/components/app-layout/AppHeader.vue2.mjs +60 -69
  13. package/es/components/app-layout/AppLayout.vue.mjs +2 -2
  14. package/es/components/app-layout/AppLayout.vue2.mjs +95 -93
  15. package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
  16. package/es/components/app-layout/AppSidebar.vue2.mjs +79 -82
  17. package/es/components/app-layout/AppTheme.vue.mjs +7 -0
  18. package/es/components/app-layout/AppTheme.vue2.mjs +38 -0
  19. package/es/components/data-view/DataListView.vue.mjs +2 -2
  20. package/es/components/data-view/DataListView.vue2.mjs +36 -36
  21. package/es/components/display/ActionConfirm.vue2.mjs +16 -16
  22. package/es/components/display/HeightProvider.vue.mjs +10 -10
  23. package/es/components/display/TabsHeader.vue.mjs +4 -4
  24. package/es/components/display/TabsHeader.vue2.mjs +34 -34
  25. package/es/components/display/TabsMain.vue.mjs +40 -39
  26. package/es/components/display/TabsRefineFlow.vue.mjs +30 -28
  27. package/es/components/form/FormItem.vue.mjs +1 -1
  28. package/es/components/form/FormItem.vue2.mjs +75 -81
  29. package/es/components/form/FormMain.vue.mjs +81 -88
  30. package/es/components/form/FormRadioGroup.vue.mjs +42 -49
  31. package/es/components/form/FormSearch.vue.mjs +1 -1
  32. package/es/components/form/FormSearch.vue2.mjs +116 -123
  33. package/es/components/form/FormSelect.vue.mjs +34 -40
  34. package/es/components/form/FormSubmitBtn.vue.mjs +24 -35
  35. package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
  36. package/es/components/form/FormSubmitPanel.vue2.mjs +75 -55
  37. package/es/components/form/FormTree.vue.mjs +16 -21
  38. package/es/components/form/FormVerifyCode.vue.mjs +37 -43
  39. package/es/components/form/FormVerifyImage.vue.mjs +2 -2
  40. package/es/components/form/FormVerifyImage.vue2.mjs +36 -41
  41. package/es/components/form/use-form-submit.mjs +21 -0
  42. package/es/components/list-page/ListPage.vue.mjs +2 -2
  43. package/es/components/list-page/ListPage.vue2.mjs +134 -139
  44. package/es/components/menu/MenuItemSub.vue.mjs +41 -48
  45. package/es/components/menu/MenuTree.vue.mjs +58 -65
  46. package/es/components/misc/AutoRefresh.vue.mjs +2 -2
  47. package/es/components/misc/AutoRefresh.vue2.mjs +44 -51
  48. package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
  49. package/es/components/misc/AutoRefreshGroup.vue2.mjs +37 -43
  50. package/es/components/modal/ConfirmModal.vue.mjs +3 -3
  51. package/es/components/modal/ConfirmModal.vue2.mjs +93 -100
  52. package/es/components/modal/DetailModal.vue.mjs +38 -41
  53. package/es/components/panel/PanelEditSwitch.vue.mjs +1 -1
  54. package/es/components/panel/PanelEditSwitch.vue2.mjs +50 -55
  55. package/es/components/panel/PanelMain.vue.mjs +2 -2
  56. package/es/components/panel/PanelMain.vue2.mjs +67 -74
  57. package/es/components/table/TableMain.vue.mjs +2 -2
  58. package/es/components/table/TableMain.vue2.mjs +221 -229
  59. package/es/components/table/TableToolbar.vue.mjs +2 -2
  60. package/es/components/table/TableToolbar.vue2.mjs +115 -126
  61. package/es/hooks/use-admin-theme-apply.mjs +84 -0
  62. package/es/hooks/use-admin-viewport-apply.mjs +27 -0
  63. package/es/index.mjs +125 -117
  64. package/es/inject/key.mjs +7 -4
  65. package/es/store/app.mjs +75 -84
  66. package/es/style.css +1 -1
  67. package/es/utils/theme-scale.mjs +37 -0
  68. package/package.json +2 -4
  69. package/types/bridge/config-hook.d.ts +91 -0
  70. package/types/bridge/index.d.ts +110 -10
  71. package/types/bridge/plugin.d.ts +39 -0
  72. package/types/bridge/theme.d.ts +66 -0
  73. package/types/components/app-layout/AppTheme.vue.d.ts +2 -0
  74. package/types/components/app-layout/types.d.ts +1 -1
  75. package/types/components/form/FormItem.vue.d.ts +12 -12
  76. package/types/components/form/FormSubmitPanel.vue.d.ts +4 -0
  77. package/types/components/form/FormTree.vue.d.ts +50 -50
  78. package/types/components/form/types.d.ts +17 -0
  79. package/types/components/form/use-form-submit.d.ts +25 -0
  80. package/types/components/menu/MenuTree.vue.d.ts +10 -10
  81. package/types/components/modal/ModalShelf.vue.d.ts +1 -1
  82. package/types/components/table/TableMain.vue.d.ts +1 -1
  83. package/types/hooks/activated.d.ts +2 -2
  84. package/types/hooks/feel-size.d.ts +1 -1
  85. package/types/hooks/index.d.ts +2 -0
  86. package/types/hooks/menus-dispatch.d.ts +5 -5
  87. package/types/hooks/use-admin-theme-apply.d.ts +17 -0
  88. package/types/hooks/use-admin-viewport-apply.d.ts +15 -0
  89. package/types/hooks/use-breakpoint.d.ts +1 -1
  90. package/types/inject/key.d.ts +18 -0
  91. package/types/store/app.d.ts +138 -59
  92. package/types/store/user.d.ts +3 -3
  93. package/types/utils/index.d.ts +1 -0
  94. package/types/utils/theme-scale.d.ts +35 -0
@@ -1,7 +1,7 @@
1
1
  import o from "./AppFooter.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-393d9768"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bba5d0e4"]]);
5
5
  export {
6
- _ as default
6
+ e as default
7
7
  };
@@ -1,17 +1,17 @@
1
- import { defineComponent as r, inject as n, computed as p, openBlock as l, createElementBlock as s, normalizeStyle as m, unref as a, createElementVNode as c } from "vue";
2
- import { APP_LAYOUT_APP_STORE_KEY as f } from "../../inject/key.mjs";
3
- const S = /* @__PURE__ */ r({
1
+ import { defineComponent as r, inject as p, computed as n, openBlock as l, createElementBlock as s, normalizeStyle as a, createElementVNode as m } from "vue";
2
+ import { APP_LAYOUT_APP_STORE_KEY as c } from "../../inject/key.mjs";
3
+ const d = /* @__PURE__ */ r({
4
4
  __name: "AppFooter",
5
5
  setup(_) {
6
- const o = n(f), t = p(() => o.footerStyle);
7
- return (i, e) => (l(), s("div", {
6
+ const o = p(c), t = n(() => o.footerStyle);
7
+ return (f, e) => (l(), s("div", {
8
8
  class: "app-footer",
9
- style: m(a(t))
9
+ style: a(t.value)
10
10
  }, [...e[0] || (e[0] = [
11
- c("div", { class: "app-footer-shim" }, null, -1)
11
+ m("div", { class: "app-footer-shim" }, null, -1)
12
12
  ])], 4));
13
13
  }
14
14
  });
15
15
  export {
16
- S as default
16
+ d as default
17
17
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./AppHeader.vue2.mjs";
2
2
  /* empty css */
3
3
  import p from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const e = /* @__PURE__ */ p(o, [["__scopeId", "data-v-ef3cc8a6"]]);
4
+ const e = /* @__PURE__ */ p(o, [["__scopeId", "data-v-b47543cd"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -1,12 +1,9 @@
1
- import { ElIcon as w, ElSwitch as E } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/switch/style/css";
4
- import "element-plus/es/components/icon/style/css";
5
- import { defineComponent as I, useCssVars as g, unref as o, inject as B, toRefs as P, computed as m, watch as V, nextTick as $, openBlock as r, createElementBlock as s, normalizeStyle as T, createElementVNode as d, renderSlot as v, normalizeClass as _, Fragment as b, renderList as x, createBlock as f, withCtx as A, resolveDynamicComponent as D, createCommentVNode as y, toDisplayString as L, createVNode as N } from "vue";
6
- import { Sunny as R, Moon as q } from "@element-plus/icons-vue";
7
- import { useRouter as z } from "vue-router";
8
- import { APP_LAYOUT_APP_STORE_KEY as F } from "../../inject/key.mjs";
9
- const O = { class: "app-header-shim" }, U = ["name", "onClick"], Y = { class: "app-header-userInfo" }, ee = /* @__PURE__ */ I({
1
+ import { defineComponent as S, useCssVars as k, inject as h, computed as r, watch as w, nextTick as A, openBlock as a, createElementBlock as n, normalizeStyle as E, createElementVNode as c, renderSlot as v, normalizeClass as _, Fragment as B, renderList as I, createBlock as f, unref as $, withCtx as b, resolveDynamicComponent as L, createCommentVNode as y, toDisplayString as T, createVNode as V } from "vue";
2
+ import { useRouter as x } from "vue-router";
3
+ import { ElIcon as Y } from "element-plus";
4
+ import D from "./AppTheme.vue.mjs";
5
+ import { APP_LAYOUT_APP_STORE_KEY as N, APP_LAYOUT_BRIDGE_KEY as O } from "../../inject/key.mjs";
6
+ const R = { class: "app-header-shim" }, q = ["name", "onClick"], z = { class: "app-header-userInfo" }, J = /* @__PURE__ */ S({
10
7
  __name: "AppHeader",
11
8
  props: {
12
9
  show: { type: Boolean },
@@ -15,27 +12,30 @@ const O = { class: "app-header-shim" }, U = ["name", "onClick"], Y = { class: "a
15
12
  activeModuleMenu: {},
16
13
  menuFlatList: {}
17
14
  },
18
- setup(p) {
19
- g((e) => ({
20
- v3dfae5bc: o(u).baseColor,
21
- v158cd0d2: o(u).primaryColor
15
+ setup(u) {
16
+ k((t) => ({
17
+ ae6f6fe0: l.value.left,
18
+ v4782742c: l.value.top,
19
+ v70971b33: l.value.right,
20
+ fcf1a792: p.value.baseColor,
21
+ d3910988: p.value.primaryColor
22
22
  }));
23
- const c = p, i = B(F), { theme: u } = P(i), S = m(() => i.headerStyle), k = z(), h = `app-header-module_${Math.random().toString(36).substring(2)}`, C = m(() => c.menus), l = m({
23
+ const s = u, d = h(N), C = h(O), p = r(() => C.themeColors.value), g = r(() => d.headerStyle), l = r(() => d.viewportPadding), M = x(), m = `app-header-module_${Math.random().toString(36).substring(2)}`, P = r(() => s.menus), i = r({
24
24
  get() {
25
- var e;
26
- return (e = c.activeModuleMenu) == null ? void 0 : e.path;
25
+ var t;
26
+ return (t = s.activeModuleMenu) == null ? void 0 : t.path;
27
27
  },
28
- set(e) {
29
- var a, n;
30
- ((n = (a = c.activeMenu) == null ? void 0 : a.parentPathList) == null ? void 0 : n[0]) !== e && k.push(e);
28
+ set(t) {
29
+ var o, e;
30
+ ((e = (o = s.activeMenu) == null ? void 0 : o.parentPathList) == null ? void 0 : e[0]) !== t && M.push(t);
31
31
  }
32
32
  });
33
- return V(
34
- l,
35
- (e) => {
36
- e && $(() => {
37
- var a, n;
38
- (n = (a = document.querySelector(`.${h}`)) == null ? void 0 : a.querySelector(`[name="${e}"]`)) == null || n.scrollIntoView({
33
+ return w(
34
+ i,
35
+ (t) => {
36
+ t && A(() => {
37
+ var o, e;
38
+ (e = (o = document.querySelector(`.${m}`)) == null ? void 0 : o.querySelector(`[name="${t}"]`)) == null || e.scrollIntoView({
39
39
  behavior: "smooth"
40
40
  });
41
41
  });
@@ -43,54 +43,45 @@ const O = { class: "app-header-shim" }, U = ["name", "onClick"], Y = { class: "a
43
43
  {
44
44
  immediate: !0
45
45
  }
46
- ), (e, a) => {
47
- const n = w, M = E;
48
- return r(), s("div", {
49
- class: "app-header",
50
- style: T(o(S))
51
- }, [
52
- d("div", O, [
53
- v(e.$slots, "left", {}, void 0, !0),
54
- o(C) ? (r(), s("div", {
55
- key: 0,
56
- class: _(["app-header-module", h])
46
+ ), (t, o) => (a(), n("div", {
47
+ class: "app-header",
48
+ style: E(g.value)
49
+ }, [
50
+ c("div", R, [
51
+ v(t.$slots, "left", {}, void 0, !0),
52
+ P.value ? (a(), n("div", {
53
+ key: 0,
54
+ class: _(["app-header-module", m])
55
+ }, [
56
+ (a(!0), n(B, null, I(u.menus, (e) => (a(), n("div", {
57
+ key: e.path,
58
+ name: e.path,
59
+ class: _([
60
+ "app-header-module-item",
61
+ i.value === e.path ? "app-header-module-item_active" : ""
62
+ ]),
63
+ onClick: (F) => i.value = e.path
57
64
  }, [
58
- (r(!0), s(b, null, x(p.menus, (t) => (r(), s("div", {
59
- key: t.path,
60
- name: t.path,
61
- class: _([
62
- "app-header-module-item",
63
- o(l) === t.path ? "app-header-module-item_active" : ""
65
+ e.menuIcon ? (a(), f($(Y), {
66
+ key: 0,
67
+ class: "app-header-module-item__icon"
68
+ }, {
69
+ default: b(() => [
70
+ (a(), f(L(e.menuIcon)))
64
71
  ]),
65
- onClick: (j) => l.value = t.path
66
- }, [
67
- t.menuIcon ? (r(), f(n, {
68
- key: 0,
69
- class: "app-header-module-item__icon"
70
- }, {
71
- default: A(() => [
72
- (r(), f(D(t.menuIcon)))
73
- ]),
74
- _: 2
75
- }, 1024)) : y("", !0),
76
- d("span", null, L(t.title), 1)
77
- ], 10, U))), 128))
78
- ])) : y("", !0),
79
- d("div", Y, [
80
- N(M, {
81
- "model-value": o(i).isDarkTheme,
82
- class: "app-header-userInfo__theme-switch",
83
- "active-action-icon": o(q),
84
- "inactive-action-icon": o(R),
85
- "onUpdate:modelValue": a[0] || (a[0] = (t) => o(i).changeIsDarkTheme(!!t))
86
- }, null, 8, ["model-value", "active-action-icon", "inactive-action-icon"]),
87
- v(e.$slots, "right", {}, void 0, !0)
88
- ])
72
+ _: 2
73
+ }, 1024)) : y("", !0),
74
+ c("span", null, T(e.title), 1)
75
+ ], 10, q))), 128))
76
+ ])) : y("", !0),
77
+ c("div", z, [
78
+ V(D),
79
+ v(t.$slots, "right", {}, void 0, !0)
89
80
  ])
90
- ], 4);
91
- };
81
+ ])
82
+ ], 4));
92
83
  }
93
84
  });
94
85
  export {
95
- ee as default
86
+ J as default
96
87
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./AppLayout.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6924f8b7"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7aeee1b9"]]);
5
5
  export {
6
- f as default
6
+ r as default
7
7
  };
@@ -1,17 +1,17 @@
1
- import { ElWatermark as F } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/watermark/style/css";
4
- import { defineComponent as R, provide as d, computed as n, watch as f, openBlock as E, createElementBlock as P, normalizeClass as B, unref as o, createVNode as a, withCtx as r, renderSlot as u } from "vue";
5
- import H from "./AppBody.vue.mjs";
6
- import T from "./AppHeader.vue.mjs";
1
+ import { defineComponent as P, provide as p, computed as n, watch as c, openBlock as F, createElementBlock as T, normalizeClass as R, createVNode as r, unref as a, withCtx as o, renderSlot as u } from "vue";
2
+ import { ElWatermark as B } from "element-plus";
3
+ import { useRoute as E, useRouter as H } from "vue-router";
4
+ import y from "./AppBody.vue.mjs";
5
+ import C from "./AppHeader.vue.mjs";
7
6
  import k from "./AppFooter.vue.mjs";
8
- import y from "./AppSidebar.vue.mjs";
9
- import $ from "../modal/ModalShelf.vue.mjs";
10
- import { useRoute as C, useRouter as Y } from "vue-router";
11
- import { APP_LAYOUT_BRIDGE_KEY as K, APP_LAYOUT_APP_STORE_KEY as O, APP_LAYOUT_USER_STORE_KEY as U } from "../../inject/key.mjs";
12
- import { flatRouteMetaResolveRaw as z } from "../../utils/router.mjs";
13
- import { useMenusDataDispatch as D } from "../../hooks/menus-dispatch.mjs";
14
- const te = /* @__PURE__ */ R({
7
+ import O from "./AppSidebar.vue.mjs";
8
+ import I from "../modal/ModalShelf.vue.mjs";
9
+ import { APP_LAYOUT_BRIDGE_KEY as Y, APP_LAYOUT_APP_STORE_KEY as $, APP_LAYOUT_USER_STORE_KEY as D } from "../../inject/key.mjs";
10
+ import { useAdminThemeApply as K } from "../../hooks/use-admin-theme-apply.mjs";
11
+ import { useAdminViewportApply as U } from "../../hooks/use-admin-viewport-apply.mjs";
12
+ import { flatRouteMetaResolveRaw as V } from "../../utils/router.mjs";
13
+ import { useMenusDataDispatch as z } from "../../hooks/menus-dispatch.mjs";
14
+ const re = /* @__PURE__ */ P({
15
15
  __name: "AppLayout",
16
16
  props: {
17
17
  adminBridge: {},
@@ -21,31 +21,36 @@ const te = /* @__PURE__ */ R({
21
21
  sidebarAboveHeader: { type: Boolean, default: !1 }
22
22
  },
23
23
  setup(m) {
24
- const t = m, h = {
24
+ const t = m, f = {
25
25
  color: "rgba(0,0,0,0.08)",
26
26
  fontSize: 12
27
27
  };
28
- d(K, t.adminBridge), d(O, t.appStore), d(U, t.userStore);
29
- const l = n(() => t.adminBridge.generateRouteMetaRawTree(
28
+ p(Y, t.adminBridge), p($, t.appStore), p(D, t.userStore), K({
29
+ getThemeConfig: () => t.adminBridge.APP_THEME_CONFIG,
30
+ getThemeIsDark: () => t.adminBridge.themeIsDark.value
31
+ }), U({
32
+ getViewportConfig: () => t.adminBridge.APP_LAYOUT_VIEWPORT_CONFIG
33
+ });
34
+ const d = n(() => t.adminBridge.generateRouteMetaRawTree(
30
35
  t.adminBridge.getRoutes(),
31
36
  {
32
37
  parentPath: "",
33
- filterFn: (e, i, p) => e.checkPermission ? e.menuShow && t.userStore.havePermissionByKey(e.permissionKey) : e.menuShow && (!p || i),
34
- sortFn: (e, i) => e.menuSort - i.menuSort
38
+ filterFn: (e, s, w) => e.checkPermission ? e.menuShow && t.userStore.havePermissionByKey(e.permissionKey) : e.menuShow && (!w || s),
39
+ sortFn: (e, s) => e.menuSort - s.menuSort
35
40
  }
36
- )), s = n(() => z(l.value)), {
37
- sidebarMenus: c,
38
- headerMenus: v,
39
- activeMenu: S,
40
- activeModuleMenu: _,
41
- needRedirectToFirstChildMenu: g
42
- } = D({
43
- getMenus: () => l.value,
44
- getMenuFlatList: () => s.value,
41
+ )), i = n(() => V(d.value)), {
42
+ sidebarMenus: l,
43
+ headerMenus: h,
44
+ activeMenu: v,
45
+ activeModuleMenu: g,
46
+ needRedirectToFirstChildMenu: S
47
+ } = z({
48
+ getMenus: () => d.value,
49
+ getMenuFlatList: () => i.value,
45
50
  getExtractLevel1ToHeader: () => t.appStore.extractLevel1ToHeader
46
- }), M = n(() => t.userStore.isLogin), L = n(() => t.appStore.showHeader), b = n(() => t.appStore.showSidebar);
47
- f(
48
- () => c.value.length,
51
+ }), _ = n(() => t.userStore.isLogin), A = n(() => t.appStore.showHeader), M = n(() => t.appStore.showSidebar);
52
+ c(
53
+ () => l.value.length,
49
54
  (e) => {
50
55
  t.appStore.changeSidebarHasMenusStatus(!!e);
51
56
  },
@@ -53,75 +58,72 @@ const te = /* @__PURE__ */ R({
53
58
  immediate: !0
54
59
  }
55
60
  );
56
- const w = C(), A = Y();
57
- return f(
58
- g,
61
+ const L = E(), b = H();
62
+ return c(
63
+ S,
59
64
  (e) => {
60
- e && (console.log(`${w.path}需要重定向到${e.path}`), A.replace(e.path));
65
+ e && (console.log(`${L.path}需要重定向到${e.path}`), b.replace(e.path));
61
66
  },
62
67
  {
63
68
  immediate: !0
64
69
  }
65
- ), (e, i) => {
66
- const p = F;
67
- return E(), P("div", {
68
- class: B(["app-layout", {
69
- "app-layout_noLogin": !o(M)
70
- }])
71
- }, [
72
- a(p, {
73
- content: m.watermarkContent,
74
- font: h,
75
- zIndex: 1e4
76
- }, {
77
- default: r(() => [
78
- a(o($), { level: "app" }, {
79
- default: r(() => [
80
- a(H, { menuFlatList: o(s) }, {
81
- footer: r(() => [
82
- a(k)
83
- ]),
84
- _: 1
85
- }, 8, ["menuFlatList"]),
86
- a(y, {
87
- show: o(b),
88
- aboveHeader: m.sidebarAboveHeader,
89
- menus: o(c),
90
- menuFlatList: o(s)
91
- }, {
92
- top: r(() => [
93
- u(e.$slots, "sidebar-top", {}, void 0, !0)
94
- ]),
95
- bottom: r(() => [
96
- u(e.$slots, "sidebar-bottom", {}, void 0, !0)
97
- ]),
98
- _: 3
99
- }, 8, ["show", "aboveHeader", "menus", "menuFlatList"]),
100
- a(T, {
101
- show: o(L),
102
- menus: o(v),
103
- activeMenu: o(S),
104
- activeModuleMenu: o(_),
105
- menuFlatList: o(s)
106
- }, {
107
- left: r(() => [
108
- u(e.$slots, "header-left", {}, void 0, !0)
109
- ]),
110
- right: r(() => [
111
- u(e.$slots, "header-right", {}, void 0, !0)
112
- ]),
113
- _: 3
114
- }, 8, ["show", "menus", "activeMenu", "activeModuleMenu", "menuFlatList"])
115
- ]),
116
- _: 3
117
- })
118
- ]),
119
- _: 3
120
- }, 8, ["content"])
121
- ], 2);
122
- };
70
+ ), (e, s) => (F(), T("div", {
71
+ class: R(["app-layout", {
72
+ "app-layout_noLogin": !_.value
73
+ }])
74
+ }, [
75
+ r(a(B), {
76
+ content: m.watermarkContent,
77
+ font: f,
78
+ zIndex: 1e4
79
+ }, {
80
+ default: o(() => [
81
+ r(a(I), { level: "app" }, {
82
+ default: o(() => [
83
+ r(y, { menuFlatList: i.value }, {
84
+ footer: o(() => [
85
+ r(k)
86
+ ]),
87
+ _: 1
88
+ }, 8, ["menuFlatList"]),
89
+ r(O, {
90
+ show: M.value,
91
+ aboveHeader: m.sidebarAboveHeader,
92
+ menus: a(l),
93
+ menuFlatList: i.value
94
+ }, {
95
+ top: o(() => [
96
+ u(e.$slots, "sidebar-top", {}, void 0, !0)
97
+ ]),
98
+ bottom: o(() => [
99
+ u(e.$slots, "sidebar-bottom", {}, void 0, !0)
100
+ ]),
101
+ _: 3
102
+ }, 8, ["show", "aboveHeader", "menus", "menuFlatList"]),
103
+ r(C, {
104
+ show: A.value,
105
+ menus: a(h),
106
+ activeMenu: a(v),
107
+ activeModuleMenu: a(g),
108
+ menuFlatList: i.value
109
+ }, {
110
+ left: o(() => [
111
+ u(e.$slots, "header-left", {}, void 0, !0)
112
+ ]),
113
+ right: o(() => [
114
+ u(e.$slots, "header-right", {}, void 0, !0)
115
+ ]),
116
+ _: 3
117
+ }, 8, ["show", "menus", "activeMenu", "activeModuleMenu", "menuFlatList"])
118
+ ]),
119
+ _: 3
120
+ })
121
+ ]),
122
+ _: 3
123
+ }, 8, ["content"])
124
+ ], 2));
123
125
  }
124
126
  });
125
127
  export {
126
- te as default
128
+ re as default
127
129
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./AppSidebar.vue2.mjs";
2
2
  /* empty css */
3
3
  import p from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const a = /* @__PURE__ */ p(o, [["__scopeId", "data-v-37ff5e0c"]]);
4
+ const e = /* @__PURE__ */ p(o, [["__scopeId", "data-v-2499f12e"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -1,13 +1,10 @@
1
- import { ElTooltip as T, ElIcon as H } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/tooltip/style/css";
4
- import "element-plus/es/components/icon/style/css";
5
- import { defineComponent as P, useCssVars as w, unref as o, inject as A, computed as e, ref as b, toRefs as F, openBlock as f, createElementBlock as I, normalizeStyle as g, createVNode as a, withCtx as p, renderSlot as v, createElementVNode as h, createBlock as L, createCommentVNode as V } from "vue";
6
- import N from "../menu/MenuTree.vue.mjs";
7
- import y from "../display/WatchSize.vue.mjs";
8
- import { ArrowRightBold as R } from "@element-plus/icons-vue";
9
- import { APP_LAYOUT_APP_STORE_KEY as M } from "../../inject/key.mjs";
10
- const O = { class: "app-sidebar-shim" }, J = /* @__PURE__ */ P({
1
+ import { defineComponent as w, useCssVars as A, inject as f, computed as e, ref as b, openBlock as g, createElementBlock as T, normalizeStyle as h, createVNode as l, unref as o, withCtx as u, renderSlot as C, createElementVNode as y, createBlock as H, createCommentVNode as L } from "vue";
2
+ import F from "../menu/MenuTree.vue.mjs";
3
+ import S from "../display/WatchSize.vue.mjs";
4
+ import { ElTooltip as I, ElIcon as V } from "element-plus";
5
+ import { ArrowRightBold as Y } from "@element-plus/icons-vue";
6
+ import { APP_LAYOUT_APP_STORE_KEY as N, APP_LAYOUT_BRIDGE_KEY as O } from "../../inject/key.mjs";
7
+ const R = { class: "app-sidebar-shim" }, G = /* @__PURE__ */ w({
11
8
  __name: "AppSidebar",
12
9
  props: {
13
10
  show: { type: Boolean },
@@ -16,82 +13,82 @@ const O = { class: "app-sidebar-shim" }, J = /* @__PURE__ */ P({
16
13
  menuFlatList: {}
17
14
  },
18
15
  setup(s) {
19
- w((c) => ({
20
- ce9ef212: o(E),
21
- v309db2c2: o(x),
22
- v2189b8a1: o(_),
23
- v65908f82: o(l).bodyColor,
24
- v42a24063: o(l).primaryColor
16
+ A((c) => ({
17
+ f2149ac0: d.value.left,
18
+ v6fb5779c: d.value.top,
19
+ e0532af8: d.value.bottom,
20
+ v36eef49e: E.value,
21
+ v7a209d86: _.value,
22
+ v0a70f74c: B.value,
23
+ v1ffafb76: a.value.bodyColor,
24
+ v738d1dcc: a.value.primaryColor
25
25
  }));
26
- const C = s, r = A(M), m = e(() => r.sidebarStyle), d = b(0), u = b(0), S = e(() => parseFloat(m.value.paddingTop) || 0), x = e(
27
- () => `${Math.max(S.value, d.value)}px`
28
- ), _ = e(() => `${u.value}px`), E = e(() => C.aboveHeader ? 2 : 0), n = e(() => r.sidebarIsCollapse), $ = e(() => ({
26
+ const x = s, r = f(N), p = e(() => r.sidebarStyle), d = e(() => r.viewportPadding), m = b(0), v = b(0), P = e(() => parseFloat(p.value.paddingTop) || 0), _ = e(
27
+ () => `${Math.max(P.value, m.value)}px`
28
+ ), B = e(() => `${v.value}px`), E = e(() => x.aboveHeader ? 2 : 0), n = e(() => r.sidebarIsCollapse), $ = e(() => ({
29
29
  transform: `rotate(${n.value ? 0 : 180}deg)`
30
- })), { theme: l } = F(r);
31
- return (c, t) => {
32
- const k = H, B = T;
33
- return f(), I("div", {
34
- class: "app-sidebar",
35
- style: g(o(m))
36
- }, [
37
- a(o(y), {
38
- class: "app-sidebar-top",
39
- onHeightChange: t[0] || (t[0] = (i) => d.value = i)
40
- }, {
41
- default: p(() => [
42
- v(c.$slots, "top", {}, void 0, !0)
43
- ]),
44
- _: 3
45
- }),
46
- h("div", O, [
47
- a(o(N), {
48
- collapse: o(n),
49
- menus: s.menus,
50
- style: { height: "100%" },
51
- "background-color": o(l).bodyColor,
52
- "text-color": o(l).baseColor,
53
- "active-text-color": o(l).primaryColor,
54
- menuFlatList: s.menuFlatList,
55
- routerMode: ""
56
- }, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
30
+ })), k = f(O), a = e(() => k.themeColors.value);
31
+ return (c, t) => (g(), T("div", {
32
+ class: "app-sidebar",
33
+ style: h(p.value)
34
+ }, [
35
+ l(o(S), {
36
+ class: "app-sidebar-top",
37
+ onHeightChange: t[0] || (t[0] = (i) => m.value = i)
38
+ }, {
39
+ default: u(() => [
40
+ C(c.$slots, "top", {}, void 0, !0)
57
41
  ]),
58
- a(o(y), {
59
- class: "app-sidebar-bottom",
60
- onHeightChange: t[1] || (t[1] = (i) => u.value = i)
61
- }, {
62
- default: p(() => [
63
- v(c.$slots, "bottom", {}, void 0, !0)
64
- ]),
65
- _: 3
66
- }),
67
- s.show ? (f(), L(B, {
68
- key: 0,
69
- content: o(n) ? "展开" : "收起",
70
- placement: "right",
71
- "show-after": 200
72
- }, {
73
- default: p(() => [
74
- h("div", {
75
- class: "app-sidebar-toggle",
76
- onClick: t[2] || (t[2] = (i) => o(r).changeSidebarCollapseStatus(!o(n)))
77
- }, [
78
- a(k, null, {
79
- default: p(() => [
80
- a(o(R), {
81
- class: "app-sidebar-toggle-icon",
82
- style: g(o($))
83
- }, null, 8, ["style"])
84
- ]),
85
- _: 1
86
- })
87
- ])
88
- ]),
89
- _: 1
90
- }, 8, ["content"])) : V("", !0)
91
- ], 4);
92
- };
42
+ _: 3
43
+ }),
44
+ y("div", R, [
45
+ l(o(F), {
46
+ collapse: n.value,
47
+ menus: s.menus,
48
+ style: { height: "100%" },
49
+ "background-color": a.value.bodyColor,
50
+ "text-color": a.value.baseColor,
51
+ "active-text-color": a.value.primaryColor,
52
+ menuFlatList: s.menuFlatList,
53
+ routerMode: ""
54
+ }, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
55
+ ]),
56
+ l(o(S), {
57
+ class: "app-sidebar-bottom",
58
+ onHeightChange: t[1] || (t[1] = (i) => v.value = i)
59
+ }, {
60
+ default: u(() => [
61
+ C(c.$slots, "bottom", {}, void 0, !0)
62
+ ]),
63
+ _: 3
64
+ }),
65
+ s.show ? (g(), H(o(I), {
66
+ key: 0,
67
+ content: n.value ? "展开" : "收起",
68
+ placement: "right",
69
+ "show-after": 200
70
+ }, {
71
+ default: u(() => [
72
+ y("div", {
73
+ class: "app-sidebar-toggle",
74
+ onClick: t[2] || (t[2] = (i) => o(r).changeSidebarCollapseStatus(!n.value))
75
+ }, [
76
+ l(o(V), null, {
77
+ default: u(() => [
78
+ l(o(Y), {
79
+ class: "app-sidebar-toggle-icon",
80
+ style: h($.value)
81
+ }, null, 8, ["style"])
82
+ ]),
83
+ _: 1
84
+ })
85
+ ])
86
+ ]),
87
+ _: 1
88
+ }, 8, ["content"])) : L("", !0)
89
+ ], 4));
93
90
  }
94
91
  });
95
92
  export {
96
- J as default
93
+ G as default
97
94
  };
@@ -0,0 +1,7 @@
1
+ import o from "./AppTheme.vue2.mjs";
2
+ /* empty css */
3
+ import p from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const a = /* @__PURE__ */ p(o, [["__scopeId", "data-v-2607ca39"]]);
5
+ export {
6
+ a as default
7
+ };