@duxweb/dvha-pro 1.0.19 → 1.0.21

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 (41) hide show
  1. package/dist/cjs/components/crop/imageCrop.cjs +1 -1
  2. package/dist/cjs/components/form/formItem.cjs +1 -1
  3. package/dist/cjs/components/layout/list.cjs +1 -1
  4. package/dist/cjs/components/layout/table.cjs +1 -1
  5. package/dist/cjs/components/panel/setting.cjs +1 -1
  6. package/dist/cjs/components/table/table.cjs +1 -1
  7. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  8. package/dist/cjs/components/upload/manager.cjs +1 -1
  9. package/dist/cjs/hooks/table.cjs +1 -1
  10. package/dist/cjs/index.cjs +1 -1
  11. package/dist/cjs/langs/en-US.json.cjs +1 -1
  12. package/dist/cjs/langs/zh-CN.json.cjs +1 -1
  13. package/dist/cjs/pages/layout/page.cjs +1 -1
  14. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  15. package/dist/cjs/theme/uno.css.cjs +2 -2
  16. package/dist/esm/components/crop/imageCrop.js +6 -3
  17. package/dist/esm/components/form/formItem.js +1 -1
  18. package/dist/esm/components/layout/list.js +20 -16
  19. package/dist/esm/components/layout/table.js +27 -23
  20. package/dist/esm/components/panel/setting.js +12 -8
  21. package/dist/esm/components/table/table.js +9 -9
  22. package/dist/esm/components/upload/manage/item.js +3 -2
  23. package/dist/esm/components/upload/manager.js +65 -61
  24. package/dist/esm/hooks/table.js +16 -19
  25. package/dist/esm/index.js +4 -4
  26. package/dist/esm/langs/en-US.json.js +5 -3
  27. package/dist/esm/langs/zh-CN.json.js +5 -3
  28. package/dist/esm/pages/layout/page.js +30 -19
  29. package/dist/esm/pages/menu/avatar.js +82 -82
  30. package/dist/esm/theme/uno.css.js +2 -2
  31. package/dist/types/components/layout/list.d.ts +7 -1
  32. package/dist/types/components/layout/table.d.ts +7 -1
  33. package/dist/types/components/list/card.d.ts +6 -0
  34. package/dist/types/components/list/list.d.ts +6 -0
  35. package/dist/types/components/panel/setting.d.ts +9 -0
  36. package/dist/types/components/table/index.d.ts +1 -1
  37. package/dist/types/components/table/table.d.ts +1 -1
  38. package/dist/types/components/table/tablePage.d.ts +6 -0
  39. package/dist/types/components/upload/image.d.ts +1 -1
  40. package/dist/types/components/upload/manage/item.d.ts +3 -0
  41. package/package.json +4 -4
