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