@duxweb/dvha-pro 0.0.6 → 0.0.7

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,14 +1,14 @@
1
- import { useI18n as b, useManage as S, useCustomMutation as D, useDelete as C } from "@duxweb/dvha-core";
1
+ import { useI18n as x, useManage as S, useCustomMutation as D, useDelete as C } from "@duxweb/dvha-core";
2
2
  import { useMessage as I, NButton as j, NDropdown as N } from "naive-ui";
3
- import { h as s } from "vue";
3
+ import { h as r } from "vue";
4
4
  import { useRouter as $ } from "vue-router";
5
5
  import { useDialog as B } from "./dialog.js";
6
6
  import { useDrawer as E } from "./drawer.js";
7
7
  import { useModal as T } from "./modal.js";
8
8
  function U(n) {
9
- const y = T(), d = E(), f = B(), {
9
+ const y = T(), d = E(), s = B(), {
10
10
  t: c
11
- } = b(), l = I(), a = S(), u = $(), v = D({
11
+ } = x(), l = I(), a = S(), u = $(), v = D({
12
12
  onSuccess: (e) => {
13
13
  l.success(e.message || "操作成功");
14
14
  },
@@ -22,25 +22,26 @@ function U(n) {
22
22
  onError: (e) => {
23
23
  l.error(e.message || "操作失败");
24
24
  }
25
- }), g = (n == null ? void 0 : n.path) || a.getPath(), x = (e) => {
26
- var r, P;
27
- const i = c(e.item.title || "", {}, e.item.title), m = c(e.item.label || "", {}, e.item.label);
25
+ }), h = (n == null ? void 0 : n.path) || a.getPath(), b = (e) => {
26
+ var m, P;
27
+ const i = c(e.item.title || "", {}, e.item.title), f = c(e.item.label || "", {}, e.item.label);
28
28
  if (e.item.type === "modal") {
29
29
  const t = e.item;
30
30
  y.show({
31
- title: i || m,
31
+ title: i || f,
32
32
  component: t.component,
33
33
  componentProps: {
34
34
  id: e.id,
35
35
  ...t.componentProps
36
36
  },
37
- width: t.width
37
+ width: t.width,
38
+ draggable: t.draggable !== void 0 ? t.draggable : !0
38
39
  });
39
40
  }
40
41
  if (e.item.type === "drawer") {
41
42
  const t = e.item;
42
43
  d.show({
43
- title: i || m,
44
+ title: i || f,
44
45
  component: t.component,
45
46
  componentProps: {
46
47
  id: e.id,
@@ -51,43 +52,43 @@ function U(n) {
51
52
  }
52
53
  if (e.item.type === "confirm") {
53
54
  const t = e.item;
54
- f.confirm({
55
- title: i || m,
55
+ s.confirm({
56
+ title: i || f,
56
57
  content: t.content
57
- }).then((h) => {
58
+ }).then((g) => {
58
59
  var o;
59
- h && ((o = t.callback) == null || o.call(t, e.id, e.data));
60
+ g && ((o = t.callback) == null || o.call(t, e.id, e.data));
60
61
  });
61
62
  }
62
63
  if (e.item.type === "request") {
63
64
  const t = e.item;
64
- f.confirm({
65
- title: i || m,
65
+ s.confirm({
66
+ title: i || f,
66
67
  content: t.content
67
68
  }).then(() => {
68
- const h = typeof t.data == "function" ? t.data(e.id, e.data) : t.data, o = (t.method || "post").toLowerCase(), M = t.path || g;
69
+ const g = typeof t.data == "function" ? t.data(e.id, e.data) : t.data, o = (t.method || "post").toLowerCase(), M = t.path || h;
69
70
  v.mutate({
70
71
  path: M,
71
72
  method: o,
72
- payload: h
73
+ payload: g
73
74
  });
74
75
  });
75
76
  }
76
77
  if (e.item.type === "delete") {
77
78
  const t = e.item;
78
- f.confirm({
79
- title: i || m,
79
+ s.confirm({
80
+ title: i || f,
80
81
  content: t.content
81
82
  }).then(() => {
82
83
  A.mutate({
83
84
  id: e.id,
84
- path: t.path || g
85
+ path: t.path || h
85
86
  });
86
87
  });
87
88
  }
88
89
  if (e.item.type === "link") {
89
- const t = e.item, h = typeof t.path == "function" ? (r = t.path) == null ? void 0 : r.call(t, e.id, e.data) : a.getRoutePath(e.id ? `${t.path || g}${e.data === void 0 ? "" : `/${e.id}`}` : t.path || g);
90
- u.push(h);
90
+ const t = e.item, g = typeof t.path == "function" ? (m = t.path) == null ? void 0 : m.call(t, e.id, e.data) : a.getRoutePath(e.id ? `${t.path || h}${e.data === void 0 ? "" : `/${e.id}`}` : t.path || h);
91
+ u.push(g);
91
92
  }
92
93
  if (e.item.type === "callback") {
93
94
  const t = e.item;
@@ -95,27 +96,27 @@ function U(n) {
95
96
  }
96
97
  }, w = q(), k = L();
97
98
  return {
98
- target: x,
99
- renderTable: (e) => (i, m) => {
100
- const r = {
99
+ target: b,
100
+ renderTable: (e) => (i, f) => {
101
+ const m = {
101
102
  id: i[e.key || (n == null ? void 0 : n.key) || "id"],
102
103
  data: i,
103
- index: m,
104
- target: x,
104
+ index: f,
105
+ target: b,
105
106
  text: e.text !== void 0 ? e.text : (n == null ? void 0 : n.text) || !1,
106
107
  align: e.align !== void 0 ? e.align : (n == null ? void 0 : n.align) || "left"
107
108
  };
108
109
  return (e.type || (n == null ? void 0 : n.type)) === "button" ? w.render({
109
- ...r,
110
+ ...m,
110
111
  action: e || n
111
112
  }) : k.render({
112
- ...r,
113
+ ...m,
113
114
  action: e || n
114
115
  });
115
116
  },
116
117
  renderAction: (e) => {
117
118
  const i = {
118
- target: x,
119
+ target: b,
119
120
  text: e.text !== void 0 ? e.text : (n == null ? void 0 : n.text) || !1,
120
121
  align: e.align !== void 0 ? e.align : (n == null ? void 0 : n.align) || "left"
121
122
  };
@@ -132,14 +133,14 @@ function U(n) {
132
133
  function q() {
133
134
  const {
134
135
  t: n
135
- } = b();
136
+ } = x();
136
137
  return {
137
138
  render: (d) => {
138
139
  var c;
139
- const f = (c = d.action.items) == null ? void 0 : c.filter((l) => {
140
+ const s = (c = d.action.items) == null ? void 0 : c.filter((l) => {
140
141
  var a;
141
142
  return !l.show || ((a = l.show) == null ? void 0 : a.call(l, d.data, d.index));
142
- }).map((l, a) => s(j, {
143
+ }).map((l, a) => r(j, {
143
144
  key: a,
144
145
  type: l.color || l.type === "delete" ? "error" : "primary",
145
146
  text: d.text,
@@ -151,30 +152,30 @@ function q() {
151
152
  item: l
152
153
  });
153
154
  },
154
- renderIcon: l.icon ? () => s("div", {
155
+ renderIcon: l.icon ? () => r("div", {
155
156
  class: ["n-icon", l.icon]
156
157
  }) : void 0
157
158
  }, () => n(l.label || "", {}, l.label)));
158
- return s("div", {
159
+ return r("div", {
159
160
  class: ["flex gap-2 flex-wrap items-center", d.align === "right" ? "justify-end" : d.align === "center" ? "justify-center" : "justify-start"]
160
- }, f);
161
+ }, s);
161
162
  }
162
163
  };
163
164
  }
164
165
  function L() {
165
166
  const {
166
167
  t: n
167
- } = b();
168
+ } = x();
168
169
  return {
169
170
  render: (d) => {
170
171
  var c;
171
- const f = (c = d.action.items) == null ? void 0 : c.filter((l) => {
172
+ const s = (c = d.action.items) == null ? void 0 : c.filter((l) => {
172
173
  var a;
173
174
  return !l.show || ((a = l.show) == null ? void 0 : a.call(l, d.data, d.index));
174
175
  }).map((l, a) => ({
175
176
  label: n(l.label || "", {}, l.label),
176
177
  key: a,
177
- icon: l.icon ? () => s("div", {
178
+ icon: l.icon ? () => r("div", {
178
179
  class: ["n-icon", l.icon]
179
180
  }) : void 0,
180
181
  onSelect: () => {
@@ -186,20 +187,20 @@ function L() {
186
187
  });
187
188
  }
188
189
  }));
189
- return s(N, {
190
+ return r(N, {
190
191
  trigger: "click",
191
- options: f,
192
+ options: s,
192
193
  onSelect: (l, a) => {
193
194
  var u;
194
195
  (u = a == null ? void 0 : a.onSelect) == null || u.call(a);
195
196
  }
196
- }, () => [s("div", {
197
+ }, () => [r("div", {
197
198
  class: ["flex items-center", d.align === "right" ? "justify-end" : d.align === "center" ? "justify-center" : "justify-start"]
198
- }, s(j, {
199
+ }, r(j, {
199
200
  type: "default",
200
201
  text: d.text,
201
202
  secondary: !d.text,
202
- renderIcon: () => s("div", {
203
+ renderIcon: () => r("div", {
203
204
  class: ["n-icon", "i-tabler:dots-vertical"]
204
205
  })
205
206
  }))]);
@@ -1,9 +1,26 @@
1
- import { useOverlay as t } from "@duxweb/dvha-core";
2
- function i() {
3
- const e = t(), o = (r) => e.show({
4
- component: () => import("../components/dialog/dialog.js"),
5
- componentProps: r
6
- });
1
+ import { useOverlayInject as p } from "@overlastic/vue";
2
+ import "vue";
3
+ import "naive-ui";
4
+ import "vue-echarts";
5
+ import "@duxweb/dvha-core";
6
+ import "vue-router";
7
+ import "lodash-es";
8
+ import "@duxweb/dvha-naiveui";
9
+ import "@vueuse/core";
10
+ import "pinia";
11
+ import "clsx";
12
+ import "jinrishici";
13
+ import m from "../components/dialog/dialog.js";
14
+ import "vee-validate";
15
+ import "@vee-validate/i18n";
16
+ import "colorizr";
17
+ import "echarts";
18
+ import "@ant-design/colors";
19
+ import "@unocss/preset-typography";
20
+ import "vue-command-palette";
21
+ import "../pages/page404.js";
22
+ function C() {
23
+ const t = p(m), o = (r) => t(r);
7
24
  return {
8
25
  confirm: (r) => o({
9
26
  ...r,
@@ -28,5 +45,5 @@ function i() {
28
45
  };
29
46
  }
30
47
  export {
31
- i as useDialog
48
+ C as useDialog
32
49
  };
@@ -1,26 +1,30 @@
1
1
  import { useOverlayInject as t } from "@overlastic/vue";
2
2
  import "vue";
3
3
  import "naive-ui";
4
- import "clsx";
5
- import "jinrishici";
6
- import "lodash-es";
7
- import m from "../components/drawer/drawer.js";
8
- import "@vueuse/core";
9
- import "vee-validate";
4
+ import "vue-echarts";
10
5
  import "@duxweb/dvha-core";
11
6
  import "vue-router";
7
+ import "lodash-es";
12
8
  import "@duxweb/dvha-naiveui";
9
+ import "@vueuse/core";
13
10
  import "pinia";
11
+ import "clsx";
12
+ import "jinrishici";
13
+ import m from "../components/drawer/drawer.js";
14
+ import "vee-validate";
14
15
  import "@vee-validate/i18n";
15
16
  import "colorizr";
17
+ import "echarts";
18
+ import "@ant-design/colors";
19
+ import "@unocss/preset-typography";
16
20
  import "vue-command-palette";
17
21
  import "../pages/page404.js";
18
- function O() {
22
+ function k() {
19
23
  const r = t(m);
20
24
  return {
21
25
  show: (o) => r(o)
22
26
  };
23
27
  }
24
28
  export {
25
- O as useDrawer
29
+ k as useDrawer
26
30
  };