@duxweb/dvha-pro 1.0.46 → 1.0.48

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 (64) hide show
  1. package/dist/cjs/component.cjs +1 -1
  2. package/dist/cjs/components/layout/list.cjs +1 -1
  3. package/dist/cjs/components/layout/table.cjs +1 -1
  4. package/dist/cjs/components/layout/tools.cjs +1 -1
  5. package/dist/cjs/components/list/card.cjs +1 -1
  6. package/dist/cjs/components/list/list.cjs +1 -1
  7. package/dist/cjs/components/table/table.cjs +1 -1
  8. package/dist/cjs/components/table/tablePage.cjs +1 -1
  9. package/dist/cjs/dvha-pro.css +1 -1
  10. package/dist/cjs/hooks/table.cjs +1 -1
  11. package/dist/cjs/index.cjs +1 -1
  12. package/dist/cjs/langs/en-US.json.cjs +1 -1
  13. package/dist/cjs/langs/zh-CN.json.cjs +1 -1
  14. package/dist/cjs/pages/authLayout.cjs +1 -1
  15. package/dist/cjs/pages/layout/page.cjs +1 -1
  16. package/dist/cjs/pages/layout/tab.cjs +1 -1
  17. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  18. package/dist/cjs/pages/menu/button.cjs +1 -1
  19. package/dist/cjs/pages/menu/dark.cjs +1 -0
  20. package/dist/cjs/pages/menu/menuApp.cjs +1 -0
  21. package/dist/cjs/pages/menu/menuMain.cjs +1 -0
  22. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  23. package/dist/cjs/pages/menu/notice.cjs +1 -0
  24. package/dist/cjs/theme/uno.css.cjs +19 -9
  25. package/dist/esm/component.js +1 -1
  26. package/dist/esm/components/layout/list.js +95 -86
  27. package/dist/esm/components/layout/table.js +122 -117
  28. package/dist/esm/components/layout/tools.js +109 -32
  29. package/dist/esm/components/list/card.js +27 -22
  30. package/dist/esm/components/list/list.js +16 -11
  31. package/dist/esm/components/table/table.js +31 -27
  32. package/dist/esm/components/table/tablePage.js +17 -12
  33. package/dist/esm/dvha-pro.css +1 -1
  34. package/dist/esm/hooks/table.js +25 -19
  35. package/dist/esm/index.js +84 -78
  36. package/dist/esm/langs/en-US.json.js +1 -1
  37. package/dist/esm/langs/zh-CN.json.js +2 -2
  38. package/dist/esm/pages/authLayout.js +20 -17
  39. package/dist/esm/pages/layout/page.js +1 -1
  40. package/dist/esm/pages/layout/tab.js +2 -2
  41. package/dist/esm/pages/menu/avatar.js +83 -71
  42. package/dist/esm/pages/menu/button.js +12 -13
  43. package/dist/esm/pages/menu/dark.js +54 -0
  44. package/dist/esm/pages/menu/menuApp.js +207 -0
  45. package/dist/esm/pages/menu/{main.js → menuMain.js} +46 -41
  46. package/dist/esm/pages/menu/mobile.js +16 -13
  47. package/dist/esm/pages/menu/notice.js +205 -0
  48. package/dist/esm/theme/uno.css.js +19 -9
  49. package/dist/types/components/layout/list.d.ts +7 -0
  50. package/dist/types/components/layout/table.d.ts +7 -0
  51. package/dist/types/components/layout/tools.d.ts +28 -2
  52. package/dist/types/components/list/card.d.ts +6 -0
  53. package/dist/types/components/list/list.d.ts +6 -0
  54. package/dist/types/components/table/tablePage.d.ts +6 -0
  55. package/dist/types/main.d.ts +12 -0
  56. package/dist/types/pages/menu/avatar.d.ts +18 -0
  57. package/dist/types/pages/menu/button.d.ts +9 -9
  58. package/dist/types/pages/menu/dark.d.ts +2 -0
  59. package/dist/types/pages/menu/index.d.ts +4 -1
  60. package/dist/types/pages/menu/{main.d.ts → menuApp.d.ts} +1 -1
  61. package/dist/types/pages/menu/menuMain.d.ts +22 -0
  62. package/dist/types/pages/menu/notice.d.ts +14 -0
  63. package/package.json +3 -3
  64. package/dist/cjs/pages/menu/main.cjs +0 -1
@@ -1,8 +1,8 @@
1
- import { defineComponent as H, toRef as v, computed as s, reactive as w, createVNode as e, h as C, mergeProps as Q, isVNode as X } from "vue";
2
- import { useI18n as Y, useJsonSchema as N, useTabStore as Z } from "@duxweb/dvha-core";
3
- import { useWindowSize as $ } from "@vueuse/core";
4
- import { NTabs as ee, NTab as te, NButton as r, NPopselect as oe, NTooltip as p, NProgress as le, NPagination as ie, NModal as ae, NDrawer as R } from "naive-ui";
5
- import { useAction as re } from "../../hooks/action.js";
1
+ import { defineComponent as Q, toRef as v, computed as u, reactive as w, createVNode as e, h as C, mergeProps as X, isVNode as Y } from "vue";
2
+ import { useI18n as Z, useJsonSchema as N, useTabStore as $ } from "@duxweb/dvha-core";
3
+ import { useWindowSize as ee } from "@vueuse/core";
4
+ import { NTabs as te, NTab as oe, NButton as r, NPopselect as ie, NTooltip as f, NProgress as le, NPagination as ae, NModal as re, NDrawer as S } from "naive-ui";
5
+ import { useAction as ne } from "../../hooks/action.js";
6
6
  import "@overlastic/vue";
7
7
  import "clsx";
8
8
  import "vue-echarts";
@@ -18,12 +18,12 @@ import "ace-builds/src-noconflict/ext-searchbox";
18
18
  import "ace-builds/src-noconflict/ext-language_tools";
19
19
  import "ace-builds/src-noconflict/mode-snippets";
20
20
  import "vue-cropper";
21
- import ne from "../modal/modalPage.js";
21
+ import se from "../modal/modalPage.js";
22
22
  import "jinrishici";
23
23
  import "lodash-es";
24
24
  import "vue-draggable-plus";
25
- import { DuxTableFilter as se } from "./filter.js";
26
- import { DuxFilterLayout as ue } from "./filterLayout.js";
25
+ import { DuxTableFilter as ue } from "./filter.js";
26
+ import { DuxFilterLayout as ce } from "./filterLayout.js";
27
27
  import "@vee-validate/i18n";
28
28
  import "colorizr";
29
29
  import "echarts";
@@ -51,10 +51,10 @@ import "vee-validate";
51
51
  import "vue-router";
52
52
  import "vue-command-palette";
53
53
  import "@duxweb/dvha-naiveui";
54
- import { DuxPage as ce } from "../../pages/page.js";
54
+ import { DuxPage as me } from "../../pages/page.js";
55
55
  import "../../pages/page404.js";
56
- import { DuxDrawerPage as S } from "../drawer/drawerPage.js";
57
- import { DuxTableTools as me } from "./tools.js";
56
+ import { DuxDrawerPage as T } from "../drawer/drawerPage.js";
57
+ import { DuxTableTools as de } from "./tools.js";
58
58
  import "short-unique-id";
59
59
  import "aieditor";
60
60
  import "@vue-flow/core";
@@ -66,12 +66,12 @@ import "../posterEditor/elements/index.js";
66
66
  import "fabric";
67
67
  import "dayjs";
68
68
  import "@tanstack/vue-query";
69
- import { useTable as de } from "../../hooks/table.js";
69
+ import { useTable as pe } from "../../hooks/table.js";
70
70
  import "pinia";
