@done-coding/admin-core 0.12.1 → 0.12.2-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/README.md +1 -48
- package/es/bridge/index.mjs +75 -72
- package/es/bridge/layout.mjs +51 -0
- package/es/bridge/theme/index.mjs +1 -1
- package/es/bridge/theme/persist.mjs +1 -1
- package/es/components/app-layout/AppAside.vue.mjs +2 -2
- package/es/components/app-layout/AppAside.vue2.mjs +27 -10
- package/es/components/app-layout/AppCollapseToggle.vue.mjs +7 -0
- package/es/components/app-layout/AppCollapseToggle.vue2.mjs +54 -0
- package/es/components/app-layout/AppFooter.vue.mjs +1 -1
- package/es/components/app-layout/AppHeader.vue.mjs +3 -3
- package/es/components/app-layout/AppHeader.vue2.mjs +1 -1
- package/es/components/app-layout/AppLayout.vue.mjs +2 -2
- package/es/components/app-layout/AppLayout.vue2.mjs +3 -3
- package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
- package/es/components/app-layout/AppSidebar.vue2.mjs +41 -61
- package/es/components/app-layout/AppTheme.vue.mjs +3 -3
- package/es/components/app-layout/viewport.mjs +3 -3
- package/es/components/display/TabsHeader.vue.mjs +4 -4
- package/es/components/form/FormItemNestForm.vue.mjs +2 -2
- package/es/components/form/FormItemNestFormList.vue.mjs +2 -2
- package/es/components/form/FormSubmitPanel.vue.mjs +1 -1
- package/es/components/form/FormVerifyImage.vue.mjs +1 -1
- package/es/components/table/TableToolbar.vue.mjs +3 -3
- package/es/hooks/{use-admin-theme-apply.mjs → use-theme-apply.mjs} +62 -62
- package/es/hooks/use-viewport-apply.mjs +39 -0
- package/es/index.mjs +88 -88
- package/es/inject/key.mjs +13 -13
- package/es/store/app.mjs +69 -62
- package/es/style.css +1 -1
- package/package.json +6 -8
- package/types/bridge/config-hook.d.ts +0 -68
- package/types/bridge/index.d.ts +18 -417
- package/types/bridge/layout.d.ts +25 -0
- package/types/bridge/plugin.d.ts +12 -30
- package/types/bridge/route.d.ts +1 -20
- package/types/bridge/state.d.ts +0 -14
- package/types/bridge/storage.d.ts +0 -9
- package/types/bridge/theme/index.d.ts +1 -8
- package/types/bridge/theme/persist.d.ts +3 -15
- package/types/bridge/theme/system-dark.d.ts +0 -12
- package/types/bridge/theme/types.d.ts +27 -265
- package/types/components/app-layout/AppAside.vue.d.ts +0 -1
- package/types/components/app-layout/AppCollapseToggle.vue.d.ts +11 -0
- package/types/components/app-layout/AppHeader.vue.d.ts +0 -3
- package/types/components/app-layout/AppLayout.vue.d.ts +0 -12
- package/types/components/app-layout/AppPage.vue.d.ts +0 -2
- package/types/components/app-layout/AppSidebar.vue.d.ts +0 -2
- package/types/components/app-layout/types.d.ts +2 -127
- package/types/components/app-layout/viewport.d.ts +2 -30
- package/types/components/data-view/DataListViewItem.vue.d.ts +0 -8
- package/types/components/data-view/index.d.ts +0 -4
- package/types/components/data-view/types.d.ts +0 -41
- package/types/components/data-view/utils.d.ts +0 -3
- package/types/components/display/TabsHeader.vue.d.ts +0 -2
- package/types/components/display/TabsMain.vue.d.ts +0 -2
- package/types/components/display/TabsRefineFlow.vue.d.ts +0 -1
- package/types/components/display/index.d.ts +1 -37
- package/types/components/display/types.d.ts +0 -131
- package/types/components/form/FormItemNestForm.vue.d.ts +0 -5
- package/types/components/form/FormItemNestFormList.vue.d.ts +0 -17
- package/types/components/form/FormVerifyCode.vue.d.ts +0 -9
- package/types/components/form/FormVerifyImage.vue.d.ts +0 -1
- package/types/components/form/form-search-utils.d.ts +0 -14
- package/types/components/form/nest-form-item-list.d.ts +0 -28
- package/types/components/form/nest-form-item.d.ts +0 -21
- package/types/components/form/nest-registry.d.ts +0 -14
- package/types/components/form/types.d.ts +8 -185
- package/types/components/form/use-form-submit.d.ts +0 -12
- package/types/components/form/use-nest-form-list.d.ts +0 -13
- package/types/components/form/use-nest-form.d.ts +0 -15
- package/types/components/form/use-nest-layout-scale.d.ts +0 -12
- package/types/components/form/utils.d.ts +1 -56
- package/types/components/list-page/ListPage.vue.d.ts +0 -6
- package/types/components/list-page/types.d.ts +2 -19
- package/types/components/misc/index.d.ts +1 -6
- package/types/components/misc/types.d.ts +0 -6
- package/types/components/modal/ConfirmModal.vue.d.ts +0 -10
- package/types/components/modal/modal-shelf-core.d.ts +0 -3
- package/types/components/modal/modal-shelf-hierarchy.d.ts +0 -4
- package/types/components/modal/modal-shelf-types.d.ts +0 -34
- package/types/components/modal/types.d.ts +1 -20
- package/types/components/panel/PanelItemNestForm.vue.d.ts +0 -6
- package/types/components/panel/PanelItemNestPanel.vue.d.ts +0 -5
- package/types/components/panel/nest-panel-form.d.ts +0 -21
- package/types/components/panel/nest-panel-item.d.ts +0 -14
- package/types/components/panel/types.d.ts +1 -49
- package/types/components/table/types.d.ts +9 -124
- package/types/config/list-model.d.ts +0 -29
- package/types/config/route.d.ts +0 -2
- package/types/helpers/form.d.ts +0 -5
- package/types/helpers/list-helper.d.ts +0 -26
- package/types/helpers/types.d.ts +0 -11
- package/types/hooks/activated.d.ts +0 -10
- package/types/hooks/feel-size.d.ts +0 -2
- package/types/hooks/index.d.ts +2 -2
- package/types/hooks/menus-dispatch.d.ts +0 -4
- package/types/hooks/timeout.d.ts +0 -4
- package/types/hooks/use-channel-viewport-height.d.ts +0 -14
- package/types/hooks/use-theme-apply.d.ts +11 -0
- package/types/hooks/use-viewport-apply.d.ts +8 -0
- package/types/inject/key.d.ts +2 -87
- package/types/router/guard/index.d.ts +0 -13
- package/types/router/guard/login.d.ts +0 -1
- package/types/router/guard/permission.d.ts +0 -1
- package/types/router/guard/types.d.ts +2 -5
- package/types/store/app.d.ts +10 -31
- package/types/store/router-permission.d.ts +2 -55
- package/types/store/user.d.ts +2 -26
- package/types/types/dot-path.d.ts +0 -8
- package/types/types/route.d.ts +0 -45
- package/types/types/utility-types.d.ts +0 -7
- package/types/utils/export.d.ts +1 -16
- package/types/utils/id.d.ts +0 -1
- package/types/utils/router.d.ts +0 -2
- package/types/utils/theme-scale.d.ts +0 -31
- package/types/utils/time.d.ts +0 -1
- package/docs/TECH_SNAPSHOT.md +0 -146
- package/docs/nested-config-paradigm.md +0 -80
- package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/RETROSPECTIVE.md +0 -63
- package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/design.md +0 -575
- package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/landing-authorizations/2026-05-09-080900-/346/234/2371-/345/205/245/345/256/236/346/226/275/346/216/210/346/235/203.md +0 -107
- package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/project-orchestration.md +0 -58
- package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/requirements.md +0 -238
- package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/tasks.md +0 -290
- package/es/hooks/use-admin-viewport-apply.mjs +0 -39
- package/types/hooks/use-admin-theme-apply.d.ts +0 -34
- package/types/hooks/use-admin-viewport-apply.d.ts +0 -20
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const O = { class: "app-sidebar-shim" }, D = /* @__PURE__ */ k({
|
|
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
|
+
import $ from "../menu/MenuTree.vue.mjs";
|
|
3
|
+
import f from "../display/WatchSize.vue.mjs";
|
|
4
|
+
import w from "./AppCollapseToggle.vue.mjs";
|
|
5
|
+
import { APP_LAYOUT_APP_STORE_KEY as F, APP_LAYOUT_BRIDGE_KEY as k } from "../../inject/key.mjs";
|
|
6
|
+
const Y = { class: "app-sidebar-shim" }, N = /* @__PURE__ */ P({
|
|
8
7
|
__name: "AppSidebar",
|
|
9
8
|
props: {
|
|
10
9
|
show: { type: Boolean },
|
|
@@ -12,80 +11,61 @@ const O = { class: "app-sidebar-shim" }, D = /* @__PURE__ */ k({
|
|
|
12
11
|
menus: {},
|
|
13
12
|
menuFlatList: {}
|
|
14
13
|
},
|
|
15
|
-
setup(
|
|
16
|
-
A((
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
cc02eed6: l.value.bodyColor,
|
|
21
|
-
v56d0884d: l.value.primaryColor
|
|
14
|
+
setup(t) {
|
|
15
|
+
A((o) => ({
|
|
16
|
+
v769c523e: _.value,
|
|
17
|
+
v2fe699b4: x.value,
|
|
18
|
+
v819fea8c: S.value
|
|
22
19
|
}));
|
|
23
|
-
const
|
|
24
|
-
() => `${Math.max(
|
|
25
|
-
),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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(
|
|
21
|
+
() => `${Math.max(C.value, c.value)}px`
|
|
22
|
+
), S = e(() => `${d.value}px`), _ = e(() => h.aboveHeader ? 2 : 0), r = e(() => s.sidebarIsCollapse), y = () => {
|
|
23
|
+
const o = !r.value;
|
|
24
|
+
s.changeSidebarCollapseStatus(o);
|
|
25
|
+
}, T = m(k), n = e(() => T.themeColors.value);
|
|
26
|
+
return (o, a) => (B(), E("div", {
|
|
29
27
|
class: "app-sidebar",
|
|
30
|
-
style:
|
|
28
|
+
style: H(u.value)
|
|
31
29
|
}, [
|
|
32
|
-
|
|
30
|
+
l(p(f), {
|
|
33
31
|
class: "app-sidebar-top",
|
|
34
|
-
onHeightChange:
|
|
32
|
+
onHeightChange: a[0] || (a[0] = (i) => c.value = i)
|
|
35
33
|
}, {
|
|
36
|
-
default:
|
|
37
|
-
|
|
34
|
+
default: b(() => [
|
|
35
|
+
g(o.$slots, "top", {}, void 0, !0)
|
|
38
36
|
]),
|
|
39
37
|
_: 3
|
|
40
38
|
}),
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
L("div", Y, [
|
|
40
|
+
l(p($), {
|
|
43
41
|
collapse: r.value,
|
|
44
|
-
menus:
|
|
42
|
+
menus: t.menus,
|
|
45
43
|
style: { height: "100%" },
|
|
46
|
-
"background-color":
|
|
47
|
-
"text-color":
|
|
48
|
-
"active-text-color":
|
|
49
|
-
menuFlatList:
|
|
44
|
+
"background-color": n.value.bodyColor,
|
|
45
|
+
"text-color": n.value.baseColor,
|
|
46
|
+
"active-text-color": n.value.primaryColor,
|
|
47
|
+
menuFlatList: t.menuFlatList,
|
|
50
48
|
routerMode: ""
|
|
51
49
|
}, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
|
|
52
50
|
]),
|
|
53
|
-
|
|
51
|
+
l(p(f), {
|
|
54
52
|
class: "app-sidebar-bottom",
|
|
55
|
-
onHeightChange:
|
|
53
|
+
onHeightChange: a[1] || (a[1] = (i) => d.value = i)
|
|
56
54
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
|
|
55
|
+
default: b(() => [
|
|
56
|
+
g(o.$slots, "bottom", {}, void 0, !0)
|
|
59
57
|
]),
|
|
60
58
|
_: 3
|
|
61
59
|
}),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
default: i(() => [
|
|
69
|
-
C("div", {
|
|
70
|
-
class: "app-sidebar-toggle",
|
|
71
|
-
onClick: t[2] || (t[2] = (n) => o(u).changeSidebarCollapseStatus(!r.value))
|
|
72
|
-
}, [
|
|
73
|
-
a(o(I), null, {
|
|
74
|
-
default: i(() => [
|
|
75
|
-
a(o(V), {
|
|
76
|
-
class: "app-sidebar-toggle-icon",
|
|
77
|
-
style: g(P.value)
|
|
78
|
-
}, null, 8, ["style"])
|
|
79
|
-
]),
|
|
80
|
-
_: 1
|
|
81
|
-
})
|
|
82
|
-
])
|
|
83
|
-
]),
|
|
84
|
-
_: 1
|
|
85
|
-
}, 8, ["content"])) : L("", !0)
|
|
60
|
+
l(w, {
|
|
61
|
+
side: "sidebar",
|
|
62
|
+
show: t.show,
|
|
63
|
+
collapse: r.value,
|
|
64
|
+
onToggle: y
|
|
65
|
+
}, null, 8, ["show", "collapse"])
|
|
86
66
|
], 4));
|
|
87
67
|
}
|
|
88
68
|
});
|
|
89
69
|
export {
|
|
90
|
-
|
|
70
|
+
N as default
|
|
91
71
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AppTheme.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import p from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const a = /* @__PURE__ */ p(o, [["__scopeId", "data-v-06ca4822"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./TabsHeader.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-6b4fc73b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormItemNestForm.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-a413a382"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormItemNestFormList.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-68118cbf"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormSubmitPanel.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1505775a"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormVerifyImage.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7a70397e"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableToolbar.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-0175f1a9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { watch as s } from "vue";
|
|
2
2
|
import { themeScaleDerive as C, themeScaleParseHex as S, themeScaleMix as $, themeScaleToRgba as _ } from "../utils/theme-scale.mjs";
|
|
3
|
-
const
|
|
3
|
+
const m = "dc-core-theme", y = [
|
|
4
4
|
["primaryColor", { scale: !0, el: "--el-color-primary" }],
|
|
5
5
|
["successColor", { scale: !0, el: "--el-color-success" }],
|
|
6
6
|
["warningColor", { scale: !0, el: "--el-color-warning" }],
|
|
@@ -27,23 +27,23 @@ const u = "admin-core-theme", y = [
|
|
|
27
27
|
"dark-2"
|
|
28
28
|
], L = (r) => r.replace(/([A-Z])/g, "-$1").toLowerCase(), g = (r, t) => {
|
|
29
29
|
const e = [];
|
|
30
|
-
for (const [
|
|
31
|
-
const o = r[
|
|
30
|
+
for (const [c, n] of y) {
|
|
31
|
+
const o = r[c];
|
|
32
32
|
if (o === void 0 || o === "") continue;
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
33
|
+
const l = `--dc-core-${L(c)}`, a = n.el === void 0 ? [] : Array.isArray(n.el) ? n.el : [n.el];
|
|
34
|
+
if (n.scale) {
|
|
35
35
|
const d = C(o, t);
|
|
36
|
-
e.push(`${
|
|
37
|
-
for (const
|
|
38
|
-
e.push(`${
|
|
39
|
-
for (const
|
|
40
|
-
e.push(`${
|
|
41
|
-
for (const
|
|
42
|
-
e.push(`${
|
|
36
|
+
e.push(`${l}: ${o};`);
|
|
37
|
+
for (const i of p)
|
|
38
|
+
e.push(`${l}-${i}: ${d[i]};`);
|
|
39
|
+
for (const i of a) {
|
|
40
|
+
e.push(`${i}: ${o};`);
|
|
41
|
+
for (const u of p)
|
|
42
|
+
e.push(`${i}-${u}: ${d[u]};`);
|
|
43
43
|
}
|
|
44
44
|
} else {
|
|
45
|
-
e.push(`${
|
|
46
|
-
for (const d of
|
|
45
|
+
e.push(`${l}: ${o};`);
|
|
46
|
+
for (const d of a) e.push(`${d}: ${o};`);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return e.join(`
|
|
@@ -55,7 +55,7 @@ const u = "admin-core-theme", y = [
|
|
|
55
55
|
if (!r) return "";
|
|
56
56
|
const e = S(r);
|
|
57
57
|
if (!e) return "";
|
|
58
|
-
const
|
|
58
|
+
const c = Math.max(...e), n = c === 0 ? 0 : Math.min(A, T / c), o = $(r, "#000000", n);
|
|
59
59
|
return `--el-overlay-color-lighter: ${_(
|
|
60
60
|
o,
|
|
61
61
|
v[t]
|
|
@@ -64,51 +64,51 @@ const u = "admin-core-theme", y = [
|
|
|
64
64
|
if (!r) return "";
|
|
65
65
|
const e = _(r, I[t]);
|
|
66
66
|
return e === r ? "" : `--el-mask-color: ${e};`;
|
|
67
|
-
}, P = 0.88, k = (r, t) => !r || !S(r) ? "" : `--
|
|
68
|
-
const t = r.light, e = r.dark,
|
|
69
|
-
|
|
70
|
-
"color: var(--
|
|
67
|
+
}, P = 0.88, k = (r, t) => !r || !S(r) ? "" : `--dc-core-dialog-surface: ${$(r, "#ffffff", P)};`, D = (r) => {
|
|
68
|
+
const t = r.light, e = r.dark, c = g(t, "light"), n = g(e, "dark"), l = [
|
|
69
|
+
c,
|
|
70
|
+
"color: var(--dc-core-base-color);",
|
|
71
71
|
f(t.bodyColor, "light"),
|
|
72
72
|
h(t.bodyColor, "light")
|
|
73
|
-
].filter(Boolean),
|
|
74
|
-
|
|
73
|
+
].filter(Boolean), a = [
|
|
74
|
+
n,
|
|
75
75
|
f(e.bodyColor, "dark"),
|
|
76
76
|
h(e.bodyColor, "dark"),
|
|
77
77
|
k(e.bodyColor)
|
|
78
78
|
].filter(Boolean);
|
|
79
79
|
return `:root {
|
|
80
|
-
${
|
|
80
|
+
${l.join(
|
|
81
81
|
`
|
|
82
82
|
`
|
|
83
83
|
)}
|
|
84
84
|
}
|
|
85
85
|
:root.dark {
|
|
86
|
-
${
|
|
86
|
+
${a.join(`
|
|
87
87
|
`)}
|
|
88
88
|
}
|
|
89
89
|
`;
|
|
90
|
-
}, E = "
|
|
90
|
+
}, E = "dc-core-rhythm", b = "dc-core-ep-bridge", x = "dc-core-ep-structural", B = [
|
|
91
91
|
".el-dialog,",
|
|
92
92
|
".el-message-box {",
|
|
93
|
-
// elevation:暗色下用提亮过的面板底(--
|
|
93
|
+
// elevation:暗色下用提亮过的面板底(--dc-core-dialog-surface,仅 :root.dark 派生),
|
|
94
94
|
// 让整块面板亮于页面底而浮起;缺省(亮色 / 非 hex)退 --el-bg-color,亮色零改动。
|
|
95
|
-
" background-color: var(--
|
|
96
|
-
" border: 1px solid var(--
|
|
95
|
+
" background-color: var(--dc-core-dialog-surface, var(--el-bg-color));",
|
|
96
|
+
" border: 1px solid var(--dc-core-border-color, var(--el-border-color));",
|
|
97
97
|
"}"
|
|
98
98
|
].join(`
|
|
99
99
|
`), R = [
|
|
100
100
|
// T1 必纳:表格行密度(垂直经 td padding,水平经 .cell padding)
|
|
101
101
|
".el-table .el-table__cell {",
|
|
102
|
-
" padding-top: var(--
|
|
103
|
-
" padding-bottom: var(--
|
|
102
|
+
" padding-top: var(--dc-core-cell-padding-y, 8px);",
|
|
103
|
+
" padding-bottom: var(--dc-core-cell-padding-y, 8px);",
|
|
104
104
|
"}",
|
|
105
105
|
".el-table .cell {",
|
|
106
|
-
" padding-left: var(--
|
|
107
|
-
" padding-right: var(--
|
|
106
|
+
" padding-left: var(--dc-core-cell-padding-x, 12px);",
|
|
107
|
+
" padding-right: var(--dc-core-cell-padding-x, 12px);",
|
|
108
108
|
"}",
|
|
109
109
|
// T1 必纳:表单项间距
|
|
110
110
|
".el-form-item {",
|
|
111
|
-
" margin-bottom: var(--
|
|
111
|
+
" margin-bottom: var(--dc-core-form-item-gap, 18px);",
|
|
112
112
|
"}"
|
|
113
113
|
// 注:dialog/card 内距撤到期二——其 EP 原生值(dialog 16 / card 20)与单一
|
|
114
114
|
// content-gap 无法同时对齐,本期纳入会破"默认档零漂移";期二用专属 var 补。
|
|
@@ -166,32 +166,32 @@ const u = "admin-core-theme", y = [
|
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
function Y(r, t) {
|
|
169
|
-
const e = w[r],
|
|
170
|
-
`--
|
|
171
|
-
`--
|
|
172
|
-
`--
|
|
169
|
+
const e = w[r], c = H[t], n = [
|
|
170
|
+
`--dc-core-space-unit: ${e.spaceUnit};`,
|
|
171
|
+
`--dc-core-content-gap: ${e.gap};`,
|
|
172
|
+
`--dc-core-control-height: ${e.controlHeight};`,
|
|
173
173
|
`--el-component-size: ${e.controlHeight};`,
|
|
174
|
-
`--
|
|
175
|
-
`--
|
|
176
|
-
`--
|
|
177
|
-
`--
|
|
174
|
+
`--dc-core-cell-padding-y: ${e.cellPaddingY};`,
|
|
175
|
+
`--dc-core-cell-padding-x: ${e.cellPaddingX};`,
|
|
176
|
+
`--dc-core-form-item-gap: ${e.formItemGap};`,
|
|
177
|
+
`--dc-core-font-size-base: ${e.fontSizeBase};`,
|
|
178
178
|
`--el-font-size-base: ${e.fontSizeBase};`,
|
|
179
|
-
`--
|
|
180
|
-
`--
|
|
181
|
-
`--el-transition-duration-fast: ${
|
|
182
|
-
`--
|
|
183
|
-
`--el-transition-duration: ${
|
|
184
|
-
// easing 仅挂
|
|
179
|
+
`--dc-core-font-scale: ${e.fontScale};`,
|
|
180
|
+
`--dc-core-motion-duration: ${c.duration};`,
|
|
181
|
+
`--el-transition-duration-fast: ${c.duration};`,
|
|
182
|
+
`--dc-core-motion-duration-slow: ${c.durationSlow};`,
|
|
183
|
+
`--el-transition-duration: ${c.durationSlow};`,
|
|
184
|
+
// easing 仅挂 dc-core,[MUST NOT] dual-write 覆盖 EP 两条 bezier——
|
|
185
185
|
// EP ease-in-out / fast 曲线各异,覆盖会让默认档动画曲线漂移;motion 档对 EP 只经 duration 生效。
|
|
186
|
-
`--
|
|
186
|
+
`--dc-core-motion-easing: ${c.easing};`
|
|
187
187
|
], o = [
|
|
188
|
-
"--
|
|
189
|
-
"--
|
|
188
|
+
"--dc-core-motion-duration: 0.01ms;",
|
|
189
|
+
"--dc-core-motion-duration-slow: 0.01ms;",
|
|
190
190
|
"--el-transition-duration: 0.01ms;",
|
|
191
191
|
"--el-transition-duration-fast: 0.01ms;"
|
|
192
192
|
];
|
|
193
193
|
return `:root {
|
|
194
|
-
${
|
|
194
|
+
${n.join(`
|
|
195
195
|
`)}
|
|
196
196
|
}
|
|
197
197
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -208,8 +208,8 @@ function U(r) {
|
|
|
208
208
|
const t = r.document ?? (typeof document < "u" ? document : void 0);
|
|
209
209
|
if (!t) return;
|
|
210
210
|
const e = () => {
|
|
211
|
-
let o = t.getElementById(
|
|
212
|
-
return o || (o = t.createElement("style"), o.id =
|
|
211
|
+
let o = t.getElementById(m);
|
|
212
|
+
return o || (o = t.createElement("style"), o.id = m, t.head.appendChild(o)), o;
|
|
213
213
|
};
|
|
214
214
|
if (!t.getElementById(x)) {
|
|
215
215
|
const o = t.createElement("style");
|
|
@@ -228,22 +228,22 @@ function U(r) {
|
|
|
228
228
|
},
|
|
229
229
|
{ immediate: !0 }
|
|
230
230
|
);
|
|
231
|
-
const { getThemeDensity:
|
|
232
|
-
if (
|
|
231
|
+
const { getThemeDensity: c, getThemeMotion: n } = r;
|
|
232
|
+
if (c && n) {
|
|
233
233
|
if (!t.getElementById(b)) {
|
|
234
|
-
const
|
|
235
|
-
|
|
234
|
+
const l = t.createElement("style");
|
|
235
|
+
l.id = b, l.textContent = R, t.head.appendChild(l);
|
|
236
236
|
}
|
|
237
237
|
const o = () => {
|
|
238
|
-
let
|
|
238
|
+
let l = t.getElementById(
|
|
239
239
|
E
|
|
240
240
|
);
|
|
241
|
-
return
|
|
241
|
+
return l || (l = t.createElement("style"), l.id = E, t.head.appendChild(l)), l;
|
|
242
242
|
};
|
|
243
243
|
s(
|
|
244
|
-
() => [
|
|
245
|
-
([
|
|
246
|
-
o().textContent = Y(
|
|
244
|
+
() => [c(), n()],
|
|
245
|
+
([l, a]) => {
|
|
246
|
+
o().textContent = Y(l, a);
|
|
247
247
|
},
|
|
248
248
|
{ immediate: !0 }
|
|
249
249
|
);
|
|
@@ -251,5 +251,5 @@ function U(r) {
|
|
|
251
251
|
}
|
|
252
252
|
export {
|
|
253
253
|
Y as buildRhythmCss,
|
|
254
|
-
U as
|
|
254
|
+
U as useThemeApply
|
|
255
255
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { watch as i } from "vue";
|
|
2
|
+
const r = "dc-core-viewport", c = (e, d) => {
|
|
3
|
+
const p = e.paddingLeft + e.paddingRight, t = e.paddingTop + e.paddingBottom;
|
|
4
|
+
return `:root {
|
|
5
|
+
--dc-core-viewport-width: calc(100vw - ${p}px);
|
|
6
|
+
--dc-core-viewport-height: calc(100vh - ${t}px);
|
|
7
|
+
--dc-core-viewport-padding-top: ${e.paddingTop}px;
|
|
8
|
+
--dc-core-viewport-padding-right: ${e.paddingRight}px;
|
|
9
|
+
--dc-core-viewport-padding-bottom: ${e.paddingBottom}px;
|
|
10
|
+
--dc-core-viewport-padding-left: ${e.paddingLeft}px;
|
|
11
|
+
` + // gap 内缝 var:仅当提供 getGapConfig 时注入(纯对外暴露,core 不读)。
|
|
12
|
+
(d ? ` --dc-core-gap: ${d.size}px;
|
|
13
|
+
` : "") + `}
|
|
14
|
+
`;
|
|
15
|
+
};
|
|
16
|
+
function a(e) {
|
|
17
|
+
const d = e.document ?? (typeof document < "u" ? document : void 0);
|
|
18
|
+
if (!d) return;
|
|
19
|
+
const p = () => {
|
|
20
|
+
let t = d.getElementById(r);
|
|
21
|
+
return t || (t = d.createElement("style"), t.id = r, d.head.appendChild(t)), t;
|
|
22
|
+
};
|
|
23
|
+
i(
|
|
24
|
+
() => {
|
|
25
|
+
var t;
|
|
26
|
+
return {
|
|
27
|
+
viewport: e.getViewportConfig(),
|
|
28
|
+
gap: (t = e.getGapConfig) == null ? void 0 : t.call(e)
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
({ viewport: t, gap: o }) => {
|
|
32
|
+
p().textContent = c(t, o);
|
|
33
|
+
},
|
|
34
|
+
{ deep: !0, immediate: !0 }
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
a as useViewportApply
|
|
39
|
+
};
|