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