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