@duxweb/dvha-pro 1.0.23 → 1.0.24

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 (152) hide show
  1. package/dist/cjs/components/card/card.cjs +1 -1
  2. package/dist/cjs/components/card/store.cjs +1 -1
  3. package/dist/cjs/components/carousel/carousel.cjs +1 -1
  4. package/dist/cjs/components/crop/imageCrop.cjs +1 -1
  5. package/dist/cjs/components/crop/imageCropModal.cjs +1 -1
  6. package/dist/cjs/components/dashboard/hello.cjs +1 -1
  7. package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
  8. package/dist/cjs/components/dashboard/quick.cjs +1 -1
  9. package/dist/cjs/components/data/dynamicData.cjs +1 -1
  10. package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
  11. package/dist/cjs/components/data/selectModal.cjs +1 -1
  12. package/dist/cjs/components/dialog/dialog.cjs +1 -1
  13. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  14. package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
  15. package/dist/cjs/components/editor/aiEditor.cjs +1 -1
  16. package/dist/cjs/components/form/drawerForm.cjs +1 -1
  17. package/dist/cjs/components/form/formItem.cjs +1 -1
  18. package/dist/cjs/components/form/formLayout.cjs +1 -1
  19. package/dist/cjs/components/form/modalForm.cjs +1 -1
  20. package/dist/cjs/components/form/pageForm.cjs +1 -1
  21. package/dist/cjs/components/form/settingForm.cjs +1 -1
  22. package/dist/cjs/components/icon/iconPicker.cjs +1 -1
  23. package/dist/cjs/components/layout/filter.cjs +1 -1
  24. package/dist/cjs/components/layout/filterLayout.cjs +1 -1
  25. package/dist/cjs/components/layout/list.cjs +1 -1
  26. package/dist/cjs/components/layout/table.cjs +1 -1
  27. package/dist/cjs/components/layout/tools.cjs +1 -1
  28. package/dist/cjs/components/list/card.cjs +1 -1
  29. package/dist/cjs/components/list/list.cjs +1 -1
  30. package/dist/cjs/components/media/media.cjs +1 -1
  31. package/dist/cjs/components/modal/modal.cjs +1 -1
  32. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  33. package/dist/cjs/components/modal/modalTab.cjs +1 -1
  34. package/dist/cjs/components/panel/alert.cjs +1 -1
  35. package/dist/cjs/components/panel/collapse.cjs +1 -1
  36. package/dist/cjs/components/panel/setting.cjs +1 -1
  37. package/dist/cjs/components/select/cardSelect.cjs +1 -1
  38. package/dist/cjs/components/status/listEmpty.cjs +1 -1
  39. package/dist/cjs/components/table/tablePage.cjs +1 -1
  40. package/dist/cjs/components/tree/treeFilter.cjs +1 -1
  41. package/dist/cjs/components/upload/config.cjs +1 -1
  42. package/dist/cjs/components/upload/file.cjs +1 -1
  43. package/dist/cjs/components/upload/image.cjs +1 -1
  44. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  45. package/dist/cjs/components/upload/manager.cjs +1 -1
  46. package/dist/cjs/components/widget/connect.cjs +1 -1
  47. package/dist/cjs/dvha-pro.css +1 -1
  48. package/dist/cjs/hooks/action.cjs +1 -1
  49. package/dist/cjs/hooks/download.cjs +1 -1
  50. package/dist/cjs/hooks/echart.cjs +1 -1
  51. package/dist/cjs/hooks/image.cjs +1 -1
  52. package/dist/cjs/hooks/level.cjs +1 -1
  53. package/dist/cjs/hooks/table/color.cjs +1 -0
  54. package/dist/cjs/hooks/table/column.cjs +1 -1
  55. package/dist/cjs/hooks/table/image.cjs +1 -1
  56. package/dist/cjs/hooks/table/input.cjs +1 -1
  57. package/dist/cjs/hooks/table/map.cjs +1 -1
  58. package/dist/cjs/hooks/table/status.cjs +1 -1
  59. package/dist/cjs/hooks/table/switch.cjs +1 -1
  60. package/dist/cjs/hooks/table.cjs +1 -1
  61. package/dist/cjs/index.cjs +1 -1
  62. package/dist/cjs/pages/layout/global.cjs +1 -1
  63. package/dist/cjs/pages/layout/tab.cjs +1 -1
  64. package/dist/cjs/pages/login.cjs +1 -1
  65. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  66. package/dist/cjs/pages/menu/button.cjs +1 -1
  67. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  68. package/dist/cjs/pages/page.cjs +1 -1
  69. package/dist/cjs/pages/pageStatus.cjs +1 -1
  70. package/dist/cjs/stores/ui.cjs +1 -1
  71. package/dist/cjs/theme/uno.css.cjs +2 -1
  72. package/dist/esm/components/card/card.js +24 -27
  73. package/dist/esm/components/card/store.js +33 -39
  74. package/dist/esm/components/carousel/carousel.js +16 -19
  75. package/dist/esm/components/crop/imageCrop.js +32 -35
  76. package/dist/esm/components/crop/imageCropModal.js +36 -37
  77. package/dist/esm/components/dashboard/hello.js +27 -30
  78. package/dist/esm/components/dashboard/helloBig.js +328 -331
  79. package/dist/esm/components/dashboard/quick.js +30 -33
  80. package/dist/esm/components/data/dynamicData.js +86 -98
  81. package/dist/esm/components/data/dynamicSelect.js +29 -31
  82. package/dist/esm/components/data/selectModal.js +45 -49
  83. package/dist/esm/components/dialog/dialog.js +54 -55
  84. package/dist/esm/components/drawer/drawer.js +23 -23
  85. package/dist/esm/components/drawer/drawerPage.js +39 -49
  86. package/dist/esm/components/editor/aiEditor.js +64 -70
  87. package/dist/esm/components/form/drawerForm.js +48 -48
  88. package/dist/esm/components/form/formItem.js +45 -51
  89. package/dist/esm/components/form/formLayout.js +7 -10
  90. package/dist/esm/components/form/modalForm.js +50 -50
  91. package/dist/esm/components/form/pageForm.js +47 -50
  92. package/dist/esm/components/form/settingForm.js +34 -37
  93. package/dist/esm/components/icon/iconPicker.js +54 -58
  94. package/dist/esm/components/layout/filter.js +13 -16
  95. package/dist/esm/components/layout/filterLayout.js +7 -10
  96. package/dist/esm/components/layout/list.js +299 -326
  97. package/dist/esm/components/layout/table.js +268 -283
  98. package/dist/esm/components/layout/tools.js +38 -41
  99. package/dist/esm/components/list/card.js +35 -38
  100. package/dist/esm/components/list/list.js +15 -18
  101. package/dist/esm/components/media/media.js +35 -36
  102. package/dist/esm/components/modal/modal.js +10 -10
  103. package/dist/esm/components/modal/modalPage.js +32 -36
  104. package/dist/esm/components/modal/modalTab.js +39 -45
  105. package/dist/esm/components/panel/alert.js +19 -22
  106. package/dist/esm/components/panel/collapse.js +33 -36
  107. package/dist/esm/components/panel/setting.js +25 -31
  108. package/dist/esm/components/select/cardSelect.js +27 -28
  109. package/dist/esm/components/status/listEmpty.js +13 -13
  110. package/dist/esm/components/table/tablePage.js +25 -25
  111. package/dist/esm/components/tree/treeFilter.js +137 -147
  112. package/dist/esm/components/upload/config.js +15 -27
  113. package/dist/esm/components/upload/file.js +90 -94
  114. package/dist/esm/components/upload/image.js +116 -123
  115. package/dist/esm/components/upload/manage/item.js +44 -47
  116. package/dist/esm/components/upload/manager.js +190 -207
  117. package/dist/esm/components/widget/connect.js +103 -106
  118. package/dist/esm/dvha-pro.css +1 -1
  119. package/dist/esm/hooks/action.js +115 -131
  120. package/dist/esm/hooks/download.js +55 -56
  121. package/dist/esm/hooks/echart.js +156 -179
  122. package/dist/esm/hooks/image.js +14 -15
  123. package/dist/esm/hooks/level.js +7 -7
  124. package/dist/esm/hooks/table/color.js +19 -0
  125. package/dist/esm/hooks/table/column.js +25 -23
  126. package/dist/esm/hooks/table/image.js +2 -2
  127. package/dist/esm/hooks/table/input.js +28 -28
  128. package/dist/esm/hooks/table/map.js +7 -7
  129. package/dist/esm/hooks/table/status.js +8 -9
  130. package/dist/esm/hooks/table/switch.js +19 -19
  131. package/dist/esm/hooks/table.js +27 -31
  132. package/dist/esm/index.js +167 -165
  133. package/dist/esm/pages/layout/global.js +12 -15
  134. package/dist/esm/pages/layout/tab.js +58 -71
  135. package/dist/esm/pages/login.js +81 -85
  136. package/dist/esm/pages/menu/avatar.js +136 -149
  137. package/dist/esm/pages/menu/button.js +16 -20
  138. package/dist/esm/pages/menu/cmd.js +68 -74
  139. package/dist/esm/pages/page.js +21 -25
  140. package/dist/esm/pages/pageStatus.js +21 -24
  141. package/dist/esm/stores/ui.js +15 -15
  142. package/dist/esm/theme/uno.css.js +2 -1
  143. package/dist/types/components/form/drawerForm.d.ts +6 -0
  144. package/dist/types/components/form/modalForm.d.ts +6 -0
  145. package/dist/types/components/form/pageForm.d.ts +6 -0
  146. package/dist/types/components/form/settingForm.d.ts +6 -0
  147. package/dist/types/components/layout/table.d.ts +9 -0
  148. package/dist/types/components/table/tablePage.d.ts +9 -0
  149. package/dist/types/hooks/table/color.d.ts +13 -0
  150. package/dist/types/hooks/table/column.d.ts +1 -0
  151. package/dist/types/hooks/table/index.d.ts +1 -0
  152. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
