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