@gx-design-vue/pro-table 0.2.0-beta.37 → 0.2.0-beta.38
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/useTable.d.ts +1 -1
- package/dist/pro-table.mjs +516 -514
- package/dist/pro-table.umd.js +1 -1
- package/package.json +1 -1
package/dist/pro-table.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as w, ref as O, watch as q, unref as
|
|
1
|
+
import { computed as w, ref as O, watch as q, unref as f, 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 G, 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
3
|
import { pick as it, cloneDeep as U, omit as ye } from "lodash-es";
|
|
4
4
|
import { useFullscreen as st, useWindowSize as Xt } from "@vueuse/core";
|
|
@@ -9,53 +9,55 @@ import { tryOnUnmounted as sa, useMemo as Fe } from "@gx-design-vue/pro-hooks";
|
|
|
9
9
|
import H 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, h;
|
|
40
|
+
return (h = (T = o.value) == null ? void 0 : T.setPageAndReload) == null ? void 0 : h.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
|
-
q(() => o.value, (
|
|
517
|
-
t.value = te(
|
|
518
|
+
q(() => o.value, (r) => {
|
|
519
|
+
t.value = te(r) ? r : ne(r) ? r == null ? void 0 : r.spinning : t.value;
|
|
518
520
|
});
|
|
519
|
-
const n = w(() =>
|
|
520
|
-
function r
|
|
521
|
-
t.value =
|
|
521
|
+
const n = w(() => f(t) || !1);
|
|
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 h;
|
|
552
554
|
if (te(t.value) && !t.value)
|
|
553
555
|
return !1;
|
|
554
|
-
const
|
|
556
|
+
const r = ze(e, f(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,
|
|
@@ -569,89 +571,89 @@ function wa({
|
|
|
569
571
|
showSizeChanger: !0,
|
|
570
572
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
571
573
|
...t.value || {},
|
|
572
|
-
...
|
|
573
|
-
...
|
|
574
|
+
...f(n),
|
|
575
|
+
...s || {}
|
|
574
576
|
};
|
|
575
|
-
return (
|
|
577
|
+
return (h = t.value) != null && h.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 = f(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
593
|
q(() => {
|
|
592
|
-
var
|
|
593
|
-
return (
|
|
594
|
-
}, (
|
|
595
|
-
t.value = At([...
|
|
594
|
+
var h;
|
|
595
|
+
return (h = o.value) == null ? void 0 : h.selectedRowKeys;
|
|
596
|
+
}, (h) => {
|
|
597
|
+
t.value = At([...h || []]);
|
|
596
598
|
}, {
|
|
597
599
|
deep: !0,
|
|
598
600
|
immediate: !0
|
|
599
601
|
});
|
|
600
|
-
const
|
|
601
|
-
e.value && (
|
|
602
|
+
const u = (h, y) => {
|
|
603
|
+
e.value && (y ? h != null && h[e.value] && (t.value.push(h[e.value]), n.value.push(h)) : (t.value = t.value.filter((d) => d !== h[e.value]), n.value = n.value.filter((d) => d[e.value] !== h[e.value])));
|
|
602
604
|
}, l = () => {
|
|
603
|
-
var
|
|
604
|
-
o.value && ((
|
|
605
|
+
var h, y;
|
|
606
|
+
o.value && ((y = (h = o.value) == null ? void 0 : h.onChange) == null || y.call(h, 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: (h, y, d) => {
|
|
612
|
+
e.value && (h ? 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: (h) => {
|
|
615
|
+
t.value = t.value.filter((y) => !h.includes(y)), n.value = n.value.filter((y) => !h.includes(y == null ? void 0 : y[e.value || ""])), l();
|
|
614
616
|
},
|
|
615
617
|
changeRowKey: l,
|
|
616
|
-
syncSelectedRows: (
|
|
618
|
+
syncSelectedRows: (h) => {
|
|
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
|
+
h.forEach((c) => {
|
|
622
|
+
d.includes(c[e.value]) && n.value.push(U(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 h;
|
|
636
|
+
(h = s[0]) != null && h.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:
|
|
656
|
+
function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u, debounceTime: l }, { columns: r, loadingStatus: s, setLoading: T, setColumns: h, removeRowKeys: y, syncSelectedRows: d, formParamsRef: c, setPagination: p, getPaginationInfo: g, onBeforeSearchSubmit: v, hasCustomRender: S }, F) {
|
|
655
657
|
const x = O(), I = O(!0), B = O(!1), W = O(!1), K = O([]), A = O(), E = Ra(async (m) => {
|
|
656
658
|
A.value && clearTimeout(A.value);
|
|
657
659
|
const j = await P(m), Y = Vt(e.value, j);
|
|
@@ -666,9 +668,9 @@ function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: r
|
|
|
666
668
|
}), q(() => e.value, () => {
|
|
667
669
|
e.value ? E.run({ isPolling: !0 }) : clearTimeout(A.value);
|
|
668
670
|
}, { immediate: !0 }), q([
|
|
669
|
-
() =>
|
|
671
|
+
() => u.value,
|
|
670
672
|
() => n.value,
|
|
671
|
-
() =>
|
|
673
|
+
() => c
|
|
672
674
|
], () => {
|
|
673
675
|
o.value ? (!I.value || !e.value) && E.run({ isPolling: !1 }) : $(n.value || []);
|
|
674
676
|
}, {
|
|
@@ -677,10 +679,10 @@ function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: r
|
|
|
677
679
|
});
|
|
678
680
|
const D = w(() => {
|
|
679
681
|
if (S.value)
|
|
680
|
-
return
|
|
681
|
-
const m =
|
|
682
|
-
return !
|
|
683
|
-
}), oe = w(() =>
|
|
682
|
+
return f(K);
|
|
683
|
+
const m = f(r).filter((j) => j.show || j.show === void 0);
|
|
684
|
+
return !f(K) || !m || m.length === 0 ? [] : f(K);
|
|
685
|
+
}), oe = w(() => f(K).some((m) => m.children && m.children.length > 0));
|
|
684
686
|
function a(m) {
|
|
685
687
|
W.value = m;
|
|
686
688
|
}
|
|
@@ -690,34 +692,34 @@ function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: r
|
|
|
690
692
|
const P = async (m = {}) => {
|
|
691
693
|
var Se, xe, we;
|
|
692
694
|
const { pagination: j, filters: Y = {}, sorter: X = {}, removeKeys: he = [], isPolling: Oe = !1 } = m;
|
|
693
|
-
if (!
|
|
695
|
+
if (!f(o) || !$e(f(o)) || f(u) && s.value || B.value)
|
|
694
696
|
return n.value || [];
|
|
695
|
-
if (B.value = !0, !Oe ||
|
|
697
|
+
if (B.value = !0, !Oe || f(u) || I.value ? T(!0) : a(!0), f(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: k = 1, pageSize: ie = 10, total: _ } =
|
|
706
|
-
ee.pageNum = Ht({ current: k, pageSize: ie, total: _ }, he.length), he.length &&
|
|
707
|
+
const { current: k = 1, pageSize: ie = 10, total: _ } = f(g) || {};
|
|
708
|
+
ee.pageNum = Ht({ current: k, pageSize: ie, total: _ }, he.length), he.length && y(he), ee.pageSize = ie;
|
|
707
709
|
}
|
|
708
710
|
(ne(X) ? [X] : X).forEach((k) => {
|
|
709
711
|
const ie = (k == null ? void 0 : k.columnKey) || (k == null ? void 0 : k.field);
|
|
710
|
-
k && (k != null && k.order) ?
|
|
712
|
+
k && (k != null && k.order) ? h(f(r).map((_) => (_.dataIndex === ie ? _.sortOrder = k == null ? void 0 : k.order : _.sortOrder = null, _))) : k && h(f(r).map((_) => (_.dataIndex === ie && (_.sortOrder = null), _)));
|
|
711
713
|
});
|
|
712
714
|
let ve = {
|
|
713
715
|
...ee || {},
|
|
714
716
|
...m.params,
|
|
715
|
-
...
|
|
717
|
+
...c
|
|
716
718
|
};
|
|
717
719
|
v && $e(v) && (ve = await v(ve, X, Y));
|
|
718
720
|
let L = [];
|
|
719
|
-
const ue = await ((Se =
|
|
720
|
-
return B.value = !1, ue && ue.success ? (L = ue.data || [],
|
|
721
|
+
const ue = await ((Se = f(o)) == null ? void 0 : Se(ve, X, Y));
|
|
722
|
+
return B.value = !1, ue && ue.success ? (L = ue.data || [], f(t) && $e(f(t)) && (L = await ((xe = f(t)) == null ? void 0 : xe(L))), d(L), (ue.total || (L == null ? void 0 : L.length) || 0) !== ((we = f(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) {
|
|
@@ -728,7 +730,7 @@ function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: r
|
|
|
728
730
|
return [];
|
|
729
731
|
};
|
|
730
732
|
function $(m) {
|
|
731
|
-
const j = Wt(U(m),
|
|
733
|
+
const j = Wt(U(m), f(g.value));
|
|
732
734
|
nt(j, K.value) || (K.value = j);
|
|
733
735
|
}
|
|
734
736
|
function N({ key: m, params: j }) {
|
|
@@ -741,7 +743,7 @@ function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: r
|
|
|
741
743
|
changeDataValue: N,
|
|
742
744
|
handleTableChange: b,
|
|
743
745
|
reload: async (m) => {
|
|
744
|
-
|
|
746
|
+
f(o) ? await E.run({ ...m, isPolling: !1 }) : F("reload");
|
|
745
747
|
}
|
|
746
748
|
};
|
|
747
749
|
}
|
|
@@ -749,97 +751,97 @@ function Ia(e) {
|
|
|
749
751
|
const o = {};
|
|
750
752
|
return e.forEach((t) => {
|
|
751
753
|
let n = t.initialValue;
|
|
752
|
-
const
|
|
753
|
-
!n &&
|
|
754
|
+
const u = ["select"], l = ["date", "time", "dateRange"];
|
|
755
|
+
!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
756
|
}), o;
|
|
755
757
|
}
|
|
756
|
-
function Pa({ search: e, searchMap: o, params: t, columns: n, setPagination:
|
|
757
|
-
const l = ce({}),
|
|
758
|
-
var
|
|
759
|
-
return ne(e.value) ? !!((
|
|
758
|
+
function Pa({ search: e, searchMap: o, params: t, columns: n, setPagination: u }) {
|
|
759
|
+
const l = ce({}), r = ce({}), s = O([]), T = w(() => {
|
|
760
|
+
var d;
|
|
761
|
+
return ne(e.value) ? !!((d = e.value) != null && d.showSearch) : !!e.value;
|
|
760
762
|
});
|
|
761
763
|
kt(() => {
|
|
762
|
-
|
|
764
|
+
h("all");
|
|
763
765
|
}), q(() => t.value, () => {
|
|
764
|
-
|
|
766
|
+
h("params");
|
|
765
767
|
}, {
|
|
766
768
|
deep: !0
|
|
767
769
|
}), q(() => o.value, () => {
|
|
768
|
-
|
|
770
|
+
h("searchMap");
|
|
769
771
|
}, {
|
|
770
772
|
deep: !0
|
|
771
773
|
}), q(() => n.value, () => {
|
|
772
|
-
|
|
774
|
+
h("columns");
|
|
773
775
|
}, {
|
|
774
776
|
deep: !0
|
|
775
777
|
});
|
|
776
|
-
const
|
|
777
|
-
var p,
|
|
778
|
-
const
|
|
779
|
-
if ((
|
|
780
|
-
|
|
778
|
+
const h = (d) => {
|
|
779
|
+
var p, g;
|
|
780
|
+
const c = [];
|
|
781
|
+
if ((d === "all" || d === "searchMap") && ((p = o.value) == null || p.forEach((v) => c.push(v)), c.forEach((v) => {
|
|
782
|
+
s.value.some((S) => S.name === v.name) ? s.value = s.value.map((S) => S.name === v.name ? {
|
|
781
783
|
...S,
|
|
782
784
|
...v
|
|
783
|
-
} : S) :
|
|
784
|
-
})), (
|
|
785
|
-
v.searchConfig &&
|
|
786
|
-
}),
|
|
787
|
-
|
|
785
|
+
} : S) : s.value.push(v);
|
|
786
|
+
})), (d === "all" || d === "columns") && ((g = n.value) != null && g.length) && (n.value && n.value.forEach((v) => {
|
|
787
|
+
v.searchConfig && c.push(v.searchConfig);
|
|
788
|
+
}), c.forEach((v) => {
|
|
789
|
+
s.value.some((S) => S.name === v.name) ? s.value = s.value.map((S) => S.name === v.name ? {
|
|
788
790
|
...S,
|
|
789
791
|
...v
|
|
790
|
-
} : S) :
|
|
791
|
-
})),
|
|
792
|
-
|
|
793
|
-
const v = Ia(
|
|
794
|
-
Object.assign(
|
|
792
|
+
} : S) : s.value.push(v);
|
|
793
|
+
})), d === "all" || d === "searchMap" || d === "columns") {
|
|
794
|
+
u({ current: 1 });
|
|
795
|
+
const v = Ia(c);
|
|
796
|
+
Object.assign(r, { ...v });
|
|
795
797
|
for (const S in v)
|
|
796
798
|
l[S] || (l[S] = v[S]);
|
|
797
799
|
}
|
|
798
|
-
(
|
|
800
|
+
(d === "all" || d === "params") && !T.value && (u({ current: 1 }), Object.assign(l, t.value));
|
|
799
801
|
};
|
|
800
|
-
function
|
|
801
|
-
|
|
802
|
+
function y(d) {
|
|
803
|
+
u({ current: 1 }), Object.assign(l, d);
|
|
802
804
|
}
|
|
803
|
-
return { formDataRef:
|
|
805
|
+
return { formDataRef: s, formParamsRef: l, defaultParamsRef: r, setFormParams: y };
|
|
804
806
|
}
|
|
805
807
|
function Oa({ columns: e, columnsState: o, changeColumns: t }) {
|
|
806
|
-
const n = O(void 0),
|
|
808
|
+
const n = O(void 0), u = ce({}), l = ce({}), r = ce({}), s = O([]);
|
|
807
809
|
q(() => e.value, () => {
|
|
808
|
-
var
|
|
809
|
-
(
|
|
810
|
-
const v = ot(
|
|
811
|
-
v && (
|
|
810
|
+
var y;
|
|
811
|
+
(y = f(e)) == null || y.forEach(({ show: d, key: c, fixed: p }, g) => {
|
|
812
|
+
const v = ot(c, g);
|
|
813
|
+
v && (r[v] = { show: d === void 0 ? !0 : d, fixed: p });
|
|
812
814
|
});
|
|
813
815
|
}, {
|
|
814
816
|
deep: !0,
|
|
815
817
|
immediate: !0
|
|
816
818
|
}), q(() => e.value, () => {
|
|
817
|
-
const
|
|
818
|
-
|
|
819
|
+
const y = f(e).map((d) => d.key);
|
|
820
|
+
h(y);
|
|
819
821
|
}, {
|
|
820
822
|
deep: !0,
|
|
821
823
|
immediate: !0
|
|
822
824
|
}), fe(() => {
|
|
823
|
-
var
|
|
824
|
-
const
|
|
825
|
-
...(
|
|
826
|
-
...
|
|
825
|
+
var d;
|
|
826
|
+
const y = {
|
|
827
|
+
...(d = f(o)) == null ? void 0 : d.value,
|
|
828
|
+
...f(r)
|
|
827
829
|
};
|
|
828
|
-
Object.assign(
|
|
830
|
+
Object.assign(u, y), Object.assign(l, y);
|
|
829
831
|
});
|
|
830
|
-
function T(
|
|
831
|
-
n.value =
|
|
832
|
+
function T(y, d) {
|
|
833
|
+
n.value = d, Object.assign(u, y), t == null || t(u, d === "fixed");
|
|
832
834
|
}
|
|
833
|
-
function
|
|
834
|
-
|
|
835
|
+
function h(y) {
|
|
836
|
+
s.value = y;
|
|
835
837
|
}
|
|
836
838
|
return {
|
|
837
|
-
columnsMap:
|
|
839
|
+
columnsMap: u,
|
|
838
840
|
operationType: n,
|
|
839
841
|
setColumnsMap: T,
|
|
840
|
-
sortKeyColumns:
|
|
842
|
+
sortKeyColumns: s,
|
|
841
843
|
cacheColumnsMap: l,
|
|
842
|
-
setSortKeyColumns:
|
|
844
|
+
setSortKeyColumns: h
|
|
843
845
|
};
|
|
844
846
|
}
|
|
845
847
|
function Ba(e) {
|
|
@@ -850,112 +852,112 @@ function Ba(e) {
|
|
|
850
852
|
autoScroll: n
|
|
851
853
|
};
|
|
852
854
|
}
|
|
853
|
-
function Da({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll:
|
|
854
|
-
const
|
|
855
|
+
function Da({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll: u, neverScroll: l }) {
|
|
856
|
+
const r = O([]), s = O([]);
|
|
855
857
|
q([
|
|
856
858
|
() => e.value,
|
|
857
859
|
() => o.value,
|
|
858
860
|
() => t.value,
|
|
859
861
|
() => n.value,
|
|
860
|
-
() =>
|
|
862
|
+
() => u.value,
|
|
861
863
|
() => l.value
|
|
862
864
|
], () => {
|
|
863
|
-
|
|
865
|
+
r.value = U(y(f(o))), s.value = U(y(f(o)));
|
|
864
866
|
}, {
|
|
865
867
|
deep: !0,
|
|
866
868
|
immediate: !0
|
|
867
869
|
});
|
|
868
870
|
const T = w(() => {
|
|
869
|
-
const
|
|
871
|
+
const g = h(f(r).filter((F) => F.fixed === "left")), v = h(f(r).filter((F) => F.fixed !== "left" && F.fixed !== "right")), S = h(f(r).filter((F) => F.fixed === "right"));
|
|
870
872
|
return [
|
|
871
|
-
...
|
|
873
|
+
...g,
|
|
872
874
|
...v,
|
|
873
875
|
...S
|
|
874
876
|
];
|
|
875
877
|
});
|
|
876
|
-
function
|
|
877
|
-
return
|
|
878
|
+
function h(g) {
|
|
879
|
+
return g.sort((v, S) => _t(v, S, "order", 0));
|
|
878
880
|
}
|
|
879
|
-
function g
|
|
880
|
-
return U(
|
|
881
|
+
function y(g) {
|
|
882
|
+
return U(g).map((v, S) => {
|
|
881
883
|
var F;
|
|
882
|
-
if (v.dataIndex === "action" || S ===
|
|
884
|
+
if (v.dataIndex === "action" || S === g.length - 1 ? v.resizable = !1 : v.resizable = te(v.resizable) ? v.resizable : !!(ut(v.width) && f(n)), !v.width || f(l))
|
|
883
885
|
return v;
|
|
884
|
-
if (v.dataIndex === "action" &&
|
|
885
|
-
if ((F =
|
|
886
|
+
if (v.dataIndex === "action" && f(u))
|
|
887
|
+
if ((F = f(e)) != null && F.x || !f(t))
|
|
886
888
|
v.width = v.width || 100, v.fixed = "right";
|
|
887
889
|
else {
|
|
888
|
-
const x =
|
|
890
|
+
const x = f(o).find((I) => I.dataIndex === v.dataIndex);
|
|
889
891
|
v.width = (x == null ? void 0 : x.width) || "", v.fixed = x == null ? void 0 : x.fixed;
|
|
890
892
|
}
|
|
891
893
|
return v;
|
|
892
894
|
});
|
|
893
895
|
}
|
|
894
|
-
function
|
|
895
|
-
|
|
896
|
+
function d(g, v) {
|
|
897
|
+
r.value = r.value.map((S) => (S.uuid === v.uuid && (S.width = g), S));
|
|
896
898
|
}
|
|
897
|
-
function
|
|
898
|
-
if (
|
|
899
|
-
|
|
899
|
+
function c(g) {
|
|
900
|
+
if (g.length <= 0) {
|
|
901
|
+
r.value = [];
|
|
900
902
|
return;
|
|
901
903
|
}
|
|
902
|
-
nt(
|
|
904
|
+
nt(y(U(g)), r.value) || (r.value = y(U(g)));
|
|
903
905
|
}
|
|
904
|
-
function p(
|
|
906
|
+
function p(g) {
|
|
905
907
|
let v = U(o.value);
|
|
906
908
|
v = v.map((S) => {
|
|
907
909
|
var x, I, B;
|
|
908
910
|
const F = S.key ? {
|
|
909
|
-
show: (x =
|
|
910
|
-
fixed: (I =
|
|
911
|
-
order: (B =
|
|
911
|
+
show: (x = g[S.key]) == null ? void 0 : x.show,
|
|
912
|
+
fixed: (I = g[S.key]) == null ? void 0 : I.fixed,
|
|
913
|
+
order: (B = g[S.key]) == null ? void 0 : B.order
|
|
912
914
|
} : {};
|
|
913
915
|
return {
|
|
914
916
|
...S,
|
|
915
917
|
...F
|
|
916
918
|
};
|
|
917
|
-
}),
|
|
919
|
+
}), c(v);
|
|
918
920
|
}
|
|
919
921
|
return {
|
|
920
922
|
breakpoint: t,
|
|
921
923
|
getProColumns: T,
|
|
922
|
-
cacheProColumns:
|
|
923
|
-
setColumns:
|
|
924
|
+
cacheProColumns: s,
|
|
925
|
+
setColumns: c,
|
|
924
926
|
changeColumns: p,
|
|
925
|
-
resizeColumnWidth:
|
|
927
|
+
resizeColumnWidth: d
|
|
926
928
|
};
|
|
927
929
|
}
|
|
928
930
|
function Na(e) {
|
|
929
|
-
const o = w(() => e.scroll), t = w(() => e.autoScroll), n = w(() => e.modalScroll),
|
|
931
|
+
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
932
|
return {
|
|
931
933
|
scroll: o,
|
|
932
|
-
neverScroll:
|
|
934
|
+
neverScroll: u,
|
|
933
935
|
rowSelection: l,
|
|
934
936
|
autoScroll: t,
|
|
935
937
|
modalScroll: n,
|
|
936
|
-
scrollBreakpoint:
|
|
938
|
+
scrollBreakpoint: r
|
|
937
939
|
};
|
|
938
940
|
}
|
|
939
|
-
function ja({ scroll: e, columns: o, autoScroll: t, modalScroll: n, neverScroll:
|
|
940
|
-
const
|
|
941
|
-
var
|
|
942
|
-
return
|
|
943
|
-
}),
|
|
944
|
-
let
|
|
945
|
-
const p =
|
|
941
|
+
function ja({ scroll: e, columns: o, autoScroll: t, modalScroll: n, neverScroll: u, rowSelection: l, screensRef: r, innerWidth: s, scrollBreakpoint: T }) {
|
|
942
|
+
const h = w(() => {
|
|
943
|
+
var c, p, g;
|
|
944
|
+
return f(T) ? ut(f(T)) ? s.value > f(T) : Gt(f(T)) ? (c = r.value) == null ? void 0 : c[f(T)] : (p = r.value) == null ? void 0 : p.xl : (g = r.value) == null ? void 0 : g.xl;
|
|
945
|
+
}), y = w(() => {
|
|
946
|
+
let c = 0;
|
|
947
|
+
const p = f(l) ? 60 : 0, g = 150, v = U(f(o));
|
|
946
948
|
v.forEach((x) => {
|
|
947
|
-
|
|
949
|
+
c += Number.parseInt(x.width) || 0;
|
|
948
950
|
});
|
|
949
951
|
const F = v.filter((x) => !Reflect.has(x, "width")).length;
|
|
950
|
-
return F !== 0 && (
|
|
952
|
+
return F !== 0 && (c += F * g), p && (c += p), c;
|
|
951
953
|
});
|
|
952
954
|
return { getScrollRef: w(() => {
|
|
953
955
|
var p;
|
|
954
|
-
const { xl:
|
|
955
|
-
return
|
|
956
|
-
y: ((p =
|
|
957
|
-
} :
|
|
958
|
-
}), breakpoint:
|
|
956
|
+
const { xl: c } = r.value;
|
|
957
|
+
return f(u) ? {} : f(e) && Object.keys(f(e)).length ? f(e) : f(n) ? {
|
|
958
|
+
y: ((p = f(e)) == null ? void 0 : p.y) || (c ? 400 : 235)
|
|
959
|
+
} : f(t) ? h.value ? {} : te(h.value) ? { x: f(y) } : {} : {};
|
|
960
|
+
}), breakpoint: h };
|
|
959
961
|
}
|
|
960
962
|
const ft = Symbol("table-context"), Ma = (e = Symbol(), o) => zt(e, o || {}), ka = (e) => {
|
|
961
963
|
Et(ft, e);
|
|
@@ -966,22 +968,22 @@ function Ea(e, o) {
|
|
|
966
968
|
n();
|
|
967
969
|
});
|
|
968
970
|
function n() {
|
|
969
|
-
Object.keys(e).map((
|
|
970
|
-
r
|
|
971
|
+
Object.keys(e).map((r) => {
|
|
972
|
+
u(r, e[r]);
|
|
971
973
|
});
|
|
972
|
-
const l = o.find((
|
|
973
|
-
l &&
|
|
974
|
+
const l = o.find((r) => r.valueType === "dateRange");
|
|
975
|
+
l && u(l.name || "", e[l.rangeStartName || "start"] ? [
|
|
974
976
|
e[l.rangeStartName || "start"],
|
|
975
977
|
e[l.rangeEndName || "end"]
|
|
976
978
|
] : []);
|
|
977
979
|
}
|
|
978
|
-
function
|
|
979
|
-
t[l] =
|
|
980
|
+
function u(l, r) {
|
|
981
|
+
t[l] = r;
|
|
980
982
|
}
|
|
981
983
|
return {
|
|
982
984
|
formState: t,
|
|
983
985
|
resetFormState: n,
|
|
984
|
-
changeFormState:
|
|
986
|
+
changeFormState: u
|
|
985
987
|
};
|
|
986
988
|
}
|
|
987
989
|
const za = (e) => ({
|
|
@@ -1042,18 +1044,18 @@ const za = (e) => ({
|
|
|
1042
1044
|
expose: n
|
|
1043
1045
|
}) {
|
|
1044
1046
|
const {
|
|
1045
|
-
wrapSSR:
|
|
1047
|
+
wrapSSR: u,
|
|
1046
1048
|
hashId: l
|
|
1047
|
-
} = Pe("ProTableForm", [za], e.prefixCls),
|
|
1048
|
-
formState:
|
|
1049
|
+
} = Pe("ProTableForm", [za], e.prefixCls), r = Ka(), {
|
|
1050
|
+
formState: s,
|
|
1049
1051
|
resetFormState: T,
|
|
1050
|
-
changeFormState:
|
|
1051
|
-
} = Ea(e.defaultParams || {}, e.searchMap || []),
|
|
1052
|
+
changeFormState: h
|
|
1053
|
+
} = Ea(e.defaultParams || {}, e.searchMap || []), y = O(!1), d = w(() => {
|
|
1052
1054
|
var a;
|
|
1053
1055
|
return !!((a = e.search) != null && a.showSearch);
|
|
1054
|
-
}),
|
|
1056
|
+
}), c = w(() => {
|
|
1055
1057
|
var a, b;
|
|
1056
|
-
return ((a = e.search) == null ? void 0 : a.showReset) === void 0 ?
|
|
1058
|
+
return ((a = e.search) == null ? void 0 : a.showReset) === void 0 ? d.value : (b = e.search) == null ? void 0 : b.showReset;
|
|
1057
1059
|
}), p = [{
|
|
1058
1060
|
value: "xxl",
|
|
1059
1061
|
span: 4
|
|
@@ -1072,7 +1074,7 @@ const za = (e) => ({
|
|
|
1072
1074
|
}, {
|
|
1073
1075
|
value: "xs",
|
|
1074
1076
|
span: 1
|
|
1075
|
-
}],
|
|
1077
|
+
}], g = w(() => {
|
|
1076
1078
|
var a;
|
|
1077
1079
|
return v((a = e.search) == null ? void 0 : a.span);
|
|
1078
1080
|
});
|
|
@@ -1080,20 +1082,20 @@ const za = (e) => ({
|
|
|
1080
1082
|
var a;
|
|
1081
1083
|
return (a = e.search) == null ? void 0 : a.defaultCollapsed;
|
|
1082
1084
|
}, (a) => {
|
|
1083
|
-
|
|
1085
|
+
y.value = y.value || !!a;
|
|
1084
1086
|
});
|
|
1085
1087
|
const v = (a) => {
|
|
1086
1088
|
let b = 4;
|
|
1087
1089
|
for (let P = 0; P < p.length; P += 1) {
|
|
1088
1090
|
const $ = p[P].value;
|
|
1089
|
-
if (
|
|
1091
|
+
if (r.value[$]) {
|
|
1090
1092
|
b = (a == null ? void 0 : a[$]) || (e.modal ? 3 : p[P].span);
|
|
1091
1093
|
break;
|
|
1092
1094
|
}
|
|
1093
1095
|
}
|
|
1094
1096
|
return b;
|
|
1095
1097
|
}, S = (a) => {
|
|
1096
|
-
|
|
1098
|
+
y.value = a;
|
|
1097
1099
|
}, F = (a, b, P) => (a + 1) % b === 0 ? {
|
|
1098
1100
|
...P,
|
|
1099
1101
|
marginRight: 0
|
|
@@ -1104,34 +1106,34 @@ const za = (e) => ({
|
|
|
1104
1106
|
var P, $, N;
|
|
1105
1107
|
switch (b.valueType) {
|
|
1106
1108
|
case "text":
|
|
1107
|
-
|
|
1109
|
+
h(b.name || "", a || b.initialValue || "");
|
|
1108
1110
|
break;
|
|
1109
1111
|
case "select":
|
|
1110
|
-
|
|
1112
|
+
h(b.name || "", a || a === 0 ? a : b.initialValue || void 0);
|
|
1111
1113
|
break;
|
|
1112
1114
|
case "treeSelect":
|
|
1113
|
-
|
|
1115
|
+
h(b.name || "", a || a === 0 ? a : b.initialValue || ((P = b.field) != null && P.treeCheckable || ($ = b.field) != null && $.multiple ? [] : null));
|
|
1114
1116
|
break;
|
|
1115
1117
|
case "date":
|
|
1116
|
-
|
|
1118
|
+
h(b.name || "", a ? H(a).format(b.valueFormat || "YYYY-MM-DD") : b.initialValue || null);
|
|
1117
1119
|
break;
|
|
1118
1120
|
case "dateMonth":
|
|
1119
|
-
|
|
1121
|
+
h(b.name || "", a ? H(a).format("YYYY-MM") : b.initialValue || null);
|
|
1120
1122
|
break;
|
|
1121
1123
|
case "dateRange":
|
|
1122
|
-
|
|
1124
|
+
h(b.name || "", a && a.length > 0 ? [H(a[0]).format(b.valueFormat || "YYYY-MM-DD"), H(a[1]).format(b.valueFormat || "YYYY-MM-DD")] : b.initialValue || null);
|
|
1123
1125
|
break;
|
|
1124
1126
|
case "time":
|
|
1125
|
-
|
|
1127
|
+
h(b.name || "", a ? H(a).format(b.valueFormat || "HH:mm:ss") : b.initialValue || null);
|
|
1126
1128
|
break;
|
|
1127
1129
|
}
|
|
1128
1130
|
(N = e.search) != null && N.showSearch || b.valueType === "text" || (b.valueType === "treeSelect" || b.valueType, B());
|
|
1129
1131
|
}, I = () => {
|
|
1130
|
-
const a = U(
|
|
1131
|
-
return b && (a[b.name] =
|
|
1132
|
+
const a = U(s), b = e.searchMap.find((N) => N.valueType === "text") || "", P = e.searchMap.find((N) => N.valueType === "dateRange") || "", $ = e.searchMap.find((N) => N.valueType === "treeSelect") || "";
|
|
1133
|
+
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
1134
|
}, B = (a = !1, b) => {
|
|
1133
1135
|
Kt(() => {
|
|
1134
|
-
(!
|
|
1136
|
+
(!d.value || a) && o("search", I(), !!b);
|
|
1135
1137
|
});
|
|
1136
1138
|
}, W = (a = !0) => {
|
|
1137
1139
|
T(), B(!0, a);
|
|
@@ -1140,15 +1142,15 @@ const za = (e) => ({
|
|
|
1140
1142
|
getFormState: () => I(),
|
|
1141
1143
|
resetForm: W
|
|
1142
1144
|
});
|
|
1143
|
-
const K = () => (
|
|
1144
|
-
default: () => [
|
|
1145
|
+
const K = () => (d.value || c.value) && i(le, null, {
|
|
1146
|
+
default: () => [c.value && i(tt, {
|
|
1145
1147
|
onClick: () => W()
|
|
1146
1148
|
}, {
|
|
1147
1149
|
default: () => {
|
|
1148
1150
|
var a;
|
|
1149
1151
|
return [((a = e.search) == null ? void 0 : a.resetText) || "重置"];
|
|
1150
1152
|
}
|
|
1151
|
-
}),
|
|
1153
|
+
}), d.value && i(tt, {
|
|
1152
1154
|
loading: e.loading,
|
|
1153
1155
|
type: "primary",
|
|
1154
1156
|
onClick: () => B(!0)
|
|
@@ -1162,30 +1164,30 @@ const za = (e) => ({
|
|
|
1162
1164
|
formItemStyle: a,
|
|
1163
1165
|
advanced: b,
|
|
1164
1166
|
showAdvanced: P = !0
|
|
1165
|
-
}) =>
|
|
1167
|
+
}) => i("div", {
|
|
1166
1168
|
style: a,
|
|
1167
1169
|
class: `${e.prefixCls}-form-collapse-button ${l.value}`
|
|
1168
|
-
}, [
|
|
1170
|
+
}, [i(le, {
|
|
1169
1171
|
size: 16
|
|
1170
1172
|
}, {
|
|
1171
1173
|
default: () => {
|
|
1172
1174
|
var $, N;
|
|
1173
|
-
return [K(), P &&
|
|
1175
|
+
return [K(), P && i("span", {
|
|
1174
1176
|
class: `${e.prefixCls}-a ${l.value}`,
|
|
1175
1177
|
onClick: () => S(!b)
|
|
1176
|
-
}, [b ? "收起" : "展开", ($ = e.search) != null && $.collapseRender ? (N = e.search) == null ? void 0 : N.collapseRender() : b ?
|
|
1178
|
+
}, [b ? "收起" : "展开", ($ = e.search) != null && $.collapseRender ? (N = e.search) == null ? void 0 : N.collapseRender() : b ? i(ra, null, null) : i(ca, null, null)])];
|
|
1177
1179
|
}
|
|
1178
1180
|
})]), E = (a) => {
|
|
1179
1181
|
var $, N;
|
|
1180
1182
|
let b;
|
|
1181
|
-
const P =
|
|
1183
|
+
const P = d.value ? at : at.Search;
|
|
1182
1184
|
switch (a.valueType) {
|
|
1183
1185
|
case "text":
|
|
1184
|
-
b =
|
|
1186
|
+
b = i(P, G({
|
|
1185
1187
|
style: {
|
|
1186
1188
|
width: "100%"
|
|
1187
1189
|
},
|
|
1188
|
-
value:
|
|
1190
|
+
value: s[a.name],
|
|
1189
1191
|
placeholder: a.placeholder || "请输入",
|
|
1190
1192
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1191
1193
|
onChange: (m) => x(m.target.value, a),
|
|
@@ -1193,17 +1195,17 @@ const za = (e) => ({
|
|
|
1193
1195
|
}, a.field || {}), null);
|
|
1194
1196
|
break;
|
|
1195
1197
|
case "select":
|
|
1196
|
-
b =
|
|
1198
|
+
b = i(Zt, G({
|
|
1197
1199
|
style: {
|
|
1198
1200
|
width: "100%"
|
|
1199
1201
|
},
|
|
1200
|
-
value: a.loading ? void 0 :
|
|
1202
|
+
value: a.loading ? void 0 : s[a.name],
|
|
1201
1203
|
optionFilterProp: "label",
|
|
1202
1204
|
placeholder: a.placeholder || "请选择",
|
|
1203
1205
|
showSearch: a.showSearch,
|
|
1204
1206
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1205
1207
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
1206
|
-
notFoundContent: a.loading === void 0 ? void 0 : a.loading ?
|
|
1208
|
+
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1207
1209
|
size: "small"
|
|
1208
1210
|
}, null) : void 0,
|
|
1209
1211
|
onChange: (m) => x(m, a),
|
|
@@ -1214,27 +1216,27 @@ const za = (e) => ({
|
|
|
1214
1216
|
}, a.field || {}), null);
|
|
1215
1217
|
break;
|
|
1216
1218
|
case "treeSelect":
|
|
1217
|
-
b =
|
|
1219
|
+
b = i(Qt, G({
|
|
1218
1220
|
style: {
|
|
1219
1221
|
width: "100%"
|
|
1220
1222
|
},
|
|
1221
|
-
value:
|
|
1223
|
+
value: s[a.name],
|
|
1222
1224
|
placeholder: a.placeholder || "请选择",
|
|
1223
1225
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1224
1226
|
treeData: a.valueEnum,
|
|
1225
1227
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
1226
|
-
notFoundContent: a.loading === void 0 ? void 0 : a.loading ?
|
|
1228
|
+
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1227
1229
|
size: "small"
|
|
1228
1230
|
}, null) : void 0,
|
|
1229
1231
|
onChange: (m) => x(m, a)
|
|
1230
1232
|
}, a.field || {}), null);
|
|
1231
1233
|
break;
|
|
1232
1234
|
case "date":
|
|
1233
|
-
b =
|
|
1235
|
+
b = i(rt, G({
|
|
1234
1236
|
style: {
|
|
1235
1237
|
width: "100%"
|
|
1236
1238
|
},
|
|
1237
|
-
value:
|
|
1239
|
+
value: s[a.name] ? H(s[a.name], a.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1238
1240
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
1239
1241
|
placeholder: a.placeholder || "请选择",
|
|
1240
1242
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
@@ -1245,22 +1247,22 @@ const za = (e) => ({
|
|
|
1245
1247
|
}, a.field || {}), null);
|
|
1246
1248
|
break;
|
|
1247
1249
|
case "dateMonth":
|
|
1248
|
-
b =
|
|
1250
|
+
b = i(Ya, G({
|
|
1249
1251
|
style: {
|
|
1250
1252
|
width: "100%"
|
|
1251
1253
|
},
|
|
1252
|
-
value:
|
|
1254
|
+
value: s[a.name] ? H(s[a.name], a.valueFormat || "YYYY-MM") : void 0,
|
|
1253
1255
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
1254
1256
|
placeholder: a.placeholder || "请选择",
|
|
1255
1257
|
onChange: (m) => x(m, a)
|
|
1256
1258
|
}, a.field || {}), null);
|
|
1257
1259
|
break;
|
|
1258
1260
|
case "dateRange":
|
|
1259
|
-
b =
|
|
1261
|
+
b = i(La, G({
|
|
1260
1262
|
style: {
|
|
1261
1263
|
width: "100%"
|
|
1262
1264
|
},
|
|
1263
|
-
value: (N =
|
|
1265
|
+
value: (N = s[a.name]) != null && N.length ? [H(s[a.name][0], a.valueFormat || "YYYY-MM-DD HH:mm:ss"), H(s[a.name][1], a.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1264
1266
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
1265
1267
|
placeholder: a.placeholder || ["开始日期", "结束日期"],
|
|
1266
1268
|
format: a.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1269,11 +1271,11 @@ const za = (e) => ({
|
|
|
1269
1271
|
}, a.field || {}), null);
|
|
1270
1272
|
break;
|
|
1271
1273
|
case "time":
|
|
1272
|
-
b =
|
|
1274
|
+
b = i(Jt, G({
|
|
1273
1275
|
style: {
|
|
1274
1276
|
width: "100%"
|
|
1275
1277
|
},
|
|
1276
|
-
value:
|
|
1278
|
+
value: s[a.name] ? H(s[a.name], a.valueFormat || "HH:mm:ss") : void 0,
|
|
1277
1279
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
1278
1280
|
placeholder: a.placeholder || "请选择",
|
|
1279
1281
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
@@ -1287,19 +1289,19 @@ const za = (e) => ({
|
|
|
1287
1289
|
}, D = ({
|
|
1288
1290
|
formItemStyle: a,
|
|
1289
1291
|
item: b
|
|
1290
|
-
}) =>
|
|
1292
|
+
}) => i("div", {
|
|
1291
1293
|
class: `${e.prefixCls}-form-item`,
|
|
1292
1294
|
style: a
|
|
1293
|
-
}, [
|
|
1295
|
+
}, [i(et.Item, null, {
|
|
1294
1296
|
default: () => [b.__v_isVNode ? b : E(b)]
|
|
1295
1297
|
})]), oe = () => {
|
|
1296
1298
|
var b;
|
|
1297
1299
|
const a = [...e.searchMap, ...((b = t.default) == null ? void 0 : b.call(t)) || []];
|
|
1298
1300
|
return a.map((P, $) => {
|
|
1299
1301
|
const N = {
|
|
1300
|
-
width: `${(100 - (
|
|
1301
|
-
}, m = F($,
|
|
1302
|
-
return a.length <
|
|
1302
|
+
width: `${(100 - (g.value - 1) * 2) / g.value}%`
|
|
1303
|
+
}, m = F($, g.value, N);
|
|
1304
|
+
return a.length < g.value || y.value ? i(Ie, null, [D({
|
|
1303
1305
|
formItemStyle: m,
|
|
1304
1306
|
item: P
|
|
1305
1307
|
}), $ === a.length - 1 && A({
|
|
@@ -1307,38 +1309,38 @@ const za = (e) => ({
|
|
|
1307
1309
|
flex: 1,
|
|
1308
1310
|
justifyContent: "flex-end"
|
|
1309
1311
|
},
|
|
1310
|
-
advanced:
|
|
1311
|
-
showAdvanced:
|
|
1312
|
-
})]) :
|
|
1312
|
+
advanced: y.value,
|
|
1313
|
+
showAdvanced: y.value
|
|
1314
|
+
})]) : i(Ie, null, [$ < g.value - 1 && D({
|
|
1313
1315
|
formItemStyle: m,
|
|
1314
1316
|
item: P
|
|
1315
|
-
}), $ ===
|
|
1317
|
+
}), $ === g.value - 1 && g.value - 1 === 0 && D({
|
|
1316
1318
|
formItemStyle: m,
|
|
1317
1319
|
item: P
|
|
1318
|
-
}), $ ===
|
|
1320
|
+
}), $ === g.value - 1 && A({
|
|
1319
1321
|
formItemStyle: {
|
|
1320
1322
|
flex: 1,
|
|
1321
1323
|
justifyContent: "flex-end"
|
|
1322
1324
|
},
|
|
1323
1325
|
advanced: !1,
|
|
1324
|
-
showAdvanced: a.length >=
|
|
1326
|
+
showAdvanced: a.length >= g.value
|
|
1325
1327
|
})]);
|
|
1326
1328
|
});
|
|
1327
1329
|
};
|
|
1328
1330
|
return () => {
|
|
1329
1331
|
var a, b;
|
|
1330
|
-
return
|
|
1332
|
+
return u(i("div", {
|
|
1331
1333
|
class: {
|
|
1332
1334
|
[`${l.value}`]: !0,
|
|
1333
|
-
[`${
|
|
1335
|
+
[`${f(e.prefixCls)}-search`]: !0,
|
|
1334
1336
|
[`${(a = e.search) == null ? void 0 : a.className}`]: (b = e.search) == null ? void 0 : b.className
|
|
1335
1337
|
}
|
|
1336
|
-
}, [
|
|
1337
|
-
class: `${
|
|
1338
|
+
}, [i(et, {
|
|
1339
|
+
class: `${f(e.prefixCls)}-form ${l.value}`,
|
|
1338
1340
|
layout: "horizontal"
|
|
1339
1341
|
}, {
|
|
1340
|
-
default: () => [
|
|
1341
|
-
class: `${
|
|
1342
|
+
default: () => [i("div", {
|
|
1343
|
+
class: `${f(e.prefixCls)}-form-container ${l.value}`
|
|
1342
1344
|
}, [oe()])]
|
|
1343
1345
|
})]));
|
|
1344
1346
|
};
|
|
@@ -1348,8 +1350,8 @@ ht.inheritAttrs = !1;
|
|
|
1348
1350
|
function Aa(e, o) {
|
|
1349
1351
|
const t = Ae({}, e);
|
|
1350
1352
|
for (let n = 0; n < o.length; n += 1) {
|
|
1351
|
-
const
|
|
1352
|
-
delete t[
|
|
1353
|
+
const u = o[n];
|
|
1354
|
+
delete t[u];
|
|
1353
1355
|
}
|
|
1354
1356
|
return t;
|
|
1355
1357
|
}
|
|
@@ -1443,34 +1445,34 @@ const be = (e) => {
|
|
|
1443
1445
|
treeKey: t,
|
|
1444
1446
|
fixed: n
|
|
1445
1447
|
}, {
|
|
1446
|
-
slots:
|
|
1448
|
+
slots: u
|
|
1447
1449
|
}) => {
|
|
1448
1450
|
const {
|
|
1449
1451
|
cacheColumns: l,
|
|
1450
|
-
settingsAction:
|
|
1452
|
+
settingsAction: r
|
|
1451
1453
|
} = de();
|
|
1452
|
-
return o ?
|
|
1454
|
+
return o ? i(Z, {
|
|
1453
1455
|
title: e
|
|
1454
1456
|
}, {
|
|
1455
1457
|
default: () => {
|
|
1456
|
-
var
|
|
1457
|
-
return [
|
|
1458
|
+
var s;
|
|
1459
|
+
return [i("span", {
|
|
1458
1460
|
onClick: (T) => {
|
|
1459
|
-
var p,
|
|
1461
|
+
var p, g;
|
|
1460
1462
|
T.stopPropagation(), T.preventDefault();
|
|
1461
|
-
const
|
|
1462
|
-
if (typeof
|
|
1463
|
+
const h = ((p = f(l).find((v) => v.uuid === t)) == null ? void 0 : p.key) || "", y = (r == null ? void 0 : r.columnsMap[h]) || {};
|
|
1464
|
+
if (typeof y.disable == "boolean" ? y.disable : (g = y.disable) == null ? void 0 : g.icon)
|
|
1463
1465
|
return;
|
|
1464
|
-
const
|
|
1465
|
-
...
|
|
1466
|
-
[
|
|
1467
|
-
...
|
|
1466
|
+
const c = {
|
|
1467
|
+
...r == null ? void 0 : r.columnsMap,
|
|
1468
|
+
[h]: {
|
|
1469
|
+
...y,
|
|
1468
1470
|
fixed: n
|
|
1469
1471
|
}
|
|
1470
1472
|
};
|
|
1471
|
-
|
|
1473
|
+
r == null || r.setColumnsMap(c, "fixed");
|
|
1472
1474
|
}
|
|
1473
|
-
}, [(
|
|
1475
|
+
}, [(s = u.default) == null ? void 0 : s.call(u)])];
|
|
1474
1476
|
}
|
|
1475
1477
|
}) : null;
|
|
1476
1478
|
}, Ha = /* @__PURE__ */ ae({
|
|
@@ -1486,40 +1488,40 @@ const be = (e) => {
|
|
|
1486
1488
|
const {
|
|
1487
1489
|
cacheColumns: o
|
|
1488
1490
|
} = de(), t = w(() => {
|
|
1489
|
-
var
|
|
1490
|
-
return ((
|
|
1491
|
+
var u;
|
|
1492
|
+
return ((u = o.value.find((l) => l.uuid === e.treeKey)) == null ? void 0 : u.key) || "";
|
|
1491
1493
|
}), n = w(() => t.value === "action" && e.autoScroll);
|
|
1492
1494
|
return () => {
|
|
1493
|
-
const
|
|
1495
|
+
const u = i("span", {
|
|
1494
1496
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
1495
|
-
}, [
|
|
1497
|
+
}, [i(je, {
|
|
1496
1498
|
treeKey: e.treeKey || "",
|
|
1497
1499
|
fixed: "left",
|
|
1498
1500
|
title: "固定在列首",
|
|
1499
1501
|
show: e.fixed !== "left" && !n.value
|
|
1500
1502
|
}, {
|
|
1501
|
-
default: () => [
|
|
1502
|
-
}),
|
|
1503
|
+
default: () => [i(da, null, null)]
|
|
1504
|
+
}), i(je, {
|
|
1503
1505
|
treeKey: e.treeKey || "",
|
|
1504
1506
|
fixed: void 0,
|
|
1505
1507
|
title: "不固定",
|
|
1506
1508
|
show: !!e.fixed && !n.value
|
|
1507
1509
|
}, {
|
|
1508
|
-
default: () => [
|
|
1509
|
-
}),
|
|
1510
|
+
default: () => [i(fa, null, null)]
|
|
1511
|
+
}), i(je, {
|
|
1510
1512
|
treeKey: e.treeKey || "",
|
|
1511
1513
|
fixed: "right",
|
|
1512
1514
|
title: "固定在列尾",
|
|
1513
1515
|
show: e.fixed !== "right"
|
|
1514
1516
|
}, {
|
|
1515
|
-
default: () => [
|
|
1517
|
+
default: () => [i(ha, null, null)]
|
|
1516
1518
|
})]);
|
|
1517
|
-
return
|
|
1519
|
+
return i("span", {
|
|
1518
1520
|
class: [`${e.className}-list-item`, e.hashId],
|
|
1519
1521
|
key: e.treeKey
|
|
1520
|
-
}, [
|
|
1522
|
+
}, [i("div", {
|
|
1521
1523
|
class: [`${e.className}-list-item-title`, e.hashId]
|
|
1522
|
-
}, [e.title]),
|
|
1524
|
+
}, [e.title]), u]);
|
|
1523
1525
|
};
|
|
1524
1526
|
}
|
|
1525
1527
|
}), Me = /* @__PURE__ */ ae({
|
|
@@ -1537,18 +1539,18 @@ const be = (e) => {
|
|
|
1537
1539
|
}
|
|
1538
1540
|
},
|
|
1539
1541
|
setup(e) {
|
|
1540
|
-
const o = O(Ye().uuid(15)), t = w(() => e.list && e.list.length > 0), n = O([]),
|
|
1542
|
+
const o = O(Ye().uuid(15)), t = w(() => e.list && e.list.length > 0), n = O([]), u = O([]), {
|
|
1541
1543
|
cacheColumns: l,
|
|
1542
|
-
slots:
|
|
1543
|
-
settingsAction:
|
|
1544
|
-
} = de(), T = (
|
|
1545
|
-
key:
|
|
1544
|
+
slots: r,
|
|
1545
|
+
settingsAction: s
|
|
1546
|
+
} = de(), T = (c, p) => c.map(({
|
|
1547
|
+
key: g,
|
|
1546
1548
|
children: v,
|
|
1547
1549
|
uuid: S,
|
|
1548
1550
|
...F
|
|
1549
1551
|
}) => {
|
|
1550
1552
|
var W;
|
|
1551
|
-
const x = (
|
|
1553
|
+
const x = (s == null ? void 0 : s.columnsMap[g || "null"]) || {
|
|
1552
1554
|
show: !0
|
|
1553
1555
|
};
|
|
1554
1556
|
let I = !1;
|
|
@@ -1565,72 +1567,72 @@ const be = (e) => {
|
|
|
1565
1567
|
return v && (B.children = T(v, x)), B;
|
|
1566
1568
|
});
|
|
1567
1569
|
fe(() => {
|
|
1568
|
-
const
|
|
1569
|
-
n.value =
|
|
1570
|
+
const c = T(e.list || []);
|
|
1571
|
+
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
1572
|
});
|
|
1571
|
-
const
|
|
1573
|
+
const h = be((c, p, g) => {
|
|
1572
1574
|
var A, E;
|
|
1573
|
-
const v = ((A =
|
|
1574
|
-
...
|
|
1575
|
-
}, x = [...
|
|
1575
|
+
const v = ((A = f(l).find((D) => D.uuid === c)) == null ? void 0 : A.key) || "", S = ((E = f(l).find((D) => D.uuid === p)) == null ? void 0 : E.key) || "", F = {
|
|
1576
|
+
...s == null ? void 0 : s.columnsMap
|
|
1577
|
+
}, x = [...s.sortKeyColumns.value], I = x.findIndex((D) => D === v), B = x.findIndex((D) => D === S), W = g > I;
|
|
1576
1578
|
if (I < 0)
|
|
1577
1579
|
return;
|
|
1578
1580
|
const K = x[I];
|
|
1579
|
-
x.splice(I, 1),
|
|
1581
|
+
x.splice(I, 1), g === 0 ? x.unshift(K) : x.splice(W ? B : B + 1, 0, K), x.forEach((D, oe) => {
|
|
1580
1582
|
F[D] = {
|
|
1581
1583
|
...F[D] || {},
|
|
1582
1584
|
order: oe
|
|
1583
1585
|
};
|
|
1584
|
-
}),
|
|
1585
|
-
}),
|
|
1586
|
+
}), s == null || s.setColumnsMap(F, "drop"), s == null || s.setSortKeyColumns(x);
|
|
1587
|
+
}), y = be((c) => {
|
|
1586
1588
|
var x;
|
|
1587
|
-
const p =
|
|
1588
|
-
...(
|
|
1589
|
+
const p = c.node.key, g = ((x = f(l).find((I) => I.uuid === p)) == null ? void 0 : x.key) || "", S = {
|
|
1590
|
+
...(s == null ? void 0 : s.columnsMap[g]) || {}
|
|
1589
1591
|
};
|
|
1590
|
-
S.show =
|
|
1592
|
+
S.show = c.checked;
|
|
1591
1593
|
const F = {
|
|
1592
|
-
...
|
|
1593
|
-
[
|
|
1594
|
+
...s == null ? void 0 : s.columnsMap,
|
|
1595
|
+
[g]: S
|
|
1594
1596
|
};
|
|
1595
|
-
|
|
1596
|
-
}),
|
|
1597
|
-
const p =
|
|
1598
|
-
return
|
|
1597
|
+
s == null || s.setColumnsMap(F, "show");
|
|
1598
|
+
}), d = (c) => {
|
|
1599
|
+
const p = f(l).find((g) => g.uuid === c.key);
|
|
1600
|
+
return c.title || Yt(r, "headerCell", {
|
|
1599
1601
|
title: p.title,
|
|
1600
1602
|
column: p
|
|
1601
1603
|
}, () => [p.title]);
|
|
1602
1604
|
};
|
|
1603
1605
|
return () => {
|
|
1604
|
-
var
|
|
1605
|
-
return t.value ?
|
|
1606
|
+
var c, p;
|
|
1607
|
+
return t.value ? i(Ie, null, [e.showTitle && i("span", {
|
|
1606
1608
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1607
|
-
}, [e.title]),
|
|
1609
|
+
}, [e.title]), i(aa, {
|
|
1608
1610
|
key: o.value,
|
|
1609
|
-
draggable: e.draggable && !!((
|
|
1611
|
+
draggable: e.draggable && !!((c = n.value) != null && c.length) && ((p = n.value) == null ? void 0 : p.length) > 1,
|
|
1610
1612
|
checkable: e.checkable,
|
|
1611
1613
|
blockNode: !0,
|
|
1612
1614
|
showLine: !1,
|
|
1613
|
-
checkedKeys:
|
|
1615
|
+
checkedKeys: u.value,
|
|
1614
1616
|
height: 280,
|
|
1615
|
-
onDrop: (
|
|
1616
|
-
const v =
|
|
1617
|
+
onDrop: (g) => {
|
|
1618
|
+
const v = g.node.key, S = g.dragNode.key, {
|
|
1617
1619
|
dropPosition: F,
|
|
1618
1620
|
dropToGap: x
|
|
1619
|
-
} =
|
|
1620
|
-
|
|
1621
|
+
} = g, I = F === -1 || !x ? F + 1 : F;
|
|
1622
|
+
h(S, v, I);
|
|
1621
1623
|
},
|
|
1622
|
-
onCheck: (
|
|
1624
|
+
onCheck: (g, v) => y(v),
|
|
1623
1625
|
treeData: n.value
|
|
1624
1626
|
}, {
|
|
1625
|
-
title: (
|
|
1627
|
+
title: (g) => {
|
|
1626
1628
|
var S;
|
|
1627
1629
|
const v = {
|
|
1628
|
-
...
|
|
1630
|
+
...g,
|
|
1629
1631
|
children: void 0,
|
|
1630
|
-
title:
|
|
1631
|
-
autoScroll: (S =
|
|
1632
|
+
title: d(g),
|
|
1633
|
+
autoScroll: (S = s == null ? void 0 : s.autoScroll) == null ? void 0 : S.value
|
|
1632
1634
|
};
|
|
1633
|
-
return
|
|
1635
|
+
return i(Ha, G({
|
|
1634
1636
|
hashId: e.hashId,
|
|
1635
1637
|
className: e.className
|
|
1636
1638
|
}, v, {
|
|
@@ -1650,37 +1652,37 @@ const be = (e) => {
|
|
|
1650
1652
|
setup(e) {
|
|
1651
1653
|
const {
|
|
1652
1654
|
columns: o
|
|
1653
|
-
} = de(), t = O([]), n = O([]),
|
|
1655
|
+
} = de(), t = O([]), n = O([]), u = O([]), l = O([]);
|
|
1654
1656
|
q(() => o.value, (T) => {
|
|
1655
|
-
t.value = [], n.value = [],
|
|
1656
|
-
if (
|
|
1657
|
+
t.value = [], n.value = [], u.value = [], T.forEach((h) => {
|
|
1658
|
+
if (h.hideInSetting)
|
|
1657
1659
|
return;
|
|
1658
1660
|
const {
|
|
1659
|
-
fixed:
|
|
1660
|
-
show:
|
|
1661
|
-
uuid:
|
|
1662
|
-
} =
|
|
1663
|
-
if ((
|
|
1664
|
-
n.value.push(
|
|
1661
|
+
fixed: y,
|
|
1662
|
+
show: d,
|
|
1663
|
+
uuid: c
|
|
1664
|
+
} = h;
|
|
1665
|
+
if ((d || d === void 0) && c && l.value.push(c), y === "left") {
|
|
1666
|
+
n.value.push(h);
|
|
1665
1667
|
return;
|
|
1666
1668
|
}
|
|
1667
|
-
if (
|
|
1668
|
-
t.value.push(
|
|
1669
|
+
if (y === "right") {
|
|
1670
|
+
t.value.push(h);
|
|
1669
1671
|
return;
|
|
1670
1672
|
}
|
|
1671
|
-
|
|
1673
|
+
u.value.push(h);
|
|
1672
1674
|
});
|
|
1673
1675
|
}, {
|
|
1674
1676
|
immediate: !0
|
|
1675
1677
|
});
|
|
1676
|
-
const
|
|
1677
|
-
return () =>
|
|
1678
|
+
const r = w(() => t.value && t.value.length > 0), s = w(() => n.value && n.value.length > 0);
|
|
1679
|
+
return () => i("div", {
|
|
1678
1680
|
class: {
|
|
1679
1681
|
[`${e.hashId}`]: !0,
|
|
1680
1682
|
[`${e.className}-list`]: !0,
|
|
1681
|
-
[`${e.className}-list-group`]:
|
|
1683
|
+
[`${e.className}-list-group`]: r.value || s.value
|
|
1682
1684
|
}
|
|
1683
|
-
}, [
|
|
1685
|
+
}, [i(Me, {
|
|
1684
1686
|
title: "固定在左侧",
|
|
1685
1687
|
list: n.value,
|
|
1686
1688
|
keys: l.value,
|
|
@@ -1688,16 +1690,16 @@ const be = (e) => {
|
|
|
1688
1690
|
draggable: e.draggable,
|
|
1689
1691
|
checkable: e.checkable,
|
|
1690
1692
|
className: e.className
|
|
1691
|
-
}, null),
|
|
1692
|
-
list:
|
|
1693
|
+
}, null), i(Me, {
|
|
1694
|
+
list: u.value,
|
|
1693
1695
|
keys: l.value,
|
|
1694
1696
|
hashId: e.hashId,
|
|
1695
1697
|
draggable: e.draggable,
|
|
1696
1698
|
checkable: e.checkable,
|
|
1697
1699
|
title: "不固定",
|
|
1698
|
-
showTitle:
|
|
1700
|
+
showTitle: s.value || r.value,
|
|
1699
1701
|
className: e.className
|
|
1700
|
-
}, null),
|
|
1702
|
+
}, null), i(Me, {
|
|
1701
1703
|
title: "固定在右侧",
|
|
1702
1704
|
list: t.value,
|
|
1703
1705
|
keys: l.value,
|
|
@@ -1728,46 +1730,46 @@ const be = (e) => {
|
|
|
1728
1730
|
wrapSSR: t,
|
|
1729
1731
|
hashId: n
|
|
1730
1732
|
} = Pe("ColumnSetting", [Va], o), {
|
|
1731
|
-
columns:
|
|
1733
|
+
columns: u,
|
|
1732
1734
|
settingsAction: l
|
|
1733
|
-
} = de(),
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1735
|
+
} = de(), r = be((d = !0) => {
|
|
1736
|
+
const c = {}, p = (g) => {
|
|
1737
|
+
g.forEach(({
|
|
1736
1738
|
key: v,
|
|
1737
1739
|
fixed: S,
|
|
1738
1740
|
index: F,
|
|
1739
1741
|
children: x
|
|
1740
1742
|
}) => {
|
|
1741
1743
|
const I = ot(v, F);
|
|
1742
|
-
I && (
|
|
1743
|
-
show:
|
|
1744
|
+
I && (c[I] = {
|
|
1745
|
+
show: d,
|
|
1744
1746
|
fixed: S
|
|
1745
1747
|
}), x && p(x);
|
|
1746
1748
|
});
|
|
1747
1749
|
};
|
|
1748
|
-
p(
|
|
1749
|
-
}),
|
|
1750
|
-
|
|
1750
|
+
p(u.value), l == null || l.setColumnsMap(c, "show");
|
|
1751
|
+
}), s = be((d) => {
|
|
1752
|
+
d.target.checked ? r() : r(!1);
|
|
1751
1753
|
}), T = be(() => {
|
|
1752
1754
|
l == null || l.setColumnsMap(l == null ? void 0 : l.cacheColumnsMap, "fixed");
|
|
1753
|
-
}),
|
|
1755
|
+
}), h = w(() => (
|
|
1754
1756
|
// @ts-ignore
|
|
1755
|
-
Object.values(l == null ? void 0 : l.columnsMap).filter((
|
|
1756
|
-
)),
|
|
1757
|
-
return () => t(
|
|
1757
|
+
Object.values(l == null ? void 0 : l.columnsMap).filter((d) => !d || d.show === !1)
|
|
1758
|
+
)), y = w(() => f(h).length > 0 && f(h).length !== u.value.length);
|
|
1759
|
+
return () => t(i(ea, {
|
|
1758
1760
|
arrowPointAtCenter: !0,
|
|
1759
|
-
title:
|
|
1761
|
+
title: i("div", {
|
|
1760
1762
|
class: [`${o}-title`, n.value]
|
|
1761
|
-
}, [
|
|
1762
|
-
indeterminate:
|
|
1763
|
-
checked: h
|
|
1764
|
-
onChange: (
|
|
1763
|
+
}, [i(ta, {
|
|
1764
|
+
indeterminate: y.value,
|
|
1765
|
+
checked: f(h).length === 0 && f(h).length !== u.value.length,
|
|
1766
|
+
onChange: (d) => s(d)
|
|
1765
1767
|
}, {
|
|
1766
1768
|
default: () => [pe("列展示")]
|
|
1767
|
-
}), e.checkedReset ?
|
|
1769
|
+
}), e.checkedReset ? i("a", {
|
|
1768
1770
|
onClick: T,
|
|
1769
1771
|
class: [`${o}-action-rest-button`, n.value]
|
|
1770
|
-
}, [pe("重置")]) : null, e != null && e.extra ?
|
|
1772
|
+
}, [pe("重置")]) : null, e != null && e.extra ? i(le, {
|
|
1771
1773
|
size: 12,
|
|
1772
1774
|
align: "center"
|
|
1773
1775
|
}, {
|
|
@@ -1776,17 +1778,17 @@ const be = (e) => {
|
|
|
1776
1778
|
overlayClassName: `${o}-overlay ${n.value}`,
|
|
1777
1779
|
trigger: "click",
|
|
1778
1780
|
placement: "bottomRight",
|
|
1779
|
-
content:
|
|
1781
|
+
content: i(Wa, {
|
|
1780
1782
|
hashId: n.value,
|
|
1781
1783
|
checkable: e.checkable ?? !0,
|
|
1782
1784
|
draggable: e.draggable ?? !0,
|
|
1783
1785
|
className: o
|
|
1784
1786
|
}, null)
|
|
1785
1787
|
}, {
|
|
1786
|
-
default: () => [
|
|
1788
|
+
default: () => [i(Z, {
|
|
1787
1789
|
title: "列设置"
|
|
1788
1790
|
}, {
|
|
1789
|
-
default: () => [
|
|
1791
|
+
default: () => [i(dt, null, null)]
|
|
1790
1792
|
})]
|
|
1791
1793
|
}));
|
|
1792
1794
|
}
|
|
@@ -1795,14 +1797,14 @@ const be = (e) => {
|
|
|
1795
1797
|
const {
|
|
1796
1798
|
isFullscreen: e
|
|
1797
1799
|
} = st();
|
|
1798
|
-
return () => e.value ?
|
|
1800
|
+
return () => e.value ? i(Z, {
|
|
1799
1801
|
title: "退出全屏"
|
|
1800
1802
|
}, {
|
|
1801
|
-
default: () => [
|
|
1802
|
-
}) :
|
|
1803
|
+
default: () => [i(va, null, null)]
|
|
1804
|
+
}) : i(Z, {
|
|
1803
1805
|
title: "全屏"
|
|
1804
1806
|
}, {
|
|
1805
|
-
default: () => [
|
|
1807
|
+
default: () => [i(ma, null, null)]
|
|
1806
1808
|
});
|
|
1807
1809
|
}
|
|
1808
1810
|
}), Ga = () => {
|
|
@@ -1810,8 +1812,8 @@ const be = (e) => {
|
|
|
1810
1812
|
action: e,
|
|
1811
1813
|
tableSize: o
|
|
1812
1814
|
} = de();
|
|
1813
|
-
return
|
|
1814
|
-
overlay:
|
|
1815
|
+
return i(la, {
|
|
1816
|
+
overlay: i(Re, {
|
|
1815
1817
|
selectedKeys: [o.value],
|
|
1816
1818
|
onClick: ({
|
|
1817
1819
|
key: t
|
|
@@ -1823,15 +1825,15 @@ const be = (e) => {
|
|
|
1823
1825
|
width: 80
|
|
1824
1826
|
}
|
|
1825
1827
|
}, {
|
|
1826
|
-
default: () => [
|
|
1828
|
+
default: () => [i(Re.Item, {
|
|
1827
1829
|
key: "large"
|
|
1828
1830
|
}, {
|
|
1829
1831
|
default: () => [pe("默认")]
|
|
1830
|
-
}),
|
|
1832
|
+
}), i(Re.Item, {
|
|
1831
1833
|
key: "middle"
|
|
1832
1834
|
}, {
|
|
1833
1835
|
default: () => [pe("中等")]
|
|
1834
|
-
}),
|
|
1836
|
+
}), i(Re.Item, {
|
|
1835
1837
|
key: "small"
|
|
1836
1838
|
}, {
|
|
1837
1839
|
default: () => [pe("紧凑")]
|
|
@@ -1839,10 +1841,10 @@ const be = (e) => {
|
|
|
1839
1841
|
}),
|
|
1840
1842
|
trigger: ["click"]
|
|
1841
1843
|
}, {
|
|
1842
|
-
default: () => [
|
|
1844
|
+
default: () => [i(Z, {
|
|
1843
1845
|
title: "表格密度"
|
|
1844
1846
|
}, {
|
|
1845
|
-
default: () => [
|
|
1847
|
+
default: () => [i(ga, null, null)]
|
|
1846
1848
|
})]
|
|
1847
1849
|
});
|
|
1848
1850
|
}, qa = (e) => ({
|
|
@@ -1900,16 +1902,16 @@ function Xa(e) {
|
|
|
1900
1902
|
const o = e, {
|
|
1901
1903
|
icon: t,
|
|
1902
1904
|
tooltip: n,
|
|
1903
|
-
onClick:
|
|
1905
|
+
onClick: u,
|
|
1904
1906
|
key: l
|
|
1905
1907
|
} = o;
|
|
1906
|
-
return t && n ?
|
|
1908
|
+
return t && n ? i(Z, {
|
|
1907
1909
|
title: n
|
|
1908
1910
|
}, {
|
|
1909
|
-
default: () => [
|
|
1911
|
+
default: () => [i("span", {
|
|
1910
1912
|
key: l,
|
|
1911
1913
|
onClick: () => {
|
|
1912
|
-
|
|
1914
|
+
u && u(l);
|
|
1913
1915
|
}
|
|
1914
1916
|
}, [t])]
|
|
1915
1917
|
}) : t;
|
|
@@ -1930,85 +1932,85 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1930
1932
|
const {
|
|
1931
1933
|
wrapSSR: o,
|
|
1932
1934
|
hashId: t
|
|
1933
|
-
} = Pe("ListToolBar", [qa], e.prefixCls), n = Ua(),
|
|
1934
|
-
var
|
|
1935
|
-
return !!(e.titleTip || e.headerTitle || (
|
|
1935
|
+
} = Pe("ListToolBar", [qa], e.prefixCls), n = Ua(), u = w(() => {
|
|
1936
|
+
var d;
|
|
1937
|
+
return !!(e.titleTip || e.headerTitle || (d = e.actions) != null && d.length);
|
|
1936
1938
|
}), 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
1939
|
var d;
|
|
1941
|
-
|
|
1942
|
-
|
|
1940
|
+
return !!((d = e.settings) != null && d.length || e.optionsExtra);
|
|
1941
|
+
}), r = w(() => !!(e.titleTip || e.headerTitle)), s = w(() => {
|
|
1942
|
+
var c;
|
|
1943
|
+
let d;
|
|
1944
|
+
return Array.isArray(e.actions) ? ((c = e.actions) == null ? void 0 : c.length) < 1 ? null : i(le, {
|
|
1943
1945
|
align: "center"
|
|
1944
|
-
}, lt(
|
|
1945
|
-
key:
|
|
1946
|
+
}, lt(d = e.actions.map((p, g) => Ce(p) ? Lt(p, {
|
|
1947
|
+
key: g,
|
|
1946
1948
|
...p == null ? void 0 : p.props
|
|
1947
|
-
}) :
|
|
1948
|
-
key:
|
|
1949
|
-
}, [p]))) ?
|
|
1950
|
-
default: () => [
|
|
1949
|
+
}) : i("template", {
|
|
1950
|
+
key: g
|
|
1951
|
+
}, [p]))) ? d : {
|
|
1952
|
+
default: () => [d]
|
|
1951
1953
|
}) : e.actions;
|
|
1952
|
-
}), T = Fe(() => !
|
|
1954
|
+
}), T = Fe(() => !u.value && l.value ? i("div", {
|
|
1953
1955
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1954
|
-
}, null) :
|
|
1956
|
+
}, null) : r.value ? i(le, {
|
|
1955
1957
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1956
1958
|
}, {
|
|
1957
|
-
default: () => [
|
|
1959
|
+
default: () => [i("div", {
|
|
1958
1960
|
class: `${e.prefixCls}-title ${t.value}`
|
|
1959
|
-
}, [e.headerTitle, e.titleTip &&
|
|
1961
|
+
}, [e.headerTitle, e.titleTip && i(Z, {
|
|
1960
1962
|
title: e.titleTipText
|
|
1961
1963
|
}, {
|
|
1962
|
-
default: () => [te(e.titleTip) && e.titleTip ?
|
|
1963
|
-
})]),
|
|
1964
|
+
default: () => [te(e.titleTip) && e.titleTip ? i(ya, null, null) : e.titleTip]
|
|
1965
|
+
})]), s.value && i("div", {
|
|
1964
1966
|
class: `${e.prefixCls}-actions ${t.value}`
|
|
1965
|
-
}, [
|
|
1966
|
-
}) :
|
|
1967
|
+
}, [s.value])]
|
|
1968
|
+
}) : i(le, {
|
|
1967
1969
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1968
1970
|
}, {
|
|
1969
|
-
default: () => [
|
|
1971
|
+
default: () => [s.value && i("div", {
|
|
1970
1972
|
class: `${e.prefixCls}-actions`
|
|
1971
|
-
}, [
|
|
1972
|
-
}), [() =>
|
|
1973
|
-
let
|
|
1974
|
-
return l.value ?
|
|
1973
|
+
}, [s.value])]
|
|
1974
|
+
}), [() => u.value, () => l.value, () => r.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), h = Fe(() => {
|
|
1975
|
+
let d;
|
|
1976
|
+
return l.value ? i(le, {
|
|
1975
1977
|
size: 16,
|
|
1976
1978
|
class: `${e.prefixCls}-right ${t.value}`,
|
|
1977
1979
|
align: n.value.lg ? "center" : "end",
|
|
1978
1980
|
direction: n.value.lg ? "horizontal" : "vertical"
|
|
1979
1981
|
}, {
|
|
1980
1982
|
default: () => {
|
|
1981
|
-
var
|
|
1982
|
-
return [e.optionsExtra, (
|
|
1983
|
+
var c;
|
|
1984
|
+
return [e.optionsExtra, (c = e.settings) != null && c.length ? i(le, {
|
|
1983
1985
|
size: 12,
|
|
1984
1986
|
align: "center",
|
|
1985
1987
|
class: `${e.prefixCls}-setting-items`
|
|
1986
|
-
}, lt(
|
|
1988
|
+
}, lt(d = e.settings.map((p, g) => {
|
|
1987
1989
|
const v = Xa(p);
|
|
1988
|
-
return
|
|
1989
|
-
key:
|
|
1990
|
+
return i("div", {
|
|
1991
|
+
key: g,
|
|
1990
1992
|
class: `${e.prefixCls}-setting-item`
|
|
1991
1993
|
}, [v]);
|
|
1992
|
-
})) ?
|
|
1993
|
-
default: () => [
|
|
1994
|
+
})) ? d : {
|
|
1995
|
+
default: () => [d]
|
|
1994
1996
|
}) : null];
|
|
1995
1997
|
}
|
|
1996
1998
|
}) : null;
|
|
1997
|
-
}, [() => l.value, () => e.prefixCls, () =>
|
|
1998
|
-
if (!l.value && !
|
|
1999
|
+
}, [() => l.value, () => e.prefixCls, () => r.value, () => s.value, () => e.settings]), y = Fe(() => {
|
|
2000
|
+
if (!l.value && !u.value)
|
|
1999
2001
|
return null;
|
|
2000
|
-
const
|
|
2002
|
+
const d = {
|
|
2001
2003
|
[`${t.value}`]: !0,
|
|
2002
2004
|
[`${e.prefixCls}-container`]: !0,
|
|
2003
2005
|
[`${e.prefixCls}-container-mobile`]: !n.value.xl
|
|
2004
2006
|
};
|
|
2005
|
-
return
|
|
2006
|
-
class:
|
|
2007
|
-
}, [T.value,
|
|
2008
|
-
}, [() =>
|
|
2009
|
-
return () => o(
|
|
2007
|
+
return i("div", {
|
|
2008
|
+
class: d
|
|
2009
|
+
}, [T.value, h.value]);
|
|
2010
|
+
}, [() => u.value, () => l.value, () => T.value, () => e.prefixCls, () => h.value]);
|
|
2011
|
+
return () => o(i("div", {
|
|
2010
2012
|
class: `${e.prefixCls} ${t.value}`
|
|
2011
|
-
}, [
|
|
2013
|
+
}, [y.value]));
|
|
2012
2014
|
}
|
|
2013
2015
|
});
|
|
2014
2016
|
mt.inheritAttrs = !1;
|
|
@@ -2016,19 +2018,19 @@ function Ja() {
|
|
|
2016
2018
|
return {
|
|
2017
2019
|
reload: {
|
|
2018
2020
|
text: "刷新",
|
|
2019
|
-
icon:
|
|
2021
|
+
icon: i(pa, null, null)
|
|
2020
2022
|
},
|
|
2021
2023
|
density: {
|
|
2022
2024
|
text: "表格密度",
|
|
2023
|
-
icon:
|
|
2025
|
+
icon: i(Ga, null, null)
|
|
2024
2026
|
},
|
|
2025
2027
|
setting: {
|
|
2026
2028
|
text: "列设置",
|
|
2027
|
-
icon:
|
|
2029
|
+
icon: i(dt, null, null)
|
|
2028
2030
|
},
|
|
2029
2031
|
fullScreen: {
|
|
2030
2032
|
text: "全屏",
|
|
2031
|
-
icon:
|
|
2033
|
+
icon: i(vt, null, null)
|
|
2032
2034
|
}
|
|
2033
2035
|
};
|
|
2034
2036
|
}
|
|
@@ -2037,22 +2039,22 @@ function Qa(e, o) {
|
|
|
2037
2039
|
const n = e[t];
|
|
2038
2040
|
if (!n)
|
|
2039
2041
|
return null;
|
|
2040
|
-
let
|
|
2041
|
-
if (typeof
|
|
2042
|
+
let u = n === !0 ? o[t] : () => n == null ? void 0 : n();
|
|
2043
|
+
if (typeof u != "function" && (u = () => {
|
|
2042
2044
|
}), t === "setting")
|
|
2043
|
-
return
|
|
2045
|
+
return i(_a, G(e[t], {
|
|
2044
2046
|
key: t
|
|
2045
2047
|
}), null);
|
|
2046
2048
|
if (t === "fullScreen")
|
|
2047
|
-
return
|
|
2049
|
+
return i("span", {
|
|
2048
2050
|
key: t,
|
|
2049
|
-
onClick:
|
|
2050
|
-
}, [
|
|
2051
|
+
onClick: u
|
|
2052
|
+
}, [i(vt, null, null)]);
|
|
2051
2053
|
const l = Ja()[t];
|
|
2052
|
-
return l ?
|
|
2054
|
+
return l ? i("span", {
|
|
2053
2055
|
key: t,
|
|
2054
|
-
onClick:
|
|
2055
|
-
}, [
|
|
2056
|
+
onClick: u
|
|
2057
|
+
}, [i(Z, {
|
|
2056
2058
|
title: l.text
|
|
2057
2059
|
}, {
|
|
2058
2060
|
default: () => [l.icon]
|
|
@@ -2077,31 +2079,31 @@ const Za = {
|
|
|
2077
2079
|
}), {
|
|
2078
2080
|
action: t
|
|
2079
2081
|
} = de(), n = Fe(() => {
|
|
2080
|
-
var
|
|
2081
|
-
const
|
|
2082
|
+
var r;
|
|
2083
|
+
const u = {
|
|
2082
2084
|
reload: () => t == null ? void 0 : t.reload(),
|
|
2083
2085
|
density: !0,
|
|
2084
2086
|
setting: !0,
|
|
2085
2087
|
fullScreen: () => t == null ? void 0 : t.toggle()
|
|
2086
2088
|
};
|
|
2087
|
-
if (e.options === !1 || ((
|
|
2089
|
+
if (e.options === !1 || ((r = Object.keys(e.options)) == null ? void 0 : r.length) === 0)
|
|
2088
2090
|
return [];
|
|
2089
2091
|
const l = {
|
|
2090
|
-
...
|
|
2092
|
+
...u,
|
|
2091
2093
|
...e.options
|
|
2092
2094
|
};
|
|
2093
2095
|
return l.setting !== !1 && e.settingExtra && (l.setting = {}, l.setting.extra = e.settingExtra), Qa(l, {
|
|
2094
|
-
...
|
|
2096
|
+
...u
|
|
2095
2097
|
});
|
|
2096
2098
|
}, [() => t, () => e.options]);
|
|
2097
2099
|
return () => {
|
|
2098
|
-
const
|
|
2099
|
-
return
|
|
2100
|
+
const u = e.toolBarBtn || [];
|
|
2101
|
+
return i(mt, {
|
|
2100
2102
|
prefixCls: o,
|
|
2101
2103
|
optionsExtra: e.optionsExtra,
|
|
2102
2104
|
headerTitle: e.headerTitle,
|
|
2103
|
-
actions:
|
|
2104
|
-
settings:
|
|
2105
|
+
actions: u,
|
|
2106
|
+
settings: f(n),
|
|
2105
2107
|
titleTip: e.titleTip,
|
|
2106
2108
|
titleTipText: e.titleTipText
|
|
2107
2109
|
}, null);
|
|
@@ -2123,10 +2125,10 @@ function al(e) {
|
|
|
2123
2125
|
function ll(e, o, t, n) {
|
|
2124
2126
|
if (!o)
|
|
2125
2127
|
return e;
|
|
2126
|
-
let
|
|
2128
|
+
let u = e;
|
|
2127
2129
|
if (ne(o)) {
|
|
2128
2130
|
const l = o.node === "a" ? "span" : o.node;
|
|
2129
|
-
return
|
|
2131
|
+
return i(l, G((o == null ? void 0 : o.attr) || {}, {
|
|
2130
2132
|
class: [o.class, o.node === "a" ? `${t}-a` : ""],
|
|
2131
2133
|
onClick: o.click
|
|
2132
2134
|
}), al(e) ? e : {
|
|
@@ -2135,21 +2137,21 @@ function ll(e, o, t, n) {
|
|
|
2135
2137
|
}
|
|
2136
2138
|
switch (o) {
|
|
2137
2139
|
case "link":
|
|
2138
|
-
|
|
2140
|
+
u = i("span", {
|
|
2139
2141
|
class: [`${t}-a`, n]
|
|
2140
2142
|
}, [e]);
|
|
2141
2143
|
break;
|
|
2142
2144
|
case "time":
|
|
2143
|
-
|
|
2145
|
+
u = H(e).format("HH:mm:ss");
|
|
2144
2146
|
break;
|
|
2145
2147
|
case "dateMonth":
|
|
2146
|
-
|
|
2148
|
+
u = `${H(e).month() + 1}月`;
|
|
2147
2149
|
break;
|
|
2148
2150
|
case "dateTime":
|
|
2149
|
-
|
|
2151
|
+
u = H(e).format("YYYY-MM-DD HH:mm:ss");
|
|
2150
2152
|
break;
|
|
2151
2153
|
}
|
|
2152
|
-
return
|
|
2154
|
+
return u;
|
|
2153
2155
|
}
|
|
2154
2156
|
const ke = {
|
|
2155
2157
|
["&::-webkit-scrollbar"]: {
|
|
@@ -2362,25 +2364,25 @@ const ke = {
|
|
|
2362
2364
|
emit: o,
|
|
2363
2365
|
slots: t,
|
|
2364
2366
|
attrs: n,
|
|
2365
|
-
expose:
|
|
2367
|
+
expose: u
|
|
2366
2368
|
}) {
|
|
2367
2369
|
const l = Ve({
|
|
2368
2370
|
suffixCls: "table",
|
|
2369
2371
|
isPor: !0
|
|
2370
2372
|
}), {
|
|
2371
|
-
wrapSSR:
|
|
2372
|
-
hashId:
|
|
2373
|
+
wrapSSR: r,
|
|
2374
|
+
hashId: s
|
|
2373
2375
|
} = Pe("ProBaseTable", [nl], l), T = ul(), {
|
|
2374
|
-
width:
|
|
2376
|
+
width: h
|
|
2375
2377
|
} = Xt(), {
|
|
2376
|
-
emptyText:
|
|
2377
|
-
indicator:
|
|
2378
|
-
} = ia(),
|
|
2379
|
-
fe(() =>
|
|
2378
|
+
emptyText: y,
|
|
2379
|
+
indicator: d
|
|
2380
|
+
} = ia(), c = O(), p = O(), g = O(e.waitRequest);
|
|
2381
|
+
fe(() => g.value = e.waitRequest);
|
|
2380
2382
|
const {
|
|
2381
2383
|
toggle: v,
|
|
2382
2384
|
isFullscreen: S
|
|
2383
|
-
} = st(
|
|
2385
|
+
} = st(c), F = w(() => ({
|
|
2384
2386
|
...e
|
|
2385
2387
|
})), x = w(() => {
|
|
2386
2388
|
var C, R;
|
|
@@ -2420,7 +2422,7 @@ const ke = {
|
|
|
2420
2422
|
breakpoint: b
|
|
2421
2423
|
} = ja({
|
|
2422
2424
|
...oe,
|
|
2423
|
-
innerWidth:
|
|
2425
|
+
innerWidth: h,
|
|
2424
2426
|
columns: I,
|
|
2425
2427
|
screensRef: T
|
|
2426
2428
|
}), P = Ba(e), {
|
|
@@ -2472,7 +2474,7 @@ const ke = {
|
|
|
2472
2474
|
handleTableChange: _e
|
|
2473
2475
|
} = Fa({
|
|
2474
2476
|
...pt,
|
|
2475
|
-
waitRequest:
|
|
2477
|
+
waitRequest: g
|
|
2476
2478
|
}, {
|
|
2477
2479
|
loadingStatus: B,
|
|
2478
2480
|
getPaginationInfo: E,
|
|
@@ -2490,31 +2492,31 @@ const ke = {
|
|
|
2490
2492
|
...U(ne(e.options) ? e.options : {})
|
|
2491
2493
|
} : !1), Ge = w(() => {
|
|
2492
2494
|
const C = ne(e.loading) ? ye(e.loading, "spinning") : {};
|
|
2493
|
-
return !C.indicator && (
|
|
2495
|
+
return !C.indicator && (d != null && d.value) && (C.indicator = d == null ? void 0 : d.value), ye({
|
|
2494
2496
|
...(ye(n), ["class", "style", "id"]),
|
|
2495
2497
|
...e,
|
|
2496
2498
|
virtualScroll: x.value,
|
|
2497
|
-
size:
|
|
2498
|
-
scroll:
|
|
2499
|
+
size: f(K),
|
|
2500
|
+
scroll: f(a),
|
|
2499
2501
|
loading: {
|
|
2500
|
-
spinning: e.showLoading ? !!
|
|
2502
|
+
spinning: e.showLoading ? !!f(B) : !1,
|
|
2501
2503
|
...C
|
|
2502
2504
|
},
|
|
2503
|
-
columns: Ne(
|
|
2504
|
-
pagination: Ne(
|
|
2505
|
-
dataSource:
|
|
2505
|
+
columns: Ne(f($).filter((R) => R.show || R.show === void 0)),
|
|
2506
|
+
pagination: Ne(f(E)),
|
|
2507
|
+
dataSource: f(me)
|
|
2506
2508
|
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2507
2509
|
}), xt = w(() => [{
|
|
2508
|
-
[`${
|
|
2510
|
+
[`${s.value}`]: !0,
|
|
2509
2511
|
[`${l}`]: !0,
|
|
2510
2512
|
[`${n.class}`]: n.class,
|
|
2511
|
-
[`${l}-no-scroll`]: !Object.keys(
|
|
2513
|
+
[`${l}-no-scroll`]: !Object.keys(f(a) || {}).length,
|
|
2512
2514
|
[`${l}-table-tree`]: We.value,
|
|
2513
2515
|
[`${l}-full-screen`]: S.value
|
|
2514
2516
|
}]), qe = w(() => {
|
|
2515
2517
|
var J;
|
|
2516
2518
|
let C;
|
|
2517
|
-
const R =
|
|
2519
|
+
const R = f(F).direction === "rtl" ? "bottomLeft" : "right", M = (J = f(E)) == null ? void 0 : J.position;
|
|
2518
2520
|
if (M !== null && Array.isArray(M)) {
|
|
2519
2521
|
const z = M.find((se) => se.indexOf("top") !== -1), V = M.find((se) => se.indexOf("bottom") !== -1), Te = M.every((se) => `${se}` == "none");
|
|
2520
2522
|
!z && !V && !Te && (C = R), z && (C = z.toLowerCase().replace("top", "")), V && (C = V.toLowerCase().replace("bottom", ""));
|
|
@@ -2547,7 +2549,7 @@ const ke = {
|
|
|
2547
2549
|
o("expand", C, R);
|
|
2548
2550
|
}, Ft = (C, R) => Y(C, R), It = (C, R, M) => {
|
|
2549
2551
|
const J = M.align === "center" ? "top" : M.align === "left" || !M.align ? "topLeft" : "topRight";
|
|
2550
|
-
return R && M.copyable ?
|
|
2552
|
+
return R && M.copyable ? i(ua.Paragraph, {
|
|
2551
2553
|
class: `${l}-copyable`,
|
|
2552
2554
|
style: {
|
|
2553
2555
|
margin: "0",
|
|
@@ -2556,33 +2558,33 @@ const ke = {
|
|
|
2556
2558
|
},
|
|
2557
2559
|
copyable: !0
|
|
2558
2560
|
}, {
|
|
2559
|
-
default: () => [
|
|
2561
|
+
default: () => [i(Z, {
|
|
2560
2562
|
title: C,
|
|
2561
2563
|
placement: J
|
|
2562
2564
|
}, {
|
|
2563
|
-
default: () => [
|
|
2565
|
+
default: () => [i("div", {
|
|
2564
2566
|
class: `${l}-ellipsis`
|
|
2565
2567
|
}, [C])]
|
|
2566
2568
|
})]
|
|
2567
|
-
}) : R && !M.copyable ?
|
|
2569
|
+
}) : R && !M.copyable ? i(Z, {
|
|
2568
2570
|
title: C,
|
|
2569
2571
|
placement: J
|
|
2570
2572
|
}, {
|
|
2571
|
-
default: () => [We.value ? C :
|
|
2573
|
+
default: () => [We.value ? C : i("div", {
|
|
2572
2574
|
class: `${l}-ellipsis`
|
|
2573
2575
|
}, [C])]
|
|
2574
2576
|
}) : C;
|
|
2575
2577
|
}, Pt = () => {
|
|
2576
2578
|
var R;
|
|
2577
2579
|
const C = ze(t, e, "customRender");
|
|
2578
|
-
return C ? (R = me.value) != null && R.length ? C(me.value) : (
|
|
2580
|
+
return C ? (R = me.value) != null && R.length ? C(me.value) : (y == null ? void 0 : y.value) || i(ct, {
|
|
2579
2581
|
image: ol
|
|
2580
|
-
}, null) :
|
|
2581
|
-
}, Ot = (C, R, M) =>
|
|
2582
|
+
}, null) : i(Ie, null, null);
|
|
2583
|
+
}, Ot = (C, R, M) => i(el, {
|
|
2582
2584
|
headerTitle: C,
|
|
2583
2585
|
titleTip: M,
|
|
2584
2586
|
titleTipText: e.titleTipText,
|
|
2585
|
-
options:
|
|
2587
|
+
options: f(St),
|
|
2586
2588
|
settingExtra: ge(t, e, "settingExtra"),
|
|
2587
2589
|
optionsExtra: ge(t, e, "optionsExtra"),
|
|
2588
2590
|
toolBarBtn: R
|
|
@@ -2608,29 +2610,29 @@ const ke = {
|
|
|
2608
2610
|
setPagination: D,
|
|
2609
2611
|
changeColumns: j,
|
|
2610
2612
|
slots: t
|
|
2611
|
-
}),
|
|
2613
|
+
}), u({
|
|
2612
2614
|
loading: B,
|
|
2613
2615
|
formRef: () => ({
|
|
2614
2616
|
getFormState: () => {
|
|
2615
2617
|
var C;
|
|
2616
2618
|
return ((C = p.value) == null ? void 0 : C.getFormState()) || {};
|
|
2617
2619
|
},
|
|
2618
|
-
getTableFormState: () =>
|
|
2620
|
+
getTableFormState: () => f(Be),
|
|
2619
2621
|
restForm: (C) => {
|
|
2620
2622
|
var R;
|
|
2621
|
-
|
|
2623
|
+
g.value = !0, C && (C == null || C()), (R = p.value) == null || R.resetForm(!1), g.value = !1;
|
|
2622
2624
|
}
|
|
2623
2625
|
}),
|
|
2624
2626
|
actionRef: () => ({
|
|
2625
2627
|
dataSource: me.value,
|
|
2626
2628
|
pageParams: E.value,
|
|
2627
2629
|
reload: De,
|
|
2628
|
-
getLoadingStatus: () =>
|
|
2630
|
+
getLoadingStatus: () => f(B),
|
|
2629
2631
|
reloadAndRest: async (C) => {
|
|
2630
|
-
|
|
2632
|
+
g.value = !0, D({
|
|
2631
2633
|
current: 1,
|
|
2632
2634
|
pageSize: 10
|
|
2633
|
-
}), C && (C == null || C()),
|
|
2635
|
+
}), C && (C == null || C()), g.value = !1;
|
|
2634
2636
|
},
|
|
2635
2637
|
reSetDataList: bt,
|
|
2636
2638
|
setPageAndReload: Xe,
|
|
@@ -2643,19 +2645,19 @@ const ke = {
|
|
|
2643
2645
|
return () => {
|
|
2644
2646
|
var J;
|
|
2645
2647
|
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"), M = ge(t, e, "toolBarBtn");
|
|
2646
|
-
return i(
|
|
2647
|
-
ref:
|
|
2648
|
+
return r(i("div", {
|
|
2649
|
+
ref: c,
|
|
2648
2650
|
class: xt.value,
|
|
2649
2651
|
style: Bt.value
|
|
2650
|
-
}, [
|
|
2651
|
-
class: [`${l}-content`,
|
|
2652
|
-
}, [(!!ee.value.length || !!((J = t.search) != null && J.call(t))) &&
|
|
2652
|
+
}, [i("div", {
|
|
2653
|
+
class: [`${l}-content`, s.value]
|
|
2654
|
+
}, [(!!ee.value.length || !!((J = t.search) != null && J.call(t))) && i(ht, {
|
|
2653
2655
|
ref: p,
|
|
2654
2656
|
search: e.search,
|
|
2655
2657
|
modal: e.modalScroll,
|
|
2656
2658
|
searchMap: ee.value,
|
|
2657
2659
|
prefixCls: l,
|
|
2658
|
-
loading: !!
|
|
2660
|
+
loading: !!f(B),
|
|
2659
2661
|
onSearch: wt,
|
|
2660
2662
|
defaultParams: ve
|
|
2661
2663
|
}, {
|
|
@@ -2663,21 +2665,21 @@ const ke = {
|
|
|
2663
2665
|
var z;
|
|
2664
2666
|
return (z = t.search) == null ? void 0 : z.call(t);
|
|
2665
2667
|
} : null
|
|
2666
|
-
}), !x.value && Ot(C, M, R), e.customRender ?? t.customRender ?
|
|
2668
|
+
}), !x.value && Ot(C, M, R), e.customRender ?? t.customRender ? i(Le, f(Ge).loading, {
|
|
2667
2669
|
default: () => {
|
|
2668
2670
|
var z;
|
|
2669
|
-
return [
|
|
2670
|
-
class: `${l}-wrapper ${
|
|
2671
|
-
}, [Pt(), e.pagination !== !1 && ((z = me.value) == null ? void 0 : z.length) > 0 &&
|
|
2671
|
+
return [i("div", {
|
|
2672
|
+
class: `${l}-wrapper ${s.value}`
|
|
2673
|
+
}, [Pt(), e.pagination !== !1 && ((z = me.value) == null ? void 0 : z.length) > 0 && i(na, G({
|
|
2672
2674
|
class: {
|
|
2673
|
-
[`${l}-pagination ${
|
|
2674
|
-
[`${l}-pagination-${qe.value} ${
|
|
2675
|
+
[`${l}-pagination ${s.value}`]: !0,
|
|
2676
|
+
[`${l}-pagination-${qe.value} ${s.value}`]: !!qe.value
|
|
2675
2677
|
}
|
|
2676
|
-
}, Ne(
|
|
2678
|
+
}, Ne(f(E)), {
|
|
2677
2679
|
onChange: Tt
|
|
2678
2680
|
}), null)])];
|
|
2679
2681
|
}
|
|
2680
|
-
}) :
|
|
2682
|
+
}) : i(oa, G(Ge.value, {
|
|
2681
2683
|
style: e.tableStyle || void 0,
|
|
2682
2684
|
class: e.tableClassName,
|
|
2683
2685
|
rowKey: (z) => z[e.rowKey || "sortIndex"],
|
|
@@ -2692,7 +2694,7 @@ const ke = {
|
|
|
2692
2694
|
const {
|
|
2693
2695
|
value: se,
|
|
2694
2696
|
success: Dt
|
|
2695
|
-
} = Ut(Te, (V == null ? void 0 : V.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Je = ll(se, ((Ze = (Qe = e.columns) == null ? void 0 : Qe.find((Nt) => Nt.key === V.key)) == null ? void 0 : Ze.valueType) || V.valueType, l,
|
|
2697
|
+
} = Ut(Te, (V == null ? void 0 : V.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Je = ll(se, ((Ze = (Qe = e.columns) == null ? void 0 : Qe.find((Nt) => Nt.key === V.key)) == null ? void 0 : Ze.valueType) || V.valueType, l, s.value);
|
|
2696
2698
|
return V != null && V.ellipsis ? It(Je, Dt, V) : Je;
|
|
2697
2699
|
},
|
|
2698
2700
|
rowSelection: e.rowSelection ? {
|
|
@@ -2707,7 +2709,7 @@ const ke = {
|
|
|
2707
2709
|
onExpand: $t,
|
|
2708
2710
|
onResizeColumn: Ft
|
|
2709
2711
|
}), {
|
|
2710
|
-
emptyText:
|
|
2712
|
+
emptyText: y != null && y.value ? () => y == null ? void 0 : y.value : null,
|
|
2711
2713
|
...ye(t, tl)
|
|
2712
2714
|
})])]));
|
|
2713
2715
|
};
|