@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.
- package/dist/cjs/component.cjs +1 -1
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/layout/tools.cjs +1 -1
- package/dist/cjs/components/list/card.cjs +1 -1
- package/dist/cjs/components/list/list.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/cjs/components/table/tablePage.cjs +1 -1
- package/dist/cjs/dvha-pro.css +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/pages/authLayout.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/layout/tab.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/dark.cjs +1 -0
- package/dist/cjs/pages/menu/menuApp.cjs +1 -0
- package/dist/cjs/pages/menu/menuMain.cjs +1 -0
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/menu/notice.cjs +1 -0
- package/dist/cjs/theme/uno.css.cjs +19 -9
- package/dist/esm/component.js +1 -1
- package/dist/esm/components/layout/list.js +95 -86
- package/dist/esm/components/layout/table.js +122 -117
- package/dist/esm/components/layout/tools.js +109 -32
- package/dist/esm/components/list/card.js +27 -22
- package/dist/esm/components/list/list.js +16 -11
- package/dist/esm/components/table/table.js +31 -27
- package/dist/esm/components/table/tablePage.js +17 -12
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/table.js +25 -19
- package/dist/esm/index.js +84 -78
- package/dist/esm/langs/en-US.json.js +1 -1
- package/dist/esm/langs/zh-CN.json.js +2 -2
- package/dist/esm/pages/authLayout.js +20 -17
- package/dist/esm/pages/layout/page.js +1 -1
- package/dist/esm/pages/layout/tab.js +2 -2
- package/dist/esm/pages/menu/avatar.js +83 -71
- package/dist/esm/pages/menu/button.js +12 -13
- package/dist/esm/pages/menu/dark.js +54 -0
- package/dist/esm/pages/menu/menuApp.js +207 -0
- package/dist/esm/pages/menu/{main.js → menuMain.js} +46 -41
- package/dist/esm/pages/menu/mobile.js +16 -13
- package/dist/esm/pages/menu/notice.js +205 -0
- package/dist/esm/theme/uno.css.js +19 -9
- package/dist/types/components/layout/list.d.ts +7 -0
- package/dist/types/components/layout/table.d.ts +7 -0
- package/dist/types/components/layout/tools.d.ts +28 -2
- package/dist/types/components/list/card.d.ts +6 -0
- package/dist/types/components/list/list.d.ts +6 -0
- package/dist/types/components/table/tablePage.d.ts +6 -0
- package/dist/types/main.d.ts +12 -0
- package/dist/types/pages/menu/avatar.d.ts +18 -0
- package/dist/types/pages/menu/button.d.ts +9 -9
- package/dist/types/pages/menu/dark.d.ts +2 -0
- package/dist/types/pages/menu/index.d.ts +4 -1
- package/dist/types/pages/menu/{main.d.ts → menuApp.d.ts} +1 -1
- package/dist/types/pages/menu/menuMain.d.ts +22 -0
- package/dist/types/pages/menu/notice.d.ts +14 -0
- package/package.json +3 -3
- package/dist/cjs/pages/menu/main.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useWindowSize as
|
|
4
|
-
import { NTabs as
|
|
5
|
-
import { useAction as
|
|
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
|
|
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
|
|
26
|
-
import { DuxFilterLayout as
|
|
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
|
|
54
|
+
import { DuxPage as me } from "../../pages/page.js";
|
|
55
55
|
import "../../pages/page404.js";
|
|
56
|
-
import { DuxDrawerPage as
|
|
57
|
-
import { DuxTableTools as
|
|
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
|
|
69
|
+
import { useTable as pe } from "../../hooks/table.js";
|
|
70
70
|
import "pinia";
|
|
71
|
-
function
|
|
72
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
71
|
+
function fe(t) {
|
|
72
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Y(t);
|
|
73
73
|
}
|
|
74
|
-
const
|
|
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:
|
|
127
|
+
slots: i,
|
|
128
|
+
expose: j
|
|
125
129
|
}) {
|
|
126
|
-
const
|
|
127
|
-
t:
|
|
128
|
-
} =
|
|
129
|
-
renderAction:
|
|
130
|
-
} =
|
|
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:
|
|
134
|
-
sorters:
|
|
135
|
-
columns:
|
|
137
|
+
filters: b.value,
|
|
138
|
+
sorters: L.value,
|
|
139
|
+
columns: P,
|
|
136
140
|
pagination: t.pagination
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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:
|
|
157
|
+
onExportRows: K,
|
|
152
158
|
onImport: M
|
|
153
|
-
} =
|
|
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:
|
|
158
|
-
} =
|
|
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
|
-
}),
|
|
168
|
+
}), d = w({
|
|
169
|
+
show: !1
|
|
170
|
+
}), h = u(() => (t.filterSchema || []).map((o) => {
|
|
165
171
|
const {
|
|
166
172
|
label: a,
|
|
167
|
-
...
|
|
173
|
+
...p
|
|
168
174
|
} = o;
|
|
169
175
|
return {
|
|
170
|
-
tag:
|
|
176
|
+
tag: ue,
|
|
171
177
|
attrs: {
|
|
172
178
|
label: a
|
|
173
179
|
},
|
|
174
|
-
children:
|
|
180
|
+
children: p
|
|
175
181
|
};
|
|
176
182
|
})), {
|
|
177
183
|
render: J
|
|
178
184
|
} = N({
|
|
179
|
-
data:
|
|
185
|
+
data: u(() => h.value?.slice(t.filterNumber))
|
|
180
186
|
}), {
|
|
181
|
-
render:
|
|
187
|
+
render: G
|
|
182
188
|
} = N({
|
|
183
|
-
data:
|
|
184
|
-
}), g =
|
|
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
|
-
})),
|
|
190
|
-
return () => e(
|
|
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: () =>
|
|
195
|
-
sideRight: () =>
|
|
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(
|
|
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:
|
|
215
|
+
value: b.value?.tab,
|
|
210
216
|
onUpdateValue: (o) => {
|
|
211
|
-
|
|
217
|
+
b.value.tab = o;
|
|
212
218
|
}
|
|
213
219
|
}, {
|
|
214
|
-
default: () => [t.tabs?.map((o) => e(
|
|
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
|
-
}, [
|
|
226
|
+
}, [i?.sideLeft && s.value < 1024 && e(r, {
|
|
221
227
|
class: "flex-none",
|
|
222
228
|
secondary: !0,
|
|
223
229
|
onClick: () => {
|
|
224
|
-
|
|
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
|
-
}, [
|
|
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
|
-
|
|
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
|
-
|
|
257
|
+
c.show = !c.show;
|
|
252
258
|
}
|
|
253
259
|
}, {
|
|
254
|
-
default: () =>
|
|
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
|
-
}),
|
|
264
|
+
}), i?.tools?.(), e(ie, {
|
|
259
265
|
options: _.value,
|
|
260
|
-
value:
|
|
266
|
+
value: U.value,
|
|
261
267
|
onUpdateValue: (o) => {
|
|
262
|
-
|
|
268
|
+
O(o);
|
|
263
269
|
},
|
|
264
270
|
multiple: !0,
|
|
265
271
|
placement: "bottom-start",
|
|
266
272
|
trigger: "click"
|
|
267
273
|
}, {
|
|
268
|
-
default: () => [e(
|
|
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: () =>
|
|
283
|
+
default: () => l("components.list.columnSetting")
|
|
278
284
|
})]
|
|
279
|
-
}), g.value.export && e(
|
|
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: () =>
|
|
290
|
-
}), g.value.import && e(
|
|
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: () =>
|
|
301
|
-
}), g.value.refresh && e(
|
|
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: () =>
|
|
312
|
+
icon: () => B.value ? e(le, {
|
|
307
313
|
class: "size-4",
|
|
308
314
|
type: "circle",
|
|
309
|
-
percentage:
|
|
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
|
-
}, [
|
|
321
|
+
}, [k.value])]
|
|
316
322
|
}) : e("div", {
|
|
317
323
|
class: "i-tabler:refresh size-4"
|
|
318
324
|
}, null)
|
|
319
325
|
}),
|
|
320
|
-
default: () =>
|
|
326
|
+
default: () => l("components.button.autoRefresh")
|
|
321
327
|
})]), e("div", {
|
|
322
328
|
class: "flex gap-2 justify-end"
|
|
323
|
-
}, [
|
|
324
|
-
type:
|
|
329
|
+
}, [i.actions?.(), t.actions?.length > 0 && z({
|
|
330
|
+
type: s.value < 1024 ? "dropdown" : "button",
|
|
325
331
|
items: t.actions
|
|
326
|
-
})])])]),
|
|
332
|
+
})])])]), i?.header?.(), e("div", {
|
|
327
333
|
class: "flex-1 min-h-0"
|
|
328
|
-
}, [
|
|
329
|
-
...
|
|
334
|
+
}, [i?.default?.({
|
|
335
|
+
...n,
|
|
330
336
|
width: q.value
|
|
331
337
|
})]), e("div", {
|
|
332
338
|
class: "flex justify-between"
|
|
333
|
-
}, [e("div", null, [
|
|
334
|
-
simple:
|
|
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, [
|
|
337
|
-
total:
|
|
342
|
+
prefix: () => e("div", null, [l("components.list.total", {
|
|
343
|
+
total: n.total.value || 0
|
|
338
344
|
})])
|
|
339
|
-
})])]), e(
|
|
340
|
-
|
|
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
|
-
|
|
353
|
+
A?.([]);
|
|
345
354
|
}
|
|
346
355
|
}], [{
|
|
347
|
-
label:
|
|
356
|
+
label: l("components.button.export"),
|
|
348
357
|
icon: "i-tabler:file-export",
|
|
349
358
|
loading: I.value,
|
|
350
|
-
onClick:
|
|
351
|
-
},
|
|
352
|
-
|
|
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:
|
|
360
|
-
onUpdateShow: (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(
|
|
367
|
-
title:
|
|
371
|
+
return e(se, {
|
|
372
|
+
title: l("components.button.filter"),
|
|
368
373
|
handle: o,
|
|
369
|
-
onClose: () =>
|
|
374
|
+
onClose: () => c.show = !1
|
|
370
375
|
}, {
|
|
371
|
-
default: () => [e(
|
|
376
|
+
default: () => [e(ce, {
|
|
372
377
|
showLabel: !0,
|
|
373
378
|
labelPlacement: "top"
|
|
374
|
-
},
|
|
379
|
+
}, fe(a = C(J)) ? a : {
|
|
375
380
|
default: () => [a]
|
|
376
381
|
})]
|
|
377
382
|
});
|
|
378
383
|
}
|
|
379
|
-
}), e(
|
|
380
|
-
show:
|
|
381
|
-
onUpdateShow: (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(
|
|
386
|
-
title: t.sideLeftTitle ||
|
|
387
|
-
onClose: () =>
|
|
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: () => [
|
|
395
|
+
default: () => [i?.sideLeft?.()]
|
|
391
396
|
})]
|
|
392
|
-
}), e(
|
|
393
|
-
show:
|
|
394
|
-
onUpdateShow: (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(
|
|
399
|
-
title: t.sideRightTitle ||
|
|
400
|
-
onClose: () =>
|
|
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: () => [
|
|
408
|
+
default: () => [i?.sideRight?.()]
|
|
404
409
|
})]
|
|
405
410
|
})])
|
|
406
411
|
});
|
|
407
412
|
}
|
|
408
413
|
});
|
|
409
414
|
export {
|
|
410
|
-
|
|
415
|
+
zt as DuxTableLayout
|
|
411
416
|
};
|
|
@@ -1,9 +1,80 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { NButton as
|
|
4
|
-
|
|
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:
|
|
23
|
-
} =
|
|
24
|
-
return () =>
|
|
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
|
-
}, [
|
|
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: () => [
|
|
37
|
-
class: "flex h-12 px-1 justify-between lg:justify-center gap-2 pointer-events-auto
|
|
38
|
-
}, [
|
|
39
|
-
class: "h-10 mt-1 bg-
|
|
40
|
-
}, [
|
|
41
|
-
class: "
|
|
42
|
-
}, [
|
|
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
|
-
})]),
|
|
45
|
-
class: "w-px h-4 bg-
|
|
46
|
-
}, null)]),
|
|
115
|
+
})]), o("div", {
|
|
116
|
+
class: "w-px h-4 bg-elevated"
|
|
117
|
+
}, null)]), s?.map((e) => o(l, {
|
|
47
118
|
text: !0,
|
|
48
|
-
onClick:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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: () =>
|
|
55
|
-
icon: () =>
|
|
56
|
-
class:
|
|
132
|
+
default: () => e.label,
|
|
133
|
+
icon: () => o("div", {
|
|
134
|
+
class: e.icon
|
|
57
135
|
}, null)
|
|
58
|
-
})),
|
|
136
|
+
})), n === i.value.length - 1 && t.dropdown && t.dropdown.length > 0 && o(y, {
|
|
59
137
|
options: t.dropdown
|
|
60
138
|
}, {
|
|
61
|
-
default: () => [
|
|
62
|
-
text: !0
|
|
63
|
-
class: "text-gray-300"
|
|
139
|
+
default: () => [o(l, {
|
|
140
|
+
text: !0
|
|
64
141
|
}, {
|
|
65
|
-
icon: () =>
|
|
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
|
-
|
|
151
|
+
Bt as DuxTableTools
|
|
75
152
|
};
|