@duxweb/dvha-pro 0.0.6 → 0.0.8

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 (121) hide show
  1. package/dist/cjs/component.cjs +1 -1
  2. package/dist/cjs/components/card/card.cjs +1 -1
  3. package/dist/cjs/components/chart/echart.cjs +1 -0
  4. package/dist/cjs/components/dialog/dialog.cjs +1 -1
  5. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  6. package/dist/cjs/components/form/modalForm.cjs +1 -1
  7. package/dist/cjs/components/form/pageForm.cjs +1 -1
  8. package/dist/cjs/components/form/settingForm.cjs +1 -1
  9. package/dist/cjs/components/layout/list.cjs +1 -1
  10. package/dist/cjs/components/layout/table.cjs +1 -1
  11. package/dist/cjs/components/list/card.cjs +1 -1
  12. package/dist/cjs/components/list/list.cjs +1 -1
  13. package/dist/cjs/components/modal/modal.cjs +1 -1
  14. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  15. package/dist/cjs/components/modal/modalTab.cjs +1 -1
  16. package/dist/cjs/components/select/cardSelect.cjs +1 -0
  17. package/dist/cjs/components/table/tablePage.cjs +1 -1
  18. package/dist/cjs/config/echart.cjs +1 -0
  19. package/dist/cjs/dvha-pro.css +1 -1
  20. package/dist/cjs/hooks/action.cjs +1 -1
  21. package/dist/cjs/hooks/dialog.cjs +1 -1
  22. package/dist/cjs/hooks/drawer.cjs +1 -1
  23. package/dist/cjs/hooks/echart.cjs +1 -0
  24. package/dist/cjs/hooks/modal.cjs +1 -1
  25. package/dist/cjs/hooks/table/media.cjs +1 -1
  26. package/dist/cjs/index.cjs +1 -1
  27. package/dist/cjs/main.cjs +1 -1
  28. package/dist/cjs/pages/authLayout.cjs +1 -1
  29. package/dist/cjs/pages/layout/global.cjs +1 -1
  30. package/dist/cjs/pages/layout/page.cjs +1 -1
  31. package/dist/cjs/pages/login.cjs +1 -1
  32. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  33. package/dist/cjs/pages/menu/button.cjs +1 -1
  34. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  35. package/dist/cjs/pages/menu/main.cjs +1 -1
  36. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  37. package/dist/cjs/pages/page.cjs +1 -1
  38. package/dist/cjs/pages/page404.cjs +1 -1
  39. package/dist/cjs/pages/pageStatus.cjs +1 -1
  40. package/dist/cjs/theme/naiveTheme.cjs +1 -1
  41. package/dist/cjs/theme/uno.css.cjs +28 -7
  42. package/dist/esm/component.js +43 -41
  43. package/dist/esm/components/card/card.js +1 -1
  44. package/dist/esm/components/chart/echart.js +75 -0
  45. package/dist/esm/components/dialog/dialog.js +87 -93
  46. package/dist/esm/components/drawer/drawer.js +34 -32
  47. package/dist/esm/components/form/modalForm.js +1 -1
  48. package/dist/esm/components/form/pageForm.js +23 -19
  49. package/dist/esm/components/form/settingForm.js +22 -18
  50. package/dist/esm/components/layout/list.js +203 -142
  51. package/dist/esm/components/layout/table.js +210 -145
  52. package/dist/esm/components/list/card.js +42 -32
  53. package/dist/esm/components/list/list.js +27 -16
  54. package/dist/esm/components/modal/modal.js +46 -86
  55. package/dist/esm/components/modal/modalPage.js +23 -18
  56. package/dist/esm/components/modal/modalTab.js +11 -11
  57. package/dist/esm/components/select/cardSelect.js +103 -0
  58. package/dist/esm/components/table/tablePage.js +21 -18
  59. package/dist/esm/config/echart.js +456 -0
  60. package/dist/esm/dvha-pro.css +1 -1
  61. package/dist/esm/hooks/action.js +46 -45
  62. package/dist/esm/hooks/dialog.js +24 -7
  63. package/dist/esm/hooks/drawer.js +12 -8
  64. package/dist/esm/hooks/echart.js +469 -0
  65. package/dist/esm/hooks/modal.js +25 -9
  66. package/dist/esm/hooks/table/media.js +18 -14
  67. package/dist/esm/index.js +158 -135
  68. package/dist/esm/main.js +11 -8
  69. package/dist/esm/pages/authLayout.js +3 -2
  70. package/dist/esm/pages/layout/global.js +46 -33
  71. package/dist/esm/pages/layout/page.js +13 -9
  72. package/dist/esm/pages/login.js +25 -21
  73. package/dist/esm/pages/menu/avatar.js +14 -14
  74. package/dist/esm/pages/menu/button.js +14 -10
  75. package/dist/esm/pages/menu/cmd.js +26 -22
  76. package/dist/esm/pages/menu/main.js +26 -22
  77. package/dist/esm/pages/menu/mobile.js +11 -7
  78. package/dist/esm/pages/page.js +16 -16
  79. package/dist/esm/pages/page404.js +24 -20
  80. package/dist/esm/pages/pageStatus.js +12 -8
  81. package/dist/esm/theme/naiveTheme.js +57 -51
  82. package/dist/esm/theme/uno.css.js +28 -7
  83. package/dist/types/components/chart/echart.d.ts +284 -0
  84. package/dist/types/components/chart/index.d.ts +1 -0
  85. package/dist/types/components/dialog/dialog.d.ts +1 -20
  86. package/dist/types/components/drawer/drawer.d.ts +14 -4
  87. package/dist/types/components/form/formLayout.d.ts +1 -1
  88. package/dist/types/components/form/modalForm.d.ts +1 -1
  89. package/dist/types/components/index.d.ts +3 -0
  90. package/dist/types/components/layout/list.d.ts +18 -0
  91. package/dist/types/components/layout/table.d.ts +22 -1
  92. package/dist/types/components/list/card.d.ts +38 -0
  93. package/dist/types/components/list/list.d.ts +43 -2
  94. package/dist/types/components/modal/modal.d.ts +13 -31
  95. package/dist/types/components/modal/modalPage.d.ts +3 -6
  96. package/dist/types/components/panel/alert.d.ts +1 -1
  97. package/dist/types/components/select/cardSelect.d.ts +88 -0
  98. package/dist/types/components/select/index.d.ts +1 -0
  99. package/dist/types/components/table/tablePage.d.ts +28 -2
  100. package/dist/types/config/echart.d.ts +4 -0
  101. package/dist/types/config/index.d.ts +1 -0
  102. package/dist/types/hooks/drawer.d.ts +3 -2
  103. package/dist/types/hooks/echart.d.ts +166 -0
  104. package/dist/types/hooks/index.d.ts +2 -0
  105. package/dist/types/hooks/modal.d.ts +10 -5
  106. package/dist/types/hooks/table/types.d.ts +1 -0
  107. package/dist/types/main.d.ts +1 -0
  108. package/dist/types/pages/layout/global.d.ts +1 -0
  109. package/dist/types/pages/menu/avatar.d.ts +3 -3
  110. package/dist/types/pages/menu/button.d.ts +3 -3
  111. package/dist/types/pages/menu/main.d.ts +3 -3
  112. package/dist/types/pages/page.d.ts +1 -1
  113. package/package.json +8 -3
  114. package/dist/cjs/node_modules/.pnpm/@vueuse_integrations@13.3.0_async-validator@4.2.5_axios@1.10.0_focus-trap@7.6.5_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/integrations/useFocusTrap.cjs +0 -1
  115. package/dist/cjs/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/shared/index.cjs +0 -1
  116. package/dist/cjs/node_modules/.pnpm/focus-trap@7.6.5/node_modules/focus-trap/dist/focus-trap.esm.cjs +0 -5
  117. package/dist/cjs/node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.cjs +0 -4
  118. package/dist/esm/node_modules/.pnpm/@vueuse_integrations@13.3.0_async-validator@4.2.5_axios@1.10.0_focus-trap@7.6.5_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/integrations/useFocusTrap.js +0 -43
  119. package/dist/esm/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/shared/index.js +0 -6
  120. package/dist/esm/node_modules/.pnpm/focus-trap@7.6.5/node_modules/focus-trap/dist/focus-trap.esm.js +0 -473
  121. package/dist/esm/node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js +0 -202
