@gx-design-vue/pro-table 0.2.0-beta.37 → 0.2.0-beta.39
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/hooks/useFetchData.d.ts +2 -1
- package/dist/hooks/useTable.d.ts +1 -1
- package/dist/pro-table.mjs +640 -628
- package/dist/pro-table.umd.js +1 -1
- package/dist/types/TableTypings.d.ts +2 -1
- package/package.json +1 -1
package/dist/pro-table.mjs
CHANGED
|
@@ -1,61 +1,63 @@
|
|
|
1
|
-
import { computed as w, ref as O, watch as
|
|
1
|
+
import { computed as w, ref as O, watch as U, unref as h, watchEffect as fe, reactive as ce, onUnmounted as jt, onDeactivated as Mt, onMounted as kt, provide as Et, inject as zt, defineComponent as ae, createVNode as i, Fragment as Ie, nextTick as Kt, mergeProps as q, createTextVNode as pe, renderSlot as Yt, isVNode as Ce, cloneVNode as Lt, toRef as Q, toRaw as Ne } from "vue";
|
|
2
2
|
import { isBoolean as te, isObject as ne, getSlot as ze, isFunction as $e, arrayRepeat as At, runFunction as Vt, handleCurrentPage as Ht, getSortIndex as Wt, isDeepEqualReact as nt, genColumnKey as ot, compareArray as _t, isNumber as ut, isString as Gt, isArray as Ke, getPrefixCls as Ve, getRandomNumber as Ye, handleShowIndex as qt, getSlotVNode as ge, hanndleField as Ut } from "@gx-design-vue/pro-utils";
|
|
3
|
-
import { pick as it, cloneDeep as
|
|
3
|
+
import { pick as it, cloneDeep as X, omit as ye } from "lodash-es";
|
|
4
4
|
import { useFullscreen as st, useWindowSize as Xt } from "@vueuse/core";
|
|
5
5
|
import { Form as et, Grid as He, Space as le, Button as tt, Input as at, TimePicker as Jt, DatePicker as rt, TreeSelect as Qt, Spin as Le, Select as Zt, Popover as ea, Checkbox as ta, Tooltip as Z, Tree as aa, Dropdown as la, Menu as Re, Empty as ct, Pagination as na, Table as oa, Typography as ua } from "ant-design-vue";
|
|
6
6
|
import { useProAppContext as ia } from "@gx-design-vue/pro-app";
|
|
7
7
|
import { useProStyle as Pe } from "@gx-design-vue/pro-provider";
|
|
8
8
|
import { tryOnUnmounted as sa, useMemo as Fe } from "@gx-design-vue/pro-hooks";
|
|
9
|
-
import
|
|
9
|
+
import W from "dayjs";
|
|
10
10
|
import { UpOutlined as ra, DownOutlined as ca, SettingOutlined as dt, VerticalAlignTopOutlined as da, VerticalAlignMiddleOutlined as fa, VerticalAlignBottomOutlined as ha, FullscreenExitOutlined as va, FullscreenOutlined as ma, ColumnHeightOutlined as ga, InfoCircleOutlined as ya, ReloadOutlined as pa } from "@ant-design/icons-vue";
|
|
11
11
|
function pl(e) {
|
|
12
|
-
var r;
|
|
13
12
|
const o = w(() => {
|
|
14
|
-
var
|
|
15
|
-
return (
|
|
13
|
+
var u;
|
|
14
|
+
return (u = e.value) == null ? void 0 : u.actionRef();
|
|
16
15
|
}), t = w(() => {
|
|
17
|
-
var
|
|
18
|
-
return (
|
|
16
|
+
var u;
|
|
17
|
+
return (u = e.value) == null ? void 0 : u.formRef();
|
|
19
18
|
}), n = w(() => {
|
|
20
|
-
var
|
|
21
|
-
const
|
|
19
|
+
var l, r, s, T;
|
|
20
|
+
const u = te((l = o.value) == null ? void 0 : l.pageParams) ? {} : ((r = o.value) == null ? void 0 : r.pageParams) || {};
|
|
22
21
|
return {
|
|
23
|
-
...it(
|
|
24
|
-
...((
|
|
22
|
+
...it(u, ["current", "pageSize"]),
|
|
23
|
+
...((T = (s = t.value) == null ? void 0 : s.getTableFormState) == null ? void 0 : T.call(s)) || {}
|
|
25
24
|
};
|
|
26
25
|
});
|
|
27
26
|
return {
|
|
28
27
|
formRef: t,
|
|
29
28
|
actionRef: o,
|
|
30
29
|
loading: w(() => {
|
|
31
|
-
var
|
|
32
|
-
return (
|
|
30
|
+
var u;
|
|
31
|
+
return (u = e.value) == null ? void 0 : u.loading;
|
|
33
32
|
}),
|
|
34
33
|
params: n,
|
|
35
|
-
dataSource: (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
dataSource: w(() => {
|
|
35
|
+
var u;
|
|
36
|
+
return (u = o == null ? void 0 : o.value) == null ? void 0 : u.dataSource;
|
|
37
|
+
}),
|
|
38
|
+
setPageAndReload: (u, l, r, s) => {
|
|
39
|
+
var T, v;
|
|
40
|
+
return (v = (T = o.value) == null ? void 0 : T.setPageAndReload) == null ? void 0 : v.call(T, u, l, r, s);
|
|
39
41
|
},
|
|
40
|
-
setPagination: (
|
|
41
|
-
var
|
|
42
|
-
return (
|
|
42
|
+
setPagination: (u) => {
|
|
43
|
+
var l, r;
|
|
44
|
+
return (r = (l = o.value) == null ? void 0 : l.setPagination) == null ? void 0 : r.call(l, u);
|
|
43
45
|
},
|
|
44
|
-
mutate: (
|
|
45
|
-
var
|
|
46
|
-
return (
|
|
46
|
+
mutate: (u) => {
|
|
47
|
+
var l, r;
|
|
48
|
+
return (r = (l = o.value) == null ? void 0 : l.reSetDataList) == null ? void 0 : r.call(l, u);
|
|
47
49
|
},
|
|
48
|
-
changeLoading: (
|
|
49
|
-
var
|
|
50
|
-
return (
|
|
50
|
+
changeLoading: (u) => {
|
|
51
|
+
var l, r;
|
|
52
|
+
return (r = (l = o.value) == null ? void 0 : l.loadingOperation) == null ? void 0 : r.call(l, u);
|
|
51
53
|
},
|
|
52
|
-
changeDataValue: (
|
|
53
|
-
var
|
|
54
|
-
return (
|
|
54
|
+
changeDataValue: (u) => {
|
|
55
|
+
var l, r;
|
|
56
|
+
return (r = (l = o.value) == null ? void 0 : l.changeDataValue) == null ? void 0 : r.call(l, u);
|
|
55
57
|
},
|
|
56
|
-
reload: (
|
|
57
|
-
var
|
|
58
|
-
return (
|
|
58
|
+
reload: (u) => {
|
|
59
|
+
var l, r;
|
|
60
|
+
return (r = (l = o.value) == null ? void 0 : l.reload) == null ? void 0 : r.call(l, u);
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
}
|
|
@@ -513,22 +515,22 @@ const Ca = () => ({
|
|
|
513
515
|
function Sa({ emit: e, loading: o }) {
|
|
514
516
|
var l;
|
|
515
517
|
const t = O(te(o.value) ? o.value : ne(o.value) ? (l = o.value) == null ? void 0 : l.spinning : !1);
|
|
516
|
-
|
|
517
|
-
t.value = te(
|
|
518
|
+
U(() => o.value, (r) => {
|
|
519
|
+
t.value = te(r) ? r : ne(r) ? r == null ? void 0 : r.spinning : t.value;
|
|
518
520
|
});
|
|
519
521
|
const n = w(() => h(t) || !1);
|
|
520
|
-
function r
|
|
521
|
-
t.value =
|
|
522
|
+
function u(r) {
|
|
523
|
+
t.value = r, e("loadingChange", !0);
|
|
522
524
|
}
|
|
523
|
-
return { loadingStatus: n, setLoading:
|
|
525
|
+
return { loadingStatus: n, setLoading: u };
|
|
524
526
|
}
|
|
525
527
|
function xa({ size: e, emit: o }) {
|
|
526
528
|
const t = O("middle");
|
|
527
529
|
fe(() => {
|
|
528
530
|
t.value = e.value;
|
|
529
531
|
});
|
|
530
|
-
function n(
|
|
531
|
-
t.value =
|
|
532
|
+
function n(u) {
|
|
533
|
+
t.value = u, o("sizeChange", !0);
|
|
532
534
|
}
|
|
533
535
|
return { sizeRef: t, setTableSize: n };
|
|
534
536
|
}
|
|
@@ -544,22 +546,22 @@ function wa({
|
|
|
544
546
|
...t.value ?? {}
|
|
545
547
|
});
|
|
546
548
|
else
|
|
547
|
-
for (const
|
|
548
|
-
delete n[
|
|
549
|
+
for (const r in n)
|
|
550
|
+
delete n[r];
|
|
549
551
|
});
|
|
550
|
-
const
|
|
551
|
-
var
|
|
552
|
+
const u = w(() => {
|
|
553
|
+
var v;
|
|
552
554
|
if (te(t.value) && !t.value)
|
|
553
555
|
return !1;
|
|
554
|
-
const
|
|
556
|
+
const r = ze(e, h(o), "pageItemRender"), s = $e(r) ? {
|
|
555
557
|
itemRender: ({
|
|
556
|
-
page:
|
|
557
|
-
type:
|
|
558
|
-
originalElement:
|
|
559
|
-
}) =>
|
|
560
|
-
page:
|
|
561
|
-
type:
|
|
562
|
-
originalElement:
|
|
558
|
+
page: y,
|
|
559
|
+
type: d,
|
|
560
|
+
originalElement: c
|
|
561
|
+
}) => r ? r({
|
|
562
|
+
page: y,
|
|
563
|
+
type: d,
|
|
564
|
+
originalElement: c
|
|
563
565
|
}) : null
|
|
564
566
|
} : null, T = {
|
|
565
567
|
current: 1,
|
|
@@ -570,169 +572,179 @@ function wa({
|
|
|
570
572
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
571
573
|
...t.value || {},
|
|
572
574
|
...h(n),
|
|
573
|
-
...
|
|
575
|
+
...s || {}
|
|
574
576
|
};
|
|
575
|
-
return (
|
|
577
|
+
return (v = t.value) != null && v.showTotal || (T.showTotal = (y) => `共${y < T.pageSize ? 1 : Math.ceil(y / (T.pageSize || 10))}页 ${y}条记录`), T;
|
|
576
578
|
});
|
|
577
|
-
function l(
|
|
578
|
-
const
|
|
579
|
+
function l(r) {
|
|
580
|
+
const s = h(u);
|
|
579
581
|
Object.assign(n, {
|
|
580
|
-
...
|
|
581
|
-
...
|
|
582
|
+
...s || {},
|
|
583
|
+
...r
|
|
582
584
|
});
|
|
583
585
|
}
|
|
584
586
|
return {
|
|
585
|
-
getPaginationInfo:
|
|
587
|
+
getPaginationInfo: u,
|
|
586
588
|
setPagination: l
|
|
587
589
|
};
|
|
588
590
|
}
|
|
589
591
|
function Ta(e, o) {
|
|
590
592
|
const t = O([]), n = O([]);
|
|
591
|
-
|
|
592
|
-
var
|
|
593
|
-
return (
|
|
594
|
-
}, (
|
|
595
|
-
t.value = At([...
|
|
593
|
+
U(() => {
|
|
594
|
+
var v;
|
|
595
|
+
return (v = o.value) == null ? void 0 : v.selectedRowKeys;
|
|
596
|
+
}, (v) => {
|
|
597
|
+
t.value = At([...v || []]);
|
|
596
598
|
}, {
|
|
597
599
|
deep: !0,
|
|
598
600
|
immediate: !0
|
|
599
601
|
});
|
|
600
|
-
const
|
|
601
|
-
e.value && (
|
|
602
|
+
const u = (v, y) => {
|
|
603
|
+
e.value && (y ? v != null && v[e.value] && (t.value.push(v[e.value]), n.value.push(v)) : (t.value = t.value.filter((d) => d !== v[e.value]), n.value = n.value.filter((d) => d[e.value] !== v[e.value])));
|
|
602
604
|
}, l = () => {
|
|
603
|
-
var
|
|
604
|
-
o.value && ((
|
|
605
|
+
var v, y;
|
|
606
|
+
o.value && ((y = (v = o.value) == null ? void 0 : v.onChange) == null || y.call(v, t.value, n.value));
|
|
605
607
|
};
|
|
606
608
|
return {
|
|
607
609
|
selectedKey: t,
|
|
608
|
-
selectRowKey:
|
|
609
|
-
selectAllRowKey: (
|
|
610
|
-
e.value && (
|
|
610
|
+
selectRowKey: u,
|
|
611
|
+
selectAllRowKey: (v, y, d) => {
|
|
612
|
+
e.value && (v ? y.map((c) => (t.value.every((p) => p !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (t.value.push(c[e.value]), n.value.push(c)), c)) : d.map((c) => (t.value.some((p) => p === (c == null ? void 0 : c[e.value])) && (t.value = t.value.filter((p) => p !== c[e.value]), n.value = n.value.filter((p) => p[e.value] !== c[e.value])), c)));
|
|
611
613
|
},
|
|
612
|
-
removeRowKeys: (
|
|
613
|
-
t.value = t.value.filter((
|
|
614
|
+
removeRowKeys: (v) => {
|
|
615
|
+
t.value = t.value.filter((y) => !v.includes(y)), n.value = n.value.filter((y) => !v.includes(y == null ? void 0 : y[e.value || ""])), l();
|
|
614
616
|
},
|
|
615
617
|
changeRowKey: l,
|
|
616
|
-
syncSelectedRows: (
|
|
618
|
+
syncSelectedRows: (v) => {
|
|
617
619
|
if (e.value && t.value.length !== n.value.length) {
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
|
|
620
|
+
const y = n.value.map((c) => c[e.value]), d = t.value.filter((c) => !y.includes(c));
|
|
621
|
+
v.forEach((c) => {
|
|
622
|
+
d.includes(c[e.value]) && n.value.push(X(c));
|
|
621
623
|
});
|
|
622
624
|
}
|
|
623
625
|
}
|
|
624
626
|
};
|
|
625
627
|
}
|
|
626
628
|
function Ra(e, o) {
|
|
627
|
-
const t = w(() => o || 0), n = O(),
|
|
629
|
+
const t = w(() => o || 0), n = O(), u = O(e);
|
|
628
630
|
function l() {
|
|
629
631
|
n.value && clearTimeout(n.value);
|
|
630
632
|
}
|
|
631
|
-
async function
|
|
632
|
-
return t.value === 0 || t.value === void 0 ?
|
|
633
|
-
var
|
|
634
|
-
(
|
|
635
|
-
T(await
|
|
633
|
+
async function r(...s) {
|
|
634
|
+
return t.value === 0 || t.value === void 0 ? u.value(...s) : (l(), new Promise(async (T) => {
|
|
635
|
+
var v;
|
|
636
|
+
(v = s[0]) != null && v.immediate ? T(await u.value(...s)) : n.value = setTimeout(async () => {
|
|
637
|
+
T(await u.value(...s));
|
|
636
638
|
}, t.value);
|
|
637
639
|
}));
|
|
638
640
|
}
|
|
639
641
|
return sa(l), {
|
|
640
642
|
cancel: l,
|
|
641
|
-
run:
|
|
643
|
+
run: r
|
|
642
644
|
};
|
|
643
645
|
}
|
|
644
646
|
function $a(e) {
|
|
645
|
-
const o = w(() => e.polling), t = w(() => e.request), n = w(() => e.postData),
|
|
647
|
+
const o = w(() => e.polling), t = w(() => e.request), n = w(() => e.postData), u = w(() => e.debounceTime), l = w(() => e.dataSource);
|
|
646
648
|
return {
|
|
647
649
|
polling: o,
|
|
648
650
|
request: t,
|
|
649
651
|
postData: n,
|
|
650
|
-
debounceTime:
|
|
652
|
+
debounceTime: u,
|
|
651
653
|
dataSource: l
|
|
652
654
|
};
|
|
653
655
|
}
|
|
654
|
-
function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest:
|
|
655
|
-
const x = O(), I = O(!0), B = O(!1),
|
|
656
|
+
function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u, debounceTime: l }, { columns: r, loadingStatus: s, setLoading: T, setColumns: v, removeRowKeys: y, syncSelectedRows: d, formParamsRef: c, setPagination: p, getPaginationInfo: g, onBeforeSearchSubmit: m, hasCustomRender: S }, F) {
|
|
657
|
+
const x = O(), I = O(!0), B = O(!1), _ = O(!1), M = O([]), A = O(), z = Ra(async (f) => {
|
|
656
658
|
A.value && clearTimeout(A.value);
|
|
657
|
-
const j = await P(
|
|
658
|
-
return
|
|
659
|
-
|
|
660
|
-
}, Math.max(
|
|
659
|
+
const j = await P(f), V = Vt(e.value, j);
|
|
660
|
+
return V && !x.value && (A.value = setTimeout(() => {
|
|
661
|
+
z.run({ ...f, isPolling: V });
|
|
662
|
+
}, Math.max(V, 2e3))), j;
|
|
661
663
|
}, l.value || 10);
|
|
662
664
|
jt(() => {
|
|
663
665
|
x.value = !0, clearTimeout(A.value);
|
|
664
666
|
}), Mt(() => {
|
|
665
667
|
x.value = !0, clearTimeout(A.value);
|
|
666
|
-
}),
|
|
667
|
-
e.value ?
|
|
668
|
-
}, { immediate: !0 }),
|
|
669
|
-
() =>
|
|
668
|
+
}), U(() => e.value, () => {
|
|
669
|
+
e.value ? z.run({ isPolling: !0 }) : clearTimeout(A.value);
|
|
670
|
+
}, { immediate: !0 }), U([
|
|
671
|
+
() => u.value,
|
|
670
672
|
() => n.value,
|
|
671
|
-
() =>
|
|
673
|
+
() => c
|
|
672
674
|
], () => {
|
|
673
|
-
o.value ? (!I.value || !e.value) &&
|
|
675
|
+
o.value ? (!I.value || !e.value) && z.run({ isPolling: !1 }) : $(n.value || []);
|
|
674
676
|
}, {
|
|
675
677
|
deep: !0,
|
|
676
678
|
immediate: !0
|
|
677
679
|
});
|
|
678
680
|
const D = w(() => {
|
|
679
681
|
if (S.value)
|
|
680
|
-
return h(
|
|
681
|
-
const
|
|
682
|
-
return !h(
|
|
683
|
-
}), oe = w(() => h(
|
|
684
|
-
function a(
|
|
685
|
-
|
|
682
|
+
return h(M);
|
|
683
|
+
const f = h(r).filter((j) => j.show || j.show === void 0);
|
|
684
|
+
return !h(M) || !f || f.length === 0 ? [] : h(M);
|
|
685
|
+
}), oe = w(() => h(M).some((f) => f.children && f.children.length > 0));
|
|
686
|
+
function a(f) {
|
|
687
|
+
_.value = f;
|
|
686
688
|
}
|
|
687
|
-
function b(
|
|
688
|
-
|
|
689
|
+
function b(f, j, V, Y) {
|
|
690
|
+
z.run({ pagination: f, filters: j, sorter: V, extra: Y, isPolling: !1 }), F("change", f, j, V, Y);
|
|
689
691
|
}
|
|
690
|
-
const P = async (
|
|
692
|
+
const P = async (f = {}) => {
|
|
691
693
|
var Se, xe, we;
|
|
692
|
-
const { pagination: j, filters:
|
|
693
|
-
if (!h(o) || !$e(h(o)) || h(
|
|
694
|
+
const { pagination: j, filters: V = {}, sorter: Y = {}, removeKeys: he = [], isPolling: Oe = !1 } = f;
|
|
695
|
+
if (!h(o) || !$e(h(o)) || h(u) && s.value || B.value)
|
|
694
696
|
return n.value || [];
|
|
695
|
-
if (B.value = !0, !Oe || h(
|
|
697
|
+
if (B.value = !0, !Oe || h(u) || I.value ? T(!0) : a(!0), h(u)) {
|
|
696
698
|
I.value = !1, B.value = !1;
|
|
697
699
|
return;
|
|
698
700
|
}
|
|
699
701
|
j && p(j);
|
|
700
702
|
try {
|
|
701
703
|
let ee = {};
|
|
702
|
-
if (te(j) && !j || te(
|
|
704
|
+
if (te(j) && !j || te(g))
|
|
703
705
|
ee = {};
|
|
704
706
|
else {
|
|
705
|
-
const { current:
|
|
706
|
-
ee.pageNum = Ht({ current:
|
|
707
|
+
const { current: E = 1, pageSize: ie = 10, total: G } = h(g) || {};
|
|
708
|
+
ee.pageNum = Ht({ current: E, pageSize: ie, total: G }, he.length), he.length && y(he), ee.pageSize = ie;
|
|
707
709
|
}
|
|
708
|
-
(ne(
|
|
709
|
-
const ie = (
|
|
710
|
-
|
|
710
|
+
(ne(Y) ? [Y] : Y).forEach((E) => {
|
|
711
|
+
const ie = (E == null ? void 0 : E.columnKey) || (E == null ? void 0 : E.field);
|
|
712
|
+
E && (E != null && E.order) ? v(h(r).map((G) => (G.dataIndex === ie ? G.sortOrder = E == null ? void 0 : E.order : G.sortOrder = null, G))) : E && v(h(r).map((G) => (G.dataIndex === ie && (G.sortOrder = null), G)));
|
|
711
713
|
});
|
|
712
714
|
let ve = {
|
|
713
715
|
...ee || {},
|
|
714
|
-
...
|
|
715
|
-
...
|
|
716
|
+
...f.params,
|
|
717
|
+
...c
|
|
716
718
|
};
|
|
717
|
-
|
|
719
|
+
m && $e(m) && (ve = await m(ve, Y, V));
|
|
718
720
|
let L = [];
|
|
719
|
-
const ue = await ((Se = h(o)) == null ? void 0 : Se(ve,
|
|
720
|
-
return B.value = !1, ue && ue.success ? (L = ue.data || [], h(t) && $e(h(t)) && (L = await ((xe = h(t)) == null ? void 0 : xe(L))),
|
|
721
|
+
const ue = await ((Se = h(o)) == null ? void 0 : Se(ve, Y, V));
|
|
722
|
+
return B.value = !1, ue && ue.success ? (L = ue.data || [], h(t) && $e(h(t)) && (L = await ((xe = h(t)) == null ? void 0 : xe(L))), d(L), (ue.total || (L == null ? void 0 : L.length) || 0) !== ((we = h(g)) == null ? void 0 : we.total) && p({
|
|
721
723
|
total: ue.total || (L == null ? void 0 : L.length) || 0
|
|
722
724
|
}), $(L), L) : [];
|
|
723
725
|
} catch (ee) {
|
|
724
|
-
|
|
726
|
+
M.value === void 0 && $([]), F("requestError", ee);
|
|
725
727
|
} finally {
|
|
726
728
|
I.value = !1, T(!1);
|
|
727
729
|
}
|
|
728
730
|
return [];
|
|
729
731
|
};
|
|
730
|
-
function $(
|
|
731
|
-
const j = Wt(
|
|
732
|
-
nt(j,
|
|
732
|
+
function $(f) {
|
|
733
|
+
const j = Wt(X(f), h(g.value));
|
|
734
|
+
nt(j, M.value) || (M.value = j);
|
|
733
735
|
}
|
|
734
|
-
function N({ key:
|
|
735
|
-
|
|
736
|
+
function N({ key: f, params: j, type: V = "update" }) {
|
|
737
|
+
switch (V) {
|
|
738
|
+
case "update":
|
|
739
|
+
M.value = M.value.map((Y) => f && j[f] === Y[f] ? { ...Y, ...j } : Y);
|
|
740
|
+
break;
|
|
741
|
+
case "add":
|
|
742
|
+
M.value.push(j);
|
|
743
|
+
break;
|
|
744
|
+
case "delete":
|
|
745
|
+
M.value = M.value.filter((Y) => f ? f && j[f] !== Y[f] : !0);
|
|
746
|
+
break;
|
|
747
|
+
}
|
|
736
748
|
}
|
|
737
749
|
return {
|
|
738
750
|
getDataSourceRef: D,
|
|
@@ -740,8 +752,8 @@ function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: r
|
|
|
740
752
|
reSetDataList: $,
|
|
741
753
|
changeDataValue: N,
|
|
742
754
|
handleTableChange: b,
|
|
743
|
-
reload: async (
|
|
744
|
-
h(o) ? await
|
|
755
|
+
reload: async (f) => {
|
|
756
|
+
h(o) ? await z.run({ ...f, isPolling: !1 }) : F("reload");
|
|
745
757
|
}
|
|
746
758
|
};
|
|
747
759
|
}
|
|
@@ -749,97 +761,97 @@ function Ia(e) {
|
|
|
749
761
|
const o = {};
|
|
750
762
|
return e.forEach((t) => {
|
|
751
763
|
let n = t.initialValue;
|
|
752
|
-
const
|
|
753
|
-
!n &&
|
|
764
|
+
const u = ["select"], l = ["date", "time", "dateRange"];
|
|
765
|
+
!n && u.includes(t.valueType) ? n = void 0 : !n && l.includes(t.valueType) ? n = null : n || (n = ""), t.name === "dateRange" ? (o[t.rangeStartName || "start"] = n ? n[0] : null, o[t.rangeEndName || "end"] = n ? n[1] : null) : t.name && (o[t.name] = n);
|
|
754
766
|
}), o;
|
|
755
767
|
}
|
|
756
|
-
function Pa({ search: e, searchMap: o, params: t, columns: n, setPagination:
|
|
757
|
-
const l = ce({}),
|
|
758
|
-
var
|
|
759
|
-
return ne(e.value) ? !!((
|
|
768
|
+
function Pa({ search: e, searchMap: o, params: t, columns: n, setPagination: u }) {
|
|
769
|
+
const l = ce({}), r = ce({}), s = O([]), T = w(() => {
|
|
770
|
+
var d;
|
|
771
|
+
return ne(e.value) ? !!((d = e.value) != null && d.showSearch) : !!e.value;
|
|
760
772
|
});
|
|
761
773
|
kt(() => {
|
|
762
|
-
|
|
763
|
-
}),
|
|
764
|
-
|
|
774
|
+
v("all");
|
|
775
|
+
}), U(() => t.value, () => {
|
|
776
|
+
v("params");
|
|
765
777
|
}, {
|
|
766
778
|
deep: !0
|
|
767
|
-
}),
|
|
768
|
-
|
|
779
|
+
}), U(() => o.value, () => {
|
|
780
|
+
v("searchMap");
|
|
769
781
|
}, {
|
|
770
782
|
deep: !0
|
|
771
|
-
}),
|
|
772
|
-
|
|
783
|
+
}), U(() => n.value, () => {
|
|
784
|
+
v("columns");
|
|
773
785
|
}, {
|
|
774
786
|
deep: !0
|
|
775
787
|
});
|
|
776
|
-
const
|
|
777
|
-
var p,
|
|
778
|
-
const
|
|
779
|
-
if ((
|
|
780
|
-
|
|
788
|
+
const v = (d) => {
|
|
789
|
+
var p, g;
|
|
790
|
+
const c = [];
|
|
791
|
+
if ((d === "all" || d === "searchMap") && ((p = o.value) == null || p.forEach((m) => c.push(m)), c.forEach((m) => {
|
|
792
|
+
s.value.some((S) => S.name === m.name) ? s.value = s.value.map((S) => S.name === m.name ? {
|
|
781
793
|
...S,
|
|
782
|
-
...
|
|
783
|
-
} : S) :
|
|
784
|
-
})), (
|
|
785
|
-
|
|
786
|
-
}),
|
|
787
|
-
|
|
794
|
+
...m
|
|
795
|
+
} : S) : s.value.push(m);
|
|
796
|
+
})), (d === "all" || d === "columns") && ((g = n.value) != null && g.length) && (n.value && n.value.forEach((m) => {
|
|
797
|
+
m.searchConfig && c.push(m.searchConfig);
|
|
798
|
+
}), c.forEach((m) => {
|
|
799
|
+
s.value.some((S) => S.name === m.name) ? s.value = s.value.map((S) => S.name === m.name ? {
|
|
788
800
|
...S,
|
|
789
|
-
...
|
|
790
|
-
} : S) :
|
|
791
|
-
})),
|
|
792
|
-
|
|
793
|
-
const
|
|
794
|
-
Object.assign(
|
|
795
|
-
for (const S in
|
|
796
|
-
l[S] || (l[S] =
|
|
801
|
+
...m
|
|
802
|
+
} : S) : s.value.push(m);
|
|
803
|
+
})), d === "all" || d === "searchMap" || d === "columns") {
|
|
804
|
+
u({ current: 1 });
|
|
805
|
+
const m = Ia(c);
|
|
806
|
+
Object.assign(r, { ...m });
|
|
807
|
+
for (const S in m)
|
|
808
|
+
l[S] || (l[S] = m[S]);
|
|
797
809
|
}
|
|
798
|
-
(
|
|
810
|
+
(d === "all" || d === "params") && !T.value && (u({ current: 1 }), Object.assign(l, t.value));
|
|
799
811
|
};
|
|
800
|
-
function
|
|
801
|
-
|
|
812
|
+
function y(d) {
|
|
813
|
+
u({ current: 1 }), Object.assign(l, d);
|
|
802
814
|
}
|
|
803
|
-
return { formDataRef:
|
|
815
|
+
return { formDataRef: s, formParamsRef: l, defaultParamsRef: r, setFormParams: y };
|
|
804
816
|
}
|
|
805
817
|
function Oa({ columns: e, columnsState: o, changeColumns: t }) {
|
|
806
|
-
const n = O(void 0),
|
|
807
|
-
|
|
808
|
-
var
|
|
809
|
-
(
|
|
810
|
-
const
|
|
811
|
-
|
|
818
|
+
const n = O(void 0), u = ce({}), l = ce({}), r = ce({}), s = O([]);
|
|
819
|
+
U(() => e.value, () => {
|
|
820
|
+
var y;
|
|
821
|
+
(y = h(e)) == null || y.forEach(({ show: d, key: c, fixed: p }, g) => {
|
|
822
|
+
const m = ot(c, g);
|
|
823
|
+
m && (r[m] = { show: d === void 0 ? !0 : d, fixed: p });
|
|
812
824
|
});
|
|
813
825
|
}, {
|
|
814
826
|
deep: !0,
|
|
815
827
|
immediate: !0
|
|
816
|
-
}),
|
|
817
|
-
const
|
|
818
|
-
|
|
828
|
+
}), U(() => e.value, () => {
|
|
829
|
+
const y = h(e).map((d) => d.key);
|
|
830
|
+
v(y);
|
|
819
831
|
}, {
|
|
820
832
|
deep: !0,
|
|
821
833
|
immediate: !0
|
|
822
834
|
}), fe(() => {
|
|
823
|
-
var
|
|
824
|
-
const
|
|
825
|
-
...(
|
|
826
|
-
...h(
|
|
835
|
+
var d;
|
|
836
|
+
const y = {
|
|
837
|
+
...(d = h(o)) == null ? void 0 : d.value,
|
|
838
|
+
...h(r)
|
|
827
839
|
};
|
|
828
|
-
Object.assign(
|
|
840
|
+
Object.assign(u, y), Object.assign(l, y);
|
|
829
841
|
});
|
|
830
|
-
function T(
|
|
831
|
-
n.value =
|
|
842
|
+
function T(y, d) {
|
|
843
|
+
n.value = d, Object.assign(u, y), t == null || t(u, d === "fixed");
|
|
832
844
|
}
|
|
833
|
-
function
|
|
834
|
-
|
|
845
|
+
function v(y) {
|
|
846
|
+
s.value = y;
|
|
835
847
|
}
|
|
836
848
|
return {
|
|
837
|
-
columnsMap:
|
|
849
|
+
columnsMap: u,
|
|
838
850
|
operationType: n,
|
|
839
851
|
setColumnsMap: T,
|
|
840
|
-
sortKeyColumns:
|
|
852
|
+
sortKeyColumns: s,
|
|
841
853
|
cacheColumnsMap: l,
|
|
842
|
-
setSortKeyColumns:
|
|
854
|
+
setSortKeyColumns: v
|
|
843
855
|
};
|
|
844
856
|
}
|
|
845
857
|
function Ba(e) {
|
|
@@ -850,112 +862,112 @@ function Ba(e) {
|
|
|
850
862
|
autoScroll: n
|
|
851
863
|
};
|
|
852
864
|
}
|
|
853
|
-
function Da({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll:
|
|
854
|
-
const
|
|
855
|
-
|
|
865
|
+
function Da({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll: u, neverScroll: l }) {
|
|
866
|
+
const r = O([]), s = O([]);
|
|
867
|
+
U([
|
|
856
868
|
() => e.value,
|
|
857
869
|
() => o.value,
|
|
858
870
|
() => t.value,
|
|
859
871
|
() => n.value,
|
|
860
|
-
() =>
|
|
872
|
+
() => u.value,
|
|
861
873
|
() => l.value
|
|
862
874
|
], () => {
|
|
863
|
-
|
|
875
|
+
r.value = X(y(h(o))), s.value = X(y(h(o)));
|
|
864
876
|
}, {
|
|
865
877
|
deep: !0,
|
|
866
878
|
immediate: !0
|
|
867
879
|
});
|
|
868
880
|
const T = w(() => {
|
|
869
|
-
const
|
|
881
|
+
const g = v(h(r).filter((F) => F.fixed === "left")), m = v(h(r).filter((F) => F.fixed !== "left" && F.fixed !== "right")), S = v(h(r).filter((F) => F.fixed === "right"));
|
|
870
882
|
return [
|
|
871
|
-
...
|
|
872
|
-
...
|
|
883
|
+
...g,
|
|
884
|
+
...m,
|
|
873
885
|
...S
|
|
874
886
|
];
|
|
875
887
|
});
|
|
876
|
-
function
|
|
877
|
-
return
|
|
888
|
+
function v(g) {
|
|
889
|
+
return g.sort((m, S) => _t(m, S, "order", 0));
|
|
878
890
|
}
|
|
879
|
-
function g
|
|
880
|
-
return
|
|
891
|
+
function y(g) {
|
|
892
|
+
return X(g).map((m, S) => {
|
|
881
893
|
var F;
|
|
882
|
-
if (
|
|
883
|
-
return
|
|
884
|
-
if (
|
|
894
|
+
if (m.dataIndex === "action" || S === g.length - 1 ? m.resizable = !1 : m.resizable = te(m.resizable) ? m.resizable : !!(ut(m.width) && h(n)), !m.width || h(l))
|
|
895
|
+
return m;
|
|
896
|
+
if (m.dataIndex === "action" && h(u))
|
|
885
897
|
if ((F = h(e)) != null && F.x || !h(t))
|
|
886
|
-
|
|
898
|
+
m.width = m.width || 100, m.fixed = "right";
|
|
887
899
|
else {
|
|
888
|
-
const x = h(o).find((I) => I.dataIndex ===
|
|
889
|
-
|
|
900
|
+
const x = h(o).find((I) => I.dataIndex === m.dataIndex);
|
|
901
|
+
m.width = (x == null ? void 0 : x.width) || "", m.fixed = x == null ? void 0 : x.fixed;
|
|
890
902
|
}
|
|
891
|
-
return
|
|
903
|
+
return m;
|
|
892
904
|
});
|
|
893
905
|
}
|
|
894
|
-
function
|
|
895
|
-
|
|
906
|
+
function d(g, m) {
|
|
907
|
+
r.value = r.value.map((S) => (S.uuid === m.uuid && (S.width = g), S));
|
|
896
908
|
}
|
|
897
|
-
function
|
|
898
|
-
if (
|
|
899
|
-
|
|
909
|
+
function c(g) {
|
|
910
|
+
if (g.length <= 0) {
|
|
911
|
+
r.value = [];
|
|
900
912
|
return;
|
|
901
913
|
}
|
|
902
|
-
nt(
|
|
914
|
+
nt(y(X(g)), r.value) || (r.value = y(X(g)));
|
|
903
915
|
}
|
|
904
|
-
function p(
|
|
905
|
-
let
|
|
906
|
-
|
|
916
|
+
function p(g) {
|
|
917
|
+
let m = X(o.value);
|
|
918
|
+
m = m.map((S) => {
|
|
907
919
|
var x, I, B;
|
|
908
920
|
const F = S.key ? {
|
|
909
|
-
show: (x =
|
|
910
|
-
fixed: (I =
|
|
911
|
-
order: (B =
|
|
921
|
+
show: (x = g[S.key]) == null ? void 0 : x.show,
|
|
922
|
+
fixed: (I = g[S.key]) == null ? void 0 : I.fixed,
|
|
923
|
+
order: (B = g[S.key]) == null ? void 0 : B.order
|
|
912
924
|
} : {};
|
|
913
925
|
return {
|
|
914
926
|
...S,
|
|
915
927
|
...F
|
|
916
928
|
};
|
|
917
|
-
}),
|
|
929
|
+
}), c(m);
|
|
918
930
|
}
|
|
919
931
|
return {
|
|
920
932
|
breakpoint: t,
|
|
921
933
|
getProColumns: T,
|
|
922
|
-
cacheProColumns:
|
|
923
|
-
setColumns:
|
|
934
|
+
cacheProColumns: s,
|
|
935
|
+
setColumns: c,
|
|
924
936
|
changeColumns: p,
|
|
925
|
-
resizeColumnWidth:
|
|
937
|
+
resizeColumnWidth: d
|
|
926
938
|
};
|
|
927
939
|
}
|
|
928
940
|
function Na(e) {
|
|
929
|
-
const o = w(() => e.scroll), t = w(() => e.autoScroll), n = w(() => e.modalScroll),
|
|
941
|
+
const o = w(() => e.scroll), t = w(() => e.autoScroll), n = w(() => e.modalScroll), u = w(() => e.neverScroll), l = w(() => e.rowSelection), r = w(() => e.scrollBreakpoint);
|
|
930
942
|
return {
|
|
931
943
|
scroll: o,
|
|
932
|
-
neverScroll:
|
|
944
|
+
neverScroll: u,
|
|
933
945
|
rowSelection: l,
|
|
934
946
|
autoScroll: t,
|
|
935
947
|
modalScroll: n,
|
|
936
|
-
scrollBreakpoint:
|
|
948
|
+
scrollBreakpoint: r
|
|
937
949
|
};
|
|
938
950
|
}
|
|
939
|
-
function ja({ scroll: e, columns: o, autoScroll: t, modalScroll: n, neverScroll:
|
|
940
|
-
const
|
|
941
|
-
var
|
|
942
|
-
return h(T) ? ut(h(T)) ?
|
|
943
|
-
}),
|
|
944
|
-
let
|
|
945
|
-
const p = h(l) ? 60 : 0,
|
|
946
|
-
|
|
947
|
-
|
|
951
|
+
function ja({ scroll: e, columns: o, autoScroll: t, modalScroll: n, neverScroll: u, rowSelection: l, screensRef: r, innerWidth: s, scrollBreakpoint: T }) {
|
|
952
|
+
const v = w(() => {
|
|
953
|
+
var c, p, g;
|
|
954
|
+
return h(T) ? ut(h(T)) ? s.value > h(T) : Gt(h(T)) ? (c = r.value) == null ? void 0 : c[h(T)] : (p = r.value) == null ? void 0 : p.xl : (g = r.value) == null ? void 0 : g.xl;
|
|
955
|
+
}), y = w(() => {
|
|
956
|
+
let c = 0;
|
|
957
|
+
const p = h(l) ? 60 : 0, g = 150, m = X(h(o));
|
|
958
|
+
m.forEach((x) => {
|
|
959
|
+
c += Number.parseInt(x.width) || 0;
|
|
948
960
|
});
|
|
949
|
-
const F =
|
|
950
|
-
return F !== 0 && (
|
|
961
|
+
const F = m.filter((x) => !Reflect.has(x, "width")).length;
|
|
962
|
+
return F !== 0 && (c += F * g), p && (c += p), c;
|
|
951
963
|
});
|
|
952
964
|
return { getScrollRef: w(() => {
|
|
953
965
|
var p;
|
|
954
|
-
const { xl:
|
|
955
|
-
return h(
|
|
956
|
-
y: ((p = h(e)) == null ? void 0 : p.y) || (
|
|
957
|
-
} : h(t) ?
|
|
958
|
-
}), breakpoint:
|
|
966
|
+
const { xl: c } = r.value;
|
|
967
|
+
return h(u) ? {} : h(e) && Object.keys(h(e)).length ? h(e) : h(n) ? {
|
|
968
|
+
y: ((p = h(e)) == null ? void 0 : p.y) || (c ? 400 : 235)
|
|
969
|
+
} : h(t) ? v.value ? {} : te(v.value) ? { x: h(y) } : {} : {};
|
|
970
|
+
}), breakpoint: v };
|
|
959
971
|
}
|
|
960
972
|
const ft = Symbol("table-context"), Ma = (e = Symbol(), o) => zt(e, o || {}), ka = (e) => {
|
|
961
973
|
Et(ft, e);
|
|
@@ -966,22 +978,22 @@ function Ea(e, o) {
|
|
|
966
978
|
n();
|
|
967
979
|
});
|
|
968
980
|
function n() {
|
|
969
|
-
Object.keys(e).map((
|
|
970
|
-
r
|
|
981
|
+
Object.keys(e).map((r) => {
|
|
982
|
+
u(r, e[r]);
|
|
971
983
|
});
|
|
972
|
-
const l = o.find((
|
|
973
|
-
l &&
|
|
984
|
+
const l = o.find((r) => r.valueType === "dateRange");
|
|
985
|
+
l && u(l.name || "", e[l.rangeStartName || "start"] ? [
|
|
974
986
|
e[l.rangeStartName || "start"],
|
|
975
987
|
e[l.rangeEndName || "end"]
|
|
976
988
|
] : []);
|
|
977
989
|
}
|
|
978
|
-
function
|
|
979
|
-
t[l] =
|
|
990
|
+
function u(l, r) {
|
|
991
|
+
t[l] = r;
|
|
980
992
|
}
|
|
981
993
|
return {
|
|
982
994
|
formState: t,
|
|
983
995
|
resetFormState: n,
|
|
984
|
-
changeFormState:
|
|
996
|
+
changeFormState: u
|
|
985
997
|
};
|
|
986
998
|
}
|
|
987
999
|
const za = (e) => ({
|
|
@@ -1042,18 +1054,18 @@ const za = (e) => ({
|
|
|
1042
1054
|
expose: n
|
|
1043
1055
|
}) {
|
|
1044
1056
|
const {
|
|
1045
|
-
wrapSSR:
|
|
1057
|
+
wrapSSR: u,
|
|
1046
1058
|
hashId: l
|
|
1047
|
-
} = Pe("ProTableForm", [za], e.prefixCls),
|
|
1048
|
-
formState:
|
|
1059
|
+
} = Pe("ProTableForm", [za], e.prefixCls), r = Ka(), {
|
|
1060
|
+
formState: s,
|
|
1049
1061
|
resetFormState: T,
|
|
1050
|
-
changeFormState:
|
|
1051
|
-
} = Ea(e.defaultParams || {}, e.searchMap || []),
|
|
1062
|
+
changeFormState: v
|
|
1063
|
+
} = Ea(e.defaultParams || {}, e.searchMap || []), y = O(!1), d = w(() => {
|
|
1052
1064
|
var a;
|
|
1053
1065
|
return !!((a = e.search) != null && a.showSearch);
|
|
1054
|
-
}),
|
|
1066
|
+
}), c = w(() => {
|
|
1055
1067
|
var a, b;
|
|
1056
|
-
return ((a = e.search) == null ? void 0 : a.showReset) === void 0 ?
|
|
1068
|
+
return ((a = e.search) == null ? void 0 : a.showReset) === void 0 ? d.value : (b = e.search) == null ? void 0 : b.showReset;
|
|
1057
1069
|
}), p = [{
|
|
1058
1070
|
value: "xxl",
|
|
1059
1071
|
span: 4
|
|
@@ -1072,28 +1084,28 @@ const za = (e) => ({
|
|
|
1072
1084
|
}, {
|
|
1073
1085
|
value: "xs",
|
|
1074
1086
|
span: 1
|
|
1075
|
-
}],
|
|
1087
|
+
}], g = w(() => {
|
|
1076
1088
|
var a;
|
|
1077
|
-
return
|
|
1089
|
+
return m((a = e.search) == null ? void 0 : a.span);
|
|
1078
1090
|
});
|
|
1079
|
-
|
|
1091
|
+
U(() => {
|
|
1080
1092
|
var a;
|
|
1081
1093
|
return (a = e.search) == null ? void 0 : a.defaultCollapsed;
|
|
1082
1094
|
}, (a) => {
|
|
1083
|
-
|
|
1095
|
+
y.value = y.value || !!a;
|
|
1084
1096
|
});
|
|
1085
|
-
const
|
|
1097
|
+
const m = (a) => {
|
|
1086
1098
|
let b = 4;
|
|
1087
1099
|
for (let P = 0; P < p.length; P += 1) {
|
|
1088
1100
|
const $ = p[P].value;
|
|
1089
|
-
if (
|
|
1101
|
+
if (r.value[$]) {
|
|
1090
1102
|
b = (a == null ? void 0 : a[$]) || (e.modal ? 3 : p[P].span);
|
|
1091
1103
|
break;
|
|
1092
1104
|
}
|
|
1093
1105
|
}
|
|
1094
1106
|
return b;
|
|
1095
1107
|
}, S = (a) => {
|
|
1096
|
-
|
|
1108
|
+
y.value = a;
|
|
1097
1109
|
}, F = (a, b, P) => (a + 1) % b === 0 ? {
|
|
1098
1110
|
...P,
|
|
1099
1111
|
marginRight: 0
|
|
@@ -1104,51 +1116,51 @@ const za = (e) => ({
|
|
|
1104
1116
|
var P, $, N;
|
|
1105
1117
|
switch (b.valueType) {
|
|
1106
1118
|
case "text":
|
|
1107
|
-
|
|
1119
|
+
v(b.name || "", a || b.initialValue || "");
|
|
1108
1120
|
break;
|
|
1109
1121
|
case "select":
|
|
1110
|
-
|
|
1122
|
+
v(b.name || "", a || a === 0 ? a : b.initialValue || void 0);
|
|
1111
1123
|
break;
|
|
1112
1124
|
case "treeSelect":
|
|
1113
|
-
|
|
1125
|
+
v(b.name || "", a || a === 0 ? a : b.initialValue || ((P = b.field) != null && P.treeCheckable || ($ = b.field) != null && $.multiple ? [] : null));
|
|
1114
1126
|
break;
|
|
1115
1127
|
case "date":
|
|
1116
|
-
|
|
1128
|
+
v(b.name || "", a ? W(a).format(b.valueFormat || "YYYY-MM-DD") : b.initialValue || null);
|
|
1117
1129
|
break;
|
|
1118
1130
|
case "dateMonth":
|
|
1119
|
-
|
|
1131
|
+
v(b.name || "", a ? W(a).format("YYYY-MM") : b.initialValue || null);
|
|
1120
1132
|
break;
|
|
1121
1133
|
case "dateRange":
|
|
1122
|
-
|
|
1134
|
+
v(b.name || "", a && a.length > 0 ? [W(a[0]).format(b.valueFormat || "YYYY-MM-DD"), W(a[1]).format(b.valueFormat || "YYYY-MM-DD")] : b.initialValue || null);
|
|
1123
1135
|
break;
|
|
1124
1136
|
case "time":
|
|
1125
|
-
|
|
1137
|
+
v(b.name || "", a ? W(a).format(b.valueFormat || "HH:mm:ss") : b.initialValue || null);
|
|
1126
1138
|
break;
|
|
1127
1139
|
}
|
|
1128
1140
|
(N = e.search) != null && N.showSearch || b.valueType === "text" || (b.valueType === "treeSelect" || b.valueType, B());
|
|
1129
1141
|
}, I = () => {
|
|
1130
|
-
const a =
|
|
1131
|
-
return b && (a[b.name] =
|
|
1142
|
+
const a = X(s), b = e.searchMap.find((N) => N.valueType === "text") || "", P = e.searchMap.find((N) => N.valueType === "dateRange") || "", $ = e.searchMap.find((N) => N.valueType === "treeSelect") || "";
|
|
1143
|
+
return b && (a[b.name] = s[b.name] || b.initialValue || ""), P && (a[P.rangeStartName || "start"] = a[P.name] ? a[P.name][0] : "", a[P.rangeEndName || "end"] = a[P.name] ? a[P.name][1] : "", delete a[P.name]), $ && (Ke(s[$.name]) && (a[$.name] = s[$.name].length ? s[$.name].map((N) => N[$.valueKey === "text" ? "label" : "value"]).join() : ""), $ && Ke(a[$.name]) && (a[$.name] = a[$.name].length ? a[$.name].map((N) => N[$.valueKey === "text" ? "label" : "value"]) : "")), a;
|
|
1132
1144
|
}, B = (a = !1, b) => {
|
|
1133
1145
|
Kt(() => {
|
|
1134
|
-
(!
|
|
1146
|
+
(!d.value || a) && o("search", I(), !!b);
|
|
1135
1147
|
});
|
|
1136
|
-
},
|
|
1148
|
+
}, _ = (a = !0) => {
|
|
1137
1149
|
T(), B(!0, a);
|
|
1138
1150
|
};
|
|
1139
1151
|
n({
|
|
1140
1152
|
getFormState: () => I(),
|
|
1141
|
-
resetForm:
|
|
1153
|
+
resetForm: _
|
|
1142
1154
|
});
|
|
1143
|
-
const
|
|
1144
|
-
default: () => [
|
|
1145
|
-
onClick: () =>
|
|
1155
|
+
const M = () => (d.value || c.value) && i(le, null, {
|
|
1156
|
+
default: () => [c.value && i(tt, {
|
|
1157
|
+
onClick: () => _()
|
|
1146
1158
|
}, {
|
|
1147
1159
|
default: () => {
|
|
1148
1160
|
var a;
|
|
1149
1161
|
return [((a = e.search) == null ? void 0 : a.resetText) || "重置"];
|
|
1150
1162
|
}
|
|
1151
|
-
}),
|
|
1163
|
+
}), d.value && i(tt, {
|
|
1152
1164
|
loading: e.loading,
|
|
1153
1165
|
type: "primary",
|
|
1154
1166
|
onClick: () => B(!0)
|
|
@@ -1162,124 +1174,124 @@ const za = (e) => ({
|
|
|
1162
1174
|
formItemStyle: a,
|
|
1163
1175
|
advanced: b,
|
|
1164
1176
|
showAdvanced: P = !0
|
|
1165
|
-
}) =>
|
|
1177
|
+
}) => i("div", {
|
|
1166
1178
|
style: a,
|
|
1167
1179
|
class: `${e.prefixCls}-form-collapse-button ${l.value}`
|
|
1168
|
-
}, [
|
|
1180
|
+
}, [i(le, {
|
|
1169
1181
|
size: 16
|
|
1170
1182
|
}, {
|
|
1171
1183
|
default: () => {
|
|
1172
1184
|
var $, N;
|
|
1173
|
-
return [
|
|
1185
|
+
return [M(), P && i("span", {
|
|
1174
1186
|
class: `${e.prefixCls}-a ${l.value}`,
|
|
1175
1187
|
onClick: () => S(!b)
|
|
1176
|
-
}, [b ? "收起" : "展开", ($ = e.search) != null && $.collapseRender ? (N = e.search) == null ? void 0 : N.collapseRender() : b ?
|
|
1188
|
+
}, [b ? "收起" : "展开", ($ = e.search) != null && $.collapseRender ? (N = e.search) == null ? void 0 : N.collapseRender() : b ? i(ra, null, null) : i(ca, null, null)])];
|
|
1177
1189
|
}
|
|
1178
|
-
})]),
|
|
1190
|
+
})]), z = (a) => {
|
|
1179
1191
|
var $, N;
|
|
1180
1192
|
let b;
|
|
1181
|
-
const P =
|
|
1193
|
+
const P = d.value ? at : at.Search;
|
|
1182
1194
|
switch (a.valueType) {
|
|
1183
1195
|
case "text":
|
|
1184
|
-
b =
|
|
1196
|
+
b = i(P, q({
|
|
1185
1197
|
style: {
|
|
1186
1198
|
width: "100%"
|
|
1187
1199
|
},
|
|
1188
|
-
value:
|
|
1200
|
+
value: s[a.name],
|
|
1189
1201
|
placeholder: a.placeholder || "请输入",
|
|
1190
1202
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1191
|
-
onChange: (
|
|
1192
|
-
onSearch: (
|
|
1203
|
+
onChange: (f) => x(f.target.value, a),
|
|
1204
|
+
onSearch: (f) => B()
|
|
1193
1205
|
}, a.field || {}), null);
|
|
1194
1206
|
break;
|
|
1195
1207
|
case "select":
|
|
1196
|
-
b =
|
|
1208
|
+
b = i(Zt, q({
|
|
1197
1209
|
style: {
|
|
1198
1210
|
width: "100%"
|
|
1199
1211
|
},
|
|
1200
|
-
value: a.loading ? void 0 :
|
|
1212
|
+
value: a.loading ? void 0 : s[a.name],
|
|
1201
1213
|
optionFilterProp: "label",
|
|
1202
1214
|
placeholder: a.placeholder || "请选择",
|
|
1203
1215
|
showSearch: a.showSearch,
|
|
1204
1216
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1205
|
-
getPopupContainer: (
|
|
1206
|
-
notFoundContent: a.loading === void 0 ? void 0 : a.loading ?
|
|
1217
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1218
|
+
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1207
1219
|
size: "small"
|
|
1208
1220
|
}, null) : void 0,
|
|
1209
|
-
onChange: (
|
|
1210
|
-
options: ($ = a == null ? void 0 : a.valueEnum) == null ? void 0 : $.map((
|
|
1211
|
-
label:
|
|
1212
|
-
value:
|
|
1221
|
+
onChange: (f) => x(f, a),
|
|
1222
|
+
options: ($ = a == null ? void 0 : a.valueEnum) == null ? void 0 : $.map((f) => ({
|
|
1223
|
+
label: f.text,
|
|
1224
|
+
value: f.value
|
|
1213
1225
|
}))
|
|
1214
1226
|
}, a.field || {}), null);
|
|
1215
1227
|
break;
|
|
1216
1228
|
case "treeSelect":
|
|
1217
|
-
b =
|
|
1229
|
+
b = i(Qt, q({
|
|
1218
1230
|
style: {
|
|
1219
1231
|
width: "100%"
|
|
1220
1232
|
},
|
|
1221
|
-
value:
|
|
1233
|
+
value: s[a.name],
|
|
1222
1234
|
placeholder: a.placeholder || "请选择",
|
|
1223
1235
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1224
1236
|
treeData: a.valueEnum,
|
|
1225
|
-
getPopupContainer: (
|
|
1226
|
-
notFoundContent: a.loading === void 0 ? void 0 : a.loading ?
|
|
1237
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1238
|
+
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1227
1239
|
size: "small"
|
|
1228
1240
|
}, null) : void 0,
|
|
1229
|
-
onChange: (
|
|
1241
|
+
onChange: (f) => x(f, a)
|
|
1230
1242
|
}, a.field || {}), null);
|
|
1231
1243
|
break;
|
|
1232
1244
|
case "date":
|
|
1233
|
-
b =
|
|
1245
|
+
b = i(rt, q({
|
|
1234
1246
|
style: {
|
|
1235
1247
|
width: "100%"
|
|
1236
1248
|
},
|
|
1237
|
-
value:
|
|
1238
|
-
getPopupContainer: (
|
|
1249
|
+
value: s[a.name] ? W(s[a.name], a.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1250
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1239
1251
|
placeholder: a.placeholder || "请选择",
|
|
1240
1252
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1241
1253
|
format: a.valueFormat || "YYYY-MM-DD",
|
|
1242
1254
|
showTime: a.showTime,
|
|
1243
1255
|
showToday: a.showToday || !0,
|
|
1244
|
-
onChange: (
|
|
1256
|
+
onChange: (f) => x(f, a)
|
|
1245
1257
|
}, a.field || {}), null);
|
|
1246
1258
|
break;
|
|
1247
1259
|
case "dateMonth":
|
|
1248
|
-
b =
|
|
1260
|
+
b = i(Ya, q({
|
|
1249
1261
|
style: {
|
|
1250
1262
|
width: "100%"
|
|
1251
1263
|
},
|
|
1252
|
-
value:
|
|
1253
|
-
getPopupContainer: (
|
|
1264
|
+
value: s[a.name] ? W(s[a.name], a.valueFormat || "YYYY-MM") : void 0,
|
|
1265
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1254
1266
|
placeholder: a.placeholder || "请选择",
|
|
1255
|
-
onChange: (
|
|
1267
|
+
onChange: (f) => x(f, a)
|
|
1256
1268
|
}, a.field || {}), null);
|
|
1257
1269
|
break;
|
|
1258
1270
|
case "dateRange":
|
|
1259
|
-
b =
|
|
1271
|
+
b = i(La, q({
|
|
1260
1272
|
style: {
|
|
1261
1273
|
width: "100%"
|
|
1262
1274
|
},
|
|
1263
|
-
value: (N =
|
|
1264
|
-
getPopupContainer: (
|
|
1275
|
+
value: (N = s[a.name]) != null && N.length ? [W(s[a.name][0], a.valueFormat || "YYYY-MM-DD HH:mm:ss"), W(s[a.name][1], a.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1276
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1265
1277
|
placeholder: a.placeholder || ["开始日期", "结束日期"],
|
|
1266
1278
|
format: a.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
1267
1279
|
showTime: a.showTime,
|
|
1268
|
-
onChange: (
|
|
1280
|
+
onChange: (f) => x(f, a)
|
|
1269
1281
|
}, a.field || {}), null);
|
|
1270
1282
|
break;
|
|
1271
1283
|
case "time":
|
|
1272
|
-
b =
|
|
1284
|
+
b = i(Jt, q({
|
|
1273
1285
|
style: {
|
|
1274
1286
|
width: "100%"
|
|
1275
1287
|
},
|
|
1276
|
-
value:
|
|
1277
|
-
getPopupContainer: (
|
|
1288
|
+
value: s[a.name] ? W(s[a.name], a.valueFormat || "HH:mm:ss") : void 0,
|
|
1289
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1278
1290
|
placeholder: a.placeholder || "请选择",
|
|
1279
1291
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1280
1292
|
use12Hours: a.use12Hours,
|
|
1281
1293
|
format: a.valueFormat || "HH:mm:ss",
|
|
1282
|
-
onChange: (
|
|
1294
|
+
onChange: (f) => x(f, a)
|
|
1283
1295
|
}, a.field || {}), null);
|
|
1284
1296
|
break;
|
|
1285
1297
|
}
|
|
@@ -1287,57 +1299,57 @@ const za = (e) => ({
|
|
|
1287
1299
|
}, D = ({
|
|
1288
1300
|
formItemStyle: a,
|
|
1289
1301
|
item: b
|
|
1290
|
-
}) =>
|
|
1302
|
+
}) => i("div", {
|
|
1291
1303
|
class: `${e.prefixCls}-form-item`,
|
|
1292
1304
|
style: a
|
|
1293
|
-
}, [
|
|
1294
|
-
default: () => [b.__v_isVNode ? b :
|
|
1305
|
+
}, [i(et.Item, null, {
|
|
1306
|
+
default: () => [b.__v_isVNode ? b : z(b)]
|
|
1295
1307
|
})]), oe = () => {
|
|
1296
1308
|
var b;
|
|
1297
1309
|
const a = [...e.searchMap, ...((b = t.default) == null ? void 0 : b.call(t)) || []];
|
|
1298
1310
|
return a.map((P, $) => {
|
|
1299
1311
|
const N = {
|
|
1300
|
-
width: `${(100 - (
|
|
1301
|
-
},
|
|
1302
|
-
return a.length <
|
|
1303
|
-
formItemStyle:
|
|
1312
|
+
width: `${(100 - (g.value - 1) * 2) / g.value}%`
|
|
1313
|
+
}, f = F($, g.value, N);
|
|
1314
|
+
return a.length < g.value || y.value ? i(Ie, null, [D({
|
|
1315
|
+
formItemStyle: f,
|
|
1304
1316
|
item: P
|
|
1305
1317
|
}), $ === a.length - 1 && A({
|
|
1306
1318
|
formItemStyle: {
|
|
1307
1319
|
flex: 1,
|
|
1308
1320
|
justifyContent: "flex-end"
|
|
1309
1321
|
},
|
|
1310
|
-
advanced:
|
|
1311
|
-
showAdvanced:
|
|
1312
|
-
})]) :
|
|
1313
|
-
formItemStyle:
|
|
1322
|
+
advanced: y.value,
|
|
1323
|
+
showAdvanced: y.value
|
|
1324
|
+
})]) : i(Ie, null, [$ < g.value - 1 && D({
|
|
1325
|
+
formItemStyle: f,
|
|
1314
1326
|
item: P
|
|
1315
|
-
}), $ ===
|
|
1316
|
-
formItemStyle:
|
|
1327
|
+
}), $ === g.value - 1 && g.value - 1 === 0 && D({
|
|
1328
|
+
formItemStyle: f,
|
|
1317
1329
|
item: P
|
|
1318
|
-
}), $ ===
|
|
1330
|
+
}), $ === g.value - 1 && A({
|
|
1319
1331
|
formItemStyle: {
|
|
1320
1332
|
flex: 1,
|
|
1321
1333
|
justifyContent: "flex-end"
|
|
1322
1334
|
},
|
|
1323
1335
|
advanced: !1,
|
|
1324
|
-
showAdvanced: a.length >=
|
|
1336
|
+
showAdvanced: a.length >= g.value
|
|
1325
1337
|
})]);
|
|
1326
1338
|
});
|
|
1327
1339
|
};
|
|
1328
1340
|
return () => {
|
|
1329
1341
|
var a, b;
|
|
1330
|
-
return
|
|
1342
|
+
return u(i("div", {
|
|
1331
1343
|
class: {
|
|
1332
1344
|
[`${l.value}`]: !0,
|
|
1333
1345
|
[`${h(e.prefixCls)}-search`]: !0,
|
|
1334
1346
|
[`${(a = e.search) == null ? void 0 : a.className}`]: (b = e.search) == null ? void 0 : b.className
|
|
1335
1347
|
}
|
|
1336
|
-
}, [
|
|
1348
|
+
}, [i(et, {
|
|
1337
1349
|
class: `${h(e.prefixCls)}-form ${l.value}`,
|
|
1338
1350
|
layout: "horizontal"
|
|
1339
1351
|
}, {
|
|
1340
|
-
default: () => [
|
|
1352
|
+
default: () => [i("div", {
|
|
1341
1353
|
class: `${h(e.prefixCls)}-form-container ${l.value}`
|
|
1342
1354
|
}, [oe()])]
|
|
1343
1355
|
})]));
|
|
@@ -1348,8 +1360,8 @@ ht.inheritAttrs = !1;
|
|
|
1348
1360
|
function Aa(e, o) {
|
|
1349
1361
|
const t = Ae({}, e);
|
|
1350
1362
|
for (let n = 0; n < o.length; n += 1) {
|
|
1351
|
-
const
|
|
1352
|
-
delete t[
|
|
1363
|
+
const u = o[n];
|
|
1364
|
+
delete t[u];
|
|
1353
1365
|
}
|
|
1354
1366
|
return t;
|
|
1355
1367
|
}
|
|
@@ -1443,34 +1455,34 @@ const be = (e) => {
|
|
|
1443
1455
|
treeKey: t,
|
|
1444
1456
|
fixed: n
|
|
1445
1457
|
}, {
|
|
1446
|
-
slots:
|
|
1458
|
+
slots: u
|
|
1447
1459
|
}) => {
|
|
1448
1460
|
const {
|
|
1449
1461
|
cacheColumns: l,
|
|
1450
|
-
settingsAction:
|
|
1462
|
+
settingsAction: r
|
|
1451
1463
|
} = de();
|
|
1452
|
-
return o ?
|
|
1464
|
+
return o ? i(Z, {
|
|
1453
1465
|
title: e
|
|
1454
1466
|
}, {
|
|
1455
1467
|
default: () => {
|
|
1456
|
-
var
|
|
1457
|
-
return [
|
|
1468
|
+
var s;
|
|
1469
|
+
return [i("span", {
|
|
1458
1470
|
onClick: (T) => {
|
|
1459
|
-
var p,
|
|
1471
|
+
var p, g;
|
|
1460
1472
|
T.stopPropagation(), T.preventDefault();
|
|
1461
|
-
const
|
|
1462
|
-
if (typeof
|
|
1473
|
+
const v = ((p = h(l).find((m) => m.uuid === t)) == null ? void 0 : p.key) || "", y = (r == null ? void 0 : r.columnsMap[v]) || {};
|
|
1474
|
+
if (typeof y.disable == "boolean" ? y.disable : (g = y.disable) == null ? void 0 : g.icon)
|
|
1463
1475
|
return;
|
|
1464
|
-
const
|
|
1465
|
-
...
|
|
1466
|
-
[
|
|
1467
|
-
...
|
|
1476
|
+
const c = {
|
|
1477
|
+
...r == null ? void 0 : r.columnsMap,
|
|
1478
|
+
[v]: {
|
|
1479
|
+
...y,
|
|
1468
1480
|
fixed: n
|
|
1469
1481
|
}
|
|
1470
1482
|
};
|
|
1471
|
-
|
|
1483
|
+
r == null || r.setColumnsMap(c, "fixed");
|
|
1472
1484
|
}
|
|
1473
|
-
}, [(
|
|
1485
|
+
}, [(s = u.default) == null ? void 0 : s.call(u)])];
|
|
1474
1486
|
}
|
|
1475
1487
|
}) : null;
|
|
1476
1488
|
}, Ha = /* @__PURE__ */ ae({
|
|
@@ -1486,40 +1498,40 @@ const be = (e) => {
|
|
|
1486
1498
|
const {
|
|
1487
1499
|
cacheColumns: o
|
|
1488
1500
|
} = de(), t = w(() => {
|
|
1489
|
-
var
|
|
1490
|
-
return ((
|
|
1501
|
+
var u;
|
|
1502
|
+
return ((u = o.value.find((l) => l.uuid === e.treeKey)) == null ? void 0 : u.key) || "";
|
|
1491
1503
|
}), n = w(() => t.value === "action" && e.autoScroll);
|
|
1492
1504
|
return () => {
|
|
1493
|
-
const
|
|
1505
|
+
const u = i("span", {
|
|
1494
1506
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
1495
|
-
}, [
|
|
1507
|
+
}, [i(je, {
|
|
1496
1508
|
treeKey: e.treeKey || "",
|
|
1497
1509
|
fixed: "left",
|
|
1498
1510
|
title: "固定在列首",
|
|
1499
1511
|
show: e.fixed !== "left" && !n.value
|
|
1500
1512
|
}, {
|
|
1501
|
-
default: () => [
|
|
1502
|
-
}),
|
|
1513
|
+
default: () => [i(da, null, null)]
|
|
1514
|
+
}), i(je, {
|
|
1503
1515
|
treeKey: e.treeKey || "",
|
|
1504
1516
|
fixed: void 0,
|
|
1505
1517
|
title: "不固定",
|
|
1506
1518
|
show: !!e.fixed && !n.value
|
|
1507
1519
|
}, {
|
|
1508
|
-
default: () => [
|
|
1509
|
-
}),
|
|
1520
|
+
default: () => [i(fa, null, null)]
|
|
1521
|
+
}), i(je, {
|
|
1510
1522
|
treeKey: e.treeKey || "",
|
|
1511
1523
|
fixed: "right",
|
|
1512
1524
|
title: "固定在列尾",
|
|
1513
1525
|
show: e.fixed !== "right"
|
|
1514
1526
|
}, {
|
|
1515
|
-
default: () => [
|
|
1527
|
+
default: () => [i(ha, null, null)]
|
|
1516
1528
|
})]);
|
|
1517
|
-
return
|
|
1529
|
+
return i("span", {
|
|
1518
1530
|
class: [`${e.className}-list-item`, e.hashId],
|
|
1519
1531
|
key: e.treeKey
|
|
1520
|
-
}, [
|
|
1532
|
+
}, [i("div", {
|
|
1521
1533
|
class: [`${e.className}-list-item-title`, e.hashId]
|
|
1522
|
-
}, [e.title]),
|
|
1534
|
+
}, [e.title]), u]);
|
|
1523
1535
|
};
|
|
1524
1536
|
}
|
|
1525
1537
|
}), Me = /* @__PURE__ */ ae({
|
|
@@ -1537,104 +1549,104 @@ const be = (e) => {
|
|
|
1537
1549
|
}
|
|
1538
1550
|
},
|
|
1539
1551
|
setup(e) {
|
|
1540
|
-
const o = O(Ye().uuid(15)), t = w(() => e.list && e.list.length > 0), n = O([]),
|
|
1552
|
+
const o = O(Ye().uuid(15)), t = w(() => e.list && e.list.length > 0), n = O([]), u = O([]), {
|
|
1541
1553
|
cacheColumns: l,
|
|
1542
|
-
slots:
|
|
1543
|
-
settingsAction:
|
|
1544
|
-
} = de(), T = (
|
|
1545
|
-
key:
|
|
1546
|
-
children:
|
|
1554
|
+
slots: r,
|
|
1555
|
+
settingsAction: s
|
|
1556
|
+
} = de(), T = (c, p) => c.map(({
|
|
1557
|
+
key: g,
|
|
1558
|
+
children: m,
|
|
1547
1559
|
uuid: S,
|
|
1548
1560
|
...F
|
|
1549
1561
|
}) => {
|
|
1550
|
-
var
|
|
1551
|
-
const x = (
|
|
1562
|
+
var _;
|
|
1563
|
+
const x = (s == null ? void 0 : s.columnsMap[g || "null"]) || {
|
|
1552
1564
|
show: !0
|
|
1553
1565
|
};
|
|
1554
1566
|
let I = !1;
|
|
1555
|
-
x.show !== !1 && (p == null ? void 0 : p.show) !== !1 && !
|
|
1567
|
+
x.show !== !1 && (p == null ? void 0 : p.show) !== !1 && !m && (I = !0);
|
|
1556
1568
|
const B = {
|
|
1557
1569
|
key: S || "",
|
|
1558
1570
|
...Aa(F, ["dataIndex"]),
|
|
1559
1571
|
checked: I,
|
|
1560
1572
|
selectable: !1,
|
|
1561
1573
|
disabled: x.disable === !0,
|
|
1562
|
-
disableCheckbox: typeof x.disable == "boolean" ? x.disable : (
|
|
1574
|
+
disableCheckbox: typeof x.disable == "boolean" ? x.disable : (_ = x.disable) == null ? void 0 : _.checkbox,
|
|
1563
1575
|
isLeaf: !0
|
|
1564
1576
|
};
|
|
1565
|
-
return
|
|
1577
|
+
return m && (B.children = T(m, x)), B;
|
|
1566
1578
|
});
|
|
1567
1579
|
fe(() => {
|
|
1568
|
-
const
|
|
1569
|
-
n.value =
|
|
1580
|
+
const c = T(e.list || []);
|
|
1581
|
+
n.value = c, u.value = c.filter((p) => p.checked).map((p) => p.key), (s == null ? void 0 : s.operationType.value) === "fixed" && (o.value = Ye().uuid(15));
|
|
1570
1582
|
});
|
|
1571
|
-
const
|
|
1572
|
-
var A,
|
|
1573
|
-
const
|
|
1574
|
-
...
|
|
1575
|
-
}, x = [...
|
|
1583
|
+
const v = be((c, p, g) => {
|
|
1584
|
+
var A, z;
|
|
1585
|
+
const m = ((A = h(l).find((D) => D.uuid === c)) == null ? void 0 : A.key) || "", S = ((z = h(l).find((D) => D.uuid === p)) == null ? void 0 : z.key) || "", F = {
|
|
1586
|
+
...s == null ? void 0 : s.columnsMap
|
|
1587
|
+
}, x = [...s.sortKeyColumns.value], I = x.findIndex((D) => D === m), B = x.findIndex((D) => D === S), _ = g > I;
|
|
1576
1588
|
if (I < 0)
|
|
1577
1589
|
return;
|
|
1578
|
-
const
|
|
1579
|
-
x.splice(I, 1),
|
|
1590
|
+
const M = x[I];
|
|
1591
|
+
x.splice(I, 1), g === 0 ? x.unshift(M) : x.splice(_ ? B : B + 1, 0, M), x.forEach((D, oe) => {
|
|
1580
1592
|
F[D] = {
|
|
1581
1593
|
...F[D] || {},
|
|
1582
1594
|
order: oe
|
|
1583
1595
|
};
|
|
1584
|
-
}),
|
|
1585
|
-
}),
|
|
1596
|
+
}), s == null || s.setColumnsMap(F, "drop"), s == null || s.setSortKeyColumns(x);
|
|
1597
|
+
}), y = be((c) => {
|
|
1586
1598
|
var x;
|
|
1587
|
-
const p =
|
|
1588
|
-
...(
|
|
1599
|
+
const p = c.node.key, g = ((x = h(l).find((I) => I.uuid === p)) == null ? void 0 : x.key) || "", S = {
|
|
1600
|
+
...(s == null ? void 0 : s.columnsMap[g]) || {}
|
|
1589
1601
|
};
|
|
1590
|
-
S.show =
|
|
1602
|
+
S.show = c.checked;
|
|
1591
1603
|
const F = {
|
|
1592
|
-
...
|
|
1593
|
-
[
|
|
1604
|
+
...s == null ? void 0 : s.columnsMap,
|
|
1605
|
+
[g]: S
|
|
1594
1606
|
};
|
|
1595
|
-
|
|
1596
|
-
}),
|
|
1597
|
-
const p = h(l).find((
|
|
1598
|
-
return
|
|
1607
|
+
s == null || s.setColumnsMap(F, "show");
|
|
1608
|
+
}), d = (c) => {
|
|
1609
|
+
const p = h(l).find((g) => g.uuid === c.key);
|
|
1610
|
+
return c.title || Yt(r, "headerCell", {
|
|
1599
1611
|
title: p.title,
|
|
1600
1612
|
column: p
|
|
1601
1613
|
}, () => [p.title]);
|
|
1602
1614
|
};
|
|
1603
1615
|
return () => {
|
|
1604
|
-
var
|
|
1605
|
-
return t.value ?
|
|
1616
|
+
var c, p;
|
|
1617
|
+
return t.value ? i(Ie, null, [e.showTitle && i("span", {
|
|
1606
1618
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1607
|
-
}, [e.title]),
|
|
1619
|
+
}, [e.title]), i(aa, {
|
|
1608
1620
|
key: o.value,
|
|
1609
|
-
draggable: e.draggable && !!((
|
|
1621
|
+
draggable: e.draggable && !!((c = n.value) != null && c.length) && ((p = n.value) == null ? void 0 : p.length) > 1,
|
|
1610
1622
|
checkable: e.checkable,
|
|
1611
1623
|
blockNode: !0,
|
|
1612
1624
|
showLine: !1,
|
|
1613
|
-
checkedKeys:
|
|
1625
|
+
checkedKeys: u.value,
|
|
1614
1626
|
height: 280,
|
|
1615
|
-
onDrop: (
|
|
1616
|
-
const
|
|
1627
|
+
onDrop: (g) => {
|
|
1628
|
+
const m = g.node.key, S = g.dragNode.key, {
|
|
1617
1629
|
dropPosition: F,
|
|
1618
1630
|
dropToGap: x
|
|
1619
|
-
} =
|
|
1620
|
-
|
|
1631
|
+
} = g, I = F === -1 || !x ? F + 1 : F;
|
|
1632
|
+
v(S, m, I);
|
|
1621
1633
|
},
|
|
1622
|
-
onCheck: (
|
|
1634
|
+
onCheck: (g, m) => y(m),
|
|
1623
1635
|
treeData: n.value
|
|
1624
1636
|
}, {
|
|
1625
|
-
title: (
|
|
1637
|
+
title: (g) => {
|
|
1626
1638
|
var S;
|
|
1627
|
-
const
|
|
1628
|
-
...
|
|
1639
|
+
const m = {
|
|
1640
|
+
...g,
|
|
1629
1641
|
children: void 0,
|
|
1630
|
-
title:
|
|
1631
|
-
autoScroll: (S =
|
|
1642
|
+
title: d(g),
|
|
1643
|
+
autoScroll: (S = s == null ? void 0 : s.autoScroll) == null ? void 0 : S.value
|
|
1632
1644
|
};
|
|
1633
|
-
return
|
|
1645
|
+
return i(Ha, q({
|
|
1634
1646
|
hashId: e.hashId,
|
|
1635
1647
|
className: e.className
|
|
1636
|
-
},
|
|
1637
|
-
treeKey:
|
|
1648
|
+
}, m, {
|
|
1649
|
+
treeKey: m.key
|
|
1638
1650
|
}), null);
|
|
1639
1651
|
}
|
|
1640
1652
|
})]) : null;
|
|
@@ -1650,37 +1662,37 @@ const be = (e) => {
|
|
|
1650
1662
|
setup(e) {
|
|
1651
1663
|
const {
|
|
1652
1664
|
columns: o
|
|
1653
|
-
} = de(), t = O([]), n = O([]),
|
|
1654
|
-
|
|
1655
|
-
t.value = [], n.value = [],
|
|
1656
|
-
if (
|
|
1665
|
+
} = de(), t = O([]), n = O([]), u = O([]), l = O([]);
|
|
1666
|
+
U(() => o.value, (T) => {
|
|
1667
|
+
t.value = [], n.value = [], u.value = [], T.forEach((v) => {
|
|
1668
|
+
if (v.hideInSetting)
|
|
1657
1669
|
return;
|
|
1658
1670
|
const {
|
|
1659
|
-
fixed:
|
|
1660
|
-
show:
|
|
1661
|
-
uuid:
|
|
1662
|
-
} =
|
|
1663
|
-
if ((
|
|
1664
|
-
n.value.push(
|
|
1671
|
+
fixed: y,
|
|
1672
|
+
show: d,
|
|
1673
|
+
uuid: c
|
|
1674
|
+
} = v;
|
|
1675
|
+
if ((d || d === void 0) && c && l.value.push(c), y === "left") {
|
|
1676
|
+
n.value.push(v);
|
|
1665
1677
|
return;
|
|
1666
1678
|
}
|
|
1667
|
-
if (
|
|
1668
|
-
t.value.push(
|
|
1679
|
+
if (y === "right") {
|
|
1680
|
+
t.value.push(v);
|
|
1669
1681
|
return;
|
|
1670
1682
|
}
|
|
1671
|
-
|
|
1683
|
+
u.value.push(v);
|
|
1672
1684
|
});
|
|
1673
1685
|
}, {
|
|
1674
1686
|
immediate: !0
|
|
1675
1687
|
});
|
|
1676
|
-
const
|
|
1677
|
-
return () =>
|
|
1688
|
+
const r = w(() => t.value && t.value.length > 0), s = w(() => n.value && n.value.length > 0);
|
|
1689
|
+
return () => i("div", {
|
|
1678
1690
|
class: {
|
|
1679
1691
|
[`${e.hashId}`]: !0,
|
|
1680
1692
|
[`${e.className}-list`]: !0,
|
|
1681
|
-
[`${e.className}-list-group`]:
|
|
1693
|
+
[`${e.className}-list-group`]: r.value || s.value
|
|
1682
1694
|
}
|
|
1683
|
-
}, [
|
|
1695
|
+
}, [i(Me, {
|
|
1684
1696
|
title: "固定在左侧",
|
|
1685
1697
|
list: n.value,
|
|
1686
1698
|
keys: l.value,
|
|
@@ -1688,16 +1700,16 @@ const be = (e) => {
|
|
|
1688
1700
|
draggable: e.draggable,
|
|
1689
1701
|
checkable: e.checkable,
|
|
1690
1702
|
className: e.className
|
|
1691
|
-
}, null),
|
|
1692
|
-
list:
|
|
1703
|
+
}, null), i(Me, {
|
|
1704
|
+
list: u.value,
|
|
1693
1705
|
keys: l.value,
|
|
1694
1706
|
hashId: e.hashId,
|
|
1695
1707
|
draggable: e.draggable,
|
|
1696
1708
|
checkable: e.checkable,
|
|
1697
1709
|
title: "不固定",
|
|
1698
|
-
showTitle:
|
|
1710
|
+
showTitle: s.value || r.value,
|
|
1699
1711
|
className: e.className
|
|
1700
|
-
}, null),
|
|
1712
|
+
}, null), i(Me, {
|
|
1701
1713
|
title: "固定在右侧",
|
|
1702
1714
|
list: t.value,
|
|
1703
1715
|
keys: l.value,
|
|
@@ -1728,46 +1740,46 @@ const be = (e) => {
|
|
|
1728
1740
|
wrapSSR: t,
|
|
1729
1741
|
hashId: n
|
|
1730
1742
|
} = Pe("ColumnSetting", [Va], o), {
|
|
1731
|
-
columns:
|
|
1743
|
+
columns: u,
|
|
1732
1744
|
settingsAction: l
|
|
1733
|
-
} = de(),
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1736
|
-
key:
|
|
1745
|
+
} = de(), r = be((d = !0) => {
|
|
1746
|
+
const c = {}, p = (g) => {
|
|
1747
|
+
g.forEach(({
|
|
1748
|
+
key: m,
|
|
1737
1749
|
fixed: S,
|
|
1738
1750
|
index: F,
|
|
1739
1751
|
children: x
|
|
1740
1752
|
}) => {
|
|
1741
|
-
const I = ot(
|
|
1742
|
-
I && (
|
|
1743
|
-
show:
|
|
1753
|
+
const I = ot(m, F);
|
|
1754
|
+
I && (c[I] = {
|
|
1755
|
+
show: d,
|
|
1744
1756
|
fixed: S
|
|
1745
1757
|
}), x && p(x);
|
|
1746
1758
|
});
|
|
1747
1759
|
};
|
|
1748
|
-
p(
|
|
1749
|
-
}),
|
|
1750
|
-
|
|
1760
|
+
p(u.value), l == null || l.setColumnsMap(c, "show");
|
|
1761
|
+
}), s = be((d) => {
|
|
1762
|
+
d.target.checked ? r() : r(!1);
|
|
1751
1763
|
}), T = be(() => {
|
|
1752
1764
|
l == null || l.setColumnsMap(l == null ? void 0 : l.cacheColumnsMap, "fixed");
|
|
1753
|
-
}),
|
|
1765
|
+
}), v = w(() => (
|
|
1754
1766
|
// @ts-ignore
|
|
1755
|
-
Object.values(l == null ? void 0 : l.columnsMap).filter((
|
|
1756
|
-
)),
|
|
1757
|
-
return () => t(
|
|
1767
|
+
Object.values(l == null ? void 0 : l.columnsMap).filter((d) => !d || d.show === !1)
|
|
1768
|
+
)), y = w(() => h(v).length > 0 && h(v).length !== u.value.length);
|
|
1769
|
+
return () => t(i(ea, {
|
|
1758
1770
|
arrowPointAtCenter: !0,
|
|
1759
|
-
title:
|
|
1771
|
+
title: i("div", {
|
|
1760
1772
|
class: [`${o}-title`, n.value]
|
|
1761
|
-
}, [
|
|
1762
|
-
indeterminate:
|
|
1763
|
-
checked: h(
|
|
1764
|
-
onChange: (
|
|
1773
|
+
}, [i(ta, {
|
|
1774
|
+
indeterminate: y.value,
|
|
1775
|
+
checked: h(v).length === 0 && h(v).length !== u.value.length,
|
|
1776
|
+
onChange: (d) => s(d)
|
|
1765
1777
|
}, {
|
|
1766
1778
|
default: () => [pe("列展示")]
|
|
1767
|
-
}), e.checkedReset ?
|
|
1779
|
+
}), e.checkedReset ? i("a", {
|
|
1768
1780
|
onClick: T,
|
|
1769
1781
|
class: [`${o}-action-rest-button`, n.value]
|
|
1770
|
-
}, [pe("重置")]) : null, e != null && e.extra ?
|
|
1782
|
+
}, [pe("重置")]) : null, e != null && e.extra ? i(le, {
|
|
1771
1783
|
size: 12,
|
|
1772
1784
|
align: "center"
|
|
1773
1785
|
}, {
|
|
@@ -1776,17 +1788,17 @@ const be = (e) => {
|
|
|
1776
1788
|
overlayClassName: `${o}-overlay ${n.value}`,
|
|
1777
1789
|
trigger: "click",
|
|
1778
1790
|
placement: "bottomRight",
|
|
1779
|
-
content:
|
|
1791
|
+
content: i(Wa, {
|
|
1780
1792
|
hashId: n.value,
|
|
1781
1793
|
checkable: e.checkable ?? !0,
|
|
1782
1794
|
draggable: e.draggable ?? !0,
|
|
1783
1795
|
className: o
|
|
1784
1796
|
}, null)
|
|
1785
1797
|
}, {
|
|
1786
|
-
default: () => [
|
|
1798
|
+
default: () => [i(Z, {
|
|
1787
1799
|
title: "列设置"
|
|
1788
1800
|
}, {
|
|
1789
|
-
default: () => [
|
|
1801
|
+
default: () => [i(dt, null, null)]
|
|
1790
1802
|
})]
|
|
1791
1803
|
}));
|
|
1792
1804
|
}
|
|
@@ -1795,14 +1807,14 @@ const be = (e) => {
|
|
|
1795
1807
|
const {
|
|
1796
1808
|
isFullscreen: e
|
|
1797
1809
|
} = st();
|
|
1798
|
-
return () => e.value ?
|
|
1810
|
+
return () => e.value ? i(Z, {
|
|
1799
1811
|
title: "退出全屏"
|
|
1800
1812
|
}, {
|
|
1801
|
-
default: () => [
|
|
1802
|
-
}) :
|
|
1813
|
+
default: () => [i(va, null, null)]
|
|
1814
|
+
}) : i(Z, {
|
|
1803
1815
|
title: "全屏"
|
|
1804
1816
|
}, {
|
|
1805
|
-
default: () => [
|
|
1817
|
+
default: () => [i(ma, null, null)]
|
|
1806
1818
|
});
|
|
1807
1819
|
}
|
|
1808
1820
|
}), Ga = () => {
|
|
@@ -1810,8 +1822,8 @@ const be = (e) => {
|
|
|
1810
1822
|
action: e,
|
|
1811
1823
|
tableSize: o
|
|
1812
1824
|
} = de();
|
|
1813
|
-
return
|
|
1814
|
-
overlay:
|
|
1825
|
+
return i(la, {
|
|
1826
|
+
overlay: i(Re, {
|
|
1815
1827
|
selectedKeys: [o.value],
|
|
1816
1828
|
onClick: ({
|
|
1817
1829
|
key: t
|
|
@@ -1823,15 +1835,15 @@ const be = (e) => {
|
|
|
1823
1835
|
width: 80
|
|
1824
1836
|
}
|
|
1825
1837
|
}, {
|
|
1826
|
-
default: () => [
|
|
1838
|
+
default: () => [i(Re.Item, {
|
|
1827
1839
|
key: "large"
|
|
1828
1840
|
}, {
|
|
1829
1841
|
default: () => [pe("默认")]
|
|
1830
|
-
}),
|
|
1842
|
+
}), i(Re.Item, {
|
|
1831
1843
|
key: "middle"
|
|
1832
1844
|
}, {
|
|
1833
1845
|
default: () => [pe("中等")]
|
|
1834
|
-
}),
|
|
1846
|
+
}), i(Re.Item, {
|
|
1835
1847
|
key: "small"
|
|
1836
1848
|
}, {
|
|
1837
1849
|
default: () => [pe("紧凑")]
|
|
@@ -1839,10 +1851,10 @@ const be = (e) => {
|
|
|
1839
1851
|
}),
|
|
1840
1852
|
trigger: ["click"]
|
|
1841
1853
|
}, {
|
|
1842
|
-
default: () => [
|
|
1854
|
+
default: () => [i(Z, {
|
|
1843
1855
|
title: "表格密度"
|
|
1844
1856
|
}, {
|
|
1845
|
-
default: () => [
|
|
1857
|
+
default: () => [i(ga, null, null)]
|
|
1846
1858
|
})]
|
|
1847
1859
|
});
|
|
1848
1860
|
}, qa = (e) => ({
|
|
@@ -1900,16 +1912,16 @@ function Xa(e) {
|
|
|
1900
1912
|
const o = e, {
|
|
1901
1913
|
icon: t,
|
|
1902
1914
|
tooltip: n,
|
|
1903
|
-
onClick:
|
|
1915
|
+
onClick: u,
|
|
1904
1916
|
key: l
|
|
1905
1917
|
} = o;
|
|
1906
|
-
return t && n ?
|
|
1918
|
+
return t && n ? i(Z, {
|
|
1907
1919
|
title: n
|
|
1908
1920
|
}, {
|
|
1909
|
-
default: () => [
|
|
1921
|
+
default: () => [i("span", {
|
|
1910
1922
|
key: l,
|
|
1911
1923
|
onClick: () => {
|
|
1912
|
-
|
|
1924
|
+
u && u(l);
|
|
1913
1925
|
}
|
|
1914
1926
|
}, [t])]
|
|
1915
1927
|
}) : t;
|
|
@@ -1930,85 +1942,85 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1930
1942
|
const {
|
|
1931
1943
|
wrapSSR: o,
|
|
1932
1944
|
hashId: t
|
|
1933
|
-
} = Pe("ListToolBar", [qa], e.prefixCls), n = Ua(),
|
|
1934
|
-
var
|
|
1935
|
-
return !!(e.titleTip || e.headerTitle || (
|
|
1945
|
+
} = Pe("ListToolBar", [qa], e.prefixCls), n = Ua(), u = w(() => {
|
|
1946
|
+
var d;
|
|
1947
|
+
return !!(e.titleTip || e.headerTitle || (d = e.actions) != null && d.length);
|
|
1936
1948
|
}), l = w(() => {
|
|
1937
|
-
var f;
|
|
1938
|
-
return !!((f = e.settings) != null && f.length || e.optionsExtra);
|
|
1939
|
-
}), i = w(() => !!(e.titleTip || e.headerTitle)), u = w(() => {
|
|
1940
1949
|
var d;
|
|
1941
|
-
|
|
1942
|
-
|
|
1950
|
+
return !!((d = e.settings) != null && d.length || e.optionsExtra);
|
|
1951
|
+
}), r = w(() => !!(e.titleTip || e.headerTitle)), s = w(() => {
|
|
1952
|
+
var c;
|
|
1953
|
+
let d;
|
|
1954
|
+
return Array.isArray(e.actions) ? ((c = e.actions) == null ? void 0 : c.length) < 1 ? null : i(le, {
|
|
1943
1955
|
align: "center"
|
|
1944
|
-
}, lt(
|
|
1945
|
-
key:
|
|
1956
|
+
}, lt(d = e.actions.map((p, g) => Ce(p) ? Lt(p, {
|
|
1957
|
+
key: g,
|
|
1946
1958
|
...p == null ? void 0 : p.props
|
|
1947
|
-
}) :
|
|
1948
|
-
key:
|
|
1949
|
-
}, [p]))) ?
|
|
1950
|
-
default: () => [
|
|
1959
|
+
}) : i("template", {
|
|
1960
|
+
key: g
|
|
1961
|
+
}, [p]))) ? d : {
|
|
1962
|
+
default: () => [d]
|
|
1951
1963
|
}) : e.actions;
|
|
1952
|
-
}), T = Fe(() => !
|
|
1964
|
+
}), T = Fe(() => !u.value && l.value ? i("div", {
|
|
1953
1965
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1954
|
-
}, null) :
|
|
1966
|
+
}, null) : r.value ? i(le, {
|
|
1955
1967
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1956
1968
|
}, {
|
|
1957
|
-
default: () => [
|
|
1969
|
+
default: () => [i("div", {
|
|
1958
1970
|
class: `${e.prefixCls}-title ${t.value}`
|
|
1959
|
-
}, [e.headerTitle, e.titleTip &&
|
|
1971
|
+
}, [e.headerTitle, e.titleTip && i(Z, {
|
|
1960
1972
|
title: e.titleTipText
|
|
1961
1973
|
}, {
|
|
1962
|
-
default: () => [te(e.titleTip) && e.titleTip ?
|
|
1963
|
-
})]),
|
|
1974
|
+
default: () => [te(e.titleTip) && e.titleTip ? i(ya, null, null) : e.titleTip]
|
|
1975
|
+
})]), s.value && i("div", {
|
|
1964
1976
|
class: `${e.prefixCls}-actions ${t.value}`
|
|
1965
|
-
}, [
|
|
1966
|
-
}) :
|
|
1977
|
+
}, [s.value])]
|
|
1978
|
+
}) : i(le, {
|
|
1967
1979
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1968
1980
|
}, {
|
|
1969
|
-
default: () => [
|
|
1981
|
+
default: () => [s.value && i("div", {
|
|
1970
1982
|
class: `${e.prefixCls}-actions`
|
|
1971
|
-
}, [
|
|
1972
|
-
}), [() =>
|
|
1973
|
-
let
|
|
1974
|
-
return l.value ?
|
|
1983
|
+
}, [s.value])]
|
|
1984
|
+
}), [() => u.value, () => l.value, () => r.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), v = Fe(() => {
|
|
1985
|
+
let d;
|
|
1986
|
+
return l.value ? i(le, {
|
|
1975
1987
|
size: 16,
|
|
1976
1988
|
class: `${e.prefixCls}-right ${t.value}`,
|
|
1977
1989
|
align: n.value.lg ? "center" : "end",
|
|
1978
1990
|
direction: n.value.lg ? "horizontal" : "vertical"
|
|
1979
1991
|
}, {
|
|
1980
1992
|
default: () => {
|
|
1981
|
-
var
|
|
1982
|
-
return [e.optionsExtra, (
|
|
1993
|
+
var c;
|
|
1994
|
+
return [e.optionsExtra, (c = e.settings) != null && c.length ? i(le, {
|
|
1983
1995
|
size: 12,
|
|
1984
1996
|
align: "center",
|
|
1985
1997
|
class: `${e.prefixCls}-setting-items`
|
|
1986
|
-
}, lt(
|
|
1987
|
-
const
|
|
1988
|
-
return
|
|
1989
|
-
key:
|
|
1998
|
+
}, lt(d = e.settings.map((p, g) => {
|
|
1999
|
+
const m = Xa(p);
|
|
2000
|
+
return i("div", {
|
|
2001
|
+
key: g,
|
|
1990
2002
|
class: `${e.prefixCls}-setting-item`
|
|
1991
|
-
}, [
|
|
1992
|
-
})) ?
|
|
1993
|
-
default: () => [
|
|
2003
|
+
}, [m]);
|
|
2004
|
+
})) ? d : {
|
|
2005
|
+
default: () => [d]
|
|
1994
2006
|
}) : null];
|
|
1995
2007
|
}
|
|
1996
2008
|
}) : null;
|
|
1997
|
-
}, [() => l.value, () => e.prefixCls, () =>
|
|
1998
|
-
if (!l.value && !
|
|
2009
|
+
}, [() => l.value, () => e.prefixCls, () => r.value, () => s.value, () => e.settings]), y = Fe(() => {
|
|
2010
|
+
if (!l.value && !u.value)
|
|
1999
2011
|
return null;
|
|
2000
|
-
const
|
|
2012
|
+
const d = {
|
|
2001
2013
|
[`${t.value}`]: !0,
|
|
2002
2014
|
[`${e.prefixCls}-container`]: !0,
|
|
2003
2015
|
[`${e.prefixCls}-container-mobile`]: !n.value.xl
|
|
2004
2016
|
};
|
|
2005
|
-
return
|
|
2006
|
-
class:
|
|
2007
|
-
}, [T.value,
|
|
2008
|
-
}, [() =>
|
|
2009
|
-
return () => o(
|
|
2017
|
+
return i("div", {
|
|
2018
|
+
class: d
|
|
2019
|
+
}, [T.value, v.value]);
|
|
2020
|
+
}, [() => u.value, () => l.value, () => T.value, () => e.prefixCls, () => v.value]);
|
|
2021
|
+
return () => o(i("div", {
|
|
2010
2022
|
class: `${e.prefixCls} ${t.value}`
|
|
2011
|
-
}, [
|
|
2023
|
+
}, [y.value]));
|
|
2012
2024
|
}
|
|
2013
2025
|
});
|
|
2014
2026
|
mt.inheritAttrs = !1;
|
|
@@ -2016,19 +2028,19 @@ function Ja() {
|
|
|
2016
2028
|
return {
|
|
2017
2029
|
reload: {
|
|
2018
2030
|
text: "刷新",
|
|
2019
|
-
icon:
|
|
2031
|
+
icon: i(pa, null, null)
|
|
2020
2032
|
},
|
|
2021
2033
|
density: {
|
|
2022
2034
|
text: "表格密度",
|
|
2023
|
-
icon:
|
|
2035
|
+
icon: i(Ga, null, null)
|
|
2024
2036
|
},
|
|
2025
2037
|
setting: {
|
|
2026
2038
|
text: "列设置",
|
|
2027
|
-
icon:
|
|
2039
|
+
icon: i(dt, null, null)
|
|
2028
2040
|
},
|
|
2029
2041
|
fullScreen: {
|
|
2030
2042
|
text: "全屏",
|
|
2031
|
-
icon:
|
|
2043
|
+
icon: i(vt, null, null)
|
|
2032
2044
|
}
|
|
2033
2045
|
};
|
|
2034
2046
|
}
|
|
@@ -2037,22 +2049,22 @@ function Qa(e, o) {
|
|
|
2037
2049
|
const n = e[t];
|
|
2038
2050
|
if (!n)
|
|
2039
2051
|
return null;
|
|
2040
|
-
let
|
|
2041
|
-
if (typeof
|
|
2052
|
+
let u = n === !0 ? o[t] : () => n == null ? void 0 : n();
|
|
2053
|
+
if (typeof u != "function" && (u = () => {
|
|
2042
2054
|
}), t === "setting")
|
|
2043
|
-
return
|
|
2055
|
+
return i(_a, q(e[t], {
|
|
2044
2056
|
key: t
|
|
2045
2057
|
}), null);
|
|
2046
2058
|
if (t === "fullScreen")
|
|
2047
|
-
return
|
|
2059
|
+
return i("span", {
|
|
2048
2060
|
key: t,
|
|
2049
|
-
onClick:
|
|
2050
|
-
}, [
|
|
2061
|
+
onClick: u
|
|
2062
|
+
}, [i(vt, null, null)]);
|
|
2051
2063
|
const l = Ja()[t];
|
|
2052
|
-
return l ?
|
|
2064
|
+
return l ? i("span", {
|
|
2053
2065
|
key: t,
|
|
2054
|
-
onClick:
|
|
2055
|
-
}, [
|
|
2066
|
+
onClick: u
|
|
2067
|
+
}, [i(Z, {
|
|
2056
2068
|
title: l.text
|
|
2057
2069
|
}, {
|
|
2058
2070
|
default: () => [l.icon]
|
|
@@ -2077,30 +2089,30 @@ const Za = {
|
|
|
2077
2089
|
}), {
|
|
2078
2090
|
action: t
|
|
2079
2091
|
} = de(), n = Fe(() => {
|
|
2080
|
-
var
|
|
2081
|
-
const
|
|
2092
|
+
var r;
|
|
2093
|
+
const u = {
|
|
2082
2094
|
reload: () => t == null ? void 0 : t.reload(),
|
|
2083
2095
|
density: !0,
|
|
2084
2096
|
setting: !0,
|
|
2085
2097
|
fullScreen: () => t == null ? void 0 : t.toggle()
|
|
2086
2098
|
};
|
|
2087
|
-
if (e.options === !1 || ((
|
|
2099
|
+
if (e.options === !1 || ((r = Object.keys(e.options)) == null ? void 0 : r.length) === 0)
|
|
2088
2100
|
return [];
|
|
2089
2101
|
const l = {
|
|
2090
|
-
...
|
|
2102
|
+
...u,
|
|
2091
2103
|
...e.options
|
|
2092
2104
|
};
|
|
2093
2105
|
return l.setting !== !1 && e.settingExtra && (l.setting = {}, l.setting.extra = e.settingExtra), Qa(l, {
|
|
2094
|
-
...
|
|
2106
|
+
...u
|
|
2095
2107
|
});
|
|
2096
2108
|
}, [() => t, () => e.options]);
|
|
2097
2109
|
return () => {
|
|
2098
|
-
const
|
|
2099
|
-
return
|
|
2110
|
+
const u = e.toolBarBtn || [];
|
|
2111
|
+
return i(mt, {
|
|
2100
2112
|
prefixCls: o,
|
|
2101
2113
|
optionsExtra: e.optionsExtra,
|
|
2102
2114
|
headerTitle: e.headerTitle,
|
|
2103
|
-
actions:
|
|
2115
|
+
actions: u,
|
|
2104
2116
|
settings: h(n),
|
|
2105
2117
|
titleTip: e.titleTip,
|
|
2106
2118
|
titleTipText: e.titleTipText
|
|
@@ -2123,10 +2135,10 @@ function al(e) {
|
|
|
2123
2135
|
function ll(e, o, t, n) {
|
|
2124
2136
|
if (!o)
|
|
2125
2137
|
return e;
|
|
2126
|
-
let
|
|
2138
|
+
let u = e;
|
|
2127
2139
|
if (ne(o)) {
|
|
2128
2140
|
const l = o.node === "a" ? "span" : o.node;
|
|
2129
|
-
return
|
|
2141
|
+
return i(l, q((o == null ? void 0 : o.attr) || {}, {
|
|
2130
2142
|
class: [o.class, o.node === "a" ? `${t}-a` : ""],
|
|
2131
2143
|
onClick: o.click
|
|
2132
2144
|
}), al(e) ? e : {
|
|
@@ -2135,21 +2147,21 @@ function ll(e, o, t, n) {
|
|
|
2135
2147
|
}
|
|
2136
2148
|
switch (o) {
|
|
2137
2149
|
case "link":
|
|
2138
|
-
|
|
2150
|
+
u = i("span", {
|
|
2139
2151
|
class: [`${t}-a`, n]
|
|
2140
2152
|
}, [e]);
|
|
2141
2153
|
break;
|
|
2142
2154
|
case "time":
|
|
2143
|
-
|
|
2155
|
+
u = W(e).format("HH:mm:ss");
|
|
2144
2156
|
break;
|
|
2145
2157
|
case "dateMonth":
|
|
2146
|
-
|
|
2158
|
+
u = `${W(e).month() + 1}月`;
|
|
2147
2159
|
break;
|
|
2148
2160
|
case "dateTime":
|
|
2149
|
-
|
|
2161
|
+
u = W(e).format("YYYY-MM-DD HH:mm:ss");
|
|
2150
2162
|
break;
|
|
2151
2163
|
}
|
|
2152
|
-
return
|
|
2164
|
+
return u;
|
|
2153
2165
|
}
|
|
2154
2166
|
const ke = {
|
|
2155
2167
|
["&::-webkit-scrollbar"]: {
|
|
@@ -2362,25 +2374,25 @@ const ke = {
|
|
|
2362
2374
|
emit: o,
|
|
2363
2375
|
slots: t,
|
|
2364
2376
|
attrs: n,
|
|
2365
|
-
expose:
|
|
2377
|
+
expose: u
|
|
2366
2378
|
}) {
|
|
2367
2379
|
const l = Ve({
|
|
2368
2380
|
suffixCls: "table",
|
|
2369
2381
|
isPor: !0
|
|
2370
2382
|
}), {
|
|
2371
|
-
wrapSSR:
|
|
2372
|
-
hashId:
|
|
2383
|
+
wrapSSR: r,
|
|
2384
|
+
hashId: s
|
|
2373
2385
|
} = Pe("ProBaseTable", [nl], l), T = ul(), {
|
|
2374
|
-
width:
|
|
2386
|
+
width: v
|
|
2375
2387
|
} = Xt(), {
|
|
2376
|
-
emptyText:
|
|
2377
|
-
indicator:
|
|
2378
|
-
} = ia(),
|
|
2379
|
-
fe(() =>
|
|
2388
|
+
emptyText: y,
|
|
2389
|
+
indicator: d
|
|
2390
|
+
} = ia(), c = O(), p = O(), g = O(e.waitRequest);
|
|
2391
|
+
fe(() => g.value = e.waitRequest);
|
|
2380
2392
|
const {
|
|
2381
|
-
toggle:
|
|
2393
|
+
toggle: m,
|
|
2382
2394
|
isFullscreen: S
|
|
2383
|
-
} = st(
|
|
2395
|
+
} = st(c), F = w(() => ({
|
|
2384
2396
|
...e
|
|
2385
2397
|
})), x = w(() => {
|
|
2386
2398
|
var C, R;
|
|
@@ -2398,18 +2410,18 @@ const ke = {
|
|
|
2398
2410
|
});
|
|
2399
2411
|
}), {
|
|
2400
2412
|
loadingStatus: B,
|
|
2401
|
-
setLoading:
|
|
2413
|
+
setLoading: _
|
|
2402
2414
|
} = Sa({
|
|
2403
2415
|
emit: o,
|
|
2404
2416
|
loading: Q(e, "loading")
|
|
2405
2417
|
}), {
|
|
2406
|
-
sizeRef:
|
|
2418
|
+
sizeRef: M,
|
|
2407
2419
|
setTableSize: A
|
|
2408
2420
|
} = xa({
|
|
2409
2421
|
emit: o,
|
|
2410
2422
|
size: Q(e, "size")
|
|
2411
2423
|
}), {
|
|
2412
|
-
getPaginationInfo:
|
|
2424
|
+
getPaginationInfo: z,
|
|
2413
2425
|
setPagination: D
|
|
2414
2426
|
} = wa({
|
|
2415
2427
|
slots: t,
|
|
@@ -2420,22 +2432,22 @@ const ke = {
|
|
|
2420
2432
|
breakpoint: b
|
|
2421
2433
|
} = ja({
|
|
2422
2434
|
...oe,
|
|
2423
|
-
innerWidth:
|
|
2435
|
+
innerWidth: v,
|
|
2424
2436
|
columns: I,
|
|
2425
2437
|
screensRef: T
|
|
2426
2438
|
}), P = Ba(e), {
|
|
2427
2439
|
getProColumns: $,
|
|
2428
2440
|
cacheProColumns: N,
|
|
2429
|
-
setColumns:
|
|
2441
|
+
setColumns: f,
|
|
2430
2442
|
changeColumns: j,
|
|
2431
|
-
resizeColumnWidth:
|
|
2443
|
+
resizeColumnWidth: V
|
|
2432
2444
|
} = Da({
|
|
2433
2445
|
...P,
|
|
2434
2446
|
breakpoint: b,
|
|
2435
2447
|
scroll: a,
|
|
2436
2448
|
columns: I
|
|
2437
2449
|
}), {
|
|
2438
|
-
columnsMap:
|
|
2450
|
+
columnsMap: Y,
|
|
2439
2451
|
operationType: he,
|
|
2440
2452
|
setColumnsMap: Oe,
|
|
2441
2453
|
sortKeyColumns: Se,
|
|
@@ -2458,9 +2470,9 @@ const ke = {
|
|
|
2458
2470
|
setPagination: D
|
|
2459
2471
|
}), {
|
|
2460
2472
|
selectedKey: ue,
|
|
2461
|
-
changeRowKey:
|
|
2473
|
+
changeRowKey: E,
|
|
2462
2474
|
selectRowKey: ie,
|
|
2463
|
-
selectAllRowKey:
|
|
2475
|
+
selectAllRowKey: G,
|
|
2464
2476
|
syncSelectedRows: gt,
|
|
2465
2477
|
removeRowKeys: yt
|
|
2466
2478
|
} = Ta(Q(e, "rowKey"), Q(e, "rowSelection")), pt = $a(e), {
|
|
@@ -2472,40 +2484,40 @@ const ke = {
|
|
|
2472
2484
|
handleTableChange: _e
|
|
2473
2485
|
} = Fa({
|
|
2474
2486
|
...pt,
|
|
2475
|
-
waitRequest:
|
|
2487
|
+
waitRequest: g
|
|
2476
2488
|
}, {
|
|
2477
2489
|
loadingStatus: B,
|
|
2478
|
-
getPaginationInfo:
|
|
2490
|
+
getPaginationInfo: z,
|
|
2479
2491
|
setPagination: D,
|
|
2480
2492
|
removeRowKeys: yt,
|
|
2481
2493
|
syncSelectedRows: gt,
|
|
2482
|
-
setLoading:
|
|
2483
|
-
setColumns:
|
|
2494
|
+
setLoading: _,
|
|
2495
|
+
setColumns: f,
|
|
2484
2496
|
columns: $,
|
|
2485
2497
|
formParamsRef: Be,
|
|
2486
2498
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2487
2499
|
hasCustomRender: w(() => !!ze(t, e, "customRender"))
|
|
2488
2500
|
}, o), St = w(() => e.options ? {
|
|
2489
2501
|
...il,
|
|
2490
|
-
...
|
|
2502
|
+
...X(ne(e.options) ? e.options : {})
|
|
2491
2503
|
} : !1), Ge = w(() => {
|
|
2492
2504
|
const C = ne(e.loading) ? ye(e.loading, "spinning") : {};
|
|
2493
|
-
return !C.indicator && (
|
|
2505
|
+
return !C.indicator && (d != null && d.value) && (C.indicator = d == null ? void 0 : d.value), ye({
|
|
2494
2506
|
...(ye(n), ["class", "style", "id"]),
|
|
2495
2507
|
...e,
|
|
2496
2508
|
virtualScroll: x.value,
|
|
2497
|
-
size: h(
|
|
2509
|
+
size: h(M),
|
|
2498
2510
|
scroll: h(a),
|
|
2499
2511
|
loading: {
|
|
2500
2512
|
spinning: e.showLoading ? !!h(B) : !1,
|
|
2501
2513
|
...C
|
|
2502
2514
|
},
|
|
2503
2515
|
columns: Ne(h($).filter((R) => R.show || R.show === void 0)),
|
|
2504
|
-
pagination: Ne(h(
|
|
2516
|
+
pagination: Ne(h(z)),
|
|
2505
2517
|
dataSource: h(me)
|
|
2506
2518
|
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2507
2519
|
}), xt = w(() => [{
|
|
2508
|
-
[`${
|
|
2520
|
+
[`${s.value}`]: !0,
|
|
2509
2521
|
[`${l}`]: !0,
|
|
2510
2522
|
[`${n.class}`]: n.class,
|
|
2511
2523
|
[`${l}-no-scroll`]: !Object.keys(h(a) || {}).length,
|
|
@@ -2514,10 +2526,10 @@ const ke = {
|
|
|
2514
2526
|
}]), qe = w(() => {
|
|
2515
2527
|
var J;
|
|
2516
2528
|
let C;
|
|
2517
|
-
const R = h(F).direction === "rtl" ? "bottomLeft" : "right",
|
|
2518
|
-
if (
|
|
2519
|
-
const
|
|
2520
|
-
!
|
|
2529
|
+
const R = h(F).direction === "rtl" ? "bottomLeft" : "right", k = (J = h(z)) == null ? void 0 : J.position;
|
|
2530
|
+
if (k !== null && Array.isArray(k)) {
|
|
2531
|
+
const K = k.find((se) => se.indexOf("top") !== -1), H = k.find((se) => se.indexOf("bottom") !== -1), Te = k.every((se) => `${se}` == "none");
|
|
2532
|
+
!K && !H && !Te && (C = R), K && (C = K.toLowerCase().replace("top", "")), H && (C = H.toLowerCase().replace("bottom", ""));
|
|
2521
2533
|
} else
|
|
2522
2534
|
C = R;
|
|
2523
2535
|
return C;
|
|
@@ -2529,25 +2541,25 @@ const ke = {
|
|
|
2529
2541
|
}), await De()) : L(C);
|
|
2530
2542
|
}, wt = async (C, R) => {
|
|
2531
2543
|
R ? (o("reset", C), e.request && await Ue(C)) : e.request ? (o("submit", C), await Ue(C)) : o("submit", C);
|
|
2532
|
-
}, Xe = (C, R,
|
|
2533
|
-
D(it(C, ["current", "pageSize"])), _e(C, R,
|
|
2544
|
+
}, Xe = (C, R, k, J) => {
|
|
2545
|
+
D(it(C, ["current", "pageSize"])), _e(C, R, k, J);
|
|
2534
2546
|
}, Tt = (C, R) => {
|
|
2535
|
-
var
|
|
2547
|
+
var k;
|
|
2536
2548
|
D({
|
|
2537
2549
|
current: C,
|
|
2538
2550
|
pageSize: R
|
|
2539
2551
|
}), _e({
|
|
2540
2552
|
current: C,
|
|
2541
2553
|
pageSize: R,
|
|
2542
|
-
total:
|
|
2554
|
+
total: z.value && ((k = z.value) == null ? void 0 : k.total) || 0
|
|
2543
2555
|
}, {}, {});
|
|
2544
2556
|
}, Rt = (C) => {
|
|
2545
2557
|
o("expandedRowsChange", C);
|
|
2546
2558
|
}, $t = (C, R) => {
|
|
2547
2559
|
o("expand", C, R);
|
|
2548
|
-
}, Ft = (C, R) =>
|
|
2549
|
-
const J =
|
|
2550
|
-
return R &&
|
|
2560
|
+
}, Ft = (C, R) => V(C, R), It = (C, R, k) => {
|
|
2561
|
+
const J = k.align === "center" ? "top" : k.align === "left" || !k.align ? "topLeft" : "topRight";
|
|
2562
|
+
return R && k.copyable ? i(ua.Paragraph, {
|
|
2551
2563
|
class: `${l}-copyable`,
|
|
2552
2564
|
style: {
|
|
2553
2565
|
margin: "0",
|
|
@@ -2556,31 +2568,31 @@ const ke = {
|
|
|
2556
2568
|
},
|
|
2557
2569
|
copyable: !0
|
|
2558
2570
|
}, {
|
|
2559
|
-
default: () => [
|
|
2571
|
+
default: () => [i(Z, {
|
|
2560
2572
|
title: C,
|
|
2561
2573
|
placement: J
|
|
2562
2574
|
}, {
|
|
2563
|
-
default: () => [
|
|
2575
|
+
default: () => [i("div", {
|
|
2564
2576
|
class: `${l}-ellipsis`
|
|
2565
2577
|
}, [C])]
|
|
2566
2578
|
})]
|
|
2567
|
-
}) : R && !
|
|
2579
|
+
}) : R && !k.copyable ? i(Z, {
|
|
2568
2580
|
title: C,
|
|
2569
2581
|
placement: J
|
|
2570
2582
|
}, {
|
|
2571
|
-
default: () => [We.value ? C :
|
|
2583
|
+
default: () => [We.value ? C : i("div", {
|
|
2572
2584
|
class: `${l}-ellipsis`
|
|
2573
2585
|
}, [C])]
|
|
2574
2586
|
}) : C;
|
|
2575
2587
|
}, Pt = () => {
|
|
2576
2588
|
var R;
|
|
2577
2589
|
const C = ze(t, e, "customRender");
|
|
2578
|
-
return C ? (R = me.value) != null && R.length ? C(me.value) : (
|
|
2590
|
+
return C ? (R = me.value) != null && R.length ? C(me.value) : (y == null ? void 0 : y.value) || i(ct, {
|
|
2579
2591
|
image: ol
|
|
2580
|
-
}, null) :
|
|
2581
|
-
}, Ot = (C, R,
|
|
2592
|
+
}, null) : i(Ie, null, null);
|
|
2593
|
+
}, Ot = (C, R, k) => i(el, {
|
|
2582
2594
|
headerTitle: C,
|
|
2583
|
-
titleTip:
|
|
2595
|
+
titleTip: k,
|
|
2584
2596
|
titleTipText: e.titleTipText,
|
|
2585
2597
|
options: h(St),
|
|
2586
2598
|
settingExtra: ge(t, e, "settingExtra"),
|
|
@@ -2588,17 +2600,17 @@ const ke = {
|
|
|
2588
2600
|
toolBarBtn: R
|
|
2589
2601
|
}, null);
|
|
2590
2602
|
ka({
|
|
2591
|
-
tableSize:
|
|
2603
|
+
tableSize: M,
|
|
2592
2604
|
columns: $,
|
|
2593
2605
|
cacheColumns: I,
|
|
2594
2606
|
action: {
|
|
2595
2607
|
setTableSize: A,
|
|
2596
2608
|
reload: (C) => De(C),
|
|
2597
|
-
toggle:
|
|
2609
|
+
toggle: m
|
|
2598
2610
|
},
|
|
2599
2611
|
settingsAction: {
|
|
2600
2612
|
autoScroll: Q(e, "autoScroll"),
|
|
2601
|
-
columnsMap:
|
|
2613
|
+
columnsMap: Y,
|
|
2602
2614
|
operationType: he,
|
|
2603
2615
|
setColumnsMap: Oe,
|
|
2604
2616
|
sortKeyColumns: Se,
|
|
@@ -2608,7 +2620,7 @@ const ke = {
|
|
|
2608
2620
|
setPagination: D,
|
|
2609
2621
|
changeColumns: j,
|
|
2610
2622
|
slots: t
|
|
2611
|
-
}),
|
|
2623
|
+
}), u({
|
|
2612
2624
|
loading: B,
|
|
2613
2625
|
formRef: () => ({
|
|
2614
2626
|
getFormState: () => {
|
|
@@ -2618,38 +2630,38 @@ const ke = {
|
|
|
2618
2630
|
getTableFormState: () => h(Be),
|
|
2619
2631
|
restForm: (C) => {
|
|
2620
2632
|
var R;
|
|
2621
|
-
|
|
2633
|
+
g.value = !0, C && (C == null || C()), (R = p.value) == null || R.resetForm(!1), g.value = !1;
|
|
2622
2634
|
}
|
|
2623
2635
|
}),
|
|
2624
2636
|
actionRef: () => ({
|
|
2625
2637
|
dataSource: me.value,
|
|
2626
|
-
pageParams:
|
|
2638
|
+
pageParams: z.value,
|
|
2627
2639
|
reload: De,
|
|
2628
2640
|
getLoadingStatus: () => h(B),
|
|
2629
2641
|
reloadAndRest: async (C) => {
|
|
2630
|
-
|
|
2642
|
+
g.value = !0, D({
|
|
2631
2643
|
current: 1,
|
|
2632
2644
|
pageSize: 10
|
|
2633
|
-
}), C && (C == null || C()),
|
|
2645
|
+
}), C && (C == null || C()), g.value = !1;
|
|
2634
2646
|
},
|
|
2635
2647
|
reSetDataList: bt,
|
|
2636
2648
|
setPageAndReload: Xe,
|
|
2637
2649
|
setPagination: D,
|
|
2638
2650
|
changeDataValue: Ct,
|
|
2639
|
-
loadingOperation:
|
|
2651
|
+
loadingOperation: _
|
|
2640
2652
|
})
|
|
2641
2653
|
});
|
|
2642
2654
|
const Bt = w(() => (n == null ? void 0 : n.style) || {});
|
|
2643
2655
|
return () => {
|
|
2644
2656
|
var J;
|
|
2645
|
-
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"),
|
|
2646
|
-
return i(
|
|
2647
|
-
ref:
|
|
2657
|
+
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"), k = ge(t, e, "toolBarBtn");
|
|
2658
|
+
return r(i("div", {
|
|
2659
|
+
ref: c,
|
|
2648
2660
|
class: xt.value,
|
|
2649
2661
|
style: Bt.value
|
|
2650
|
-
}, [
|
|
2651
|
-
class: [`${l}-content`,
|
|
2652
|
-
}, [(!!ee.value.length || !!((J = t.search) != null && J.call(t))) &&
|
|
2662
|
+
}, [i("div", {
|
|
2663
|
+
class: [`${l}-content`, s.value]
|
|
2664
|
+
}, [(!!ee.value.length || !!((J = t.search) != null && J.call(t))) && i(ht, {
|
|
2653
2665
|
ref: p,
|
|
2654
2666
|
search: e.search,
|
|
2655
2667
|
modal: e.modalScroll,
|
|
@@ -2660,54 +2672,54 @@ const ke = {
|
|
|
2660
2672
|
defaultParams: ve
|
|
2661
2673
|
}, {
|
|
2662
2674
|
default: t.search ? () => {
|
|
2663
|
-
var
|
|
2664
|
-
return (
|
|
2675
|
+
var K;
|
|
2676
|
+
return (K = t.search) == null ? void 0 : K.call(t);
|
|
2665
2677
|
} : null
|
|
2666
|
-
}), !x.value && Ot(C,
|
|
2678
|
+
}), !x.value && Ot(C, k, R), e.customRender ?? t.customRender ? i(Le, h(Ge).loading, {
|
|
2667
2679
|
default: () => {
|
|
2668
|
-
var
|
|
2669
|
-
return [
|
|
2670
|
-
class: `${l}-wrapper ${
|
|
2671
|
-
}, [Pt(), e.pagination !== !1 && ((
|
|
2680
|
+
var K;
|
|
2681
|
+
return [i("div", {
|
|
2682
|
+
class: `${l}-wrapper ${s.value}`
|
|
2683
|
+
}, [Pt(), e.pagination !== !1 && ((K = me.value) == null ? void 0 : K.length) > 0 && i(na, q({
|
|
2672
2684
|
class: {
|
|
2673
|
-
[`${l}-pagination ${
|
|
2674
|
-
[`${l}-pagination-${qe.value} ${
|
|
2685
|
+
[`${l}-pagination ${s.value}`]: !0,
|
|
2686
|
+
[`${l}-pagination-${qe.value} ${s.value}`]: !!qe.value
|
|
2675
2687
|
}
|
|
2676
|
-
}, Ne(h(
|
|
2688
|
+
}, Ne(h(z)), {
|
|
2677
2689
|
onChange: Tt
|
|
2678
2690
|
}), null)])];
|
|
2679
2691
|
}
|
|
2680
|
-
}) :
|
|
2692
|
+
}) : i(oa, q(Ge.value, {
|
|
2681
2693
|
style: e.tableStyle || void 0,
|
|
2682
2694
|
class: e.tableClassName,
|
|
2683
|
-
rowKey: (
|
|
2695
|
+
rowKey: (K) => K[e.rowKey || "sortIndex"],
|
|
2684
2696
|
transformCellText: ({
|
|
2685
|
-
text:
|
|
2686
|
-
column:
|
|
2697
|
+
text: K,
|
|
2698
|
+
column: H
|
|
2687
2699
|
}) => {
|
|
2688
2700
|
var Qe, Ze;
|
|
2689
|
-
const Te = Ke(
|
|
2701
|
+
const Te = Ke(K) ? K == null ? void 0 : K[0] : K;
|
|
2690
2702
|
if (Ce(Te))
|
|
2691
|
-
return
|
|
2703
|
+
return K;
|
|
2692
2704
|
const {
|
|
2693
2705
|
value: se,
|
|
2694
2706
|
success: Dt
|
|
2695
|
-
} = Ut(Te, (
|
|
2696
|
-
return
|
|
2707
|
+
} = Ut(Te, (H == null ? void 0 : H.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Je = ll(se, ((Ze = (Qe = e.columns) == null ? void 0 : Qe.find((Nt) => Nt.key === H.key)) == null ? void 0 : Ze.valueType) || H.valueType, l, s.value);
|
|
2708
|
+
return H != null && H.ellipsis ? It(Je, Dt, H) : Je;
|
|
2697
2709
|
},
|
|
2698
2710
|
rowSelection: e.rowSelection ? {
|
|
2699
2711
|
...ye(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2700
2712
|
selectedRowKeys: ue.value,
|
|
2701
2713
|
onSelect: ie,
|
|
2702
|
-
onSelectAll:
|
|
2703
|
-
onChange:
|
|
2714
|
+
onSelectAll: G,
|
|
2715
|
+
onChange: E
|
|
2704
2716
|
} : void 0,
|
|
2705
2717
|
onChange: Xe,
|
|
2706
2718
|
onExpandedRowsChange: Rt,
|
|
2707
2719
|
onExpand: $t,
|
|
2708
2720
|
onResizeColumn: Ft
|
|
2709
2721
|
}), {
|
|
2710
|
-
emptyText:
|
|
2722
|
+
emptyText: y != null && y.value ? () => y == null ? void 0 : y.value : null,
|
|
2711
2723
|
...ye(t, tl)
|
|
2712
2724
|
})])]));
|
|
2713
2725
|
};
|