@@ -92,6 +92,9 @@ const yt = /* @__PURE__ */ ie({
92
92
  sideRightTitle: {
93
93
  type: String,
94
94
  default: ""
95
+ },
96
+ hookListProps: {
97
+ type: Object
95
98
  }
96
99
  },
97
100
  setup(i, {
@@ -110,17 +113,18 @@ const yt = /* @__PURE__ */ ie({
110
113
  }, l = ce({
111
114
  path: i.path,
112
115
  filters: b.value,
113
- pagination: B.value
116
+ pagination: B.value,
117
+ ...i.hookListProps
114
118
  }), {
115
119
  meta: w,
116
120
  list: k,
117
121
  isLoading: C,
118
122
  autoRefetch: _,
119
- autoCountdown: z,
123
+ autoCountdown: L,
120
124
  onAutoRefetch: K,
121
125
  isExporting: Q,
122
126
  isExportingRows: G,
123
- isImporting: L,
127
+ isImporting: z,
124
128
  onExport: H,
125
129
  onExportRows: X,
126
130
  onImport: Y
@@ -142,7 +146,7 @@ const yt = /* @__PURE__ */ ie({
142
146
  show: !1
143
147
  }), x = T(((F = i.filterSchema) == null ? void 0 : F.length) || 0), {
144
148
  width: u
145
- } = de(), R = () => {
149
+ } = de(), P = () => {
146
150
  var p;
147
151
  if (!((p = i.filterSchema) != null && p.length)) return 0;
148
152
  const n = i.filterSchema.length;
@@ -153,11 +157,11 @@ const yt = /* @__PURE__ */ ie({
153
157
  return c >= 1280 ? o = 4 : c >= 1024 ? o = 3 : c >= 768 ? o = 2 : o = 1, Math.min(n, o);
154
158
  };
155
159
  le(u, () => {
156
- x.value = R();
160
+ x.value = P();
157
161
  }), ne(() => {
158
- x.value = R();
162
+ x.value = P();
159
163
  });
160
- const $ = m(() => (i.filterSchema || []).slice(0, x.value)), P = m(() => (i.filterSchema || []).slice(x.value)), ee = m(() => P.value.length > 0), A = (n) => n.map((c) => {
164
+ const $ = m(() => (i.filterSchema || []).slice(0, x.value)), R = m(() => (i.filterSchema || []).slice(x.value)), ee = m(() => R.value.length > 0), A = (n) => n.map((c) => {
161
165
  const {
162
166
  title: o,
163
167
  ...p
@@ -177,9 +181,9 @@ const yt = /* @__PURE__ */ ie({
177
181
  }), {
178
182
  render: ae
179
183
  } = E({
180
- data: m(() => A(P.value))
184
+ data: m(() => A(R.value))
181
185
  }), y = m(() => ({
182
- import: !0,
186
+ import: !1,
183
187
  export: !0,
184
188
  refresh: !0,
185
189
  ...i.tools
@@ -197,7 +201,7 @@ const yt = /* @__PURE__ */ ie({
197
201
  return t != null && t.sideRight && u.value >= 1024 ? (n = t == null ? void 0 : t.sideRight) == null ? void 0 : n.call(t) : void 0;
198
202
  },
199
203
  default: () => {
200
- var n, c, o, p, N, j, D;
204
+ var n, c, o, p, j, N, D;
201
205
  return e("div", {
202
206
  class: "flex flex-col h-full relative"
203
207
  }, [e("div", {
@@ -279,7 +283,7 @@ const yt = /* @__PURE__ */ ie({
279
283
  }, null)
280
284
  })])]), e("div", {
281
285
  class: "flex gap-2"
282
- }, [(p = t.actions) == null ? void 0 : p.call(t), ((N = i.actions) == null ? void 0 : N.length) > 0 && W({
286
+ }, [(p = t.actions) == null ? void 0 : p.call(t), ((j = i.actions) == null ? void 0 : j.length) > 0 && W({
283
287
  type: u.value < 1024 ? "dropdown" : "button",
284
288
  text: u.value < 1024,
285
289
  items: i.actions
@@ -302,7 +306,7 @@ const yt = /* @__PURE__ */ ie({
302
306
  class: "flex gap-1 items-center"
303
307
  }, [i.checkable && e(s, null, {
304
308
  trigger: () => e(d, {
305
- loading: L.value,
309
+ loading: z.value,
306
310
  circle: !0,
307
311
  quaternary: !0
308
312
  }, {
@@ -313,7 +317,7 @@ const yt = /* @__PURE__ */ ie({
313
317
  }, null)]
314
318
  }),
315
319
  default: () => r("components.list.selectAll")
316
- }), (j = t == null ? void 0 : t.tools) == null ? void 0 : j.call(t), y.value.export && e(s, null, {
320
+ }), (N = t == null ? void 0 : t.tools) == null ? void 0 : N.call(t), y.value.export && e(s, null, {
317
321
  trigger: () => e(d, {
318
322
  loading: Q.value,
319
323
  onClick: H,
@@ -327,7 +331,7 @@ const yt = /* @__PURE__ */ ie({
327
331
  default: () => r("components.button.export")
328
332
  }), y.value.import && e(s, null, {
329
333
  trigger: () => e(d, {
330
- loading: L.value,
334
+ loading: z.value,
331
335
  onClick: Y,
332
336
  circle: !0,
333
337
  quaternary: !0
@@ -346,13 +350,13 @@ const yt = /* @__PURE__ */ ie({
346
350
  icon: () => _.value ? e(ge, {
347
351
  class: "size-4",
348
352
  type: "circle",
349
- percentage: z.value * 10,
353
+ percentage: L.value * 10,
350
354
  strokeWidth: 20,
351
355
  color: "rgba(var(--ui-color-primary))"
352
356
  }, {
353
357
  default: () => [e("span", {
354
358
  class: "text-8px"
355
- }, [z.value])]
359
+ }, [L.value])]
356
360
  }) : e("div", {
357
361
  class: "i-tabler:refresh size-4"
358
362
  }, null)
@@ -1,4 +1,4 @@
1
- import { defineComponent as te, toRef as P, computed as b, reactive as s, createVNode as t, h as A, mergeProps as ie, isVNode as ae } from "vue";
1
+ import { defineComponent as te, toRef as D, computed as b, reactive as x, createVNode as t, h as A, mergeProps as ie, isVNode as ae } from "vue";
2
2
  import { useI18n as re, useJsonSchema as O } from "@duxweb/dvha-core";
3
3
  import { useWindowSize as ne } from "@vueuse/core";
4
4
  import { NTabs as oe, NTab as le, NButton as l, NPopselect as ue, NTooltip as h, NProgress as ce, NPagination as de, NModal as pe, NDrawer as U } from "naive-ui";
@@ -88,13 +88,16 @@ const gt = /* @__PURE__ */ te({
88
88
  sideRightTitle: {
89
89
  type: String,
90
90
  default: ""
91
+ },
92
+ hookTableProps: {
93
+ type: Object
91
94
  }
92
95
  },
93
96
  setup(i, {
94
97
  slots: e
95
98
  }) {
96
- var S, k;
97
- const g = P(i, "filter", {}), F = P(i, "columns", []), {
99
+ var C, S;
100
+ const g = D(i, "filter", {}), F = D(i, "columns", []), {
98
101
  t: n
99
102
  } = re(), {
100
103
  renderAction: V
@@ -102,7 +105,8 @@ const gt = /* @__PURE__ */ te({
102
105
  path: i.path,
103
106
  filters: g.value,
104
107
  columns: F,
105
- pagination: i.pagination
108
+ pagination: i.pagination,
109
+ ...i.hookTableProps
106
110
  }), {
107
111
  columns: R,
108
112
  tablePagination: W,
@@ -111,7 +115,7 @@ const gt = /* @__PURE__ */ te({
111
115
  onUpdateChecked: w,
112
116
  columnSelected: M,
113
117
  autoRefetch: _,
114
- autoCountdown: C,
118
+ autoCountdown: k,
115
119
  onAutoRefetch: q,
116
120
  isExporting: J,
117
121
  isExportingRows: K,
@@ -124,11 +128,11 @@ const gt = /* @__PURE__ */ te({
124
128
  value: r.key
125
129
  }))), {
126
130
  width: u
127
- } = ne(), Z = b(() => R.value.reduce((c, o) => c + (Number(o == null ? void 0 : o.width) || Number(o == null ? void 0 : o.minWidth) || 110), 0)), p = s({
131
+ } = ne(), Z = b(() => R.value.reduce((c, o) => c + (Number(o == null ? void 0 : o.width) || Number(o == null ? void 0 : o.minWidth) || 110), 0)), p = x({
128
132
  show: !1
129
- }), f = s({
133
+ }), f = x({
130
134
  show: !1
131
- }), m = s({
135
+ }), m = x({
132
136
  show: !1
133
137
  }), y = b(() => (i.filterSchema || []).map((r) => {
134
138
  const {
@@ -145,13 +149,13 @@ const gt = /* @__PURE__ */ te({
145
149
  })), {
146
150
  render: $
147
151
  } = O({
148
- data: (S = y.value) == null ? void 0 : S.slice(1)
152
+ data: (C = y.value) == null ? void 0 : C.slice(1)
149
153
  }), {
150
154
  render: ee
151
155
  } = O({
152
- data: (k = y.value) == null ? void 0 : k.slice(0, 1)
153
- }), x = b(() => ({
154
- import: !0,
156
+ data: (S = y.value) == null ? void 0 : S.slice(0, 1)
157
+ }), s = b(() => ({
158
+ import: !1,
155
159
  export: !0,
156
160
  refresh: !0,
157
161
  ...i.tools
@@ -169,7 +173,7 @@ const gt = /* @__PURE__ */ te({
169
173
  return e != null && e.sideRight && u.value >= 1024 ? (r = e == null ? void 0 : e.sideRight) == null ? void 0 : r.call(e) : void 0;
170
174
  },
171
175
  default: () => {
172
- var r, c, o, j, L, N, T, z, D;
176
+ var r, c, o, T, j, L, N, P, z;
173
177
  return t("div", {
174
178
  class: "flex flex-col gap-2 h-full relative"
175
179
  }, [t("div", {
@@ -233,7 +237,7 @@ const gt = /* @__PURE__ */ te({
233
237
  icon: () => t("div", {
234
238
  class: ["i-tabler:chevrons-down size-4 transition-all"]
235
239
  }, null)
236
- }), (j = e == null ? void 0 : e.tools) == null ? void 0 : j.call(e), t(ue, {
240
+ }), (T = e == null ? void 0 : e.tools) == null ? void 0 : T.call(e), t(ue, {
237
241
  options: Y.value,
238
242
  value: M.value,
239
243
  onUpdateValue: (a) => {
@@ -254,7 +258,7 @@ const gt = /* @__PURE__ */ te({
254
258
  }),
255
259
  default: () => n("components.list.columnSetting")
256
260
  })]
257
- }), x.value.export && t(h, null, {
261
+ }), s.value.export && t(h, null, {
258
262
  trigger: () => t(l, {
259
263
  secondary: !0,
260
264
  loading: J.value,
@@ -265,7 +269,7 @@ const gt = /* @__PURE__ */ te({
265
269
  }, null)
266
270
  }),
267
271
  default: () => n("components.button.export")
268
- }), x.value.import && t(h, null, {
272
+ }), s.value.import && t(h, null, {
269
273
  trigger: () => t(l, {
270
274
  secondary: !0,
271
275
  loading: G.value,
@@ -276,7 +280,7 @@ const gt = /* @__PURE__ */ te({
276
280
  }, null)
277
281
  }),
278
282
  default: () => n("components.button.import")
279
- }), x.value.refresh && t(h, null, {
283
+ }), s.value.refresh && t(h, null, {
280
284
  trigger: () => t(l, {
281
285
  secondary: !0,
282
286
  onClick: q
@@ -284,13 +288,13 @@ const gt = /* @__PURE__ */ te({
284
288
  icon: () => _.value ? t(ce, {
285
289
  class: "size-4",
286
290
  type: "circle",
287
- percentage: C.value * 10,
291
+ percentage: k.value * 10,
288
292
  strokeWidth: 20,
289
293
  color: "rgba(var(--ui-color-primary))"
290
294
  }, {
291
295
  default: () => [t("span", {
292
296
  class: "text-8px"
293
- }, [C.value])]
297
+ }, [k.value])]
294
298
  }) : t("div", {
295
299
  class: "i-tabler:refresh size-4"
296
300
  }, null)
@@ -298,24 +302,24 @@ const gt = /* @__PURE__ */ te({
298
302
  default: () => n("components.button.autoRefresh")
299
303
  })]), t("div", {
300
304
  class: "flex gap-2 justify-end"
301
- }, [(L = e.actions) == null ? void 0 : L.call(e), ((N = i.actions) == null ? void 0 : N.length) > 0 && V({
305
+ }, [(j = e.actions) == null ? void 0 : j.call(e), ((L = i.actions) == null ? void 0 : L.length) > 0 && V({
302
306
  type: u.value < 1024 ? "dropdown" : "button",
303
307
  items: i.actions
304
308
  })])])]), t("div", {
305
309
  class: "flex-1 min-h-0"
306
- }, [(T = e == null ? void 0 : e.default) == null ? void 0 : T.call(e, {
310
+ }, [(N = e == null ? void 0 : e.default) == null ? void 0 : N.call(e, {
307
311
  ...v,
308
312
  width: Z.value
309
313
  })]), t("div", {
310
314
  class: "flex justify-between"
311
- }, [t("div", null, [(z = e == null ? void 0 : e.bottom) == null ? void 0 : z.call(e)]), t("div", null, [i.pagination && t(de, ie(W.value, {
315
+ }, [t("div", null, [(P = e == null ? void 0 : e.bottom) == null ? void 0 : P.call(e)]), t("div", null, [i.pagination && t(de, ie(W.value, {
312
316
  simple: u.value < 768
313
317
  }), {
314
318
  prefix: () => t("div", null, [n("components.list.total", {
315
319
  total: v.total.value || 0
316
320
  })])
317
321
  })])]), t(ve, {
318
- number: ((D = I.value.checkedRowKeys) == null ? void 0 : D.length) || 0 || 0,
322
+ number: ((z = I.value.checkedRowKeys) == null ? void 0 : z.length) || 0 || 0,
319
323
  group: [[{
320
324
  icon: "i-tabler:x",
321
325
  onClick: () => {
@@ -15,13 +15,17 @@ const m = /* @__PURE__ */ r({
15
15
  },
16
16
  padding: {
17
17
  type: String
18
+ },
19
+ bordered: {
20
+ type: Boolean,
21
+ default: !0
18
22
  }
19
23
  },
20
- setup(i, {
24
+ setup(d, {
21
25
  slots: t
22
26
  }) {
23
27
  return () => {
24
- var d;
28
+ var i;
25
29
  return e("div", {
26
30
  class: "flex flex-col gap-4"
27
31
  }, [e("div", {
@@ -30,14 +34,14 @@ const m = /* @__PURE__ */ r({
30
34
  class: "flex-1 flex flex-col"
31
35
  }, [e("div", {
32
36
  class: "text-base"
33
- }, [i.title]), i.description && e("div", {
37
+ }, [d.title]), d.description && e("div", {
34
38
  class: "text-sm text-muted"
35
- }, [i.description])]), e("div", {
39
+ }, [d.description])]), e("div", {
36
40
  class: "flex-none flex items-center"
37
- }, [(d = t.actions) == null ? void 0 : d.call(t)])]), e(n, {
38
- size: i.padding,
39
- bordered: !0,
40
- shadow: !1
41
+ }, [(i = t.actions) == null ? void 0 : i.call(t)])]), e(n, {
42
+ size: d.padding,
43
+ shadow: !1,
44
+ bordered: d.bordered
41
45
  }, {
42
46
  default: () => {
43
47
  var a;
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as u, computed as f, toRef as c, createVNode as o, mergeProps as e } from "vue";
2
- import { NDataTable as m, NPagination as d } from "naive-ui";
3
- import { useI18n as b } from "@duxweb/dvha-core";
4
- import "clsx";
5
- import { DuxListEmpty as x } from "../status/listEmpty.js";
2
+ import { useI18n as d } from "@duxweb/dvha-core";
3
+ import { useWindowSize as b } from "@vueuse/core";
4
+ import { NDataTable as m, NPagination as g } from "naive-ui";
6
5
  import "vue-router";
7
6
  import "@overlastic/vue";
7
+ import "clsx";
8
8
  import "vue-echarts";
9
- import { useWindowSize as g } from "@vueuse/core";
10
9
  import "vue-cropper";
11
10
  import "jinrishici";
12
11
  import "lodash-es";
13
12
  import "vue-draggable-plus";
13
+ import { DuxListEmpty as x } from "../status/listEmpty.js";
14
14
  import "aieditor";
15
15
  import "vee-validate";
16
16
  import "@vee-validate/i18n";
@@ -78,11 +78,11 @@ const ft = /* @__PURE__ */ u({
78
78
  pagination: t.pagination
79
79
  }), {
80
80
  width: l
81
- } = g(), {
81
+ } = b(), {
82
82
  t: n
83
- } = b();
83
+ } = d();
84
84
  return () => o("div", {
85
- class: "flex flex-col"
85
+ class: "flex flex-col gap-2"
86
86
  }, [o(m, e(p.value, i.table.value, {
87
87
  class: "flex-1 min-h-0",
88
88
  minHeight: 200,
@@ -96,7 +96,7 @@ const ft = /* @__PURE__ */ u({
96
96
  }, null)
97
97
  }), t.pagination && o("div", {
98
98
  class: "flex justify-end"
99
- }, [o(d, e(i.tablePagination.value, {
99
+ }, [o(g, e(i.tablePagination.value, {
100
100
  simple: l.value < 768
101
101
  }), {
102
102
  prefix: () => o("div", null, [n("components.list.total", {
@@ -59,7 +59,8 @@ const xe = /* @__PURE__ */ c({
59
59
  time: String,
60
60
  value: Boolean,
61
61
  onContextmenu: Function,
62
- onSelect: Function
62
+ onSelect: Function,
63
+ page: Boolean
63
64
  },
64
65
  setup(i) {
65
66
  const o = d(), {
@@ -180,7 +181,7 @@ const xe = /* @__PURE__ */ c({
180
181
  class: "truncate w-full text-center"
181
182
  }, [i.name]), t("div", {
182
183
  class: a(["absolute top-2 right-2", i.value ? "block" : "hidden group-hover:block"])
183
- }, [i.type === "file" && t(u, {
184
+ }, [i.type === "file" && !i.page && t(u, {
184
185
  checked: i.value
185
186
  }, null)])]);
186
187
  }