@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
@@ -1,4 +1,4 @@
1
- import { defineComponent as fe, ref as m, computed as te, createVNode as e, nextTick as ve, createTextVNode as oe, isVNode as ge } from "vue";
1
+ import { defineComponent as fe, ref as p, computed as te, createVNode as e, nextTick as ve, createTextVNode as oe, isVNode as ge } from "vue";
2
2
  import { useI18n as he, useClient as be, useInfiniteList as ye, useUpload as xe } from "@duxweb/dvha-core";
3
3
  import { cloneDeep as Me } from "lodash-es";
4
4
  import { useMessage as Pe, NTabs as ke, NTab as w, NButton as h, NInput as ne, NInfiniteScroll as Ce, NTooltip as we, NSpin as Se, NDropdown as Ne } from "naive-ui";
@@ -44,8 +44,8 @@ import { useDownload as Fe } from "../../hooks/download.js";
44
44
  import "@tanstack/vue-query";
45
45
  import "pinia";
46
46
  import { DuxFileManageItem as re } from "./manage/item.js";
47
- function N(t) {
48
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !ge(t);
47
+ function N(a) {
48
+ return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !ge(a);
49
49
  }
50
50
  const Ca = /* @__PURE__ */ fe({
51
51
  name: "DuxFileManage",
@@ -62,24 +62,25 @@ const Ca = /* @__PURE__ */ fe({
62
62
  handle: String,
63
63
  uploadParams: Object
64
64
  },
65
- setup(t) {
65
+ setup(a) {
66
66
  var F, I, U, V;
67
- const y = m(!1), T = m(0), E = m(0), {
67
+ const b = p(!1), T = p(0), E = p(0), {
68
68
  t: o
69
- } = he(), n = m([]), x = Te(), S = be(), f = Pe(), ue = Fe(), i = m({
70
- type: t.type || "all",
69
+ } = he(), n = p([]), x = Te(), S = be(), f = Pe(), ue = Fe(), i = p({
70
+ manager: !0,
71
+ type: a.type || "all",
71
72
  folder: null
72
- }), M = m(), {
73
+ }), M = p(), {
73
74
  uploadPath: de,
74
75
  managePath: P,
75
76
  driver: ie
76
77
  } = je({
77
- driver: (F = t.uploadParams) == null ? void 0 : F.driver,
78
- signPath: (I = t.uploadParams) == null ? void 0 : I.signPath,
79
- signCallback: (U = t.uploadParams) == null ? void 0 : U.signCallback,
80
- uploadPath: (V = t.uploadParams) == null ? void 0 : V.path,
81
- managePath: t.path
82
- }), se = m({
78
+ driver: (F = a.uploadParams) == null ? void 0 : F.driver,
79
+ signPath: (I = a.uploadParams) == null ? void 0 : I.signPath,
80
+ signCallback: (U = a.uploadParams) == null ? void 0 : U.signCallback,
81
+ uploadPath: (V = a.uploadParams) == null ? void 0 : V.path,
82
+ managePath: a.path
83
+ }), se = p({
83
84
  page: 1,
84
85
  pageSize: 20
85
86
  }), u = ye({
@@ -92,20 +93,21 @@ const Ca = /* @__PURE__ */ fe({
92
93
  signPath: s,
93
94
  signCallback: v,
94
95
  ...C
95
- } = t.uploadParams || {};
96
+ } = a.uploadParams || {};
96
97
  return C;
97
98
  }), k = xe({
98
99
  ...ce.value,
99
100
  path: de.value,
100
101
  autoUpload: !0,
101
102
  driver: ie.value,
103
+ params: i.value,
102
104
  onSuccess: () => {
103
105
  n.value = [], u.refetch();
104
106
  },
105
107
  onError: (d) => {
106
108
  f.error((d == null ? void 0 : d.message) || o("components.uploadManage.uploadError") || "");
107
109
  }
108
- }), pe = (d) => {
110
+ }), me = (d) => {
109
111
  if (!d) {
110
112
  f.error(o("components.uploadManage.namePlaceholder") || "");
111
113
  return;
@@ -122,7 +124,7 @@ const Ca = /* @__PURE__ */ fe({
122
124
  }).catch(() => {
123
125
  f.error(o("components.uploadManage.createError") || "");
124
126
  });
125
- }, me = (d, s, v) => {
127
+ }, pe = (d, s, v) => {
126
128
  if (!s) {
127
129
  f.error(o("components.uploadManage.namePlaceholder") || "");
128
130
  return;
@@ -153,14 +155,14 @@ const Ca = /* @__PURE__ */ fe({
153
155
  }).catch(() => {
154
156
  f.error(o("components.uploadManage.delError") || "");
155
157
  });
156
- }, b = te(() => !!(t.type && t.type !== "all"));
158
+ }, y = te(() => !!(a.type && a.type !== "all"));
157
159
  return () => {
158
160
  var C, L, O, $, z, D, _, q, B, A, R, X;
159
161
  let d, s, v;
160
162
  return e("div", {
161
- class: ["flex flex-col gap-2", t.page ? "h-full" : "h-500px max-h-500px"]
163
+ class: ["flex flex-col gap-2", a.page ? "h-full" : "h-500px max-h-500px"]
162
164
  }, [e("div", {
163
- class: ["flex-none flex justify-between items-center border-b border-muted p-3", t.handle]
165
+ class: ["flex-none flex justify-between items-center border-b border-muted p-3", a.handle]
164
166
  }, [e("div", {
165
167
  class: "flex-none"
166
168
  }, [e(ke, {
@@ -170,26 +172,26 @@ const Ca = /* @__PURE__ */ fe({
170
172
  tabClass: "!px-4",
171
173
  defaultValue: "all",
172
174
  value: i.value.type,
173
- onUpdateValue: (a) => {
174
- b.value || (i.value.type = a, n.value = []);
175
+ onUpdateValue: (l) => {
176
+ y.value || (i.value.type = l, n.value = []);
175
177
  }
176
178
  }, {
177
179
  default: () => [e(w, {
178
180
  tab: o("components.uploadManage.all"),
179
181
  name: "all",
180
- disabled: b.value
182
+ disabled: y.value
181
183
  }, null), e(w, {
182
184
  tab: o("components.uploadManage.image"),
183
185
  name: "image",
184
- disabled: b.value
186
+ disabled: y.value
185
187
  }, null), e(w, {
186
188
  tab: o("components.uploadManage.media"),
187
189
  name: "media",
188
- disabled: b.value
190
+ disabled: y.value
189
191
  }, null), e(w, {
190
192
  tab: o("components.uploadManage.docs"),
191
193
  name: "docs",
192
- disabled: b.value
194
+ disabled: y.value
193
195
  }, null)]
194
196
  })]), e("div", {
195
197
  class: "flex gap-2"
@@ -205,8 +207,8 @@ const Ca = /* @__PURE__ */ fe({
205
207
  "v-model:value": "form.name"
206
208
  }
207
209
  }]
208
- }).then((a) => {
209
- pe(a == null ? void 0 : a.name);
210
+ }).then((l) => {
211
+ me(l == null ? void 0 : l.name);
210
212
  }).catch(() => {
211
213
  });
212
214
  },
@@ -229,12 +231,12 @@ const Ca = /* @__PURE__ */ fe({
229
231
  default: () => [e("div", {
230
232
  class: "flex gap-2"
231
233
  }, [o("components.uploadManage.upload"), k.progress.value.totalPercent > 0 && `(${k.progress.value.totalPercent}%)`])]
232
- }), !t.page && e(h, {
234
+ }), !a.page && e(h, {
233
235
  type: "default",
234
236
  ghost: !0,
235
237
  onClick: () => {
236
- var a;
237
- (a = t.onClose) == null || a.call(t);
238
+ var l;
239
+ (l = a.onClose) == null || l.call(a);
238
240
  },
239
241
  renderIcon: () => e("div", {
240
242
  class: "i-tabler:x"
@@ -251,13 +253,14 @@ const Ca = /* @__PURE__ */ fe({
251
253
  }
252
254
  }, {
253
255
  default: () => {
254
- var a, l, g, Y, G, H, J, K, Q, W;
256
+ var l, t, g, Y, G, H, J, K, Q, W;
255
257
  return [e("div", {
256
- class: ["grid grid-cols-3 md:grid-cols-4 text-sm items-start justify-start", ((l = (a = u.data.value) == null ? void 0 : a.data) == null ? void 0 : l.length) >= 4 && !t.page ? " lg:grid-cols-[repeat(auto-fit,minmax(150px,1fr))]" : "lg:grid-cols-[repeat(auto-fit,minmax(150px,150px))]"]
258
+ class: ["grid grid-cols-3 md:grid-cols-4 text-sm items-start justify-start", ((t = (l = u.data.value) == null ? void 0 : l.data) == null ? void 0 : t.length) >= 4 && !a.page ? " lg:grid-cols-[repeat(auto-fit,minmax(150px,1fr))]" : "lg:grid-cols-[repeat(auto-fit,minmax(150px,150px))]"]
257
259
  }, [((g = i.value) == null ? void 0 : g.folder) && ((Y = i.value) == null ? void 0 : Y.folder) !== ((H = (G = u.data.value) == null ? void 0 : G.meta) == null ? void 0 : H.folder) && e(re, {
258
260
  key: `parent-${(K = (J = u.data.value) == null ? void 0 : J.meta) == null ? void 0 : K.folder}`,
259
261
  type: "folder",
260
262
  name: o("components.uploadManage.parentLevel"),
263
+ page: a.page,
261
264
  onSelect: () => {
262
265
  var r, c;
263
266
  n.value = [], i.value.folder = (c = (r = u.data.value) == null ? void 0 : r.meta) == null ? void 0 : c.folder;
@@ -271,24 +274,25 @@ const Ca = /* @__PURE__ */ fe({
271
274
  trigger: () => {
272
275
  var c, Z;
273
276
  return e(re, {
274
- onContextmenu: (p) => {
275
- M.value = r, y.value = !1, ve().then(() => {
276
- y.value = !0, T.value = p.clientX, E.value = p.clientY;
277
- }), p.preventDefault();
277
+ page: a.page,
278
+ onContextmenu: (m) => {
279
+ M.value = r, b.value = !1, ve().then(() => {
280
+ b.value = !0, T.value = m.clientX, E.value = m.clientY;
281
+ }), m.preventDefault();
278
282
  },
279
- value: t.page ? !1 : !!((Z = (c = n.value) == null ? void 0 : c.find) != null && Z.call(c, (p) => p.id === r.id)),
283
+ value: a.page ? !1 : !!((Z = (c = n.value) == null ? void 0 : c.find) != null && Z.call(c, (m) => m.id === r.id)),
280
284
  type: r.url ? "file" : "folder",
281
285
  mime: r.filetype,
282
286
  name: r.filename,
283
287
  url: r.url,
284
288
  time: r.time,
285
- onSelect: (p) => {
289
+ onSelect: (m) => {
286
290
  var ee, ae, le;
287
291
  if (!r.url) {
288
292
  n.value = [], u.data.value = void 0, i.value.folder = r.id;
289
293
  return;
290
294
  }
291
- t.page || (p ? t.multiple ? (ee = n.value) == null || ee.push(r) : n.value = [r] : t.multiple ? (le = n.value) == null || le.splice((ae = n.value) == null ? void 0 : ae.indexOf(r), 1) : n.value = []);
295
+ a.page || (m ? a.multiple ? (ee = n.value) == null || ee.push(r) : n.value = [r] : a.multiple ? (le = n.value) == null || le.splice((ae = n.value) == null ? void 0 : ae.indexOf(r), 1) : n.value = []);
292
296
  }
293
297
  }, null);
294
298
  }
@@ -312,8 +316,8 @@ const Ca = /* @__PURE__ */ fe({
312
316
  type: "default",
313
317
  ghost: !0,
314
318
  onClick: () => {
315
- var a, l;
316
- n.value = [], i.value.folder = (l = (a = u.data.value) == null ? void 0 : a.meta) == null ? void 0 : l.folder;
319
+ var l, t;
320
+ n.value = [], i.value.folder = (t = (l = u.data.value) == null ? void 0 : l.meta) == null ? void 0 : t.folder;
317
321
  }
318
322
  }, N(s = o("components.uploadManage.back")) ? s : {
319
323
  default: () => [s]
@@ -322,18 +326,18 @@ const Ca = /* @__PURE__ */ fe({
322
326
  y: E.value,
323
327
  placement: "bottom-start",
324
328
  trigger: "manual",
325
- show: y.value,
329
+ show: b.value,
326
330
  onClickoutside: () => {
327
- y.value = !1;
331
+ b.value = !1;
328
332
  },
329
- onUpdateShow: (a) => {
330
- a || (M.value = void 0);
333
+ onUpdateShow: (l) => {
334
+ l || (M.value = void 0);
331
335
  },
332
- onSelect: (a) => {
333
- const l = Me(M.value);
334
- switch (a) {
336
+ onSelect: (l) => {
337
+ const t = Me(M.value);
338
+ switch (b.value = !1, l) {
335
339
  case "download":
336
- ue.url(l == null ? void 0 : l.url);
340
+ ue.url(t == null ? void 0 : t.url);
337
341
  break;
338
342
  case "rename":
339
343
  x.prompt({
@@ -345,10 +349,10 @@ const Ca = /* @__PURE__ */ fe({
345
349
  }
346
350
  }],
347
351
  defaultValue: {
348
- name: (l == null ? void 0 : l.filename) || (l == null ? void 0 : l.name)
352
+ name: (t == null ? void 0 : t.filename) || (t == null ? void 0 : t.name)
349
353
  }
350
354
  }).then((g) => {
351
- me(l == null ? void 0 : l.type, g == null ? void 0 : g.name, l == null ? void 0 : l.id);
355
+ pe(t == null ? void 0 : t.type, g == null ? void 0 : g.name, t == null ? void 0 : t.id);
352
356
  });
353
357
  break;
354
358
  case "delete":
@@ -356,7 +360,7 @@ const Ca = /* @__PURE__ */ fe({
356
360
  title: o("components.uploadManage.delTitle"),
357
361
  content: o("components.uploadManage.delDesc")
358
362
  }).then(() => {
359
- j(l == null ? void 0 : l.type, l == null ? void 0 : l.id);
363
+ j(t == null ? void 0 : t.type, t == null ? void 0 : t.id);
360
364
  });
361
365
  break;
362
366
  }
@@ -379,8 +383,8 @@ const Ca = /* @__PURE__ */ fe({
379
383
  icon: () => e("div", {
380
384
  class: "i-tabler:trash"
381
385
  }, null)
382
- }].filter((a) => a)
383
- }, null), !t.page && e("div", {
386
+ }].filter((l) => l)
387
+ }, null), !a.page && e("div", {
384
388
  class: "flex justify-end gap-2 border-t border-muted p-3"
385
389
  }, [e("div", null, [((R = n.value) == null ? void 0 : R.length) > 0 && e(h, {
386
390
  type: "error",
@@ -390,8 +394,8 @@ const Ca = /* @__PURE__ */ fe({
390
394
  title: o("components.uploadManage.delTitle"),
391
395
  content: o("components.uploadManage.delDesc")
392
396
  }).then(() => {
393
- var a;
394
- j("file", (a = n.value) == null ? void 0 : a.map((l) => l.id));
397
+ var l;
398
+ j("file", (l = n.value) == null ? void 0 : l.map((t) => t.id));
395
399
  });
396
400
  }
397
401
  }, N(v = o("components.button.delete")) ? v : {
@@ -400,13 +404,13 @@ const Ca = /* @__PURE__ */ fe({
400
404
  type: "primary",
401
405
  disabled: !((X = n.value) != null && X.length),
402
406
  onClick: () => {
403
- var a;
404
- (a = t.onConfirm) == null || a.call(t, n.value);
407
+ var l;
408
+ (l = a.onConfirm) == null || l.call(a, n.value);
405
409
  }
406
410
  }, {
407
411
  default: () => {
408
- var a;
409
- return [o("components.button.select"), oe("("), ((a = n.value) == null ? void 0 : a.length) || 0, oe(")")];
412
+ var l;
413
+ return [o("components.button.select"), oe("("), ((l = n.value) == null ? void 0 : l.length) || 0, oe(")")];
410
414
  }
411
415
  })])])]);
412
416
  };
@@ -1,23 +1,20 @@
1
- import { ref as g, createVNode as l, createTextVNode as x } from "vue";
2
- import { useI18n as d } from "@duxweb/dvha-core";
3
- import { useNaiveTable as f } from "@duxweb/dvha-naiveui";
4
- import { useMessage as b, useNotification as k, NProgress as p } from "naive-ui";
5
- function y(i) {
1
+ import { ref as i, createVNode as l, createTextVNode as p } from "vue";
2
+ import { useI18n as m } from "@duxweb/dvha-core";
3
+ import { useNaiveTable as x } from "@duxweb/dvha-naiveui";
4
+ import { useMessage as g, useNotification as d, NProgress as c } from "naive-ui";
5
+ function E(u) {
6
6
  const {
7
7
  t: o
8
- } = d(), a = b(), n = k(), t = g(null);
9
- return f({
10
- ...i,
8
+ } = m(), r = g(), n = d(), t = i(null);
9
+ return x({
10
+ ...u,
11
11
  // 传递导出回调
12
12
  onExportSuccess: (e) => {
13
- var s, c;
13
+ var s, a;
14
14
  (s = t.value) == null || s.destroy(), t.value = null, n.success({
15
15
  title: o("hooks.table.exportSuccess"),
16
16
  content: o("hooks.table.exportSuccessContent", {
17
- count: ((c = e == null ? void 0 : e.pages) == null ? void 0 : c.reduce((m, r) => {
18
- var u;
19
- return m + ((u = r == null ? void 0 : r.data) == null ? void 0 : u.length);
20
- }, 0)) || 0
17
+ count: ((a = e == null ? void 0 : e.data) == null ? void 0 : a.length) || 0
21
18
  }),
22
19
  duration: 6e3
23
20
  });
@@ -28,7 +25,7 @@ function y(i) {
28
25
  content: () => o("hooks.table.exportProgressContent", {
29
26
  page: e.page || 1
30
27
  }),
31
- avatar: () => l(p, {
28
+ avatar: () => l(c, {
32
29
  class: "size-10 text-sm",
33
30
  type: "circle",
34
31
  percentage: 50
@@ -44,7 +41,7 @@ function y(i) {
44
41
  },
45
42
  onExportError: (e) => {
46
43
  var s;
47
- (s = t.value) == null || s.destroy(), t.value = null, a.error(o("hooks.table.exportFailedContent", {
44
+ (s = t.value) == null || s.destroy(), t.value = null, r.error(o("hooks.table.exportFailedContent", {
48
45
  error: (e == null ? void 0 : e.message) || o("common.unknownError")
49
46
  }));
50
47
  },
@@ -66,14 +63,14 @@ function y(i) {
66
63
  processed: (e == null ? void 0 : e.processedItems) || 0,
67
64
  total: (e == null ? void 0 : e.totalItems) || 0
68
65
  }),
69
- avatar: () => l(p, {
66
+ avatar: () => l(c, {
70
67
  class: "size-10 text-sm",
71
68
  type: "circle",
72
69
  percentage: (e == null ? void 0 : e.percentage) || 0
73
70
  }, {
74
71
  default: () => [l("div", {
75
72
  class: "text-xs"
76
- }, [(e == null ? void 0 : e.percentage) || 0, x("%")])]
73
+ }, [(e == null ? void 0 : e.percentage) || 0, p("%")])]
77
74
  }),
78
75
  onClose: () => {
79
76
  t.value = null;
@@ -82,12 +79,12 @@ function y(i) {
82
79
  },
83
80
  onImportError: (e) => {
84
81
  var s;
85
- (s = t.value) == null || s.destroy(), t.value = null, a.error(o("hooks.table.importFailedContent", {
82
+ (s = t.value) == null || s.destroy(), t.value = null, r.error(o("hooks.table.importFailedContent", {
86
83
  error: (e == null ? void 0 : e.message) || o("common.unknownError")
87
84
  }));
88
85
  }
89
86
  });
90
87
  }
91
88
  export {
92
- y as useTable
89
+ E as useTable
93
90
  };
package/dist/esm/index.js CHANGED
@@ -66,8 +66,8 @@ import { DuxStatsNumber as vr } from "./components/stats/number.js";
66
66
  import { DuxStatsRealTime as Rr } from "./components/stats/realTime.js";
67
67
  import { DuxBlockEmpty as kr } from "./components/status/blockEmpty.js";
68
68
  import { DuxListEmpty as Nr } from "./components/status/listEmpty.js";
69
- import { DuxTablePage as Vr } from "./components/table/tablePage.js";
70
- import { DuxTable as Or } from "./components/table/table.js";
69
+ import { DuxTable as Vr } from "./components/table/table.js";
70
+ import { DuxTablePage as Or } from "./components/table/tablePage.js";
71
71
  import { DuxTreeFilter as jr } from "./components/tree/treeFilter.js";
72
72
  import { DuxFileUpload as Gr } from "./components/upload/file.js";
73
73
  import { DuxImageUpload as Kr } from "./components/upload/image.js";
@@ -168,10 +168,10 @@ export {
168
168
  Rr as DuxStatsRealTime,
169
169
  l as DuxStatsStore,
170
170
  s as DuxStatsStoreItem,
171
- Or as DuxTable,
171
+ Vr as DuxTable,
172
172
  mr as DuxTableFilter,
173
173
  sr as DuxTableLayout,
174
- Vr as DuxTablePage,
174
+ Or as DuxTablePage,
175
175
  nr as DuxTableTools,
176
176
  jr as DuxTreeFilter,
177
177
  oe as DuxWidgetConnect,
@@ -1,13 +1,15 @@
1
- const e = { search: "Search", empty: "No data", menu: "Menu", theme: "Theme", dark: "Dark", light: "Light", back: "Back", loading: "Loading...", success: "Success", error: "Error", unknownError: "Unknown error" }, t = { tab: { lock: "Lock", closeOther: "Close Other", closeLeft: "Close Left", closeRight: "Close Right" }, dialog: { confirm: { title: "Confirm", content: "Are you sure you want to confirm?" }, cancel: { title: "Cancel", content: "Are you sure you want to cancel?" }, success: { title: "Success", content: "Your operation has been successful" }, error: { title: "Error", content: "Your operation has been failed" }, prompt: { title: "Prompt" } }, button: { confirm: "Confirm", cancel: "Cancel", submit: "Submit", reset: "Reset", delete: "Delete", search: "Search", advanced: "Advanced", export: "Export", import: "Import", autoRefresh: "Auto Refresh", filter: "Filter", refresh: "Refresh", select: "Select", create: "Create", download: "Download", rename: "Rename", preview: "Preview" }, form: { edit: "Edit", create: "Create" }, list: { selectAll: "Select All", columnSetting: "Column Setting", selectedItems: "Selected Items: {num}", total: "Total: {total}" }, editor: { placeholder: "Please enter content" }, upload: { fileManager: "File Manager", uploadFile: "Upload File", cancel: "Cancel", delete: "Delete", error: "Upload failed", empty: "No files", desc: "Click or drag files to this area", dropHere: "Drop files here", allFormats: "Support any format files", supportFormats: "Support {formats} format files", maxSize: "Max file size: {size}MB", success: "Upload success", failed: "Upload failed", fileExtension: "{ext} file", status: { pending: "Pending", uploading: "Uploading", success: "Success", cancelled: "Cancelled", error: "Error" }, file: { name: "File Name", size: "Size", type: "Type", status: "Status" }, actions: "Actions" }, uploadManage: { title: "File Manager", all: "All", image: "Images", media: "Media", docs: "Documents", upload: "Upload", empty: "No files", emptyDesc: "No more files, please upload files", back: "Back to parent", parentLevel: "Parent Level", namePlaceholder: "Please enter name", createError: "Create failed", editError: "Edit failed", delError: "Delete failed", delTitle: "Confirm Delete", delDesc: "Are you sure you want to delete the selected files? This action cannot be undone." }, crop: { title: "Crop", select: "Select", confirm: "Confirm" }, stats: { realTimeData: "Real-time Data" }, data: { selectTitle: "Please select data" }, menu: { language: "Language", chinese: "中文", english: "English", color: "Color", primaryColor: "Primary Color", neutralColor: "Neutral Color", theme: "Theme", followSystem: "Follow System", lightMode: "Light", darkMode: "Dark", logout: "Logout" }, iconPicker: { title: "Icon Picker" } }, o = { table: { exportSuccess: "Export data successfully", exportProgress: "Exporting data, please wait...", exportFailed: "Export data failed", exportSuccessContent: "Successfully exported {count} records", exportProgressContent: "Page {page} data", exportFailedContent: "Export data failed: {error}", importSuccess: "Import data successfully", importProgress: "Importing data, please wait...", importFailed: "Import data failed", importSuccessContent: "Successfully imported {count} records", importProgressContent: "{processed} / {total} records", importFailedContent: "Import data failed: {error}", saveSuccess: "Save successfully", copySuccess: "Copy successfully", copyFailed: "Copy failed" }, download: { failed: "Download failed" } }, a = { 400: { title: "400", desc: "Request error" }, 401: { title: "401", desc: "You do not have permission to access this page" }, 403: { title: "403", desc: "You do not have permission to access this page" }, 404: { title: "404", desc: "Page not found" }, 500: { title: "500", desc: "Server error" }, empty: { title: "No data", desc: "No more data, please try again later" }, loading: { title: "Loading", desc: "Data is loading, please try again later" }, login: { success: "Login success", error: "Login failed, please check your username and password", placeholder: { username: "Please enter username", password: "Please enter password" }, buttons: { login: "Login" } } }, r = {
1
+ const e = { search: "Search", empty: "No data", menu: "Menu", theme: "Theme", dark: "Dark", light: "Light", back: "Back", loading: "Loading...", success: "Success", error: "Error", unknownError: "Unknown error" }, t = { tab: { lock: "Lock", closeOther: "Close Other", closeLeft: "Close Left", closeRight: "Close Right" }, dialog: { confirm: { title: "Confirm", content: "Are you sure you want to confirm?" }, cancel: { title: "Cancel", content: "Are you sure you want to cancel?" }, success: { title: "Success", content: "Your operation has been successful" }, error: { title: "Error", content: "Your operation has been failed" }, prompt: { title: "Prompt" } }, button: { confirm: "Confirm", cancel: "Cancel", submit: "Submit", reset: "Reset", delete: "Delete", search: "Search", advanced: "Advanced", export: "Export", import: "Import", autoRefresh: "Auto Refresh", filter: "Filter", refresh: "Refresh", select: "Select", create: "Create", download: "Download", rename: "Rename", preview: "Preview" }, form: { edit: "Edit", create: "Create" }, list: { selectAll: "Select All", columnSetting: "Column Setting", selectedItems: "Selected Items: {num}", total: "Total: {total}" }, editor: { placeholder: "Please enter content" }, upload: { fileManager: "File Manager", uploadFile: "Upload File", cancel: "Cancel", delete: "Delete", error: "Upload failed", empty: "No files", desc: "Click or drag files to this area", dropHere: "Drop files here", allFormats: "Support any format files", supportFormats: "Support {formats} format files", maxSize: "Max file size: {size}MB", success: "Upload success", failed: "Upload failed", fileExtension: "{ext} file", status: { pending: "Pending", uploading: "Uploading", success: "Success", cancelled: "Cancelled", error: "Error" }, file: { name: "File Name", size: "Size", type: "Type", status: "Status" }, actions: "Actions" }, uploadManage: { title: "File Manager", all: "All", image: "Images", media: "Media", docs: "Documents", upload: "Upload", empty: "No files", emptyDesc: "No more files, please upload files", back: "Back to parent", parentLevel: "Parent Level", namePlaceholder: "Please enter name", createError: "Create failed", editError: "Edit failed", delError: "Delete failed", delTitle: "Confirm Delete", delDesc: "Are you sure you want to delete the selected files? This action cannot be undone." }, crop: { title: "Crop", select: "Select", confirm: "Confirm" }, stats: { realTimeData: "Real-time Data" }, data: { selectTitle: "Please select data" }, menu: { language: "Language", chinese: "中文", english: "English", color: "Color", primaryColor: "Primary Color", neutralColor: "Neutral Color", theme: "Theme", followSystem: "Follow System", lightMode: "Light", darkMode: "Dark", logout: "Logout" }, iconPicker: { title: "Icon Picker" } }, o = { table: { exportSuccess: "Export data successfully", exportProgress: "Exporting data, please wait...", exportFailed: "Export data failed", exportSuccessContent: "Successfully exported {count} records", exportProgressContent: "Page {page} data", exportFailedContent: "Export data failed: {error}", importSuccess: "Import data successfully", importProgress: "Importing data, please wait...", importFailed: "Import data failed", importSuccessContent: "Successfully imported {count} records", importProgressContent: "{processed} / {total} records", importFailedContent: "Import data failed: {error}", saveSuccess: "Save successfully", copySuccess: "Copy successfully", copyFailed: "Copy failed" }, download: { failed: "Download failed" } }, a = { 400: { title: "400", desc: "Request error" }, 401: { title: "401", desc: "You do not have permission to access this page" }, 403: { title: "403", desc: "You do not have permission to access this page" }, 404: { title: "404", desc: "Page not found" }, 500: { title: "500", desc: "Server error" }, empty: { title: "No data", desc: "No more data, please try again later" }, loading: { title: "Loading", desc: "Data is loading, please try again later" }, login: { success: "Login success", error: "Login failed, please check your username and password", placeholder: { username: "Please enter username", password: "Please enter password" }, buttons: { login: "Login" } } }, r = { "zh-CN": "Chinese", "en-US": "English", "ja-JP": "Japanese", "ko-KR": "Korean", "ru-RU": "Russian" }, l = {
2
2
  common: e,
3
3
  components: t,
4
4
  hooks: o,
5
- pages: a
5
+ pages: a,
6
+ locale: r
6
7
  };
7
8
  export {
8
9
  e as common,
9
10
  t as components,
10
- r as default,
11
+ l as default,
11
12
  o as hooks,
13
+ r as locale,
12
14
  a as pages
13
15
  };
@@ -1,13 +1,15 @@
1
- const e = { search: "搜索", empty: "暂无数据", menu: "菜单", theme: "主题", dark: "暗色模式", light: "亮色模式", back: "返回", loading: "加载中...", success: "操作成功", error: "操作失败", unknownError: "未知错误", keyword: "请输入关键字" }, t = { tab: { lock: "锁定", closeOther: "关闭其他", closeLeft: "关闭左侧", closeRight: "关闭右侧" }, dialog: { confirm: { title: "确定", content: "确定要确认吗?" }, cancel: { title: "取消", content: "确定要取消吗?" }, success: { title: "成功", content: "您的操作已成功" }, error: { title: "错误", content: "您的操作已失败" }, prompt: { title: "提示" } }, button: { confirm: "确定", cancel: "取消", submit: "提交", reset: "重置", delete: "删除", search: "查询", advanced: "高级", export: "导出", import: "导入", autoRefresh: "自动刷新", filter: "筛选", refresh: "刷新", select: "选择", create: "新建", download: "下载", rename: "重命名", preview: "预览", sideLeft: "左侧", sideRight: "右侧" }, form: { edit: "编辑", create: "新增", success: "保存成功", error: "保存失败" }, list: { selectAll: "全选", columnSetting: "列设置", selectedItems: "选中项: {num}", total: "共 {total} 条" }, editor: { placeholder: "请输入内容" }, upload: { fileManager: "文件管理器", uploadFile: "上传文件", cancel: "取消", delete: "删除", error: "上传失败", empty: "暂无文件", desc: "点击或拖拽文件到此区域", dropHere: "拖拽文件到此处", allFormats: "支持任意格式文件", supportFormats: "支持 {formats} 格式文件", maxSize: "最大文件大小: {size}MB", success: "上传成功", failed: "上传失败", fileExtension: "{ext}文件", status: { pending: "待上传", uploading: "上传中", success: "已上传", cancelled: "已取消", error: "失败" }, file: { name: "文件名", size: "大小", type: "类型", status: "状态" }, actions: "操作" }, uploadManage: { title: "文件管理", all: "全部", image: "图片", media: "媒体", docs: "文档", upload: "上传", empty: "暂无文件", emptyDesc: "暂无更多文件,请先上传文件", back: "返回上一级", parentLevel: "上一级", namePlaceholder: "请输入名称", createError: "创建失败", editError: "修改失败", delError: "删除失败", delTitle: "确认删除", delDesc: "确定要删除选中的文件吗?删除后不可恢复。" }, crop: { title: "裁剪", select: "选择", confirm: "确认" }, stats: { realTimeData: "实时数据" }, data: { selectTitle: "请选择数据" }, menu: { language: "语言", chinese: "中文", english: "English", color: "颜色", primaryColor: "主题色", neutralColor: "中性色", theme: "主题", followSystem: "跟随系统", lightMode: "亮色", darkMode: "暗色", logout: "退出登录" }, iconPicker: { title: "图标选择" } }, o = { table: { exportSuccess: "导出数据成功", exportProgress: "导出数据中, 请稍后...", exportFailed: "导出数据失败", exportSuccessContent: "成功导出 {count} 条数据", exportProgressContent: "第 {page} 页数据", exportFailedContent: "导出数据失败:{error}", importSuccess: "导入数据成功", importProgress: "导入数据中, 请稍后...", importFailed: "导入数据失败", importSuccessContent: "成功导入 {count} 条数据", importProgressContent: "{processed} / {total} 条数据", importFailedContent: "导入数据失败:{error}", saveSuccess: "保存成功", copySuccess: "复制成功", copyFailed: "复制失败" }, download: { failed: "下载失败" } }, r = { 400: { title: "400", desc: "请求错误" }, 401: { title: "401", desc: "您没有权限访问该页面" }, 403: { title: "403", desc: "您没有权限访问该页面" }, 404: { title: "404", desc: "页面不存在" }, 500: { title: "500", desc: "服务器错误" }, empty: { title: "暂无数据", desc: "暂无更多数据,请先创建数据" }, loading: { title: "加载中", desc: "数据正在加载中,请稍后..." }, login: { success: "登录成功", error: "登录失败,请检查用户名和密码", placeholder: { username: "请输入用户名", password: "请输入密码" }, buttons: { login: "登录" } } }, s = {
1
+ const e = { search: "搜索", empty: "暂无数据", menu: "菜单", theme: "主题", dark: "暗色模式", light: "亮色模式", back: "返回", loading: "加载中...", success: "操作成功", error: "操作失败", unknownError: "未知错误", keyword: "请输入关键字" }, t = { tab: { lock: "锁定", closeOther: "关闭其他", closeLeft: "关闭左侧", closeRight: "关闭右侧" }, dialog: { confirm: { title: "确定", content: "确定要确认吗?" }, cancel: { title: "取消", content: "确定要取消吗?" }, success: { title: "成功", content: "您的操作已成功" }, error: { title: "错误", content: "您的操作已失败" }, prompt: { title: "提示" } }, button: { confirm: "确定", cancel: "取消", submit: "提交", reset: "重置", delete: "删除", search: "查询", advanced: "高级", export: "导出", import: "导入", autoRefresh: "自动刷新", filter: "筛选", refresh: "刷新", select: "选择", create: "新建", download: "下载", rename: "重命名", preview: "预览", sideLeft: "左侧", sideRight: "右侧" }, form: { edit: "编辑", create: "新增", success: "保存成功", error: "保存失败" }, list: { selectAll: "全选", columnSetting: "列设置", selectedItems: "选中项: {num}", total: "共 {total} 条" }, editor: { placeholder: "请输入内容" }, upload: { fileManager: "文件管理器", uploadFile: "上传文件", cancel: "取消", delete: "删除", error: "上传失败", empty: "暂无文件", desc: "点击或拖拽文件到此区域", dropHere: "拖拽文件到此处", allFormats: "支持任意格式文件", supportFormats: "支持 {formats} 格式文件", maxSize: "最大文件大小: {size}MB", success: "上传成功", failed: "上传失败", fileExtension: "{ext}文件", status: { pending: "待上传", uploading: "上传中", success: "已上传", cancelled: "已取消", error: "失败" }, file: { name: "文件名", size: "大小", type: "类型", status: "状态" }, actions: "操作" }, uploadManage: { title: "文件管理", all: "全部", image: "图片", media: "媒体", docs: "文档", upload: "上传", empty: "暂无文件", emptyDesc: "暂无更多文件,请先上传文件", back: "返回上一级", parentLevel: "上一级", namePlaceholder: "请输入名称", createError: "创建失败", editError: "修改失败", delError: "删除失败", delTitle: "确认删除", delDesc: "确定要删除选中的文件吗?删除后不可恢复。" }, crop: { title: "裁剪", select: "选择", confirm: "确认" }, stats: { realTimeData: "实时数据" }, data: { selectTitle: "请选择数据" }, menu: { language: "语言", chinese: "中文", english: "English", color: "颜色", primaryColor: "主题色", neutralColor: "中性色", theme: "主题", followSystem: "跟随系统", lightMode: "亮色", darkMode: "暗色", logout: "退出登录" }, iconPicker: { title: "图标选择" } }, o = { table: { exportSuccess: "导出数据成功", exportProgress: "导出数据中, 请稍后...", exportFailed: "导出数据失败", exportSuccessContent: "成功导出 {count} 条数据", exportProgressContent: "第 {page} 页数据", exportFailedContent: "导出数据失败:{error}", importSuccess: "导入数据成功", importProgress: "导入数据中, 请稍后...", importFailed: "导入数据失败", importSuccessContent: "成功导入 {count} 条数据", importProgressContent: "{processed} / {total} 条数据", importFailedContent: "导入数据失败:{error}", saveSuccess: "保存成功", copySuccess: "复制成功", copyFailed: "复制失败" }, download: { failed: "下载失败" } }, r = { 400: { title: "400", desc: "请求错误" }, 401: { title: "401", desc: "您没有权限访问该页面" }, 403: { title: "403", desc: "您没有权限访问该页面" }, 404: { title: "404", desc: "页面不存在" }, 500: { title: "500", desc: "服务器错误" }, empty: { title: "暂无数据", desc: "暂无更多数据,请先创建数据" }, loading: { title: "加载中", desc: "数据正在加载中,请稍后..." }, login: { success: "登录成功", error: "登录失败,请检查用户名和密码", placeholder: { username: "请输入用户名", password: "请输入密码" }, buttons: { login: "登录" } } }, s = { "zh-CN": "中文", "en-US": "English", "ja-JP": "日本語", "ko-KR": "한국어", "ru-RU": "Русский" }, l = {
2
2
  common: e,
3
3
  components: t,
4
4
  hooks: o,
5
- pages: r
5
+ pages: r,
6
+ locale: s
6
7
  };
7
8
  export {
8
9
  e as common,
9
10
  t as components,
10
- s as default,
11
+ l as default,
11
12
  o as hooks,
13
+ s as locale,
12
14
  r as pages
13
15
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as r, createVNode as t } from "vue";
2
- import { useManage as m, DuxTabRouterView as l } from "@duxweb/dvha-core";
3
- import { NButton as p } from "naive-ui";
1
+ import { defineComponent as p, onMounted as n, onUnmounted as s, createVNode as t } from "vue";
2
+ import { useManage as u, useCheck as a, DuxTabRouterView as c } from "@duxweb/dvha-core";
3
+ import { useIntervalFn as f } from "@vueuse/core";
4
+ import { NButton as d } from "naive-ui";
4
5
  import "vue-router";
5
6
  import "@overlastic/vue";
6
7
  import "clsx";
7
8
  import "vue-echarts";
8
- import "@vueuse/core";
9
9
  import "vue-cropper";
10
10
  import "jinrishici";
11
11
  import "lodash-es";
@@ -21,10 +21,10 @@ import "@unocss/preset-typography";
21
21
  import "unocss/preset-wind4";
22
22
  import "@vee-validate/i18n/dist/locale/en.json";
23
23
  import "@vee-validate/i18n/dist/locale/zh_CN.json";
24
- import s from "../menu/avatar.js";
24
+ import x from "../menu/avatar.js";
25
25
  import "vue-command-palette";
26
26
  import "@duxweb/dvha-naiveui";
27
- import { DuxPageTab as n } from "./tab.js";
27
+ import { DuxPageTab as g } from "./tab.js";
28
28
  import "../page404.js";
29
29
  import "@iconify-json/tabler/icons.json";
30
30
  import "mime";
@@ -41,41 +41,52 @@ import "ace-builds/src-noconflict/ext-language_tools";
41
41
  import "ace-builds/src-noconflict/mode-snippets";
42
42
  import "dayjs";
43
43
  import "@tanstack/vue-query";
44
- import { useUI as u } from "../../hooks/ui.js";
45
- const et = /* @__PURE__ */ r({
44
+ import { useUI as v } from "../../hooks/ui.js";
45
+ const nt = /* @__PURE__ */ p({
46
46
  name: "DuxLayoutPage",
47
47
  props: {},
48
48
  setup() {
49
49
  const {
50
- menuMobileCollapsed: e,
51
- setMenuMobileCollapsed: o
50
+ menuMobileCollapsed: o,
51
+ setMenuMobileCollapsed: i
52
+ } = v(), {
53
+ config: r
52
54
  } = u(), {
53
- config: i
54
- } = m();
55
- return () => t("div", {
55
+ mutate: e
56
+ } = a(), {
57
+ pause: m,
58
+ resume: l
59
+ } = f(() => {
60
+ e();
61
+ }, 1e3 * 60 * 10);
62
+ return n(() => {
63
+ e(), l();
64
+ }), s(() => {
65
+ m();
66
+ }), () => t("div", {
56
67
  class: "flex-1 min-w-0 flex flex-col"
57
68
  }, [t("div", {
58
69
  class: "flex flex-col lg:flex-row lg:justify-between lg:items-center lg:h-13"
59
70
  }, [t("div", {
60
71
  class: "flex lg:hidden justify-between items-center px-2 py-2 bg-default dark:bg-muted shadow-xs relative"
61
- }, [t(p, {
72
+ }, [t(d, {
62
73
  text: !0,
63
- onClick: () => o(!e.value)
74
+ onClick: () => i(!o.value)
64
75
  }, {
65
76
  default: () => [t("div", {
66
77
  class: "i-tabler:menu-2 size-6"
67
78
  }, null)]
68
79
  }), t("div", {
69
80
  class: "w-full absolute inset-0 flex items-center justify-center text-base pointer-events-none"
70
- }, [i.title]), t("div", null, [t(s, {
81
+ }, [r.title]), t("div", null, [t(x, {
71
82
  collapsed: !0
72
83
  }, null)])]), t("div", {
73
84
  class: "flex-1 py-2"
74
- }, [t(n, null, null)])]), t("div", {
85
+ }, [t(g, null, null)])]), t("div", {
75
86
  class: "flex-1 min-h-0 mr-2 ml-2 mb-2 lg:ml-0"
76
- }, [t(l, null, null)])]);
87
+ }, [t(c, null, null)])]);
77
88
  }
78
89
  });
79
90
  export {
80
- et as DuxLayoutPage
91
+ nt as DuxLayoutPage
81
92
  };