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