@done-coding/admin-core 0.15.0 → 0.16.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 (33) hide show
  1. package/es/components/app-layout/AppBody.vue.mjs +2 -2
  2. package/es/components/app-layout/AppBody.vue2.mjs +47 -44
  3. package/es/components/app-layout/AppPage.vue.mjs +1 -1
  4. package/es/components/app-layout/AppPage.vue2.mjs +146 -90
  5. package/es/components/app-layout/app-page-geometry.mjs +42 -15
  6. package/es/components/display/TabsMain.vue.mjs +114 -59
  7. package/es/components/display/TabsTile.vue.mjs +7 -0
  8. package/es/components/display/TabsTile.vue2.mjs +182 -0
  9. package/es/components/display/use-tabs-query-sync.mjs +26 -0
  10. package/es/components/form/FormSearch.vue.mjs +2 -2
  11. package/es/components/form/FormSearch.vue2.mjs +84 -75
  12. package/es/components/form/form-search-utils.mjs +58 -29
  13. package/es/components/panel/PanelMain.vue.mjs +1 -1
  14. package/es/components/panel/PanelMain.vue2.mjs +15 -15
  15. package/es/hooks/use-channel-viewport-height.mjs +1 -4
  16. package/es/hooks/use-theme-apply.mjs +65 -54
  17. package/es/index.mjs +203 -196
  18. package/es/inject/key.mjs +19 -13
  19. package/es/store/app.mjs +77 -68
  20. package/es/style.css +1 -1
  21. package/es/utils/dom.mjs +12 -0
  22. package/package.json +2 -2
  23. package/types/components/app-layout/app-page-geometry.d.ts +15 -0
  24. package/types/components/display/TabsTile.vue.d.ts +208 -0
  25. package/types/components/display/types.d.ts +7 -0
  26. package/types/components/display/use-tabs-query-sync.d.ts +16 -0
  27. package/types/components/form/form-search-utils.d.ts +13 -6
  28. package/types/components/modal/ConfirmModal.vue.d.ts +1 -1
  29. package/types/inject/key.d.ts +13 -1
  30. package/types/injectInfo.json.d.ts +1 -1
  31. package/types/store/app.d.ts +19 -1
  32. package/types/utils/dom.d.ts +1 -0
  33. package/types/utils/index.d.ts +1 -0
@@ -1,13 +1,13 @@
1
- import { defineComponent as H, useAttrs as U, ref as S, computed as a, shallowRef as j, openBlock as v, createBlock as f, normalizeClass as q, withCtx as r, withDirectives as J, createVNode as u, mergeProps as K, unref as l, createSlots as O, normalizeProps as B, guardReactiveProps as P, createElementVNode as X, createTextVNode as g, toDisplayString as Y, createCommentVNode as Z, renderList as ee, renderSlot as te, vShow as oe } from "vue";
2
- import { stringifyFormData as ae } from "./utils.mjs";
3
- import { resolveSearchLayout as re, resolveSearchLabelPosition as le, getCurrentSpan as se, computeButtonColProps as ne, packSearchFormList as ie, computeItemsPerRow as ue } from "./form-search-utils.mjs";
4
- import { ElCol as ce, ElButton as y, ElIcon as me } from "element-plus";
1
+ import { defineComponent as T, useAttrs as U, ref as x, computed as o, shallowRef as j, openBlock as d, createBlock as v, normalizeClass as q, withCtx as r, withDirectives as J, createVNode as i, mergeProps as K, unref as l, createSlots as X, normalizeProps as B, guardReactiveProps as F, createElementVNode as Y, createTextVNode as g, toDisplayString as Z, createCommentVNode as ee, renderList as te, renderSlot as ae, vShow as oe } from "vue";
2
+ import { resolveFormLayout as L, stringifyFormData as re } from "./utils.mjs";
3
+ import { resolveSearchLayout as le, resolveSearchLabelPosition as se, resolveSearchItemOccupancy as ne, computeSearchGeometry as ie, getCurrentSpan as ue, packSearchFormList as ce } from "./form-search-utils.mjs";
4
+ import { ElCol as me, ElButton as b, ElIcon as pe } from "element-plus";
5
5
  import { ArrowDown as de, ArrowUp as ve } from "@element-plus/icons-vue";
6
6
  import fe from "./FormMain.vue.mjs";
7
- import pe from "../display/WatchSize.vue.mjs";
8
- import { useBreakpoint as he } from "../../hooks/use-breakpoint.mjs";
7
+ import he from "../display/WatchSize.vue.mjs";
8
+ import { useBreakpoint as ye } from "../../hooks/use-breakpoint.mjs";
9
9
  import { useCustomBreakpoint as we } from "../../hooks/use-custom-breakpoint.mjs";
