@done-coding/admin-core 0.12.2 → 0.13.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 (31) hide show
  1. package/es/bridge/index.mjs +28 -28
  2. package/es/bridge/plugin.mjs +4 -4
  3. package/es/components/app-layout/AppBody.vue.mjs +2 -2
  4. package/es/components/app-layout/AppBody.vue2.mjs +26 -33
  5. package/es/components/app-layout/AppLayout.vue.mjs +2 -2
  6. package/es/components/app-layout/AppLayout.vue2.mjs +53 -56
  7. package/es/components/app-layout/AppSidebar.vue.mjs +3 -3
  8. package/es/components/app-layout/AppSidebar.vue2.mjs +8 -8
  9. package/es/components/display/ActionBtn.vue.mjs +37 -36
  10. package/es/components/display/ActionConfirm.vue.mjs +1 -1
  11. package/es/components/display/ActionConfirm.vue2.mjs +50 -50
  12. package/es/components/form/FormSubmitBtn.vue.mjs +18 -13
  13. package/es/components/form/use-form-submit.mjs +8 -8
  14. package/es/components/table/constants.mjs +5 -0
  15. package/es/hooks/activated.mjs +1 -1
  16. package/es/hooks/use-theme-apply.mjs +80 -79
  17. package/es/hooks/use-viewport-apply.mjs +17 -16
  18. package/es/index.mjs +131 -128
  19. package/es/inject/key.mjs +27 -24
  20. package/es/injectInfo.json.mjs +6 -0
  21. package/es/style.css +1 -1
  22. package/package.json +2 -2
  23. package/types/components/app-layout/AppLayout.vue.d.ts +1 -1
  24. package/types/components/display/ActionConfirm.vue.d.ts +2 -0
  25. package/types/components/form/types.d.ts +1 -0
  26. package/types/components/form/use-form-submit.d.ts +1 -0
  27. package/types/components/table/constants.d.ts +2 -0
  28. package/types/components/table/index.d.ts +1 -0
  29. package/types/hooks/use-theme-apply.d.ts +2 -2
  30. package/types/hooks/use-viewport-apply.d.ts +2 -2
  31. package/types/injectInfo.json.d.ts +7 -0
@@ -11,8 +11,8 @@ function x(e) {
11
11
  const C = e.APP_CACHE_CONFIG.namespace;
12
12
  let P;
13
13
  C === "" ? (console.error(
14
- "[coreBridge] APP_CACHE_CONFIG.namespace 为空,已兜底为 'CORE'"
15
- ), P = "CORE") : P = C, Object.freeze(e);
14
+ "[bridge] APP_CACHE_CONFIG.namespace 为空,已兜底为 'DC_CORE'"
15
+ ), P = "DC_CORE") : P = C, Object.freeze(e);
16
16
  const O = l(P), h = e.routes, m = e.getUserInfoInitFn, N = e.userInfoAccess, d = Y(P), U = B(
17
17
  e.APP_ROUTER_META_DEFAULT_CONFIG
18
18
  ), f = {
@@ -41,7 +41,7 @@ function x(e) {
41
41
  ...e.APP_LAYOUT_VIEWPORT_CONFIG
42
42
  },
43
43
  APP_LAYOUT_GAP_CONFIG: u
44
- }), A = S({
44
+ }), _ = S({
45
45
  initConfig: e.APP_THEME_CONFIG,
46
46
  update: t.update,
47
47
  // 布局基线快照(preset 切换基线复位 + 叠加用)。六组布局 config init 值浅快照——
@@ -64,32 +64,32 @@ function x(e) {
64
64
  },
65
65
  storage: O,
66
66
  defaultMode: e.defaultThemeMode
67
- }), G = H({ storage: O }), c = L(
68
- () => A.themeIsDark.value ? t.roTheme.dark : t.roTheme.light
67
+ }), G = H({ storage: O }), R = L(
68
+ () => _.themeIsDark.value ? t.roTheme.dark : t.roTheme.light
69
69
  );
