@duxweb/dvha-pro 1.0.21 → 1.0.23

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 (48) 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/code/code.cjs +1 -1
  4. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  5. package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
  6. package/dist/cjs/components/form/drawerForm.cjs +1 -0
  7. package/dist/cjs/components/form/formItem.cjs +1 -1
  8. package/dist/cjs/components/form/formLayout.cjs +1 -1
  9. package/dist/cjs/components/form/modalForm.cjs +1 -1
  10. package/dist/cjs/components/form/pageForm.cjs +1 -1
  11. package/dist/cjs/components/media/media.cjs +1 -1
  12. package/dist/cjs/components/panel/setting.cjs +1 -1
  13. package/dist/cjs/components/status/listEmpty.cjs +1 -1
  14. package/dist/cjs/components/table/table.cjs +1 -1
  15. package/dist/cjs/components/table/tablePage.cjs +1 -1
  16. package/dist/cjs/components/tree/treeFilter.cjs +1 -1
  17. package/dist/cjs/hooks/action.cjs +1 -1
  18. package/dist/cjs/index.cjs +1 -1
  19. package/dist/cjs/theme/uno.css.cjs +3 -2
  20. package/dist/esm/component.js +3 -3
  21. package/dist/esm/components/card/card.js +1 -1
  22. package/dist/esm/components/code/code.js +6 -6
  23. package/dist/esm/components/drawer/drawer.js +11 -10
  24. package/dist/esm/components/drawer/drawerPage.js +10 -10
  25. package/dist/esm/components/form/drawerForm.js +149 -0
  26. package/dist/esm/components/form/formItem.js +44 -28
  27. package/dist/esm/components/form/formLayout.js +12 -7
  28. package/dist/esm/components/form/modalForm.js +1 -1
  29. package/dist/esm/components/form/pageForm.js +1 -1
  30. package/dist/esm/components/media/media.js +4 -4
  31. package/dist/esm/components/panel/setting.js +1 -1
  32. package/dist/esm/components/status/listEmpty.js +8 -6
  33. package/dist/esm/components/table/table.js +24 -23
  34. package/dist/esm/components/table/tablePage.js +16 -15
  35. package/dist/esm/components/tree/treeFilter.js +2 -1
  36. package/dist/esm/hooks/action.js +82 -82
  37. package/dist/esm/index.js +166 -164
  38. package/dist/esm/theme/uno.css.js +3 -2
  39. package/dist/types/components/drawer/drawerPage.d.ts +1 -1
  40. package/dist/types/components/form/drawerForm.d.ts +98 -0
  41. package/dist/types/components/form/formItem.d.ts +17 -1
  42. package/dist/types/components/form/formLayout.d.ts +9 -0
  43. package/dist/types/components/form/index.d.ts +1 -0
  44. package/dist/types/components/form/modalForm.d.ts +9 -0
  45. package/dist/types/hooks/table/media.d.ts +1 -1
  46. package/dist/types/hooks/table/types.d.ts +2 -2
  47. package/dist/types/main.d.ts +1 -1
  48. package/package.json +3 -3
