@done-coding/admin-core 0.10.1-alpha.0 → 0.12.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/bridge/index.mjs +51 -45
  2. package/es/bridge/theme/index.mjs +88 -74
  3. package/es/components/app-layout/AppLayout.vue.mjs +2 -2
  4. package/es/components/app-layout/AppLayout.vue2.mjs +49 -45
  5. package/es/components/app-layout/AppTheme.vue.mjs +3 -3
  6. package/es/components/app-layout/AppTheme.vue2.mjs +15 -15
  7. package/es/components/display/ActionBtn.vue.mjs +22 -19
  8. package/es/components/display/TabsMain.vue.mjs +5 -5
  9. package/es/components/form/FormMain.vue.mjs +1 -1
  10. package/es/components/form/FormMain.vue2.mjs +1 -0
  11. package/es/components/list-page/ListPage.vue.mjs +2 -2
  12. package/es/components/list-page/ListPage.vue2.mjs +2 -2
  13. package/es/components/menu/MenuItemSub.vue.mjs +10 -9
  14. package/es/components/menu/MenuTree.vue.mjs +1 -0
  15. package/es/components/modal/ConfirmModal.vue.mjs +3 -3
  16. package/es/components/modal/ConfirmModal.vue2.mjs +15 -15
  17. package/es/components/modal/DetailModal.vue.mjs +18 -17
  18. package/es/components/panel/PanelMain.vue.mjs +2 -2
  19. package/es/components/panel/PanelMain.vue2.mjs +21 -18
  20. package/es/components/table/TableMain.vue.mjs +2 -2
  21. package/es/components/table/TableMain.vue2.mjs +48 -48
  22. package/es/hooks/use-admin-theme-apply.mjs +167 -39
  23. package/es/index.mjs +87 -85
  24. package/es/style.css +1 -1
  25. package/es/utils/theme-scale.mjs +29 -23
  26. package/package.json +6 -4
  27. package/types/bridge/index.d.ts +26 -2
  28. package/types/bridge/theme/index.d.ts +1 -1
  29. package/types/bridge/theme/types.d.ts +78 -0
  30. package/types/components/app-layout/AppLayout.vue.d.ts +1 -1
  31. package/types/components/app-layout/types.d.ts +1 -1
  32. package/types/hooks/use-admin-theme-apply.d.ts +18 -1
  33. package/types/utils/theme-scale.d.ts +8 -0
@@ -1,17 +1,17 @@
1
- import { defineComponent as f, inject as h, computed as m, openBlock as o, createElementBlock as r, createBlock as s, unref as l, withCtx as a, Fragment as i, renderList as c, createCommentVNode as y, createVNode as u, resolveDynamicComponent as E } from "vue";
2
- import { ElSelect as b, ElOption as k, ElRadioGroup as g, ElRadioButton as M, ElTooltip as O, ElIcon as S } from "element-plus";
3
- import { Sunny as B, Moon as C, Monitor as T } from "@element-plus/icons-vue";
1
+ import { defineComponent as f, inject as y, computed as u, openBlock as o, createElementBlock as r, createBlock as s, unref as l, withCtx as a, Fragment as i, renderList as d, createCommentVNode as E, createVNode as m, resolveDynamicComponent as S } from "vue";
2
+ import { ElSelect as b, ElOption as k, ElRadioGroup as g, ElRadioButton as w, ElTooltip as M, ElIcon as O } from "element-plus";
3
+ import { Sunny as T, Moon as B, Monitor as C } from "@element-plus/icons-vue";
4
4
  import { APP_LAYOUT_BRIDGE_KEY as x } from "../../inject/key.mjs";