- import { defineComponent as u, createVNode as r } from "vue";
1
+ import { defineComponent as l, createVNode as t } from "vue";
2
2
  import o from "clsx";
3
- import { ceil as s } from "lodash-es";
4
- const f = /* @__PURE__ */ u({
3
+ import { ceil as a } from "lodash-es";
4
+ const u = /* @__PURE__ */ l({
5
5
  name: "DuxDashboardQuickItem",
6
6
  props: {
7
7
  icon: String,
@@ -9,21 +9,21 @@ const f = /* @__PURE__ */ u({
9
9
  color: String,
10
10
  onClick: Function
11
11
  },
12
- setup(c) {
13
- return () => r("div", {
12
+ setup(e) {
13
+ return () => t("div", {
14
14
  class: "flex flex-col justify-center items-center "
15
- }, [r("div", {
15
+ }, [t("div", {
16
16
  class: "flex flex-col gap-1 justify-center items-center p-2 pb-1 hover:bg-elevated cursor-pointer",
17
- onClick: c == null ? void 0 : c.onClick
18
- }, [r("div", {
19
- class: o(["p-1 rounded flex justify-center items-center text-white", `bg-${c.color || "primary"}`])
20
- }, [r("div", {
21
- class: o(["size-7", c.icon])
22
- }, null)]), r("div", {
17
+ onClick: e?.onClick
18
+ }, [t("div", {
19
+ class: o(["p-1 rounded flex justify-center items-center text-white", `bg-${e.color || "primary"}`])
20
+ }, [t("div", {
21
+ class: o(["size-7", e.icon])
22
+ }, null)]), t("div", {
23
23
  class: "text-muted"
24
- }, [c.title])])]);
24
+ }, [e.title])])]);
25
25
  }
26
- }), b = /* @__PURE__ */ u({
26
+ }), x = /* @__PURE__ */ l({
27
27
  name: "DuxDashboardQuick",
28
28
  props: {
29
29
  data: Array,
@@ -32,28 +32,25 @@ const f = /* @__PURE__ */ u({
32
32
  default: 6
33
33
  }
34
34
  },
35
- setup(c, {
35
+ setup(e, {
36
36
  slots: n
37
37
  }) {
38
- const l = ["primary", "info", "success", "warning", "error"];
39
- return () => {
40
- var t, i;
41
- return r("div", {
42
- class: o(["grid gap-2", `grid-cols-${s(c.col / 2)}`, `xl:grid-cols-${c.col}`])
43
- }, [(t = c.data) == null ? void 0 : t.map((e, a) => {
44
- const d = l[a % l.length];
45
- return r(f, {
46
- icon: e == null ? void 0 : e.icon,
47
- title: e == null ? void 0 : e.title,
48
- color: d,
49
- onClick: e == null ? void 0 : e.onClick,
50
- key: a
51
- }, null);
52
- }), (i = n.default) == null ? void 0 : i.call(n)]);
53
- };
38
+ const r = ["primary", "info", "success", "warning", "error"];
39
+ return () => t("div", {
40
+ class: o(["grid gap-2", `grid-cols-${a(e.col / 2)}`, `xl:grid-cols-${e.col}`])
41
+ }, [e.data?.map((c, i) => {
42
+ const s = r[i % r.length];
43
+ return t(u, {
44
+ icon: c?.icon,
45
+ title: c?.title,
46
+ color: s,
47
+ onClick: c?.onClick,
48
+ key: i
49
+ }, null);
50
+ }), n.default?.()]);
54
51
  }
55
52
  });
56
53
  export {
57
- b as DuxDashboardQuick,
58
- f as DuxDashboardQuickItem
54
+ x as DuxDashboardQuick,
55
+ u as DuxDashboardQuickItem
59
56
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as h, computed as A, createVNode as e, mergeProps as b, h as k } from "vue";
2
- import { useJsonSchema as g } from "@duxweb/dvha-core";
3
- import { useVModel as w } from "@vueuse/core";
4
- import { NTable as C, NButton as d } from "naive-ui";
5
- import { VueDraggable as D } from "vue-draggable-plus";
6
- import { DuxBlockEmpty as V } from "../status/blockEmpty.js";
7
- const E = /* @__PURE__ */ h({
1
+ import { defineComponent as m, computed as y, createVNode as e, mergeProps as v, h as f } from "vue";
2
+ import { useJsonSchema as h } from "@duxweb/dvha-core";
3
+ import { useVModel as A } from "@vueuse/core";
4
+ import { NTable as b, NButton as c } from "naive-ui";
5
+ import { VueDraggable as k } from "vue-draggable-plus";
6
+ import { DuxBlockEmpty as g } from "../status/blockEmpty.js";
7
+ const B = /* @__PURE__ */ m({
8
8
  name: "DuxDynamicData",
9
9
  props: {
10
10
  createAction: {
@@ -28,31 +28,29 @@ const E = /* @__PURE__ */ h({
28
28
  }
29
29
  },
30
30
  setup(t, {
31
- emit: s
31
+ emit: o
32
32
  }) {
33
- const l = w(t, "value", s, {
33
+ const a = A(t, "value", o, {
34
34
  passive: !0,
35
35
  defaultValue: t.defaultValue || [],
36
36
  deep: !0
37
37
  }), {
38
- renderAsync: m
39
- } = g(), y = (n) => {
40
- var u;
41
- const r = (u = l.value) == null ? void 0 : u[0][n], a = [...l.value || []].map((i) => ({
42
- ...i,
43
- [n]: r
38
+ renderAsync: i
39
+ } = h(), d = (l) => {
40
+ const u = a.value?.[0][l], n = [...a.value || []].map((r) => ({
41
+ ...r,
42
+ [l]: u
44
43
  }));
45
- l.value = [...a];
46
- }, v = A(() => {
47
- var r;
48
- let n = ((r = t.columns) == null ? void 0 : r.length) || 0;
49
- return (t.createAction || t.deleteAction) && (n += 1), n;
44
+ a.value = [...n];
45
+ }, s = y(() => {
46
+ let l = t.columns?.length || 0;
47
+ return (t.createAction || t.deleteAction) && (l += 1), l;
50
48
  });
51
- return () => e(D, b({
52
- modelValue: l.value
49
+ return () => e(k, v({
50
+ modelValue: a.value
53
51
  }, {
54
- "onUpdate:modelValue": (n) => {
55
- l.value = n;
52
+ "onUpdate:modelValue": (l) => {
53
+ a.value = l;
56
54
  }
57
55
  }, {
58
56
  handle: ".sort-handle",
@@ -61,85 +59,75 @@ const E = /* @__PURE__ */ h({
61
59
  }), {
62
60
  default: () => [e("div", {
63
61
  class: "overflow-auto w-full"
64
- }, [e(C, {
62
+ }, [e(b, {
65
63
  class: "table-fixed w-full"
66
64
  }, {
67
- default: () => {
68
- var n, r;
69
- return [e("thead", null, [e("tr", null, [e("th", {
70
- style: {
71
- width: "40px"
72
- }
73
- }, null), (n = t.columns) == null ? void 0 : n.map((a, u) => e("th", {
74
- key: u,
75
- style: {
76
- width: `${a.width}px`
77
- }
78
- }, [e("div", {
79
- class: "flex items-center justify-between"
80
- }, [e("div", null, [a.title]), a.copy && e("div", null, [e(d, {
81
- onClick: () => {
82
- y(a.key);
83
- },
84
- renderIcon: () => e("div", {
85
- class: "i-tabler:pencil-down t-icon"
86
- }, null),
87
- text: !0,
88
- type: "primary"
89
- }, null)])])])), (t.createAction || t.deleteAction) && e("th", {
90
- class: "w-15"
91
- }, [t.createAction && e(d, {
92
- tertiary: !0,
93
- type: "primary",
94
- circle: !0,
95
- renderIcon: () => e("div", {
96
- class: "i-tabler:plus h-4 w-4"
97
- }, null),
98
- onClick: () => {
99
- var a, u;
100
- t != null && t.onCreate ? t.onCreate() : (l.value || (l.value = []), (u = l.value) == null || u.push(((a = t == null ? void 0 : t.createCallback) == null ? void 0 : a.call(t, l.value)) || {}));
101
- }
102
- }, null)])])]), e("tbody", {
103
- class: "sort-target"
104
- }, [l.value && ((r = l.value) == null ? void 0 : r.length) > 0 ? l.value.map((a, u) => {
105
- var i;
106
- return e("tr", {
107
- key: u
108
- }, [e("td", null, [e("div", {
109
- class: "sort-handle i-tabler:grid-dots size-4 cursor-move"
110
- }, null)]), (i = t.columns) == null ? void 0 : i.map((c, f) => {
111
- var o;
112
- return e("td", {
113
- key: f
114
- }, [c.schema ? k(m({
115
- data: Array.isArray(c.schema) ? c.schema : [c.schema],
116
- context: {
117
- rowIndex: u,
118
- model: l.value,
119
- row: a
120
- }
121
- })) : ((o = c.render) == null ? void 0 : o.call(c, a, u)) || a[c.key]]);
122
- }), (t.createAction || t.deleteAction) && e("td", {
123
- class: "w-15"
124
- }, [t.deleteAction && e(d, {
125
- tertiary: !0,
126
- type: "error",
127
- circle: !0,
128
- renderIcon: () => e("div", {
129
- class: "i-tabler:trash h-4 w-4"
130
- }, null),
131
- onClick: () => {
132
- l.value.splice(u, 1);
133
- }
134
- }, null)])]);
135
- }) : e("tr", null, [e("td", {
136
- colspan: v.value
137
- }, [e(V, null, null)])])])];
138
- }
65
+ default: () => [e("thead", null, [e("tr", null, [e("th", {
66
+ style: {
67
+ width: "40px"
68
+ }
69
+ }, null), t.columns?.map((l, u) => e("th", {
70
+ key: u,
71
+ style: {
72
+ width: `${l.width}px`
73
+ }
74
+ }, [e("div", {
75
+ class: "flex items-center justify-between"
76
+ }, [e("div", null, [l.title]), l.copy && e("div", null, [e(c, {
77
+ onClick: () => {
78
+ d(l.key);
79
+ },
80
+ renderIcon: () => e("div", {
81
+ class: "i-tabler:pencil-down t-icon"
82
+ }, null),
83
+ text: !0,
84
+ type: "primary"
85
+ }, null)])])])), (t.createAction || t.deleteAction) && e("th", {
86
+ class: "w-15"
87
+ }, [t.createAction && e(c, {
88
+ tertiary: !0,
89
+ type: "primary",
90
+ circle: !0,
91
+ renderIcon: () => e("div", {
92
+ class: "i-tabler:plus h-4 w-4"
93
+ }, null),
94
+ onClick: () => {
95
+ t?.onCreate ? t.onCreate() : (a.value || (a.value = []), a.value?.push(t?.createCallback?.(a.value) || {}));
96
+ }
97
+ }, null)])])]), e("tbody", {
98
+ class: "sort-target"
99
+ }, [a.value && a.value?.length > 0 ? a.value.map((l, u) => e("tr", {
100
+ key: u
101
+ }, [e("td", null, [e("div", {
102
+ class: "sort-handle i-tabler:grid-dots size-4 cursor-move"
103
+ }, null)]), t.columns?.map((n, r) => e("td", {
104
+ key: r
105
+ }, [n.schema ? f(i({
106
+ data: Array.isArray(n.schema) ? n.schema : [n.schema],
107
+ context: {
108
+ rowIndex: u,
109
+ model: a.value,
110
+ row: l
111
+ }
112
+ })) : n.render?.(l, u) || l[n.key]])), (t.createAction || t.deleteAction) && e("td", {
113
+ class: "w-15"
114
+ }, [t.deleteAction && e(c, {
115
+ tertiary: !0,
116
+ type: "error",
117
+ circle: !0,
118
+ renderIcon: () => e("div", {
119
+ class: "i-tabler:trash h-4 w-4"
120
+ }, null),
121
+ onClick: () => {
122
+ a.value.splice(u, 1);
123
+ }
124
+ }, null)])])) : e("tr", null, [e("td", {
125
+ colspan: s.value
126
+ }, [e(g, null, null)])])])]
139
127
  })])]
140
128
  });
141
129
  }
142
130
  });
143
131
  export {
144
- E as DuxDynamicData
132
+ B as DuxDynamicData
145
133
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as y, ref as h, watch as d, createVNode as s } from "vue";
2
- import { useClient as D, useI18n as S } from "@duxweb/dvha-core";
3
- import { useVModel as K } from "@vueuse/core";
1
+ import { defineComponent as f, ref as s, watch as v, createVNode as y } from "vue";
2
+ import { useClient as d, useI18n as h } from "@duxweb/dvha-core";
3
+ import { useVModel as D } from "@vueuse/core";
4
4
  import "naive-ui";
5
5
  import "vue-router";
6
6
  import "@overlastic/vue";
@@ -9,7 +9,7 @@ import "vue-echarts";
9
9
  import "vue-cropper";
10
10
  import "jinrishici";
11
11
  import "lodash-es";
12
- import { DuxDynamicData as A } from "./dynamicData.js";
12
+ import { DuxDynamicData as S } from "./dynamicData.js";
13
13
  import "aieditor";
14
14
  import "vee-validate";
15
15
  import "@vee-validate/i18n";
@@ -38,11 +38,11 @@ import "ace-builds/src-noconflict/theme-tomorrow";
38
38
  import "ace-builds/src-noconflict/ext-searchbox";
39
39
  import "ace-builds/src-noconflict/ext-language_tools";
40
40
  import "ace-builds/src-noconflict/mode-snippets";
41
- import { useModal as C } from "../../hooks/modal.js";
41
+ import { useModal as w } from "../../hooks/modal.js";
42
42
  import "dayjs";
43
43
  import "@tanstack/vue-query";
44
44
  import "pinia";
45
- const vt = /* @__PURE__ */ y({
45
+ const ct = /* @__PURE__ */ f({
46
46
  name: "DuxDynamicSelect",
47
47
  props: {
48
48
  rowKey: {
@@ -65,40 +65,38 @@ const vt = /* @__PURE__ */ y({
65
65
  }
66
66
  },
67
67
  setup(t, {
68
- emit: p
68
+ emit: l
69
69
  }) {
70
- const e = K(t, "value", p, {
70
+ const e = D(t, "value", l, {
71
71
  passive: !0,
72
72
  defaultValue: t.defaultValue,
73
73
  deep: !0
74
- }), n = C(), c = D(), {
75
- t: f
76
- } = S(), i = h(!0);
77
- return d([e, i], () => {
78
- var r;
74
+ }), u = w(), p = d(), {
75
+ t: n
76
+ } = h(), i = s(!0);
77
+ return v([e, i], () => {
79
78
  if (!i.value || !e.value || e.value.length === 0)
80
79
  return;
81
- const o = ((r = e.value) == null ? void 0 : r.map((m) => m[t.rowKey])) || [];
82
- c.request({
80
+ const r = e.value?.map((o) => o[t.rowKey]) || [];
81
+ p.request({
83
82
  path: t.path,
84
83
  query: {
85
- ids: (o == null ? void 0 : o.join(",")) || ""
84
+ ids: r?.join(",") || ""
86
85
  }
87
- }).then((m) => {
88
- var l;
89
- i.value = !1, (l = m == null ? void 0 : m.data) == null || l.forEach((a, u) => {
90
- e.value.some((v) => v[t.rowKey] === a[t.rowKey]) ? e.value[u] = {
91
- ...e.value[u],
92
- ...a
93
- } : e.value.push(a);
86
+ }).then((o) => {
87
+ i.value = !1, o?.data?.forEach((m, a) => {
88
+ e.value.some((c) => c[t.rowKey] === m[t.rowKey]) ? e.value[a] = {
89
+ ...e.value[a],
90
+ ...m
91
+ } : e.value.push(m);
94
92
  });
95
93
  });
96
- }), () => s(A, {
94
+ }), () => y(S, {
97
95
  value: e.value,
98
- "onUpdate:value": (o) => e.value = o,
96
+ "onUpdate:value": (r) => e.value = r,
99
97
  columns: t.columns,
100
98
  onCreate: () => {
101
- n.show({
99
+ u.show({
102
100
  component: () => import("./selectModal.js"),
103
101
  componentProps: {
104
102
  path: t.path,
@@ -106,10 +104,10 @@ const vt = /* @__PURE__ */ y({
106
104
  filterSchema: t.filterSchema
107
105
  },
108
106
  width: 1e3,
109
- title: f("buttons.select")
110
- }).then((o) => {
111
- i.value = !1, o == null || o.forEach((r) => {
112
- e.value.some((m) => m[t.rowKey] === r[t.rowKey]) || e.value.push(r);
107
+ title: n("buttons.select")
108
+ }).then((r) => {
109
+ i.value = !1, r?.forEach((o) => {
110
+ e.value.some((m) => m[t.rowKey] === o[t.rowKey]) || e.value.push(o);
113
111
  });
114
112
  });
115
113
  }
@@ -117,5 +115,5 @@ const vt = /* @__PURE__ */ y({
117
115
  }
118
116
  });
119
117
  export {
120
- vt as DuxDynamicSelect
118
+ ct as DuxDynamicSelect
121
119
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as h, computed as C, ref as m, watch as b, createVNode as i, Fragment as x, h as w, mergeProps as z, isVNode as P } from "vue";
2
- import { useI18n as j, useJsonSchema as k } from "@duxweb/dvha-core";
3
- import { NButton as p, NDataTable as K } from "naive-ui";
1
+ import { defineComponent as y, computed as h, ref as n, watch as C, createVNode as o, Fragment as b, h as x, mergeProps as w, isVNode as z } from "vue";
2
+ import { useI18n as P, useJsonSchema as j } from "@duxweb/dvha-core";
3
+ import { NButton as l, NDataTable as k } from "naive-ui";
4
4
  import "vue-router";
5
5
  import "@overlastic/vue";
6
6
  import "clsx";
7
7
  import "vue-echarts";
8
8
  import "@vueuse/core";
9
9
  import "vue-cropper";
10
- import N from "../modal/modalPage.js";
10
+ import K from "../modal/modalPage.js";
11
11
  import "jinrishici";
12
12
  import "lodash-es";
13
13
  import "vue-draggable-plus";
@@ -40,12 +40,12 @@ import "ace-builds/src-noconflict/ext-language_tools";
40
40
  import "ace-builds/src-noconflict/mode-snippets";
41
41
  import "dayjs";
42
42
  import "@tanstack/vue-query";
43
- import { useTable as D } from "../../hooks/table.js";
43
+ import { useTable as N } from "../../hooks/table.js";
44
44
  import "pinia";
45
- function u(t) {
46
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !P(t);
45
+ function c(t) {
46
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !z(t);
47
47
  }
48
- const bt = /* @__PURE__ */ h({
48
+ const Ct = /* @__PURE__ */ y({
49
49
  name: "Select",
50
50
  props: {
51
51
  path: String,
@@ -62,80 +62,76 @@ const bt = /* @__PURE__ */ h({
62
62
  },
63
63
  setup(t) {
64
64
  const {
65
- t: n
66
- } = j(), f = C(() => [{
65
+ t: a
66
+ } = P(), u = h(() => [{
67
67
  type: "selection",
68
68
  fixed: "left"
69
- }, ...t.columns || []]), l = m({}), a = m({
69
+ }, ...t.columns || []]), m = n({}), i = n({
70
70
  page: 1,
71
71
  pageSize: 10
72
72
  }), {
73
- table: d,
74
- list: g,
75
- pageCount: s,
76
- pageSizes: S,
77
- checkeds: v
78
- } = D({
73
+ table: s,
74
+ list: f,
75
+ pageCount: d,
76
+ pageSizes: g,
77
+ checkeds: S
78
+ } = N({
79
79
  path: t.path || "",
80
- columns: f.value || [],
81
- filters: l,
82
- pagination: a.value
83
- }), c = m([]);
84
- b(v, (e) => {
85
- var r;
86
- c.value = (r = g.value) == null ? void 0 : r.filter((o) => e.includes(o[t.rowKey]));
80
+ columns: u.value || [],
81
+ filters: m,
82
+ pagination: i.value
83
+ }), p = n([]);
84
+ C(S, (e) => {
85
+ p.value = f.value?.filter((r) => e.includes(r[t.rowKey]));
87
86
  });
88
- const y = k({
87
+ const v = j({
89
88
  data: t.filterSchema || [],
90
89
  context: {
91
- filter: l
90
+ filter: m
92
91
  }
93
92
  });
94
- return () => i(N, {
95
- title: n("components.data.selectTitle"),
93
+ return () => o(K, {
94
+ title: a("components.data.selectTitle"),
96
95
  onClose: () => {
97
- var e;
98
- (e = t.onClose) == null || e.call(t);
96
+ t.onClose?.();
99
97
  }
100
98
  }, {
101
- default: () => i("div", {
99
+ default: () => o("div", {
102
100
  class: "flex flex-col gap-4"
103
- }, [t.filterSchema && i("div", {
101
+ }, [t.filterSchema && o("div", {
104
102
  class: "grid grid-cols-1 md:grid-cols-4 gap-2"
105
- }, [w(y.render)]), i(K, z({
103
+ }, [x(v.render)]), o(k, w({
106
104
  bordered: !1,
107
105
  maxHeight: 400,
108
106
  rowKey: (e) => e[t.rowKey]
109
- }, d.value, {
107
+ }, s.value, {
110
108
  pagination: {
111
- page: a.value.page,
112
- pageSize: a.value.pageSize,
113
- pageCount: s.value,
114
- pageSizes: S,
109
+ page: i.value.page,
110
+ pageSize: i.value.pageSize,
111
+ pageCount: d.value,
112
+ pageSizes: g,
115
113
  onUpdatePage: (e) => {
116
- a.value.page = e;
114
+ i.value.page = e;
117
115
  },
118
116
  onUpdatePageSize: (e) => {
119
- a.value.pageSize = e;
117
+ i.value.pageSize = e;
120
118
  }
121
119
  }
122
120
  }), null)]),
123
121
  footer: () => {
124
122
  let e, r;
125
- return i(x, null, [i(p, {
123
+ return o(b, null, [o(l, {
126
124
  onClick: () => {
127
- var o;
128
- (o = t.onClose) == null || o.call(t);
125
+ t.onClose?.();
129
126
  }
130
- }, u(e = n("components.button.cancel")) ? e : {
127
+ }, c(e = a("components.button.cancel")) ? e : {
131
128
  default: () => [e]
132
- }), i(p, {
129
+ }), o(l, {
133
130
  type: "primary",
134
131
  onClick: () => {
135
- var o;
136
- (o = t.onConfirm) == null || o.call(t, c.value);
132
+ t.onConfirm?.(p.value);
137
133
  }
138
- }, u(r = n("components.button.select")) ? r : {
134
+ }, c(r = a("components.button.select")) ? r : {
139
135
  default: () => [r]
140
136
  })]);
141
137
  }
@@ -143,5 +139,5 @@ const bt = /* @__PURE__ */ h({
143
139
  }
144
140
  });
145
141
  export {
146
- bt as default
142
+ Ct as default
147
143
  };