@@ -0,0 +1,149 @@
1
+ import { defineComponent as b, computed as C, toRef as F, createVNode as i, Fragment as x, mergeProps as D, isVNode as E } from "vue";
2
+ import { useI18n as N, useExtendForm as h } from "@duxweb/dvha-core";
3
+ import { useMessage as j, NButton as u, NScrollbar as v } from "naive-ui";
4
+ import "clsx";
5
+ import "vue-echarts";
6
+ import "vue-router";
7
+ import "@overlastic/vue";
8
+ import "dayjs";
9
+ import "mime";
10
+ import "lodash-es";
11
+ import "@tanstack/vue-query";
12
+ import "@duxweb/dvha-naiveui";
13
+ import "@vueuse/core";
14
+ import "pinia";
15
+ import "vue-cropper";
16
+ import "jinrishici";
17
+ import "vue-draggable-plus";
18
+ import { DuxDrawerPage as w } from "../drawer/drawerPage.js";
19
+ import "aieditor";
20
+ import { DuxFormLayout as l } from "./formLayout.js";
21
+ import "vee-validate";
22
+ import "@vee-validate/i18n";
23
+ import "colorizr";
24
+ import "echarts";
25
+ import "@ant-design/colors";
26
+ import "@unocss/preset-icons/browser";
27
+ import "@unocss/preset-typography";
28
+ import "unocss/preset-wind4";
29
+ import "@vee-validate/i18n/dist/locale/en.json";
30
+ import "@vee-validate/i18n/dist/locale/zh_CN.json";
31
+ import "vue-command-palette";
32
+ import "../../pages/page404.js";
33
+ import "@iconify-json/tabler/icons.json";
34
+ import "vue3-ace-editor";
35
+ import "ace-builds/src-noconflict/mode-vue";
36
+ import "ace-builds/src-noconflict/mode-javascript";
37
+ import "ace-builds/src-noconflict/mode-html";
38
+ import "ace-builds/src-noconflict/mode-json";
39
+ import "ace-builds/src-noconflict/mode-json5";
40
+ import "ace-builds/src-noconflict/theme-tomorrow_night";
41
+ import "ace-builds/src-noconflict/theme-tomorrow";
42
+ import "ace-builds/src-noconflict/ext-searchbox";
43
+ import "ace-builds/src-noconflict/ext-language_tools";
44
+ import "ace-builds/src-noconflict/mode-snippets";
45
+ function d(t) {
46
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !E(t);
47
+ }
48
+ const Nt = /* @__PURE__ */ b({
49
+ name: "DuxDrawerForm",
50
+ props: {
51
+ id: {
52
+ type: [String, Number]
53
+ },
54
+ action: {
55
+ type: String
56
+ },
57
+ path: {
58
+ type: String
59
+ },
60
+ data: {
61
+ type: Object
62
+ },
63
+ onClose: {
64
+ type: Function
65
+ },
66
+ title: {
67
+ type: String
68
+ },
69
+ onSuccess: {
70
+ type: Function
71
+ },
72
+ onError: {
73
+ type: Function
74
+ }
75
+ },
76
+ extends: l,
77
+ setup(t, {
78
+ slots: m
79
+ }) {
80
+ const {
81
+ t: r
82
+ } = N(), f = C(() => {
83
+ const {
84
+ onClose: o,
85
+ onSuccess: e,
86
+ onError: n,
87
+ action: O,
88
+ title: P,
89
+ id: _,
90
+ path: k,
91
+ data: L,
92
+ ...S
93
+ } = t;
94
+ return S;
95
+ }), p = F(t, "data", {}), c = j(), {
96
+ isLoading: a,
97
+ onSubmit: g,
98
+ onReset: s,
99
+ isEdit: y
100
+ } = h({
101
+ id: t.id,
102
+ path: t.path,
103
+ form: p,
104
+ action: t.action,
105
+ onError: (o) => {
106
+ var e;
107
+ c.error(o.message || r("components.form.error")), (e = t.onError) == null || e.call(t, o);
108
+ },
109
+ onSuccess: (o) => {
110
+ var e, n;
111
+ c.success(r("components.form.success")), (e = t.onSuccess) == null || e.call(t, o), (n = t.onClose) == null || n.call(t);
112
+ }
113
+ });
114
+ return () => i(w, {
115
+ scrollbar: !1,
116
+ title: (t == null ? void 0 : t.title) || (y.value ? r("components.form.edit") : r("components.form.create")),
117
+ onClose: t == null ? void 0 : t.onClose
118
+ }, {
119
+ default: () => i(v, null, {
120
+ default: () => [i(l, D({
121
+ class: "p-4"
122
+ }, f.value), {
123
+ default: () => {
124
+ var o;
125
+ return [(o = m == null ? void 0 : m.default) == null ? void 0 : o.call(m)];
126
+ }
127
+ })]
128
+ }),
129
+ footer: () => {
130
+ let o, e;
131
+ return i(x, null, [i(u, {
132
+ onClick: s,
133
+ loading: a.value
134
+ }, d(o = r("components.button.reset")) ? o : {
135
+ default: () => [o]
136
+ }), i(u, {
137
+ type: "primary",
138
+ loading: a.value,
139
+ onClick: () => g()
140
+ }, d(e = r("components.button.submit")) ? e : {
141
+ default: () => [e]
142
+ })]);
143
+ }
144
+ });
145
+ }
146
+ });
147
+ export {
148
+ Nt as DuxDrawerForm
149
+ };
@@ -1,7 +1,7 @@
1
- import { defineComponent as x, toRef as b, computed as r, watch as h, inject as y, createVNode as l, createTextVNode as p } from "vue";
2
- import { watchThrottled as j } from "@vueuse/core";
1
+ import { defineComponent as b, toRef as h, computed as a, watch as y, inject as q, createVNode as r, createTextVNode as j } from "vue";
2
+ import { watchThrottled as S } from "@vueuse/core";
3
3
  import { useField as w } from "vee-validate";
