@gopowerteam/table-render 0.0.151 → 0.0.152
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/es/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var Oe = Object.defineProperty;
|
|
2
2
|
var Re = (e, t, r) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var M = (e, t, r) => (Re(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
-
import { ref as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { useModal as
|
|
4
|
+
import { ref as g, getCurrentInstance as F, onMounted as z, onUpdated as Ee, reactive as je, createVNode as s, Fragment as K, createTextVNode as q, getCurrentScope as $e, onScopeDispose as Le, unref as Pe, readonly as fe, computed as R, watchEffect as qe, watch as Ye, h as ze, render as Ae, defineComponent as A, isVNode as Be, mergeProps as se, nextTick as re, withDirectives as De, resolveDirective as Ie } from "vue";
|
|
5
|
+
import { Button as L, Tag as Ve, Dropdown as ne, Message as Fe, Descriptions as Ke, DescriptionsItem as We, Divider as He, Space as ae, Pagination as Ne, Transfer as Ue, Table as Ge } from "@arco-design/web-vue";
|
|
6
|
+
import { useModal as B, onSubmit as Je, ModalProvider as Qe } from "@gopowerteam/modal-render";
|
|
7
7
|
import * as Xe from "exceljs";
|
|
8
|
-
import
|
|
8
|
+
import D from "dayjs";
|
|
9
9
|
import { FormRender as oe } from "@gopowerteam/form-render";
|
|
10
|
-
import { TableRenderResolver as
|
|
10
|
+
import { TableRenderResolver as Cr } from "./resolver.mjs";
|
|
11
11
|
function Ze(e, t, r) {
|
|
12
12
|
const [u, ...a] = t.index ? t.index.split(".").reverse() : [t.key], n = a.reverse().reduce((l, c) => l == null ? void 0 : l[c], e);
|
|
13
13
|
n[u] = r;
|
|
14
14
|
}
|
|
15
15
|
function pe(e) {
|
|
16
|
-
const t =
|
|
16
|
+
const t = g([]), r = (a) => {
|
|
17
17
|
const n = e.filter((l) => l.formatter);
|
|
18
18
|
return n.length > 0 ? a.map((l) => (n.forEach((c) => {
|
|
19
19
|
c.formatter && Ze(l, c, c.formatter(l));
|
|
@@ -31,25 +31,25 @@ function et(e) {
|
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
33
33
|
function yr(e) {
|
|
34
|
-
const t =
|
|
34
|
+
const t = F(), r = g();
|
|
35
35
|
function u() {
|
|
36
36
|
var n, l;
|
|
37
37
|
const a = (l = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$refs) == null ? void 0 : l[e];
|
|
38
38
|
a && (r.value = a);
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return z(u), Ee(u), r;
|
|
41
41
|
}
|
|
42
42
|
function tt(e) {
|
|
43
43
|
return (t, r) => e[t](r);
|
|
44
44
|
}
|
|
45
|
-
class
|
|
45
|
+
class V {
|
|
46
46
|
/**
|
|
47
47
|
* 构造函数
|
|
48
48
|
* @param index
|
|
49
49
|
* @param size
|
|
50
50
|
*/
|
|
51
51
|
constructor(t = 1, r = 10) {
|
|
52
|
-
M(this, "data",
|
|
52
|
+
M(this, "data", je({
|
|
53
53
|
index: 1,
|
|
54
54
|
size: 10,
|
|
55
55
|
total: 0
|
|
@@ -106,31 +106,31 @@ const rt = Symbol.for("RenderColumnType");
|
|
|
106
106
|
function x(e, t, r) {
|
|
107
107
|
return t.$type = e, t.$disableColumnMode = r == null ? void 0 : r.disableColumnMode, t.$disableViewMode = r == null ? void 0 : r.disableViewMode, t;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function S(e, t) {
|
|
110
110
|
return t.index ? t.index.split(".").reduce((r, u) => r == null ? void 0 : r[u], e) : [t.key].reduce((r, u) => r == null ? void 0 : r[u], e);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Y(e) {
|
|
113
113
|
return !!e && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
|
|
114
114
|
}
|
|
115
115
|
function nt(e) {
|
|
116
116
|
return x("button", (r, u, a) => {
|
|
117
|
-
const n =
|
|
117
|
+
const n = B(), l = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], c = (f, d) => typeof f == "function" ? f(r) : f === void 0 ? d : f;
|
|
118
118
|
async function m(f) {
|
|
119
|
-
if (await (f.confirm === !0 ? new Promise((
|
|
119
|
+
if (await (f.confirm === !0 ? new Promise((o) => {
|
|
120
120
|
n.confirm({
|
|
121
121
|
title: "提示信息",
|
|
122
122
|
content: f.confirmText ?? "您确定要执行该操作?",
|
|
123
|
-
onOk: () =>
|
|
124
|
-
onCancel: () =>
|
|
123
|
+
onOk: () => o(!0),
|
|
124
|
+
onCancel: () => o(!1)
|
|
125
125
|
});
|
|
126
126
|
}) : Promise.resolve(!0)) && (f != null && f.onClick)) {
|
|
127
|
-
const
|
|
128
|
-
|
|
127
|
+
const o = f.onClick(r);
|
|
128
|
+
Y(o) && f.autoReload !== !1 && o.then(() => {
|
|
129
129
|
a != null && a.emits && (a == null || a.emits("reload"));
|
|
130
|
-
}), !
|
|
130
|
+
}), !Y(o) && f.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return s(K, null, [l.filter((f) => c(f.visiable, !0)).map((f) => s(L, {
|
|
134
134
|
onClick: () => m(f),
|
|
135
135
|
type: f.type || "text",
|
|
136
136
|
shape: f.shape,
|
|
@@ -179,16 +179,16 @@ function lt(e) {
|
|
|
179
179
|
return e != null && e.thousands ? r(l) : l;
|
|
180
180
|
};
|
|
181
181
|
return x("dict", (n, l) => {
|
|
182
|
-
const c =
|
|
183
|
-
return
|
|
182
|
+
const c = S(n, l);
|
|
183
|
+
return s("div", null, [typeof (e == null ? void 0 : e.prefix) == "string" ? s("span", null, [e.prefix]) : typeof (e == null ? void 0 : e.prefix) == "function" ? s("span", null, [e.prefix()]) : void 0, s("span", {
|
|
184
184
|
class: "currency_value"
|
|
185
|
-
}, [u(c)]), typeof (e == null ? void 0 : e.suffix) == "string" ?
|
|
185
|
+
}, [u(c)]), typeof (e == null ? void 0 : e.suffix) == "string" ? s("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? s("span", null, [e.suffix()]) : void 0]);
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ct = { exports: {} };
|
|
189
189
|
(function(e, t) {
|
|
190
190
|
(function(r, u) {
|
|
191
|
-
e.exports = u(
|
|
191
|
+
e.exports = u(D);
|
|
192
192
|
})(ut, function(r) {
|
|
193
193
|
function u(l) {
|
|
194
194
|
return l && typeof l == "object" && "default" in l ? l : {
|
|
@@ -242,17 +242,17 @@ var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
242
242
|
return a.default.locale(n, null, !0), n;
|
|
243
243
|
});
|
|
244
244
|
})(ct);
|
|
245
|
-
|
|
246
|
-
const
|
|
245
|
+
D.locale("zh-cn");
|
|
246
|
+
const it = {
|
|
247
247
|
date: "YYYY-MM-DD",
|
|
248
248
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
249
249
|
time: "HH:mm:ss",
|
|
250
250
|
week: "ddd"
|
|
251
251
|
};
|
|
252
|
-
function
|
|
252
|
+
function dt(e) {
|
|
253
253
|
return x("date", (r, u) => {
|
|
254
|
-
const a =
|
|
255
|
-
return
|
|
254
|
+
const a = S(r, u), n = typeof (e == null ? void 0 : e.format) == "function" ? e == null ? void 0 : e.format() : it[(e == null ? void 0 : e.format) || "datetime"], l = D(a);
|
|
255
|
+
return s("span", null, [l.isValid() && l.format(n)]);
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
const ft = {
|
|
@@ -270,16 +270,16 @@ function ot(e) {
|
|
|
270
270
|
function mt(e) {
|
|
271
271
|
const t = st(e), r = ot(e);
|
|
272
272
|
return x("dict", (a, n) => {
|
|
273
|
-
const l =
|
|
274
|
-
return r ?
|
|
273
|
+
const l = S(a, n);
|
|
274
|
+
return r ? s(Ve, {
|
|
275
275
|
color: r === !0 ? void 0 : r
|
|
276
276
|
}, {
|
|
277
277
|
default: () => [t.get(l) || l]
|
|
278
|
-
}) :
|
|
278
|
+
}) : s("span", null, [t.get(l) || l]);
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
function yt(e) {
|
|
282
|
-
const t =
|
|
282
|
+
const t = B();
|
|
283
283
|
async function r(a, n) {
|
|
284
284
|
a.confirm && !await new Promise((c, m) => {
|
|
285
285
|
t.open("confirm", {
|
|
@@ -292,16 +292,16 @@ function yt(e) {
|
|
|
292
292
|
}
|
|
293
293
|
return x("dropdown", (a, n) => {
|
|
294
294
|
const l = e.options.filter((c) => typeof c.visiable == "function" ? c.visiable(a) : c.visiable !== !1);
|
|
295
|
-
return
|
|
295
|
+
return s(ne, {
|
|
296
296
|
trigger: (e == null ? void 0 : e.trigger) || "click"
|
|
297
297
|
}, {
|
|
298
|
-
default: () =>
|
|
298
|
+
default: () => s(L, {
|
|
299
299
|
disabled: l.length === 0,
|
|
300
300
|
type: "text"
|
|
301
301
|
}, {
|
|
302
302
|
default: () => [(e == null ? void 0 : e.content) || "操作"]
|
|
303
303
|
}),
|
|
304
|
-
content: () => l.map((c) =>
|
|
304
|
+
content: () => l.map((c) => s(ne.Option, {
|
|
305
305
|
onClick: () => r(c, a)
|
|
306
306
|
}, {
|
|
307
307
|
default: () => [typeof c.content == "function" ? c.content(a) : c.content]
|
|
@@ -330,25 +330,25 @@ function ht(e) {
|
|
|
330
330
|
n == null || n.remove();
|
|
331
331
|
}
|
|
332
332
|
return x("image", (a, n, l) => {
|
|
333
|
-
const c =
|
|
333
|
+
const c = S(a, n), m = Math.random().toString(32).slice(2).toUpperCase(), f = {
|
|
334
334
|
maxWidth: "100%",
|
|
335
335
|
maxHeight: "100%",
|
|
336
336
|
borderRadius: e == null ? void 0 : e.radius,
|
|
337
337
|
objectFit: "contain",
|
|
338
338
|
transform: `rotate(${(e == null ? void 0 : e.rotate) || 0}deg)`,
|
|
339
339
|
cursor: e != null && e.preview ? "pointer" : "unset"
|
|
340
|
-
},
|
|
340
|
+
}, d = `${n.index || n.key}_parsed`;
|
|
341
341
|
if (e != null && e.parse) {
|
|
342
|
-
const
|
|
343
|
-
|
|
342
|
+
const o = e == null ? void 0 : e.parse(c, a);
|
|
343
|
+
Y(o) ? o.then((y) => a[d] = y ?? "") : a[d] = o ?? "";
|
|
344
344
|
}
|
|
345
|
-
if (e != null && e.parse && !a[
|
|
346
|
-
return
|
|
345
|
+
if (e != null && e.parse && !a[d] === void 0)
|
|
346
|
+
return s("div", null, [q("Loading...")]);
|
|
347
347
|
{
|
|
348
|
-
const
|
|
349
|
-
return
|
|
348
|
+
const o = a[d] || c;
|
|
349
|
+
return o ? s("div", {
|
|
350
350
|
id: m,
|
|
351
|
-
onMouseenter: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && t(m,
|
|
351
|
+
onMouseenter: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && t(m, o),
|
|
352
352
|
onMouseleave: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && r(m),
|
|
353
353
|
style: {
|
|
354
354
|
display: "flex",
|
|
@@ -356,25 +356,25 @@ function ht(e) {
|
|
|
356
356
|
alignItems: "center",
|
|
357
357
|
height: `${e == null ? void 0 : e.size}px`
|
|
358
358
|
}
|
|
359
|
-
}, [
|
|
359
|
+
}, [s("img", {
|
|
360
360
|
alt: "image",
|
|
361
361
|
style: f,
|
|
362
|
-
src:
|
|
363
|
-
}, null)]) :
|
|
362
|
+
src: o
|
|
363
|
+
}, null)]) : s(K, null, null);
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
return
|
|
367
|
+
function W(e) {
|
|
368
|
+
return $e() ? (Le(e), !0) : !1;
|
|
369
369
|
}
|
|
370
370
|
function _(e) {
|
|
371
|
-
return typeof e == "function" ? e() :
|
|
371
|
+
return typeof e == "function" ? e() : Pe(e);
|
|
372
372
|
}
|
|
373
|
-
const
|
|
373
|
+
const H = typeof window < "u" && typeof document < "u";
|
|
374
374
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
375
375
|
const gt = Object.prototype.toString, wt = (e) => gt.call(e) === "[object Object]", vt = () => {
|
|
376
376
|
};
|
|
377
|
-
function
|
|
377
|
+
function Ct(e) {
|
|
378
378
|
let t;
|
|
379
379
|
function r() {
|
|
380
380
|
return t || (t = e()), t;
|
|
@@ -384,17 +384,17 @@ function xt(e) {
|
|
|
384
384
|
t = void 0, u && await u;
|
|
385
385
|
}, r;
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function xt(e, t) {
|
|
388
388
|
var r;
|
|
389
389
|
if (typeof e == "number")
|
|
390
390
|
return e + t;
|
|
391
391
|
const u = ((r = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : r[0]) || "", a = e.slice(u.length), n = Number.parseFloat(u) + t;
|
|
392
392
|
return Number.isNaN(n) ? e : n + a;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function kt(e, t, r = {}) {
|
|
395
395
|
const {
|
|
396
396
|
immediate: u = !0
|
|
397
|
-
} = r, a =
|
|
397
|
+
} = r, a = g(!1);
|
|
398
398
|
let n = null;
|
|
399
399
|
function l() {
|
|
400
400
|
n && (clearTimeout(n), n = null);
|
|
@@ -407,114 +407,114 @@ function Ct(e, t, r = {}) {
|
|
|
407
407
|
a.value = !1, n = null, e(...f);
|
|
408
408
|
}, _(t));
|
|
409
409
|
}
|
|
410
|
-
return u && (a.value = !0,
|
|
410
|
+
return u && (a.value = !0, H && m()), W(c), {
|
|
411
411
|
isPending: fe(a),
|
|
412
412
|
start: m,
|
|
413
413
|
stop: c
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function St(e) {
|
|
417
417
|
var t;
|
|
418
418
|
const r = _(e);
|
|
419
419
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
420
420
|
}
|
|
421
|
-
const
|
|
421
|
+
const N = H ? window : void 0, me = H ? window.navigator : void 0;
|
|
422
422
|
function ye(...e) {
|
|
423
423
|
let t, r, u, a;
|
|
424
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, u, a] = e, t =
|
|
424
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, u, a] = e, t = N) : [t, r, u, a] = e, !t)
|
|
425
425
|
return vt;
|
|
426
426
|
Array.isArray(r) || (r = [r]), Array.isArray(u) || (u = [u]);
|
|
427
427
|
const n = [], l = () => {
|
|
428
|
-
n.forEach((
|
|
429
|
-
}, c = (
|
|
430
|
-
() => [
|
|
431
|
-
([
|
|
432
|
-
if (l(), !
|
|
428
|
+
n.forEach((d) => d()), n.length = 0;
|
|
429
|
+
}, c = (d, o, y, h) => (d.addEventListener(o, y, h), () => d.removeEventListener(o, y, h)), m = Ye(
|
|
430
|
+
() => [St(t), _(a)],
|
|
431
|
+
([d, o]) => {
|
|
432
|
+
if (l(), !d)
|
|
433
433
|
return;
|
|
434
|
-
const y = wt(
|
|
434
|
+
const y = wt(o) ? { ...o } : o;
|
|
435
435
|
n.push(
|
|
436
|
-
...r.flatMap((
|
|
436
|
+
...r.flatMap((h) => u.map((C) => c(d, h, C, y)))
|
|
437
437
|
);
|
|
438
438
|
},
|
|
439
439
|
{ immediate: !0, flush: "post" }
|
|
440
440
|
), f = () => {
|
|
441
441
|
m(), l();
|
|
442
442
|
};
|
|
443
|
-
return
|
|
443
|
+
return W(f), f;
|
|
444
444
|
}
|
|
445
445
|
function Tt() {
|
|
446
|
-
const e =
|
|
447
|
-
return t &&
|
|
446
|
+
const e = g(!1), t = F();
|
|
447
|
+
return t && z(() => {
|
|
448
448
|
e.value = !0;
|
|
449
449
|
}, t), e;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function U(e) {
|
|
452
452
|
const t = Tt();
|
|
453
453
|
return R(() => (t.value, !!e()));
|
|
454
454
|
}
|
|
455
|
-
function
|
|
456
|
-
const { window: r =
|
|
455
|
+
function $(e, t = {}) {
|
|
456
|
+
const { window: r = N } = t, u = U(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
457
457
|
let a;
|
|
458
|
-
const n =
|
|
458
|
+
const n = g(!1), l = (f) => {
|
|
459
459
|
n.value = f.matches;
|
|
460
460
|
}, c = () => {
|
|
461
461
|
a && ("removeEventListener" in a ? a.removeEventListener("change", l) : a.removeListener(l));
|
|
462
|
-
}, m =
|
|
462
|
+
}, m = qe(() => {
|
|
463
463
|
u.value && (c(), a = r.matchMedia(_(e)), "addEventListener" in a ? a.addEventListener("change", l) : a.addListener(l), n.value = a.matches);
|
|
464
464
|
});
|
|
465
|
-
return
|
|
465
|
+
return W(() => {
|
|
466
466
|
m(), c(), a = void 0;
|
|
467
467
|
}), n;
|
|
468
468
|
}
|
|
469
469
|
function Mt(e, t = {}) {
|
|
470
|
-
function r(
|
|
471
|
-
let y = _(e[_(
|
|
472
|
-
return
|
|
470
|
+
function r(d, o) {
|
|
471
|
+
let y = _(e[_(d)]);
|
|
472
|
+
return o != null && (y = xt(y, o)), typeof y == "number" && (y = `${y}px`), y;
|
|
473
473
|
}
|
|
474
|
-
const { window: u =
|
|
475
|
-
function n(
|
|
476
|
-
return u ? u.matchMedia(
|
|
474
|
+
const { window: u = N, strategy: a = "min-width" } = t;
|
|
475
|
+
function n(d) {
|
|
476
|
+
return u ? u.matchMedia(d).matches : !1;
|
|
477
477
|
}
|
|
478
|
-
const l = (
|
|
479
|
-
get: () => a === "min-width" ? l(
|
|
478
|
+
const l = (d) => $(() => `(min-width: ${r(d)})`, t), c = (d) => $(() => `(max-width: ${r(d)})`, t), m = Object.keys(e).reduce((d, o) => (Object.defineProperty(d, o, {
|
|
479
|
+
get: () => a === "min-width" ? l(o) : c(o),
|
|
480
480
|
enumerable: !0,
|
|
481
481
|
configurable: !0
|
|
482
|
-
}),
|
|
482
|
+
}), d), {});
|
|
483
483
|
function f() {
|
|
484
|
-
const
|
|
485
|
-
return R(() =>
|
|
484
|
+
const d = Object.keys(e).map((o) => [o, l(o)]);
|
|
485
|
+
return R(() => d.filter(([, o]) => o.value).map(([o]) => o));
|
|
486
486
|
}
|
|
487
487
|
return Object.assign(m, {
|
|
488
488
|
greaterOrEqual: l,
|
|
489
489
|
smallerOrEqual: c,
|
|
490
|
-
greater(
|
|
491
|
-
return
|
|
490
|
+
greater(d) {
|
|
491
|
+
return $(() => `(min-width: ${r(d, 0.1)})`, t);
|
|
492
492
|
},
|
|
493
|
-
smaller(
|
|
494
|
-
return
|
|
493
|
+
smaller(d) {
|
|
494
|
+
return $(() => `(max-width: ${r(d, -0.1)})`, t);
|
|
495
495
|
},
|
|
496
|
-
between(
|
|
497
|
-
return
|
|
496
|
+
between(d, o) {
|
|
497
|
+
return $(() => `(min-width: ${r(d)}) and (max-width: ${r(o, -0.1)})`, t);
|
|
498
498
|
},
|
|
499
|
-
isGreater(
|
|
500
|
-
return n(`(min-width: ${r(
|
|
499
|
+
isGreater(d) {
|
|
500
|
+
return n(`(min-width: ${r(d, 0.1)})`);
|
|
501
501
|
},
|
|
502
|
-
isGreaterOrEqual(
|
|
503
|
-
return n(`(min-width: ${r(
|
|
502
|
+
isGreaterOrEqual(d) {
|
|
503
|
+
return n(`(min-width: ${r(d)})`);
|
|
504
504
|
},
|
|
505
|
-
isSmaller(
|
|
506
|
-
return n(`(max-width: ${r(
|
|
505
|
+
isSmaller(d) {
|
|
506
|
+
return n(`(max-width: ${r(d, -0.1)})`);
|
|
507
507
|
},
|
|
508
|
-
isSmallerOrEqual(
|
|
509
|
-
return n(`(max-width: ${r(
|
|
508
|
+
isSmallerOrEqual(d) {
|
|
509
|
+
return n(`(max-width: ${r(d)})`);
|
|
510
510
|
},
|
|
511
|
-
isInBetween(
|
|
512
|
-
return n(`(min-width: ${r(
|
|
511
|
+
isInBetween(d, o) {
|
|
512
|
+
return n(`(min-width: ${r(d)}) and (max-width: ${r(o, -0.1)})`);
|
|
513
513
|
},
|
|
514
514
|
current: f,
|
|
515
515
|
active() {
|
|
516
|
-
const
|
|
517
|
-
return R(() =>
|
|
516
|
+
const d = f();
|
|
517
|
+
return R(() => d.value.length === 0 ? "" : d.value.at(-1));
|
|
518
518
|
}
|
|
519
519
|
});
|
|
520
520
|
}
|
|
@@ -522,11 +522,11 @@ function ue(e, t = {}) {
|
|
|
522
522
|
const {
|
|
523
523
|
controls: r = !1,
|
|
524
524
|
navigator: u = me
|
|
525
|
-
} = t, a =
|
|
525
|
+
} = t, a = U(() => u && "permissions" in u);
|
|
526
526
|
let n;
|
|
527
|
-
const l = typeof e == "string" ? { name: e } : e, c =
|
|
527
|
+
const l = typeof e == "string" ? { name: e } : e, c = g(), m = () => {
|
|
528
528
|
n && (c.value = n.state);
|
|
529
|
-
}, f =
|
|
529
|
+
}, f = Ct(async () => {
|
|
530
530
|
if (a.value) {
|
|
531
531
|
if (!n)
|
|
532
532
|
try {
|
|
@@ -550,32 +550,32 @@ function _t(e = {}) {
|
|
|
550
550
|
source: u,
|
|
551
551
|
copiedDuring: a = 1500,
|
|
552
552
|
legacy: n = !1
|
|
553
|
-
} = e, l =
|
|
554
|
-
function
|
|
555
|
-
l.value && E(c.value) ? t.clipboard.readText().then((
|
|
556
|
-
|
|
557
|
-
}) :
|
|
553
|
+
} = e, l = U(() => t && "clipboard" in t), c = ue("clipboard-read"), m = ue("clipboard-write"), f = R(() => l.value || n), d = g(""), o = g(!1), y = kt(() => o.value = !1, a);
|
|
554
|
+
function h() {
|
|
555
|
+
l.value && E(c.value) ? t.clipboard.readText().then((w) => {
|
|
556
|
+
d.value = w;
|
|
557
|
+
}) : d.value = I();
|
|
558
558
|
}
|
|
559
|
-
f.value && r && ye(["copy", "cut"],
|
|
560
|
-
async function
|
|
561
|
-
f.value &&
|
|
559
|
+
f.value && r && ye(["copy", "cut"], h);
|
|
560
|
+
async function C(w = _(u)) {
|
|
561
|
+
f.value && w != null && (l.value && E(m.value) ? await t.clipboard.writeText(w) : k(w), d.value = w, o.value = !0, y.start());
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function k(w) {
|
|
564
564
|
const v = document.createElement("textarea");
|
|
565
|
-
v.value =
|
|
565
|
+
v.value = w ?? "", v.style.position = "absolute", v.style.opacity = "0", document.body.appendChild(v), v.select(), document.execCommand("copy"), v.remove();
|
|
566
566
|
}
|
|
567
567
|
function I() {
|
|
568
|
-
var
|
|
569
|
-
return (O = (v = (
|
|
568
|
+
var w, v, O;
|
|
569
|
+
return (O = (v = (w = document == null ? void 0 : document.getSelection) == null ? void 0 : w.call(document)) == null ? void 0 : v.toString()) != null ? O : "";
|
|
570
570
|
}
|
|
571
|
-
function E(
|
|
572
|
-
return
|
|
571
|
+
function E(w) {
|
|
572
|
+
return w === "granted" || w === "prompt";
|
|
573
573
|
}
|
|
574
574
|
return {
|
|
575
575
|
isSupported: f,
|
|
576
|
-
text:
|
|
577
|
-
copied:
|
|
578
|
-
copy:
|
|
576
|
+
text: d,
|
|
577
|
+
copied: o,
|
|
578
|
+
copy: C
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
581
|
const Ot = " ";
|
|
@@ -588,52 +588,117 @@ function ce(e, t) {
|
|
|
588
588
|
function Et(e) {
|
|
589
589
|
const t = _t();
|
|
590
590
|
return x("phone", (u, a) => {
|
|
591
|
-
const n =
|
|
592
|
-
function
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
y.innerText = c;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
function f(s) {
|
|
599
|
-
if (e != null && e.safe && e.noSafeWhenHover) {
|
|
600
|
-
const y = s.target;
|
|
601
|
-
y.innerText = l;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
function i() {
|
|
605
|
-
t.copy(n).then(() => {
|
|
606
|
-
Ke.success({
|
|
591
|
+
const n = Math.random().toString(36).slice(2), l = S(u, a), c = ce(Rt(l), e == null ? void 0 : e.separator), m = ce(l, e == null ? void 0 : e.separator);
|
|
592
|
+
function f() {
|
|
593
|
+
window.focus(), t.copy(l).then(() => {
|
|
594
|
+
Fe.success({
|
|
607
595
|
content: "复制成功",
|
|
608
596
|
duration: 1e3
|
|
609
597
|
});
|
|
610
598
|
});
|
|
611
599
|
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
600
|
+
function d() {
|
|
601
|
+
const C = document.getElementById(n);
|
|
602
|
+
C && (C.innerHTML = m);
|
|
603
|
+
}
|
|
604
|
+
function o() {
|
|
605
|
+
window.open(`tel:${l}`, "_blank");
|
|
606
|
+
}
|
|
607
|
+
const y = 16, h = `cursor:pointer;width:${y}px;height:${y}px;`;
|
|
608
|
+
return s("div", {
|
|
609
|
+
style: "display:flex;align-items:center;gap:4px;"
|
|
610
|
+
}, [s("div", {
|
|
611
|
+
id: n,
|
|
612
|
+
style: "use-select:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;padding-right: 2px;"
|
|
613
|
+
}, [e != null && e.safe ? c : m]), (e == null ? void 0 : e.safe) && (e == null ? void 0 : e.allowPreview) && s("i", {
|
|
614
|
+
title: "显示完整号码",
|
|
615
|
+
style: h,
|
|
616
|
+
onClick: d
|
|
617
|
+
}, [s("svg", {
|
|
618
|
+
width: y,
|
|
619
|
+
height: y,
|
|
620
|
+
viewBox: "0 0 48 48",
|
|
621
|
+
fill: "none",
|
|
622
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
623
|
+
}, [s("path", {
|
|
624
|
+
d: "M24 36C35.0457 36 44 24 44 24C44 24 35.0457 12 24 12C12.9543 12 4 24 4 24C4 24 12.9543 36 24 36Z",
|
|
625
|
+
fill: "none",
|
|
626
|
+
stroke: "#333",
|
|
627
|
+
"stroke-width": "2",
|
|
628
|
+
"stroke-linejoin": "round"
|
|
629
|
+
}, null), s("path", {
|
|
630
|
+
d: "M24 29C26.7614 29 29 26.7614 29 24C29 21.2386 26.7614 19 24 19C21.2386 19 19 21.2386 19 24C19 26.7614 21.2386 29 24 29Z",
|
|
631
|
+
fill: "none",
|
|
632
|
+
stroke: "#333",
|
|
633
|
+
"stroke-width": "4",
|
|
634
|
+
"stroke-linejoin": "round"
|
|
635
|
+
}, null)])]), (e == null ? void 0 : e.allowDial) && s("i", {
|
|
636
|
+
style: h,
|
|
637
|
+
title: "拨出号码",
|
|
638
|
+
onClick: o
|
|
639
|
+
}, [s("svg", {
|
|
640
|
+
width: y,
|
|
641
|
+
height: y,
|
|
642
|
+
viewBox: "0 0 48 48",
|
|
643
|
+
fill: "none",
|
|
644
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
645
|
+
}, [s("path", {
|
|
646
|
+
d: "M41.7796 20.6066C42.0324 18.9108 41.9495 17.1747 41.5309 15.5054C40.978 13.3002 39.8392 11.2118 38.1147 9.4873C36.3902 7.76281 34.3018 6.62409 32.0967 6.07115C30.4274 5.65257 28.6912 5.56967 26.9954 5.82245",
|
|
647
|
+
stroke: "#333",
|
|
648
|
+
"stroke-width": "2",
|
|
649
|
+
"stroke-linecap": "round",
|
|
650
|
+
"stroke-linejoin": "round"
|
|
651
|
+
}, null), s("path", {
|
|
652
|
+
d: "M34.1896 19.8035C34.4604 17.9869 33.8966 16.0699 32.4982 14.6715C31.0997 13.2731 29.1827 12.7092 27.3662 12.98",
|
|
653
|
+
stroke: "#333",
|
|
654
|
+
"stroke-width": "4",
|
|
655
|
+
"stroke-linecap": "round",
|
|
656
|
+
"stroke-linejoin": "round"
|
|
657
|
+
}, null), s("path", {
|
|
658
|
+
d: "M14.3755 8.79423C15.1021 8.79423 15.7715 9.18825 16.1241 9.82349L18.5706 14.2303C18.8909 14.8073 18.9059 15.5052 18.6108 16.0955L16.254 20.8091C16.254 20.8091 16.937 24.3206 19.7954 27.179C22.6538 30.0374 26.1535 30.7086 26.1535 30.7086L30.8664 28.3522C31.4571 28.0568 32.1555 28.0721 32.7327 28.393L37.152 30.85C37.7866 31.2028 38.1802 31.8719 38.1802 32.598L38.1802 37.6715C38.1802 40.2552 35.7803 42.1213 33.3322 41.2952C28.3043 39.5987 20.4996 36.3685 15.5528 31.4216C10.6059 26.4748 7.3757 18.6701 5.67916 13.6422C4.85314 11.1941 6.71923 8.79423 9.30288 8.79423L14.3755 8.79423Z",
|
|
659
|
+
fill: "none",
|
|
660
|
+
stroke: "#333",
|
|
661
|
+
"stroke-width": "4",
|
|
662
|
+
"stroke-linejoin": "round"
|
|
663
|
+
}, null)])]), (e == null ? void 0 : e.allowCopy) && s("i", {
|
|
664
|
+
style: h,
|
|
665
|
+
title: "复制号码",
|
|
666
|
+
onClick: f
|
|
667
|
+
}, [s("svg", {
|
|
668
|
+
width: y,
|
|
669
|
+
height: y,
|
|
670
|
+
viewBox: "0 0 48 48",
|
|
671
|
+
fill: "none",
|
|
672
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
673
|
+
}, [s("path", {
|
|
674
|
+
d: "M13 12.4316V7.8125C13 6.2592 14.2592 5 15.8125 5H40.1875C41.7408 5 43 6.2592 43 7.8125V32.1875C43 33.7408 41.7408 35 40.1875 35H35.5163",
|
|
675
|
+
stroke: "#333",
|
|
676
|
+
"stroke-width": "2",
|
|
677
|
+
"stroke-linecap": "round",
|
|
678
|
+
"stroke-linejoin": "round"
|
|
679
|
+
}, null), s("path", {
|
|
680
|
+
d: "M32.1875 13H7.8125C6.2592 13 5 14.2592 5 15.8125V40.1875C5 41.7408 6.2592 43 7.8125 43H32.1875C33.7408 43 35 41.7408 35 40.1875V15.8125C35 14.2592 33.7408 13 32.1875 13Z",
|
|
681
|
+
fill: "none",
|
|
682
|
+
stroke: "#333",
|
|
683
|
+
"stroke-width": "4",
|
|
684
|
+
"stroke-linejoin": "round"
|
|
685
|
+
}, null)])])]);
|
|
621
686
|
});
|
|
622
687
|
}
|
|
623
|
-
function
|
|
688
|
+
function jt(e) {
|
|
624
689
|
return x("render", (r) => e(r));
|
|
625
690
|
}
|
|
626
|
-
function
|
|
691
|
+
function $t(e) {
|
|
627
692
|
return x("tag", (r, u) => {
|
|
628
|
-
const a = (e == null ? void 0 : e.maxCount) || 5, n = e != null && e.formatter ? e.formatter(r) :
|
|
629
|
-
return
|
|
693
|
+
const a = (e == null ? void 0 : e.maxCount) || 5, n = e != null && e.formatter ? e.formatter(r) : S(r, u), l = (e == null ? void 0 : e.textColors) || ["#F87335"], c = (e == null ? void 0 : e.backgroundColors) || ["#FFF4E8"], m = n.length > a, f = e == null ? void 0 : e.minWidth;
|
|
694
|
+
return s("div", {
|
|
630
695
|
style: {
|
|
631
696
|
display: "flex",
|
|
632
697
|
flexWrap: "wrap"
|
|
633
698
|
}
|
|
634
|
-
}, [n.slice(0, a).map((
|
|
635
|
-
const y = typeof l == "function" ? l(
|
|
636
|
-
return
|
|
699
|
+
}, [n.slice(0, a).map((d, o) => {
|
|
700
|
+
const y = typeof l == "function" ? l(d, o) : l[o % l.length], h = typeof c == "function" ? c(d, o) : c[o % c.length];
|
|
701
|
+
return s("span", {
|
|
637
702
|
style: {
|
|
638
703
|
minWidth: f ? `${f}px` : "unset",
|
|
639
704
|
textAlign: "center",
|
|
@@ -642,23 +707,23 @@ function qt(e) {
|
|
|
642
707
|
border: `solid 2px ${e != null && e.border ? y : "transparent"}`,
|
|
643
708
|
borderRadius: `${(e == null ? void 0 : e.radius) || 0}px`,
|
|
644
709
|
color: y,
|
|
645
|
-
backgroundColor:
|
|
710
|
+
backgroundColor: h
|
|
646
711
|
}
|
|
647
|
-
}, [
|
|
712
|
+
}, [d]);
|
|
648
713
|
}), m && "..."]);
|
|
649
714
|
});
|
|
650
715
|
}
|
|
651
|
-
function
|
|
716
|
+
function ie(e) {
|
|
652
717
|
if (typeof e == "string")
|
|
653
718
|
return e;
|
|
654
719
|
if (typeof e == "number")
|
|
655
720
|
return `${e}px`;
|
|
656
721
|
}
|
|
657
|
-
function
|
|
722
|
+
function Lt(e, t, r) {
|
|
658
723
|
var u, a;
|
|
659
|
-
return typeof e == "function" ? (u = e(r)) == null ? void 0 : u.toString() : typeof (e == null ? void 0 : e.content) == "function" ? (a = e == null ? void 0 : e.content(r)) == null ? void 0 : a.toString() : typeof (e == null ? void 0 : e.content) == "string" ? e == null ? void 0 : e.content :
|
|
724
|
+
return typeof e == "function" ? (u = e(r)) == null ? void 0 : u.toString() : typeof (e == null ? void 0 : e.content) == "function" ? (a = e == null ? void 0 : e.content(r)) == null ? void 0 : a.toString() : typeof (e == null ? void 0 : e.content) == "string" ? e == null ? void 0 : e.content : S(r, t);
|
|
660
725
|
}
|
|
661
|
-
function
|
|
726
|
+
function Pt(e, t) {
|
|
662
727
|
if (typeof e != "function") {
|
|
663
728
|
if (typeof (e == null ? void 0 : e.color) == "function")
|
|
664
729
|
return e == null ? void 0 : e.color(t);
|
|
@@ -666,19 +731,19 @@ function Yt(e, t) {
|
|
|
666
731
|
return e == null ? void 0 : e.color;
|
|
667
732
|
}
|
|
668
733
|
}
|
|
669
|
-
function
|
|
734
|
+
function qt(e, t) {
|
|
670
735
|
if (typeof e != "function")
|
|
671
|
-
return typeof (e == null ? void 0 : e.size) == "function" ?
|
|
736
|
+
return typeof (e == null ? void 0 : e.size) == "function" ? ie(e == null ? void 0 : e.size(t)) : ie(e == null ? void 0 : e.size);
|
|
672
737
|
}
|
|
673
|
-
function
|
|
738
|
+
function Yt(e, t) {
|
|
674
739
|
let r = "";
|
|
675
|
-
const u =
|
|
740
|
+
const u = Pt(e, t), a = qt(e, t);
|
|
676
741
|
return u && (r += `color:${u};`), a && (r += `font-size:${a};`), r;
|
|
677
742
|
}
|
|
678
|
-
function
|
|
743
|
+
function zt(e) {
|
|
679
744
|
return x("text", (r, u) => {
|
|
680
|
-
const a =
|
|
681
|
-
return
|
|
745
|
+
const a = Lt(e || {}, u, r), n = Yt(e || {}, r);
|
|
746
|
+
return s("span", {
|
|
682
747
|
style: n
|
|
683
748
|
}, [a]);
|
|
684
749
|
});
|
|
@@ -686,14 +751,14 @@ function Lt(e) {
|
|
|
686
751
|
function At() {
|
|
687
752
|
return {
|
|
688
753
|
dropdown: yt,
|
|
689
|
-
text:
|
|
754
|
+
text: zt,
|
|
690
755
|
dict: mt,
|
|
691
|
-
tag:
|
|
692
|
-
render:
|
|
756
|
+
tag: $t,
|
|
757
|
+
render: jt,
|
|
693
758
|
phone: Et,
|
|
694
759
|
image: ht,
|
|
695
760
|
currency: lt,
|
|
696
|
-
date:
|
|
761
|
+
date: dt,
|
|
697
762
|
button: nt
|
|
698
763
|
};
|
|
699
764
|
}
|
|
@@ -715,7 +780,7 @@ function G(e, t) {
|
|
|
715
780
|
type: r.$type
|
|
716
781
|
};
|
|
717
782
|
}
|
|
718
|
-
function
|
|
783
|
+
function de({
|
|
719
784
|
columns: e,
|
|
720
785
|
columnsOptions: t,
|
|
721
786
|
columnsGroups: r,
|
|
@@ -727,9 +792,9 @@ function ie({
|
|
|
727
792
|
...t || {},
|
|
728
793
|
...c
|
|
729
794
|
})).map((c) => It(c, u, a, n)).filter(Boolean);
|
|
730
|
-
return
|
|
795
|
+
return Dt(l, r);
|
|
731
796
|
}
|
|
732
|
-
function
|
|
797
|
+
function Bt(e, t) {
|
|
733
798
|
const r = [], u = (n) => {
|
|
734
799
|
if ("children" in n && (n.children = n.children.map(u)), "key" in n) {
|
|
735
800
|
const l = t.find((c) => {
|
|
@@ -749,9 +814,9 @@ function Dt(e, t) {
|
|
|
749
814
|
}), t.splice(n, 0, a);
|
|
750
815
|
}
|
|
751
816
|
}
|
|
752
|
-
function
|
|
817
|
+
function Dt(e, t = []) {
|
|
753
818
|
return t.forEach((r) => {
|
|
754
|
-
|
|
819
|
+
Bt(r, e);
|
|
755
820
|
}), e;
|
|
756
821
|
}
|
|
757
822
|
function It(e, t, r, u) {
|
|
@@ -781,10 +846,10 @@ function It(e, t, r, u) {
|
|
|
781
846
|
render: a
|
|
782
847
|
};
|
|
783
848
|
}
|
|
784
|
-
function
|
|
849
|
+
function Vt() {
|
|
785
850
|
return new Xe.Workbook();
|
|
786
851
|
}
|
|
787
|
-
function
|
|
852
|
+
function Ft(e, t = "Sheet1") {
|
|
788
853
|
return e.addWorksheet(t, {
|
|
789
854
|
headerFooter: {
|
|
790
855
|
firstHeader: "",
|
|
@@ -792,29 +857,29 @@ function Kt(e, t = "Sheet1") {
|
|
|
792
857
|
}
|
|
793
858
|
});
|
|
794
859
|
}
|
|
795
|
-
function
|
|
860
|
+
function Kt(e, t) {
|
|
796
861
|
e.columns = t;
|
|
797
862
|
}
|
|
798
|
-
function
|
|
863
|
+
function Wt(e, t) {
|
|
799
864
|
e.addRows(t);
|
|
800
865
|
}
|
|
801
|
-
async function
|
|
866
|
+
async function Ht({
|
|
802
867
|
columns: e,
|
|
803
868
|
rows: t,
|
|
804
869
|
filename: r
|
|
805
870
|
}) {
|
|
806
|
-
const u =
|
|
807
|
-
|
|
871
|
+
const u = Vt(), a = Ft(u);
|
|
872
|
+
Kt(a, e), Wt(a, t);
|
|
808
873
|
const n = await u.xlsx.writeBuffer(), l = new Blob([n]);
|
|
809
|
-
|
|
874
|
+
Nt(l, r || `${D().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
|
|
810
875
|
}
|
|
811
|
-
function
|
|
876
|
+
function Nt(e, t) {
|
|
812
877
|
const r = document.createElement("a");
|
|
813
878
|
r.download = t || "download", r.href = URL.createObjectURL(e), r.click(), setTimeout(() => {
|
|
814
879
|
URL.revokeObjectURL(r.href);
|
|
815
880
|
}, 1e3);
|
|
816
881
|
}
|
|
817
|
-
function
|
|
882
|
+
function Ut(e, t) {
|
|
818
883
|
const r = {};
|
|
819
884
|
return e.filter((a) => a.exportable !== !1).map((a) => ({
|
|
820
885
|
options: a,
|
|
@@ -828,13 +893,13 @@ function Ht(e, t) {
|
|
|
828
893
|
case !!a.content:
|
|
829
894
|
return a.content && a.content(t);
|
|
830
895
|
case !!n: {
|
|
831
|
-
const f = document.createElement("div"),
|
|
896
|
+
const f = document.createElement("div"), d = ze(() => n && n({
|
|
832
897
|
record: t
|
|
833
898
|
}));
|
|
834
|
-
return Ae(
|
|
899
|
+
return Ae(d, f), (m = d.el) == null ? void 0 : m.innerText;
|
|
835
900
|
}
|
|
836
901
|
default:
|
|
837
|
-
return
|
|
902
|
+
return S(t, a.options);
|
|
838
903
|
}
|
|
839
904
|
};
|
|
840
905
|
r[a.options.key] = l();
|
|
@@ -858,8 +923,8 @@ function Jt(e, t, r) {
|
|
|
858
923
|
header: ((l = n.exportable) == null ? void 0 : l.header) || n.title,
|
|
859
924
|
width: ((c = n.exportable) == null ? void 0 : c.width) || Gt(n.width)
|
|
860
925
|
};
|
|
861
|
-
}), a = t.map((n) =>
|
|
862
|
-
|
|
926
|
+
}), a = t.map((n) => Ut(e, n));
|
|
927
|
+
Ht({
|
|
863
928
|
columns: u,
|
|
864
929
|
rows: a,
|
|
865
930
|
filename: r
|
|
@@ -936,7 +1001,7 @@ function Zt(e) {
|
|
|
936
1001
|
});
|
|
937
1002
|
}
|
|
938
1003
|
function pt(e) {
|
|
939
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1004
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Be(e);
|
|
940
1005
|
}
|
|
941
1006
|
const er = /* @__PURE__ */ A({
|
|
942
1007
|
props: {
|
|
@@ -972,7 +1037,7 @@ const er = /* @__PURE__ */ A({
|
|
|
972
1037
|
}
|
|
973
1038
|
},
|
|
974
1039
|
setup(e) {
|
|
975
|
-
const t =
|
|
1040
|
+
const t = F(), r = g(0), u = e.columns.filter((n) => typeof n.visiable == "boolean" ? n.visiable : typeof n.visiable == "function" ? n.visiable() : !0).map((n) => ({
|
|
976
1041
|
options: n,
|
|
977
1042
|
renderer: G(n, {
|
|
978
1043
|
previewing: !0
|
|
@@ -992,25 +1057,25 @@ const er = /* @__PURE__ */ A({
|
|
|
992
1057
|
r.value = Math.floor(l.offsetWidth / e.minWidth);
|
|
993
1058
|
}
|
|
994
1059
|
}
|
|
995
|
-
return
|
|
1060
|
+
return z(() => {
|
|
996
1061
|
a();
|
|
997
1062
|
}), () => {
|
|
998
1063
|
let n;
|
|
999
|
-
return
|
|
1064
|
+
return s("div", {
|
|
1000
1065
|
class: "preview-container"
|
|
1001
|
-
}, [
|
|
1066
|
+
}, [s(Ke, {
|
|
1002
1067
|
column: r.value,
|
|
1003
1068
|
bordered: !0,
|
|
1004
1069
|
align: "left",
|
|
1005
1070
|
layout: e.layout
|
|
1006
|
-
}, pt(n = u.map((l) =>
|
|
1071
|
+
}, pt(n = u.map((l) => s(We, {
|
|
1007
1072
|
label: l.options.title
|
|
1008
1073
|
}, {
|
|
1009
1074
|
default: () => {
|
|
1010
1075
|
var c, m;
|
|
1011
1076
|
return [(c = l.renderer) != null && c.render ? (m = l.renderer) == null ? void 0 : m.render({
|
|
1012
1077
|
record: e.record
|
|
1013
|
-
}) :
|
|
1078
|
+
}) : S(e.record, l.options)];
|
|
1014
1079
|
}
|
|
1015
1080
|
}))) ? n : {
|
|
1016
1081
|
default: () => [n]
|
|
@@ -1023,9 +1088,9 @@ function tr(e, t, {
|
|
|
1023
1088
|
tableEvents: u
|
|
1024
1089
|
}) {
|
|
1025
1090
|
const a = e.refreshable || e.exportable || t.slots.actions, n = !!(r != null && r.length) && a;
|
|
1026
|
-
return a || n ? () =>
|
|
1091
|
+
return a || n ? () => s(K, null, [n && s(He, {
|
|
1027
1092
|
margin: 0
|
|
1028
|
-
}, null), a &&
|
|
1093
|
+
}, null), a && s("div", {
|
|
1029
1094
|
class: "table-actions",
|
|
1030
1095
|
style: {
|
|
1031
1096
|
display: "flex",
|
|
@@ -1034,28 +1099,28 @@ function tr(e, t, {
|
|
|
1034
1099
|
flexDirection: e.actionsPosition === "right" ? "row" : "row-reverse",
|
|
1035
1100
|
alignItems: "center"
|
|
1036
1101
|
}
|
|
1037
|
-
}, [
|
|
1102
|
+
}, [s("div", {
|
|
1038
1103
|
class: "built-in"
|
|
1039
|
-
}, [
|
|
1040
|
-
default: () => [e.refreshable &&
|
|
1104
|
+
}, [s(ae, null, {
|
|
1105
|
+
default: () => [e.refreshable && s(L, {
|
|
1041
1106
|
type: "primary",
|
|
1042
1107
|
onClick: () => u("reload")
|
|
1043
1108
|
}, {
|
|
1044
|
-
default: () => [
|
|
1045
|
-
}), e.exportable &&
|
|
1109
|
+
default: () => [q("刷新")]
|
|
1110
|
+
}), e.exportable && s(L, {
|
|
1046
1111
|
type: "primary",
|
|
1047
1112
|
onClick: () => u("export")
|
|
1048
1113
|
}, {
|
|
1049
|
-
default: () => [
|
|
1050
|
-
}), e.collapsable &&
|
|
1114
|
+
default: () => [q("导出")]
|
|
1115
|
+
}), e.collapsable && s(L, {
|
|
1051
1116
|
type: "primary",
|
|
1052
1117
|
onClick: () => u("collapse")
|
|
1053
1118
|
}, {
|
|
1054
|
-
default: () => [
|
|
1119
|
+
default: () => [q("显示")]
|
|
1055
1120
|
})]
|
|
1056
|
-
})]),
|
|
1121
|
+
})]), s("div", {
|
|
1057
1122
|
class: "customs"
|
|
1058
|
-
}, [
|
|
1123
|
+
}, [s(ae, null, {
|
|
1059
1124
|
default: () => [t.slots.actions && t.slots.actions()]
|
|
1060
1125
|
})])])]) : () => {
|
|
1061
1126
|
};
|
|
@@ -1065,9 +1130,9 @@ function rr(e, t, {
|
|
|
1065
1130
|
tableEvents: u,
|
|
1066
1131
|
formInstance: a
|
|
1067
1132
|
}) {
|
|
1068
|
-
return r != null && r.length ? () =>
|
|
1133
|
+
return r != null && r.length ? () => s("div", {
|
|
1069
1134
|
class: "table-form"
|
|
1070
|
-
}, [
|
|
1135
|
+
}, [s(oe, se({
|
|
1071
1136
|
form: r,
|
|
1072
1137
|
ref: (n) => a && (a.value = n),
|
|
1073
1138
|
searchable: !0,
|
|
@@ -1080,7 +1145,7 @@ function rr(e, t, {
|
|
|
1080
1145
|
function nr(e, t, {
|
|
1081
1146
|
tableSource: r
|
|
1082
1147
|
}) {
|
|
1083
|
-
const u =
|
|
1148
|
+
const u = g([]);
|
|
1084
1149
|
function a() {
|
|
1085
1150
|
u.value = [], t.emit("update:radio-key", null), t.emit("update:radio-row", null), t.emit("update:checkbox-keys", []), t.emit("update:checkbox-rows", []);
|
|
1086
1151
|
}
|
|
@@ -1108,18 +1173,18 @@ function nr(e, t, {
|
|
|
1108
1173
|
};
|
|
1109
1174
|
}
|
|
1110
1175
|
}
|
|
1111
|
-
function c(f,
|
|
1176
|
+
function c(f, d, o) {
|
|
1112
1177
|
const {
|
|
1113
1178
|
type: y
|
|
1114
1179
|
} = l() || {};
|
|
1115
1180
|
switch (y) {
|
|
1116
1181
|
case "radio":
|
|
1117
|
-
t.emit("update:radio-key",
|
|
1182
|
+
t.emit("update:radio-key", d), t.emit("update:radio-row", o);
|
|
1118
1183
|
break;
|
|
1119
1184
|
case "checkbox":
|
|
1120
|
-
t.emit("update:checkbox-keys", f), t.emit("update:checkbox-rows", f.map((
|
|
1121
|
-
var
|
|
1122
|
-
return r.value.find((
|
|
1185
|
+
t.emit("update:checkbox-keys", f), t.emit("update:checkbox-rows", f.map((h) => {
|
|
1186
|
+
var C;
|
|
1187
|
+
return r.value.find((k) => k[e.rowKey] === h) || ((C = e.checkboxRows) == null ? void 0 : C.find((k) => k[e.rowKey] === h));
|
|
1123
1188
|
}));
|
|
1124
1189
|
break;
|
|
1125
1190
|
}
|
|
@@ -1127,8 +1192,8 @@ function nr(e, t, {
|
|
|
1127
1192
|
function m() {
|
|
1128
1193
|
re(() => {
|
|
1129
1194
|
t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((f) => {
|
|
1130
|
-
var
|
|
1131
|
-
return r.value.find((
|
|
1195
|
+
var d;
|
|
1196
|
+
return r.value.find((o) => o[e.rowKey] === f) || ((d = e.checkboxRows) == null ? void 0 : d.find((o) => o[e.rowKey] === f));
|
|
1132
1197
|
}));
|
|
1133
1198
|
});
|
|
1134
1199
|
}
|
|
@@ -1156,12 +1221,12 @@ function ar(e, t, {
|
|
|
1156
1221
|
tablet: 640,
|
|
1157
1222
|
desktop: 1024
|
|
1158
1223
|
});
|
|
1159
|
-
return r ? () =>
|
|
1224
|
+
return r ? () => s("div", {
|
|
1160
1225
|
class: "table-pagination",
|
|
1161
1226
|
style: {
|
|
1162
1227
|
padding: "10px 0"
|
|
1163
1228
|
}
|
|
1164
|
-
}, [
|
|
1229
|
+
}, [s(Ne, {
|
|
1165
1230
|
current: r.pageIndex,
|
|
1166
1231
|
"onUpdate:current": (c) => r.pageIndex = c,
|
|
1167
1232
|
"page-size": r.pageSize,
|
|
@@ -1188,11 +1253,11 @@ const lr = /* @__PURE__ */ A({
|
|
|
1188
1253
|
}
|
|
1189
1254
|
},
|
|
1190
1255
|
setup(e) {
|
|
1191
|
-
const t =
|
|
1256
|
+
const t = B(), r = g(e.collapsedColumns.map((a) => ({
|
|
1192
1257
|
label: a.title,
|
|
1193
1258
|
value: a.key,
|
|
1194
1259
|
disabled: !1
|
|
1195
|
-
}))), u =
|
|
1260
|
+
}))), u = g(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
|
|
1196
1261
|
return Je(() => {
|
|
1197
1262
|
const a = e.collapsedColumns.map((n) => ({
|
|
1198
1263
|
key: n.key,
|
|
@@ -1200,9 +1265,9 @@ const lr = /* @__PURE__ */ A({
|
|
|
1200
1265
|
collapsed: u.value.includes(n.key)
|
|
1201
1266
|
}));
|
|
1202
1267
|
t.close(a);
|
|
1203
|
-
}), () =>
|
|
1268
|
+
}), () => s("div", {
|
|
1204
1269
|
class: "table-collapsed-render"
|
|
1205
|
-
}, [
|
|
1270
|
+
}, [s(Ue, {
|
|
1206
1271
|
data: r.value,
|
|
1207
1272
|
"default-value": u.value,
|
|
1208
1273
|
onChange: (a) => u.value = [...a],
|
|
@@ -1211,7 +1276,7 @@ const lr = /* @__PURE__ */ A({
|
|
|
1211
1276
|
justifyContent: "center"
|
|
1212
1277
|
}
|
|
1213
1278
|
}, {
|
|
1214
|
-
default: () => [
|
|
1279
|
+
default: () => [De(s("template", null, null), [[Ie("slot"), "source"]])]
|
|
1215
1280
|
})]);
|
|
1216
1281
|
}
|
|
1217
1282
|
}), ur = /* @__PURE__ */ A({
|
|
@@ -1230,13 +1295,13 @@ const lr = /* @__PURE__ */ A({
|
|
|
1230
1295
|
}
|
|
1231
1296
|
},
|
|
1232
1297
|
setup(e) {
|
|
1233
|
-
const t =
|
|
1298
|
+
const t = B();
|
|
1234
1299
|
function r(u) {
|
|
1235
1300
|
e.onSubmit && e.onSubmit(u), t.close(u);
|
|
1236
1301
|
}
|
|
1237
|
-
return console.log(e.value), () =>
|
|
1302
|
+
return console.log(e.value), () => s("div", {
|
|
1238
1303
|
class: "edit-form-container"
|
|
1239
|
-
}, [
|
|
1304
|
+
}, [s(oe, {
|
|
1240
1305
|
name: "form",
|
|
1241
1306
|
value: e.value,
|
|
1242
1307
|
form: e.form,
|
|
@@ -1382,24 +1447,24 @@ const lr = /* @__PURE__ */ A({
|
|
|
1382
1447
|
},
|
|
1383
1448
|
expose: ["preview", "export", "edit", "reload", "tableSource", "formSource", "update:radio-key", "update:radio-row", "update:checkbox-keys", "update:checkbox-rows", "formInstance", "resetSelection", "reloadSelection", "reloadColumns", "change"],
|
|
1384
1449
|
setup(e, t) {
|
|
1385
|
-
const r = Math.random().toString(32).slice(2).toUpperCase(), u =
|
|
1386
|
-
key:
|
|
1387
|
-
title:
|
|
1388
|
-
collapsed: !!
|
|
1450
|
+
const r = Math.random().toString(32).slice(2).toUpperCase(), u = g(), a = g(), n = g(), l = g(), [c, m] = pe(e.columns), f = g(!1), d = e.form ?? et(e.columns), o = C(), y = I(), h = g(e.columns.map((i) => ({
|
|
1451
|
+
key: i.key,
|
|
1452
|
+
title: i.title,
|
|
1453
|
+
collapsed: !!i.collapsed
|
|
1389
1454
|
})));
|
|
1390
|
-
function
|
|
1455
|
+
function C() {
|
|
1391
1456
|
switch (!0) {
|
|
1392
1457
|
case (typeof e.pageable == "string" && e.pageable === "server"):
|
|
1393
|
-
return new
|
|
1458
|
+
return new V();
|
|
1394
1459
|
case (typeof e.pageable == "boolean" && e.pageable === !0):
|
|
1395
|
-
return new
|
|
1460
|
+
return new V();
|
|
1396
1461
|
case (typeof e.pageable == "object" && !!e.pageable.reset):
|
|
1397
1462
|
return e.pageable;
|
|
1398
1463
|
case (typeof e.pageable == "object" && (!!e.pageable.index || !!e.pageable.size)):
|
|
1399
|
-
return new
|
|
1464
|
+
return new V(e.pageable.index, e.pageable.size);
|
|
1400
1465
|
}
|
|
1401
1466
|
}
|
|
1402
|
-
const
|
|
1467
|
+
const k = (() => {
|
|
1403
1468
|
switch (!0) {
|
|
1404
1469
|
case typeof e.pageable == "string":
|
|
1405
1470
|
return e.pageable;
|
|
@@ -1410,29 +1475,29 @@ const lr = /* @__PURE__ */ A({
|
|
|
1410
1475
|
}
|
|
1411
1476
|
})();
|
|
1412
1477
|
function I() {
|
|
1413
|
-
const
|
|
1414
|
-
if (
|
|
1478
|
+
const i = e.columns.find((b) => !!b.sortable);
|
|
1479
|
+
if (i || e.sortable)
|
|
1415
1480
|
return new J({
|
|
1416
1481
|
...e.sortable || {},
|
|
1417
|
-
...
|
|
1418
|
-
[
|
|
1482
|
+
...i ? {
|
|
1483
|
+
[i.key]: i.sortable
|
|
1419
1484
|
} : {}
|
|
1420
1485
|
});
|
|
1421
1486
|
}
|
|
1422
|
-
function E(
|
|
1487
|
+
function E(i) {
|
|
1423
1488
|
const {
|
|
1424
1489
|
exportExcel: b
|
|
1425
1490
|
} = Qt();
|
|
1426
|
-
b((
|
|
1491
|
+
b((i == null ? void 0 : i.columns) || e.columns, (i == null ? void 0 : i.source) || c.value, (i == null ? void 0 : i.filename) || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
|
|
1427
1492
|
}
|
|
1428
|
-
function
|
|
1493
|
+
function w(i) {
|
|
1429
1494
|
let b;
|
|
1430
1495
|
switch (!0) {
|
|
1431
|
-
case !!(
|
|
1432
|
-
b = c.value.find((T) => T[e.rowKey] === (
|
|
1496
|
+
case !!(i != null && i.key):
|
|
1497
|
+
b = c.value.find((T) => T[e.rowKey] === (i == null ? void 0 : i.key));
|
|
1433
1498
|
break;
|
|
1434
|
-
case !!(
|
|
1435
|
-
b =
|
|
1499
|
+
case !!(i != null && i.record):
|
|
1500
|
+
b = i == null ? void 0 : i.record;
|
|
1436
1501
|
break;
|
|
1437
1502
|
}
|
|
1438
1503
|
if (!b)
|
|
@@ -1441,38 +1506,38 @@ const lr = /* @__PURE__ */ A({
|
|
|
1441
1506
|
record: b,
|
|
1442
1507
|
columns: e.columns
|
|
1443
1508
|
}, {
|
|
1444
|
-
title: (
|
|
1445
|
-
mode: (
|
|
1509
|
+
title: (i == null ? void 0 : i.title) || "详情",
|
|
1510
|
+
mode: (i == null ? void 0 : i.mode) || "dialog"
|
|
1446
1511
|
});
|
|
1447
1512
|
}
|
|
1448
|
-
function v(
|
|
1513
|
+
function v(i) {
|
|
1449
1514
|
let b;
|
|
1450
1515
|
switch (!0) {
|
|
1451
|
-
case !!(
|
|
1452
|
-
b = c.value.find((T) => T[e.rowKey] === (
|
|
1516
|
+
case !!(i != null && i.key):
|
|
1517
|
+
b = c.value.find((T) => T[e.rowKey] === (i == null ? void 0 : i.key));
|
|
1453
1518
|
break;
|
|
1454
|
-
case !!(
|
|
1455
|
-
b =
|
|
1519
|
+
case !!(i != null && i.record):
|
|
1520
|
+
b = i == null ? void 0 : i.record;
|
|
1456
1521
|
break;
|
|
1457
1522
|
}
|
|
1458
1523
|
if (!b)
|
|
1459
1524
|
throw new Error("未找到需要编辑的数据");
|
|
1460
1525
|
return n.value.open(ur, {
|
|
1461
1526
|
value: b,
|
|
1462
|
-
form:
|
|
1463
|
-
onSubmit:
|
|
1527
|
+
form: i == null ? void 0 : i.form,
|
|
1528
|
+
onSubmit: i.onSubmit
|
|
1464
1529
|
}, {
|
|
1465
|
-
title: (
|
|
1466
|
-
mode: (
|
|
1530
|
+
title: (i == null ? void 0 : i.title) || "编辑",
|
|
1531
|
+
mode: (i == null ? void 0 : i.mode) || "dialog",
|
|
1467
1532
|
footer: !0,
|
|
1468
1533
|
form: "form"
|
|
1469
1534
|
});
|
|
1470
1535
|
}
|
|
1471
|
-
function O(
|
|
1536
|
+
function O(i) {
|
|
1472
1537
|
var p, ee;
|
|
1473
1538
|
if (!e.dataLoad)
|
|
1474
1539
|
return Promise.reject();
|
|
1475
|
-
|
|
1540
|
+
i != null && i.reset && (o && o.reset(), y && y.reset(), (p = u.value) == null || p.resetSorters());
|
|
1476
1541
|
const b = {
|
|
1477
1542
|
...((ee = a.value) == null ? void 0 : ee.formSource) || {}
|
|
1478
1543
|
};
|
|
@@ -1481,73 +1546,73 @@ const lr = /* @__PURE__ */ A({
|
|
|
1481
1546
|
});
|
|
1482
1547
|
const T = e.dataLoad({
|
|
1483
1548
|
form: b,
|
|
1484
|
-
page:
|
|
1549
|
+
page: o,
|
|
1485
1550
|
sort: y,
|
|
1486
1551
|
update: m
|
|
1487
1552
|
});
|
|
1488
|
-
return
|
|
1553
|
+
return Y(T) ? (f.value = !0, Promise.resolve(T).finally(() => {
|
|
1489
1554
|
f.value = !1;
|
|
1490
1555
|
}), T) : Promise.resolve();
|
|
1491
1556
|
}
|
|
1492
1557
|
function be() {
|
|
1493
1558
|
n.value.open(lr, {
|
|
1494
|
-
collapsedColumns:
|
|
1559
|
+
collapsedColumns: h.value
|
|
1495
1560
|
}, {
|
|
1496
1561
|
title: "显示列",
|
|
1497
1562
|
size: "small",
|
|
1498
1563
|
footer: !0
|
|
1499
|
-
}).then((
|
|
1500
|
-
|
|
1564
|
+
}).then((i) => {
|
|
1565
|
+
h.value = i;
|
|
1501
1566
|
});
|
|
1502
1567
|
}
|
|
1503
|
-
const he = (
|
|
1568
|
+
const he = (i, {
|
|
1504
1569
|
type: b
|
|
1505
1570
|
}) => {
|
|
1506
1571
|
switch (b) {
|
|
1507
1572
|
case "drag": {
|
|
1508
|
-
m(
|
|
1573
|
+
m(i), t.emit("change", i);
|
|
1509
1574
|
break;
|
|
1510
1575
|
}
|
|
1511
1576
|
}
|
|
1512
|
-
},
|
|
1577
|
+
}, j = tt({
|
|
1513
1578
|
reload: O,
|
|
1514
|
-
preview:
|
|
1579
|
+
preview: w,
|
|
1515
1580
|
export: E,
|
|
1516
1581
|
edit: v,
|
|
1517
1582
|
collapse: be
|
|
1518
1583
|
});
|
|
1519
|
-
function ge(
|
|
1520
|
-
!y ||
|
|
1584
|
+
function ge(i, b) {
|
|
1585
|
+
!y || k === "client" || (b ? y.update(i, b === "descend" ? "desc" : "asc") : y.remove(i), j("reload"));
|
|
1521
1586
|
}
|
|
1522
|
-
const Q =
|
|
1587
|
+
const Q = g(de({
|
|
1523
1588
|
columns: e.columns,
|
|
1524
1589
|
columnsOptions: e.columnsOptions,
|
|
1525
1590
|
columnsGroups: e.columnsGroups,
|
|
1526
|
-
pageMode:
|
|
1527
|
-
collapsedColumns:
|
|
1528
|
-
events:
|
|
1529
|
-
})),
|
|
1530
|
-
tableEvents:
|
|
1531
|
-
tableForm:
|
|
1591
|
+
pageMode: k,
|
|
1592
|
+
collapsedColumns: h,
|
|
1593
|
+
events: j
|
|
1594
|
+
})), P = {
|
|
1595
|
+
tableEvents: j,
|
|
1596
|
+
tableForm: d,
|
|
1532
1597
|
tableSource: c,
|
|
1533
1598
|
formInstance: a,
|
|
1534
|
-
pageService:
|
|
1599
|
+
pageService: o,
|
|
1535
1600
|
formOptions: e.formOptions
|
|
1536
|
-
}, we = rr(e, t,
|
|
1601
|
+
}, we = rr(e, t, P), ve = tr(e, t, P), Ce = ar(e, t, P), {
|
|
1537
1602
|
selectedRowKeys: X,
|
|
1538
1603
|
rowSelection: Z,
|
|
1539
|
-
onSelect:
|
|
1540
|
-
onSelectAll:
|
|
1541
|
-
reloadSelection:
|
|
1604
|
+
onSelect: xe,
|
|
1605
|
+
onSelectAll: ke,
|
|
1606
|
+
reloadSelection: Se,
|
|
1542
1607
|
resetSelection: Te
|
|
1543
|
-
} = nr(e, t,
|
|
1608
|
+
} = nr(e, t, P), Me = R(() => ({
|
|
1544
1609
|
rowKey: e.rowKey,
|
|
1545
1610
|
size: e.size,
|
|
1546
1611
|
bordered: e.bordered,
|
|
1547
1612
|
hoverable: e.hoverable,
|
|
1548
1613
|
stripe: e.stripe,
|
|
1549
1614
|
scroll: {
|
|
1550
|
-
x: e.columns.reduce((
|
|
1615
|
+
x: e.columns.reduce((i, b) => i += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
|
|
1551
1616
|
y: e.height ?? "100%"
|
|
1552
1617
|
},
|
|
1553
1618
|
rowSelection: Z,
|
|
@@ -1560,16 +1625,16 @@ const lr = /* @__PURE__ */ A({
|
|
|
1560
1625
|
expandable: e.expandable
|
|
1561
1626
|
}));
|
|
1562
1627
|
function _e() {
|
|
1563
|
-
Q.value =
|
|
1628
|
+
Q.value = de({
|
|
1564
1629
|
columns: e.columns,
|
|
1565
1630
|
columnsOptions: e.columnsOptions,
|
|
1566
1631
|
columnsGroups: e.columnsGroups,
|
|
1567
|
-
pageMode:
|
|
1568
|
-
collapsedColumns:
|
|
1569
|
-
events:
|
|
1632
|
+
pageMode: k,
|
|
1633
|
+
collapsedColumns: h,
|
|
1634
|
+
events: j
|
|
1570
1635
|
});
|
|
1571
1636
|
}
|
|
1572
|
-
return
|
|
1637
|
+
return z(() => {
|
|
1573
1638
|
l.value && (l.value.id = `table-${r}`), e.autoLoad && O(), e.grabbable && l.value && Zt(l.value);
|
|
1574
1639
|
}), {
|
|
1575
1640
|
tableId: r,
|
|
@@ -1577,18 +1642,18 @@ const lr = /* @__PURE__ */ A({
|
|
|
1577
1642
|
tableSource: c,
|
|
1578
1643
|
tableOptions: Me,
|
|
1579
1644
|
tableColumns: Q,
|
|
1580
|
-
tableEvents:
|
|
1581
|
-
tableForm:
|
|
1645
|
+
tableEvents: j,
|
|
1646
|
+
tableForm: d,
|
|
1582
1647
|
tableLoading: f,
|
|
1583
1648
|
modalInstance: n,
|
|
1584
1649
|
tableRenderElement: l,
|
|
1585
1650
|
formSource: fe(R(() => {
|
|
1586
|
-
var
|
|
1587
|
-
return (
|
|
1651
|
+
var i;
|
|
1652
|
+
return (i = a == null ? void 0 : a.value) == null ? void 0 : i.formSource;
|
|
1588
1653
|
})),
|
|
1589
1654
|
formInstance: a,
|
|
1590
1655
|
reload: O,
|
|
1591
|
-
preview:
|
|
1656
|
+
preview: w,
|
|
1592
1657
|
edit: v,
|
|
1593
1658
|
export: E,
|
|
1594
1659
|
onSorterChange: ge,
|
|
@@ -1596,26 +1661,26 @@ const lr = /* @__PURE__ */ A({
|
|
|
1596
1661
|
renders: {
|
|
1597
1662
|
renderTableForm: we,
|
|
1598
1663
|
renderTableActions: ve,
|
|
1599
|
-
renderTablePagination:
|
|
1664
|
+
renderTablePagination: Ce
|
|
1600
1665
|
},
|
|
1601
1666
|
tableSelection: {
|
|
1602
1667
|
selectedRowKeys: X,
|
|
1603
1668
|
rowSelection: Z,
|
|
1604
|
-
onSelect:
|
|
1605
|
-
onSelectAll:
|
|
1669
|
+
onSelect: xe,
|
|
1670
|
+
onSelectAll: ke
|
|
1606
1671
|
},
|
|
1607
1672
|
resetSelection: Te,
|
|
1608
|
-
reloadSelection:
|
|
1673
|
+
reloadSelection: Se,
|
|
1609
1674
|
reloadColumns: _e
|
|
1610
1675
|
};
|
|
1611
1676
|
},
|
|
1612
1677
|
render() {
|
|
1613
1678
|
this.reloadColumns();
|
|
1614
|
-
const e = () =>
|
|
1679
|
+
const e = () => s("div", {
|
|
1615
1680
|
class: "table-body"
|
|
1616
|
-
}, [
|
|
1681
|
+
}, [s("div", {
|
|
1617
1682
|
class: "table-body-wrapper"
|
|
1618
|
-
}, [
|
|
1683
|
+
}, [s(Ge, se({
|
|
1619
1684
|
loading: this.tableLoading,
|
|
1620
1685
|
data: this.tableSource,
|
|
1621
1686
|
columns: this.tableColumns,
|
|
@@ -1628,16 +1693,16 @@ const lr = /* @__PURE__ */ A({
|
|
|
1628
1693
|
selectedKeys: this.tableSelection.selectedRowKeys.value,
|
|
1629
1694
|
"onUpdate:selectedKeys": (t) => this.tableSelection.selectedRowKeys.value = t
|
|
1630
1695
|
}, this.tableOptions), null)])]);
|
|
1631
|
-
return
|
|
1696
|
+
return s("div", {
|
|
1632
1697
|
class: {
|
|
1633
1698
|
"table-render": !0,
|
|
1634
1699
|
"auto-fill": this.autoFill
|
|
1635
1700
|
},
|
|
1636
1701
|
ref: (t) => this.tableRenderElement = t
|
|
1637
|
-
}, [
|
|
1702
|
+
}, [s(Qe, {
|
|
1638
1703
|
ref: (t) => this.modalInstance = t
|
|
1639
1704
|
}, {
|
|
1640
|
-
default: () => [
|
|
1705
|
+
default: () => [s("div", {
|
|
1641
1706
|
class: "table-render-content"
|
|
1642
1707
|
}, [this.renders.renderTableForm(), this.renders.renderTableActions(), this.$slots.header && this.$slots.header(), e(), this.renders.renderTablePagination()])]
|
|
1643
1708
|
})]);
|
|
@@ -1656,7 +1721,7 @@ const gr = {
|
|
|
1656
1721
|
};
|
|
1657
1722
|
export {
|
|
1658
1723
|
cr as TableRender,
|
|
1659
|
-
|
|
1724
|
+
Cr as TableRenderResolver,
|
|
1660
1725
|
gr as default,
|
|
1661
1726
|
br as defineColumns,
|
|
1662
1727
|
hr as defineTableLoad,
|