@done-coding/admin-core 0.8.3-alpha.0 → 0.9.1-alpha.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.
- package/docs/nested-config-paradigm.md +80 -0
- package/es/bridge/config-hook.mjs +37 -0
- package/es/bridge/index.mjs +157 -62
- package/es/bridge/plugin.mjs +29 -0
- package/es/bridge/theme.mjs +65 -0
- package/es/components/app-layout/AppBody.vue.mjs +1 -1
- package/es/components/app-layout/AppBody.vue2.mjs +47 -49
- package/es/components/app-layout/AppBreadcrumb.vue.mjs +1 -1
- package/es/components/app-layout/AppBreadcrumb.vue2.mjs +35 -41
- package/es/components/app-layout/AppFooter.vue.mjs +2 -2
- package/es/components/app-layout/AppFooter.vue2.mjs +8 -8
- package/es/components/app-layout/AppHeader.vue.mjs +1 -1
- package/es/components/app-layout/AppHeader.vue2.mjs +60 -69
- package/es/components/app-layout/AppLayout.vue.mjs +2 -2
- package/es/components/app-layout/AppLayout.vue2.mjs +95 -93
- package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
- package/es/components/app-layout/AppSidebar.vue2.mjs +79 -82
- package/es/components/app-layout/AppTheme.vue.mjs +7 -0
- package/es/components/app-layout/AppTheme.vue2.mjs +38 -0
- package/es/components/data-view/DataListView.vue.mjs +2 -2
- package/es/components/data-view/DataListView.vue2.mjs +36 -36
- package/es/components/display/ActionConfirm.vue2.mjs +16 -16
- package/es/components/display/HeightProvider.vue.mjs +10 -10
- package/es/components/display/TabsHeader.vue.mjs +4 -4
- package/es/components/display/TabsHeader.vue2.mjs +34 -34
- package/es/components/display/TabsMain.vue.mjs +40 -39
- package/es/components/display/TabsRefineFlow.vue.mjs +30 -28
- package/es/components/form/FormItem.vue.mjs +1 -1
- package/es/components/form/FormItem.vue2.mjs +75 -81
- package/es/components/form/FormItemNestForm.vue.mjs +7 -0
- package/es/components/form/FormItemNestForm.vue2.mjs +49 -0
- package/es/components/form/FormItemNestFormList.vue.mjs +7 -0
- package/es/components/form/FormItemNestFormList.vue2.mjs +137 -0
- package/es/components/form/FormMain.vue.mjs +5 -147
- package/es/components/form/FormMain.vue2.mjs +160 -2
- package/es/components/form/FormRadioGroup.vue.mjs +42 -49
- package/es/components/form/FormSearch.vue.mjs +2 -2
- package/es/components/form/FormSearch.vue2.mjs +122 -128
- package/es/components/form/FormSelect.vue.mjs +34 -40
- package/es/components/form/FormSubmitBtn.vue.mjs +23 -28
- package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
- package/es/components/form/FormSubmitPanel.vue2.mjs +29 -28
- package/es/components/form/FormTree.vue.mjs +16 -21
- package/es/components/form/FormVerifyCode.vue.mjs +37 -43
- package/es/components/form/FormVerifyImage.vue.mjs +2 -2
- package/es/components/form/FormVerifyImage.vue2.mjs +36 -41
- package/es/components/form/nest-form-item-list.mjs +71 -0
- package/es/components/form/nest-form-item.mjs +42 -0
- package/es/components/form/nest-registry.mjs +7 -0
- package/es/components/form/use-nest-form-list.mjs +22 -0
- package/es/components/form/use-nest-form.mjs +34 -0
- package/es/components/form/use-nest-layout-scale.mjs +14 -0
- package/es/components/form/utils.mjs +77 -61
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +134 -139
- package/es/components/menu/MenuItemSub.vue.mjs +41 -48
- package/es/components/menu/MenuTree.vue.mjs +58 -65
- package/es/components/misc/AutoRefresh.vue.mjs +2 -2
- package/es/components/misc/AutoRefresh.vue2.mjs +44 -51
- package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
- package/es/components/misc/AutoRefreshGroup.vue2.mjs +37 -43
- package/es/components/modal/ConfirmModal.vue.mjs +3 -4
- package/es/components/modal/ConfirmModal.vue2.mjs +83 -111
- package/es/components/modal/DetailModal.vue.mjs +38 -41
- package/es/components/panel/PanelEditSwitch.vue.mjs +1 -1
- package/es/components/panel/PanelEditSwitch.vue2.mjs +50 -55
- package/es/components/panel/PanelItemNestForm.vue.mjs +7 -0
- package/es/components/panel/PanelItemNestForm.vue2.mjs +69 -0
- package/es/components/panel/PanelItemNestPanel.vue.mjs +34 -0
- package/es/components/panel/PanelItemNestPanel.vue2.mjs +4 -0
- package/es/components/panel/PanelMain.vue.mjs +1 -1
- package/es/components/panel/PanelMain.vue2.mjs +72 -72
- package/es/components/panel/nest-panel-form.mjs +53 -0
- package/es/components/panel/nest-panel-item.mjs +25 -0
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +221 -229
- package/es/components/table/TableToolbar.vue.mjs +2 -2
- package/es/components/table/TableToolbar.vue2.mjs +115 -126
- package/es/hooks/use-admin-theme-apply.mjs +84 -0
- package/es/hooks/use-admin-viewport-apply.mjs +27 -0
- package/es/index.mjs +190 -153
- package/es/inject/key.mjs +15 -6
- package/es/store/app.mjs +75 -84
- package/es/style.css +1 -1
- package/es/utils/theme-scale.mjs +37 -0
- package/package.json +2 -4
- package/types/bridge/config-hook.d.ts +91 -0
- package/types/bridge/index.d.ts +108 -8
- package/types/bridge/plugin.d.ts +39 -0
- package/types/bridge/theme.d.ts +85 -0
- package/types/components/app-layout/AppTheme.vue.d.ts +2 -0
- package/types/components/app-layout/types.d.ts +1 -1
- package/types/components/form/FormItem.vue.d.ts +12 -12
- package/types/components/form/FormItemNestForm.vue.d.ts +36 -0
- package/types/components/form/FormItemNestFormList.vue.d.ts +63 -0
- package/types/components/form/FormMain.vue.d.ts +2 -2
- package/types/components/form/FormSearch.vue.d.ts +2 -2
- package/types/components/form/FormTree.vue.d.ts +50 -50
- package/types/components/form/index.d.ts +9 -1
- package/types/components/form/nest-form-item-list.d.ts +63 -0
- package/types/components/form/nest-form-item.d.ts +36 -0
- package/types/components/form/nest-registry.d.ts +22 -0
- package/types/components/form/types.d.ts +2 -0
- package/types/components/form/use-nest-form-list.d.ts +20 -0
- package/types/components/form/use-nest-form.d.ts +26 -0
- package/types/components/form/use-nest-layout-scale.d.ts +17 -0
- package/types/components/form/utils.d.ts +26 -1
- package/types/components/menu/MenuTree.vue.d.ts +10 -10
- package/types/components/modal/ModalShelf.vue.d.ts +1 -1
- package/types/components/panel/PanelItemNestForm.vue.d.ts +35 -0
- package/types/components/panel/PanelItemNestPanel.vue.d.ts +22 -0
- package/types/components/panel/index.d.ts +5 -1
- package/types/components/panel/nest-panel-form.d.ts +38 -0
- package/types/components/panel/nest-panel-item.d.ts +28 -0
- package/types/components/panel/types.d.ts +2 -0
- package/types/components/table/TableMain.vue.d.ts +3 -3
- package/types/hooks/activated.d.ts +2 -2
- package/types/hooks/feel-size.d.ts +1 -1
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/menus-dispatch.d.ts +5 -5
- package/types/hooks/use-admin-theme-apply.d.ts +17 -0
- package/types/hooks/use-admin-viewport-apply.d.ts +15 -0
- package/types/hooks/use-breakpoint.d.ts +1 -1
- package/types/inject/key.d.ts +46 -1
- package/types/store/app.d.ts +138 -59
- package/types/utils/index.d.ts +1 -0
- package/types/utils/theme-scale.d.ts +35 -0
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "element-plus
|
|
4
|
-
|
|
5
|
-
import { defineComponent as g, computed as o, watch as x, withDirectives as y, openBlock as n, createElementBlock as p, normalizeStyle as E, unref as m, createVNode as k, withCtx as u, Fragment as v, renderList as I, createBlock as F, createTextVNode as L, toDisplayString as S, vShow as A } from "vue";
|
|
6
|
-
import { useRoute as C } from "vue-router";
|
|
7
|
-
const $ = /* @__PURE__ */ g({
|
|
1
|
+
import { defineComponent as _, computed as r, watch as v, withDirectives as w, openBlock as a, createElementBlock as m, normalizeStyle as B, createVNode as b, unref as s, withCtx as c, Fragment as g, renderList as x, createBlock as y, createTextVNode as k, toDisplayString as E, vShow as F } from "vue";
|
|
2
|
+
import { useRoute as I } from "vue-router";
|
|
3
|
+
import { ElBreadcrumb as L, ElBreadcrumbItem as S } from "element-plus";
|
|
4
|
+
const N = /* @__PURE__ */ _({
|
|
8
5
|
name: "AppBreadcrumb",
|
|
9
6
|
__name: "AppBreadcrumb",
|
|
10
7
|
props: {
|
|
@@ -12,46 +9,43 @@ const $ = /* @__PURE__ */ g({
|
|
|
12
9
|
menuFlatList: {}
|
|
13
10
|
},
|
|
14
11
|
emits: ["show"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
(
|
|
18
|
-
)).filter((
|
|
19
|
-
height: `${
|
|
12
|
+
setup(l, { emit: i }) {
|
|
13
|
+
const o = l, p = i, h = I(), n = r(() => h.matched.map((e) => o.menuFlatList.find(
|
|
14
|
+
(t) => t.path === e.path
|
|
15
|
+
)).filter((e) => e)), u = r(() => !!n.value.length), d = r(() => ({
|
|
16
|
+
height: `${o.height}px`
|
|
20
17
|
}));
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
(
|
|
24
|
-
|
|
18
|
+
return v(
|
|
19
|
+
u,
|
|
20
|
+
(e) => {
|
|
21
|
+
p("show", e);
|
|
25
22
|
},
|
|
26
23
|
{
|
|
27
24
|
immediate: !0
|
|
28
25
|
}
|
|
29
|
-
), (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
[A, m(s)]
|
|
51
|
-
]);
|
|
52
|
-
};
|
|
26
|
+
), (e, f) => w((a(), m("div", {
|
|
27
|
+
class: "app-breadcrumb",
|
|
28
|
+
style: B(d.value)
|
|
29
|
+
}, [
|
|
30
|
+
b(s(L), { separator: "/" }, {
|
|
31
|
+
default: c(() => [
|
|
32
|
+
(a(!0), m(g, null, x(n.value, (t) => (a(), y(s(S), {
|
|
33
|
+
key: t.path,
|
|
34
|
+
to: t.path
|
|
35
|
+
}, {
|
|
36
|
+
default: c(() => [
|
|
37
|
+
k(E(t.title), 1)
|
|
38
|
+
]),
|
|
39
|
+
_: 2
|
|
40
|
+
}, 1032, ["to"]))), 128))
|
|
41
|
+
]),
|
|
42
|
+
_: 1
|
|
43
|
+
})
|
|
44
|
+
], 4)), [
|
|
45
|
+
[F, u.value]
|
|
46
|
+
]);
|
|
53
47
|
}
|
|
54
48
|
});
|
|
55
49
|
export {
|
|
56
|
-
|
|
50
|
+
N as default
|
|
57
51
|
};
|
|
@@ -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
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bba5d0e4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as r, inject as
|
|
2
|
-
import { APP_LAYOUT_APP_STORE_KEY as
|
|
3
|
-
const
|
|
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 =
|
|
7
|
-
return (
|
|
6
|
+
const o = p(c), t = n(() => o.footerStyle);
|
|
7
|
+
return (f, e) => (l(), s("div", {
|
|
8
8
|
class: "app-footer",
|
|
9
|
-
style:
|
|
9
|
+
style: a(t.value)
|
|
10
10
|
}, [...e[0] || (e[0] = [
|
|
11
|
-
|
|
11
|
+
m("div", { class: "app-footer-shim" }, null, -1)
|
|
12
12
|
])], 4));
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
export {
|
|
16
|
-
|
|
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-
|
|
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 {
|
|
2
|
-
import "
|
|
3
|
-
import "element-plus
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
|
|
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(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
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
|
|
26
|
-
return (
|
|
25
|
+
var t;
|
|
26
|
+
return (t = s.activeModuleMenu) == null ? void 0 : t.path;
|
|
27
27
|
},
|
|
28
|
-
set(
|
|
29
|
-
var
|
|
30
|
-
((
|
|
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
|
|
34
|
-
|
|
35
|
-
(
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
(
|
|
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
|
-
), (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
59
|
-
key:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
]
|
|
91
|
-
|
|
81
|
+
])
|
|
82
|
+
], 4));
|
|
92
83
|
}
|
|
93
84
|
});
|
|
94
85
|
export {
|
|
95
|
-
|
|
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
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7aeee1b9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "element-plus
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
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
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
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,
|
|
24
|
+
const t = m, f = {
|
|
25
25
|
color: "rgba(0,0,0,0.08)",
|
|
26
26
|
fontSize: 12
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
|
|
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,
|
|
34
|
-
sortFn: (e,
|
|
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
|
-
)),
|
|
37
|
-
sidebarMenus:
|
|
38
|
-
headerMenus:
|
|
39
|
-
activeMenu:
|
|
40
|
-
activeModuleMenu:
|
|
41
|
-
needRedirectToFirstChildMenu:
|
|
42
|
-
} =
|
|
43
|
-
getMenus: () =>
|
|
44
|
-
getMenuFlatList: () =>
|
|
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
|
-
}),
|
|
47
|
-
|
|
48
|
-
() =>
|
|
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
|
|
57
|
-
return
|
|
58
|
-
|
|
61
|
+
const L = E(), b = H();
|
|
62
|
+
return c(
|
|
63
|
+
S,
|
|
59
64
|
(e) => {
|
|
60
|
-
e && (console.log(`${
|
|
65
|
+
e && (console.log(`${L.path}需要重定向到${e.path}`), b.replace(e.path));
|
|
61
66
|
},
|
|
62
67
|
{
|
|
63
68
|
immediate: !0
|
|
64
69
|
}
|
|
65
|
-
), (e,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
a(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
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
|
|
4
|
+
const e = /* @__PURE__ */ p(o, [["__scopeId", "data-v-2499f12e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|