71
- function pe(t) {
72
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !X(t);
71
+ function fe(t) {
72
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Y(t);
73
73
  }
74
- const Pt = /* @__PURE__ */ H({
74
+ const zt = /* @__PURE__ */ Q({
75
75
  name: "DuxTableLayout",
76
76
  props: {
77
77
  path: {
@@ -116,112 +116,118 @@ const Pt = /* @__PURE__ */ H({
116
116
  type: String,
117
117
  default: ""
118
118
  },
119
+ batchOptions: {
120
+ type: Array
121
+ },
119
122
  hookTableProps: {
120
123
  type: Object
121
124
  }
122
125
  },
123
126
  setup(t, {
124
- slots: l
127
+ slots: i,
128
+ expose: j
125
129
  }) {
126
- const f = v(t, "filter", {}), T = v(t, "sorter", {}), j = v(t, "columns", []), {
127
- t: i
128
- } = Y(), {
129
- renderAction: L
130
- } = re(), b = de({
130
+ const b = v(t, "filter", {}), L = v(t, "sorter", {}), P = v(t, "columns", []), {
131
+ t: l
132
+ } = Z(), {
133
+ renderAction: z
134
+ } = ne(), n = pe({
131
135
  ...t.hookTableProps,
132
136
  path: t.path,
133
- filters: f.value,
134
- sorters: T.value,
135
- columns: j,
137
+ filters: b.value,
138
+ sorters: L.value,
139
+ columns: P,
136
140
  pagination: t.pagination
137
- }), {
138
- columns: x,
139
- tablePagination: P,
140
- table: z,
141
- onUpdateColumnSelected: D,
142
- onUpdateChecked: O,
143
- columnSelected: A,
144
- autoRefetch: U,
145
- autoCountdown: y,
141
+ });
142
+ j(n);
143
+ const {
144
+ columns: y,
145
+ tablePagination: D,
146
+ table: x,
147
+ onUpdateColumnSelected: O,
148
+ onUpdateChecked: A,
149
+ columnSelected: U,
150
+ autoRefetch: B,
151
+ autoCountdown: k,
146
152
  onAutoRefetch: E,
147
153
  isExporting: F,
148
154
  isExportingRows: I,
149
155
  isImporting: V,
150
156
  onExport: W,
151
- onExportRows: B,
157
+ onExportRows: K,
152
158
  onImport: M
153
- } = b, _ = s(() => x.value.filter((o) => "title" in o && "key" in o).map((o) => ({
159
+ } = n, _ = u(() => y.value.filter((o) => "title" in o && "key" in o).map((o) => ({
154
160
  label: o.title,
155
161
  value: o.key
156
162
  }))), {
157
- width: n
158
- } = $(), q = s(() => x.value.reduce((a, d) => a + (Number(d?.width) || Number(d?.minWidth) || 110), 0)), u = w({
159
- show: !1
160
- }), c = w({
163
+ width: s
164
+ } = ee(), q = u(() => y.value.reduce((a, p) => a + (Number(p?.width) || Number(p?.minWidth) || 110), 0)), c = w({
161
165
  show: !1
162
166
  }), m = w({
163
167
  show: !1
164
- }), h = s(() => (t.filterSchema || []).map((o) => {
168
+ }), d = w({
169
+ show: !1
170
+ }), h = u(() => (t.filterSchema || []).map((o) => {
165
171
  const {
166
172
  label: a,
167
- ...d
173
+ ...p
168
174
  } = o;
169
175
  return {
170
- tag: se,
176
+ tag: ue,
171
177
  attrs: {
172
178
  label: a
173
179
  },
174
- children: d
180
+ children: p
175
181
  };
176
182
  })), {
177
183
  render: J
178
184
  } = N({
179
- data: s(() => h.value?.slice(t.filterNumber))
185
+ data: u(() => h.value?.slice(t.filterNumber))
180
186
  }), {
181
- render: K
187
+ render: G
182
188
  } = N({
183
- data: s(() => h.value?.slice(0, t.filterNumber))
184
- }), g = s(() => ({
189
+ data: u(() => h.value?.slice(0, t.filterNumber))
190
+ }), g = u(() => ({
185
191
  import: !1,
186
192
  export: !0,
187
193
  refresh: !0,
188
194
  ...t.tools
189
- })), k = Z(), G = k.tabs.find((o) => o.path === k.current);
190
- return () => e(ce, {
195
+ })), R = $(), H = R.tabs.find((o) => o.path === R.current);
196
+ return () => e(me, {
191
197
  actions: t.actions,
192
198
  scrollbar: !1
193
199
  }, {
194
- sideLeft: () => l?.sideLeft && n.value >= 1024 ? l?.sideLeft?.() : void 0,
195
- sideRight: () => l?.sideRight && n.value >= 1024 ? l?.sideRight?.() : void 0,
200
+ sideLeft: () => i?.sideLeft && s.value >= 1024 ? i?.sideLeft?.() : void 0,
201
+ sideRight: () => i?.sideRight && s.value >= 1024 ? i?.sideRight?.() : void 0,
196
202
  default: () => e("div", {
197
203
  class: "flex flex-col gap-2 h-full relative"
198
204
  }, [e("div", {
199
205
  class: "flex gap-2 justify-between flex-col lg:flex-row"
200
206
  }, [t.tabs && e("div", {
201
207
  class: "flex flex-none"
202
- }, [e(ee, {
208
+ }, [e(te, {
203
209
  type: "segment",
204
210
  size: "small",
205
211
  style: {
206
212
  "--n-tab-padding": "4px 10px"
207
213
  },
208
214
  "default-value": t.tabs?.[0]?.value,
209
- value: f.value?.tab,
215
+ value: b.value?.tab,
210
216
  onUpdateValue: (o) => {
211
- f.value.tab = o;
217
+ b.value.tab = o;
212
218
  }
213
219
  }, {
214
- default: () => [t.tabs?.map((o) => e(te, {
220
+ default: () => [t.tabs?.map((o) => e(oe, {
215
221
  name: o.value,
216
222
  tab: o.label
217
223
  }, null))]
218
224
  })]), e("div", {
219
225
  class: ["overflow-hidden flex-1 flex gap-2"]
220
- }, [l?.sideLeft && n.value < 1024 && e(r, {
226
+ }, [i?.sideLeft && s.value < 1024 && e(r, {
221
227
  class: "flex-none",
222
228
  secondary: !0,
223
229
  onClick: () => {
224
- c.show = !c.show;
230
+ m.show = !m.show;
225
231
  }
226
232
  }, {
227
233
  icon: () => e("div", {
@@ -231,11 +237,11 @@ const Pt = /* @__PURE__ */ H({
231
237
  class: ["flex-1 flex flex-col lg:flex-row gap-2 flex-wrap", t.tabs ? "justify-end" : "justify-start"]
232
238
  }, [!t.tabs && !t.filterSchema?.length && e("div", {
233
239
  class: "flex flex-none items-center text-base font-medium"
234
- }, [G?.label]), C(K)]), l?.sideRight && n.value < 1024 && e(r, {
240
+ }, [H?.label]), C(G)]), i?.sideRight && s.value < 1024 && e(r, {
235
241
  class: "flex-none",
236
242
  secondary: !0,
237
243
  onClick: () => {
238
- m.show = !m.show;
244
+ d.show = !d.show;
239
245
  }
240
246
  }, {
241
247
  icon: () => e("div", {
@@ -248,24 +254,24 @@ const Pt = /* @__PURE__ */ H({
248
254
  }, [h.value.length > t.filterNumber && e(r, {
249
255
  iconPlacement: "right",
250
256
  onClick: () => {
251
- u.show = !u.show;
257
+ c.show = !c.show;
252
258
  }
253
259
  }, {
254
- default: () => i("components.button.filter"),
260
+ default: () => l("components.button.filter"),
255
261
  icon: () => e("div", {
256
262
  class: ["i-tabler:chevrons-down size-4 transition-all"]
257
263
  }, null)
258
- }), l?.tools?.(), e(oe, {
264
+ }), i?.tools?.(), e(ie, {
259
265
  options: _.value,
260
- value: A.value,
266
+ value: U.value,
261
267
  onUpdateValue: (o) => {
262
- D(o);
268
+ O(o);
263
269
  },
264
270
  multiple: !0,
265
271
  placement: "bottom-start",
266
272
  trigger: "click"
267
273
  }, {
268
- default: () => [e(p, null, {
274
+ default: () => [e(f, null, {
269
275
  trigger: () => e(r, {
270
276
  secondary: !0,
271
277
  "icon-placement": "right"
@@ -274,9 +280,9 @@ const Pt = /* @__PURE__ */ H({
274
280
  class: "i-tabler:columns size-4"
275
281
  }, null)
276
282
  }),
277
- default: () => i("components.list.columnSetting")
283
+ default: () => l("components.list.columnSetting")
278
284
  })]
279
- }), g.value.export && e(p, null, {
285
+ }), g.value.export && e(f, null, {
280
286
  trigger: () => e(r, {
281
287
  secondary: !0,
282
288
  loading: F.value,
@@ -286,8 +292,8 @@ const Pt = /* @__PURE__ */ H({
286
292
  class: "i-tabler:database-export size-4"
287
293
  }, null)
288
294
  }),
289
- default: () => i("components.button.export")
290
- }), g.value.import && e(p, null, {
295
+ default: () => l("components.button.export")
296
+ }), g.value.import && e(f, null, {
291
297
  trigger: () => e(r, {
292
298
  secondary: !0,
293
299
  loading: V.value,
@@ -297,115 +303,114 @@ const Pt = /* @__PURE__ */ H({
297
303
  class: "i-tabler:database-import size-4"
298
304
  }, null)
299
305
  }),
300
- default: () => i("components.button.import")
301
- }), g.value.refresh && e(p, null, {
306
+ default: () => l("components.button.import")
307
+ }), g.value.refresh && e(f, null, {
302
308
  trigger: () => e(r, {
303
309
  secondary: !0,
304
310
  onClick: E
305
311
  }, {
306
- icon: () => U.value ? e(le, {
312
+ icon: () => B.value ? e(le, {
307
313
  class: "size-4",
308
314
  type: "circle",
309
- percentage: y.value * 10,
315
+ percentage: k.value * 10,
310
316
  strokeWidth: 20,
311
317
  color: "rgba(var(--ui-color-primary))"
312
318
  }, {
313
319
  default: () => [e("span", {
314
320
  class: "text-8px"
315
- }, [y.value])]
321
+ }, [k.value])]
316
322
  }) : e("div", {
317
323
  class: "i-tabler:refresh size-4"
318
324
  }, null)
319
325
  }),
320
- default: () => i("components.button.autoRefresh")
326
+ default: () => l("components.button.autoRefresh")
321
327
  })]), e("div", {
322
328
  class: "flex gap-2 justify-end"
323
- }, [l.actions?.(), t.actions?.length > 0 && L({
324
- type: n.value < 1024 ? "dropdown" : "button",
329
+ }, [i.actions?.(), t.actions?.length > 0 && z({
330
+ type: s.value < 1024 ? "dropdown" : "button",
325
331
  items: t.actions
326
- })])])]), l?.header?.(), e("div", {
332
+ })])])]), i?.header?.(), e("div", {
327
333
  class: "flex-1 min-h-0"
328
- }, [l?.default?.({
329
- ...b,
334
+ }, [i?.default?.({
335
+ ...n,
330
336
  width: q.value
331
337
  })]), e("div", {
332
338
  class: "flex justify-between"
333
- }, [e("div", null, [l?.bottom?.()]), e("div", null, [t.pagination && e(ie, Q(P.value, {
334
- simple: n.value < 768
339
+ }, [e("div", null, [i?.bottom?.()]), e("div", null, [t.pagination && e(ae, X(D.value, {
340
+ simple: s.value < 768
335
341
  }), {
336
- prefix: () => e("div", null, [i("components.list.total", {
337
- total: b.total.value || 0
342
+ prefix: () => e("div", null, [l("components.list.total", {
343
+ total: n.total.value || 0
338
344
  })])
339
- })])]), e(me, {
340
- number: z.value.checkedRowKeys?.length || 0 || 0,
345
+ })])]), e(de, {
346
+ isLoading: n.isBatching.value,
347
+ onBatch: n.onBatch,
348
+ selecteds: x.value.checkedRowKeys,
349
+ number: x.value.checkedRowKeys?.length || 0 || 0,
341
350
  group: [[{
342
351
  icon: "i-tabler:x",
343
352
  onClick: () => {
344
- O?.([]);
353
+ A?.([]);
345
354
  }
346
355
  }], [{
347
- label: i("components.button.export"),
356
+ label: l("components.button.export"),
348
357
  icon: "i-tabler:file-export",
349
358
  loading: I.value,
350
- onClick: B
351
- }, {
352
- label: i("components.button.delete"),
353
- type: "error",
354
- icon: "i-tabler:trash"
355
- }]]
356
- }, null), e(ae, {
359
+ onClick: K
360
+ }, ...t.batchOptions || []]]
361
+ }, null), e(re, {
357
362
  draggable: !0,
358
363
  class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur min-w-110",
359
- show: u.show,
360
- onUpdateShow: (o) => u.show = o
364
+ show: c.show,
365
+ onUpdateShow: (o) => c.show = o
361
366
  }, {
362
367
  default: ({
363
368
  draggableClass: o
364
369
  }) => {
365
370
  let a;
366
- return e(ne, {
367
- title: i("components.button.filter"),
371
+ return e(se, {
372
+ title: l("components.button.filter"),
368
373
  handle: o,
369
- onClose: () => u.show = !1
374
+ onClose: () => c.show = !1
370
375
  }, {
371
- default: () => [e(ue, {
376
+ default: () => [e(ce, {
372
377
  showLabel: !0,
373
378
  labelPlacement: "top"
374
- }, pe(a = C(J)) ? a : {
379
+ }, fe(a = C(J)) ? a : {
375
380
  default: () => [a]
376
381
  })]
377
382
  });
378
383
  }
379
- }), e(R, {
380
- show: c.show,
381
- onUpdateShow: (o) => c.show = o,
384
+ }), e(S, {
385
+ show: m.show,
386
+ onUpdateShow: (o) => m.show = o,
382
387
  autoFocus: !1,
383
388
  placement: "left"
384
389
  }, {
385
- default: () => [e(S, {
386
- title: t.sideLeftTitle || i("components.button.sideLeft"),
387
- onClose: () => c.show = !1,
390
+ default: () => [e(T, {
391
+ title: t.sideLeftTitle || l("components.button.sideLeft"),
392
+ onClose: () => m.show = !1,
388
393
  scrollbar: !1
389
394
  }, {
390
- default: () => [l?.sideLeft?.()]
395
+ default: () => [i?.sideLeft?.()]
391
396
  })]
392
- }), e(R, {
393
- show: m.show,
394
- onUpdateShow: (o) => m.show = o,
397
+ }), e(S, {
398
+ show: d.show,
399
+ onUpdateShow: (o) => d.show = o,
395
400
  autoFocus: !1,
396
401
  placement: "right"
397
402
  }, {
398
- default: () => [e(S, {
399
- title: t.sideRightTitle || i("components.button.sideRight"),
400
- onClose: () => m.show = !1,
403
+ default: () => [e(T, {
404
+ title: t.sideRightTitle || l("components.button.sideRight"),
405
+ onClose: () => d.show = !1,
401
406
  scrollbar: !1
402
407
  }, {
403
- default: () => [l?.sideRight?.()]
408
+ default: () => [i?.sideRight?.()]
404
409
  })]
405
410
  })])
406
411
  });
407
412
  }
408
413
  });
409
414
  export {
410
- Pt as DuxTableLayout
415
+ zt as DuxTableLayout
411
416
  };
@@ -1,9 +1,80 @@
1
- import { defineComponent as d, computed as o, createVNode as e, Transition as c, Fragment as p } from "vue";
2
- import { useI18n as m } from "@duxweb/dvha-core";
3
- import { NButton as r, NDropdown as y } from "naive-ui";
4
- const v = /* @__PURE__ */ d({
1
+ import { defineComponent as u, computed as a, createVNode as o, Transition as d, Fragment as c } from "vue";
2
+ import { useI18n as f } from "@duxweb/dvha-core";
3
+ import { NButton as l, NDropdown as y } from "naive-ui";
4
+ import "vue-router";
5
+ import { useDialog as g } from "../../hooks/dialog.js";
6
+ import "@overlastic/vue";
7
+ import "clsx";
8
+ import "vue-echarts";
9
+ import "@vueuse/core";
10
+ import "vue3-ace-editor";
11
+ import "ace-builds/src-noconflict/mode-vue";
12
+ import "ace-builds/src-noconflict/mode-javascript";
13
+ import "ace-builds/src-noconflict/mode-html";
14
+ import "ace-builds/src-noconflict/mode-json";
15
+ import "ace-builds/src-noconflict/mode-json5";
16
+ import "ace-builds/src-noconflict/theme-tomorrow_night";
17
+ import "ace-builds/src-noconflict/theme-tomorrow";
18
+ import "ace-builds/src-noconflict/ext-searchbox";
19
+ import "ace-builds/src-noconflict/ext-language_tools";
20
+ import "ace-builds/src-noconflict/mode-snippets";
21
+ import "vue-cropper";
22
+ import "jinrishici";
23
+ import "lodash-es";
24
+ import "vue-draggable-plus";
25
+ import "@vee-validate/i18n";
26
+ import "colorizr";
27
+ import "echarts";
28
+ import "highlight.js/lib/core";
29
+ import "highlight.js/lib/languages/bash";
30
+ import "highlight.js/lib/languages/css";
31
+ import "highlight.js/lib/languages/go";
32
+ import "highlight.js/lib/languages/java";
33
+ import "highlight.js/lib/languages/javascript";
34
+ import "highlight.js/lib/languages/json";
35
+ import "highlight.js/lib/languages/markdown";
36
+ import "highlight.js/lib/languages/php";
37
+ import "highlight.js/lib/languages/python";
38
+ import "highlight.js/lib/languages/shell";
39
+ import "highlight.js/lib/languages/sql";
40
+ import "highlight.js/lib/languages/typescript";
41
+ import "highlight.js/lib/languages/xml";
42
+ import "@ant-design/colors";
43
+ import "@unocss/preset-icons/browser";
44
+ import "@unocss/preset-typography";
45
+ import "unocss/preset-wind4";
46
+ import "@vee-validate/i18n/dist/locale/en.json";
47
+ import "@vee-validate/i18n/dist/locale/zh_CN.json";
48
+ import "vee-validate";
49
+ import "vue-command-palette";
50
+ import "@duxweb/dvha-naiveui";
51
+ import "../../pages/page404.js";
52
+ import "short-unique-id";
53
+ import "aieditor";
54
+ import "@vue-flow/core";
55
+ import "@vue-flow/background";
56
+ /* empty css */
57
+ import "mime";
58
+ import "@iconify-json/tabler/icons.json";
59
+ import "../posterEditor/elements/index.js";
60
+ import "fabric";
61
+ import "dayjs";
62
+ import "@tanstack/vue-query";
63
+ import "pinia";
64
+ const Bt = /* @__PURE__ */ u({
5
65
  name: "DuxTableTools",
6
66
  props: {
67
+ selecteds: {
68
+ type: Array,
69
+ default: []
70
+ },
71
+ isLoading: {
72
+ type: Boolean,
73
+ default: !1
74
+ },
75
+ onBatch: {
76
+ type: Function
77
+ },
7
78
  number: {
8
79
  type: Number
9
80
  },
@@ -19,11 +90,11 @@ const v = /* @__PURE__ */ d({
19
90
  },
20
91
  setup(t) {
21
92
  const {
22
- t: s
23
- } = m(), n = o(() => t.group ? t.group : [t.options]), u = o(() => t.number && t.number > 0);
24
- return () => e("div", {
93
+ t: r
94
+ } = f(), i = a(() => t.group ? t.group : [t.options]), m = a(() => t.number && t.number > 0), p = g();
95
+ return () => o("div", {
25
96
  class: "absolute bottom-0 left-0 right-0 pointer-events-none"
26
- }, [e(c, {
97
+ }, [o(d, {
27
98
  name: "slide-up",
28
99
  appear: !0,
29
100
  enterActiveClass: "transition-all duration-200 ease-out",
@@ -33,36 +104,42 @@ const v = /* @__PURE__ */ d({
33
104
  leaveFromClass: "transform translate-y-0 opacity-100",
34
105
  leaveToClass: "transform translate-y-full opacity-0"
35
106
  }, {
36
- default: () => [u.value ? e("div", {
37
- class: "flex h-12 px-1 justify-between lg:justify-center gap-2 pointer-events-auto backdrop-blur"
38
- }, [n.value?.map((i, l) => e("div", {
39
- class: "h-10 mt-1 bg-gray-800 rounded px-4 py-1 shadow-lg flex items-center gap-4"
40
- }, [l === n.value.length - 1 && e(p, null, [e("span", {
41
- class: "text-gray-300"
42
- }, [s("components.list.selectedItems", {
107
+ default: () => [m.value ? o("div", {
108
+ class: "flex h-12 px-1 justify-between lg:justify-center gap-2 pointer-events-auto"
109
+ }, [i.value?.map((s, n) => o("div", {
110
+ class: "h-10 mt-1 bg-default rounded px-4 py-1 shadow flex items-center gap-4"
111
+ }, [n === i.value.length - 1 && o(c, null, [o("span", {
112
+ class: " "
113
+ }, [r("components.list.selectedItems", {
43
114
  num: t.number || 0
44
- })]), e("div", {
45
- class: "w-px h-4 bg-gray-600"
46
- }, null)]), i?.map((a) => e(r, {
115
+ })]), o("div", {
116
+ class: "w-px h-4 bg-elevated"
117
+ }, null)]), s?.map((e) => o(l, {
47
118
  text: !0,
48
- onClick: a.onClick,
49
- class: "text-gray-300",
50
- loading: a.loading,
51
- disabled: a.disabled,
52
- type: a.type
119
+ onClick: () => {
120
+ e.onClick ? e.onClick?.(t.selecteds) : e.key && p.confirm({
121
+ title: r("components.list.batchTitle"),
122
+ content: r("components.list.batchContent")
123
+ }).then(() => {
124
+ t.onBatch?.("delivery");
125
+ }).catch(() => {
126
+ });
127
+ },
128
+ loading: e.loading || t.isLoading,
129
+ disabled: e.disabled || e.loading || t.isLoading,
130
+ type: e.type
53
131
  }, {
54
- default: () => a.label,
55
- icon: () => e("div", {
56
- class: a.icon
132
+ default: () => e.label,
133
+ icon: () => o("div", {
134
+ class: e.icon
57
135
  }, null)
58
- })), l === n.value.length - 1 && t.dropdown && t.dropdown.length > 0 && e(y, {
136
+ })), n === i.value.length - 1 && t.dropdown && t.dropdown.length > 0 && o(y, {
59
137
  options: t.dropdown
60
138
  }, {
61
- default: () => [e(r, {
62
- text: !0,
63
- class: "text-gray-300"
139
+ default: () => [o(l, {
140
+ text: !0
64
141
  }, {
65
- icon: () => e("div", {
142
+ icon: () => o("div", {
66
143
  class: "i-tabler:dots-vertical size-4"
67
144
  }, null)
68
145
  })]
@@ -71,5 +148,5 @@ const v = /* @__PURE__ */ d({
71
148
  }
72
149
  });
73
150
  export {
74
- v as DuxTableTools
151
+ Bt as DuxTableTools
75
152
  };