@@ -1,118 +1,112 @@
1
- import { defineComponent as y, reactive as g, ref as f, createVNode as n, h as v, isVNode as x } from "vue";
1
+ import { defineComponent as y, reactive as v, createVNode as n, h as x, isVNode as p } from "vue";
2
2
  import { useI18n as h, useJsonSchema as w } from "@duxweb/dvha-core";
3
- import { useFocusTrap as F } from "../../node_modules/.pnpm/@vueuse_integrations@13.3.0_async-validator@4.2.5_axios@1.10.0_focus-trap@7.6.5_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/integrations/useFocusTrap.js";
4
- import { NForm as S, NButton as m } from "naive-ui";
5
- function r(t) {
6
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !x(t);
3
+ import { useExtendOverlay as S } from "@overlastic/vue";
4
+ import { NModal as k, NForm as j, NButton as s } from "naive-ui";
5
+ function c(t) {
6
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !p(t);
7
7
  }
8
- const D = /* @__PURE__ */ y({
8
+ const A = /* @__PURE__ */ y({
9
9
  name: "DuxDialog",
10
10
  props: {
11
11
  title: String,
12
12
  content: String,
13
13
  type: String,
14
14
  formSchema: Array,
15
- onClose: {
16
- type: Function,
17
- default: () => {
18
- }
19
- },
20
- onConfirm: {
21
- type: Function,
22
- default: () => {
23
- }
24
- },
25
15
  render: Function
26
16
  },
27
17
  setup(t) {
28
18
  const {
29
- t: l
30
- } = h(), e = g({
19
+ t: o
20
+ } = h(), {
21
+ visible: d,
22
+ resolve: u,
23
+ reject: f,
24
+ vanish: m
25
+ } = S({
26
+ duration: 1e3
27
+ }), e = v({
31
28
  title: t == null ? void 0 : t.title,
32
29
  content: t == null ? void 0 : t.content,
33
30
  button: "default"
34
31
  });
35
- t.type === "confirm" && (e.title = e.title || l("components.dialog.confirm.title"), e.content = e.content || l("components.dialog.confirm.content"), e.button = "primary"), t.type === "success" && (e.title = e.title || l("components.dialog.success.title"), e.content = e.content || l("components.dialog.success.content"), e.button = "success"), t.type === "error" && (e.title = e.title || l("components.dialog.error.title"), e.content = e.content || l("components.dialog.error.content"), e.button = "error"), t.type === "prompt" && (e.title = e.title || l("components.dialog.prompt.title"), e.button = "primary");
32
+ t.type === "confirm" && (e.title = e.title || o("components.dialog.confirm.title"), e.content = e.content || o("components.dialog.confirm.content"), e.button = "primary"), t.type === "success" && (e.title = e.title || o("components.dialog.success.title"), e.content = e.content || o("components.dialog.success.content"), e.button = "success"), t.type === "error" && (e.title = e.title || o("components.dialog.error.title"), e.content = e.content || o("components.dialog.error.content"), e.button = "error"), t.type === "prompt" && (e.title = e.title || o("components.dialog.prompt.title"), e.button = "primary");
36
33
  const {
37
34
  render: b
38
35
  } = w({
39
36
  data: t.formSchema || []
40
- }), s = f(), u = f();
41
- return F(u, {
42
- immediate: !0,
43
- escapeDeactivates: !1,
44
- returnFocusOnDeactivate: !0,
45
- initialFocus: () => {
46
- var o;
47
- return (o = s.value) == null ? void 0 : o.$el;
37
+ });
38
+ return () => n(k, {
39
+ displayDirective: "show",
40
+ show: d.value,
41
+ onAfterLeave: () => {
42
+ m();
43
+ },
44
+ role: "dialog",
45
+ "aria-modal": "true",
46
+ draggable: !0
47
+ }, {
48
+ default: ({
49
+ draggableClass: g
50
+ }) => {
51
+ var r;
52
+ let l, i, a;
53
+ return n("div", {
54
+ class: ["w-400px rounded border border-muted max-w-full shadow-lg shadow-gray-950/10 bg-white/70 dark:shadow-gray-950/80 dark:bg-gray-900/70 backdrop-blur"]
55
+ }, [t.type !== "node" ? n("div", {
56
+ class: ["p-6 pb-2 flex gap-4", g]
57
+ }, [n("div", null, [(t.type === "confirm" || t.type === "prompt") && n("div", {
58
+ class: "bg-warning bg-opacity-10 text-warning rounded-full p-2"
59
+ }, [n("div", {
60
+ class: "i-tabler:info-circle size-5"
61
+ }, null)]), t.type === "success" && n("div", {
62
+ class: "bg-success bg-opacity-10 text-success rounded-full p-2"
63
+ }, [n("div", {
64
+ class: "i-tabler:check size-5"
65
+ }, null)]), t.type === "error" && n("div", {
66
+ class: "bg-error bg-opacity-10 text-error rounded-full p-2"
67
+ }, [n("div", {
68
+ class: "i-tabler:alert-triangle size-5"
69
+ }, null)])]), n("div", {
70
+ class: "flex flex-1 flex-col gap-2"
71
+ }, [n("div", {
72
+ class: "text-base font-bold"
73
+ }, [e.title]), t.type === "prompt" ? n(j, {
74
+ labelAlign: "left",
75
+ showLabel: !1,
76
+ showFeedback: !1,
77
+ class: "py-2"
78
+ }, c(l = x(b)) ? l : {
79
+ default: () => [l]
80
+ }) : n("div", {
81
+ class: "text-sm text-gray-500"
82
+ }, [e.content])])]) : n("div", {
83
+ class: "p-4 flex flex-col gap-4"
84
+ }, [n("div", {
85
+ class: "text-base font-bold"
86
+ }, [e.title]), (r = t.render) == null ? void 0 : r.call(t)]), n("div", {
87
+ class: "px-4 pb-4 flex justify-end gap-2"
88
+ }, [(t.type === "confirm" || t.type === "prompt") && n(s, {
89
+ tertiary: !0,
90
+ "aria-label": o("components.button.cancel"),
91
+ type: e.button,
92
+ onClick: () => {
93
+ f();
94
+ }
95
+ }, c(i = o("components.button.cancel")) ? i : {
96
+ default: () => [i]
97
+ }), n(s, {
98
+ "aria-label": o("components.button.confirm"),
99
+ type: e.button,
100
+ onClick: () => {
101
+ u();
102
+ }
103
+ }, c(a = o("components.button.confirm")) ? a : {
104
+ default: () => [a]
105
+ })])]);
48
106
  }
49
- }), () => {
50
- var d;
51
- let o, c, a;
52
- return n("div", {
53
- class: "flex justify-center items-center size-full",
54
- role: "dialog",
55
- "aria-modal": "true"
56
- }, [n("div", {
57
- ref: u,
58
- class: "w-400px rounded border border-muted max-w-full shadow-lg shadow-gray-950/10 bg-white/80 dark:shadow-gray-950/80 dark:bg-gray-900/70 backdrop-blur"
59
- }, [t.type !== "node" ? n("div", {
60
- class: "p-6 pb-2 flex gap-4"
61
- }, [n("div", null, [(t.type === "confirm" || t.type === "prompt") && n("div", {
62
- class: "bg-primary bg-opacity-10 text-primary rounded-full p-2"
63
- }, [n("div", {
64
- class: "i-tabler:info-circle size-5"
65
- }, null)]), t.type === "success" && n("div", {
66
- class: "bg-success bg-opacity-10 text-success rounded-full p-2"
67
- }, [n("div", {
68
- class: "i-tabler:check size-5"
69
- }, null)]), t.type === "error" && n("div", {
70
- class: "bg-error bg-opacity-10 text-error rounded-full p-2"
71
- }, [n("div", {
72
- class: "i-tabler:alert-triangle size-5"
73
- }, null)])]), n("div", {
74
- class: "flex flex-1 flex-col gap-2"
75
- }, [n("div", {
76
- class: "text-base font-bold"
77
- }, [e.title]), t.type === "prompt" ? n(S, {
78
- labelAlign: "left",
79
- showLabel: !1,
80
- showFeedback: !1,
81
- class: "py-2"
82
- }, r(o = v(b)) ? o : {
83
- default: () => [o]
84
- }) : n("div", {
85
- class: "text-sm text-gray-500"
86
- }, [e.content])])]) : n("div", {
87
- class: "p-4 flex flex-col gap-4"
88
- }, [n("div", {
89
- class: "text-base font-bold"
90
- }, [e.title]), (d = t.render) == null ? void 0 : d.call(t)]), n("div", {
91
- class: "px-4 pb-4 flex justify-end gap-2"
92
- }, [(t.type === "confirm" || t.type === "prompt") && n(m, {
93
- tertiary: !0,
94
- "aria-label": l("components.button.cancel"),
95
- type: e.button,
96
- onClick: () => {
97
- var i;
98
- (i = t.onClose) == null || i.call(t);
99
- }
100
- }, r(c = l("components.button.cancel")) ? c : {
101
- default: () => [c]
102
- }), n(m, {
103
- ref: s,
104
- "aria-label": l("components.button.confirm"),
105
- type: e.button,
106
- onClick: () => {
107
- var i;
108
- (i = t.onConfirm) == null || i.call(t);
109
- }
110
- }, r(a = l("components.button.confirm")) ? a : {
111
- default: () => [a]
112
- })])])]);
113
- };
107
+ });
114
108
  }
115
109
  });
116
110
  export {
117
- D as default
111
+ A as default
118
112
  };
@@ -1,66 +1,68 @@
1
- import { defineComponent as s, defineAsyncComponent as u, createVNode as e, Suspense as c, mergeProps as d } from "vue";
2
- import { useExtendOverlay as f } from "@overlastic/vue";
3
- import { NDrawer as m, NButton as b, NSpin as h } from "naive-ui";
4
- const y = /* @__PURE__ */ s({
1
+ import { defineComponent as u, defineAsyncComponent as r, createVNode as t, Suspense as d } from "vue";
2
+ import { useExtendOverlay as s } from "@overlastic/vue";
3
+ import { NDrawer as f, NButton as m, NSpin as b } from "naive-ui";
4
+ const w = /* @__PURE__ */ u({
5
5
  name: "DuxDrawer",
6
6
  props: {
7
7
  title: String,
8
8
  width: [Number, String],
9
+ placement: {
10
+ type: String,
11
+ default: "right"
12
+ },
9
13
  component: {
10
- type: Function,
14
+ type: [Function, Object],
11
15
  required: !0
12
16
  },
13
17
  componentProps: Object
14
18
  },
15
- setup(t) {
19
+ setup(e) {
16
20
  const {
17
- visible: o,
21
+ visible: i,
18
22
  resolve: l,
19
- reject: n,
20
- vanish: r
21
- } = f({
23
+ reject: a,
24
+ vanish: o
25
+ } = s({
22
26
  duration: 1e3
23
- }), a = (t == null ? void 0 : t.componentProps) || {};
24
- a.onConfirm = l, a.onClose = n;
25
- const i = u(t.component);
26
- return () => e(m, {
27
+ }), n = (e == null ? void 0 : e.componentProps) || {};
28
+ n.onConfirm = l, n.onClose = a;
29
+ const c = typeof e.component == "function" ? r(e.component) : e.component;
30
+ return () => t(f, {
27
31
  closeOnEsc: !1,
28
32
  maskClosable: !1,
29
33
  minWidth: 400,
30
- defaultWidth: (t == null ? void 0 : t.width) || 400,
34
+ defaultWidth: (e == null ? void 0 : e.width) || 400,
31
35
  resizable: !0,
32
- show: o.value,
36
+ placement: e.placement,
37
+ show: i.value,
33
38
  onUpdateShow: () => l(),
34
39
  onAfterLeave: () => {
35
- r();
40
+ o();
36
41
  },
37
42
  class: ""
38
43
  }, {
39
- default: () => [e("div", {
44
+ default: () => [t("div", {
40
45
  class: "h-full flex flex-col"
41
- }, [e("div", {
42
- class: "flex justify-between items-center px-4 py-3 border-b border-gray-2 dark:border-gray-3"
43
- }, [e("div", {
46
+ }, [t("div", {
47
+ class: "flex justify-between items-center px-4 py-3 border-b border-default"
48
+ }, [t("div", {
44
49
  class: "text-base"
45
- }, [t == null ? void 0 : t.title]), e("div", null, [e(b, {
50
+ }, [e == null ? void 0 : e.title]), t("div", null, [t(m, {
46
51
  quaternary: !0,
47
52
  size: "small",
48
53
  color: "default",
49
54
  class: "!px-1 h-6",
50
- onClick: () => n()
55
+ onClick: () => a()
51
56
  }, {
52
- default: () => [e("div", {
57
+ default: () => [t("div", {
53
58
  class: "i-tabler:x w-5 h-5"
54
59
  }, null)]
55
- })])]), e(c, null, {
56
- default: () => e(i, d(a, {
57
- onSuccess: l,
58
- onClose: n
59
- }), null),
60
- fallback: () => e(h, {
60
+ })])]), t(d, null, {
61
+ default: () => t(c, n, null),
62
+ fallback: () => t(b, {
61
63
  show: !0
62
64
  }, {
63
- default: () => [e("div", {
65
+ default: () => [t("div", {
64
66
  class: "flex-1 min-h-1"
65
67
  }, null)]
66
68
  })
@@ -69,5 +71,5 @@ const y = /* @__PURE__ */ s({
69
71
  }
70
72
  });
71
73
  export {
72
- y as default
74
+ w as default
73
75
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as C, computed as F, toRef as x, createVNode as i, Fragment as E, resolveComponent as r, mergeProps as v, isVNode as h } from "vue";
2
2
  import { useI18n as j, useExtendForm as M } from "@duxweb/dvha-core";
3
3
  import { useMessage as D } from "naive-ui";
4
- import "@vueuse/core";
4
+ import "@overlastic/vue";
5
5
  import N from "../modal/modalPage.js";
6
6
  import { DuxFormLayout as l } from "./formLayout.js";
7
7
  function d(t) {
@@ -1,8 +1,9 @@
1
- import { defineComponent as d, toRef as f, createVNode as r } from "vue";
1
+ import { defineComponent as d, toRef as f, createVNode as i } from "vue";
2
2
  import { useI18n as p, useExtendForm as g } from "@duxweb/dvha-core";
3
3
  import { useMessage as y, NButton as c } from "naive-ui";
4
4
  import "@overlastic/vue";
5
5
  import "vue-router";
6
+ import "vue-echarts";
6
7
  import "clsx";
7
8
  import "jinrishici";
8
9
  import "lodash-es";
@@ -12,10 +13,13 @@ import "@duxweb/dvha-naiveui";
12
13
  import "pinia";
13
14
  import "@vee-validate/i18n";
14
15
  import "colorizr";
16
+ import "echarts";
17
+ import "@ant-design/colors";
18
+ import "@unocss/preset-typography";
15
19
  import "vue-command-palette";
16
20
  import { DuxPage as b } from "../../pages/page.js";
17
21
  import "../../pages/page404.js";
18
- const O = /* @__PURE__ */ d({
22
+ const q = /* @__PURE__ */ d({
19
23
  name: "DuxPageForm",
20
24
  props: {
21
25
  id: {
@@ -51,38 +55,38 @@ const O = /* @__PURE__ */ d({
51
55
  path: e.path,
52
56
  form: u,
53
57
  action: e.action,
54
- onError: (n) => {
55
- var i;
56
- o.error(n.message || m("components.form.error")), (i = e.onError) == null || i.call(e, n);
58
+ onError: (r) => {
59
+ var n;
60
+ o.error(r.message || m("components.form.error")), (n = e.onError) == null || n.call(e, r);
57
61
  },
58
- onSuccess: (n) => {
59
- var i;
60
- o.success(m("components.form.success")), (i = e.onSuccess) == null || i.call(e, n);
62
+ onSuccess: (r) => {
63
+ var n;
64
+ o.success(m("components.form.success")), (n = e.onSuccess) == null || n.call(e, r);
61
65
  }
62
66
  });
63
- return () => r(b, {
67
+ return () => i(b, {
64
68
  card: !1
65
69
  }, {
66
70
  default: () => {
67
- var n;
68
- return (n = t == null ? void 0 : t.default) == null ? void 0 : n.call(t, a);
71
+ var r;
72
+ return (r = t == null ? void 0 : t.default) == null ? void 0 : r.call(t, a);
69
73
  },
70
74
  actions: () => {
71
- var n;
72
- return r("div", {
75
+ var r;
76
+ return i("div", {
73
77
  class: "flex gap-6 items-center"
74
- }, [(n = t == null ? void 0 : t.actions) == null ? void 0 : n.call(t, a), r("div", {
78
+ }, [(r = t == null ? void 0 : t.actions) == null ? void 0 : r.call(t, a), i("div", {
75
79
  class: "flex gap-2"
76
- }, [r(c, null, {
80
+ }, [i(c, null, {
77
81
  default: () => m("components.button.reset"),
78
- icon: () => r("i", {
82
+ icon: () => i("i", {
79
83
  class: "i-tabler:refresh"
80
84
  }, null)
81
- }), r(c, {
85
+ }), i(c, {
82
86
  type: "primary"
83
87
  }, {
84
88
  default: () => m("components.button.submit"),
85
- icon: () => r("i", {
89
+ icon: () => i("i", {
86
90
  class: "i-tabler:send"
87
91
  }, null)
88
92
  })])]);
@@ -91,5 +95,5 @@ const O = /* @__PURE__ */ d({
91
95
  }
92
96
  });
93
97
  export {
94
- O as DuxPageForm
98
+ q as DuxPageForm
95
99
  };
@@ -1,8 +1,9 @@
1
- import { defineComponent as d, ref as l, toRef as g, computed as x, createVNode as n } from "vue";
2
- import { useI18n as y, useExtendForm as S } from "@duxweb/dvha-core";
3
- import { useMessage as b, NTabs as p } from "naive-ui";
1
+ import { defineComponent as d, ref as l, toRef as g, computed as x, createVNode as r } from "vue";
2
+ import { useI18n as p, useExtendForm as y } from "@duxweb/dvha-core";
3
+ import { useMessage as S, NTabs as b } from "naive-ui";
4
4
  import "@overlastic/vue";
5
5
  import "vue-router";
6
+ import "vue-echarts";
6
7
  import "clsx";
7
8
  import "jinrishici";
8
9
  import "lodash-es";
@@ -12,10 +13,13 @@ import "@duxweb/dvha-naiveui";
12
13
  import "pinia";
13
14
  import "@vee-validate/i18n";
14
15
  import "colorizr";
16
+ import "echarts";
17
+ import "@ant-design/colors";
18
+ import "@unocss/preset-typography";
15
19
  import "vue-command-palette";
16
20
  import { DuxPage as v } from "../../pages/page.js";
17
21
  import "../../pages/page404.js";
18
- const U = /* @__PURE__ */ d({
22
+ const A = /* @__PURE__ */ d({
19
23
  name: "DuxSettingForm",
20
24
  props: {
21
25
  id: {
@@ -52,20 +56,20 @@ const U = /* @__PURE__ */ d({
52
56
  setup(e, {
53
57
  slots: t
54
58
  }) {
55
- const u = l(e.defaultTab), o = g(e, "data", {}), {
56
- t: r
57
- } = y(), i = b(), c = S({
59
+ const i = l(e.defaultTab), c = g(e, "data", {}), {
60
+ t: n
61
+ } = p(), u = S(), o = y({
58
62
  id: e.id,
59
63
  path: e.path,
60
- form: o,
64
+ form: c,
61
65
  action: e.action,
62
66
  onError: (m) => {
63
67
  var a;
64
- i.error(m.message || r("components.form.error")), (a = e.onError) == null || a.call(e, m);
68
+ u.error(m.message || n("components.form.error")), (a = e.onError) == null || a.call(e, m);
65
69
  },
66
70
  onSuccess: (m) => {
67
71
  var a;
68
- i.success(r("components.form.success")), (a = e.onSuccess) == null || a.call(e, m);
72
+ u.success(n("components.form.success")), (a = e.onSuccess) == null || a.call(e, m);
69
73
  }
70
74
  }), f = x(() => {
71
75
  switch (e.size) {
@@ -78,28 +82,28 @@ const U = /* @__PURE__ */ d({
78
82
  return "lg:max-w-2xl";
79
83
  }
80
84
  });
81
- return () => n(v, null, {
85
+ return () => r(v, null, {
82
86
  default: () => {
83
87
  var m;
84
- return [n("div", {
88
+ return [r("div", {
85
89
  class: `flex flex-col gap-6 w-full ${f.value} mx-auto py-4`
86
- }, [e.tabs ? n(p, {
90
+ }, [e.tabs ? r(b, {
87
91
  defaultValue: e.defaultTab,
88
- value: u.value,
92
+ value: i.value,
89
93
  onUpdateValue: (a) => {
90
- u.value = a;
94
+ i.value = a;
91
95
  },
92
96
  type: "segment"
93
97
  }, {
94
98
  default: () => {
95
99
  var a;
96
- return [(a = t == null ? void 0 : t.default) == null ? void 0 : a.call(t, c)];
100
+ return [(a = t == null ? void 0 : t.default) == null ? void 0 : a.call(t, o)];
97
101
  }
98
- }) : (m = t == null ? void 0 : t.default) == null ? void 0 : m.call(t, c)])];
102
+ }) : (m = t == null ? void 0 : t.default) == null ? void 0 : m.call(t, o)])];
99
103
  }
100
104
  });
101
105
  }
102
106
  });
103
107
  export {
104
- U as DuxSettingForm
108
+ A as DuxSettingForm
105
109
  };