70
- let o, n, T, I, i, a, E, F;
71
- const _ = (r) => `admin bridge: ${r} 未注册`, R = k(), g = {
70
+ let o, T, n, I, i, a, E, F;
71
+ const A = (r) => `bridge: ${r} 未注册`, c = k(), g = {
72
72
  register(r) {
73
- r.getToken && (o = r.getToken), r.goToLogin && (n = r.goToLogin), r.refreshToken && (T = r.refreshToken), r.refreshAuth && (I = r.refreshAuth), r.loginApi && (i = r.loginApi), r.logoutApi && (a = r.logoutApi), r.getUserInfoApi && (E = r.getUserInfoApi), r.refreshTokenApi && (F = r.refreshTokenApi);
73
+ r.getToken && (o = r.getToken), r.goToLogin && (T = r.goToLogin), r.refreshToken && (n = r.refreshToken), r.refreshAuth && (I = r.refreshAuth), r.loginApi && (i = r.loginApi), r.logoutApi && (a = r.logoutApi), r.getUserInfoApi && (E = r.getUserInfoApi), r.refreshTokenApi && (F = r.refreshTokenApi);
74
74
  },
75
75
  // 已注册返回 undefined 是合法业务态不 throw
76
76
  // v3 终锁 Δ8b:零参 facade(BR-1 ③ 终裁——core 对 UserInfo 不透明 + 拦截器无 info 源)
77
77
  getToken() {
78
- if (!o) throw new Error(_("getToken"));
78
+ if (!o) throw new Error(A("getToken"));
79
79
  return o();
80
80
  },
81
81
  goToLogin() {
82
- if (!n) throw new Error(_("goToLogin"));
83
- n();
82
+ if (!T) throw new Error(A("goToLogin"));
83
+ T();
84
84
  },
85
85
  // 异步对:未注册才返回 rejected Promise(既有降级语义保留)。
86
86
  refreshToken() {
87
- return T ? T().then(() => {
88
- }) : Promise.reject(new Error(_("refreshToken")));
87
+ return n ? n().then(() => {
88
+ }) : Promise.reject(new Error(A("refreshToken")));
89
89
  },
90
90
  refreshAuth() {
91
91
  return I ? I().then(() => {
92
- }) : Promise.reject(new Error(_("refreshAuth")));
92
+ }) : Promise.reject(new Error(A("refreshAuth")));
93
93
  },