4
- const q = /* @__PURE__ */ x({
4
+ const F = /* @__PURE__ */ b({
5
5
  name: "DuxFormItem",
6
6
  props: {
7
7
  label: String,
@@ -10,68 +10,84 @@ const q = /* @__PURE__ */ x({
10
10
  labelPlacement: {
11
11
  type: String
12
12
  },
13
+ labelAlign: {
14
+ type: String
15
+ },
13
16
  labelWidth: {
14
17
  type: Number
15
18
  },
19
+ required: {
20
+ type: Boolean,
21
+ default: !1
22
+ },
16
23
  rule: [String, Object],
17
24
  message: [String, Object]
18
25
  },
19
26
  setup(e, {
20
27
  slots: i
21
28
  }) {
22
- const c = b(e.message), {
29
+ const c = h(e.message), f = a(() => {
30
+ var t;
31
+ return typeof e.rule == "object" ? {
32
+ ...e.rule,
33
+ required: !!e.required
34
+ } : typeof e.rule == "string" ? (t = e.rule) != null && t.includes("required") ? e.rule : e.rule ? `${e.rule}|required` : "required" : e.rule;
35
+ }), {
23
36
  errorMessage: d,
24
37
  value: m,
25
- setErrors: f,
38
+ setErrors: g,
26
39
  validate: s
27
- } = w(e.path || "", e.rule || {}, {
40
+ } = w(e.path || "", f.value || {}, {
28
41
  label: e.label
29
- }), o = r(() => e.rule ? typeof e.rule == "string" ? e.rule.includes("required") : typeof e.rule == "object" ? "required" in e.rule : !1 : !1), n = r(() => d.value && (c.value || d.value));
30
- h(n, (t) => {
31
- t && f(t);
42
+ }), v = a(() => e.required ? !0 : e.rule ? typeof e.rule == "string" ? e.rule.includes("required") : typeof e.rule == "object" ? "required" in e.rule : !1 : !1), n = a(() => d.value && (c.value || d.value));
43
+ y(n, (t) => {
44
+ t && g(t);
32
45
  }, {
33
46
  immediate: !0
34
- }), j(m, (t) => {
47
+ }), S(m, (t) => {
35
48
  t && s();
36
49
  }, {
37
50
  throttle: 300,
38
51
  deep: !0
39
52
  });
40
- const u = y("dux.form", {
53
+ const u = q("dux.form", {
41
54
  labelPlacement: "left",
55
+ labelAlign: "left",
42
56
  labelWidth: 70,
43
57
  divider: !1
44
- }), a = r(() => e.labelPlacement || u.labelPlacement), v = r(() => {
58
+ }), l = a(() => e.labelPlacement || u.labelPlacement), o = a(() => {
45
59
  let t = e.labelWidth || u.labelWidth || 70;
46
- return typeof t == "number" && (t = `${t}px`), a.value !== "left" ? "auto" : t;
47
- }), g = r(() => u.divider || a.value === "page");
60
+ return typeof t == "number" && (t = `${t}px`), l.value !== "left" ? "auto" : t;
61
+ }), x = a(() => u.divider || l.value === "page");
48
62
  return () => {
49
63
  var t;
50
- return l("div", {
51
- class: [a.value !== "top" ? "md:flex-row gap-2" : "gap-1", g.value ? "py-6" : "", a.value === "setting" ? "md:justify-between md:items-start md:gap-4" : "", a.value === "page" ? "grid grid-cols-1 lg:grid-cols-4 px-4" : "flex flex-col lg:items-center"]
52
- }, [l("div", {
53
- class: [a.value === "left" ? "flex lg:items-center" : ""],
64
+ return r("div", {
65
+ class: [l.value !== "top" ? "md:flex-row gap-2 lg:items-center" : "gap-1", x.value ? "py-6" : "", l.value === "setting" ? "md:justify-between md:items-start md:gap-4" : "", l.value === "page" ? "grid grid-cols-1 lg:grid-cols-4 px-4" : "flex flex-col"]
66
+ }, [r("div", {
67
+ class: [l.value === "left" ? "flex lg:items-center" : "", l.value === "left" && u.labelAlign === "right" ? "justify-end" : ""],
54
68
  style: {
55
- width: v.value
69
+ width: o.value
56
70
  }
57
- }, [l("div", {
71
+ }, [r("div", {
58
72
  class: "flex flex-col"
59
- }, [l("div", null, [l("span", {
73
+ }, [r("div", null, [r("span", {
60
74
  class: "relative flex items-center gap-1"
61
- }, [e.label, o.value && l("span", {
75
+ }, [e.label, v.value && r("span", {
62
76
  class: "text-error font-mono text-xs"
63
- }, [p("*")])])]), e.description && typeof e.description == "string" && l("div", {
77
+ }, [j("*")])])]), e.description && (l.value === "setting" || l.value === "page") && r("div", {
64
78
  class: "text-sm text-muted"
65
- }, [e.description])])]), l("div", {
66
- class: ["flex flex-col gap-1", a.value !== "left" ? "md:mt-1" : "", a.value === "setting" ? "flex-none md:w-50%" : "flex-1", a.value === "page" ? "col-span-3" : ""]
67
- }, [l("div", null, [(t = i == null ? void 0 : i.default) == null ? void 0 : t.call(i)]), e.description && typeof e.description != "string" && l("div", {
79
+ }, [e.description])])]), r("div", {
80
+ class: ["flex flex-col gap-1", l.value !== "left" ? "md:mt-1" : "", l.value === "setting" ? "flex-none md:w-40%" : "flex-1", l.value === "page" ? "col-span-3" : ""]
81
+ }, [r("div", {
82
+ class: l.value === "setting" ? "flex-1 lg:flex lg:justify-end" : ""
83
+ }, [(t = i == null ? void 0 : i.default) == null ? void 0 : t.call(i)]), e.description && l.value === "left" && r("div", {
68
84
  class: "text-sm text-muted"
69
- }, [e.description]), n.value && l("div", {
85
+ }, [e.description]), n.value && r("div", {
70
86
  class: "text-error"
71
87
  }, [n.value])])]);
72
88
  };
73
89
  }
74
90
  });
75
91
  export {
76
- q as DuxFormItem
92
+ F as DuxFormItem
77
93
  };
@@ -1,11 +1,15 @@
1
- import { defineComponent as d, provide as i, createVNode as t } from "vue";
2
- const m = /* @__PURE__ */ d({
1
+ import { defineComponent as i, provide as d, createVNode as t } from "vue";
2
+ const f = /* @__PURE__ */ i({
3
3
  name: "DuxFormLayout",
4
4
  props: {
5
5
  labelPlacement: {
6
6
  type: String,
7
7
  default: "left"
8
8
  },
9
+ labelAlign: {
10
+ type: String,
11
+ default: "left"
12
+ },
9
13
  labelWidth: {
10
14
  type: Number
11
15
  },
@@ -19,20 +23,21 @@ const m = /* @__PURE__ */ d({
19
23
  }
20
24
  },
21
25
  setup(e, {
22
- slots: a
26
+ slots: l
23
27
  }) {
24
- return i("dux.form", {
28
+ return d("dux.form", {
25
29
  labelPlacement: e.labelPlacement,
30
+ labelAlign: e.labelAlign,
26
31
  labelWidth: e.labelWidth,
27
32
  divider: e.divider
28
33
  }), () => {
29
- var l;
34
+ var a;
30
35
  return t("div", {
31
36
  class: ["flex ", e.divider || e.labelPlacement === "page" ? " divide-y divide-default dark:divide-gray-800" : "", e.inline ? "flex-row" : "flex-col", e.labelPlacement === "page" || e.labelPlacement === "setting" ? "container mx-auto" : "gap-4"]
32
- }, [(l = a == null ? void 0 : a.default) == null ? void 0 : l.call(a)]);
37
+ }, [(a = l == null ? void 0 : l.default) == null ? void 0 : a.call(l)]);
33
38
  };
34
39
  }
35
40
  });
36
41
  export {
37
- m as DuxFormLayout
42
+ f as DuxFormLayout
38
43
  };
@@ -17,8 +17,8 @@ import D from "../modal/modalPage.js";
17
17
  import "jinrishici";
18
18
  import "vue-draggable-plus";
19
19
  import "aieditor";
20
- import "vee-validate";
21
20
  import { DuxFormLayout as d } from "./formLayout.js";
21
+ import "vee-validate";
22
22
  import "@vee-validate/i18n";
23
23
  import "colorizr";
24
24
  import "echarts";
@@ -12,8 +12,8 @@ import "jinrishici";
12
12
  import "lodash-es";
13
13
  import "vue-draggable-plus";
14
14
  import "aieditor";
15
- import "vee-validate";
16
15
  import { DuxFormLayout as v } from "./formLayout.js";
16
+ import "vee-validate";
17
17
  import "@iconify-json/tabler/icons.json";
18
18
  import "mime";
19
19
  import "vue3-ace-editor";
@@ -29,7 +29,7 @@ const I = /* @__PURE__ */ h({
29
29
  }) {
30
30
  const c = y(() => Array.isArray(e.image) ? e.image : e.image ? [e.image] : []), t = y(() => Array.isArray(e.desc) ? e.desc : e.desc ? [e.desc] : []);
31
31
  return () => {
32
- var u, d, g, x, f, l, v;
32
+ var u, d, g, x, f, v, l;
33
33
  let r;
34
34
  return i("div", {
35
35
  class: "flex gap-2 items-center"
@@ -60,17 +60,17 @@ const I = /* @__PURE__ */ h({
60
60
  var n;
61
61
  return (n = e.onClick) == null ? void 0 : n.call(e);
62
62
  },
63
- class: b(["transition-all truncate text-default", (e == null ? void 0 : e.onClick) && "hover:text-primary cursor-pointer"])
63
+ class: b(["transition-all truncate", (e == null ? void 0 : e.onClick) && "hover:text-primary cursor-pointer"])
64
64
  }, [e.title || ((g = a.default) == null ? void 0 : g.call(a))])]), ((t == null ? void 0 : t.value.length) > 0 || a.desc) && i("div", {
65
65
  class: "text-sm text-muted flex flex-col gap-0"
66
66
  }, [(f = t == null ? void 0 : (x = t.value).map) == null ? void 0 : f.call(x, (n, m) => i("div", {
67
67
  key: m,
68
68
  class: "truncate"
69
- }, [n])), (l = a.desc) == null ? void 0 : l.call(a)])]), (e == null ? void 0 : e.extend) && i("div", {
69
+ }, [n])), (v = a.desc) == null ? void 0 : v.call(a)])]), (e == null ? void 0 : e.extend) && i("div", {
70
70
  class: "flex-none flex items-center gap-2 text-gray-7"
71
71
  }, [e == null ? void 0 : e.extend]), (a == null ? void 0 : a.extend) && i("div", {
72
72
  class: "flex-none flex items-center gap-2 text-gray-7"
73
- }, [(v = a == null ? void 0 : a.extend) == null ? void 0 : v.call(a)])]);
73
+ }, [(l = a == null ? void 0 : a.extend) == null ? void 0 : l.call(a)])]);
74
74
  };
75
75
  }
76
76
  });