5
5
  const A = { class: "app-theme" }, V = /* @__PURE__ */ f({
6
6
  __name: "AppTheme",
7
7
  setup(D) {
8
- const t = h(x), p = m(() => t.themeMode.value), v = m(() => t.themeStyle.value), d = m(() => t.theme.list.value), _ = [
9
- { value: "light", label: "亮色", icon: B },
10
- { value: "dark", label: "暗色", icon: C },
11
- { value: "system", label: "跟随系统", icon: T }
8
+ const t = y(x), p = u(() => t.themeMode.value), v = u(() => t.themeStyle.value), c = u(() => t.theme.list.value), h = u(() => t.showThemeStyleSwitcher), _ = [
9
+ { value: "light", label: "亮色", icon: T },
10
+ { value: "dark", label: "暗色", icon: B },
11
+ { value: "system", label: "跟随系统", icon: C }
12
12
  ];
13
13
  return (I, n) => (o(), r("div", A, [
14
- d.value.length > 1 ? (o(), s(l(b), {
14
+ h.value && c.value.length > 1 ? (o(), s(l(b), {
15
15
  key: 0,
16
16
  "model-value": v.value,
17
17
  class: "app-theme__style-select",
@@ -19,35 +19,35 @@ const A = { class: "app-theme" }, V = /* @__PURE__ */ f({
19
19
  onChange: n[0] || (n[0] = (e) => l(t).theme.setStyle(e))
20
20
  }, {
21
21
  default: a(() => [
22
- (o(!0), r(i, null, c(d.value, (e) => (o(), s(l(k), {
22
+ (o(!0), r(i, null, d(c.value, (e) => (o(), s(l(k), {
23
23
  key: e,
24
24
  label: l(t).theme.labelOf(e),
25
25
  value: e
26
26
  }, null, 8, ["label", "value"]))), 128))
27
27
  ]),
28
28
  _: 1
29
- }, 8, ["model-value"])) : y("", !0),
30
- u(l(g), {
29
+ }, 8, ["model-value"])) : E("", !0),
30
+ m(l(g), {
31
31
  "model-value": p.value,
32
32
  class: "app-theme__mode-group",
33
33
  size: "small",
34
34
  "onUpdate:modelValue": n[1] || (n[1] = (e) => l(t).theme.setMode(e))
35
35
  }, {
36
36
  default: a(() => [
37
- (o(), r(i, null, c(_, (e) => u(l(M), {
37
+ (o(), r(i, null, d(_, (e) => m(l(w), {
38
38
  key: e.value,
39
39
  value: e.value
40
40
  }, {
41
41
  default: a(() => [
42
- u(l(O), {
42
+ m(l(M), {
43
43
  content: e.label,
44
44
  "show-after": 200,
45
45
  placement: "bottom"
46
46
  }, {
47
47
  default: a(() => [
48
- u(l(S), null, {
48
+ m(l(O), null, {
49
49
  default: a(() => [
50
- (o(), s(E(e.icon)))
50
+ (o(), s(S(e.icon)))
51
51
  ]),
52
52
  _: 2
53
53
  }, 1024)
@@ -1,4 +1,4 @@
1
- import { defineComponent as z, toRefs as E, getCurrentInstance as M, ref as p, computed as b, watch as R, openBlock as x, createBlock as w, unref as u, withCtx as d, createVNode as V, mergeProps as A, renderSlot as I } from "vue";
1
+ import { defineComponent as z, toRefs as E, getCurrentInstance as M, ref as p, computed as C, watch as R, openBlock as x, createBlock as w, unref as u, withCtx as d, createVNode as V, mergeProps as A, renderSlot as I } from "vue";
2
2
  import { ElButton as T } from "element-plus";
3
3
  import $ from "./ActionConfirm.vue.mjs";
4
4
  const q = /* @__PURE__ */ z({
@@ -29,12 +29,12 @@ const q = /* @__PURE__ */ z({
29
29
  },
30
30
  emits: ["click"],
31
31
  setup(v) {
32
- const m = v, { confirmConfig: s, confirmMode: F, beforeOpen: f } = E(m), r = M(), o = p(!1), c = p(!1), l = p();
32
+ const m = v, { confirmConfig: s, confirmMode: F, beforeOpen: f } = E(m), r = M(), o = p(!1), c = p(!1), a = p();
33
33
  let y;
34
- const L = b(
34
+ const L = C(
35
35
  () => !!s.value || !!f.value
36
- ), g = b(() => {
37
- const e = m, t = {}, a = [
36
+ ), g = C(() => {
37
+ const e = m, t = {}, l = [
38
38
  "type",
39
39
  "size",
40
40
  "plain",
@@ -53,7 +53,7 @@ const q = /* @__PURE__ */ z({
53
53
  "icon",
54
54
  "loadingIcon"
55
55
  ];
56
- for (const n of a) e[n] !== void 0 && (t[n] = e[n]);
56
+ for (const n of l) e[n] !== void 0 && (t[n] = e[n]);
57
57
  return { ...r == null ? void 0 : r.attrs, ...t };
58
58
  }), O = (e) => !!e && typeof e.then == "function", P = () => {
59
59
  var t;
@@ -63,13 +63,13 @@ const q = /* @__PURE__ */ z({
63
63
  const e = P();
64
64
  if (!e.length) return;
65
65
  const t = y;
66
- let a;
66
+ let l;
67
67
  try {
68
- a = e.map((i) => i(t));
68
+ l = e.map((i) => i(t));
69
69
  } catch (i) {
70
70
  throw o.value = !1, i;
71
71
  }
72
- const n = a.filter(O);
72
+ const n = l.filter(O);
73
73
  if (n.length)
74
74
  return o.value = !0, Promise.all(n).finally(() => {
75
75
  o.value = !1;
@@ -89,26 +89,26 @@ const q = /* @__PURE__ */ z({
89
89
  o.value = !1;
90
90
  } else
91
91
  t = void 0;
92
- s.value ? (l.value = typeof s.value == "function" ? s.value(t) : s.value, c.value = !0) : k();
92
+ s.value ? (a.value = typeof s.value == "function" ? s.value(t) : s.value, c.value = !0) : k();
93
93
  };
94
94
  return R(c, (e) => {
95
- e || (l.value = void 0);
95
+ e || (a.value = void 0);
96
96
  }), (e, t) => {
97
- var a, n, i, h, C;
97
+ var l, n, i, h, b;
98
98
  return L.value ? (x(), w($, {
99
99
  key: 0,
100
100
  show: c.value,
101
101
  "onUpdate:show": t[0] || (t[0] = (_) => c.value = _),
102
102
  mode: u(F) || "popconfirm",
103
- title: (a = l.value) == null ? void 0 : a.title,
104
- content: (n = l.value) == null ? void 0 : n.content,
105
- "confirm-text": (i = l.value) == null ? void 0 : i.confirmText,
106
- "cancel-text": (h = l.value) == null ? void 0 : h.cancelText,
107
- type: ((C = l.value) == null ? void 0 : C.type) ?? v.type,
103
+ title: (l = a.value) == null ? void 0 : l.title,
104
+ content: (n = a.value) == null ? void 0 : n.content,
105
+ "confirm-text": (i = a.value) == null ? void 0 : i.confirmText,
106
+ "cancel-text": (h = a.value) == null ? void 0 : h.cancelText,
107
+ type: ((b = a.value) == null ? void 0 : b.type) ?? v.type,
108
108
  "submit-fn": u(S)
109
109
  }, {
110
110
  default: d(() => [
111
- V(u(T), A(g.value, {
111
+ V(u(T), A({ class: "dc-action-btn" }, g.value, {
112
112
  loading: o.value,
113
113
  onClick: B
114
114
  }), {
@@ -119,7 +119,10 @@ const q = /* @__PURE__ */ z({
119
119
  }, 16, ["loading"])
120
120
  ]),
121
121
  _: 3
122
- }, 8, ["show", "mode", "title", "content", "confirm-text", "cancel-text", "type", "submit-fn"])) : (x(), w(u(T), A({ key: 1 }, g.value, {
122
+ }, 8, ["show", "mode", "title", "content", "confirm-text", "cancel-text", "type", "submit-fn"])) : (x(), w(u(T), A({
123
+ key: 1,
124
+ class: "dc-action-btn"
125
+ }, g.value, {
123
126
  loading: o.value,
124
127
  onClick: B
125
128
  }), {
@@ -25,8 +25,8 @@ const oe = /* @__PURE__ */ c({
25
25
  viewportHeight: g,
26
26
  minHeight: y,
27
27
  channel: H,
28
- parentChannel: w,
29
- padding: b,
28
+ parentChannel: b,
29
+ padding: w,
30
30
  refine: v,
31
31
  refineReduceHeight: V,
32
32
  variant: k,
@@ -38,8 +38,8 @@ const oe = /* @__PURE__ */ c({
38
38
  viewportHeight: g.value,
39
39
  minHeight: y.value,
40
40
  channel: H.value,
41
- parentChannel: w.value,
42
- padding: b.value,
41
+ parentChannel: b.value,
42
+ padding: w.value,
43
43
  refineReduceHeight: V.value
44
44
  } : {}
45
45
  ), K = (t) => r.tabs.find((e) => e.key === t), M = (t) => {
@@ -67,7 +67,7 @@ const oe = /* @__PURE__ */ c({
67
67
  !(!!n.value && r.tabs.some((e) => e.key === n.value)) && r.tabs.length && (n.value = r.tabs[0].key);
68
68
  },
69
69
  { immediate: !0 }
70
- ), (t, e) => (o(), l(q(_.value), I(L.value, { onViewportHeightChange: M }), {
70
+ ), (t, e) => (o(), l(q(_.value), I({ class: "dc-tabs-main" }, L.value, { onViewportHeightChange: M }), {
71
71
  header: s(() => [
72
72
  z(Z, {
73
73
  "active-key": n.value,
@@ -1,7 +1,7 @@
1
1
  import o from "./FormMain.vue2.mjs";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-8ad14c45"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-83b1b718"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -122,6 +122,7 @@ const pe = /* @__PURE__ */ Y({
122
122
  ), (e, t) => (E(), V(F(Q), {
123
123
  ref_key: "elForm",
124
124
  ref: s,
125
+ class: "dc-form-main",
125
126
  model: d.data,
126
127
  rules: T.value
127
128
  }, {
@@ -1,7 +1,7 @@
1
1
  import o from "./ListPage.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fc41e3d4"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0e94ce51"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -9,7 +9,7 @@ import Re from "lodash/cloneDeep";
9
9
  import { useChannelViewportHeight as Me } from "../../hooks/use-channel-viewport-height.mjs";
10
10
  const ke = {
11
11
  "element-loading-background": "rgba(122, 122, 122, 0.5)",
12
- class: "list-page"
12
+ class: "dc-list-page list-page"
13
13
  }, Te = /* @__PURE__ */ ge({
14
14
  __name: "ListPage",
15
15
  props: /* @__PURE__ */ U({
@@ -41,7 +41,7 @@ const ke = {
41
41
  emits: /* @__PURE__ */ U(["dataChange", "pageInfoChange"], ["update:isAutoRefresh", "update:refreshInterval", "update:customView"]),
42
42
  setup(o, { expose: Q, emit: z }) {
43
43
  de((e) => ({
44
- c6e708aa: _.value
44
+ v3390ee15: _.value
45
45
  }));
46
46
  const s = o, b = z, V = me(), I = a(() => !!V.header), R = a(() => !!V.operation), g = p(o, "isAutoRefresh"), M = p(o, "refreshInterval"), k = p(o, "customView"), d = i({}), m = i(
47
47
  {}
@@ -1,40 +1,41 @@
1
- import { defineComponent as f, openBlock as e, createBlock as t, unref as l, withCtx as m, createElementBlock as a, Fragment as r, renderList as h, resolveDynamicComponent as c, createCommentVNode as o, createElementVNode as d, toDisplayString as i } from "vue";
2
- import { ElSubMenu as k, ElMenuItem as M, ElIcon as I } from "element-plus";
3
- const E = /* @__PURE__ */ f({
1
+ import { defineComponent as f, openBlock as e, createBlock as t, unref as l, withCtx as m, createElementBlock as a, Fragment as c, renderList as b, resolveDynamicComponent as r, createCommentVNode as o, createElementVNode as d, toDisplayString as i } from "vue";
2
+ import { ElSubMenu as h, ElMenuItem as k, ElIcon as I } from "element-plus";
3
+ const y = /* @__PURE__ */ f({
4
4
  __name: "MenuItemSub",
5
5
  props: {
6
6
  menu: {},
7
7
  MenuItemSub: {}
8
8
  },
9
9
  setup(n) {
10
- return (S, b) => (e(), t(l(k), {
10
+ return (M, S) => (e(), t(l(h), {
11
+ class: "dc-menu-item-sub",
11
12
  index: n.menu.path
12
13
  }, {
13
14
  title: m(() => [
14
15
  n.menu.menuIcon ? (e(), t(l(I), { key: 0 }, {
15
16
  default: m(() => [
16
- (e(), t(c(n.menu.menuIcon)))
17
+ (e(), t(r(n.menu.menuIcon)))
17
18
  ]),
18
19
  _: 1
19
20
  })) : o("", !0),
20
21
  d("span", null, i(n.menu.title), 1)
21
22
  ]),
22
23
  default: m(() => [
23
- (e(!0), a(r, null, h(n.menu.children, (u) => (e(), a(r, {
24
+ (e(!0), a(c, null, b(n.menu.children, (u) => (e(), a(c, {
24
25
  key: u.path
25
26
  }, [
26
27
  u.children.length ? (e(), t(l(n.MenuItemSub), {
27
28
  key: 0,
28
29
  menu: u,
29
30
  MenuItemSub: n.MenuItemSub
30
- }, null, 8, ["menu", "MenuItemSub"])) : (e(), t(l(M), {
31
+ }, null, 8, ["menu", "MenuItemSub"])) : (e(), t(l(k), {
31
32
  key: 1,
32
33
  index: u.path
33
34
  }, {
34
35
  default: m(() => [
35
36
  u.menuIcon ? (e(), t(l(I), { key: 0 }, {
36
37
  default: m(() => [
37
- (e(), t(c(u.menuIcon)))
38
+ (e(), t(r(u.menuIcon)))
38
39
  ]),
39
40
  _: 2
40
41
  }, 1024)) : o("", !0),
@@ -49,5 +50,5 @@ const E = /* @__PURE__ */ f({
49
50
  }
50
51
  });
51
52
  export {
52
- E as default
53
+ y as default
53
54
  };
@@ -42,6 +42,7 @@ const j = /* @__PURE__ */ E({
42
42
  return (o, t) => (r(), a(p(F), I(B.value, {
43
43
  ref_key: "elMenu",
44
44
  ref: u,
45
+ class: "dc-menu-tree",
45
46
  collapse: l.collapse,
46
47
  router: l.routerMode,
47
48
  onSelect: C
@@ -1,7 +1,7 @@
1
1
  import o from "./ConfirmModal.vue2.mjs";
2
2
  /* empty css */
3
- import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-26598cb2"]]);
3
+ import f from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const a = /* @__PURE__ */ f(o, [["__scopeId", "data-v-647fb7fd"]]);
5
5
  export {
6
- f as default
6
+ a as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as E, ref as N, computed as O, openBlock as l, createBlock as s, unref as r, withCtx as a, createElementVNode as u, renderSlot as m, resolveDynamicComponent as v, createElementBlock as w, Fragment as k, createTextVNode as i, toDisplayString as d, createCommentVNode as S, createVNode as V } from "vue";
1
+ import { defineComponent as E, ref as N, computed as O, openBlock as l, createBlock as s, unref as f, normalizeClass as S, withCtx as a, createElementVNode as u, renderSlot as m, resolveDynamicComponent as v, createElementBlock as w, Fragment as k, createTextVNode as i, toDisplayString as d, createCommentVNode as V, createVNode as $ } from "vue";
2
2
  import { ElDialog as D, ElButton as g } from "element-plus";
3
- const F = { class: "confirm-modal__title" }, H = { class: "confirm-modal__content" }, L = ["reverse"], P = /* @__PURE__ */ E({
3
+ const F = { class: "confirm-modal__title" }, H = { class: "confirm-modal__content" }, L = ["reverse"], b = /* @__PURE__ */ E({
4
4
  inheritAttrs: !1,
5
5
  __name: "ConfirmModal",
6
6
  props: {
@@ -23,35 +23,35 @@ const F = { class: "confirm-modal__title" }, H = { class: "confirm-modal__conten
23
23
  },
24
24
  emits: ["update:show"],
25
25
  setup(e, { emit: B }) {
26
- const t = e, x = B, c = N(!1), y = O(() => t.useLoading && c.value), f = (o) => {
26
+ const t = e, T = B, c = N(!1), y = O(() => t.useLoading && c.value), r = (o) => {
27
27
  var n;
28
- x("update:show", !1), (n = t.onClose) == null || n.call(t, o);
28
+ T("update:show", !1), (n = t.onClose) == null || n.call(t, o);
29
29
  }, h = async () => {
30
30
  var n;
31
- await ((n = t.onCancel) == null ? void 0 : n.call(t)) !== !1 && f(!1);
31
+ await ((n = t.onCancel) == null ? void 0 : n.call(t)) !== !1 && r(!1);
32
32
  }, C = async () => {
33
33
  var o;
34
34
  c.value = !0;
35
35
  try {
36
36
  const n = await ((o = t.onConfirm) == null ? void 0 : o.call(t));
37
37
  if (c.value = !1, n === !1) return;
38
- f(!0);
38
+ r(!0);
39
39
  } catch {
40
40
  c.value = !1;
41
41
  }
42
- }, T = () => {
43
- f(!1);
42
+ }, x = () => {
43
+ r(!1);
44
44
  };
45
- return (o, n) => (l(), s(r(D), {
45
+ return (o, n) => (l(), s(f(D), {
46
46
  "model-value": e.show,
47
- class: "confirm-modal",
47
+ class: S(["dc-confirm-modal", "confirm-modal", o.$attrs.class]),
48
48
  width: e.width,
49
49
  "show-close": e.showClose,
50
50
  "append-to-body": "",
51
51
  "align-center": "",
52
52
  "close-on-click-modal": e.closeOnClickModal,
53
53
  "close-on-press-escape": e.closeOnPressEscape,
54
- onClose: T
54
+ onClose: x
55
55
  }, {
56
56
  header: a(() => [
57
57
  u("div", F, [
@@ -72,7 +72,7 @@ const F = { class: "confirm-modal__title" }, H = { class: "confirm-modal__conten
72
72
  confirmHandler: C,
73
73
  loading: y.value
74
74
  }, () => [
75
- e.hiddenCancel ? S("", !0) : (l(), s(r(g), {
75
+ e.hiddenCancel ? V("", !0) : (l(), s(f(g), {
76
76
  key: 0,
77
77
  class: "confirm-modal__cancel",
78
78
  onClick: h
@@ -82,7 +82,7 @@ const F = { class: "confirm-modal__title" }, H = { class: "confirm-modal__conten
82
82
  ]),
83
83
  _: 1
84
84
  })),
85
- V(r(g), {
85
+ $(f(g), {
86
86
  class: "confirm-modal__confirm",
87
87
  type: e.type,
88
88
  loading: y.value,
@@ -106,9 +106,9 @@ const F = { class: "confirm-modal__title" }, H = { class: "confirm-modal__conten
106
106
  ])
107
107
  ]),
108
108
  _: 3
109
- }, 8, ["model-value", "width", "show-close", "close-on-click-modal", "close-on-press-escape"]));
109
+ }, 8, ["model-value", "class", "width", "show-close", "close-on-click-modal", "close-on-press-escape"]));
110
110
  }
111
111
  });
112
112
  export {
113
- P as default
113
+ b as default
114
114
  };
@@ -19,15 +19,15 @@ const P = /* @__PURE__ */ w({
19
19
  labelWidth: { default: "auto" }
20
20
  },
21
21
  emits: ["update:show", "afterAdd", "afterEdit"],
22
- setup(a, { emit: f }) {
23
- const t = a, i = f, l = y(), s = n(() => t.data), u = n(() => `${t.type === "add" ? "新增" : "编辑"}${t.subTitle || ""}`), m = (o) => {
22
+ setup(e, { emit: s }) {
23
+ const t = e, i = s, l = y(), f = n(() => t.data), m = n(() => `${t.type === "add" ? "新增" : "编辑"}${t.subTitle || ""}`), u = (o) => {
24
24
  i("update:show", o);
25
25
  }, c = () => {
26
26
  var o;
27
27
  return (o = l.value) == null ? void 0 : o.validate().then(async () => {
28
28
  var d, r;
29
- const e = D(t.data, t.list);
30
- console.log("confirm", e), t.type === "add" ? (await ((d = t.addApi) == null ? void 0 : d.call(t, e)), i("afterAdd", e)) : (await ((r = t.editApi) == null ? void 0 : r.call(t, e)), i("afterEdit", e));
29
+ const a = D(t.data, t.list);
30
+ console.log("confirm", a), t.type === "add" ? (await ((d = t.addApi) == null ? void 0 : d.call(t, a)), i("afterAdd", a)) : (await ((r = t.editApi) == null ? void 0 : r.call(t, a)), i("afterEdit", a));
31
31
  });
32
32
  }, h = () => {
33
33
  console.log("cancel");
@@ -35,28 +35,29 @@ const P = /* @__PURE__ */ w({
35
35
  return g(
36
36
  () => t.show,
37
37
  (o) => {
38
- var e;
39
- o || (e = l.value) == null || e.clearValidate();
38
+ var a;
39
+ o || (a = l.value) == null || a.clearValidate();
40
40
  }
41
- ), (o, e) => (b(), p(k, {
42
- title: u.value,
43
- show: a.show,
41
+ ), (o, a) => (b(), p(k, {
42
+ class: "dc-detail-modal",
43
+ title: m.value,
44
+ show: e.show,
44
45
  onConfirm: c,
45
46
  onCancel: h,
46
47
  useLoading: "",
47
- width: a.modalWidth,
48
- "onUpdate:show": m
48
+ width: e.modalWidth,
49
+ "onUpdate:show": u
49
50
  }, {
50
51
  default: A(() => [
51
52
  W(v(M), C({
52
53
  ref_key: "formMain",
53
54
  ref: l,
54
- list: a.list,
55
- data: s.value,
56
- layout: a.formLayout,
57
- labelWidth: a.labelWidth,
58
- "row-gutter": a.formRowGutter
59
- }, a.formProps), null, 16, ["list", "data", "layout", "labelWidth", "row-gutter"])
55
+ list: e.list,
56
+ data: f.value,
57
+ layout: e.formLayout,
58
+ labelWidth: e.labelWidth,
59
+ "row-gutter": e.formRowGutter
60
+ }, e.formProps), null, 16, ["list", "data", "layout", "labelWidth", "row-gutter"])
60
61
  ]),
61
62
  _: 1
62
63
  }, 8, ["title", "show", "width"]));
@@ -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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9c14b584"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0835965e"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as w, useCssVars as B, computed as s, 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 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";
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";
@@ -16,15 +16,15 @@ const q = /* @__PURE__ */ w({
16
16
  refreshFn: {}
17
17
  },
18
18
  emits: ["submitSuccess"],
19
- setup(o, { emit: y }) {
19
+ setup(s, { emit: y }) {
20
20
  B((a) => ({
21
- v5b714e11: h.value
21
+ e1f69828: h.value
22
22
  }));
23
- const r = o, v = y, C = s(() => r.layoutScale ?? 1);
24
- M(W, C);
25
- const n = L({}), m = s(() => r.itemCard ? f : "span"), S = s(
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
26
  () => `panel-main-item-col-wrap_${m.value === f ? "card" : "span"}`
27
- ), h = s(
27
+ ), h = o(
28
28
  () => typeof r.itemCard == "object" && r.itemCard.lastMarginBottom ? r.itemCard.lastMarginBottom : 0
29
29
  ), k = (a) => {
30
30
  const { hide: t } = a;
@@ -43,13 +43,13 @@ const q = /* @__PURE__ */ w({
43
43
  ...p(r.layout, t),
44
44
  ...p(a, t)
45
45
  };
46
- }, b = (a, t) => {
46
+ }, g = (a, t) => {
47
47
  n.value = {}, t && (n.value[a] = t);
48
- }, g = (a) => (t) => {
48
+ }, E = (a) => (t) => {
49
49
  var e;
50
50
  return (e = r.refreshFn) == null ? void 0 : e.call(r, t, a);
51
- }, E = (a, t) => {
52
- v("submitSuccess", t, a);
51
+ }, b = (a, t) => {
52
+ C("submitSuccess", t, a);
53
53
  };
54
54
  return x(
55
55
  () => r.list,
@@ -60,23 +60,26 @@ const q = /* @__PURE__ */ w({
60
60
  });
61
61
  },
62
62
  { immediate: !0 }
63
- ), (a, t) => (l(), u(d(N), { gutter: o.rowGutter }, {
63
+ ), (a, t) => (l(), u(d(N), {
64
+ class: "dc-panel-main",
65
+ gutter: s.rowGutter
66
+ }, {
64
67
  default: c(() => [
65
- (l(!0), F(j, null, O(o.list, (e) => P((l(), u(d(V), T({
68
+ (l(!0), F(j, null, O(s.list, (e) => P((l(), u(d(V), T({
66
69
  key: e.key
67
70
  }, { ref_for: !0 }, _(e.layout), { class: "panel-main-item-col" }), {
68
71
  default: c(() => [
69
72
  (l(), u(U(m.value), {
70
- class: A(S.value)
73
+ class: A(v.value)
71
74
  }, {
72
75
  default: c(() => [
73
76
  D(H, {
74
- data: o.data,
77
+ data: s.data,
75
78
  config: e,
76
79
  editing: n.value[e.key] ?? !1,
77
- "refresh-fn": g(e.key),
78
- "onUpdate:editing": (i) => b(e.key, i),
79
- onSubmitSuccess: (i) => E(e.key, i)
80
+ "refresh-fn": E(e.key),
81
+ "onUpdate:editing": (i) => g(e.key, i),
82
+ onSubmitSuccess: (i) => b(e.key, i)
80
83
  }, null, 8, ["data", "config", "editing", "refresh-fn", "onUpdate:editing", "onSubmitSuccess"])
81
84
  ]),
82
85
  _: 2
@@ -1,7 +1,7 @@
1
1
  import o from "./TableMain.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-132febbc"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e8584319"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };