@gx-design-vue/pro-table 0.2.0-beta.94 → 0.2.0-beta.96
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/pro-table.js +587 -584
- package/dist/pro-table.umd.cjs +1 -1
- package/dist/types/ColumnTypings.d.ts +1 -1
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { cloneDeep as
|
|
2
|
-
import { isObject as
|
|
3
|
-
import { reactive as
|
|
1
|
+
import { cloneDeep as ue, omit as Ge, pick as xt } from "lodash-es";
|
|
2
|
+
import { isObject as U, isBoolean as ie, getSlot as Bt, isFunction as Ee, arrayRepeat as tl, runFunction as ll, convertValueBoolean as Re, isArray as ne, getSortIndex as al, isDeepEqualReact as He, handleCurrentPage as nl, genColumnKey as Ft, compareArray as ul, isNumber as Qe, isString as Rt, classNames as Se, filterEmpty as It, getPrefixCls as ut, getRandomNumber as at, handleShowIndex as il, hanndleEmptyField as sl, getTextWidth as ol, getSlotVNode as Fe } from "@gx-design-vue/pro-utils";
|
|
3
|
+
import { reactive as we, isReactive as rl, watch as q, computed as w, ref as E, toRaw as Te, createVNode as c, mergeProps as _, isVNode as ce, watchEffect as Ae, unref as b, onUnmounted as cl, onDeactivated as dl, onMounted as fl, defineComponent as fe, Fragment as _e, nextTick as hl, h as Ot, cloneVNode as it, createTextVNode as De, renderSlot as ml, toRef as oe } from "vue";
|
|
4
4
|
import "ant-design-vue/es/_util/props-util";
|
|
5
|
-
import { warning as
|
|
6
|
-
import { tableProps as
|
|
7
|
-
import { UpOutlined as
|
|
8
|
-
import { useFullscreen as
|
|
9
|
-
import { Grid as st, Space as
|
|
10
|
-
import { useProAppContext as
|
|
11
|
-
import { useContext as
|
|
12
|
-
import
|
|
13
|
-
import { tryOnUnmounted as
|
|
14
|
-
function
|
|
5
|
+
import { warning as vl } from "ant-design-vue/es/vc-util/warning";
|
|
6
|
+
import { tableProps as gl } from "ant-design-vue/es/table/Table";
|
|
7
|
+
import { UpOutlined as yl, DownOutlined as bl, SettingOutlined as Pt, VerticalAlignTopOutlined as Cl, VerticalAlignMiddleOutlined as xl, VerticalAlignBottomOutlined as Sl, FullscreenExitOutlined as wl, FullscreenOutlined as pl, ColumnHeightOutlined as Tl, InfoCircleOutlined as $l, ReloadOutlined as Bl, CopyOutlined as Fl } from "@ant-design/icons-vue";
|
|
8
|
+
import { useFullscreen as kt, useWindowSize as Rl } from "@vueuse/core";
|
|
9
|
+
import { Grid as st, Space as xe, Button as St, Input as wt, TimePicker as Il, DatePicker as jt, TreeSelect as Ol, Spin as nt, Select as Pl, Popover as kl, Checkbox as jl, Tooltip as de, Tree as Nl, Dropdown as El, Menu as We, Pagination as Dl, Table as Ml, message as Al, Empty as zl } from "ant-design-vue";
|
|
10
|
+
import { useProAppContext as Nt } from "@gx-design-vue/pro-app";
|
|
11
|
+
import { useContext as Kl, useProStyle as qe, unit as pt } from "@gx-design-vue/pro-provider";
|
|
12
|
+
import X from "dayjs";
|
|
13
|
+
import { tryOnUnmounted as Yl, useMemo as Ve } from "@gx-design-vue/pro-hooks";
|
|
14
|
+
function Ga(e, l) {
|
|
15
15
|
var C, x, d, S;
|
|
16
16
|
function a() {
|
|
17
|
-
return l != null && l.state &&
|
|
17
|
+
return l != null && l.state && U(l == null ? void 0 : l.state) ? ue(Te(l == null ? void 0 : l.state)) : {};
|
|
18
18
|
}
|
|
19
|
-
const o =
|
|
19
|
+
const o = we({
|
|
20
20
|
params: ((C = l == null ? void 0 : l.state) == null ? void 0 : C.params) || {},
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
request: async (...u) => {
|
|
@@ -24,7 +24,7 @@ function Va(e, l) {
|
|
|
24
24
|
return l != null && l.request ? await ((n = l == null ? void 0 : l.request) == null ? void 0 : n.call(l, ...u)) : void 0;
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
l != null && l.state && (
|
|
27
|
+
l != null && l.state && (rl(l.state) ? q(() => l == null ? void 0 : l.state, () => {
|
|
28
28
|
Object.assign(o, a());
|
|
29
29
|
}, { deep: !0, immediate: !0 }) : Object.assign(o, a()));
|
|
30
30
|
const s = w(() => {
|
|
@@ -40,12 +40,12 @@ function Va(e, l) {
|
|
|
40
40
|
...((r = (n = i.value) == null ? void 0 : n.getFormState) == null ? void 0 : r.call(n)) || {}
|
|
41
41
|
};
|
|
42
42
|
}), m = E(!!((d = (x = s.value) == null ? void 0 : x.loading) != null && d.value));
|
|
43
|
-
return
|
|
43
|
+
return q(() => {
|
|
44
44
|
var u, n;
|
|
45
45
|
return (n = (u = s.value) == null ? void 0 : u.loading) == null ? void 0 : n.value;
|
|
46
46
|
}, (u) => {
|
|
47
47
|
m.value = !!u;
|
|
48
|
-
}),
|
|
48
|
+
}), q(m, (u) => {
|
|
49
49
|
var n, r;
|
|
50
50
|
(r = (n = s.value) == null ? void 0 : n.setLoading) == null || r.call(n, !!u);
|
|
51
51
|
}), {
|
|
@@ -76,8 +76,8 @@ function Va(e, l) {
|
|
|
76
76
|
return (r = (n = s.value) == null ? void 0 : n.reloadAndReset) == null ? void 0 : r.call(n, u);
|
|
77
77
|
},
|
|
78
78
|
setPageAndReload: (u, n, r, g) => {
|
|
79
|
-
var T,
|
|
80
|
-
return (
|
|
79
|
+
var T, O;
|
|
80
|
+
return (O = (T = s.value) == null ? void 0 : T.setPageAndReload) == null ? void 0 : O.call(T, u, n, r, g);
|
|
81
81
|
},
|
|
82
82
|
setPagination: (u) => {
|
|
83
83
|
var n, r;
|
|
@@ -94,8 +94,8 @@ function Va(e, l) {
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
const
|
|
98
|
-
...Ge(
|
|
97
|
+
const Ll = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Et = {
|
|
98
|
+
...Ge(gl(), Ll),
|
|
99
99
|
transformCellText: Function,
|
|
100
100
|
/**
|
|
101
101
|
* @Author gx12358
|
|
@@ -116,7 +116,7 @@ const Yl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
116
116
|
default: void 0
|
|
117
117
|
}
|
|
118
118
|
}, re = {
|
|
119
|
-
...
|
|
119
|
+
...Et,
|
|
120
120
|
rowSelection: {
|
|
121
121
|
type: Object,
|
|
122
122
|
default: void 0
|
|
@@ -384,18 +384,18 @@ const Yl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
384
384
|
onBeforeSearchSubmit: Function,
|
|
385
385
|
onColumnsStateChange: Function
|
|
386
386
|
};
|
|
387
|
-
function
|
|
387
|
+
function Wl(e) {
|
|
388
388
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ce(e);
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function Hl(e, l, a, o) {
|
|
391
391
|
if (!l) return e;
|
|
392
392
|
let s = e;
|
|
393
|
-
if (
|
|
393
|
+
if (U(l)) {
|
|
394
394
|
const i = l.node === "a" ? "span" : l.node;
|
|
395
|
-
return c(i,
|
|
395
|
+
return c(i, _((l == null ? void 0 : l.attr) || {}, {
|
|
396
396
|
class: [l.class, l.node === "a" ? `${a}-a` : ""],
|
|
397
397
|
onClick: l.click
|
|
398
|
-
}),
|
|
398
|
+
}), Wl(e) ? e : {
|
|
399
399
|
default: () => [e]
|
|
400
400
|
});
|
|
401
401
|
}
|
|
@@ -406,30 +406,33 @@ function Wl(e, l, a, o) {
|
|
|
406
406
|
}, [e]);
|
|
407
407
|
break;
|
|
408
408
|
case "time":
|
|
409
|
-
s =
|
|
409
|
+
s = X(e).format("HH:mm:ss");
|
|
410
410
|
break;
|
|
411
411
|
case "dateMonth":
|
|
412
|
-
s = `${
|
|
412
|
+
s = `${X(e).month() + 1}月`;
|
|
413
|
+
break;
|
|
414
|
+
case "date":
|
|
415
|
+
s = X(e).format("YYYY-MM-DD");
|
|
413
416
|
break;
|
|
414
417
|
case "dateTime":
|
|
415
|
-
s =
|
|
418
|
+
s = X(e).format("YYYY-MM-DD HH:mm:ss");
|
|
416
419
|
break;
|
|
417
420
|
}
|
|
418
421
|
return s;
|
|
419
422
|
}
|
|
420
|
-
function
|
|
423
|
+
function Vl(e, l) {
|
|
421
424
|
const a = l && l.current || 1, o = l && l.pageSize || 10;
|
|
422
425
|
return e.filter((s, i) => i < a * o && i >= o * (a - 1));
|
|
423
426
|
}
|
|
424
|
-
function
|
|
427
|
+
function Gl(e) {
|
|
425
428
|
const l = document.createElement("textarea");
|
|
426
429
|
l.style.position = "absolute", l.style.opacity = "0", l.value = e, document.body.appendChild(l), l.select(), document.execCommand("copy"), document.body.removeChild(l);
|
|
427
430
|
}
|
|
428
|
-
function
|
|
431
|
+
function Ql({ emit: e, loading: l }) {
|
|
429
432
|
var i;
|
|
430
|
-
const a = E(
|
|
431
|
-
|
|
432
|
-
a.value =
|
|
433
|
+
const a = E(ie(l.value) ? l.value : U(l.value) ? (i = l.value) == null ? void 0 : i.spinning : !1);
|
|
434
|
+
q(() => l.value, (f) => {
|
|
435
|
+
a.value = ie(f) ? f : U(f) ? f == null ? void 0 : f.spinning : a.value;
|
|
433
436
|
});
|
|
434
437
|
const o = w(() => a.value);
|
|
435
438
|
function s(f) {
|
|
@@ -437,7 +440,7 @@ function Gl({ emit: e, loading: l }) {
|
|
|
437
440
|
}
|
|
438
441
|
return { loadingComputed: o, loading: a, setLoading: s };
|
|
439
442
|
}
|
|
440
|
-
function
|
|
443
|
+
function _l({ size: e, emit: l }) {
|
|
441
444
|
const a = E("middle");
|
|
442
445
|
Ae(() => {
|
|
443
446
|
a.value = e.value;
|
|
@@ -447,19 +450,19 @@ function Ql({ size: e, emit: l }) {
|
|
|
447
450
|
}
|
|
448
451
|
return { sizeRef: a, setTableSize: o };
|
|
449
452
|
}
|
|
450
|
-
function
|
|
453
|
+
function ql({
|
|
451
454
|
slots: e,
|
|
452
455
|
props: l,
|
|
453
456
|
pagination: a
|
|
454
457
|
}) {
|
|
455
|
-
const o =
|
|
456
|
-
|
|
458
|
+
const o = we({}), s = E();
|
|
459
|
+
q(() => a.value, () => {
|
|
457
460
|
var x;
|
|
458
|
-
if (
|
|
461
|
+
if (ie(a.value) && !a.value) {
|
|
459
462
|
s.value = !1;
|
|
460
463
|
return;
|
|
461
464
|
}
|
|
462
|
-
const f =
|
|
465
|
+
const f = Bt(e, b(l), "pageItemRender"), m = Ee(f) ? {
|
|
463
466
|
itemRender: ({
|
|
464
467
|
page: d,
|
|
465
468
|
type: S,
|
|
@@ -488,11 +491,11 @@ function _l({
|
|
|
488
491
|
immediate: !0
|
|
489
492
|
});
|
|
490
493
|
function i(f) {
|
|
491
|
-
if (
|
|
494
|
+
if (U(s.value) && U(f)) {
|
|
492
495
|
const m = {};
|
|
493
496
|
Object.keys(f).forEach((C) => {
|
|
494
497
|
Object.prototype.hasOwnProperty.call(f, C) && s.value[C] === f[C] || (m[C] = f[C]);
|
|
495
|
-
}), Object.keys(m).length > 0 && (Object.assign(s.value, m),
|
|
498
|
+
}), Object.keys(m).length > 0 && (Object.assign(s.value, m), Xl(m) && Object.assign(o, m));
|
|
496
499
|
}
|
|
497
500
|
}
|
|
498
501
|
return {
|
|
@@ -501,19 +504,19 @@ function _l({
|
|
|
501
504
|
setPagination: i
|
|
502
505
|
};
|
|
503
506
|
}
|
|
504
|
-
function
|
|
507
|
+
function Xl(e) {
|
|
505
508
|
if (typeof e != "object" || e === null)
|
|
506
509
|
return !1;
|
|
507
510
|
const l = Object.keys(e);
|
|
508
511
|
return l.length === 2 && l.includes("pageNum") && l.includes("pageSize");
|
|
509
512
|
}
|
|
510
|
-
function
|
|
513
|
+
function Ul(e, l) {
|
|
511
514
|
const a = E([]), o = E([]);
|
|
512
|
-
|
|
515
|
+
q(() => {
|
|
513
516
|
var d;
|
|
514
517
|
return (d = l.value) == null ? void 0 : d.selectedRowKeys;
|
|
515
518
|
}, (d) => {
|
|
516
|
-
a.value =
|
|
519
|
+
a.value = tl([...d || []]);
|
|
517
520
|
}, {
|
|
518
521
|
deep: !0,
|
|
519
522
|
immediate: !0
|
|
@@ -539,7 +542,7 @@ function Xl(e, l) {
|
|
|
539
542
|
if (e.value && a.value.length !== o.value.length) {
|
|
540
543
|
const S = o.value.map((n) => n[e.value]), u = a.value.filter((n) => !S.includes(n));
|
|
541
544
|
d.forEach((n) => {
|
|
542
|
-
u.includes(n[e.value]) && o.value.push(
|
|
545
|
+
u.includes(n[e.value]) && o.value.push(ue(n));
|
|
543
546
|
});
|
|
544
547
|
}
|
|
545
548
|
},
|
|
@@ -548,7 +551,7 @@ function Xl(e, l) {
|
|
|
548
551
|
}
|
|
549
552
|
};
|
|
550
553
|
}
|
|
551
|
-
function
|
|
554
|
+
function Jl(e, l) {
|
|
552
555
|
const a = w(() => l || 0), o = E(), s = E(e);
|
|
553
556
|
function i() {
|
|
554
557
|
o.value && clearTimeout(o.value);
|
|
@@ -561,12 +564,12 @@ function Ul(e, l) {
|
|
|
561
564
|
}, a.value);
|
|
562
565
|
}));
|
|
563
566
|
}
|
|
564
|
-
return
|
|
567
|
+
return Yl(i), {
|
|
565
568
|
cancel: i,
|
|
566
569
|
run: f
|
|
567
570
|
};
|
|
568
571
|
}
|
|
569
|
-
function
|
|
572
|
+
function Zl(e) {
|
|
570
573
|
const l = w(() => e.polling), a = w(() => e.debounceTime), o = w(() => e.dataSource);
|
|
571
574
|
return {
|
|
572
575
|
polling: l,
|
|
@@ -576,129 +579,129 @@ function Jl(e) {
|
|
|
576
579
|
dataSource: o
|
|
577
580
|
};
|
|
578
581
|
}
|
|
579
|
-
function
|
|
580
|
-
const M = E(),
|
|
581
|
-
var
|
|
582
|
-
return
|
|
583
|
-
}),
|
|
582
|
+
function ea({ polling: e, request: l, postData: a, dataSource: o, waitRequest: s, debounceTime: i }, { search: f, columns: m, loading: C, setLoading: x, setColumns: d, removeRowKeys: S, syncSelectedRows: u, formParamsRef: n, setPagination: r, paginationInfo: g, onBeforeSearchSubmit: T, hasCustomRender: O }, F) {
|
|
583
|
+
const M = E(), H = E(!0), L = E(!1), W = E(!1), z = E([]), Q = E(), V = w(() => {
|
|
584
|
+
var R;
|
|
585
|
+
return U(f.value) ? ((R = f.value) == null ? void 0 : R.type) === "button" : !!f.value;
|
|
586
|
+
}), se = async (R = {}) => {
|
|
584
587
|
var ze;
|
|
585
|
-
const { pagination:
|
|
586
|
-
if (!l || !Ee(l) || b(s) && C.value ||
|
|
588
|
+
const { pagination: k, filters: v = {}, sorter: Y = {}, removeKeys: $e = [], isPolling: Xe = !1 } = R;
|
|
589
|
+
if (!l || !Ee(l) || b(s) && C.value || L.value)
|
|
587
590
|
return o.value || [];
|
|
588
|
-
if (
|
|
589
|
-
|
|
591
|
+
if (L.value = !0, !Xe || b(s) || H.value ? x(!0) : y(!0), b(s)) {
|
|
592
|
+
H.value = !1, L.value = !1;
|
|
590
593
|
return;
|
|
591
594
|
}
|
|
592
|
-
|
|
595
|
+
k && r(k);
|
|
593
596
|
try {
|
|
594
597
|
let ve = {};
|
|
595
|
-
if (
|
|
598
|
+
if (ie(k) && !k || ie(g))
|
|
596
599
|
ve = {};
|
|
597
600
|
else {
|
|
598
|
-
const { current:
|
|
599
|
-
ve.pageNum =
|
|
601
|
+
const { current: K = 1, pageSize: ye = 10, total: Z } = b(g) || {};
|
|
602
|
+
ve.pageNum = nl({ current: K, pageSize: ye, total: Z }, $e.length), $e.length && S($e), ve.pageSize = ye;
|
|
600
603
|
}
|
|
601
|
-
const Ke =
|
|
602
|
-
Ke.forEach((
|
|
603
|
-
const ye = (
|
|
604
|
-
|
|
604
|
+
const Ke = U(Y) ? [Y] : Y;
|
|
605
|
+
Ke.forEach((K) => {
|
|
606
|
+
const ye = (K == null ? void 0 : K.columnKey) || (K == null ? void 0 : K.field);
|
|
607
|
+
K && (K != null && K.order) ? d(b(m).map((Z) => (Z.dataIndex === ye ? Z.sortOrder = K == null ? void 0 : K.order : Z.sortOrder = null, Z))) : K && d(b(m).map((Z) => (Z.dataIndex === ye && (Z.sortOrder = null), Z)));
|
|
605
608
|
});
|
|
606
|
-
let
|
|
609
|
+
let Ie = {
|
|
607
610
|
...ve || {},
|
|
608
|
-
...
|
|
611
|
+
...R.params,
|
|
609
612
|
...n
|
|
610
613
|
};
|
|
611
|
-
T && Ee(T) && (
|
|
612
|
-
let
|
|
613
|
-
const ge = await (l == null ? void 0 : l(
|
|
614
|
-
if (
|
|
615
|
-
|
|
616
|
-
const
|
|
617
|
-
return
|
|
618
|
-
total:
|
|
619
|
-
}), p(
|
|
614
|
+
T && Ee(T) && (Ie = await T(Ie, Y, v));
|
|
615
|
+
let ee = [];
|
|
616
|
+
const ge = await (l == null ? void 0 : l(Ie, Ke, v));
|
|
617
|
+
if (L.value = !1, ge && (ge != null && ge.success)) {
|
|
618
|
+
ee = ge.data || [], a && Ee(a) && (ee = await (a == null ? void 0 : a(ee))), u(ee);
|
|
619
|
+
const K = ge.total || (ee == null ? void 0 : ee.length) || 0;
|
|
620
|
+
return K !== ((ze = b(g)) == null ? void 0 : ze.total) && r({
|
|
621
|
+
total: K || 0
|
|
622
|
+
}), p(ee), ee;
|
|
620
623
|
} else
|
|
621
624
|
return [];
|
|
622
625
|
} catch (ve) {
|
|
623
|
-
|
|
626
|
+
z.value === void 0 && p([]), F("requestError", ve);
|
|
624
627
|
} finally {
|
|
625
|
-
|
|
628
|
+
H.value = !1, x(!1);
|
|
626
629
|
}
|
|
627
630
|
return [];
|
|
628
|
-
},
|
|
629
|
-
|
|
630
|
-
const
|
|
631
|
-
return v && !M.value && (
|
|
632
|
-
|
|
633
|
-
}, Math.max(v, 2e3))),
|
|
631
|
+
}, te = Jl(async (R) => {
|
|
632
|
+
Q.value && clearTimeout(Q.value);
|
|
633
|
+
const k = await se(R), v = ll(e.value, k);
|
|
634
|
+
return v && !M.value && (Q.value = setTimeout(() => {
|
|
635
|
+
te.run({ ...R, isPolling: v });
|
|
636
|
+
}, Math.max(v, 2e3))), k;
|
|
634
637
|
}, i.value || 10);
|
|
635
|
-
|
|
636
|
-
M.value = !0, clearTimeout(
|
|
637
|
-
}),
|
|
638
|
-
M.value = !0, clearTimeout(
|
|
639
|
-
}),
|
|
640
|
-
e.value ?
|
|
641
|
-
}, { immediate: !0 }),
|
|
638
|
+
cl(() => {
|
|
639
|
+
M.value = !0, clearTimeout(Q.value);
|
|
640
|
+
}), dl(() => {
|
|
641
|
+
M.value = !0, clearTimeout(Q.value);
|
|
642
|
+
}), q(() => e.value, () => {
|
|
643
|
+
e.value ? te.run({ isPolling: !0 }) : clearTimeout(Q.value);
|
|
644
|
+
}, { immediate: !0 }), q([() => s.value, () => o.value], () => {
|
|
642
645
|
me();
|
|
643
|
-
}, { deep: !0, immediate: !0 }),
|
|
644
|
-
|
|
646
|
+
}, { deep: !0, immediate: !0 }), q([() => n], () => {
|
|
647
|
+
V.value || me();
|
|
645
648
|
}, {
|
|
646
649
|
deep: !0,
|
|
647
650
|
immediate: !0
|
|
648
651
|
});
|
|
649
652
|
function me() {
|
|
650
|
-
|
|
653
|
+
Re(l) ? (!H.value || !e.value) && te.run({ isPolling: !1 }) : p(o.value || []);
|
|
651
654
|
}
|
|
652
|
-
const
|
|
653
|
-
if (
|
|
654
|
-
return b(
|
|
655
|
-
const
|
|
656
|
-
return !b(
|
|
657
|
-
}), t = w(() => b(
|
|
658
|
-
function y(
|
|
659
|
-
|
|
655
|
+
const J = w(() => {
|
|
656
|
+
if (O.value)
|
|
657
|
+
return b(z);
|
|
658
|
+
const R = m.value.filter((k) => k.show || k.show === void 0);
|
|
659
|
+
return !b(z) || !R || R.length === 0 ? [] : b(z);
|
|
660
|
+
}), t = w(() => b(z).some((R) => ne(R.children) && R.children.length > 0));
|
|
661
|
+
function y(R) {
|
|
662
|
+
W.value = R;
|
|
660
663
|
}
|
|
661
|
-
function
|
|
662
|
-
|
|
664
|
+
function I(R, k, v, Y) {
|
|
665
|
+
te.run({ pagination: R, filters: k, sorter: v, extra: Y, isPolling: !1 }), F("change", R, k, v, Y);
|
|
663
666
|
}
|
|
664
|
-
function p(
|
|
667
|
+
function p(R) {
|
|
665
668
|
var v;
|
|
666
|
-
const
|
|
667
|
-
if (!He(
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
total:
|
|
669
|
+
const k = al(ue(R), b(g.value));
|
|
670
|
+
if (!He(k, z.value) && (z.value = k, !l || !Ee(l))) {
|
|
671
|
+
const Y = k.length || 0;
|
|
672
|
+
Y !== ((v = b(g)) == null ? void 0 : v.total) && r({
|
|
673
|
+
total: Y
|
|
671
674
|
});
|
|
672
675
|
}
|
|
673
676
|
}
|
|
674
|
-
function D({ key:
|
|
677
|
+
function D({ key: R, record: k, type: v = "update" }) {
|
|
675
678
|
switch (v) {
|
|
676
679
|
case "update":
|
|
677
|
-
|
|
680
|
+
z.value = z.value.map((Y) => R && k[R] === Y[R] ? { ...Y, ...k } : Y);
|
|
678
681
|
break;
|
|
679
682
|
case "push":
|
|
680
|
-
|
|
683
|
+
z.value.push(k);
|
|
681
684
|
break;
|
|
682
685
|
case "unshift":
|
|
683
|
-
|
|
686
|
+
z.value.unshift(k);
|
|
684
687
|
break;
|
|
685
688
|
case "delete":
|
|
686
|
-
|
|
689
|
+
z.value = z.value.filter((Y) => R ? R && k[R] !== Y[R] : !0);
|
|
687
690
|
break;
|
|
688
691
|
}
|
|
689
692
|
}
|
|
690
693
|
return {
|
|
691
|
-
dataSource:
|
|
694
|
+
dataSource: J,
|
|
692
695
|
isTreeDataRef: t,
|
|
693
696
|
reSetDataList: p,
|
|
694
697
|
changeDataValue: D,
|
|
695
|
-
handleTableChange:
|
|
696
|
-
reload: async (
|
|
697
|
-
|
|
698
|
+
handleTableChange: I,
|
|
699
|
+
reload: async (R) => {
|
|
700
|
+
Re(l) ? await te.run({ ...R, isPolling: !1 }) : F("reload");
|
|
698
701
|
}
|
|
699
702
|
};
|
|
700
703
|
}
|
|
701
|
-
function
|
|
704
|
+
function ta(e) {
|
|
702
705
|
const l = {};
|
|
703
706
|
return e.forEach((a) => {
|
|
704
707
|
let o = a.initialValue;
|
|
@@ -706,8 +709,8 @@ function ea(e) {
|
|
|
706
709
|
!o && s.includes(a.valueType) ? o = void 0 : !o && i.includes(a.valueType) ? o = null : o || (o = ""), a.name === "dateRange" ? (l[a.rangeStartName || "start"] = o ? o[0] : null, l[a.rangeEndName || "end"] = o ? o[1] : null) : a.name && (l[a.name] = o);
|
|
707
710
|
}), l;
|
|
708
711
|
}
|
|
709
|
-
function
|
|
710
|
-
const s =
|
|
712
|
+
function la({ searchMap: e, params: l, columns: a, setPagination: o }) {
|
|
713
|
+
const s = we({}), i = we({}), f = E([]), m = (x) => {
|
|
711
714
|
var S, u;
|
|
712
715
|
const d = [];
|
|
713
716
|
if ((x === "all" || x === "searchMap") && ((S = e.value) == null || S.forEach((n) => d.push(n)), d.forEach((n) => {
|
|
@@ -724,20 +727,20 @@ function ta({ searchMap: e, params: l, columns: a, setPagination: o }) {
|
|
|
724
727
|
} : r) : f.value.push(n);
|
|
725
728
|
})), x === "all" || x === "searchMap" || x === "columns") {
|
|
726
729
|
o({ current: 1 });
|
|
727
|
-
const n =
|
|
730
|
+
const n = ta(d);
|
|
728
731
|
Object.assign(i, { ...n });
|
|
729
732
|
for (const r in n)
|
|
730
733
|
s[r] || (s[r] = n[r]);
|
|
731
734
|
}
|
|
732
735
|
(x === "all" || x === "params") && (o({ current: 1 }), Object.assign(s, l.value));
|
|
733
736
|
};
|
|
734
|
-
|
|
737
|
+
fl(() => {
|
|
735
738
|
m("all");
|
|
736
|
-
}),
|
|
739
|
+
}), q(() => l.value, () => {
|
|
737
740
|
m("params");
|
|
738
|
-
}, { deep: !0 }),
|
|
741
|
+
}, { deep: !0 }), q(() => e.value, () => {
|
|
739
742
|
m("searchMap");
|
|
740
|
-
}, { deep: !0 }),
|
|
743
|
+
}, { deep: !0 }), q(() => a.value, () => {
|
|
741
744
|
m("columns");
|
|
742
745
|
}, { deep: !0 });
|
|
743
746
|
function C(x) {
|
|
@@ -745,12 +748,12 @@ function ta({ searchMap: e, params: l, columns: a, setPagination: o }) {
|
|
|
745
748
|
}
|
|
746
749
|
return { formDataRef: f, formParamsRef: s, defaultParamsRef: i, setFormParams: C };
|
|
747
750
|
}
|
|
748
|
-
function
|
|
749
|
-
const o = E(void 0), s =
|
|
750
|
-
|
|
751
|
+
function aa({ columns: e, columnsState: l, changeColumns: a }) {
|
|
752
|
+
const o = E(void 0), s = we({}), i = we({}), f = we({}), m = E([]);
|
|
753
|
+
q(() => e.value, () => {
|
|
751
754
|
var S;
|
|
752
755
|
(S = b(e)) == null || S.forEach(({ show: u, key: n, fixed: r }, g) => {
|
|
753
|
-
const T =
|
|
756
|
+
const T = Ft(n, g);
|
|
754
757
|
T && (f[T] = { show: u === void 0 ? !0 : u, fixed: r });
|
|
755
758
|
});
|
|
756
759
|
const d = b(e).map((u) => u.key);
|
|
@@ -778,7 +781,7 @@ function la({ columns: e, columnsState: l, changeColumns: a }) {
|
|
|
778
781
|
setSortKeyColumns: x
|
|
779
782
|
};
|
|
780
783
|
}
|
|
781
|
-
function
|
|
784
|
+
function na(e) {
|
|
782
785
|
const l = w(() => e.draggabled), a = w(() => e.neverScroll), o = w(() => e.autoScroll);
|
|
783
786
|
return {
|
|
784
787
|
draggabled: l,
|
|
@@ -786,9 +789,9 @@ function aa(e) {
|
|
|
786
789
|
autoScroll: o
|
|
787
790
|
};
|
|
788
791
|
}
|
|
789
|
-
function
|
|
792
|
+
function ua({ scroll: e, columns: l, breakpoint: a, draggabled: o, autoScroll: s, neverScroll: i }) {
|
|
790
793
|
const f = E([]), m = E([]);
|
|
791
|
-
|
|
794
|
+
q([
|
|
792
795
|
() => e.value,
|
|
793
796
|
() => l.value,
|
|
794
797
|
() => a.value,
|
|
@@ -797,14 +800,14 @@ function na({ scroll: e, columns: l, breakpoint: a, draggabled: o, autoScroll: s
|
|
|
797
800
|
() => s.value,
|
|
798
801
|
() => i.value
|
|
799
802
|
], () => {
|
|
800
|
-
const r = d(
|
|
801
|
-
He(r,
|
|
803
|
+
const r = d(Te(l.value));
|
|
804
|
+
He(r, Te(f.value)) || (f.value = ue(r)), He(r, Te(m.value)) || (m.value = ue(r));
|
|
802
805
|
}, {
|
|
803
806
|
deep: !0,
|
|
804
807
|
immediate: !0
|
|
805
808
|
});
|
|
806
809
|
const C = w(() => {
|
|
807
|
-
const r = x(b(f).filter((
|
|
810
|
+
const r = x(b(f).filter((O) => O.fixed === "left")), g = x(b(f).filter((O) => O.fixed !== "left" && O.fixed !== "right")), T = x(b(f).filter((O) => O.fixed === "right"));
|
|
808
811
|
return [
|
|
809
812
|
...r,
|
|
810
813
|
...g,
|
|
@@ -812,19 +815,19 @@ function na({ scroll: e, columns: l, breakpoint: a, draggabled: o, autoScroll: s
|
|
|
812
815
|
];
|
|
813
816
|
});
|
|
814
817
|
function x(r) {
|
|
815
|
-
return r.sort((g, T) =>
|
|
818
|
+
return r.sort((g, T) => ul(g, T, "order", 0));
|
|
816
819
|
}
|
|
817
820
|
function d(r) {
|
|
818
|
-
return
|
|
819
|
-
var
|
|
820
|
-
if (g.dataIndex === "action" || T === r.length - 1 ? g.resizable = !1 : g.resizable =
|
|
821
|
+
return ue(r).map((g, T) => {
|
|
822
|
+
var O;
|
|
823
|
+
if (g.dataIndex === "action" || T === r.length - 1 ? g.resizable = !1 : g.resizable = ie(g.resizable) ? g.resizable : !!(Qe(g.width) && b(o)), !g.width || b(i))
|
|
821
824
|
return g;
|
|
822
825
|
if (g.dataIndex === "action" && b(s))
|
|
823
|
-
if ((
|
|
826
|
+
if ((O = b(e)) != null && O.x || !b(a))
|
|
824
827
|
g.width = g.width || 100, g.fixed = "right";
|
|
825
828
|
else {
|
|
826
|
-
const
|
|
827
|
-
g.width = (
|
|
829
|
+
const F = b(l).find((M) => M.dataIndex === g.dataIndex);
|
|
830
|
+
g.width = (F == null ? void 0 : F.width) || "", g.fixed = F == null ? void 0 : F.fixed;
|
|
828
831
|
}
|
|
829
832
|
return g;
|
|
830
833
|
});
|
|
@@ -837,14 +840,14 @@ function na({ scroll: e, columns: l, breakpoint: a, draggabled: o, autoScroll: s
|
|
|
837
840
|
f.value = [];
|
|
838
841
|
return;
|
|
839
842
|
}
|
|
840
|
-
He(d(r),
|
|
843
|
+
He(d(r), Te(f.value)) || (f.value = d(r));
|
|
841
844
|
}
|
|
842
845
|
function n(r) {
|
|
843
|
-
u(
|
|
844
|
-
var
|
|
846
|
+
u(ue(Te(l.value)).map((g) => {
|
|
847
|
+
var O, F, M;
|
|
845
848
|
const T = g.key ? {
|
|
846
|
-
show: (
|
|
847
|
-
fixed: (
|
|
849
|
+
show: (O = r[g.key]) == null ? void 0 : O.show,
|
|
850
|
+
fixed: (F = r[g.key]) == null ? void 0 : F.fixed,
|
|
848
851
|
order: (M = r[g.key]) == null ? void 0 : M.order
|
|
849
852
|
} : {};
|
|
850
853
|
return { ...g, ...T };
|
|
@@ -859,7 +862,7 @@ function na({ scroll: e, columns: l, breakpoint: a, draggabled: o, autoScroll: s
|
|
|
859
862
|
resizeColumnWidth: S
|
|
860
863
|
};
|
|
861
864
|
}
|
|
862
|
-
function
|
|
865
|
+
function ia(e) {
|
|
863
866
|
const l = w(() => e.scroll), a = w(() => e.autoScroll), o = w(() => e.modalScroll), s = w(() => e.neverScroll), i = w(() => e.rowSelection), f = w(() => e.scrollBreakpoint);
|
|
864
867
|
return {
|
|
865
868
|
scroll: l,
|
|
@@ -870,29 +873,29 @@ function ua(e) {
|
|
|
870
873
|
scrollBreakpoint: f
|
|
871
874
|
};
|
|
872
875
|
}
|
|
873
|
-
function
|
|
876
|
+
function sa({ scroll: e, columns: l, autoScroll: a, modalScroll: o, neverScroll: s, rowSelection: i, screens: f, innerWidth: m, scrollBreakpoint: C }) {
|
|
874
877
|
const x = w(() => {
|
|
875
878
|
var u, n, r;
|
|
876
|
-
return b(C) ? Qe(b(C)) ? m.value > b(C) :
|
|
879
|
+
return b(C) ? Qe(b(C)) ? m.value > b(C) : Rt(b(C)) ? (u = f.value) == null ? void 0 : u[b(C)] : (n = f.value) == null ? void 0 : n.xl : (r = f.value) == null ? void 0 : r.xl;
|
|
877
880
|
}), d = w(() => {
|
|
878
881
|
let u = 0;
|
|
879
|
-
const n = b(i) ? 60 : 0, r = 150, g =
|
|
880
|
-
g.forEach((
|
|
881
|
-
u += Number.parseInt(String(
|
|
882
|
+
const n = b(i) ? 60 : 0, r = 150, g = ue(b(l));
|
|
883
|
+
g.forEach((F) => {
|
|
884
|
+
u += Number.parseInt(String(F.width)) || 0;
|
|
882
885
|
});
|
|
883
|
-
const
|
|
884
|
-
return
|
|
886
|
+
const O = g.filter((F) => !Reflect.has(F, "width")).length;
|
|
887
|
+
return O !== 0 && (u += O * r), n && (u += n), u;
|
|
885
888
|
});
|
|
886
889
|
return { proScroll: w(() => {
|
|
887
890
|
var u, n;
|
|
888
891
|
return b(s) ? {} : b(e) && Object.keys(b(e)).length ? b(e) : b(o) ? {
|
|
889
892
|
y: ((u = b(e)) == null ? void 0 : u.y) || ((n = f.value) != null && n.xl ? 400 : 235)
|
|
890
|
-
} : b(a) ? x.value ? {} :
|
|
893
|
+
} : b(a) ? x.value ? {} : ie(x.value) ? { x: b(d) } : {} : {};
|
|
891
894
|
}), breakpoint: x };
|
|
892
895
|
}
|
|
893
|
-
const { provideContext:
|
|
894
|
-
function
|
|
895
|
-
const a =
|
|
896
|
+
const { provideContext: oa, useInjectContext: he } = Kl("pro-table");
|
|
897
|
+
function ra(e, l) {
|
|
898
|
+
const a = we({});
|
|
896
899
|
function o() {
|
|
897
900
|
Object.keys(e).forEach((f) => {
|
|
898
901
|
s(f, e[f]);
|
|
@@ -915,7 +918,7 @@ function oa(e, l) {
|
|
|
915
918
|
changeFormState: s
|
|
916
919
|
};
|
|
917
920
|
}
|
|
918
|
-
const
|
|
921
|
+
const ca = (e) => ({
|
|
919
922
|
[`${e.componentCls}-search`]: {
|
|
920
923
|
position: "relative",
|
|
921
924
|
display: "flex",
|
|
@@ -982,31 +985,31 @@ const ra = (e) => ({
|
|
|
982
985
|
alignItems: "center"
|
|
983
986
|
}
|
|
984
987
|
});
|
|
985
|
-
function
|
|
986
|
-
return typeof l == "function" ? l(
|
|
988
|
+
function Ce(e, l) {
|
|
989
|
+
return typeof l == "function" ? l(X(e)) : X(e).format(l);
|
|
987
990
|
}
|
|
988
991
|
function Ne(e, l) {
|
|
989
992
|
return l ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
990
993
|
}
|
|
991
|
-
const
|
|
992
|
-
if (
|
|
994
|
+
const Tt = (e, l, a = "string") => {
|
|
995
|
+
if (ne(e)) {
|
|
993
996
|
const [o, s] = e;
|
|
994
997
|
let i, f;
|
|
995
998
|
if (Array.isArray(l) ? (i = l[0], f = l[1]) : typeof l == "object" && l.type === "mask" ? (i = l.format, f = l.format) : (i = l, f = l), a === "string") {
|
|
996
|
-
const m = o ?
|
|
999
|
+
const m = o ? Ce(o, i) : "", C = s ? Ce(s, f) : "";
|
|
997
1000
|
return [m, C];
|
|
998
1001
|
}
|
|
999
|
-
return [
|
|
1002
|
+
return [X(o), X(s)];
|
|
1000
1003
|
}
|
|
1001
1004
|
}, {
|
|
1002
|
-
useBreakpoint:
|
|
1005
|
+
useBreakpoint: da
|
|
1003
1006
|
} = st, {
|
|
1004
|
-
MonthPicker:
|
|
1005
|
-
RangePicker:
|
|
1006
|
-
YearPicker:
|
|
1007
|
-
WeekPicker:
|
|
1008
|
-
QuarterPicker:
|
|
1009
|
-
} =
|
|
1007
|
+
MonthPicker: fa,
|
|
1008
|
+
RangePicker: ha,
|
|
1009
|
+
YearPicker: ma,
|
|
1010
|
+
WeekPicker: va,
|
|
1011
|
+
QuarterPicker: ga
|
|
1012
|
+
} = jt, Je = [{
|
|
1010
1013
|
value: "xxl",
|
|
1011
1014
|
span: 4
|
|
1012
1015
|
}, {
|
|
@@ -1024,7 +1027,7 @@ const pt = (e, l, a = "string") => {
|
|
|
1024
1027
|
}, {
|
|
1025
1028
|
value: "xs",
|
|
1026
1029
|
span: 1
|
|
1027
|
-
}],
|
|
1030
|
+
}], Dt = /* @__PURE__ */ fe({
|
|
1028
1031
|
name: "ProTableForm",
|
|
1029
1032
|
props: {
|
|
1030
1033
|
modal: re.modalScroll,
|
|
@@ -1045,7 +1048,7 @@ const pt = (e, l, a = "string") => {
|
|
|
1045
1048
|
const {
|
|
1046
1049
|
wrapSSR: o,
|
|
1047
1050
|
hashId: s
|
|
1048
|
-
} = qe("ProTableForm", [
|
|
1051
|
+
} = qe("ProTableForm", [ca], e.prefixCls), i = Nt(), f = da(), {
|
|
1049
1052
|
manualSearch: m,
|
|
1050
1053
|
searchConfig: C,
|
|
1051
1054
|
searchActions: x
|
|
@@ -1053,51 +1056,51 @@ const pt = (e, l, a = "string") => {
|
|
|
1053
1056
|
formState: d,
|
|
1054
1057
|
resetFormState: S,
|
|
1055
1058
|
changeFormState: u
|
|
1056
|
-
} =
|
|
1059
|
+
} = ra(e.defaultParams || {}, e.searchMap || []), n = E(!1), r = w(() => {
|
|
1057
1060
|
var t, y;
|
|
1058
|
-
return
|
|
1061
|
+
return ie((t = x.value) == null ? void 0 : t.reset) ? (y = x.value) == null ? void 0 : y.reset : m.value;
|
|
1059
1062
|
}), g = w(() => {
|
|
1060
1063
|
var t;
|
|
1061
|
-
return
|
|
1064
|
+
return O((t = C.value) == null ? void 0 : t.span);
|
|
1062
1065
|
}), T = w(() => {
|
|
1063
1066
|
var t;
|
|
1064
1067
|
return (t = C.value) == null ? void 0 : t.label;
|
|
1065
1068
|
});
|
|
1066
|
-
|
|
1069
|
+
q(() => {
|
|
1067
1070
|
var t;
|
|
1068
1071
|
return (t = C.value) == null ? void 0 : t.defaultCollapsed;
|
|
1069
1072
|
}, (t) => {
|
|
1070
1073
|
n.value = n.value || !!t;
|
|
1071
1074
|
});
|
|
1072
|
-
function
|
|
1075
|
+
function O(t) {
|
|
1073
1076
|
let y = 4;
|
|
1074
|
-
for (let
|
|
1075
|
-
const p = Je[
|
|
1077
|
+
for (let I = 0; I < Je.length; I += 1) {
|
|
1078
|
+
const p = Je[I].value;
|
|
1076
1079
|
if (f.value[p]) {
|
|
1077
|
-
y = (t == null ? void 0 : t[p]) || (e.modal ? 3 : Je[
|
|
1080
|
+
y = (t == null ? void 0 : t[p]) || (e.modal ? 3 : Je[I].span);
|
|
1078
1081
|
break;
|
|
1079
1082
|
}
|
|
1080
1083
|
}
|
|
1081
1084
|
return y;
|
|
1082
1085
|
}
|
|
1083
|
-
const
|
|
1086
|
+
const F = (t) => {
|
|
1084
1087
|
n.value = t;
|
|
1085
|
-
}, M = (t, y,
|
|
1086
|
-
...
|
|
1088
|
+
}, M = (t, y, I) => (t + 1) % y === 0 ? {
|
|
1089
|
+
...I,
|
|
1087
1090
|
marginRight: 0
|
|
1088
1091
|
} : {
|
|
1089
|
-
...
|
|
1092
|
+
...I,
|
|
1090
1093
|
marginRight: "2%"
|
|
1091
|
-
},
|
|
1092
|
-
const t =
|
|
1093
|
-
return y && (t[y.name] = d[y.name] || y.initialValue || ""),
|
|
1094
|
-
},
|
|
1095
|
-
|
|
1096
|
-
var
|
|
1097
|
-
(m.value || t) && ((
|
|
1094
|
+
}, H = () => {
|
|
1095
|
+
const t = ue(d), y = e.searchMap.find((D) => D.valueType === "text") || "", I = e.searchMap.find((D) => D.valueType === "dateRange") || "", p = e.searchMap.find((D) => D.valueType === "treeSelect");
|
|
1096
|
+
return y && (t[y.name] = d[y.name] || y.initialValue || ""), I && (t[I.rangeStartName || "start"] = t[I.name] ? t[I.name][0] : "", t[I.rangeEndName || "end"] = t[I.name] ? t[I.name][1] : "", delete t[I.name]), p && (p != null && p.name && ne(d[p == null ? void 0 : p.name]) && (t[p.name] = d[p.name].length ? d[p.name].map((D) => D[p.valueKey === "text" ? "label" : "value"]).join() : ""), p != null && p.name && ne(t[p == null ? void 0 : p.name]) && (t[p.name] = t[p.name].length ? t[p.name].map((D) => D[p.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
1097
|
+
}, L = (t = !1, y) => {
|
|
1098
|
+
hl(() => {
|
|
1099
|
+
var I;
|
|
1100
|
+
(m.value || t) && ((I = e.onSearch) == null || I.call(e, H(), t ? y ? "reset" : "submit" : void 0));
|
|
1098
1101
|
});
|
|
1099
|
-
},
|
|
1100
|
-
var
|
|
1102
|
+
}, W = (t, y) => {
|
|
1103
|
+
var I, p;
|
|
1101
1104
|
switch (y.valueType) {
|
|
1102
1105
|
case "text":
|
|
1103
1106
|
u(y.name || "", t || "");
|
|
@@ -1106,101 +1109,101 @@ const pt = (e, l, a = "string") => {
|
|
|
1106
1109
|
u(y.name || "", t ?? void 0);
|
|
1107
1110
|
break;
|
|
1108
1111
|
case "treeSelect":
|
|
1109
|
-
u(y.name || "", t ?? ((
|
|
1112
|
+
u(y.name || "", t ?? ((I = y.field) != null && I.treeCheckable || (p = y.field) != null && p.multiple ? [] : null));
|
|
1110
1113
|
break;
|
|
1111
1114
|
case "date":
|
|
1112
|
-
u(y.name || "", t ?
|
|
1115
|
+
u(y.name || "", t ? Ce(t, Ne(y.valueFormat, y.showTime)) : null);
|
|
1113
1116
|
break;
|
|
1114
1117
|
case "dateWeek":
|
|
1115
|
-
u(y.name || "", t ?
|
|
1118
|
+
u(y.name || "", t ? Ce(t, "YYYY-wo") : null);
|
|
1116
1119
|
break;
|
|
1117
1120
|
case "dateMonth":
|
|
1118
|
-
u(y.name || "", t ?
|
|
1121
|
+
u(y.name || "", t ? Ce(t, "YYYY-MM") : null);
|
|
1119
1122
|
break;
|
|
1120
1123
|
case "dateQuarter":
|
|
1121
|
-
u(y.name || "", t ?
|
|
1124
|
+
u(y.name || "", t ? Ce(t, "YYYY-QQ") : null);
|
|
1122
1125
|
break;
|
|
1123
1126
|
case "dateYear":
|
|
1124
|
-
u(y.name || "", t ?
|
|
1127
|
+
u(y.name || "", t ? Ce(t, "YYYY") : null);
|
|
1125
1128
|
break;
|
|
1126
1129
|
case "dateRange":
|
|
1127
|
-
u(y.name || "", t &&
|
|
1130
|
+
u(y.name || "", t && ne(t) && t.length === 2 ? Tt(t, Ne(y.valueFormat, y.showTime)) : null);
|
|
1128
1131
|
break;
|
|
1129
1132
|
case "time":
|
|
1130
|
-
u(y.name || "", t ?
|
|
1133
|
+
u(y.name || "", t ? Ce(t, y.valueFormat || "HH:mm:ss") : null);
|
|
1131
1134
|
break;
|
|
1132
1135
|
}
|
|
1133
|
-
y.valueType === "treeSelect" || y.valueType,
|
|
1134
|
-
},
|
|
1135
|
-
S(),
|
|
1136
|
+
y.valueType === "treeSelect" || y.valueType, L();
|
|
1137
|
+
}, z = (t = !0) => {
|
|
1138
|
+
S(), L(!0, t);
|
|
1136
1139
|
};
|
|
1137
1140
|
a({
|
|
1138
|
-
getFormState: () =>
|
|
1139
|
-
resetForm:
|
|
1141
|
+
getFormState: () => H(),
|
|
1142
|
+
resetForm: z
|
|
1140
1143
|
});
|
|
1141
|
-
const
|
|
1144
|
+
const Q = () => {
|
|
1142
1145
|
var y;
|
|
1143
1146
|
const t = (y = i == null ? void 0 : i.emptyText) == null ? void 0 : y.value;
|
|
1144
1147
|
if (t) {
|
|
1145
|
-
const
|
|
1148
|
+
const I = ce(t), p = I ? Ot(t) : It(t || []);
|
|
1146
1149
|
return c("div", {
|
|
1147
|
-
class:
|
|
1148
|
-
}, [
|
|
1150
|
+
class: Se(`${e.prefixCls}-search-empty-text`, s.value)
|
|
1151
|
+
}, [I ? p : ne(p) ? p.map((D) => it(D)) : void 0]);
|
|
1149
1152
|
}
|
|
1150
|
-
},
|
|
1151
|
-
default: () => [r.value && c(
|
|
1152
|
-
onClick: () =>
|
|
1153
|
+
}, V = () => (m.value || r.value) && c(xe, null, {
|
|
1154
|
+
default: () => [r.value && c(St, {
|
|
1155
|
+
onClick: () => z()
|
|
1153
1156
|
}, {
|
|
1154
1157
|
default: () => {
|
|
1155
1158
|
var t;
|
|
1156
1159
|
return [((t = x.value) == null ? void 0 : t.resetText) || "重置"];
|
|
1157
1160
|
}
|
|
1158
|
-
}), m.value && c(
|
|
1161
|
+
}), m.value && c(St, {
|
|
1159
1162
|
loading: e.loading,
|
|
1160
1163
|
type: "primary",
|
|
1161
|
-
onClick: () =>
|
|
1164
|
+
onClick: () => L(!0)
|
|
1162
1165
|
}, {
|
|
1163
1166
|
default: () => {
|
|
1164
1167
|
var t;
|
|
1165
1168
|
return [((t = x.value) == null ? void 0 : t.searchText) || "查询"];
|
|
1166
1169
|
}
|
|
1167
1170
|
})]
|
|
1168
|
-
}),
|
|
1171
|
+
}), se = ({
|
|
1169
1172
|
formItemStyle: t,
|
|
1170
1173
|
advanced: y,
|
|
1171
|
-
showAdvanced:
|
|
1174
|
+
showAdvanced: I = !0
|
|
1172
1175
|
}) => c("div", {
|
|
1173
1176
|
style: t,
|
|
1174
1177
|
class: `${e.prefixCls}-search-collapse-button ${s.value}`
|
|
1175
|
-
}, [c(
|
|
1178
|
+
}, [c(xe, {
|
|
1176
1179
|
size: 16
|
|
1177
1180
|
}, {
|
|
1178
1181
|
default: () => {
|
|
1179
1182
|
var p, D;
|
|
1180
|
-
return [
|
|
1183
|
+
return [V(), I && c("span", {
|
|
1181
1184
|
class: `${e.prefixCls}-a ${s.value}`,
|
|
1182
|
-
onClick: () =>
|
|
1183
|
-
}, [y ? "收起" : "展开", (p = C.value) != null && p.collapseRender ? (D = C.value) == null ? void 0 : D.collapseRender(y) : y ? c(
|
|
1185
|
+
onClick: () => F(!y)
|
|
1186
|
+
}, [y ? "收起" : "展开", (p = C.value) != null && p.collapseRender ? (D = C.value) == null ? void 0 : D.collapseRender(y) : y ? c(yl, null, null) : c(bl, null, null)])];
|
|
1184
1187
|
}
|
|
1185
|
-
})]),
|
|
1186
|
-
var p, D,
|
|
1188
|
+
})]), te = (t) => {
|
|
1189
|
+
var p, D, R, k;
|
|
1187
1190
|
let y;
|
|
1188
|
-
const
|
|
1191
|
+
const I = m.value ? wt : wt.Search;
|
|
1189
1192
|
switch (t.valueType) {
|
|
1190
1193
|
case "text":
|
|
1191
|
-
y = c(
|
|
1194
|
+
y = c(I, _({
|
|
1192
1195
|
style: {
|
|
1193
1196
|
width: "100%"
|
|
1194
1197
|
},
|
|
1195
1198
|
value: d[t.name],
|
|
1196
1199
|
placeholder: t.placeholder || "请输入",
|
|
1197
1200
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1198
|
-
onChange: (v) =>
|
|
1199
|
-
onSearch: (v) =>
|
|
1201
|
+
onChange: (v) => W(v.target.value, t),
|
|
1202
|
+
onSearch: (v) => L()
|
|
1200
1203
|
}, t.field || {}), null);
|
|
1201
1204
|
break;
|
|
1202
1205
|
case "select":
|
|
1203
|
-
y = c(
|
|
1206
|
+
y = c(Pl, _({
|
|
1204
1207
|
style: {
|
|
1205
1208
|
width: "100%"
|
|
1206
1209
|
},
|
|
@@ -1213,8 +1216,8 @@ const pt = (e, l, a = "string") => {
|
|
|
1213
1216
|
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? c(nt, {
|
|
1214
1217
|
size: "small",
|
|
1215
1218
|
indicator: (p = i == null ? void 0 : i.indicator) == null ? void 0 : p.value
|
|
1216
|
-
}, null) :
|
|
1217
|
-
onChange: (v) =>
|
|
1219
|
+
}, null) : Q(),
|
|
1220
|
+
onChange: (v) => W(v, t),
|
|
1218
1221
|
options: t.loading ? [] : (D = t == null ? void 0 : t.valueEnum) == null ? void 0 : D.map((v) => ({
|
|
1219
1222
|
label: v.text,
|
|
1220
1223
|
value: v.value
|
|
@@ -1222,7 +1225,7 @@ const pt = (e, l, a = "string") => {
|
|
|
1222
1225
|
}, t.field || {}), null);
|
|
1223
1226
|
break;
|
|
1224
1227
|
case "treeSelect":
|
|
1225
|
-
y = c(
|
|
1228
|
+
y = c(Ol, _({
|
|
1226
1229
|
style: {
|
|
1227
1230
|
width: "100%"
|
|
1228
1231
|
},
|
|
@@ -1233,95 +1236,95 @@ const pt = (e, l, a = "string") => {
|
|
|
1233
1236
|
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1234
1237
|
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? c(nt, {
|
|
1235
1238
|
size: "small",
|
|
1236
|
-
indicator: (
|
|
1237
|
-
}, null) :
|
|
1238
|
-
onChange: (v) =>
|
|
1239
|
+
indicator: (R = i == null ? void 0 : i.indicator) == null ? void 0 : R.value
|
|
1240
|
+
}, null) : Q(),
|
|
1241
|
+
onChange: (v) => W(v, t)
|
|
1239
1242
|
}, t.field || {}), null);
|
|
1240
1243
|
break;
|
|
1241
1244
|
case "date":
|
|
1242
|
-
y = c(
|
|
1245
|
+
y = c(jt, _({
|
|
1243
1246
|
style: {
|
|
1244
1247
|
width: "100%"
|
|
1245
1248
|
},
|
|
1246
|
-
value: d[t.name] ?
|
|
1249
|
+
value: d[t.name] ? X(d[t.name]) : void 0,
|
|
1247
1250
|
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1248
1251
|
placeholder: t.placeholder || "请选择",
|
|
1249
1252
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1250
1253
|
format: Ne(t.valueFormat, t.showTime),
|
|
1251
1254
|
showTime: t.showTime,
|
|
1252
1255
|
showToday: t.showToday || !0,
|
|
1253
|
-
onChange: (v) =>
|
|
1256
|
+
onChange: (v) => W(v, t)
|
|
1254
1257
|
}, t.field || {}), null);
|
|
1255
1258
|
break;
|
|
1256
1259
|
case "dateWeek":
|
|
1257
|
-
y = c(
|
|
1260
|
+
y = c(va, _({
|
|
1258
1261
|
style: {
|
|
1259
1262
|
width: "100%"
|
|
1260
1263
|
},
|
|
1261
|
-
value: d[t.name] ?
|
|
1264
|
+
value: d[t.name] ? X(d[t.name], t.valueFormat || "YYYY-wo") : void 0,
|
|
1262
1265
|
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1263
1266
|
placeholder: t.placeholder || "请选择",
|
|
1264
|
-
onChange: (v) =>
|
|
1267
|
+
onChange: (v) => W(v, t)
|
|
1265
1268
|
}, t.field || {}), null);
|
|
1266
1269
|
break;
|
|
1267
1270
|
case "dateMonth":
|
|
1268
|
-
y = c(
|
|
1271
|
+
y = c(fa, _({
|
|
1269
1272
|
style: {
|
|
1270
1273
|
width: "100%"
|
|
1271
1274
|
},
|
|
1272
|
-
value: d[t.name] ?
|
|
1275
|
+
value: d[t.name] ? X(d[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
1273
1276
|
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1274
1277
|
placeholder: t.placeholder || "请选择",
|
|
1275
|
-
onChange: (v) =>
|
|
1278
|
+
onChange: (v) => W(v, t)
|
|
1276
1279
|
}, t.field || {}), null);
|
|
1277
1280
|
break;
|
|
1278
1281
|
case "dateQuarter":
|
|
1279
|
-
y = c(
|
|
1282
|
+
y = c(ga, _({
|
|
1280
1283
|
style: {
|
|
1281
1284
|
width: "100%"
|
|
1282
1285
|
},
|
|
1283
|
-
value: d[t.name] ?
|
|
1286
|
+
value: d[t.name] ? X(d[t.name], t.valueFormat || "YYYY-QQ") : void 0,
|
|
1284
1287
|
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1285
1288
|
placeholder: t.placeholder || "请选择",
|
|
1286
|
-
onChange: (v) =>
|
|
1289
|
+
onChange: (v) => W(v, t)
|
|
1287
1290
|
}, t.field || {}), null);
|
|
1288
1291
|
break;
|
|
1289
1292
|
case "dateYear":
|
|
1290
|
-
y = c(
|
|
1293
|
+
y = c(ma, _({
|
|
1291
1294
|
style: {
|
|
1292
1295
|
width: "100%"
|
|
1293
1296
|
},
|
|
1294
|
-
value: d[t.name] ?
|
|
1297
|
+
value: d[t.name] ? X(d[t.name], t.valueFormat || "YYYY") : void 0,
|
|
1295
1298
|
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1296
1299
|
placeholder: t.placeholder || "请选择",
|
|
1297
|
-
onChange: (v) =>
|
|
1300
|
+
onChange: (v) => W(v, t)
|
|
1298
1301
|
}, t.field || {}), null);
|
|
1299
1302
|
break;
|
|
1300
1303
|
case "dateRange":
|
|
1301
|
-
y = c(
|
|
1304
|
+
y = c(ha, _({
|
|
1302
1305
|
style: {
|
|
1303
1306
|
width: "100%"
|
|
1304
1307
|
},
|
|
1305
|
-
value: d[t.name] &&
|
|
1308
|
+
value: d[t.name] && ne(d[t.name]) && ((k = d[t.name]) == null ? void 0 : k.length) === 2 ? Tt(d[t.name], Ne(t.valueFormat, t.showTime), "dayjs") : void 0,
|
|
1306
1309
|
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1307
1310
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
1308
1311
|
format: Ne(t.valueFormat, t.showTime),
|
|
1309
1312
|
showTime: t.showTime,
|
|
1310
|
-
onChange: (v) =>
|
|
1313
|
+
onChange: (v) => W(v, t)
|
|
1311
1314
|
}, t.field || {}), null);
|
|
1312
1315
|
break;
|
|
1313
1316
|
case "time":
|
|
1314
|
-
y = c(
|
|
1317
|
+
y = c(Il, _({
|
|
1315
1318
|
style: {
|
|
1316
1319
|
width: "100%"
|
|
1317
1320
|
},
|
|
1318
|
-
value: d[t.name] ?
|
|
1321
|
+
value: d[t.name] ? X(d[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
1319
1322
|
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1320
1323
|
placeholder: t.placeholder || "请选择",
|
|
1321
1324
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1322
1325
|
use12Hours: t.use12Hours,
|
|
1323
1326
|
format: t.valueFormat || "HH:mm:ss",
|
|
1324
|
-
onChange: (v) =>
|
|
1327
|
+
onChange: (v) => W(v, t)
|
|
1325
1328
|
}, t.field || {}), null);
|
|
1326
1329
|
break;
|
|
1327
1330
|
}
|
|
@@ -1330,33 +1333,33 @@ const pt = (e, l, a = "string") => {
|
|
|
1330
1333
|
formItemStyle: t = {},
|
|
1331
1334
|
item: y
|
|
1332
1335
|
}) => {
|
|
1333
|
-
var p, D,
|
|
1334
|
-
const
|
|
1336
|
+
var p, D, R, k, v, Y;
|
|
1337
|
+
const I = y.labelAlign || ((p = T.value) == null ? void 0 : p.align);
|
|
1335
1338
|
return c("div", {
|
|
1336
1339
|
class: `${e.prefixCls}-search-item`,
|
|
1337
1340
|
style: {
|
|
1338
1341
|
...t,
|
|
1339
|
-
gap: (D = T.value) != null && D.gap ?
|
|
1342
|
+
gap: (D = T.value) != null && D.gap ? pt((R = T.value) == null ? void 0 : R.gap) : void 0
|
|
1340
1343
|
}
|
|
1341
1344
|
}, [y.label && c("div", {
|
|
1342
|
-
class:
|
|
1345
|
+
class: Se(`${e.prefixCls}-search-item-label`, ((k = T.value) == null ? void 0 : k.colon) === !1 && `${e.prefixCls}-search-item-label-no-colon`, I && `${e.prefixCls}-search-item-label-${I}`),
|
|
1343
1346
|
style: {
|
|
1344
|
-
width: (v = T.value) != null && v.width ?
|
|
1347
|
+
width: (v = T.value) != null && v.width ? pt((Y = T.value) == null ? void 0 : Y.width) : void 0
|
|
1345
1348
|
}
|
|
1346
1349
|
}, [y.label]), c("div", {
|
|
1347
|
-
class:
|
|
1348
|
-
}, [ce(y) ? y :
|
|
1349
|
-
},
|
|
1350
|
-
var
|
|
1351
|
-
const t = [...e.searchMap, ...((
|
|
1350
|
+
class: Se(`${e.prefixCls}-search-item-children`)
|
|
1351
|
+
}, [ce(y) ? y : te(y)])]);
|
|
1352
|
+
}, J = () => {
|
|
1353
|
+
var I;
|
|
1354
|
+
const t = [...e.searchMap, ...((I = l.default) == null ? void 0 : I.call(l)) || []], y = {
|
|
1352
1355
|
width: `${(100 - (g.value - 1) * 2) / g.value}%`
|
|
1353
1356
|
};
|
|
1354
1357
|
return t.map((p, D) => {
|
|
1355
|
-
const
|
|
1358
|
+
const R = M(D, g.value, y);
|
|
1356
1359
|
return t.length < g.value || n.value ? c(_e, null, [me({
|
|
1357
|
-
formItemStyle:
|
|
1360
|
+
formItemStyle: R,
|
|
1358
1361
|
item: p
|
|
1359
|
-
}), D === t.length - 1 &&
|
|
1362
|
+
}), D === t.length - 1 && se({
|
|
1360
1363
|
formItemStyle: {
|
|
1361
1364
|
flex: 1,
|
|
1362
1365
|
justifyContent: "flex-end"
|
|
@@ -1364,12 +1367,12 @@ const pt = (e, l, a = "string") => {
|
|
|
1364
1367
|
advanced: n.value,
|
|
1365
1368
|
showAdvanced: n.value
|
|
1366
1369
|
})]) : c(_e, null, [D < g.value - 1 && me({
|
|
1367
|
-
formItemStyle:
|
|
1370
|
+
formItemStyle: R,
|
|
1368
1371
|
item: p
|
|
1369
1372
|
}), D === g.value - 1 && (g.value - 1 === 0 || t.length === g.value) && me({
|
|
1370
|
-
formItemStyle:
|
|
1373
|
+
formItemStyle: R,
|
|
1371
1374
|
item: p
|
|
1372
|
-
}), D === g.value - 1 && t.length >= g.value &&
|
|
1375
|
+
}), D === g.value - 1 && t.length >= g.value && se({
|
|
1373
1376
|
formItemStyle: {
|
|
1374
1377
|
flex: 1,
|
|
1375
1378
|
justifyContent: "flex-end"
|
|
@@ -1383,19 +1386,19 @@ const pt = (e, l, a = "string") => {
|
|
|
1383
1386
|
var y;
|
|
1384
1387
|
const t = e.cardBordered && `${e.prefixCls}-search-border`;
|
|
1385
1388
|
return o(c("div", {
|
|
1386
|
-
class:
|
|
1387
|
-
}, [
|
|
1389
|
+
class: Se(s.value, `${e.prefixCls}-search`, t, s.value, (y = C.value) == null ? void 0 : y.className)
|
|
1390
|
+
}, [J()]));
|
|
1388
1391
|
};
|
|
1389
1392
|
}
|
|
1390
1393
|
});
|
|
1391
|
-
|
|
1394
|
+
Dt.inheritAttrs = !1;
|
|
1392
1395
|
const Me = (e) => {
|
|
1393
1396
|
const l = E(null);
|
|
1394
1397
|
return l.value = e, (...a) => {
|
|
1395
1398
|
var o;
|
|
1396
1399
|
return (o = l.value) == null ? void 0 : o.call(l, ...a);
|
|
1397
1400
|
};
|
|
1398
|
-
},
|
|
1401
|
+
}, ya = (e) => ({
|
|
1399
1402
|
[`${e.componentCls}`]: {
|
|
1400
1403
|
width: "auto",
|
|
1401
1404
|
"&-title": {
|
|
@@ -1512,7 +1515,7 @@ const Me = (e) => {
|
|
|
1512
1515
|
}, [(m = s.default) == null ? void 0 : m.call(s)])];
|
|
1513
1516
|
}
|
|
1514
1517
|
}) : null;
|
|
1515
|
-
},
|
|
1518
|
+
}, ba = /* @__PURE__ */ fe({
|
|
1516
1519
|
props: {
|
|
1517
1520
|
treeKey: String,
|
|
1518
1521
|
hashId: String,
|
|
@@ -1537,21 +1540,21 @@ const Me = (e) => {
|
|
|
1537
1540
|
title: "固定在列首",
|
|
1538
1541
|
show: e.fixed !== "left" && !o.value
|
|
1539
1542
|
}, {
|
|
1540
|
-
default: () => [c(
|
|
1543
|
+
default: () => [c(Cl, null, null)]
|
|
1541
1544
|
}), c(Ze, {
|
|
1542
1545
|
treeKey: e.treeKey || "",
|
|
1543
1546
|
fixed: void 0,
|
|
1544
1547
|
title: "不固定",
|
|
1545
1548
|
show: !!e.fixed && !o.value
|
|
1546
1549
|
}, {
|
|
1547
|
-
default: () => [c(
|
|
1550
|
+
default: () => [c(xl, null, null)]
|
|
1548
1551
|
}), c(Ze, {
|
|
1549
1552
|
treeKey: e.treeKey || "",
|
|
1550
1553
|
fixed: "right",
|
|
1551
1554
|
title: "固定在列尾",
|
|
1552
1555
|
show: e.fixed !== "right"
|
|
1553
1556
|
}, {
|
|
1554
|
-
default: () => [c(
|
|
1557
|
+
default: () => [c(Sl, null, null)]
|
|
1555
1558
|
})]);
|
|
1556
1559
|
return c("span", {
|
|
1557
1560
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1584,57 +1587,57 @@ const Me = (e) => {
|
|
|
1584
1587
|
key: r,
|
|
1585
1588
|
children: g,
|
|
1586
1589
|
uuid: T,
|
|
1587
|
-
...
|
|
1590
|
+
...O
|
|
1588
1591
|
}) => {
|
|
1589
|
-
var
|
|
1590
|
-
const
|
|
1592
|
+
var L;
|
|
1593
|
+
const F = (m == null ? void 0 : m.columnsMap[r || "null"]) || {
|
|
1591
1594
|
show: !0
|
|
1592
1595
|
};
|
|
1593
1596
|
let M = !1;
|
|
1594
|
-
|
|
1595
|
-
const
|
|
1597
|
+
F.show !== !1 && (n == null ? void 0 : n.show) !== !1 && !g && (M = !0);
|
|
1598
|
+
const H = {
|
|
1596
1599
|
key: T || "",
|
|
1597
|
-
...Ge(
|
|
1600
|
+
...Ge(O, ["dataIndex"]),
|
|
1598
1601
|
checked: M,
|
|
1599
1602
|
selectable: !1,
|
|
1600
|
-
disabled:
|
|
1601
|
-
disableCheckbox: typeof
|
|
1603
|
+
disabled: F.disable === !0,
|
|
1604
|
+
disableCheckbox: typeof F.disable == "boolean" ? F.disable : (L = F.disable) == null ? void 0 : L.checkbox,
|
|
1602
1605
|
isLeaf: !0
|
|
1603
1606
|
};
|
|
1604
|
-
return g && (
|
|
1607
|
+
return g && (H.children = C(g, F)), H;
|
|
1605
1608
|
});
|
|
1606
1609
|
Ae(() => {
|
|
1607
1610
|
const u = C(e.list || []);
|
|
1608
1611
|
o.value = u, s.value = u.filter((n) => n.checked).map((n) => n.key), (m == null ? void 0 : m.operationType.value) === "fixed" && (l.value = at().uuid(15));
|
|
1609
1612
|
});
|
|
1610
1613
|
const x = Me((u, n, r) => {
|
|
1611
|
-
var
|
|
1612
|
-
const g = ((
|
|
1614
|
+
var z, Q;
|
|
1615
|
+
const g = ((z = b(i).find((V) => V.uuid === u)) == null ? void 0 : z.key) || "", T = ((Q = b(i).find((V) => V.uuid === n)) == null ? void 0 : Q.key) || "", O = {
|
|
1613
1616
|
...m == null ? void 0 : m.columnsMap
|
|
1614
|
-
},
|
|
1617
|
+
}, F = [...m.sortKeyColumns.value], M = F.findIndex((V) => V === g), H = F.findIndex((V) => V === T), L = r > M;
|
|
1615
1618
|
if (M < 0)
|
|
1616
1619
|
return;
|
|
1617
|
-
const
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
...
|
|
1621
|
-
order:
|
|
1620
|
+
const W = F[M];
|
|
1621
|
+
F.splice(M, 1), r === 0 ? F.unshift(W) : F.splice(L ? H : H + 1, 0, W), F.forEach((V, se) => {
|
|
1622
|
+
O[V] = {
|
|
1623
|
+
...O[V] || {},
|
|
1624
|
+
order: se
|
|
1622
1625
|
};
|
|
1623
|
-
}), m == null || m.setColumnsMap(
|
|
1626
|
+
}), m == null || m.setColumnsMap(O, "drop"), m == null || m.setSortKeyColumns(F);
|
|
1624
1627
|
}), d = Me((u) => {
|
|
1625
|
-
var
|
|
1626
|
-
const n = u.node.key, r = ((
|
|
1628
|
+
var F;
|
|
1629
|
+
const n = u.node.key, r = ((F = b(i).find((M) => M.uuid === n)) == null ? void 0 : F.key) || "", T = {
|
|
1627
1630
|
...(m == null ? void 0 : m.columnsMap[r]) || {}
|
|
1628
1631
|
};
|
|
1629
1632
|
T.show = u.checked;
|
|
1630
|
-
const
|
|
1633
|
+
const O = {
|
|
1631
1634
|
...m == null ? void 0 : m.columnsMap,
|
|
1632
1635
|
[r]: T
|
|
1633
1636
|
};
|
|
1634
|
-
m == null || m.setColumnsMap(
|
|
1637
|
+
m == null || m.setColumnsMap(O, "show");
|
|
1635
1638
|
}), S = (u) => {
|
|
1636
1639
|
const n = b(i).find((r) => r.uuid === u.key);
|
|
1637
|
-
return u.title ||
|
|
1640
|
+
return u.title || ml(f, "headerCell", {
|
|
1638
1641
|
title: n.title,
|
|
1639
1642
|
column: n
|
|
1640
1643
|
}, () => [n.title]);
|
|
@@ -1643,7 +1646,7 @@ const Me = (e) => {
|
|
|
1643
1646
|
var u, n;
|
|
1644
1647
|
return a.value ? c(_e, null, [e.showTitle && c("span", {
|
|
1645
1648
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1646
|
-
}, [e.title]), c(
|
|
1649
|
+
}, [e.title]), c(Nl, {
|
|
1647
1650
|
key: l.value,
|
|
1648
1651
|
draggable: e.draggable && !!((u = o.value) != null && u.length) && ((n = o.value) == null ? void 0 : n.length) > 1,
|
|
1649
1652
|
checkable: e.checkable,
|
|
@@ -1653,9 +1656,9 @@ const Me = (e) => {
|
|
|
1653
1656
|
height: 280,
|
|
1654
1657
|
onDrop: (r) => {
|
|
1655
1658
|
const g = r.node.key, T = r.dragNode.key, {
|
|
1656
|
-
dropPosition:
|
|
1657
|
-
dropToGap:
|
|
1658
|
-
} = r, M =
|
|
1659
|
+
dropPosition: O,
|
|
1660
|
+
dropToGap: F
|
|
1661
|
+
} = r, M = O === -1 || !F ? O + 1 : O;
|
|
1659
1662
|
x(T, g, M);
|
|
1660
1663
|
},
|
|
1661
1664
|
onCheck: (r, g) => d(g),
|
|
@@ -1669,7 +1672,7 @@ const Me = (e) => {
|
|
|
1669
1672
|
title: S(r),
|
|
1670
1673
|
autoScroll: (T = m == null ? void 0 : m.autoScroll) == null ? void 0 : T.value
|
|
1671
1674
|
};
|
|
1672
|
-
return c(
|
|
1675
|
+
return c(ba, _({
|
|
1673
1676
|
hashId: e.hashId,
|
|
1674
1677
|
className: e.className
|
|
1675
1678
|
}, g, {
|
|
@@ -1679,7 +1682,7 @@ const Me = (e) => {
|
|
|
1679
1682
|
})]) : null;
|
|
1680
1683
|
};
|
|
1681
1684
|
}
|
|
1682
|
-
}),
|
|
1685
|
+
}), Ca = /* @__PURE__ */ fe({
|
|
1683
1686
|
props: {
|
|
1684
1687
|
hashId: String,
|
|
1685
1688
|
className: String,
|
|
@@ -1690,7 +1693,7 @@ const Me = (e) => {
|
|
|
1690
1693
|
const {
|
|
1691
1694
|
columns: l
|
|
1692
1695
|
} = he(), a = E([]), o = E([]), s = E([]), i = E([]);
|
|
1693
|
-
|
|
1696
|
+
q(() => l.value, (C) => {
|
|
1694
1697
|
a.value = [], o.value = [], s.value = [], C.forEach((x) => {
|
|
1695
1698
|
if (x.hideInSetting)
|
|
1696
1699
|
return;
|
|
@@ -1746,7 +1749,7 @@ const Me = (e) => {
|
|
|
1746
1749
|
className: e.className
|
|
1747
1750
|
}, null)]);
|
|
1748
1751
|
}
|
|
1749
|
-
}),
|
|
1752
|
+
}), xa = /* @__PURE__ */ fe({
|
|
1750
1753
|
props: {
|
|
1751
1754
|
draggable: {
|
|
1752
1755
|
type: Boolean,
|
|
@@ -1766,7 +1769,7 @@ const Me = (e) => {
|
|
|
1766
1769
|
}), {
|
|
1767
1770
|
wrapSSR: a,
|
|
1768
1771
|
hashId: o
|
|
1769
|
-
} = qe("ColumnSetting", [
|
|
1772
|
+
} = qe("ColumnSetting", [ya], l), {
|
|
1770
1773
|
columns: s,
|
|
1771
1774
|
settingsAction: i
|
|
1772
1775
|
} = he(), f = Me((S = !0) => {
|
|
@@ -1774,14 +1777,14 @@ const Me = (e) => {
|
|
|
1774
1777
|
r.forEach(({
|
|
1775
1778
|
key: g,
|
|
1776
1779
|
fixed: T,
|
|
1777
|
-
index:
|
|
1778
|
-
children:
|
|
1780
|
+
index: O,
|
|
1781
|
+
children: F
|
|
1779
1782
|
}) => {
|
|
1780
|
-
const M =
|
|
1783
|
+
const M = Ft(g, O);
|
|
1781
1784
|
M && (u[M] = {
|
|
1782
1785
|
show: S,
|
|
1783
1786
|
fixed: T
|
|
1784
|
-
}),
|
|
1787
|
+
}), F && n(F);
|
|
1785
1788
|
});
|
|
1786
1789
|
};
|
|
1787
1790
|
n(s.value), i == null || i.setColumnsMap(u, "show");
|
|
@@ -1793,11 +1796,11 @@ const Me = (e) => {
|
|
|
1793
1796
|
// @ts-ignore
|
|
1794
1797
|
Object.values(i == null ? void 0 : i.columnsMap).filter((S) => !S || S.show === !1)
|
|
1795
1798
|
)), d = w(() => b(x).length > 0 && b(x).length !== s.value.length);
|
|
1796
|
-
return () => a(c(
|
|
1799
|
+
return () => a(c(kl, {
|
|
1797
1800
|
arrowPointAtCenter: !0,
|
|
1798
1801
|
title: c("div", {
|
|
1799
1802
|
class: [`${l}-title`, o.value]
|
|
1800
|
-
}, [c(
|
|
1803
|
+
}, [c(jl, {
|
|
1801
1804
|
indeterminate: d.value,
|
|
1802
1805
|
checked: b(x).length === 0 && b(x).length !== s.value.length,
|
|
1803
1806
|
onChange: (S) => m(S)
|
|
@@ -1806,7 +1809,7 @@ const Me = (e) => {
|
|
|
1806
1809
|
}), e.checkedReset ? c("a", {
|
|
1807
1810
|
onClick: C,
|
|
1808
1811
|
class: [`${l}-action-rest-button`, o.value]
|
|
1809
|
-
}, [De("重置")]) : null, e != null && e.extra ? c(
|
|
1812
|
+
}, [De("重置")]) : null, e != null && e.extra ? c(xe, {
|
|
1810
1813
|
size: 12,
|
|
1811
1814
|
align: "center"
|
|
1812
1815
|
}, {
|
|
@@ -1815,7 +1818,7 @@ const Me = (e) => {
|
|
|
1815
1818
|
overlayClassName: `${l}-overlay ${o.value}`,
|
|
1816
1819
|
trigger: "click",
|
|
1817
1820
|
placement: "bottomRight",
|
|
1818
|
-
content: c(
|
|
1821
|
+
content: c(Ca, {
|
|
1819
1822
|
hashId: o.value,
|
|
1820
1823
|
checkable: e.checkable ?? !0,
|
|
1821
1824
|
draggable: e.draggable ?? !0,
|
|
@@ -1825,31 +1828,31 @@ const Me = (e) => {
|
|
|
1825
1828
|
default: () => [c(de, {
|
|
1826
1829
|
title: "列设置"
|
|
1827
1830
|
}, {
|
|
1828
|
-
default: () => [c(
|
|
1831
|
+
default: () => [c(Pt, null, null)]
|
|
1829
1832
|
})]
|
|
1830
1833
|
}));
|
|
1831
1834
|
}
|
|
1832
|
-
}),
|
|
1835
|
+
}), Mt = /* @__PURE__ */ fe({
|
|
1833
1836
|
setup() {
|
|
1834
1837
|
const {
|
|
1835
1838
|
isFullscreen: e
|
|
1836
|
-
} =
|
|
1839
|
+
} = kt();
|
|
1837
1840
|
return () => e.value ? c(de, {
|
|
1838
1841
|
title: "退出全屏"
|
|
1839
1842
|
}, {
|
|
1840
|
-
default: () => [c(
|
|
1843
|
+
default: () => [c(wl, null, null)]
|
|
1841
1844
|
}) : c(de, {
|
|
1842
1845
|
title: "全屏"
|
|
1843
1846
|
}, {
|
|
1844
|
-
default: () => [c(
|
|
1847
|
+
default: () => [c(pl, null, null)]
|
|
1845
1848
|
});
|
|
1846
1849
|
}
|
|
1847
|
-
}),
|
|
1850
|
+
}), Sa = () => {
|
|
1848
1851
|
const {
|
|
1849
1852
|
action: e,
|
|
1850
1853
|
tableSize: l
|
|
1851
1854
|
} = he();
|
|
1852
|
-
return c(
|
|
1855
|
+
return c(El, {
|
|
1853
1856
|
overlay: c(We, {
|
|
1854
1857
|
selectedKeys: [l.value],
|
|
1855
1858
|
onClick: ({
|
|
@@ -1881,10 +1884,10 @@ const Me = (e) => {
|
|
|
1881
1884
|
default: () => [c(de, {
|
|
1882
1885
|
title: "表格密度"
|
|
1883
1886
|
}, {
|
|
1884
|
-
default: () => [c(
|
|
1887
|
+
default: () => [c(Tl, null, null)]
|
|
1885
1888
|
})]
|
|
1886
1889
|
});
|
|
1887
|
-
},
|
|
1890
|
+
}, wa = (e) => ({
|
|
1888
1891
|
[`${e.componentCls}`]: {
|
|
1889
1892
|
lineHeight: 1,
|
|
1890
1893
|
"&-container": {
|
|
@@ -1926,13 +1929,13 @@ const Me = (e) => {
|
|
|
1926
1929
|
}
|
|
1927
1930
|
}
|
|
1928
1931
|
});
|
|
1929
|
-
function
|
|
1932
|
+
function $t(e) {
|
|
1930
1933
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ce(e);
|
|
1931
1934
|
}
|
|
1932
1935
|
const {
|
|
1933
|
-
useBreakpoint:
|
|
1936
|
+
useBreakpoint: pa
|
|
1934
1937
|
} = st;
|
|
1935
|
-
function
|
|
1938
|
+
function Ta(e) {
|
|
1936
1939
|
if (ce(e))
|
|
1937
1940
|
return e;
|
|
1938
1941
|
if (e) {
|
|
@@ -1955,7 +1958,7 @@ function pa(e) {
|
|
|
1955
1958
|
}
|
|
1956
1959
|
return null;
|
|
1957
1960
|
}
|
|
1958
|
-
const
|
|
1961
|
+
const At = /* @__PURE__ */ fe({
|
|
1959
1962
|
props: {
|
|
1960
1963
|
actions: re.toolBarBtn,
|
|
1961
1964
|
settings: [Array],
|
|
@@ -1969,7 +1972,7 @@ const Mt = /* @__PURE__ */ fe({
|
|
|
1969
1972
|
const {
|
|
1970
1973
|
wrapSSR: l,
|
|
1971
1974
|
hashId: a
|
|
1972
|
-
} = qe("ListToolBar", [
|
|
1975
|
+
} = qe("ListToolBar", [wa], e.prefixCls), o = pa(), {
|
|
1973
1976
|
isMobile: s
|
|
1974
1977
|
} = he(), i = w(() => {
|
|
1975
1978
|
var u;
|
|
@@ -1980,9 +1983,9 @@ const Mt = /* @__PURE__ */ fe({
|
|
|
1980
1983
|
}), m = w(() => !!(e.titleTip || e.headerTitle)), C = w(() => {
|
|
1981
1984
|
var n;
|
|
1982
1985
|
let u;
|
|
1983
|
-
return Array.isArray(e.actions) ? ((n = e.actions) == null ? void 0 : n.length) < 1 ? null : c(
|
|
1986
|
+
return Array.isArray(e.actions) ? ((n = e.actions) == null ? void 0 : n.length) < 1 ? null : c(xe, {
|
|
1984
1987
|
align: "center"
|
|
1985
|
-
},
|
|
1988
|
+
}, $t(u = e.actions.map((r, g) => ce(r) ? it(r, {
|
|
1986
1989
|
key: g,
|
|
1987
1990
|
...r == null ? void 0 : r.props
|
|
1988
1991
|
}) : c("template", {
|
|
@@ -1992,7 +1995,7 @@ const Mt = /* @__PURE__ */ fe({
|
|
|
1992
1995
|
}) : e.actions;
|
|
1993
1996
|
}), x = Ve(() => !i.value && f.value ? c("div", {
|
|
1994
1997
|
class: `${e.prefixCls}-left ${a.value}`
|
|
1995
|
-
}, null) : m.value ? c(
|
|
1998
|
+
}, null) : m.value ? c(xe, {
|
|
1996
1999
|
class: `${e.prefixCls}-left ${a.value}`
|
|
1997
2000
|
}, {
|
|
1998
2001
|
default: () => [c("div", {
|
|
@@ -2000,11 +2003,11 @@ const Mt = /* @__PURE__ */ fe({
|
|
|
2000
2003
|
}, [e.headerTitle, e.titleTip && c(de, {
|
|
2001
2004
|
title: e.titleTipText
|
|
2002
2005
|
}, {
|
|
2003
|
-
default: () => [
|
|
2006
|
+
default: () => [ie(e.titleTip) && e.titleTip ? c($l, null, null) : e.titleTip]
|
|
2004
2007
|
})]), C.value && c("div", {
|
|
2005
2008
|
class: `${e.prefixCls}-actions ${a.value}`
|
|
2006
2009
|
}, [C.value])]
|
|
2007
|
-
}) : c(
|
|
2010
|
+
}) : c(xe, {
|
|
2008
2011
|
class: `${e.prefixCls}-left ${a.value}`
|
|
2009
2012
|
}, {
|
|
2010
2013
|
default: () => [C.value && c("div", {
|
|
@@ -2012,7 +2015,7 @@ const Mt = /* @__PURE__ */ fe({
|
|
|
2012
2015
|
}, [C.value])]
|
|
2013
2016
|
}), [() => i.value, () => f.value, () => m.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), d = Ve(() => {
|
|
2014
2017
|
let u;
|
|
2015
|
-
return f.value ? c(
|
|
2018
|
+
return f.value ? c(xe, {
|
|
2016
2019
|
size: 16,
|
|
2017
2020
|
class: `${e.prefixCls}-right ${a.value}`,
|
|
2018
2021
|
align: o.value.lg ? "center" : "end",
|
|
@@ -2020,12 +2023,12 @@ const Mt = /* @__PURE__ */ fe({
|
|
|
2020
2023
|
}, {
|
|
2021
2024
|
default: () => {
|
|
2022
2025
|
var n;
|
|
2023
|
-
return [e.optionsExtra, (n = e.settings) != null && n.length ? c(
|
|
2026
|
+
return [e.optionsExtra, (n = e.settings) != null && n.length ? c(xe, {
|
|
2024
2027
|
size: 12,
|
|
2025
2028
|
align: "center",
|
|
2026
2029
|
class: `${e.prefixCls}-setting-items`
|
|
2027
|
-
},
|
|
2028
|
-
const T =
|
|
2030
|
+
}, $t(u = e.settings.map((r, g) => {
|
|
2031
|
+
const T = Ta(r);
|
|
2029
2032
|
return c("div", {
|
|
2030
2033
|
key: g,
|
|
2031
2034
|
class: `${e.prefixCls}-setting-item`
|
|
@@ -2051,28 +2054,28 @@ const Mt = /* @__PURE__ */ fe({
|
|
|
2051
2054
|
}, [S.value]));
|
|
2052
2055
|
}
|
|
2053
2056
|
});
|
|
2054
|
-
|
|
2055
|
-
function
|
|
2057
|
+
At.inheritAttrs = !1;
|
|
2058
|
+
function $a() {
|
|
2056
2059
|
return {
|
|
2057
2060
|
reload: {
|
|
2058
2061
|
text: "刷新",
|
|
2059
|
-
icon: c(
|
|
2062
|
+
icon: c(Bl, null, null)
|
|
2060
2063
|
},
|
|
2061
2064
|
density: {
|
|
2062
2065
|
text: "表格密度",
|
|
2063
|
-
icon: c(
|
|
2066
|
+
icon: c(Sa, null, null)
|
|
2064
2067
|
},
|
|
2065
2068
|
setting: {
|
|
2066
2069
|
text: "列设置",
|
|
2067
|
-
icon: c(
|
|
2070
|
+
icon: c(Pt, null, null)
|
|
2068
2071
|
},
|
|
2069
2072
|
fullScreen: {
|
|
2070
2073
|
text: "全屏",
|
|
2071
|
-
icon: c(
|
|
2074
|
+
icon: c(Mt, null, null)
|
|
2072
2075
|
}
|
|
2073
2076
|
};
|
|
2074
2077
|
}
|
|
2075
|
-
function
|
|
2078
|
+
function Ba(e, l) {
|
|
2076
2079
|
return Object.keys(e).filter((a) => a).map((a) => {
|
|
2077
2080
|
const o = e[a];
|
|
2078
2081
|
if (!o)
|
|
@@ -2080,15 +2083,15 @@ function $a(e, l) {
|
|
|
2080
2083
|
let s = o === !0 ? l[a] : () => o == null ? void 0 : o();
|
|
2081
2084
|
if (typeof s != "function" && (s = () => {
|
|
2082
2085
|
}), a === "setting")
|
|
2083
|
-
return c(
|
|
2086
|
+
return c(xa, _(e[a], {
|
|
2084
2087
|
key: a
|
|
2085
2088
|
}), null);
|
|
2086
2089
|
if (a === "fullScreen")
|
|
2087
2090
|
return c("span", {
|
|
2088
2091
|
key: a,
|
|
2089
2092
|
onClick: s
|
|
2090
|
-
}, [c(
|
|
2091
|
-
const i =
|
|
2093
|
+
}, [c(Mt, null, null)]);
|
|
2094
|
+
const i = $a()[a];
|
|
2092
2095
|
return i ? c("span", {
|
|
2093
2096
|
key: a,
|
|
2094
2097
|
onClick: s
|
|
@@ -2099,7 +2102,7 @@ function $a(e, l) {
|
|
|
2099
2102
|
})]) : null;
|
|
2100
2103
|
}).filter((a) => a);
|
|
2101
2104
|
}
|
|
2102
|
-
const
|
|
2105
|
+
const Fa = {
|
|
2103
2106
|
options: [Boolean, Object, Array],
|
|
2104
2107
|
titleTip: [Function, Boolean, Object, String],
|
|
2105
2108
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -2107,8 +2110,8 @@ const Ba = {
|
|
|
2107
2110
|
titleTipText: [String],
|
|
2108
2111
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
2109
2112
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
2110
|
-
},
|
|
2111
|
-
props:
|
|
2113
|
+
}, Ra = /* @__PURE__ */ fe({
|
|
2114
|
+
props: Fa,
|
|
2112
2115
|
inheritAttrs: !1,
|
|
2113
2116
|
setup(e) {
|
|
2114
2117
|
const l = ut({
|
|
@@ -2129,13 +2132,13 @@ const Ba = {
|
|
|
2129
2132
|
...s,
|
|
2130
2133
|
...e.options
|
|
2131
2134
|
};
|
|
2132
|
-
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra),
|
|
2135
|
+
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), Ba(i, {
|
|
2133
2136
|
...s
|
|
2134
2137
|
});
|
|
2135
2138
|
}, [() => a, () => e.options]);
|
|
2136
2139
|
return () => {
|
|
2137
2140
|
const s = e.toolBarBtn || [];
|
|
2138
|
-
return c(
|
|
2141
|
+
return c(At, {
|
|
2139
2142
|
prefixCls: l,
|
|
2140
2143
|
optionsExtra: e.optionsExtra,
|
|
2141
2144
|
headerTitle: e.headerTitle,
|
|
@@ -2159,7 +2162,7 @@ const Ba = {
|
|
|
2159
2162
|
backgroundColor: "transparent",
|
|
2160
2163
|
borderRadius: 2
|
|
2161
2164
|
}
|
|
2162
|
-
},
|
|
2165
|
+
}, Ia = (e) => {
|
|
2163
2166
|
const l = `${e.antCls}-table`;
|
|
2164
2167
|
return {
|
|
2165
2168
|
[e.componentCls]: {
|
|
@@ -2366,12 +2369,12 @@ const Ba = {
|
|
|
2366
2369
|
}
|
|
2367
2370
|
};
|
|
2368
2371
|
};
|
|
2369
|
-
function
|
|
2372
|
+
function Oa(e) {
|
|
2370
2373
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ce(e);
|
|
2371
2374
|
}
|
|
2372
2375
|
const {
|
|
2373
|
-
useBreakpoint:
|
|
2374
|
-
} = st,
|
|
2376
|
+
useBreakpoint: Pa
|
|
2377
|
+
} = st, ka = {
|
|
2375
2378
|
reload: !0,
|
|
2376
2379
|
density: !0,
|
|
2377
2380
|
setting: !0,
|
|
@@ -2394,278 +2397,278 @@ const {
|
|
|
2394
2397
|
}), {
|
|
2395
2398
|
wrapSSR: f,
|
|
2396
2399
|
hashId: m
|
|
2397
|
-
} = qe("ProBaseTable", [
|
|
2400
|
+
} = qe("ProBaseTable", [Ia], i), C = Pa(), {
|
|
2398
2401
|
width: x
|
|
2399
|
-
} =
|
|
2402
|
+
} = Rl(), d = Nt(), S = E(), u = E(), n = E(e.waitRequest);
|
|
2400
2403
|
Ae(() => n.value = e.waitRequest);
|
|
2401
2404
|
const {
|
|
2402
2405
|
toggle: r,
|
|
2403
2406
|
isFullscreen: g
|
|
2404
|
-
} =
|
|
2407
|
+
} = kt(S), T = w(() => ({
|
|
2405
2408
|
...e
|
|
2406
|
-
})),
|
|
2407
|
-
var h,
|
|
2408
|
-
return e.virtualScroll &&
|
|
2409
|
-
}), M = w(() => e.search === !1 ? !1 :
|
|
2409
|
+
})), O = w(() => !C.value.xl), F = w(() => {
|
|
2410
|
+
var h, $;
|
|
2411
|
+
return e.virtualScroll && vl(!((h = e.scroll) != null && h.y), "参数scroll的Y值不能为空!"), !!(($ = e.scroll) != null && $.y && e.virtualScroll);
|
|
2412
|
+
}), M = w(() => e.search === !1 ? !1 : U(e.search) ? e.search : {
|
|
2410
2413
|
type: "auto",
|
|
2411
2414
|
resetText: "重置",
|
|
2412
2415
|
searchText: "查询"
|
|
2413
|
-
}),
|
|
2416
|
+
}), H = w(() => M.value === !1 ? {} : M.value), L = w(() => {
|
|
2414
2417
|
var h;
|
|
2415
|
-
return ((h =
|
|
2416
|
-
}),
|
|
2418
|
+
return ((h = H.value) == null ? void 0 : h.type) === "button";
|
|
2419
|
+
}), W = w(() => {
|
|
2417
2420
|
var h;
|
|
2418
|
-
return (h =
|
|
2419
|
-
}),
|
|
2420
|
-
const h = (e.columns || []).filter((
|
|
2421
|
-
|
|
2422
|
-
key:
|
|
2423
|
-
align:
|
|
2421
|
+
return (h = H.value) == null ? void 0 : h.actions;
|
|
2422
|
+
}), z = w(() => {
|
|
2423
|
+
const h = (e.columns || []).filter(($) => $.key || $.dataIndex).map(($) => ({
|
|
2424
|
+
...$,
|
|
2425
|
+
key: $.key || $.dataIndex,
|
|
2426
|
+
align: $.align || e.align,
|
|
2424
2427
|
uuid: at().uuid(15)
|
|
2425
2428
|
}));
|
|
2426
|
-
return
|
|
2429
|
+
return il(h, {
|
|
2427
2430
|
align: e.align || "left",
|
|
2428
2431
|
showIndex: e.showIndex || !1
|
|
2429
2432
|
});
|
|
2430
2433
|
}), {
|
|
2431
|
-
loadingComputed:
|
|
2432
|
-
loading:
|
|
2433
|
-
setLoading:
|
|
2434
|
-
} =
|
|
2434
|
+
loadingComputed: Q,
|
|
2435
|
+
loading: V,
|
|
2436
|
+
setLoading: se
|
|
2437
|
+
} = Ql({
|
|
2435
2438
|
emit: l,
|
|
2436
2439
|
loading: oe(e, "loading")
|
|
2437
2440
|
}), {
|
|
2438
|
-
sizeRef:
|
|
2441
|
+
sizeRef: te,
|
|
2439
2442
|
setTableSize: me
|
|
2440
|
-
} =
|
|
2443
|
+
} = _l({
|
|
2441
2444
|
emit: l,
|
|
2442
2445
|
size: oe(e, "size")
|
|
2443
2446
|
}), {
|
|
2444
|
-
paginationInfo:
|
|
2447
|
+
paginationInfo: J,
|
|
2445
2448
|
requestPagination: t,
|
|
2446
2449
|
setPagination: y
|
|
2447
|
-
} =
|
|
2450
|
+
} = ql({
|
|
2448
2451
|
slots: a,
|
|
2449
2452
|
props: T,
|
|
2450
2453
|
pagination: oe(e, "pagination")
|
|
2451
|
-
}),
|
|
2454
|
+
}), I = ia(e), {
|
|
2452
2455
|
proScroll: p,
|
|
2453
2456
|
breakpoint: D
|
|
2454
|
-
} =
|
|
2455
|
-
...
|
|
2457
|
+
} = sa({
|
|
2458
|
+
...I,
|
|
2456
2459
|
innerWidth: x,
|
|
2457
|
-
columns:
|
|
2460
|
+
columns: z,
|
|
2458
2461
|
screens: C
|
|
2459
|
-
}),
|
|
2460
|
-
proColumns:
|
|
2462
|
+
}), R = na(e), {
|
|
2463
|
+
proColumns: k,
|
|
2461
2464
|
cacheProColumns: v,
|
|
2462
|
-
setColumns:
|
|
2463
|
-
changeColumns:
|
|
2465
|
+
setColumns: Y,
|
|
2466
|
+
changeColumns: $e,
|
|
2464
2467
|
resizeColumnWidth: Xe
|
|
2465
|
-
} =
|
|
2466
|
-
...
|
|
2468
|
+
} = ua({
|
|
2469
|
+
...R,
|
|
2467
2470
|
breakpoint: D,
|
|
2468
2471
|
scroll: p,
|
|
2469
|
-
columns:
|
|
2472
|
+
columns: z
|
|
2470
2473
|
}), {
|
|
2471
2474
|
columnsMap: ze,
|
|
2472
2475
|
operationType: ve,
|
|
2473
2476
|
setColumnsMap: Ke,
|
|
2474
|
-
sortKeyColumns:
|
|
2475
|
-
cacheColumnsMap:
|
|
2477
|
+
sortKeyColumns: Ie,
|
|
2478
|
+
cacheColumnsMap: ee,
|
|
2476
2479
|
setSortKeyColumns: ge
|
|
2477
|
-
} =
|
|
2480
|
+
} = aa({
|
|
2478
2481
|
columns: v,
|
|
2479
2482
|
columnsState: oe(e, "columnsState"),
|
|
2480
|
-
changeColumns:
|
|
2483
|
+
changeColumns: $e
|
|
2481
2484
|
}), {
|
|
2482
|
-
formDataRef:
|
|
2485
|
+
formDataRef: K,
|
|
2483
2486
|
formParamsRef: ye,
|
|
2484
|
-
defaultParamsRef:
|
|
2487
|
+
defaultParamsRef: Z,
|
|
2485
2488
|
setFormParams: Ue
|
|
2486
|
-
} =
|
|
2489
|
+
} = la({
|
|
2487
2490
|
searchMap: oe(e, "searchMap"),
|
|
2488
2491
|
params: oe(e, "params"),
|
|
2489
|
-
columns:
|
|
2492
|
+
columns: z,
|
|
2490
2493
|
setPagination: y
|
|
2491
2494
|
}), {
|
|
2492
2495
|
selectedKeys: ot,
|
|
2493
|
-
selectedItems:
|
|
2494
|
-
changeRowKey:
|
|
2496
|
+
selectedItems: zt,
|
|
2497
|
+
changeRowKey: Kt,
|
|
2495
2498
|
selectRowKey: rt,
|
|
2496
2499
|
selectAllRowKey: ct,
|
|
2497
2500
|
syncSelectedRows: dt,
|
|
2498
2501
|
removeRowKeys: ft,
|
|
2499
|
-
clearAllRowKeys:
|
|
2500
|
-
} =
|
|
2502
|
+
clearAllRowKeys: Yt
|
|
2503
|
+
} = Ul(oe(e, "rowKey"), oe(e, "rowSelection")), Lt = Zl(e), {
|
|
2501
2504
|
reload: Ye,
|
|
2502
|
-
reSetDataList:
|
|
2503
|
-
changeDataValue:
|
|
2504
|
-
isTreeDataRef:
|
|
2505
|
-
dataSource:
|
|
2505
|
+
reSetDataList: Wt,
|
|
2506
|
+
changeDataValue: Ht,
|
|
2507
|
+
isTreeDataRef: Vt,
|
|
2508
|
+
dataSource: Oe,
|
|
2506
2509
|
handleTableChange: ht
|
|
2507
|
-
} =
|
|
2508
|
-
...
|
|
2510
|
+
} = ea({
|
|
2511
|
+
...Lt,
|
|
2509
2512
|
waitRequest: n
|
|
2510
2513
|
}, {
|
|
2511
|
-
loading:
|
|
2512
|
-
paginationInfo:
|
|
2514
|
+
loading: Q,
|
|
2515
|
+
paginationInfo: J,
|
|
2513
2516
|
setPagination: y,
|
|
2514
2517
|
removeRowKeys: ft,
|
|
2515
2518
|
syncSelectedRows: dt,
|
|
2516
|
-
setLoading:
|
|
2517
|
-
setColumns:
|
|
2519
|
+
setLoading: se,
|
|
2520
|
+
setColumns: Y,
|
|
2518
2521
|
search: M,
|
|
2519
|
-
columns:
|
|
2522
|
+
columns: k,
|
|
2520
2523
|
formParamsRef: ye,
|
|
2521
2524
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2522
|
-
hasCustomRender: w(() =>
|
|
2523
|
-
}, l),
|
|
2524
|
-
...
|
|
2525
|
-
...
|
|
2526
|
-
} : !1),
|
|
2527
|
-
size: b(
|
|
2525
|
+
hasCustomRender: w(() => Re(e.customRender || (a == null ? void 0 : a.customRender)))
|
|
2526
|
+
}, l), Pe = w(() => e.options ? {
|
|
2527
|
+
...ka,
|
|
2528
|
+
...U(e.options) ? e.options : {}
|
|
2529
|
+
} : !1), Gt = w(() => ({
|
|
2530
|
+
size: b(te),
|
|
2528
2531
|
scroll: b(p),
|
|
2529
|
-
dataSource: b(
|
|
2530
|
-
pagination: b(
|
|
2531
|
-
virtualScroll:
|
|
2532
|
-
columns: b(
|
|
2532
|
+
dataSource: b(Oe),
|
|
2533
|
+
pagination: b(J),
|
|
2534
|
+
virtualScroll: F.value,
|
|
2535
|
+
columns: b(k).filter((h) => h.show || h.show === void 0)
|
|
2533
2536
|
})), mt = w(() => {
|
|
2534
|
-
var B
|
|
2535
|
-
const h =
|
|
2536
|
-
return !h.indicator && ((
|
|
2537
|
-
spinning: e.showLoading ?
|
|
2537
|
+
var $, B;
|
|
2538
|
+
const h = U(e.loading) ? Ge(e.loading, "spinning") : {};
|
|
2539
|
+
return !h.indicator && (($ = d == null ? void 0 : d.indicator) != null && $.value) && (h.indicator = (B = d == null ? void 0 : d.indicator) == null ? void 0 : B.value), {
|
|
2540
|
+
spinning: e.showLoading ? Re(V.value) : !1,
|
|
2538
2541
|
...h
|
|
2539
2542
|
};
|
|
2540
2543
|
}), vt = w(() => {
|
|
2541
|
-
var
|
|
2544
|
+
var j;
|
|
2542
2545
|
let h;
|
|
2543
|
-
const
|
|
2544
|
-
if (
|
|
2545
|
-
const
|
|
2546
|
-
!
|
|
2546
|
+
const $ = b(T).direction === "rtl" ? "bottomLeft" : "right", B = (j = b(J)) == null ? void 0 : j.position;
|
|
2547
|
+
if (B !== null && Array.isArray(B)) {
|
|
2548
|
+
const P = B.find((A) => A.includes("top")), G = B.find((A) => A.includes("bottom")), le = B.every((A) => `${A}` == "none");
|
|
2549
|
+
!P && !G && !le && (h = $), P && (h = P.toLowerCase().replace("top", "")), G && (h = G.toLowerCase().replace("bottom", ""));
|
|
2547
2550
|
} else
|
|
2548
|
-
h =
|
|
2551
|
+
h = $;
|
|
2549
2552
|
return h;
|
|
2550
|
-
}), gt = async (h,
|
|
2551
|
-
var
|
|
2552
|
-
|
|
2553
|
+
}), gt = async (h, $) => {
|
|
2554
|
+
var B;
|
|
2555
|
+
L.value ? (B = W.value) != null && B.reload && $ ? (Ue(h), await Ye()) : Ue(h) : (Ue({
|
|
2553
2556
|
...e.params || {},
|
|
2554
2557
|
...h
|
|
2555
2558
|
}), await Ye());
|
|
2556
|
-
},
|
|
2557
|
-
|
|
2558
|
-
}, yt = (h, B,
|
|
2559
|
-
y(
|
|
2560
|
-
},
|
|
2561
|
-
var
|
|
2559
|
+
}, Qt = async (h, $) => {
|
|
2560
|
+
$ === "reset" ? (l("reset", h), e.request && await gt(h, $)) : e.request ? (l("submit", h), await gt(h, $)) : l("submit", h);
|
|
2561
|
+
}, yt = (h, $, B, j) => {
|
|
2562
|
+
y(xt(h, ["current", "pageSize"])), ht(h, $, B, j);
|
|
2563
|
+
}, _t = (h, $) => {
|
|
2564
|
+
var B;
|
|
2562
2565
|
y({
|
|
2563
2566
|
current: h,
|
|
2564
|
-
pageSize:
|
|
2567
|
+
pageSize: $
|
|
2565
2568
|
}), ht({
|
|
2566
2569
|
current: h,
|
|
2567
|
-
pageSize:
|
|
2568
|
-
total:
|
|
2570
|
+
pageSize: $,
|
|
2571
|
+
total: J.value && ((B = J.value) == null ? void 0 : B.total) || 0
|
|
2569
2572
|
}, {}, {});
|
|
2570
|
-
},
|
|
2573
|
+
}, qt = (h) => {
|
|
2571
2574
|
l("expandedRowsChange", h);
|
|
2572
|
-
},
|
|
2573
|
-
l("expand", h,
|
|
2574
|
-
},
|
|
2575
|
-
var
|
|
2576
|
-
let
|
|
2577
|
-
if (
|
|
2578
|
-
const
|
|
2575
|
+
}, Xt = (h, $) => {
|
|
2576
|
+
l("expand", h, $);
|
|
2577
|
+
}, Ut = (h, $) => Xe(h, $), Jt = (h, $, B) => {
|
|
2578
|
+
var P, G, le;
|
|
2579
|
+
let j = h;
|
|
2580
|
+
if ($) {
|
|
2581
|
+
const A = ne(h) ? typeof ((P = h == null ? void 0 : h[0]) == null ? void 0 : P.children) == "string" ? (G = h == null ? void 0 : h[0]) == null ? void 0 : G.children : "" : h.toString(), N = B.tooltip === !1 ? {} : B.tooltip, be = B.tooltip === !1 ? 1 : Qe(N == null ? void 0 : N.hiddenLine) && (N == null ? void 0 : N.hiddenLine) > 0 ? N == null ? void 0 : N.hiddenLine : 1, ae = B.tooltip === !1 ? 0 : Qe(N == null ? void 0 : N.width) ? N == null ? void 0 : N.width : 0, Be = B.tooltip !== !1 && Rt(A) && ae > 0 ? ol(A, {
|
|
2579
2582
|
root: `.${i}-hidden`,
|
|
2580
|
-
cssObject:
|
|
2581
|
-
}) : 0,
|
|
2583
|
+
cssObject: N == null ? void 0 : N.targetStyle
|
|
2584
|
+
}) : 0, Le = document.querySelector(`.${i} .ant-table-tbody`), pe = c("div", {
|
|
2582
2585
|
class: `${i}-ellipsis-text`
|
|
2583
|
-
}, [h]),
|
|
2586
|
+
}, [h]), ke = () => B.tooltip === !1 || U(B.tooltip) && Be < ae && ae > 0 ? pe : c(de, _({
|
|
2584
2587
|
title: h,
|
|
2585
|
-
getPopupContainer: (
|
|
2586
|
-
var
|
|
2587
|
-
return
|
|
2588
|
+
getPopupContainer: (je) => {
|
|
2589
|
+
var Ct;
|
|
2590
|
+
return Le ?? ((Ct = je == null ? void 0 : je.parentNode) == null ? void 0 : Ct.parentNode);
|
|
2588
2591
|
}
|
|
2589
|
-
},
|
|
2592
|
+
}, U(B.tooltip) ? B.tooltip : {}, {
|
|
2590
2593
|
destroyTooltipOnHide: !0
|
|
2591
|
-
}),
|
|
2592
|
-
default: () => [
|
|
2594
|
+
}), Oa(pe) ? pe : {
|
|
2595
|
+
default: () => [pe]
|
|
2593
2596
|
});
|
|
2594
|
-
if (
|
|
2595
|
-
class: `${i}-ellipsis ${
|
|
2597
|
+
if (j = c("div", {
|
|
2598
|
+
class: `${i}-ellipsis ${(N == null ? void 0 : N.class) ?? ""}`,
|
|
2596
2599
|
style: {
|
|
2597
|
-
"-webkit-line-clamp":
|
|
2600
|
+
"-webkit-line-clamp": be
|
|
2598
2601
|
}
|
|
2599
|
-
}, [
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2602
|
+
}, [ke()]), B.copyable) {
|
|
2603
|
+
const je = typeof B.copyText == "function" ? (le = B.copyText) == null ? void 0 : le.call(B, B) : B.copyText || A;
|
|
2604
|
+
j = c("div", {
|
|
2602
2605
|
class: `${i}-copyable`
|
|
2603
2606
|
}, [c("div", {
|
|
2604
|
-
class: `${i}-ellipsis ${
|
|
2607
|
+
class: `${i}-ellipsis ${(N == null ? void 0 : N.class) ?? ""}`,
|
|
2605
2608
|
style: {
|
|
2606
|
-
"-webkit-line-clamp":
|
|
2609
|
+
"-webkit-line-clamp": be
|
|
2607
2610
|
}
|
|
2608
|
-
}, [
|
|
2611
|
+
}, [ke()]), c(Fl, {
|
|
2609
2612
|
class: `${i}-copyable-icon`,
|
|
2610
2613
|
onClick: () => {
|
|
2611
|
-
|
|
2614
|
+
Gl(je), Al.success("复制成功");
|
|
2612
2615
|
}
|
|
2613
2616
|
}, null)]);
|
|
2614
2617
|
}
|
|
2615
2618
|
}
|
|
2616
|
-
return
|
|
2619
|
+
return j;
|
|
2617
2620
|
};
|
|
2618
2621
|
function bt() {
|
|
2619
|
-
var
|
|
2620
|
-
const h =
|
|
2621
|
-
if (h !== !1 && ((
|
|
2622
|
-
const
|
|
2622
|
+
var B, j, P, G, le;
|
|
2623
|
+
const h = Fe(a, e, "emptyText");
|
|
2624
|
+
if (h !== !1 && ((B = d == null ? void 0 : d.emptyText) == null ? void 0 : B.value) !== !1) {
|
|
2625
|
+
const A = ((j = e.emptyTextProps) == null ? void 0 : j.extraProps) || {}, N = h || ((P = d == null ? void 0 : d.emptyText) == null ? void 0 : P.value), be = ce(N), ae = be ? Ot(N, A) : It(N || []);
|
|
2623
2626
|
return c("div", {
|
|
2624
|
-
class:
|
|
2625
|
-
style: (
|
|
2626
|
-
}, [
|
|
2627
|
+
class: Se(`${i}-empty-text`, m.value, (G = e.emptyTextProps) == null ? void 0 : G.class),
|
|
2628
|
+
style: (le = e.emptyTextProps) == null ? void 0 : le.style
|
|
2629
|
+
}, [be ? ae : ne(ae) ? ae.map((Be) => it(Be, A)) : c(zl, null, null)]);
|
|
2627
2630
|
}
|
|
2628
2631
|
return null;
|
|
2629
2632
|
}
|
|
2630
|
-
const
|
|
2631
|
-
var
|
|
2632
|
-
const h =
|
|
2633
|
+
const Zt = () => {
|
|
2634
|
+
var $;
|
|
2635
|
+
const h = Bt(a, e, "customRender");
|
|
2633
2636
|
if (h) {
|
|
2634
|
-
if ((
|
|
2635
|
-
const
|
|
2637
|
+
if (($ = Oe.value) != null && $.length) {
|
|
2638
|
+
const B = ue(b(Oe));
|
|
2636
2639
|
return h == null ? void 0 : h({
|
|
2637
|
-
dataSource:
|
|
2638
|
-
currentData:
|
|
2640
|
+
dataSource: B,
|
|
2641
|
+
currentData: Vl(B, J.value)
|
|
2639
2642
|
});
|
|
2640
2643
|
}
|
|
2641
2644
|
return bt();
|
|
2642
2645
|
}
|
|
2643
2646
|
return c(_e, null, null);
|
|
2644
|
-
},
|
|
2645
|
-
var
|
|
2646
|
-
const
|
|
2647
|
-
return c(
|
|
2648
|
-
headerTitle:
|
|
2649
|
-
titleTip:
|
|
2647
|
+
}, el = (h) => {
|
|
2648
|
+
var P, G;
|
|
2649
|
+
const $ = Fe(a, e, "headerTitle"), B = Fe(a, e, "titleTip"), j = Fe(a, e, "toolBarBtn");
|
|
2650
|
+
return c(Ra, {
|
|
2651
|
+
headerTitle: $,
|
|
2652
|
+
titleTip: B,
|
|
2650
2653
|
titleTipText: e.titleTipText,
|
|
2651
|
-
options:
|
|
2652
|
-
...
|
|
2653
|
-
setting: h ? !1 : (
|
|
2654
|
-
density: h ? !1 : (
|
|
2654
|
+
options: ie(Pe.value) ? Pe.value : {
|
|
2655
|
+
...Pe.value,
|
|
2656
|
+
setting: h ? !1 : (P = Pe.value) == null ? void 0 : P.setting,
|
|
2657
|
+
density: h ? !1 : (G = Pe.value) == null ? void 0 : G.density
|
|
2655
2658
|
},
|
|
2656
|
-
settingExtra:
|
|
2657
|
-
optionsExtra:
|
|
2658
|
-
toolBarBtn:
|
|
2659
|
+
settingExtra: Fe(a, e, "settingExtra"),
|
|
2660
|
+
optionsExtra: Fe(a, e, "optionsExtra"),
|
|
2661
|
+
toolBarBtn: j
|
|
2659
2662
|
}, null);
|
|
2660
2663
|
};
|
|
2661
|
-
return
|
|
2662
|
-
tableSize:
|
|
2663
|
-
columns:
|
|
2664
|
-
cacheColumns:
|
|
2665
|
-
isMobile:
|
|
2666
|
-
searchConfig:
|
|
2667
|
-
manualSearch:
|
|
2668
|
-
searchActions:
|
|
2664
|
+
return oa({
|
|
2665
|
+
tableSize: te,
|
|
2666
|
+
columns: k,
|
|
2667
|
+
cacheColumns: z,
|
|
2668
|
+
isMobile: O,
|
|
2669
|
+
searchConfig: H,
|
|
2670
|
+
manualSearch: L,
|
|
2671
|
+
searchActions: W,
|
|
2669
2672
|
action: {
|
|
2670
2673
|
setTableSize: me,
|
|
2671
2674
|
reload: (h) => Ye(h),
|
|
@@ -2676,12 +2679,12 @@ const {
|
|
|
2676
2679
|
columnsMap: ze,
|
|
2677
2680
|
operationType: ve,
|
|
2678
2681
|
setColumnsMap: Ke,
|
|
2679
|
-
sortKeyColumns:
|
|
2680
|
-
cacheColumnsMap:
|
|
2682
|
+
sortKeyColumns: Ie,
|
|
2683
|
+
cacheColumnsMap: ee,
|
|
2681
2684
|
setSortKeyColumns: ge
|
|
2682
2685
|
},
|
|
2683
2686
|
setPagination: y,
|
|
2684
|
-
changeColumns:
|
|
2687
|
+
changeColumns: $e,
|
|
2685
2688
|
slots: a
|
|
2686
2689
|
}), s({
|
|
2687
2690
|
formRef: () => ({
|
|
@@ -2691,121 +2694,121 @@ const {
|
|
|
2691
2694
|
return ((h = u.value) == null ? void 0 : h.getFormState()) || {};
|
|
2692
2695
|
},
|
|
2693
2696
|
restFormState: (h) => {
|
|
2694
|
-
var
|
|
2695
|
-
n.value = !0, h && (h == null || h()), (
|
|
2697
|
+
var $;
|
|
2698
|
+
n.value = !0, h && (h == null || h()), ($ = u.value) == null || $.resetForm(!1), n.value = !1;
|
|
2696
2699
|
}
|
|
2697
2700
|
}),
|
|
2698
2701
|
actionRef: () => ({
|
|
2699
|
-
loading:
|
|
2700
|
-
dataSource:
|
|
2702
|
+
loading: V,
|
|
2703
|
+
dataSource: Oe,
|
|
2701
2704
|
pageState: t,
|
|
2702
|
-
pagination:
|
|
2705
|
+
pagination: J.value,
|
|
2703
2706
|
selectedKeys: w(() => ot.value),
|
|
2704
|
-
selectedItems: w(() =>
|
|
2707
|
+
selectedItems: w(() => zt.value),
|
|
2705
2708
|
rowsSelection: {
|
|
2706
|
-
clear:
|
|
2709
|
+
clear: Yt,
|
|
2707
2710
|
select: rt,
|
|
2708
2711
|
remove: ft,
|
|
2709
2712
|
sync: dt,
|
|
2710
2713
|
selectAll: ct
|
|
2711
2714
|
},
|
|
2712
2715
|
reload: Ye,
|
|
2713
|
-
getLoadingStatus: () => b(
|
|
2716
|
+
getLoadingStatus: () => b(Q),
|
|
2714
2717
|
reloadAndReset: async (h) => {
|
|
2715
|
-
var B,
|
|
2718
|
+
var $, B, j;
|
|
2716
2719
|
n.value = !0, y({
|
|
2717
2720
|
current: 1,
|
|
2718
2721
|
pageSize: (t == null ? void 0 : t.pageSize) || 10
|
|
2719
|
-
}), h != null && h.callBack && (h != null && h.wait ? await ((
|
|
2722
|
+
}), h != null && h.callBack && (h != null && h.wait ? await (($ = h == null ? void 0 : h.callBack) == null ? void 0 : $.call(h)) : (B = h == null ? void 0 : h.callBack) == null || B.call(h)), (j = u.value) == null || j.resetForm(!1), n.value = !1;
|
|
2720
2723
|
},
|
|
2721
|
-
reSetDataList:
|
|
2724
|
+
reSetDataList: Wt,
|
|
2722
2725
|
setPageAndReload: yt,
|
|
2723
2726
|
setPagination: y,
|
|
2724
|
-
setData:
|
|
2725
|
-
setLoading:
|
|
2727
|
+
setData: Ht,
|
|
2728
|
+
setLoading: se
|
|
2726
2729
|
})
|
|
2727
2730
|
}), () => {
|
|
2728
|
-
var B
|
|
2729
|
-
const h =
|
|
2731
|
+
var $, B;
|
|
2732
|
+
const h = Re(e.customRender || a.customRender);
|
|
2730
2733
|
return f(c("div", {
|
|
2731
2734
|
ref: S,
|
|
2732
|
-
class:
|
|
2735
|
+
class: Se([{
|
|
2733
2736
|
[`${m.value}`]: !0,
|
|
2734
2737
|
[`${i}`]: !0,
|
|
2735
2738
|
[`${o.class}`]: o.class,
|
|
2736
2739
|
[`${i}-no-scroll`]: !Object.keys(b(p) || {}).length,
|
|
2737
|
-
[`${i}-table-tree`]:
|
|
2740
|
+
[`${i}-table-tree`]: Vt.value,
|
|
2738
2741
|
[`${i}-full-screen`]: g.value
|
|
2739
2742
|
}]),
|
|
2740
2743
|
style: o.style
|
|
2741
2744
|
}, [c("div", {
|
|
2742
2745
|
class: [`${i}-content`, m.value]
|
|
2743
|
-
}, [(
|
|
2746
|
+
}, [(K.value.length > 0 || Re(a.search)) && e.search !== !1 && c(Dt, {
|
|
2744
2747
|
ref: u,
|
|
2745
2748
|
modal: e.modalScroll,
|
|
2746
2749
|
cardBordered: e.cardBordered,
|
|
2747
|
-
searchMap:
|
|
2750
|
+
searchMap: K.value,
|
|
2748
2751
|
prefixCls: i,
|
|
2749
|
-
loading: !!b(
|
|
2750
|
-
onSearch:
|
|
2751
|
-
defaultParams:
|
|
2752
|
+
loading: !!b(Q),
|
|
2753
|
+
onSearch: Qt,
|
|
2754
|
+
defaultParams: Z
|
|
2752
2755
|
}, {
|
|
2753
2756
|
default: a.search ? () => {
|
|
2754
|
-
var
|
|
2755
|
-
return (
|
|
2757
|
+
var j;
|
|
2758
|
+
return (j = a.search) == null ? void 0 : j.call(a);
|
|
2756
2759
|
} : null
|
|
2757
2760
|
}), c("div", {
|
|
2758
|
-
class:
|
|
2759
|
-
}, [
|
|
2761
|
+
class: Se(m.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
|
|
2762
|
+
}, [el(h), h ? c(nt, mt.value, {
|
|
2760
2763
|
default: () => {
|
|
2761
|
-
var
|
|
2764
|
+
var j, P, G;
|
|
2762
2765
|
return [c("div", {
|
|
2763
2766
|
class: `${i}-wrapper ${m.value}`
|
|
2764
2767
|
}, [c("div", {
|
|
2765
|
-
class:
|
|
2766
|
-
style: (
|
|
2767
|
-
}, [
|
|
2768
|
+
class: Se(`${i}-list`, m.value, (j = e.tableProps) == null ? void 0 : j.class),
|
|
2769
|
+
style: (P = e.tableProps) == null ? void 0 : P.style
|
|
2770
|
+
}, [Zt()]), e.pagination !== !1 && ((G = Oe.value) == null ? void 0 : G.length) > 0 && c(Dl, _({
|
|
2768
2771
|
class: {
|
|
2769
2772
|
[`${i}-pagination ${m.value}`]: !0,
|
|
2770
2773
|
[`${i}-pagination-${vt.value} ${m.value}`]: !!vt.value
|
|
2771
2774
|
}
|
|
2772
|
-
},
|
|
2773
|
-
onChange:
|
|
2775
|
+
}, Te(b(J)), {
|
|
2776
|
+
onChange: _t
|
|
2774
2777
|
}), null)])];
|
|
2775
2778
|
}
|
|
2776
|
-
}) : c(
|
|
2777
|
-
style: (
|
|
2778
|
-
class: (
|
|
2779
|
+
}) : c(Ml, _(xt(e, Object.keys(Et)), Gt.value, {
|
|
2780
|
+
style: ($ = e.tableProps) == null ? void 0 : $.style,
|
|
2781
|
+
class: (B = e.tableProps) == null ? void 0 : B.class,
|
|
2779
2782
|
loading: mt.value,
|
|
2780
|
-
rowKey: (
|
|
2781
|
-
transformCellText: (
|
|
2782
|
-
var
|
|
2783
|
-
e.transformCellText && typeof e.transformCellText && ((
|
|
2783
|
+
rowKey: (j) => j[e.rowKey],
|
|
2784
|
+
transformCellText: (j) => {
|
|
2785
|
+
var N, be, ae, Be, Le;
|
|
2786
|
+
e.transformCellText && typeof e.transformCellText && ((N = e.transformCellText) == null || N.call(e, j));
|
|
2784
2787
|
const {
|
|
2785
|
-
column:
|
|
2786
|
-
} =
|
|
2787
|
-
if (!
|
|
2788
|
-
const
|
|
2789
|
-
let
|
|
2790
|
-
if (
|
|
2791
|
-
if (
|
|
2792
|
-
|
|
2793
|
-
const
|
|
2794
|
-
|
|
2795
|
-
} else ((
|
|
2796
|
-
return
|
|
2788
|
+
column: P
|
|
2789
|
+
} = j;
|
|
2790
|
+
if (!P) return j.text;
|
|
2791
|
+
const G = (P == null ? void 0 : P.key) || (P == null ? void 0 : P.dataIndex);
|
|
2792
|
+
let le = !0, A = j.text;
|
|
2793
|
+
if (ne(A))
|
|
2794
|
+
if (A.length === 0 || A.length === 1 && !ce(A[0])) {
|
|
2795
|
+
A = A == null ? void 0 : A[0];
|
|
2796
|
+
const pe = sl(A, (P == null ? void 0 : P.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || "");
|
|
2797
|
+
le = pe.success, A = Hl(pe.value, (P == null ? void 0 : P.valueType) || ((ae = (be = e.columns) == null ? void 0 : be.find((ke) => (ke.key || ke.dataIndex) === G)) == null ? void 0 : ae.valueType), i, m.value);
|
|
2798
|
+
} else ((Be = A[0]) == null ? void 0 : Be.type) === "template" && (A = (Le = A[0]) == null ? void 0 : Le.children);
|
|
2799
|
+
return P != null && P.ellipsis ? Jt(A, le, P) : A;
|
|
2797
2800
|
},
|
|
2798
2801
|
rowSelection: e.rowSelection ? {
|
|
2799
2802
|
...Ge(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2800
2803
|
selectedRowKeys: ot.value,
|
|
2801
2804
|
onSelect: rt,
|
|
2802
2805
|
onSelectAll: ct,
|
|
2803
|
-
onChange:
|
|
2806
|
+
onChange: Kt
|
|
2804
2807
|
} : void 0,
|
|
2805
2808
|
onChange: yt,
|
|
2806
|
-
onExpandedRowsChange:
|
|
2807
|
-
onExpand:
|
|
2808
|
-
onResizeColumn: (
|
|
2809
|
+
onExpandedRowsChange: qt,
|
|
2810
|
+
onExpand: Xt,
|
|
2811
|
+
onResizeColumn: (j, P) => Ut(j, P)
|
|
2809
2812
|
}), {
|
|
2810
2813
|
...a,
|
|
2811
2814
|
emptyText: () => bt()
|
|
@@ -2820,5 +2823,5 @@ export {
|
|
|
2820
2823
|
lt as GProTable,
|
|
2821
2824
|
lt as default,
|
|
2822
2825
|
re as proTableProps,
|
|
2823
|
-
|
|
2826
|
+
Ga as useTable
|
|
2824
2827
|
};
|