@@ -29,7 +29,7 @@ const m = /* @__PURE__ */ r({
29
29
  return e("div", {
30
30
  class: "flex flex-col gap-4"
31
31
  }, [e("div", {
32
- class: "flex items-center"
32
+ class: "flex items-center px-2"
33
33
  }, [e("div", {
34
34
  class: "flex-1 flex flex-col"
35
35
  }, [e("div", {
@@ -1,7 +1,7 @@
1
- import { defineComponent as i, createVNode as e } from "vue";
2
- import { useI18n as m } from "@duxweb/dvha-core";
1
+ import { defineComponent as m, createVNode as e } from "vue";
2
+ import { useI18n as i } from "@duxweb/dvha-core";
3
3
  import { DuxDrawEmptyForm as n } from "../draw/drawEmptyForm.js";
4
- const a = /* @__PURE__ */ i({
4
+ const s = /* @__PURE__ */ m({
5
5
  name: "DuxListEmpty",
6
6
  props: {
7
7
  title: String,
@@ -11,10 +11,12 @@ const a = /* @__PURE__ */ i({
11
11
  setup(t) {
12
12
  const {
13
13
  t: l
14
- } = m();
14
+ } = i();
15
15
  return () => e("div", {
16
16
  class: "flex flex-col items-center justify-center gap-2 h-full"
17
- }, [e(n, null, null), e("div", {
17
+ }, [e(n, {
18
+ class: "max-h-120px"
19
+ }, null), e("div", {
18
20
  class: "text-lg text-default font-bold"
19
21
  }, [(t == null ? void 0 : t.title) || l("pages.empty.title")]), e("div", {
20
22
  class: "text-muted"
@@ -22,5 +24,5 @@ const a = /* @__PURE__ */ i({
22
24
  }
23
25
  });
24
26
  export {
25
- a as DuxListEmpty
27
+ s as DuxListEmpty
26
28
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as u, computed as f, toRef as c, createVNode as o, mergeProps as e } from "vue";
2
- import { useI18n as d } from "@duxweb/dvha-core";
1
+ import { defineComponent as u, computed as f, toRef as d, createVNode as i, mergeProps as e } from "vue";
2
+ import { useI18n as c } from "@duxweb/dvha-core";
3
3
  import { useWindowSize as b } from "@vueuse/core";
4
4
  import { NDataTable as m, NPagination as g } from "naive-ui";
5
5
  import "vue-router";
@@ -61,46 +61,47 @@ const ft = /* @__PURE__ */ u({
61
61
  }
62
62
  },
63
63
  extends: m,
64
- setup(t) {
64
+ setup(o) {
65
65
  const p = f(() => {
66
66
  const {
67
- path: r,
68
- filter: v,
69
- columns: h,
67
+ path: t,
68
+ filter: h,
69
+ columns: v,
70
70
  pagination: D,
71
71
  ...s
72
- } = t;
72
+ } = o;
73
73
  return s;
74
- }), a = c(t.filter || {}), i = y({
75
- path: t.path,
76
- filters: a.value,
77
- columns: t.columns || [],
78
- pagination: t.pagination
74
+ }), n = d(o.filter || {}), r = y({
75
+ path: o.path,
76
+ filters: n.value,
77
+ columns: o.columns || [],
78
+ pagination: o.pagination
79
79
  }), {
80
80
  width: l
81
81
  } = b(), {
82
- t: n
83
- } = d();
84
- return () => o("div", {
82
+ t: a
83
+ } = c();
84
+ return () => i("div", {
85
85
  class: "flex flex-col gap-2"
86
- }, [o(m, e(p.value, i.table.value, {
86
+ }, [i(m, e(p.value, r.table.value, {
87
87
  class: "flex-1 min-h-0",
88
88
  minHeight: 200,
89
89
  tableLayout: "fixed",
90
90
  flexHeight: !0,
91
- rowKey: (r) => r.id,
92
- bordered: !1
91
+ rowKey: (t) => t.id,
92
+ bordered: !1,
93
+ renderCell: (t) => t == null || t === "" ? "-" : t
93
94
  }), {
94
- empty: () => o(x, {
95
+ empty: () => i(x, {
95
96
  bordered: !1
96
97
  }, null)
97
- }), t.pagination && o("div", {
98
+ }), o.pagination && i("div", {
98
99
  class: "flex justify-end"
99
- }, [o(g, e(i.tablePagination.value, {
100
+ }, [i(g, e(r.tablePagination.value, {
100
101
  simple: l.value < 768
101
102
  }), {
102
- prefix: () => o("div", null, [n("components.list.total", {
103
- total: i.total.value || 0
103
+ prefix: () => i("div", null, [a("components.list.total", {
104
+ total: r.total.value || 0
104
105
  })])
105
106
  })])]);
106
107
  }
@@ -1,39 +1,40 @@
1
- import { defineComponent as b, computed as d, createVNode as t, mergeProps as o } from "vue";
2
- import { NDataTable as u } from "naive-ui";
3
- import { DuxTableLayout as m } from "../layout/table.js";
1
+ import { defineComponent as n, computed as p, createVNode as a, mergeProps as b } from "vue";
2
+ import { NDataTable as o } from "naive-ui";
3
+ import { DuxTableLayout as d } from "../layout/table.js";
4
4
  import "@duxweb/dvha-core";
5
5
  import "clsx";
6
- import { DuxListEmpty as n } from "../status/listEmpty.js";
7
- const y = /* @__PURE__ */ b({
6
+ import { DuxListEmpty as u } from "../status/listEmpty.js";
7
+ const y = /* @__PURE__ */ n({
8
8
  name: "DuxTablePage",
9
9
  props: {
10
10
  tableProps: {
11
11
  type: Object
12
12
  }
13
13
  },
14
- extends: m,
14
+ extends: d,
15
15
  slots: Object,
16
16
  setup(i, {
17
17
  slots: e
18
18
  }) {
19
- const p = d(() => {
19
+ const m = p(() => {
20
20
  const {
21
- tableProps: r,
22
- ...a
21
+ tableProps: t,
22
+ ...r
23
23
  } = i;
24
- return a;
24
+ return r;
25
25
  });
26
- return () => t(m, p.value, {
27
- default: (r) => t(u, o(r.table.value, i.tableProps, {
26
+ return () => a(d, m.value, {
27
+ default: (t) => a(o, b(t.table.value, i.tableProps, {
28
28
  class: "h-full",
29
29
  minHeight: 200,
30
30
  tableLayout: "fixed",
31
31
  flexHeight: !0,
32
- rowKey: (a) => a.id,
32
+ rowKey: (r) => r.id,
33
33
  bordered: !1,
34
- scrollX: r.width
34
+ scrollX: t.width,
35
+ renderCell: (r) => r == null || r === "" ? "-" : r
35
36
  }), {
36
- empty: () => t(n, {
37
+ empty: () => a(u, {
37
38
  bordered: !1
38
39
  }, null)
39
40
  }),
@@ -21,7 +21,7 @@ const oe = /* @__PURE__ */ Y({
21
21
  draggable: Boolean,
22
22
  bordered: {
23
23
  type: Boolean,
24
- default: !0
24
+ default: !1
25
25
  }
26
26
  },
27
27
  extends: T,
@@ -136,6 +136,7 @@ const oe = /* @__PURE__ */ Y({
136
136
  });
137
137
  return () => n(le, {
138
138
  class: "h-full",
139
+ contentClass: "flex flex-col",
139
140
  bordered: t.bordered
140
141
  }, {
141
142
  default: () => {