94
94
  getStorage() {
95
95
  return O;
@@ -199,20 +199,20 @@ function x(e) {
199
199
  */
200
200
  APP_THEME_CONFIG: t.roTheme,
201
201
  /** 主题模块(架构反转:风格切换真相源在 bridge;插件经 theme.add 注册风格) */
202
- theme: A.theme,
202
+ theme: _.theme,
203
203
  /** 当前风格名(响应式只读真相源) */
204
- themeStyle: A.themeStyle,
204
+ themeStyle: _.themeStyle,
205
205
  /** 明暗模式三态真相源(亮/暗/跟随系统) */
206
- themeMode: A.themeMode,
206
+ themeMode: _.themeMode,
207
207
  /** 是否暗色(响应式只读派生;appStore / 挂值 composable 读此) */
208
- themeIsDark: A.themeIsDark,
208
+ themeIsDark: _.themeIsDark,
209
209
  /** 当前 preset 的 layout 运行时维度(AppLayout 直读 shell + 分流意图) */
210
- themeLayout: A.themeLayout,
211
- /** 当前密度档 / 动效档(节奏真相源;useThemeApply 消费,明暗无关) */
212
- themeDensity: A.themeDensity,
213
- themeMotion: A.themeMotion,
210
+ themeLayout: _.themeLayout,
211
+ /** 当前密度档 / 动效档(节奏真相源;useCoreThemeApply 消费,明暗无关) */
212
+ themeDensity: _.themeDensity,
213
+ themeMotion: _.themeMotion,
214
214
  /** 当前生效 JS 主题色(输出 B;MenuTree/布局直读、appStore.theme 转发) */
215
- themeColors: c,
215
+ themeColors: R,
216
216
  /** 是否显示内置风格切换下拉(AppTheme ElSelect);init 静态值,缺省 true(亮暗恒显) */
217
217
  showThemeStyleSwitcher: e.showThemeStyleSwitcher ?? !0,
218
218
  /** 布局折叠模块(折叠真相源在 bridge;appStore 转发,AppSidebar / AppAside 驱动) */
@@ -223,7 +223,7 @@ function x(e) {
223
223
  // install 箭头函数闭包引用 bridgeInstance([MUST NOT] 用 this——strict
224
224
  // noImplicitThis);provide 整 bridge 自身;零单例([MUST NOT] globalThis/模块级缓存)。
225
225
  update: t.update,
226
- use: (r, s) => R.use({
226
+ use: (r, s) => c.use({
227
227
  bridge: g,
228
228
  update: t.update,
229
229
  plugin: r,
@@ -232,16 +232,16 @@ function x(e) {
232
232
  install: (r) => (r.provide(w, g), r),
233
233
  // 异步对:未注册返回 rejected 原生 Error(#4a-2 per-method 降级)
234
234
  loginApi(r) {
235
- return i ? i(r) : Promise.reject(new Error(_("loginApi")));
235
+ return i ? i(r) : Promise.reject(new Error(A("loginApi")));
236
236
  },
237
237
  logoutApi() {
238
- return a ? a() : Promise.reject(new Error(_("logoutApi")));
238
+ return a ? a() : Promise.reject(new Error(A("logoutApi")));
239
239
  },
240
240
  getUserInfoApi() {
241
- return E ? E() : Promise.reject(new Error(_("getUserInfoApi")));
241
+ return E ? E() : Promise.reject(new Error(A("getUserInfoApi")));
242
242
  },
243
243
  refreshTokenApi(r) {
244
- return F ? F(r) : Promise.reject(new Error(_("refreshTokenApi")));
244
+ return F ? F(r) : Promise.reject(new Error(A("refreshTokenApi")));
245
245
  }
246
246
  };
247
247
  return g;
@@ -1,13 +1,13 @@
1
- import f from "lodash/omit";
1
+ import a from "lodash/omit";
2
2
  function d() {
3
3
  const i = /* @__PURE__ */ new WeakSet(), o = /* @__PURE__ */ new Set();
4
4
  return { use: (u) => {
5
5
  const { bridge: t, update: l, plugin: n, options: g } = u, s = n, r = typeof n == "function" ? n : n.install, e = typeof n == "function" ? void 0 : n.name;
6
6
  if (typeof r != "function")
7
- throw new Error("admin bridge plugin: install must be a function");
7
+ throw new Error("bridge plugin: install must be a function");
8
8
  if (i.has(s) || e && o.has(e))
9
9
  return t;
10
- const a = f(t, [
10
+ const f = a(t, [
11
11
  "init",
12
12
  "register",
13
13
  "getToken",
@@ -21,7 +21,7 @@ function d() {
21
21
  "use",
22
22
  "install"
23
23
  ]);
24
- return r({ bridge: a, update: l }, g), i.add(s), e && o.add(e), t;
24
+ return r({ bridge: f, update: l }, g), i.add(s), e && o.add(e), t;
25
25
  } };
26
26
  }
27
27
  export {
@@ -1,7 +1,7 @@
1
1
  import o from "./AppBody.vue2.mjs";
2
2
  /* empty css */
3
3
  import p from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ p(o, [["__scopeId", "data-v-ae442089"]]);
4
+ const d = /* @__PURE__ */ p(o, [["__scopeId", "data-v-5ad153de"]]);
5
5
  export {
6
- m as default
6
+ d as default
7
7
  };
@@ -1,42 +1,35 @@
1
- import { defineComponent as T, useCssVars as V, inject as _, ref as h, computed as t, provide as L, watch as F, resolveComponent as H, openBlock as n, createElementBlock as N, normalizeStyle as A, createElementVNode as I, createBlock as r, unref as E, withCtx as b, createVNode as w, createCommentVNode as a, KeepAlive as k, resolveDynamicComponent as S, renderSlot as U } from "vue";
1
+ import { defineComponent as T, useCssVars as V, inject as _, ref as h, computed as t, provide as L, watch as F, resolveComponent as H, openBlock as i, createElementBlock as N, normalizeStyle as A, createElementVNode as I, createBlock as r, unref as w, withCtx as b, createVNode as E, createCommentVNode as s, KeepAlive as k, resolveDynamicComponent as S, renderSlot as U } from "vue";
2
2
  import { ElAffix as Y } from "element-plus";
3
3
  import G from "./AppBreadcrumb.vue.mjs";
4
4
  import $ from "lodash/debounce";
5
5
  import { APP_LAYOUT_APP_STORE_KEY as D, APP_LAYOUT_BRIDGE_KEY as z, BODY_CONTENT_VIEWPORT_HEIGHT as K } from "../../inject/key.mjs";
6
- import { useActivatedExec as M, useActivatedEvent as j } from "../../hooks/activated.mjs";
7
- const te = /* @__PURE__ */ T({
6
+ import { useActivated as M } from "../../hooks/activated.mjs";
7
+ const ee = /* @__PURE__ */ T({
8
8
  __name: "AppBody",
9
9
  props: {
10
10
  menuFlatList: { default: () => [] }
11
11
  },
12
12
  setup(P) {
13
13
  V((e) => ({
14
- ae6fc168: s.value
14
+ v553c4217: l.value
15
15
  }));
16
- const o = _(D), l = _(z), g = l.APP_ROUTER_CONFIG, c = h(!1), u = t(() => l.APP_LAYOUT_BREADCRUMB_CONFIG.height), d = h(0);
17
- L(K, d);
18
- const x = t(() => o.bodyShimPadding), m = t(() => o.bodyShimStyle), C = t(() => o.bodyStyle), p = t(() => o.showBreadcrumb), O = t(() => parseFloat(`${o.bodyStyle.paddingTop ?? 0}`) || 0), s = t(
19
- () => `calc(${m.value.minHeight} - ${p.value && c.value ? u.value : 0}px - ${x.value * 2}px)`
16
+ const o = _(D), a = _(z), g = a.APP_ROUTER_CONFIG, c = h(!1), d = t(() => a.APP_LAYOUT_BREADCRUMB_CONFIG.height), u = h(0);
17
+ L(K, u);
18
+ const x = t(() => o.bodyShimPadding), m = t(() => o.bodyShimStyle), C = t(() => o.bodyStyle), p = t(() => o.showBreadcrumb), O = t(() => parseFloat(`${o.bodyStyle.paddingTop ?? 0}`) || 0), l = t(
19
+ () => `calc(${m.value.minHeight} - ${p.value && c.value ? d.value : 0}px - ${x.value * 2}px)`
20
20
  ), B = (e) => {
21
21
  c.value = e;
22
- }, i = $(() => {
22
+ }, n = $(() => {
23
23
  const e = document.createElement("div");
24
- e.style.height = s.value, e.style.position = "fixed", e.style.left = "100%", e.style.top = "100%", e.style.opacity = "0", e.style.pointerEvents = "none", document.body.appendChild(e), d.value = e.clientHeight, e.remove();
24
+ e.style.height = l.value, e.style.position = "fixed", e.style.left = "100%", e.style.top = "100%", e.style.opacity = "0", e.style.pointerEvents = "none", document.body.appendChild(e), u.value = e.clientHeight, e.remove();
25
25
  }, 16);
26
- return M(() => {
27
- i();
28
- }), j(
29
- () => {
30
- window.addEventListener("resize", i);
31
- },
32
- () => {
33
- window.removeEventListener("resize", i);
34
- }
35
- ), F(s, () => {
36
- i();
37
- }), (e, W) => {
26
+ return F(l, () => {
27
+ n();
28
+ }), M((e) => {
29
+ typeof window > "u" || (e.isActivated ? (n(), window.addEventListener("resize", n)) : (window.removeEventListener("resize", n), n.cancel()));
30
+ }), (e, j) => {
38
31
  const R = H("RouterView");
39
- return n(), N("div", {
32
+ return i(), N("div", {
40
33
  class: "app-body",
41
34
  style: A(C.value)
42
35
  }, [
@@ -44,20 +37,20 @@ const te = /* @__PURE__ */ T({
44
37
  class: "app-body-shim",
45
38
  style: A(m.value)
46
39
  }, [
47
- p.value ? (n(), r(E(Y), {
40
+ p.value ? (i(), r(w(Y), {
48
41
  key: 0,
49
42
  offset: O.value
50
43
  }, {
51
44
  default: b(() => [
52
- w(G, {
53
- height: u.value,
45
+ E(G, {
46
+ height: d.value,
54
47
  menuFlatList: P.menuFlatList,
55
48
  onShow: B
56
49
  }, null, 8, ["height", "menuFlatList"])
57
50
  ]),
58
51
  _: 1
59
- }, 8, ["offset"])) : a("", !0),
60
- w(R, null, {
52
+ }, 8, ["offset"])) : s("", !0),
53
+ E(R, null, {
61
54
  default: b(({
62
55
  Component: f,
63
56
  route: {
@@ -65,12 +58,12 @@ const te = /* @__PURE__ */ T({
65
58
  meta: { keepAlive: y }
66
59
  }
67
60
  }) => [
68
- (n(), r(k, {
69
- max: E(g).keepAliveMaxCount
61
+ (i(), r(k, {
62
+ max: w(g).keepAliveMaxCount
70
63
  }, [
71
- y ? (n(), r(S(f), { key: v })) : a("", !0)
64
+ y ? (i(), r(S(f), { key: v })) : s("", !0)
72
65
  ], 1032, ["max"])),
73
- y ? a("", !0) : (n(), r(S(f), { key: v }))
66
+ y ? s("", !0) : (i(), r(S(f), { key: v }))
74
67
  ]),
75
68
  _: 1
76
69
  })
@@ -81,5 +74,5 @@ const te = /* @__PURE__ */ T({
81
74
  }
82
75
  });
83
76
  export {
84
- te as default
77
+ ee as default
85
78
  };
@@ -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 c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-718c207c"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f6f87b30"]]);
5
5
  export {
6
- c as default
6
+ a as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as F, computed as o, provide as m, markRaw as H, watch as v, openBlock as s, createElementBlock as g, normalizeClass as O, createVNode as p, unref as a, withCtx as n, createBlock as f, resolveDynamicComponent as S, createSlots as I, normalizeStyle as D, createCommentVNode as Y, renderList as x, renderSlot as G } from "vue";
1
+ import { defineComponent as H, computed as o, provide as m, markRaw as O, watch as v, openBlock as i, createElementBlock as g, normalizeClass as I, createVNode as p, unref as a, withCtx as n, createBlock as f, resolveDynamicComponent as S, createSlots as D, normalizeStyle as Y, createCommentVNode as x, renderList as B, renderSlot as G } from "vue";
2
2
  import { ElWatermark as $ } from "element-plus";
3
3
  import { useRoute as N, useRouter as U } from "vue-router";
4
4
  import z from "./AppBody.vue.mjs";
@@ -6,72 +6,69 @@ import K from "./AppShell.vue.mjs";
6
6
  import V from "../modal/ModalShelf.vue.mjs";
7
7
  import { themeScaleToRgba as W } from "../../utils/theme-scale.mjs";
8
8
  import { APP_LAYOUT_BRIDGE_KEY as j, APP_LAYOUT_APP_STORE_KEY as q, APP_LAYOUT_USER_STORE_KEY as J } from "../../inject/key.mjs";
9
- import { useThemeApply as Q } from "../../hooks/use-theme-apply.mjs";
10
- import { useViewportApply as X } from "../../hooks/use-viewport-apply.mjs";
9
+ import { useCoreThemeApply as Q } from "../../hooks/use-theme-apply.mjs";
10
+ import { useCoreViewportApply as X } from "../../hooks/use-viewport-apply.mjs";
11
11
  import { flatRouteMetaResolveRaw as Z } from "../../utils/router.mjs";
12
12
  import { useMenusDataDispatch as ee } from "../../hooks/menus-dispatch.mjs";
13
- const ce = /* @__PURE__ */ F({
13
+ const ce = /* @__PURE__ */ H({
14
14
  __name: "AppLayout",
15
15
  props: {
16
- adminBridge: {},
16
+ bridge: {},
17
17
  appStore: {},
18
18
  userStore: {},
19
19
  watermarkContent: {},
20
20
  sidebarAboveHeader: { type: Boolean, default: !1 }
21
21
  },
22
22
  setup(u) {
23
- const e = u, _ = o(() => ({
24
- color: W(e.adminBridge.themeColors.value.baseColor, 0.12),
23
+ const e = u, b = o(() => ({
24
+ color: W(e.bridge.themeColors.value.baseColor, 0.12),
25
25
  fontSize: 12
26
26
  }));
27
- m(j, e.adminBridge), m(q, e.appStore), m(J, e.userStore), Q({
28
- getThemeConfig: () => e.adminBridge.APP_THEME_CONFIG,
29
- getThemeIsDark: () => e.adminBridge.themeIsDark.value,
27
+ m(j, e.bridge), m(q, e.appStore), m(J, e.userStore), Q({
28
+ getThemeConfig: () => e.bridge.APP_THEME_CONFIG,
29
+ getThemeIsDark: () => e.bridge.themeIsDark.value,
30
30
  // 节奏挂值(density/motion):喂新响应式源给同一挂值钩子,注入独立 dc-core-rhythm <style>
31
- getThemeDensity: () => e.adminBridge.themeDensity.value,
32
- getThemeMotion: () => e.adminBridge.themeMotion.value
31
+ getThemeDensity: () => e.bridge.themeDensity.value,
32
+ getThemeMotion: () => e.bridge.themeMotion.value
33
33
  }), X({
34
- getViewportConfig: () => e.adminBridge.APP_LAYOUT_VIEWPORT_CONFIG,
35
- getGapConfig: () => e.adminBridge.APP_LAYOUT_GAP_CONFIG
34
+ getViewportConfig: () => e.bridge.APP_LAYOUT_VIEWPORT_CONFIG,
35
+ getGapConfig: () => e.bridge.APP_LAYOUT_GAP_CONFIG
36
36
  });
37
- const d = o(() => e.adminBridge.generateRouteMetaRawTree(
38
- e.adminBridge.getRoutes(),
39
- {
40
- parentPath: "",
41
- filterFn: (t, i, r) => t.checkPermission ? t.menuShow && e.userStore.havePermissionByKey(t.permissionKey) : t.menuShow && (!r || i),
42
- sortFn: (t, i) => t.menuSort - i.menuSort
43
- }
44
- )), l = o(() => Z(d.value)), {
37
+ const l = o(() => e.bridge.generateRouteMetaRawTree(e.bridge.getRoutes(), {
38
+ parentPath: "",
39
+ filterFn: (t, s, r) => t.checkPermission ? t.menuShow && e.userStore.havePermissionByKey(t.permissionKey) : t.menuShow && (!r || s),
40
+ sortFn: (t, s) => t.menuSort - s.menuSort
41
+ })), d = o(() => Z(l.value)), {
45
42
  sidebarMenus: c,
46
- headerMenus: A,
47
- activeMenu: M,
48
- activeModuleMenu: y,
49
- needRedirectToFirstChildMenu: w
43
+ headerMenus: _,
44
+ activeMenu: A,
45
+ activeModuleMenu: M,
46
+ needRedirectToFirstChildMenu: y
50
47
  } = ee({
51
- getMenus: () => d.value,
52
- getMenuFlatList: () => l.value,
48
+ getMenus: () => l.value,
49
+ getMenuFlatList: () => d.value,
53
50
  // 分流意图**纯归布局**(preset.layout.extractLevel1ToHeader,经 themeLayout 暴露):
54
51
  // true 时 1 级路由模块提取到 header(headerMenus 才有内容)、sidebar 显模块下子菜单;
55
52
  // 缺省 false → 经典布局(全菜单在 sidebar、headerMenus 空)。appStore 不再持此意图。
56
- getExtractLevel1ToHeader: () => e.adminBridge.themeLayout.value.extractLevel1ToHeader
57
- }), b = H(K), B = o(
58
- () => e.adminBridge.themeLayout.value.shell ?? b
53
+ getExtractLevel1ToHeader: () => e.bridge.themeLayout.value.extractLevel1ToHeader
54
+ }), w = O(K), C = o(
55
+ () => e.bridge.themeLayout.value.shell ?? w
59
56
  ), L = [
60
57
  "brand",
61
58
  "userEntry",
62
59
  "settings",
63
60
  "themeSwitcher",
64
61
  "aside"
65
- ], C = o(() => e.userStore.isLogin), h = o(() => e.appStore.showHeader), P = o(() => e.appStore.showSidebar), T = o(() => ({
62
+ ], P = o(() => e.userStore.isLogin), h = o(() => e.appStore.showHeader), T = o(() => e.appStore.showSidebar), R = o(() => ({
66
63
  position: "fixed",
67
64
  top: "0",
68
65
  left: "0",
69
66
  right: "0",
70
67
  height: `calc(${e.appStore.headerStyle.top} + ${e.appStore.headerStyle.height})`,
71
- background: e.adminBridge.themeColors.value.bodyColor,
68
+ background: e.bridge.themeColors.value.bodyColor,
72
69
  zIndex: 1,
73
70
  pointerEvents: "none"
74
- })), R = o(() => e.appStore.showAside);
71
+ })), E = o(() => e.appStore.showAside);
75
72
  v(
76
73
  () => c.value.length,
77
74
  (t) => {
@@ -81,56 +78,56 @@ const ce = /* @__PURE__ */ F({
81
78
  immediate: !0
82
79
  }
83
80
  );
84
- const E = N(), k = U();
81
+ const k = N(), F = U();
85
82
  return v(
86
- w,
83
+ y,
87
84
  (t) => {
88
- t && (console.log(`${E.path}需要重定向到${t.path}`), k.replace(t.path));
85
+ t && (console.log(`${k.path}需要重定向到${t.path}`), F.replace(t.path));
89
86
  },
90
87
  {
91
88
  immediate: !0
92
89
  }
93
- ), (t, i) => (s(), g("div", {
94
- class: O(["app-layout", {
95
- "app-layout_noLogin": !C.value
90
+ ), (t, s) => (i(), g("div", {
91
+ class: I(["app-layout", {
92
+ "app-layout_noLogin": !P.value
96
93
  }])
97
94
  }, [
98
95
  p(a($), {
99
96
  content: u.watermarkContent,
100
- font: _.value,
97
+ font: b.value,
101
98
  zIndex: 1e4
102
99
  }, {
103
100
  default: n(() => [
104
101
  p(a(V), { level: "app" }, {
105
102
  default: n(() => [
106
- (s(), f(S(B.value), {
107
- menus: d.value,
108
- menuFlatList: l.value,
103
+ (i(), f(S(C.value), {
104
+ menus: l.value,
105
+ menuFlatList: d.value,
109
106
  sidebarMenus: a(c),
110
- headerMenus: a(A),
111
- activeMenu: a(M),
112
- activeModuleMenu: a(y),
107
+ headerMenus: a(_),
108
+ activeMenu: a(A),
109
+ activeModuleMenu: a(M),
113
110
  showHeader: h.value,
114
- showSidebar: P.value,
115
- showAside: R.value,
111
+ showSidebar: T.value,
112
+ showAside: E.value,
116
113
  sidebarAboveHeader: u.sidebarAboveHeader
117
- }, I({
114
+ }, D({
118
115
  default: n(({ Footer: r }) => [
119
- p(z, { menuFlatList: l.value }, {
116
+ p(z, { menuFlatList: d.value }, {
120
117
  footer: n(() => [
121
- (s(), f(S(r)))
118
+ (i(), f(S(r)))
122
119
  ]),
123
120
  _: 2
124
121
  }, 1032, ["menuFlatList"]),
125
- h.value ? (s(), g("div", {
122
+ h.value ? (i(), g("div", {
126
123
  key: 0,
127
124
  class: "app-header-gap-cover",
128
- style: D(T.value)
129
- }, null, 4)) : Y("", !0)
125
+ style: Y(R.value)
126
+ }, null, 4)) : x("", !0)
130
127
  ]),
131
128
  _: 2
132
129
  }, [
133
- x(L, (r) => ({
130
+ B(L, (r) => ({
134
131
  name: r,
135
132
  fn: n(() => [
136
133
  G(t.$slots, r, {}, void 0, !0)
@@ -1,7 +1,7 @@
1
1
  import o from "./AppSidebar.vue2.mjs";
2
2
  /* empty css */
3
- import p from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const d = /* @__PURE__ */ p(o, [["__scopeId", "data-v-7dc1d7e7"]]);
3
+ import a from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const f = /* @__PURE__ */ a(o, [["__scopeId", "data-v-8aa015fb"]]);
5
5
  export {
6
- d as default
6
+ f as default
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as P, useCssVars as A, inject as m, computed as e, ref as v, openBlock as B, createElementBlock as E, normalizeStyle as H, createVNode as l, unref as p, withCtx as b, renderSlot as g, createElementVNode as L } from "vue";
2
2
  import $ from "../menu/MenuTree.vue.mjs";
3
- import f from "../display/WatchSize.vue.mjs";
3
+ import h from "../display/WatchSize.vue.mjs";
4
4
  import w from "./AppCollapseToggle.vue.mjs";
5
5
  import { APP_LAYOUT_APP_STORE_KEY as F, APP_LAYOUT_BRIDGE_KEY as k } from "../../inject/key.mjs";
6
6
  const Y = { class: "app-sidebar-shim" }, N = /* @__PURE__ */ P({
@@ -13,13 +13,13 @@ const Y = { class: "app-sidebar-shim" }, N = /* @__PURE__ */ P({
13
13
  },
14
14
  setup(t) {
15
15
  A((o) => ({
16
- v769c523e: _.value,
17
- v2fe699b4: x.value,
18
- v819fea8c: S.value
16
+ v3ceb1df4: _.value,
17
+ v2c8b87ee: x.value,
18
+ baa8be1c: S.value
19
19
  }));
20
- const h = t, s = m(F), u = e(() => s.sidebarStyle), c = v(0), d = v(0), C = e(() => parseFloat(String(u.value.paddingTop ?? "")) || 0), x = e(
20
+ const f = t, s = m(F), u = e(() => s.sidebarStyle), c = v(0), d = v(0), C = e(() => parseFloat(String(u.value.paddingTop ?? "")) || 0), x = e(
21
21
  () => `${Math.max(C.value, c.value)}px`
22
- ), S = e(() => `${d.value}px`), _ = e(() => h.aboveHeader ? 2 : 0), r = e(() => s.sidebarIsCollapse), y = () => {
22
+ ), S = e(() => `${d.value}px`), _ = e(() => f.aboveHeader ? 2 : 0), r = e(() => s.sidebarIsCollapse), y = () => {
23
23
  const o = !r.value;
24
24
  s.changeSidebarCollapseStatus(o);
25
25
  }, T = m(k), n = e(() => T.themeColors.value);
@@ -27,7 +27,7 @@ const Y = { class: "app-sidebar-shim" }, N = /* @__PURE__ */ P({
27
27
  class: "app-sidebar",
28
28
  style: H(u.value)
29
29
  }, [
30
- l(p(f), {
30
+ l(p(h), {
31
31
  class: "app-sidebar-top",
32
32
  onHeightChange: a[0] || (a[0] = (i) => c.value = i)
33
33
  }, {
@@ -48,7 +48,7 @@ const Y = { class: "app-sidebar-shim" }, N = /* @__PURE__ */ P({
48
48
  routerMode: ""
49
49
  }, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
50
50
  ]),
51
- l(p(f), {
51
+ l(p(h), {
52
52
  class: "app-sidebar-bottom",
53
53
  onHeightChange: a[1] || (a[1] = (i) => d.value = i)
54
54
  }, {