10
- const ge = { class: "btn-box" }, Fe = /* @__PURE__ */ H({
10
+ const ge = { class: "btn-box" }, Re = /* @__PURE__ */ T({
11
11
  name: "FormSearch",
12
12
  inheritAttrs: !1,
13
13
  __name: "FormSearch",
@@ -30,45 +30,54 @@ const ge = { class: "btn-box" }, Fe = /* @__PURE__ */ H({
30
30
  layoutScale: {}
31
31
  },
32
32
  emits: ["search", "heightChange", "visibleChange"],
33
- setup(c, { expose: R, emit: F }) {
34
- const o = c, m = F, E = U(), p = S(!1), { activeBreakpoint: L } = he(), { elRef: M, activeBreakpoint: V } = we(), b = a(
35
- () => o.compact ? V.value : L.value
36
- ), s = S(!0), D = a(() => o.data), d = a(
37
- () => re(o.compact, o.layout, b.value)
38
- ), I = a(
39
- () => le(o.compact, o.labelPosition)
40
- ), h = a(() => {
41
- if (o.maxRows <= 0) return 1 / 0;
42
- const e = se(d.value, b.value), t = ue(e), i = t > 1 ? 1 : 0;
43
- return Math.max(0, o.maxRows * t - i);
44
- }), _ = a(() => o.maxRows <= 0 ? !1 : o.list.filter(
45
- (t) => t.hide !== !0
46
- ).length > h.value), A = a(() => {
47
- let e = 0;
48
- for (let t = 0; t < o.list.length; t++)
49
- o.list[t].hide !== !0 && (s.value && o.maxRows > 0 && t >= h.value || e++);
50
- return e;
51
- }), N = a(() => ne(d.value, A.value)), W = a(
52
- () => ie(o.list, {
53
- compact: o.compact,
54
- itemLayout: d.value ?? {},
55
- collapsing: s.value && o.maxRows > 0,
56
- threshold: h.value
33
+ setup(u, { expose: P, emit: R }) {
34
+ const a = u, c = R, E = U(), f = x(!1), { activeBreakpoint: M } = ye(), { elRef: V, activeBreakpoint: D } = we(), h = o(
35
+ () => a.compact ? D.value : M.value
36
+ ), s = x(!0), _ = o(() => a.data), m = o(
37
+ () => le(a.compact, a.layout, h.value)
38
+ ), A = o(
39
+ () => se(a.compact, a.labelPosition)
40
+ ), N = o(() => {
41
+ const e = L(m.value);
42
+ return a.list.filter((t) => t.hide !== !0).map(
43
+ (t) => ne(
44
+ a.compact ? e : { ...e, ...L(t.layout) },
45
+ h.value
46
+ )
47
+ );
48
+ }), y = o(
49
+ () => ie({
50
+ spans: N.value,
51
+ buttonMinSpan: ue(
52
+ m.value,
53
+ h.value
54
+ ),
55
+ maxRows: a.maxRows,
56
+ collapsed: s.value
57
+ })
58
+ ), W = o(
59
+ () => a.maxRows > 0 && y.value.needsFold
60
+ ), $ = o(() => ({ span: y.value.buttonSpan })), G = o(
61
+ () => ce(a.list, {
62
+ compact: a.compact,
63
+ itemLayout: m.value ?? {},
64
+ collapsing: s.value && a.maxRows > 0,
65
+ threshold: y.value.showCount
57
66
  })
58
67
  ), k = (e = !s.value) => {
59
68
  s.value = e;
60
- }, $ = (e) => {
61
- m("heightChange", e);
62
- }, n = j(), C = (e) => ({
63
- ...o.staticQuery || {},
64
- ...ae(e, o.list)
65
- }), x = () => {
69
+ }, I = (e) => {
70
+ c("heightChange", e);
71
+ }, n = j(), S = (e) => ({
72
+ ...a.staticQuery || {},
73
+ ...re(e, a.list)
74
+ }), C = () => {
66
75
  var e;
67
- (e = n.value) == null || e.resetFields(), m("search", C(o.data), "reset");
76
+ (e = n.value) == null || e.resetFields(), c("search", S(a.data), "reset");
68
77
  }, w = (e = "search") => {
69
78
  var t;
70
79
  (t = n.value) == null || t.validate().then(() => {
71
- m("search", C(o.data), e);
80
+ c("search", S(a.data), e);
72
81
  });
73
82
  }, Q = (e) => {
74
83
  w(e);
@@ -86,70 +95,70 @@ const ge = { class: "btn-box" }, Fe = /* @__PURE__ */ H({
86
95
  var t;
87
96
  return (t = n.value) == null ? void 0 : t.clearValidate(e);
88
97
  },
89
- triggerReset: x,
98
+ triggerReset: C,
90
99
  triggerSearch: () => w(),
91
100
  toggleCollapse: k,
92
- isCollapsed: a(() => s.value)
101
+ isCollapsed: o(() => s.value)
93
102
  };
94
- R(z);
95
- const G = (e) => {
96
- p.value = e, m("visibleChange", e);
103
+ P(z);
104
+ const H = (e) => {
105
+ f.value = e, c("visibleChange", e);
97
106
  };
98
- return (e, t) => (v(), f(pe, {
107
+ return (e, t) => (d(), v(he, {
99
108
  ref_key: "breakpointEl",
100
- ref: M,
109
+ ref: V,
101
110
  class: q(["form-search", {
102
- "form-search_show": p.value
111
+ "form-search_show": f.value
103
112
  }]),
104
- onHeightChange: $
113
+ onHeightChange: I
105
114
  }, {
106
115
  default: r(() => [
107
- J(u(fe, K({
116
+ J(i(fe, K({
108
117
  ref_key: "formMain",
109
118
  ref: n,
110
- list: W.value,
111
- data: D.value,
112
- "row-gutter": c.rowGutter
119
+ list: G.value,
120
+ data: _.value,
121
+ "row-gutter": u.rowGutter
113
122
  }, l(E), {
114
- layout: d.value,
115
- labelPosition: I.value,
116
- labelWidth: c.labelWidth,
123
+ layout: m.value,
124
+ labelPosition: A.value,
125
+ labelWidth: u.labelWidth,
117
126
  onSubmit: Q,
118
- onVisibleChange: G
119
- }), O({
127
+ onVisibleChange: H
128
+ }), X({
120
129
  default: r(() => [
121
- u(l(ce), B(P(N.value)), {
130
+ i(l(me), B(F($.value)), {
122
131
  default: r(() => [
123
- X("div", ge, [
124
- _.value ? (v(), f(l(y), {
132
+ Y("div", ge, [
133
+ W.value ? (d(), v(l(b), {
125
134
  key: 0,
126
135
  type: "primary",
127
136
  link: "",
128
- onMousedown: t[0] || (t[0] = (i) => k())
137
+ onMousedown: t[0] || (t[0] = (p) => k())
129
138
  }, {
130
139
  default: r(() => [
131
- u(l(me), { class: "btn-box-expand-icon" }, {
140
+ i(l(pe), { class: "btn-box-expand-icon" }, {
132
141
  default: r(() => [
133
- s.value ? (v(), f(l(de), { key: 0 })) : (v(), f(l(ve), { key: 1 }))
142
+ s.value ? (d(), v(l(de), { key: 0 })) : (d(), v(l(ve), { key: 1 }))
134
143
  ]),
135
144
  _: 1
136
145
  }),
137
- g(" " + Y(s.value ? "展开更多" : "收起更多"), 1)
146
+ g(" " + Z(s.value ? "展开更多" : "收起更多"), 1)
138
147
  ]),
139
148
  _: 1
140
- })) : Z("", !0),
141
- u(l(y), {
149
+ })) : ee("", !0),
150
+ i(l(b), {
142
151
  type: "warning",
143
- onMousedown: x
152
+ onMousedown: C
144
153
  }, {
145
154
  default: r(() => [...t[2] || (t[2] = [
146
155
  g("重置", -1)
147
156
  ])]),
148
157
  _: 1
149
158
  }),
150
- u(l(y), {
159
+ i(l(b), {
151
160
  type: "primary",
152
- onMousedown: t[1] || (t[1] = (i) => w())
161
+ onMousedown: t[1] || (t[1] = (p) => w())
153
162
  }, {
154
163
  default: r(() => [...t[3] || (t[3] = [
155
164
  g("查询", -1)
@@ -163,14 +172,14 @@ const ge = { class: "btn-box" }, Fe = /* @__PURE__ */ H({
163
172
  ]),
164
173
  _: 2
165
174
  }, [
166
- ee(c.list, (i) => ({
167
- name: i.key,
168
- fn: r((T) => [
169
- te(e.$slots, i.key, B(P(T)), void 0, !0)
175
+ te(u.list, (p) => ({
176
+ name: p.key,
177
+ fn: r((O) => [
178
+ ae(e.$slots, p.key, B(F(O)), void 0, !0)
170
179
  ])
171
180
  }))
172
181
  ]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]), [
173
- [oe, p.value]
182
+ [oe, f.value]
174
183
  ])
175
184
  ]),
176
185
  _: 3
@@ -178,5 +187,5 @@ const ge = { class: "btn-box" }, Fe = /* @__PURE__ */ H({
178
187
  }
179
188
  });
180
189
  export {
181
- Fe as default
190
+ Re as default
182
191
  };
@@ -1,34 +1,63 @@
1
- import { resolveFormLayout as a } from "./utils.mjs";
2
- const f = ["xs", "sm", "md", "lg", "xl"], i = (o) => Math.max(1, Math.floor(24 / o)), p = (o, t) => {
3
- if (o <= 0 || t >= 24) return 0;
4
- const e = i(t), r = o % e;
5
- return r === 0 ? 24 - t : 24 - r * t - t;
6
- }, S = (o, t) => {
7
- const e = a(o), r = {};
8
- for (const n of f) {
9
- const s = e[n], u = typeof s == "number" ? s : e.span ?? 6;
10
- r[n] = {
11
- span: u,
12
- offset: p(t, u)
13
- };
1
+ import { resolveFormLayout as p } from "./utils.mjs";
2
+ const i = (t, e) => {
3
+ const n = p(t), o = n[e];
4
+ return typeof o == "number" ? o : n.span ?? 6;
5
+ }, h = (t, e) => {
6
+ if (typeof t == "number") return t;
7
+ if (t && typeof t == "object") {
8
+ const n = t;
9
+ return (n.span ?? 24) + (n.offset ?? 0);
14
10
  }
15
- return r;
16
- }, l = (o, t) => {
17
- const e = a(o), r = e[t];
18
- return typeof r == "number" ? r : e.span ?? 6;
19
- }, L = (o, t, e) => o ? { span: l(t, e) } : t, b = (o, t) => o ? "top" : t, d = (o, t) => {
20
- const { compact: e, itemLayout: r, collapsing: n, threshold: s } = t;
21
- return !e && !n ? o : o.map((u, m) => {
22
- let c = u;
23
- return e && (c = { ...c, layout: r }), n && m >= s && (c = { ...c, hide: !0 }), c;
11
+ return e;
12
+ }, m = (t, e) => {
13
+ const n = typeof t.span == "number" ? t.span : 24, o = h(
14
+ t[e],
15
+ n
16
+ );
17
+ return Math.min(24, Math.max(1, o));
18
+ }, f = (t) => {
19
+ let e = 0, n = 0;
20
+ for (const o of t)
21
+ e === 0 || n + o > 24 ? (e += 1, n = o) : n += o;
22
+ return { rows: e, lastRowUsed: n };
23
+ }, l = (t, e) => {
24
+ const { rows: n, lastRowUsed: o } = f(t), r = 24 - o;
25
+ return n > 0 && r >= e ? { totalRows: n, buttonSpan: r } : { totalRows: n + 1, buttonSpan: 24 };
26
+ }, b = ({
27
+ spans: t,
28
+ buttonMinSpan: e,
29
+ maxRows: n,
30
+ collapsed: o
31
+ }) => {
32
+ const r = Math.min(24, Math.max(1, e)), a = l(t, r);
33
+ if (n <= 0)
34
+ return {
35
+ showCount: t.length,
36
+ needsFold: !1,
37
+ buttonSpan: a.buttonSpan
38
+ };
39
+ let c = t.length, s = a;
40
+ for (; c > 0 && s.totalRows > n; )
41
+ c -= 1, s = l(t.slice(0, c), r);
42
+ return {
43
+ showCount: o ? c : t.length,
44
+ needsFold: c < t.length,
45
+ buttonSpan: o ? s.buttonSpan : a.buttonSpan
46
+ };
47
+ }, y = (t, e, n) => t ? { span: i(e, n) } : e, d = (t, e) => t ? "top" : e, w = (t, e) => {
48
+ const { compact: n, itemLayout: o, collapsing: r, threshold: a } = e;
49
+ if (!n && !r) return t;
50
+ let c = 0;
51
+ return t.map((s) => {
52
+ let u = s;
53
+ return n && (u = { ...u, layout: o }), s.hide !== !0 && (c += 1, r && c > a && (u = { ...u, hide: !0 })), u;
24
54
  });
25
55
  };
26
56
  export {
27
- S as computeButtonColProps,
28
- p as computeButtonOffset,
29
- i as computeItemsPerRow,
30
- l as getCurrentSpan,
31
- d as packSearchFormList,
32
- b as resolveSearchLabelPosition,
33
- L as resolveSearchLayout
57
+ b as computeSearchGeometry,
58
+ i as getCurrentSpan,
59
+ w as packSearchFormList,
60
+ m as resolveSearchItemOccupancy,
61
+ d as resolveSearchLabelPosition,
62
+ y as resolveSearchLayout
34
63
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./PanelMain.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0835965e"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9e060e8b"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as w, useCssVars as B, computed as o, provide as M, ref as L, watch as x, openBlock as l, createBlock as u, unref as d, withCtx as c, createElementBlock as F, Fragment as j, renderList as O, withDirectives as P, mergeProps as T, resolveDynamicComponent as U, normalizeClass as A, createVNode as D, vShow as G } from "vue";
1
+ import { defineComponent as w, useCssVars as B, computed as o, provide as L, ref as M, watch as x, openBlock as l, createBlock as u, unref as d, withCtx as c, createElementBlock as F, Fragment as j, renderList as O, withDirectives as P, mergeProps as T, resolveDynamicComponent as U, normalizeClass as A, createVNode as D, vShow as G } from "vue";
2
2
  import H from "./PanelItem.vue.mjs";
3
3
  import { ElCard as f, ElRow as N, ElCol as V } from "element-plus";
4
4
  import { NEST_LAYOUT_SCALE_KEY as W } from "../../inject/key.mjs";
@@ -12,18 +12,18 @@ const q = /* @__PURE__ */ w({
12
12
  layout: { default: () => ({ span: 24 }) },
13
13
  layoutScale: { default: 1 },
14
14
  list: {},
15
- itemCard: { type: [Boolean, Object], default: () => ({ lastMarginBottom: "8px" }) },
15
+ itemCard: { type: [Boolean, Object] },
16
16
  refreshFn: {}
17
17
  },
18
18
  emits: ["submitSuccess"],
19
19
  setup(s, { emit: y }) {
20
20
  B((a) => ({
21
- e1f69828: h.value
21
+ v6dd4af74: h.value
22
22
  }));
23
- const r = s, C = y, S = o(() => r.layoutScale ?? 1);
24
- M(W, S);
25
- const n = L({}), m = o(() => r.itemCard ? f : "span"), v = o(
26
- () => `panel-main-item-col-wrap_${m.value === f ? "card" : "span"}`
23
+ const r = s, v = y, C = o(() => r.layoutScale ?? 1);
24
+ L(W, C);
25
+ const n = M({}), m = o(() => r.itemCard ? f : "div"), S = o(
26
+ () => `panel-main-item-col-wrap_${m.value === f ? "card" : "plain"}`
27
27
  ), h = o(
28
28
  () => typeof r.itemCard == "object" && r.itemCard.lastMarginBottom ? r.itemCard.lastMarginBottom : 0
29
29
  ), k = (a) => {
@@ -43,13 +43,13 @@ const q = /* @__PURE__ */ w({
43
43
  ...p(r.layout, t),
44
44
  ...p(a, t)
45
45
  };
46
- }, g = (a, t) => {
46
+ }, E = (a, t) => {
47
47
  n.value = {}, t && (n.value[a] = t);
48
- }, E = (a) => (t) => {
48
+ }, b = (a) => (t) => {
49
49
  var e;
50
50
  return (e = r.refreshFn) == null ? void 0 : e.call(r, t, a);
51
- }, b = (a, t) => {
52
- C("submitSuccess", t, a);
51
+ }, g = (a, t) => {
52
+ v("submitSuccess", t, a);
53
53
  };
54
54
  return x(
55
55
  () => r.list,
@@ -70,16 +70,16 @@ const q = /* @__PURE__ */ w({
70
70
  }, { ref_for: !0 }, _(e.layout), { class: "panel-main-item-col" }), {
71
71
  default: c(() => [
72
72
  (l(), u(U(m.value), {
73
- class: A(v.value)
73
+ class: A(S.value)
74
74
  }, {
75
75
  default: c(() => [
76
76
  D(H, {
77
77
  data: s.data,
78
78
  config: e,
79
79
  editing: n.value[e.key] ?? !1,
80
- "refresh-fn": E(e.key),
81
- "onUpdate:editing": (i) => g(e.key, i),
82
- onSubmitSuccess: (i) => b(e.key, i)
80
+ "refresh-fn": b(e.key),
81
+ "onUpdate:editing": (i) => E(e.key, i),
82
+ onSubmitSuccess: (i) => g(e.key, i)
83
83
  }, null, 8, ["data", "config", "editing", "refresh-fn", "onUpdate:editing", "onSubmitSuccess"])
84
84
  ]),
85
85
  _: 2
@@ -1,10 +1,7 @@
1
1
  import { inject as i, computed as o, watch as v } from "vue";
2
2
  import { BODY_CONTENT_VIEWPORT_HEIGHT as p } from "../inject/key.mjs";
3
3
  const f = (e, l = {}) => {
4
- const h = l.fallback ?? 0, n = e.parentChannel ? Symbol.for(e.parentChannel) : void 0, t = n ? i(n, void 0) : void 0, r = i(
5
- p,
6
- void 0
7
- ), a = o(() => t ? t.viewportHeight.value : e.viewportHeight !== void 0 ? e.viewportHeight : r ? r.value : h), c = o(() => (t == null ? void 0 : t.level) ?? 0);
4
+ const h = l.fallback ?? 0, n = e.parentChannel ? Symbol.for(e.parentChannel) : void 0, t = n ? i(n, void 0) : void 0, r = i(p, void 0), a = o(() => t ? t.viewportHeight.value : e.viewportHeight !== void 0 ? e.viewportHeight : r ? r.value : h), c = o(() => (t == null ? void 0 : t.level) ?? 0);
8
5
  return v(
9
6
  // eslint-disable-next-line vue/no-setup-props-destructure
10
7
  () => e.parentChannel,
@@ -1,6 +1,6 @@
1
- import { watch as m, onScopeDispose as C } from "vue";
2
- import { themeScaleDerive as y, themeScaleParseHex as S, themeScaleMix as b, themeScaleToRgba as $ } from "../utils/theme-scale.mjs";
3
- const L = "dc-core-theme", A = () => Math.random().toString(36).slice(2, 9), T = [
1
+ import { watch as p, onScopeDispose as C } from "vue";
2
+ import { themeScaleDerive as y, themeScaleParseHex as E, themeScaleMix as S, themeScaleToRgba as $ } from "../utils/theme-scale.mjs";
3
+ const v = "dc-core-theme", L = () => Math.random().toString(36).slice(2, 9), A = [
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" }],
@@ -18,60 +18,60 @@ const L = "dc-core-theme", A = () => Math.random().toString(36).slice(2, 9), T =
18
18
  ["blur", {}],
19
19
  ["focusRing", {}],
20
20
  ["surface", {}]
21
- ], p = [
21
+ ], m = [
22
22
  "light-3",
23
23
  "light-5",
24
24
  "light-7",
25
25
  "light-8",
26
26
  "light-9",
27
27
  "dark-2"
28
- ], v = (o) => o.replace(/([A-Z])/g, "-$1").toLowerCase(), g = (o, t) => {
28
+ ], T = (o) => o.replace(/([A-Z])/g, "-$1").toLowerCase(), g = (o, t) => {
29
29
  const e = [];
30
- for (const [c, l] of T) {
31
- const n = o[c];
32
- if (n === void 0 || n === "") continue;
33
- const i = `--dc-core-${v(c)}`, d = l.el === void 0 ? [] : Array.isArray(l.el) ? l.el : [l.el];
34
- if (l.scale) {
35
- const s = y(n, t);
36
- e.push(`${i}: ${n};`);
37
- for (const r of p)
30
+ for (const [l, n] of A) {
31
+ const c = o[l];
32
+ if (c === void 0 || c === "") continue;
33
+ const i = `--dc-core-${T(l)}`, d = n.el === void 0 ? [] : Array.isArray(n.el) ? n.el : [n.el];
34
+ if (n.scale) {
35
+ const s = y(c, t);
36
+ e.push(`${i}: ${c};`);
37
+ for (const r of m)
38
38
  e.push(`${i}-${r}: ${s[r]};`);
39
39
  for (const r of d) {
40
- e.push(`${r}: ${n};`);
41
- for (const a of p)
40
+ e.push(`${r}: ${c};`);
41
+ for (const a of m)
42
42
  e.push(`${r}-${a}: ${s[a]};`);
43
43
  }
44
44
  } else {
45
- e.push(`${i}: ${n};`);
46
- for (const s of d) e.push(`${s}: ${n};`);
45
+ e.push(`${i}: ${c};`);
46
+ for (const s of d) e.push(`${s}: ${c};`);
47
47
  }
48
48
  }
49
49
  return e.join(`
50
50
  `);
51
- }, D = 0.4, P = 10, k = {
51
+ }, k = 0.4, D = 10, P = {
52
52
  light: 0.5,
53
53
  dark: 0.72
54
54
  }, f = (o, t) => {
55
55
  if (!o) return "";
56
- const e = S(o);
56
+ const e = E(o);
57
57
  if (!e) return "";
58
- const c = Math.max(...e), l = c === 0 ? 0 : Math.min(D, P / c), n = b(o, "#000000", l);
58
+ const l = Math.max(...e), n = l === 0 ? 0 : Math.min(k, D / l), c = S(o, "#000000", n);
59
59
  return `--el-overlay-color-lighter: ${$(
60
- n,
61
- k[t]
60
+ c,
61
+ P[t]
62
62
  )};`;
63
- }, I = { light: 0.9, dark: 0.8 }, h = (o, t) => {
63
+ }, w = { light: 0.9, dark: 0.8 }, h = (o, t) => {
64
64
  if (!o) return "";
65
- const e = $(o, I[t]);
65
+ const e = $(o, w[t]);
66
66
  return e === o ? "" : `--el-mask-color: ${e};`;
67
- }, w = 0.88, B = (o, t) => !o || !S(o) ? "" : `--dc-core-dialog-surface: ${b(o, "#ffffff", w)};`, R = (o) => {
68
- const t = o.light, e = o.dark, c = g(t, "light"), l = g(e, "dark"), i = [
69
- c,
67
+ }, I = 0.88, B = (o, t) => !o || !E(o) ? "" : `--dc-core-dialog-surface: ${S(o, "#ffffff", I)};`, R = (o) => {
68
+ const t = o.light, e = o.dark, l = g(t, "light"), n = g(e, "dark"), i = [
69
+ l,
70
70
  "color: var(--dc-core-base-color);",
71
71
  f(t.bodyColor, "light"),
72
72
  h(t.bodyColor, "light")
73
73
  ].filter(Boolean), d = [
74
- l,
74
+ n,
75
75
  f(e.bodyColor, "dark"),
76
76
  h(e.bodyColor, "dark"),
77
77
  B(e.bodyColor)
@@ -87,13 +87,24 @@ const L = "dc-core-theme", A = () => Math.random().toString(36).slice(2, 9), T =
87
87
  `)}
88
88
  }
89
89
  `;
90
- }, H = "dc-core-rhythm", E = "dc-core-ep-bridge", x = "dc-core-ep-structural", M = [
90
+ }, H = "dc-core-rhythm", x = "dc-core-ep-bridge", b = "dc-core-ep-structural", M = [
91
+ // 居中浮层(Dialog / MessageBox)+ 抽屉(Drawer,含 ConfirmModal drawer 形态 + 消费方直接
92
+ // 用的 ElDrawer):暗色下面板底 ≈ 页面底 + EP 黑投影不可见 → 边界糊。统一两手保底:
93
+ // ① elevation 提亮面(--dc-core-dialog-surface,仅暗色派生;亮色退 --el-bg-color 零改动);
94
+ // ② 1px 主题描边硬边界(--el-border-color 类明暗自换:亮色浅灰近隐形、暗色中灰清晰)——
95
+ // 融不融底都有区别度,不再仅靠提亮(抽屉与弹窗保底一致)。
91
96
  ".el-dialog,",
92
- ".el-message-box {",
93
- // elevation:暗色下用提亮过的面板底(--dc-core-dialog-surface,仅 :root.dark 派生),
94
- // 让整块面板亮于页面底而浮起;缺省(亮色 / 非 hex)退 --el-bg-color,亮色零改动。
97
+ ".el-message-box,",
98
+ ".el-drawer {",
95
99
  " background-color: var(--dc-core-dialog-surface, var(--el-bg-color));",
96
100
  " border: 1px solid var(--dc-core-border-color, var(--el-border-color));",
101
+ "}",
102
+ // 表格固定列分隔阴影:EP 原值 inset ±10px 0 10px -10px rgba(0,0,0,.15) 为黑投影,暗色近黑底
103
+ // 上不可见 → 横向滚动时固定列无边界。仅**暗色** override 为随主题的边框色(中灰、暗底可见);
104
+ // 亮色保留 EP 默认(黑投影在白底本就可见)。规则 14:优先 --dc-core-border-color、退 --el-border-color。
105
+ ":root.dark .el-table {",
106
+ " --el-table-fixed-left-column: inset 10px 0 10px -10px var(--dc-core-border-color, var(--el-border-color));",
107
+ " --el-table-fixed-right-column: inset -10px 0 10px -10px var(--dc-core-border-color, var(--el-border-color));",
97
108
  "}"
98
109
  ].join(`
99
110
  `), Y = [
@@ -166,7 +177,7 @@ const L = "dc-core-theme", A = () => Math.random().toString(36).slice(2, 9), T =
166
177
  }
167
178
  };
168
179
  function O(o, t) {
169
- const e = z[o], c = U[t], l = [
180
+ const e = z[o], l = U[t], n = [
170
181
  `--dc-core-space-unit: ${e.spaceUnit};`,
171
182
  `--dc-core-content-gap: ${e.gap};`,
172
183
  `--dc-core-control-height: ${e.controlHeight};`,
@@ -177,26 +188,26 @@ function O(o, t) {
177
188
  `--dc-core-font-size-base: ${e.fontSizeBase};`,
178
189
  `--el-font-size-base: ${e.fontSizeBase};`,
179
190
  `--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};`,
191
+ `--dc-core-motion-duration: ${l.duration};`,
192
+ `--el-transition-duration-fast: ${l.duration};`,
193
+ `--dc-core-motion-duration-slow: ${l.durationSlow};`,
194
+ `--el-transition-duration: ${l.durationSlow};`,
184
195
  // easing 仅挂 dc-core,[MUST NOT] dual-write 覆盖 EP 两条 bezier——
185
196
  // EP ease-in-out / fast 曲线各异,覆盖会让默认档动画曲线漂移;motion 档对 EP 只经 duration 生效。
186
- `--dc-core-motion-easing: ${c.easing};`
187
- ], n = [
197
+ `--dc-core-motion-easing: ${l.easing};`
198
+ ], c = [
188
199
  "--dc-core-motion-duration: 0.01ms;",
189
200
  "--dc-core-motion-duration-slow: 0.01ms;",
190
201
  "--el-transition-duration: 0.01ms;",
191
202
  "--el-transition-duration-fast: 0.01ms;"
192
203
  ];
193
204
  return `:root {
194
- ${l.join(`
205
+ ${n.join(`
195
206
  `)}
196
207
  }
197
208
  @media (prefers-reduced-motion: reduce) {
198
209
  :root {
199
- ${n.join(
210
+ ${c.join(
200
211
  `
201
212
  `
202
213
  )}
@@ -207,23 +218,23 @@ function O(o, t) {
207
218
  function V(o) {
208
219
  const t = o.document ?? (typeof document < "u" ? document : void 0);
209
220
  if (!t) return;
210
- const e = A(), c = [], l = (r) => {
221
+ const e = L(), l = [], n = (r) => {
211
222
  const a = t.createElement("style");
212
- return a.id = `${r}-${e}`, t.head.appendChild(a), c.push(a), a;
223
+ return a.id = `${r}-${e}`, t.head.appendChild(a), l.push(a), a;
213
224
  };
214
- let n = null;
215
- const i = () => (n || (n = l(L)), n);
216
- if (!t.getElementById(x)) {
225
+ let c = null;
226
+ const i = () => (c || (c = n(v)), c);
227
+ if (!t.getElementById(b)) {
217
228
  const r = t.createElement("style");
218
- r.id = x, r.textContent = M, t.head.appendChild(r);
229
+ r.id = b, r.textContent = M, t.head.appendChild(r);
219
230
  }
220
- m(
231
+ p(
221
232
  o.getThemeConfig,
222
233
  (r) => {
223
234
  i().textContent = R(r);
224
235
  },
225
236
  { deep: !0, immediate: !0 }
226
- ), m(
237
+ ), p(
227
238
  o.getThemeIsDark,
228
239
  (r) => {
229
240
  t.documentElement.classList.toggle("dark", r);
@@ -232,13 +243,13 @@ function V(o) {
232
243
  );
233
244
  const { getThemeDensity: d, getThemeMotion: s } = o;
234
245
  if (d && s) {
235
- if (!t.getElementById(E)) {
246
+ if (!t.getElementById(x)) {
236
247
  const u = t.createElement("style");
237
- u.id = E, u.textContent = Y, t.head.appendChild(u);
248
+ u.id = x, u.textContent = Y, t.head.appendChild(u);
238
249
  }
239
250
  let r = null;
240
- const a = () => (r || (r = l(H)), r);
241
- m(
251
+ const a = () => (r || (r = n(H)), r);
252
+ p(
242
253
  () => [d(), s()],
243
254
  ([u, _]) => {
244
255
  a().textContent = O(u, _);
@@ -247,7 +258,7 @@ function V(o) {
247
258
  );
248
259
  }
249
260
  C(() => {
250
- c.forEach((r) => r.remove()), c.length = 0;
261
+ l.forEach((r) => r.remove()), l.length = 0;
251
262
  });
252
263
  }
253
264
  export {