@duxweb/dvha-pro 1.1.1 → 1.1.2
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/components/form/modalForm.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/widget/image.cjs +1 -1
- package/dist/cjs/components/widget/placeholder.cjs +1 -1
- package/dist/cjs/dvha-pro.css +1 -1
- package/dist/cjs/theme/uno.css.cjs +6 -5
- package/dist/esm/components/form/modalForm.js +36 -38
- package/dist/esm/components/layout/list.js +226 -226
- package/dist/esm/components/layout/table.js +238 -192
- package/dist/esm/components/layout/tools.js +1 -1
- package/dist/esm/components/widget/image.js +20 -55
- package/dist/esm/components/widget/placeholder.js +41 -57
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/theme/uno.css.js +6 -5
- package/dist/types/components/chart/echart.d.ts +1 -1
- package/dist/types/components/modal/modalPage.d.ts +1 -1
- package/dist/types/components/modal/modalTab.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useWindowSize as
|
|
4
|
-
import {
|
|
5
|
-
import { useAction as
|
|
1
|
+
import { defineComponent as Q, toRef as z, reactive as x, computed as m, ref as w, watch as L, nextTick as v, onMounted as G, createVNode as e, h as H, mergeProps as X } from "vue";
|
|
2
|
+
import { useI18n as Y, useExtendList as Z, useJsonSchema as _ } from "@duxweb/dvha-core";
|
|
3
|
+
import { useWindowSize as $ } from "@vueuse/core";
|
|
4
|
+
import { NTabs as ee, NTab as te, NButton as u, NSpin as ae, NTooltip as g, NCheckbox as ie, NProgress as le, NPagination as oe, NDrawer as R } from "naive-ui";
|
|
5
|
+
import { useAction as re } from "../../hooks/action.js";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "vue-echarts";
|
|
@@ -18,12 +18,10 @@ 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 me from "../modal/modalPage.js";
|
|
22
21
|
import "jinrishici";
|
|
23
22
|
import "lodash-es";
|
|
24
23
|
import "vue-draggable-plus";
|
|
25
|
-
import { DuxTableFilter as
|
|
26
|
-
import { DuxFilterLayout as he } from "./filterLayout.js";
|
|
24
|
+
import { DuxTableFilter as ne } from "./filter.js";
|
|
27
25
|
import "@vee-validate/i18n";
|
|
28
26
|
import "colorizr";
|
|
29
27
|
import "echarts";
|
|
@@ -51,11 +49,11 @@ import "vee-validate";
|
|
|
51
49
|
import "vue-router";
|
|
52
50
|
import "vue-command-palette";
|
|
53
51
|
import "@duxweb/dvha-naiveui";
|
|
54
|
-
import { DuxPage as
|
|
52
|
+
import { DuxPage as se } from "../../pages/page.js";
|
|
55
53
|
import "../../pages/page404.js";
|
|
56
|
-
import { DuxPageEmpty as
|
|
57
|
-
import { DuxDrawerPage as
|
|
58
|
-
import { DuxTableTools as
|
|
54
|
+
import { DuxPageEmpty as ue } from "../../pages/pageEmpty.js";
|
|
55
|
+
import { DuxDrawerPage as j } from "../drawer/drawerPage.js";
|
|
56
|
+
import { DuxTableTools as ce } from "./tools.js";
|
|
59
57
|
import "short-unique-id";
|
|
60
58
|
import "aieditor";
|
|
61
59
|
import "@vue-flow/core";
|
|
@@ -68,10 +66,7 @@ import "fabric";
|
|
|
68
66
|
import "dayjs";
|
|
69
67
|
import "@tanstack/vue-query";
|
|
70
68
|
import "pinia";
|
|
71
|
-
|
|
72
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !le(t);
|
|
73
|
-
}
|
|
74
|
-
const Ot = /* @__PURE__ */ Z({
|
|
69
|
+
const Pt = /* @__PURE__ */ Q({
|
|
75
70
|
name: "DuxListLayout",
|
|
76
71
|
props: {
|
|
77
72
|
rowKey: {
|
|
@@ -120,140 +115,143 @@ const Ot = /* @__PURE__ */ Z({
|
|
|
120
115
|
type: Object
|
|
121
116
|
}
|
|
122
117
|
},
|
|
123
|
-
setup(
|
|
118
|
+
setup(a, {
|
|
124
119
|
slots: o,
|
|
125
|
-
expose:
|
|
120
|
+
expose: O
|
|
126
121
|
}) {
|
|
127
|
-
const
|
|
128
|
-
t:
|
|
129
|
-
} =
|
|
130
|
-
renderAction:
|
|
131
|
-
} =
|
|
122
|
+
const n = z(a, "filter", {}), {
|
|
123
|
+
t: r
|
|
124
|
+
} = Y(), {
|
|
125
|
+
renderAction: N
|
|
126
|
+
} = re(), T = z(a.pagination && typeof a.pagination == "object" ? a.pagination : {
|
|
132
127
|
page: 1,
|
|
133
128
|
pageSize: 20
|
|
134
|
-
}),
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
path:
|
|
138
|
-
filters:
|
|
139
|
-
pagination:
|
|
140
|
-
...
|
|
129
|
+
}), s = x({
|
|
130
|
+
...n.value || {}
|
|
131
|
+
}), i = Z({
|
|
132
|
+
path: a.path,
|
|
133
|
+
filters: s,
|
|
134
|
+
pagination: T.value,
|
|
135
|
+
...a.hookListProps
|
|
141
136
|
});
|
|
142
|
-
|
|
137
|
+
O(i);
|
|
143
138
|
const {
|
|
144
|
-
meta:
|
|
145
|
-
list:
|
|
146
|
-
isLoading:
|
|
147
|
-
autoRefetch:
|
|
148
|
-
autoCountdown:
|
|
149
|
-
onAutoRefetch:
|
|
150
|
-
isExporting:
|
|
151
|
-
isExportingRows:
|
|
152
|
-
isImporting:
|
|
153
|
-
onExport:
|
|
154
|
-
onExportRows:
|
|
155
|
-
onImport:
|
|
156
|
-
} =
|
|
157
|
-
page:
|
|
158
|
-
pageSize:
|
|
159
|
-
pageCount:
|
|
160
|
-
pageSizes:
|
|
139
|
+
meta: U,
|
|
140
|
+
list: k,
|
|
141
|
+
isLoading: S,
|
|
142
|
+
autoRefetch: A,
|
|
143
|
+
autoCountdown: C,
|
|
144
|
+
onAutoRefetch: B,
|
|
145
|
+
isExporting: E,
|
|
146
|
+
isExportingRows: D,
|
|
147
|
+
isImporting: J,
|
|
148
|
+
onExport: q,
|
|
149
|
+
onExportRows: F,
|
|
150
|
+
onImport: I
|
|
151
|
+
} = i, W = m(() => ({
|
|
152
|
+
page: i.page.value,
|
|
153
|
+
pageSize: i.pageSize.value,
|
|
154
|
+
pageCount: i.pageCount.value,
|
|
155
|
+
pageSizes: i.pageSizes,
|
|
161
156
|
pageSlot: 5,
|
|
162
|
-
onUpdatePage:
|
|
163
|
-
onUpdatePageSize:
|
|
157
|
+
onUpdatePage: i.onUpdatePage,
|
|
158
|
+
onUpdatePageSize: i.onUpdatePageSize,
|
|
164
159
|
showSizePicker: !0,
|
|
165
160
|
showQuickJumper: !0
|
|
166
|
-
})),
|
|
161
|
+
})), p = x({
|
|
167
162
|
show: !1
|
|
168
|
-
}),
|
|
163
|
+
}), d = x({
|
|
169
164
|
show: !1
|
|
170
|
-
}),
|
|
171
|
-
|
|
172
|
-
}),
|
|
173
|
-
width: r
|
|
174
|
-
} = oe(), k = () => {
|
|
175
|
-
if (!t.filterSchema?.length) return 0;
|
|
176
|
-
const i = t.filterSchema.length;
|
|
177
|
-
if (i <= 3)
|
|
178
|
-
return i;
|
|
179
|
-
const n = r.value || 1024;
|
|
180
|
-
let u = 3;
|
|
181
|
-
return n >= 1280 ? u = 4 : n >= 1024 ? u = 3 : n >= 768 ? u = 2 : u = 1, Math.min(i, u);
|
|
182
|
-
};
|
|
183
|
-
$(r, () => {
|
|
184
|
-
g.value = k();
|
|
185
|
-
}), ee(() => {
|
|
186
|
-
g.value = k();
|
|
187
|
-
});
|
|
188
|
-
const Q = c(() => (t.filterSchema || []).slice(0, g.value)), C = c(() => (t.filterSchema || []).slice(g.value)), G = c(() => C.value.length > 0), L = (i) => i.map((n) => {
|
|
165
|
+
}), {
|
|
166
|
+
width: c
|
|
167
|
+
} = $(), K = m(() => (a.filterSchema || []).map((t) => {
|
|
189
168
|
const {
|
|
190
|
-
|
|
191
|
-
...
|
|
192
|
-
} =
|
|
169
|
+
label: l,
|
|
170
|
+
...y
|
|
171
|
+
} = t;
|
|
193
172
|
return {
|
|
194
|
-
tag:
|
|
173
|
+
tag: ne,
|
|
195
174
|
attrs: {
|
|
196
|
-
label:
|
|
197
|
-
class: "flex-1 min-w-0"
|
|
175
|
+
label: l
|
|
198
176
|
},
|
|
199
|
-
children:
|
|
177
|
+
children: y
|
|
200
178
|
};
|
|
201
|
-
}), {
|
|
202
|
-
render:
|
|
203
|
-
} =
|
|
204
|
-
data:
|
|
205
|
-
}), {
|
|
206
|
-
render: X
|
|
207
|
-
} = A({
|
|
208
|
-
data: c(() => L(C.value))
|
|
209
|
-
}), v = c(() => ({
|
|
179
|
+
})), {
|
|
180
|
+
render: V
|
|
181
|
+
} = _({
|
|
182
|
+
data: m(() => K.value)
|
|
183
|
+
}), P = w(0), h = m(() => ({
|
|
210
184
|
import: !1,
|
|
211
185
|
export: !0,
|
|
212
186
|
refresh: !0,
|
|
213
|
-
...
|
|
214
|
-
}))
|
|
215
|
-
|
|
216
|
-
|
|
187
|
+
...a.tools
|
|
188
|
+
})), f = w(null), M = m(() => {
|
|
189
|
+
const t = a.tabs?.map((y) => y.value) || [], l = n.value?.tab;
|
|
190
|
+
return t.includes(l) ? l : t[0];
|
|
191
|
+
});
|
|
192
|
+
L(() => a.tabs?.map((t) => t.value), () => {
|
|
193
|
+
const t = a.tabs?.map((l) => l.value) || [];
|
|
194
|
+
if (n.value?.tab === void 0) {
|
|
195
|
+
const l = t[0];
|
|
196
|
+
l !== void 0 && (n.value.tab = l);
|
|
197
|
+
}
|
|
198
|
+
v(() => f.value?.syncBarPosition());
|
|
199
|
+
}, {
|
|
200
|
+
deep: !0
|
|
201
|
+
}), L(() => c.value, () => {
|
|
202
|
+
v(() => f.value?.syncBarPosition());
|
|
203
|
+
}), G(() => {
|
|
204
|
+
v(() => f.value?.syncBarPosition());
|
|
205
|
+
});
|
|
206
|
+
const b = w(!1);
|
|
207
|
+
return () => e(se, {
|
|
208
|
+
actions: a.actions,
|
|
217
209
|
scrollbar: !1
|
|
218
210
|
}, {
|
|
219
|
-
sideLeft: () => o?.sideLeft &&
|
|
220
|
-
sideRight: () => o?.sideRight &&
|
|
211
|
+
sideLeft: () => o?.sideLeft && c.value >= 1024 ? o?.sideLeft?.() : void 0,
|
|
212
|
+
sideRight: () => o?.sideRight && c.value >= 1024 ? o?.sideRight?.() : void 0,
|
|
221
213
|
default: () => e("div", {
|
|
222
|
-
class: "flex flex-col h-full relative"
|
|
214
|
+
class: "flex flex-col gap-3 h-full relative"
|
|
223
215
|
}, [e("div", {
|
|
224
|
-
class: "
|
|
216
|
+
class: "flex gap-2 justify-between flex-row border-b border-muted"
|
|
225
217
|
}, [e("div", {
|
|
226
|
-
class: "
|
|
227
|
-
}, [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
trigger: () => e("div", {
|
|
231
|
-
class: "flex items-center"
|
|
232
|
-
}, [e(F, {
|
|
233
|
-
checked: l.isAllChecked.value,
|
|
234
|
-
indeterminate: l.isIndeterminate.value,
|
|
235
|
-
onUpdateChecked: l.toggleSelectAll
|
|
236
|
-
}, null)]),
|
|
237
|
-
default: () => a("components.list.selectAll")
|
|
238
|
-
})]), t.tabs && e("div", null, [e(re, {
|
|
239
|
-
type: "segment",
|
|
218
|
+
class: "relative top-1.5px"
|
|
219
|
+
}, [a.tabs && e(ee, {
|
|
220
|
+
ref: f,
|
|
221
|
+
type: "bar",
|
|
240
222
|
size: "small",
|
|
241
223
|
style: {
|
|
242
|
-
"--n-tab-padding": "
|
|
224
|
+
"--n-tab-padding": "5px 20px 15px 20px",
|
|
225
|
+
"--n-tab-gap": "20px"
|
|
243
226
|
},
|
|
244
|
-
"default-value":
|
|
245
|
-
value:
|
|
246
|
-
onUpdateValue: (
|
|
247
|
-
|
|
227
|
+
"default-value": a.tabs?.[0]?.value || "",
|
|
228
|
+
value: M.value,
|
|
229
|
+
onUpdateValue: (t) => {
|
|
230
|
+
n.value.tab = t, v(() => f.value?.syncBarPosition());
|
|
248
231
|
}
|
|
249
232
|
}, {
|
|
250
|
-
default: () => [
|
|
251
|
-
name:
|
|
252
|
-
tab:
|
|
233
|
+
default: () => [a.tabs?.map((t) => e(te, {
|
|
234
|
+
name: t.value,
|
|
235
|
+
tab: t.label
|
|
253
236
|
}, null))]
|
|
254
237
|
})]), e("div", {
|
|
255
|
-
class: "flex gap-2"
|
|
256
|
-
}, [o?.
|
|
238
|
+
class: "flex gap-2 justify-end"
|
|
239
|
+
}, [o.actions?.(), a.actions?.length > 0 && N({
|
|
240
|
+
type: c.value < 1024 ? "dropdown" : "button",
|
|
241
|
+
text: c.value < 1024,
|
|
242
|
+
items: a.actions
|
|
243
|
+
})])]), e("div", {
|
|
244
|
+
class: "flex gap-2 justify-between flex-col-reverse lg:flex-row"
|
|
245
|
+
}, [(c.value >= 1024 || b.value) && e("div", {
|
|
246
|
+
class: ["flex-1 flex flex-col lg:flex-row gap-2 flex-wrap"]
|
|
247
|
+
}, [e("div", {
|
|
248
|
+
key: P.value,
|
|
249
|
+
class: "contents"
|
|
250
|
+
}, [H(V)])]), e("div", {
|
|
251
|
+
class: "flex justify-between gap-2"
|
|
252
|
+
}, [e("div", {
|
|
253
|
+
class: ["flex-1 flex gap-2"]
|
|
254
|
+
}, [o?.sideLeft && c.value < 1024 && e(u, {
|
|
257
255
|
class: "flex-none",
|
|
258
256
|
secondary: !0,
|
|
259
257
|
onClick: () => {
|
|
@@ -263,188 +261,190 @@ const Ot = /* @__PURE__ */ Z({
|
|
|
263
261
|
icon: () => e("div", {
|
|
264
262
|
class: "i-tabler:layout-sidebar-inactive size-4"
|
|
265
263
|
}, null)
|
|
264
|
+
}), o?.sideRight && c.value < 1024 && e(u, {
|
|
265
|
+
class: "flex-none",
|
|
266
|
+
secondary: !0,
|
|
267
|
+
onClick: () => {
|
|
268
|
+
d.show = !d.show;
|
|
269
|
+
}
|
|
270
|
+
}, {
|
|
271
|
+
icon: () => e("div", {
|
|
272
|
+
class: "i-tabler:layout-sidebar-right-inactive size-4"
|
|
273
|
+
}, null)
|
|
266
274
|
}), e("div", {
|
|
267
|
-
class: "flex
|
|
268
|
-
}, [
|
|
275
|
+
class: "flex-none lg:hidden"
|
|
276
|
+
}, [e(u, {
|
|
277
|
+
secondary: !0,
|
|
278
|
+
onClick: () => {
|
|
279
|
+
b.value = !b.value;
|
|
280
|
+
}
|
|
281
|
+
}, {
|
|
282
|
+
icon: () => e("div", {
|
|
283
|
+
class: "i-tabler:filter size-4"
|
|
284
|
+
}, null)
|
|
285
|
+
})])]), e("div", {
|
|
286
|
+
class: ["flex gap-2 items-center", "flex-row"]
|
|
287
|
+
}, [e("div", {
|
|
288
|
+
class: "flex lg:hidden"
|
|
289
|
+
}, [e(u, {
|
|
269
290
|
type: "primary",
|
|
270
291
|
secondary: !0,
|
|
271
|
-
onClick:
|
|
292
|
+
onClick: () => {
|
|
293
|
+
Object.keys(s).forEach((t) => delete s[t]), Object.assign(s, JSON.parse(JSON.stringify(n.value || {}))), i.onUpdatePage?.(1);
|
|
294
|
+
}
|
|
272
295
|
}, {
|
|
273
296
|
icon: () => e("div", {
|
|
274
297
|
class: "i-tabler:search size-4"
|
|
275
|
-
}, null)
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
298
|
+
}, null)
|
|
299
|
+
})]), e("div", {
|
|
300
|
+
class: ["hidden lg:flex gap-2"]
|
|
301
|
+
}, [e(u, {
|
|
302
|
+
type: "primary",
|
|
279
303
|
secondary: !0,
|
|
280
304
|
onClick: () => {
|
|
281
|
-
|
|
305
|
+
Object.keys(s).forEach((t) => delete s[t]), Object.assign(s, JSON.parse(JSON.stringify(n.value || {}))), i.onUpdatePage?.(1);
|
|
282
306
|
}
|
|
283
307
|
}, {
|
|
284
308
|
icon: () => e("div", {
|
|
285
|
-
class: "i-tabler:
|
|
286
|
-
}, null)
|
|
287
|
-
|
|
288
|
-
|
|
309
|
+
class: "i-tabler:search size-4"
|
|
310
|
+
}, null),
|
|
311
|
+
default: () => r("components.button.search")
|
|
312
|
+
}), e(u, {
|
|
313
|
+
secondary: !0,
|
|
289
314
|
onClick: () => {
|
|
290
|
-
|
|
315
|
+
const t = n.value.tab;
|
|
316
|
+
Object.keys(n.value || {}).forEach((l) => {
|
|
317
|
+
l !== "tab" && delete n.value[l];
|
|
318
|
+
}), Object.keys(s).forEach((l) => {
|
|
319
|
+
delete s[l];
|
|
320
|
+
}), t !== void 0 && (s.tab = t), i.onUpdatePage?.(1), P.value++;
|
|
291
321
|
}
|
|
292
322
|
}, {
|
|
293
|
-
default: () => a("components.button.advanced"),
|
|
294
323
|
icon: () => e("div", {
|
|
295
|
-
class:
|
|
296
|
-
}, null)
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
type: r.value < 1024 ? "dropdown" : "button",
|
|
301
|
-
text: r.value < 1024,
|
|
302
|
-
items: t.actions
|
|
303
|
-
})])]), e(se, {
|
|
304
|
-
show: w.value,
|
|
324
|
+
class: "i-tabler:arrow-back-up size-4"
|
|
325
|
+
}, null),
|
|
326
|
+
default: () => r("components.button.reset")
|
|
327
|
+
})])])])]), e(ae, {
|
|
328
|
+
show: S.value,
|
|
305
329
|
class: "flex-1 min-h-0",
|
|
306
330
|
contentClass: "h-full"
|
|
307
331
|
}, {
|
|
308
332
|
default: () => [e("div", {
|
|
309
|
-
class: ["h-full overflow-auto
|
|
310
|
-
}, [!
|
|
333
|
+
class: ["h-full overflow-auto"]
|
|
334
|
+
}, [!S.value && k.value.length === 0 && e("div", {
|
|
311
335
|
class: "flex justify-center items-center h-full"
|
|
312
|
-
}, [e(
|
|
336
|
+
}, [e(ue, null, null)]), k.value.length > 0 && o?.default?.(i)])]
|
|
313
337
|
}), e("div", {
|
|
314
|
-
class: "flex justify-between
|
|
315
|
-
}, [e("div",
|
|
316
|
-
class: "flex
|
|
317
|
-
}, [
|
|
318
|
-
trigger: () => e(
|
|
319
|
-
loading: S.value,
|
|
338
|
+
class: "flex justify-between"
|
|
339
|
+
}, [e("div", {
|
|
340
|
+
class: "flex items-center gap-0.5"
|
|
341
|
+
}, [a.checkable && e(g, null, {
|
|
342
|
+
trigger: () => e(u, {
|
|
320
343
|
circle: !0,
|
|
321
344
|
quaternary: !0
|
|
322
345
|
}, {
|
|
323
|
-
default: () => [e(
|
|
324
|
-
checked:
|
|
325
|
-
indeterminate:
|
|
326
|
-
onUpdateChecked:
|
|
346
|
+
default: () => [e(ie, {
|
|
347
|
+
checked: i.isAllChecked.value,
|
|
348
|
+
indeterminate: i.isIndeterminate.value,
|
|
349
|
+
onUpdateChecked: i.toggleSelectAll
|
|
327
350
|
}, null)]
|
|
328
351
|
}),
|
|
329
|
-
default: () =>
|
|
330
|
-
}), o?.tools?.(),
|
|
331
|
-
trigger: () => e(
|
|
332
|
-
|
|
333
|
-
onClick: W,
|
|
352
|
+
default: () => r("components.list.selectAll")
|
|
353
|
+
}), o?.bottom?.(), o?.tools?.(), h.value.export && e(g, null, {
|
|
354
|
+
trigger: () => e(u, {
|
|
355
|
+
quaternary: !0,
|
|
334
356
|
circle: !0,
|
|
335
|
-
|
|
357
|
+
loading: E.value,
|
|
358
|
+
onClick: q
|
|
336
359
|
}, {
|
|
337
360
|
icon: () => e("div", {
|
|
338
361
|
class: "i-tabler:database-export size-4"
|
|
339
362
|
}, null)
|
|
340
363
|
}),
|
|
341
|
-
default: () =>
|
|
342
|
-
}),
|
|
343
|
-
trigger: () => e(
|
|
344
|
-
|
|
345
|
-
onClick: _,
|
|
364
|
+
default: () => r("components.button.export")
|
|
365
|
+
}), h.value.import && e(g, null, {
|
|
366
|
+
trigger: () => e(u, {
|
|
367
|
+
quaternary: !0,
|
|
346
368
|
circle: !0,
|
|
347
|
-
|
|
369
|
+
loading: J.value,
|
|
370
|
+
onClick: I
|
|
348
371
|
}, {
|
|
349
372
|
icon: () => e("div", {
|
|
350
373
|
class: "i-tabler:database-import size-4"
|
|
351
374
|
}, null)
|
|
352
375
|
}),
|
|
353
|
-
default: () =>
|
|
354
|
-
}),
|
|
355
|
-
trigger: () => e(
|
|
356
|
-
|
|
376
|
+
default: () => r("components.button.import")
|
|
377
|
+
}), h.value.refresh && e(g, null, {
|
|
378
|
+
trigger: () => e(u, {
|
|
379
|
+
quaternary: !0,
|
|
357
380
|
circle: !0,
|
|
358
|
-
|
|
381
|
+
onClick: B
|
|
359
382
|
}, {
|
|
360
|
-
icon: () =>
|
|
383
|
+
icon: () => A.value ? e(le, {
|
|
361
384
|
class: "size-4",
|
|
362
385
|
type: "circle",
|
|
363
|
-
percentage:
|
|
386
|
+
percentage: C.value * 10,
|
|
364
387
|
strokeWidth: 20,
|
|
365
388
|
color: "rgba(var(--ui-color-primary))"
|
|
366
389
|
}, {
|
|
367
390
|
default: () => [e("span", {
|
|
368
391
|
class: "text-8px"
|
|
369
|
-
}, [
|
|
392
|
+
}, [C.value])]
|
|
370
393
|
}) : e("div", {
|
|
371
394
|
class: "i-tabler:refresh size-4"
|
|
372
395
|
}, null)
|
|
373
396
|
}),
|
|
374
|
-
default: () =>
|
|
375
|
-
})])
|
|
397
|
+
default: () => r("components.button.autoRefresh")
|
|
398
|
+
})]), e("div", {
|
|
376
399
|
class: "flex items-center gap-2"
|
|
377
|
-
}, [
|
|
378
|
-
simple:
|
|
400
|
+
}, [a.pagination && e(oe, X(W.value, {
|
|
401
|
+
simple: c.value < 768
|
|
379
402
|
}), {
|
|
380
|
-
prefix: () => e("div", null, [
|
|
381
|
-
total:
|
|
403
|
+
prefix: () => e("div", null, [r("components.list.total", {
|
|
404
|
+
total: U?.value?.total || 0
|
|
382
405
|
})])
|
|
383
|
-
})])]), e(
|
|
384
|
-
isLoading:
|
|
385
|
-
onBatch:
|
|
386
|
-
selecteds:
|
|
387
|
-
number:
|
|
406
|
+
})])]), e(ce, {
|
|
407
|
+
isLoading: i.isBatching.value,
|
|
408
|
+
onBatch: i.onBatch,
|
|
409
|
+
selecteds: i.checkeds.value,
|
|
410
|
+
number: i.checkeds.value.length,
|
|
388
411
|
group: [[{
|
|
389
412
|
icon: "i-tabler:x",
|
|
390
413
|
onClick: () => {
|
|
391
|
-
|
|
414
|
+
i.checkeds.value = [], i.onUpdateChecked?.([]);
|
|
392
415
|
}
|
|
393
416
|
}], [{
|
|
394
|
-
label:
|
|
417
|
+
label: r("components.button.export"),
|
|
395
418
|
icon: "i-tabler:file-export",
|
|
396
|
-
loading:
|
|
397
|
-
onClick:
|
|
419
|
+
loading: D.value,
|
|
420
|
+
onClick: F
|
|
398
421
|
}, {
|
|
399
|
-
label:
|
|
422
|
+
label: r("components.button.delete"),
|
|
400
423
|
type: "error",
|
|
401
424
|
icon: "i-tabler:trash"
|
|
402
425
|
}]]
|
|
403
|
-
}, null), e(
|
|
404
|
-
draggable: !0,
|
|
405
|
-
class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",
|
|
406
|
-
show: d.show,
|
|
407
|
-
onUpdateShow: (i) => d.show = i
|
|
408
|
-
}, {
|
|
409
|
-
default: ({
|
|
410
|
-
draggableClass: i
|
|
411
|
-
}) => {
|
|
412
|
-
let n;
|
|
413
|
-
return e(me, {
|
|
414
|
-
title: a("components.button.filter"),
|
|
415
|
-
handle: i,
|
|
416
|
-
onClose: () => d.show = !1
|
|
417
|
-
}, {
|
|
418
|
-
default: () => [e(he, {
|
|
419
|
-
showLabel: !0,
|
|
420
|
-
labelPlacement: "top"
|
|
421
|
-
}, xe(n = R(X)) ? n : {
|
|
422
|
-
default: () => [n]
|
|
423
|
-
})]
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
}), e(j, {
|
|
426
|
+
}, null), e(R, {
|
|
427
427
|
show: p.show,
|
|
428
|
-
onUpdateShow: (
|
|
428
|
+
onUpdateShow: (t) => p.show = t,
|
|
429
429
|
autoFocus: !1,
|
|
430
430
|
placement: "left"
|
|
431
431
|
}, {
|
|
432
|
-
default: () => [e(
|
|
433
|
-
title:
|
|
432
|
+
default: () => [e(j, {
|
|
433
|
+
title: a.sideLeftTitle || r("components.button.sideLeft"),
|
|
434
434
|
onClose: () => p.show = !1,
|
|
435
435
|
scrollbar: !1
|
|
436
436
|
}, {
|
|
437
437
|
default: () => [o?.sideLeft?.()]
|
|
438
438
|
})]
|
|
439
|
-
}), e(
|
|
440
|
-
show:
|
|
441
|
-
onUpdateShow: (
|
|
439
|
+
}), e(R, {
|
|
440
|
+
show: d.show,
|
|
441
|
+
onUpdateShow: (t) => d.show = t,
|
|
442
442
|
autoFocus: !1,
|
|
443
443
|
placement: "right"
|
|
444
444
|
}, {
|
|
445
|
-
default: () => [e(
|
|
446
|
-
title:
|
|
447
|
-
onClose: () =>
|
|
445
|
+
default: () => [e(j, {
|
|
446
|
+
title: a.sideRightTitle || r("components.button.sideRight"),
|
|
447
|
+
onClose: () => d.show = !1,
|
|
448
448
|
scrollbar: !1
|
|
449
449
|
}, {
|
|
450
450
|
default: () => [o?.sideRight?.()]
|
|
@@ -454,5 +454,5 @@ const Ot = /* @__PURE__ */ Z({
|
|
|
454
454
|
}
|
|
455
455
|
});
|
|
456
456
|
export {
|
|
457
|
-
|
|
457
|
+
Pt as DuxListLayout
|
|
458
458
|
};
|