@gx-design-vue/pro-table 0.2.0-beta.107 → 0.2.0-beta.108
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 +3 -13
- package/dist/components/Form/index.d.ts +1 -1
- package/dist/hooks/useFetchData.d.ts +1 -1
- package/dist/hooks/useLoading.d.ts +1 -1
- package/dist/hooks/useTable.d.ts +1 -1
- package/dist/hooks/useTableScroll.d.ts +1 -1
- package/dist/pro-table.js +1064 -1065
- package/dist/pro-table.umd.cjs +1 -1
- package/dist/types/TableTypings.d.ts +2 -1
- package/package.json +3 -3
package/dist/pro-table.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { isObject as
|
|
2
|
-
import { reactive as
|
|
3
|
-
import { tableProps as
|
|
4
|
-
import { omit as Je, pick as $
|
|
1
|
+
import { isObject as J, cloneDeep as re, isArray as oe, isBoolean as ue, classNames as Se, filterEmpty as Pl, getPrefixCls as ol, getRandomNumber as il, genColumnKey as kl, isDeepEqualReact as Qe, compareArray as rt, isNumber as Ue, runFunction as ct, convertValueBoolean as ke, getSortIndex as dt, isFunction as ze, handleCurrentPage as ft, deepMerge as ht, getSlot as jl, arrayRepeat as vt, isString as Dl, handleShowIndex as mt, handleEmptyField as gt, getSlotVNode as Pe, getTextWidth as yt } from "@gx-design-vue/pro-utils";
|
|
2
|
+
import { reactive as pe, isReactive as bt, watch as q, computed as w, ref as D, toRaw as Fe, watchEffect as He, defineComponent as me, createVNode as c, Fragment as Ye, isVNode as ee, mergeProps as V, h as Nl, cloneVNode as rl, unref as C, createTextVNode as Le, renderSlot as Ct, onActivated as xt, nextTick as St, getCurrentInstance as pt, onUnmounted as wt, onDeactivated as Tt, onMounted as $t, toRef as fe } from "vue";
|
|
3
|
+
import { tableProps as Bt } from "ant-design-vue/es/table/Table";
|
|
4
|
+
import { omit as Je, pick as $l } from "lodash-es";
|
|
5
5
|
import "ant-design-vue/es/_util/props-util";
|
|
6
|
-
import { warning as
|
|
7
|
-
import { UpOutlined as
|
|
8
|
-
import { useProAppContext as
|
|
9
|
-
import { useContext as
|
|
10
|
-
import { useFullscreen as
|
|
11
|
-
import { Grid as
|
|
12
|
-
import
|
|
13
|
-
import { useMemo as
|
|
6
|
+
import { warning as _e } from "ant-design-vue/es/vc-util/warning";
|
|
7
|
+
import { UpOutlined as Rt, DownOutlined as Ft, SettingOutlined as El, VerticalAlignTopOutlined as It, VerticalAlignMiddleOutlined as Ot, VerticalAlignBottomOutlined as Pt, InfoCircleOutlined as kt, ColumnHeightOutlined as jt, FullscreenExitOutlined as Dt, FullscreenOutlined as Nt, ReloadOutlined as Et, CopyOutlined as Mt } from "@ant-design/icons-vue";
|
|
8
|
+
import { useProAppContext as Ml } from "@gx-design-vue/pro-app";
|
|
9
|
+
import { useContext as At, getProSolidColor as Al, useProStyle as Ze, unit as Bl, useProConfigContext as Kt } from "@gx-design-vue/pro-provider";
|
|
10
|
+
import { useFullscreen as Kl, useWindowSize as zt } from "@vueuse/core";
|
|
11
|
+
import { Grid as cl, DatePicker as zl, Space as xe, Input as Rl, TimePicker as Yt, TreeSelect as Lt, Spin as sl, Select as Wt, Button as Fl, Popover as Ht, Checkbox as Vt, Tooltip as ve, Tree as qt, Dropdown as Gt, Menu as Ge, theme as Qt, Pagination as _t, Table as Xt, message as Ut, Empty as Jt } from "ant-design-vue";
|
|
12
|
+
import X from "dayjs";
|
|
13
|
+
import { useMemo as Xe, tryOnUnmounted as Zt } from "@gx-design-vue/pro-hooks";
|
|
14
14
|
function rn(e, a) {
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
return a != null && a.state &&
|
|
15
|
+
var b, x, f, S;
|
|
16
|
+
function t() {
|
|
17
|
+
return a != null && a.state && J(a == null ? void 0 : a.state) ? re(Fe(a == null ? void 0 : a.state)) : {};
|
|
18
18
|
}
|
|
19
|
-
const u =
|
|
20
|
-
params: ((
|
|
19
|
+
const u = pe({
|
|
20
|
+
params: ((b = a == null ? void 0 : a.state) == null ? void 0 : b.params) || {},
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
request: a != null && a.request ? async (...s) => {
|
|
23
23
|
var n;
|
|
24
24
|
return await ((n = a == null ? void 0 : a.request) == null ? void 0 : n.call(a, ...s));
|
|
25
25
|
} : void 0
|
|
26
26
|
});
|
|
27
|
-
a != null && a.state && (
|
|
28
|
-
Object.assign(u,
|
|
29
|
-
}, { deep: !0, immediate: !0 }) : Object.assign(u,
|
|
30
|
-
const o =
|
|
27
|
+
a != null && a.state && (bt(a.state) ? q(() => a == null ? void 0 : a.state, () => {
|
|
28
|
+
Object.assign(u, t());
|
|
29
|
+
}, { deep: !0, immediate: !0 }) : Object.assign(u, t()));
|
|
30
|
+
const o = w(() => {
|
|
31
31
|
var s, n;
|
|
32
32
|
return (n = (s = e == null ? void 0 : e.value) == null ? void 0 : s.actionRef) == null ? void 0 : n.call(s);
|
|
33
|
-
}), i =
|
|
33
|
+
}), i = w(() => {
|
|
34
34
|
var s, n;
|
|
35
35
|
return (n = (s = e == null ? void 0 : e.value) == null ? void 0 : s.formRef) == null ? void 0 : n.call(s);
|
|
36
|
-
}),
|
|
36
|
+
}), d = w(() => {
|
|
37
37
|
var s, n, r;
|
|
38
38
|
return {
|
|
39
39
|
...((s = o.value) == null ? void 0 : s.pageState) || {},
|
|
40
40
|
...((r = (n = i.value) == null ? void 0 : n.getFormState) == null ? void 0 : r.call(n)) || {}
|
|
41
41
|
};
|
|
42
|
-
}),
|
|
42
|
+
}), v = D(!!((f = (x = o.value) == null ? void 0 : x.loading) != null && f.value));
|
|
43
43
|
return q(() => {
|
|
44
44
|
var s, n;
|
|
45
45
|
return (n = (s = o.value) == null ? void 0 : s.loading) == null ? void 0 : n.value;
|
|
46
46
|
}, (s) => {
|
|
47
|
-
|
|
48
|
-
}), q(
|
|
47
|
+
v.value = !!s;
|
|
48
|
+
}), q(v, (s) => {
|
|
49
49
|
var n, r;
|
|
50
50
|
(r = (n = o.value) == null ? void 0 : n.setLoading) == null || r.call(n, !!s);
|
|
51
51
|
}), {
|
|
52
52
|
formRef: i,
|
|
53
53
|
actionRef: o,
|
|
54
54
|
tableState: u,
|
|
55
|
-
requestParams:
|
|
56
|
-
loading:
|
|
57
|
-
dataSource:
|
|
55
|
+
requestParams: d,
|
|
56
|
+
loading: v,
|
|
57
|
+
dataSource: w(() => {
|
|
58
58
|
var s, n;
|
|
59
59
|
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.dataSource) == null ? void 0 : n.value) || [];
|
|
60
60
|
}),
|
|
61
|
-
selectedKeys:
|
|
61
|
+
selectedKeys: w(() => {
|
|
62
62
|
var s, n;
|
|
63
63
|
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedKeys) == null ? void 0 : n.value) || [];
|
|
64
64
|
}),
|
|
65
|
-
selectedItems:
|
|
65
|
+
selectedItems: w(() => {
|
|
66
66
|
var s, n;
|
|
67
67
|
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedItems) == null ? void 0 : n.value) || [];
|
|
68
68
|
}),
|
|
@@ -76,14 +76,14 @@ function rn(e, a) {
|
|
|
76
76
|
return (r = (n = o.value) == null ? void 0 : n.reloadAndReset) == null ? void 0 : r.call(n, s);
|
|
77
77
|
},
|
|
78
78
|
setPageAndReload: (s, n, r, y) => {
|
|
79
|
-
var
|
|
80
|
-
return (
|
|
79
|
+
var p, P;
|
|
80
|
+
return (P = (p = o.value) == null ? void 0 : p.setPageAndReload) == null ? void 0 : P.call(p, s, n, r, y);
|
|
81
81
|
},
|
|
82
82
|
setPagination: (s) => {
|
|
83
83
|
var n, r;
|
|
84
84
|
return (r = (n = o.value) == null ? void 0 : n.setPagination) == null ? void 0 : r.call(n, s);
|
|
85
85
|
},
|
|
86
|
-
setLoading: (s) =>
|
|
86
|
+
setLoading: (s) => v.value = s,
|
|
87
87
|
setDataValue: (s) => {
|
|
88
88
|
var n, r;
|
|
89
89
|
return (r = (n = o.value) == null ? void 0 : n.setDataValue) == null ? void 0 : r.call(n, s);
|
|
@@ -94,8 +94,8 @@ function rn(e, a) {
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
const ea = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"],
|
|
98
|
-
...Je(
|
|
97
|
+
const ea = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Yl = {
|
|
98
|
+
...Je(Bt(), ea),
|
|
99
99
|
transformCellText: Function,
|
|
100
100
|
/**
|
|
101
101
|
* @Author gx12358
|
|
@@ -115,8 +115,8 @@ const ea = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
115
115
|
type: Object,
|
|
116
116
|
default: void 0
|
|
117
117
|
}
|
|
118
|
-
},
|
|
119
|
-
...
|
|
118
|
+
}, he = {
|
|
119
|
+
...Yl,
|
|
120
120
|
rowSelection: {
|
|
121
121
|
type: Object,
|
|
122
122
|
default: void 0
|
|
@@ -392,24 +392,24 @@ const ea = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
392
392
|
onRequestError: Function,
|
|
393
393
|
onBeforeSearchSubmit: Function,
|
|
394
394
|
onColumnsStateChange: Function
|
|
395
|
-
}, { provideContext:
|
|
396
|
-
function
|
|
397
|
-
return typeof a == "function" ? a(
|
|
395
|
+
}, { provideContext: la, useInjectContext: ge } = At("pro-table");
|
|
396
|
+
function Ce(e, a) {
|
|
397
|
+
return typeof a == "function" ? a(X(e)) : X(e).format(a);
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function Ke(e, a) {
|
|
400
400
|
return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
401
401
|
}
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
402
|
+
const Il = (e, a, t = "string") => {
|
|
403
|
+
if (oe(e)) {
|
|
404
404
|
const [u, o] = e;
|
|
405
|
-
let i,
|
|
406
|
-
if (Array.isArray(a) ? (i = a[0],
|
|
407
|
-
const
|
|
408
|
-
return [
|
|
405
|
+
let i, d;
|
|
406
|
+
if (Array.isArray(a) ? (i = a[0], d = a[1]) : typeof a == "object" && a.type === "mask" ? (i = a.format, d = a.format) : (i = a, d = a), t === "string") {
|
|
407
|
+
const v = u ? Ce(u, i) : "", b = o ? Ce(o, d) : "";
|
|
408
|
+
return [v, b];
|
|
409
409
|
}
|
|
410
|
-
return [
|
|
410
|
+
return [X(u), X(o)];
|
|
411
411
|
}
|
|
412
|
-
},
|
|
412
|
+
}, ta = (e) => ({
|
|
413
413
|
[`${e.componentCls}-search`]: {
|
|
414
414
|
position: "relative",
|
|
415
415
|
display: "flex",
|
|
@@ -422,7 +422,7 @@ const It = (e, a, l = "string") => {
|
|
|
422
422
|
border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
|
|
423
423
|
borderRadius: e.borderRadiusLG,
|
|
424
424
|
marginBottom: e.marginLG,
|
|
425
|
-
backgroundColor:
|
|
425
|
+
backgroundColor: Al(e, e.colorBgContainer)
|
|
426
426
|
},
|
|
427
427
|
"&-collapse-buttons": {
|
|
428
428
|
display: "flex",
|
|
@@ -471,38 +471,38 @@ const It = (e, a, l = "string") => {
|
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
473
|
function aa(e, a) {
|
|
474
|
-
const
|
|
474
|
+
const t = pe({});
|
|
475
475
|
function u() {
|
|
476
|
-
Object.keys(e).forEach((
|
|
477
|
-
o(
|
|
476
|
+
Object.keys(e).forEach((d) => {
|
|
477
|
+
o(d, e[d]);
|
|
478
478
|
});
|
|
479
|
-
const i = a.find((
|
|
479
|
+
const i = a.find((d) => d.valueType === "dateRange");
|
|
480
480
|
i && o(i.name || "", e[i.rangeStartName || "start"] ? [
|
|
481
481
|
e[i.rangeStartName || "start"],
|
|
482
482
|
e[i.rangeEndName || "end"]
|
|
483
483
|
] : []);
|
|
484
484
|
}
|
|
485
|
-
|
|
485
|
+
He(() => {
|
|
486
486
|
u();
|
|
487
487
|
});
|
|
488
|
-
function o(i,
|
|
489
|
-
|
|
488
|
+
function o(i, d) {
|
|
489
|
+
t[i] = d;
|
|
490
490
|
}
|
|
491
491
|
return {
|
|
492
|
-
formState:
|
|
492
|
+
formState: t,
|
|
493
493
|
resetFormState: u,
|
|
494
494
|
changeFormState: o
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
const {
|
|
498
498
|
useBreakpoint: na
|
|
499
|
-
} =
|
|
499
|
+
} = cl, {
|
|
500
500
|
MonthPicker: ua,
|
|
501
501
|
RangePicker: ia,
|
|
502
502
|
YearPicker: sa,
|
|
503
503
|
WeekPicker: oa,
|
|
504
504
|
QuarterPicker: ra
|
|
505
|
-
} =
|
|
505
|
+
} = zl, ll = [{
|
|
506
506
|
value: "xxl",
|
|
507
507
|
span: 4
|
|
508
508
|
}, {
|
|
@@ -522,393 +522,392 @@ const {
|
|
|
522
522
|
span: 1
|
|
523
523
|
}];
|
|
524
524
|
function ca(e) {
|
|
525
|
-
let a = e.reduce((
|
|
526
|
-
return e.forEach((
|
|
527
|
-
|
|
528
|
-
}), e.sort((
|
|
525
|
+
let a = e.reduce((t, u) => u.order !== void 0 ? Math.max(t, u.order) : t, 0);
|
|
526
|
+
return e.forEach((t) => {
|
|
527
|
+
t.order === void 0 && (a += 1, t.order = a);
|
|
528
|
+
}), e.sort((t, u) => t.order - u.order), e;
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const Ll = /* @__PURE__ */ me({
|
|
531
531
|
name: "ProTableForm",
|
|
532
532
|
props: {
|
|
533
|
-
modal:
|
|
533
|
+
modal: he.modalScroll,
|
|
534
534
|
searchMap: {
|
|
535
535
|
type: Array,
|
|
536
536
|
default: () => []
|
|
537
537
|
},
|
|
538
|
-
loading:
|
|
539
|
-
cardBordered:
|
|
538
|
+
loading: he.loading,
|
|
539
|
+
cardBordered: he.cardBordered,
|
|
540
540
|
prefixCls: String,
|
|
541
541
|
defaultParams: Object,
|
|
542
542
|
onSearch: Function
|
|
543
543
|
},
|
|
544
544
|
setup(e, {
|
|
545
545
|
slots: a,
|
|
546
|
-
expose:
|
|
546
|
+
expose: t
|
|
547
547
|
}) {
|
|
548
|
+
var $e, Ie;
|
|
548
549
|
const {
|
|
549
550
|
wrapSSR: u,
|
|
550
551
|
hashId: o
|
|
551
|
-
} = Ze("ProTableForm", [
|
|
552
|
-
manualSearch:
|
|
553
|
-
searchConfig:
|
|
552
|
+
} = Ze("ProTableForm", [ta], e.prefixCls), i = Ml(), d = na(), {
|
|
553
|
+
manualSearch: v,
|
|
554
|
+
searchConfig: b,
|
|
554
555
|
searchActions: x
|
|
555
|
-
} =
|
|
556
|
-
formState:
|
|
556
|
+
} = ge(), {
|
|
557
|
+
formState: f,
|
|
557
558
|
resetFormState: S,
|
|
558
559
|
changeFormState: s
|
|
559
|
-
} = aa(e.defaultParams || {}, e.searchMap || []), n =
|
|
560
|
-
var
|
|
561
|
-
return
|
|
562
|
-
}), y =
|
|
563
|
-
var
|
|
564
|
-
return
|
|
565
|
-
}),
|
|
566
|
-
var
|
|
567
|
-
return (
|
|
560
|
+
} = aa(e.defaultParams || {}, e.searchMap || []), n = D((($e = b.value) == null ? void 0 : $e.collapsed) ?? ((Ie = b.value) == null ? void 0 : Ie.defaultCollapsed)), r = w(() => {
|
|
561
|
+
var l, g;
|
|
562
|
+
return ue((l = x.value) == null ? void 0 : l.reset) ? (g = x.value) == null ? void 0 : g.reset : v.value;
|
|
563
|
+
}), y = w(() => {
|
|
564
|
+
var l;
|
|
565
|
+
return P((l = b.value) == null ? void 0 : l.span);
|
|
566
|
+
}), p = w(() => {
|
|
567
|
+
var l;
|
|
568
|
+
return (l = b.value) == null ? void 0 : l.label;
|
|
568
569
|
});
|
|
569
570
|
q(() => {
|
|
570
|
-
var
|
|
571
|
-
return (
|
|
572
|
-
}, (
|
|
573
|
-
n.value =
|
|
571
|
+
var l;
|
|
572
|
+
return (l = b.value) == null ? void 0 : l.collapsed;
|
|
573
|
+
}, (l) => {
|
|
574
|
+
n.value = l;
|
|
574
575
|
});
|
|
575
|
-
function
|
|
576
|
+
function P(l) {
|
|
576
577
|
let g = 4;
|
|
577
|
-
for (let F = 0; F <
|
|
578
|
-
const
|
|
579
|
-
if (
|
|
580
|
-
g = (
|
|
578
|
+
for (let F = 0; F < ll.length; F += 1) {
|
|
579
|
+
const I = ll[F].value;
|
|
580
|
+
if (d.value[I]) {
|
|
581
|
+
g = (l == null ? void 0 : l[I]) || (e.modal ? 3 : ll[F].span);
|
|
581
582
|
break;
|
|
582
583
|
}
|
|
583
584
|
}
|
|
584
585
|
return g;
|
|
585
586
|
}
|
|
586
|
-
const
|
|
587
|
-
n.value =
|
|
588
|
-
},
|
|
587
|
+
const O = (l) => {
|
|
588
|
+
n.value = l;
|
|
589
|
+
}, M = (l, g, F) => (l + 1) % g === 0 ? {
|
|
589
590
|
...F,
|
|
590
591
|
marginRight: 0
|
|
591
592
|
} : {
|
|
592
593
|
...F,
|
|
593
594
|
marginRight: "2%"
|
|
594
|
-
},
|
|
595
|
-
const
|
|
596
|
-
return g && (
|
|
597
|
-
},
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}, A = (t, g) => {
|
|
603
|
-
var F, $;
|
|
595
|
+
}, G = () => {
|
|
596
|
+
const l = re(f), g = e.searchMap.find((T) => T.valueType === "text") || "", F = e.searchMap.find((T) => T.valueType === "dateRange") || "", I = e.searchMap.find((T) => T.valueType === "treeSelect");
|
|
597
|
+
return g && (l[g.name] = f[g.name] || g.initialValue || ""), F && (l[F.rangeStartName || "start"] = l[F.name] ? l[F.name][0] : "", l[F.rangeEndName || "end"] = l[F.name] ? l[F.name][1] : "", delete l[F.name]), I && (I != null && I.name && oe(f[I == null ? void 0 : I.name]) && (l[I.name] = f[I.name].length ? f[I.name].map((T) => T[I.valueKey === "text" ? "label" : "value"]).join() : ""), I != null && I.name && oe(l[I == null ? void 0 : I.name]) && (l[I.name] = l[I.name].length ? l[I.name].map((T) => T[I.valueKey === "text" ? "label" : "value"]) : "")), l;
|
|
598
|
+
}, W = (l = !1, g) => {
|
|
599
|
+
var F;
|
|
600
|
+
(!v.value || l) && ((F = e.onSearch) == null || F.call(e, G(), l ? g ? "reset" : "submit" : void 0));
|
|
601
|
+
}, K = (l, g) => {
|
|
602
|
+
var F, I;
|
|
604
603
|
switch (g.valueType) {
|
|
605
604
|
case "text":
|
|
606
|
-
s(g.name || "",
|
|
605
|
+
s(g.name || "", l || "");
|
|
607
606
|
break;
|
|
608
607
|
case "select":
|
|
609
|
-
s(g.name || "",
|
|
608
|
+
s(g.name || "", l ?? void 0);
|
|
610
609
|
break;
|
|
611
610
|
case "treeSelect":
|
|
612
|
-
s(g.name || "",
|
|
611
|
+
s(g.name || "", l ?? ((F = g.field) != null && F.treeCheckable || (I = g.field) != null && I.multiple ? [] : null));
|
|
613
612
|
break;
|
|
614
613
|
case "date":
|
|
615
|
-
s(g.name || "",
|
|
614
|
+
s(g.name || "", l ? Ce(l, Ke(g.valueFormat, g.showTime)) : null);
|
|
616
615
|
break;
|
|
617
616
|
case "dateWeek":
|
|
618
|
-
s(g.name || "",
|
|
617
|
+
s(g.name || "", l ? Ce(l, "YYYY-wo") : null);
|
|
619
618
|
break;
|
|
620
619
|
case "dateMonth":
|
|
621
|
-
s(g.name || "",
|
|
620
|
+
s(g.name || "", l ? Ce(l, "YYYY-MM") : null);
|
|
622
621
|
break;
|
|
623
622
|
case "dateQuarter":
|
|
624
|
-
s(g.name || "",
|
|
623
|
+
s(g.name || "", l ? Ce(l, "YYYY-QQ") : null);
|
|
625
624
|
break;
|
|
626
625
|
case "dateYear":
|
|
627
|
-
s(g.name || "",
|
|
626
|
+
s(g.name || "", l ? Ce(l, "YYYY") : null);
|
|
628
627
|
break;
|
|
629
628
|
case "dateRange":
|
|
630
|
-
s(g.name || "",
|
|
629
|
+
s(g.name || "", l && oe(l) && l.length === 2 ? Il(l, Ke(g.valueFormat, g.showTime)) : null);
|
|
631
630
|
break;
|
|
632
631
|
case "time":
|
|
633
|
-
s(g.name || "",
|
|
632
|
+
s(g.name || "", l ? Ce(l, g.valueFormat || "HH:mm:ss") : null);
|
|
634
633
|
break;
|
|
635
634
|
}
|
|
636
|
-
g.valueType === "treeSelect" || g.valueType,
|
|
637
|
-
},
|
|
638
|
-
S(),
|
|
635
|
+
g.valueType === "treeSelect" || g.valueType, W();
|
|
636
|
+
}, le = (l = !0) => {
|
|
637
|
+
S(), W(!0, l);
|
|
639
638
|
};
|
|
640
|
-
|
|
641
|
-
getFormState: () =>
|
|
642
|
-
resetForm:
|
|
639
|
+
t({
|
|
640
|
+
getFormState: () => G(),
|
|
641
|
+
resetForm: le
|
|
643
642
|
});
|
|
644
|
-
const
|
|
643
|
+
const z = () => {
|
|
645
644
|
var g;
|
|
646
|
-
const
|
|
647
|
-
if (
|
|
648
|
-
const F =
|
|
645
|
+
const l = (g = i == null ? void 0 : i.emptyText) == null ? void 0 : g.value;
|
|
646
|
+
if (l) {
|
|
647
|
+
const F = ee(l), I = F ? Nl(l) : Pl(l || []);
|
|
649
648
|
return c("div", {
|
|
650
|
-
class:
|
|
651
|
-
}, [F ?
|
|
649
|
+
class: Se(`${e.prefixCls}-search-empty-text`, o.value)
|
|
650
|
+
}, [F ? I : oe(I) ? I.map((T) => rl(T)) : void 0]);
|
|
652
651
|
}
|
|
653
|
-
},
|
|
654
|
-
default: () => [r.value && c(
|
|
655
|
-
onClick: () =>
|
|
652
|
+
}, Y = () => (v.value || r.value) && c(xe, null, {
|
|
653
|
+
default: () => [r.value && c(Fl, {
|
|
654
|
+
onClick: () => le()
|
|
656
655
|
}, {
|
|
657
656
|
default: () => {
|
|
658
|
-
var
|
|
659
|
-
return [((
|
|
657
|
+
var l;
|
|
658
|
+
return [((l = x.value) == null ? void 0 : l.resetText) || "重置"];
|
|
660
659
|
}
|
|
661
|
-
}),
|
|
660
|
+
}), v.value && c(Fl, {
|
|
662
661
|
loading: e.loading,
|
|
663
662
|
type: "primary",
|
|
664
|
-
onClick: () =>
|
|
663
|
+
onClick: () => W(!0)
|
|
665
664
|
}, {
|
|
666
665
|
default: () => {
|
|
667
|
-
var
|
|
668
|
-
return [((
|
|
666
|
+
var l;
|
|
667
|
+
return [((l = x.value) == null ? void 0 : l.searchText) || "查询"];
|
|
669
668
|
}
|
|
670
669
|
})]
|
|
671
|
-
}),
|
|
672
|
-
formItemStyle:
|
|
673
|
-
|
|
674
|
-
|
|
670
|
+
}), te = ({
|
|
671
|
+
formItemStyle: l,
|
|
672
|
+
collapsed: g,
|
|
673
|
+
collapseRender: F = !0
|
|
675
674
|
}) => c("div", {
|
|
676
|
-
style:
|
|
675
|
+
style: l,
|
|
677
676
|
class: `${e.prefixCls}-search-collapse-buttons ${o.value}`
|
|
678
|
-
}, [c(
|
|
677
|
+
}, [c(xe, {
|
|
679
678
|
size: 16
|
|
680
679
|
}, {
|
|
681
680
|
default: () => {
|
|
682
|
-
var
|
|
683
|
-
return [
|
|
681
|
+
var I, T, R;
|
|
682
|
+
return [Y(), ((I = b.value) == null ? void 0 : I.collapseRender) !== !1 && F && c(Ye, null, [typeof ((T = b.value) == null ? void 0 : T.collapseRender) == "function" ? (R = b.value) == null ? void 0 : R.collapseRender(g) : c("span", {
|
|
684
683
|
class: `${e.prefixCls}-a ${o.value}`,
|
|
685
|
-
onClick: () =>
|
|
686
|
-
}, [g ? "收起" : "展开",
|
|
684
|
+
onClick: () => O(!g)
|
|
685
|
+
}, [g ? "收起" : "展开", g ? c(Rt, null, null) : c(Ft, null, null)])])];
|
|
687
686
|
}
|
|
688
|
-
})]),
|
|
689
|
-
var
|
|
687
|
+
})]), we = (l) => {
|
|
688
|
+
var I, T, R, j;
|
|
690
689
|
let g;
|
|
691
|
-
const F =
|
|
692
|
-
switch (
|
|
690
|
+
const F = v.value ? Rl : Rl.Search;
|
|
691
|
+
switch (l.valueType) {
|
|
693
692
|
case "text":
|
|
694
|
-
g = c(F,
|
|
693
|
+
g = c(F, V({
|
|
695
694
|
style: {
|
|
696
695
|
width: "100%"
|
|
697
696
|
},
|
|
698
|
-
value:
|
|
699
|
-
placeholder:
|
|
700
|
-
allowClear:
|
|
701
|
-
onChange: (
|
|
702
|
-
onSearch: (
|
|
703
|
-
},
|
|
697
|
+
value: f[l.name],
|
|
698
|
+
placeholder: l.placeholder || "请输入",
|
|
699
|
+
allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
|
|
700
|
+
onChange: (m) => K(m.target.value, l),
|
|
701
|
+
onSearch: (m) => W()
|
|
702
|
+
}, l.field || {}), null);
|
|
704
703
|
break;
|
|
705
704
|
case "select":
|
|
706
|
-
g = c(
|
|
705
|
+
g = c(Wt, V({
|
|
707
706
|
style: {
|
|
708
707
|
width: "100%"
|
|
709
708
|
},
|
|
710
|
-
value:
|
|
709
|
+
value: l.loading ? void 0 : f[l.name],
|
|
711
710
|
optionFilterProp: "label",
|
|
712
|
-
placeholder:
|
|
713
|
-
showSearch:
|
|
714
|
-
allowClear:
|
|
715
|
-
getPopupContainer: (
|
|
716
|
-
notFoundContent:
|
|
711
|
+
placeholder: l.placeholder || "请选择",
|
|
712
|
+
showSearch: l.showSearch,
|
|
713
|
+
allowClear: l.allowClear ?? !0,
|
|
714
|
+
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
715
|
+
notFoundContent: l.loading === void 0 ? void 0 : l.loading ? c(sl, {
|
|
717
716
|
size: "small",
|
|
718
|
-
indicator: (
|
|
719
|
-
}, null) :
|
|
720
|
-
onChange: (
|
|
721
|
-
options:
|
|
722
|
-
label:
|
|
723
|
-
value:
|
|
717
|
+
indicator: (I = i == null ? void 0 : i.indicator) == null ? void 0 : I.value
|
|
718
|
+
}, null) : z(),
|
|
719
|
+
onChange: (m) => K(m, l),
|
|
720
|
+
options: l.loading ? [] : (T = l == null ? void 0 : l.valueEnum) == null ? void 0 : T.map((m) => ({
|
|
721
|
+
label: m.text,
|
|
722
|
+
value: m.value
|
|
724
723
|
}))
|
|
725
|
-
},
|
|
724
|
+
}, l.field || {}), null);
|
|
726
725
|
break;
|
|
727
726
|
case "treeSelect":
|
|
728
|
-
g = c(
|
|
727
|
+
g = c(Lt, V({
|
|
729
728
|
style: {
|
|
730
729
|
width: "100%"
|
|
731
730
|
},
|
|
732
|
-
value:
|
|
733
|
-
placeholder:
|
|
734
|
-
allowClear:
|
|
735
|
-
treeData:
|
|
736
|
-
getPopupContainer: (
|
|
737
|
-
notFoundContent:
|
|
731
|
+
value: f[l.name],
|
|
732
|
+
placeholder: l.placeholder || "请选择",
|
|
733
|
+
allowClear: l.allowClear ?? !0,
|
|
734
|
+
treeData: l.loading ? [] : l.valueEnum,
|
|
735
|
+
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
736
|
+
notFoundContent: l.loading === void 0 ? void 0 : l.loading ? c(sl, {
|
|
738
737
|
size: "small",
|
|
739
|
-
indicator: (
|
|
740
|
-
}, null) :
|
|
741
|
-
onChange: (
|
|
742
|
-
},
|
|
738
|
+
indicator: (R = i == null ? void 0 : i.indicator) == null ? void 0 : R.value
|
|
739
|
+
}, null) : z(),
|
|
740
|
+
onChange: (m) => K(m, l)
|
|
741
|
+
}, l.field || {}), null);
|
|
743
742
|
break;
|
|
744
743
|
case "date":
|
|
745
|
-
g = c(
|
|
744
|
+
g = c(zl, V({
|
|
746
745
|
style: {
|
|
747
746
|
width: "100%"
|
|
748
747
|
},
|
|
749
|
-
value:
|
|
750
|
-
getPopupContainer: (
|
|
751
|
-
placeholder:
|
|
752
|
-
allowClear:
|
|
753
|
-
format:
|
|
754
|
-
showTime:
|
|
755
|
-
showToday:
|
|
756
|
-
onChange: (
|
|
757
|
-
},
|
|
748
|
+
value: f[l.name] ? X(f[l.name]) : void 0,
|
|
749
|
+
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
750
|
+
placeholder: l.placeholder || "请选择",
|
|
751
|
+
allowClear: l.allowClear ?? !0,
|
|
752
|
+
format: Ke(l.valueFormat, l.showTime),
|
|
753
|
+
showTime: l.showTime,
|
|
754
|
+
showToday: l.showToday || !0,
|
|
755
|
+
onChange: (m) => K(m, l)
|
|
756
|
+
}, l.field || {}), null);
|
|
758
757
|
break;
|
|
759
758
|
case "dateWeek":
|
|
760
|
-
g = c(oa,
|
|
759
|
+
g = c(oa, V({
|
|
761
760
|
style: {
|
|
762
761
|
width: "100%"
|
|
763
762
|
},
|
|
764
|
-
value:
|
|
765
|
-
getPopupContainer: (
|
|
766
|
-
allowClear:
|
|
767
|
-
placeholder:
|
|
768
|
-
onChange: (
|
|
769
|
-
},
|
|
763
|
+
value: f[l.name] ? X(f[l.name], l.valueFormat || "YYYY-wo") : void 0,
|
|
764
|
+
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
765
|
+
allowClear: l.allowClear ?? !0,
|
|
766
|
+
placeholder: l.placeholder || "请选择",
|
|
767
|
+
onChange: (m) => K(m, l)
|
|
768
|
+
}, l.field || {}), null);
|
|
770
769
|
break;
|
|
771
770
|
case "dateMonth":
|
|
772
|
-
g = c(ua,
|
|
771
|
+
g = c(ua, V({
|
|
773
772
|
style: {
|
|
774
773
|
width: "100%"
|
|
775
774
|
},
|
|
776
|
-
value:
|
|
777
|
-
getPopupContainer: (
|
|
778
|
-
allowClear:
|
|
779
|
-
placeholder:
|
|
780
|
-
onChange: (
|
|
781
|
-
},
|
|
775
|
+
value: f[l.name] ? X(f[l.name], l.valueFormat || "YYYY-MM") : void 0,
|
|
776
|
+
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
777
|
+
allowClear: l.allowClear ?? !0,
|
|
778
|
+
placeholder: l.placeholder || "请选择",
|
|
779
|
+
onChange: (m) => K(m, l)
|
|
780
|
+
}, l.field || {}), null);
|
|
782
781
|
break;
|
|
783
782
|
case "dateQuarter":
|
|
784
|
-
g = c(ra,
|
|
783
|
+
g = c(ra, V({
|
|
785
784
|
style: {
|
|
786
785
|
width: "100%"
|
|
787
786
|
},
|
|
788
|
-
value:
|
|
789
|
-
getPopupContainer: (
|
|
790
|
-
allowClear:
|
|
791
|
-
placeholder:
|
|
792
|
-
onChange: (
|
|
793
|
-
},
|
|
787
|
+
value: f[l.name] ? X(f[l.name], l.valueFormat || "YYYY-QQ") : void 0,
|
|
788
|
+
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
789
|
+
allowClear: l.allowClear ?? !0,
|
|
790
|
+
placeholder: l.placeholder || "请选择",
|
|
791
|
+
onChange: (m) => K(m, l)
|
|
792
|
+
}, l.field || {}), null);
|
|
794
793
|
break;
|
|
795
794
|
case "dateYear":
|
|
796
|
-
g = c(sa,
|
|
795
|
+
g = c(sa, V({
|
|
797
796
|
style: {
|
|
798
797
|
width: "100%"
|
|
799
798
|
},
|
|
800
|
-
value:
|
|
801
|
-
getPopupContainer: (
|
|
802
|
-
allowClear:
|
|
803
|
-
placeholder:
|
|
804
|
-
onChange: (
|
|
805
|
-
},
|
|
799
|
+
value: f[l.name] ? X(f[l.name], l.valueFormat || "YYYY") : void 0,
|
|
800
|
+
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
801
|
+
allowClear: l.allowClear ?? !0,
|
|
802
|
+
placeholder: l.placeholder || "请选择",
|
|
803
|
+
onChange: (m) => K(m, l)
|
|
804
|
+
}, l.field || {}), null);
|
|
806
805
|
break;
|
|
807
806
|
case "dateRange":
|
|
808
|
-
g = c(ia,
|
|
807
|
+
g = c(ia, V({
|
|
809
808
|
style: {
|
|
810
809
|
width: "100%"
|
|
811
810
|
},
|
|
812
|
-
value:
|
|
813
|
-
getPopupContainer: (
|
|
814
|
-
placeholder:
|
|
815
|
-
format:
|
|
816
|
-
showTime:
|
|
817
|
-
onChange: (
|
|
818
|
-
},
|
|
811
|
+
value: f[l.name] && oe(f[l.name]) && ((j = f[l.name]) == null ? void 0 : j.length) === 2 ? Il(f[l.name], Ke(l.valueFormat, l.showTime), "dayjs") : void 0,
|
|
812
|
+
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
813
|
+
placeholder: l.placeholder || ["开始日期", "结束日期"],
|
|
814
|
+
format: Ke(l.valueFormat, l.showTime),
|
|
815
|
+
showTime: l.showTime,
|
|
816
|
+
onChange: (m) => K(m, l)
|
|
817
|
+
}, l.field || {}), null);
|
|
819
818
|
break;
|
|
820
819
|
case "time":
|
|
821
|
-
g = c(
|
|
820
|
+
g = c(Yt, V({
|
|
822
821
|
style: {
|
|
823
822
|
width: "100%"
|
|
824
823
|
},
|
|
825
|
-
value:
|
|
826
|
-
getPopupContainer: (
|
|
827
|
-
placeholder:
|
|
828
|
-
allowClear:
|
|
829
|
-
use12Hours:
|
|
830
|
-
format:
|
|
831
|
-
onChange: (
|
|
832
|
-
},
|
|
824
|
+
value: f[l.name] ? X(f[l.name], l.valueFormat || "HH:mm:ss") : void 0,
|
|
825
|
+
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
826
|
+
placeholder: l.placeholder || "请选择",
|
|
827
|
+
allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
|
|
828
|
+
use12Hours: l.use12Hours,
|
|
829
|
+
format: l.valueFormat || "HH:mm:ss",
|
|
830
|
+
onChange: (m) => K(m, l)
|
|
831
|
+
}, l.field || {}), null);
|
|
833
832
|
break;
|
|
834
833
|
}
|
|
835
834
|
return g;
|
|
836
|
-
},
|
|
837
|
-
formItemStyle:
|
|
835
|
+
}, Z = ({
|
|
836
|
+
formItemStyle: l = {},
|
|
838
837
|
item: g
|
|
839
838
|
}) => {
|
|
840
|
-
var
|
|
841
|
-
const F =
|
|
839
|
+
var R, j, m, Q, ce, _, ae, Be;
|
|
840
|
+
const F = ee(g) ? (R = g.props) == null ? void 0 : R.label : g.label, I = (ee(g) ? (j = g.props) == null ? void 0 : j.labelWidth : g.labelWidth) || ((m = p.value) == null ? void 0 : m.width), T = (ee(g) ? (Q = g.props) == null ? void 0 : Q.labelAlign : g.labelAlign) || ((ce = p.value) == null ? void 0 : ce.align);
|
|
842
841
|
return c("div", {
|
|
843
842
|
class: `${e.prefixCls}-search-item`,
|
|
844
843
|
style: {
|
|
845
|
-
...
|
|
846
|
-
gap: (
|
|
844
|
+
...l,
|
|
845
|
+
gap: (_ = p.value) != null && _.gap ? Bl((ae = p.value) == null ? void 0 : ae.gap) : void 0
|
|
847
846
|
}
|
|
848
847
|
}, [F && c("div", {
|
|
849
|
-
class:
|
|
848
|
+
class: Se(`${e.prefixCls}-search-item-label`, ((Be = p.value) == null ? void 0 : Be.colon) === !1 && `${e.prefixCls}-search-item-label-no-colon`, T && `${e.prefixCls}-search-item-label-${T}`),
|
|
850
849
|
style: {
|
|
851
|
-
width:
|
|
850
|
+
width: I ? Bl(I) : void 0
|
|
852
851
|
}
|
|
853
852
|
}, [F]), c("div", {
|
|
854
|
-
class:
|
|
855
|
-
}, [
|
|
856
|
-
},
|
|
857
|
-
var
|
|
858
|
-
let
|
|
859
|
-
|
|
860
|
-
const g = ca([...e.searchMap, ...
|
|
861
|
-
var
|
|
853
|
+
class: Se(`${e.prefixCls}-search-item-children`)
|
|
854
|
+
}, [ee(g) ? g : we(g)])]);
|
|
855
|
+
}, Te = () => {
|
|
856
|
+
var I, T;
|
|
857
|
+
let l = ((I = a.default) == null ? void 0 : I.call(a)) || [];
|
|
858
|
+
l.length === 1 && l[0].type === "template" && (l = ((T = l[0]) == null ? void 0 : T.children) || []);
|
|
859
|
+
const g = ca([...e.searchMap, ...l.map((R) => {
|
|
860
|
+
var j;
|
|
862
861
|
return {
|
|
863
|
-
...
|
|
864
|
-
order: ((
|
|
862
|
+
...R,
|
|
863
|
+
order: ((j = R.props) == null ? void 0 : j.order) || void 0
|
|
865
864
|
};
|
|
866
865
|
})]), F = {
|
|
867
866
|
width: `${(100 - (y.value - 1) * 2) / y.value}%`
|
|
868
867
|
};
|
|
869
|
-
return g.map((
|
|
870
|
-
const
|
|
871
|
-
return g.length < y.value || n.value ? c(
|
|
872
|
-
formItemStyle:
|
|
873
|
-
item:
|
|
874
|
-
}),
|
|
868
|
+
return g.map((R, j) => {
|
|
869
|
+
const m = M(j, y.value, F);
|
|
870
|
+
return g.length < y.value || n.value ? c(Ye, null, [Z({
|
|
871
|
+
formItemStyle: m,
|
|
872
|
+
item: R
|
|
873
|
+
}), j === g.length - 1 && te({
|
|
875
874
|
formItemStyle: {
|
|
876
875
|
flex: 1,
|
|
877
876
|
justifyContent: "flex-end"
|
|
878
877
|
},
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
})]) : c(
|
|
882
|
-
formItemStyle:
|
|
883
|
-
item:
|
|
884
|
-
}),
|
|
885
|
-
formItemStyle:
|
|
886
|
-
item:
|
|
887
|
-
}),
|
|
878
|
+
collapsed: n.value,
|
|
879
|
+
collapseRender: !!n.value
|
|
880
|
+
})]) : c(Ye, null, [j < y.value - 1 && Z({
|
|
881
|
+
formItemStyle: m,
|
|
882
|
+
item: R
|
|
883
|
+
}), j === y.value - 1 && (y.value - 1 === 0 || g.length === y.value) && Z({
|
|
884
|
+
formItemStyle: m,
|
|
885
|
+
item: R
|
|
886
|
+
}), j === y.value - 1 && g.length >= y.value && te({
|
|
888
887
|
formItemStyle: {
|
|
889
888
|
flex: 1,
|
|
890
889
|
justifyContent: "flex-end"
|
|
891
890
|
},
|
|
892
|
-
|
|
893
|
-
|
|
891
|
+
collapsed: !1,
|
|
892
|
+
collapseRender: g.length !== y.value
|
|
894
893
|
})]);
|
|
895
894
|
});
|
|
896
895
|
};
|
|
897
896
|
return () => {
|
|
898
897
|
var g;
|
|
899
|
-
const
|
|
898
|
+
const l = e.cardBordered && `${e.prefixCls}-search-border`;
|
|
900
899
|
return u(c("div", {
|
|
901
|
-
class:
|
|
902
|
-
}, [
|
|
900
|
+
class: Se(o.value, `${e.prefixCls}-search`, l, o.value, (g = b.value) == null ? void 0 : g.className)
|
|
901
|
+
}, [Te()]));
|
|
903
902
|
};
|
|
904
903
|
}
|
|
905
904
|
});
|
|
906
|
-
|
|
907
|
-
const
|
|
908
|
-
const a =
|
|
909
|
-
return a.value = e, (...
|
|
905
|
+
Ll.inheritAttrs = !1;
|
|
906
|
+
const We = (e) => {
|
|
907
|
+
const a = D(null);
|
|
908
|
+
return a.value = e, (...t) => {
|
|
910
909
|
var u;
|
|
911
|
-
return (u = a.value) == null ? void 0 : u.call(a, ...
|
|
910
|
+
return (u = a.value) == null ? void 0 : u.call(a, ...t);
|
|
912
911
|
};
|
|
913
912
|
}, da = (e) => ({
|
|
914
913
|
[`${e.componentCls}`]: {
|
|
@@ -992,42 +991,42 @@ const Ye = (e) => {
|
|
|
992
991
|
}
|
|
993
992
|
}
|
|
994
993
|
}
|
|
995
|
-
}),
|
|
994
|
+
}), tl = ({
|
|
996
995
|
title: e,
|
|
997
996
|
show: a,
|
|
998
|
-
treeKey:
|
|
997
|
+
treeKey: t,
|
|
999
998
|
fixed: u
|
|
1000
999
|
}, {
|
|
1001
1000
|
slots: o
|
|
1002
1001
|
}) => {
|
|
1003
1002
|
const {
|
|
1004
1003
|
cacheColumns: i,
|
|
1005
|
-
settingsAction:
|
|
1006
|
-
} =
|
|
1007
|
-
return a ? c(
|
|
1004
|
+
settingsAction: d
|
|
1005
|
+
} = ge();
|
|
1006
|
+
return a ? c(ve, {
|
|
1008
1007
|
title: e
|
|
1009
1008
|
}, {
|
|
1010
1009
|
default: () => {
|
|
1011
|
-
var
|
|
1010
|
+
var v;
|
|
1012
1011
|
return [c("span", {
|
|
1013
|
-
onClick: (
|
|
1012
|
+
onClick: (b) => {
|
|
1014
1013
|
var n, r, y;
|
|
1015
|
-
|
|
1016
|
-
const x = ((r = (n =
|
|
1017
|
-
if (typeof
|
|
1014
|
+
b.stopPropagation(), b.preventDefault();
|
|
1015
|
+
const x = ((r = (n = C(i)) == null ? void 0 : n.find((p) => p.uuid === t)) == null ? void 0 : r.key) || "", f = (d == null ? void 0 : d.columnsMap[x]) || {};
|
|
1016
|
+
if (typeof f.disable == "boolean" ? f.disable : (y = f.disable) == null ? void 0 : y.icon) return;
|
|
1018
1017
|
const s = {
|
|
1019
|
-
...
|
|
1018
|
+
...d == null ? void 0 : d.columnsMap,
|
|
1020
1019
|
[x]: {
|
|
1021
|
-
...
|
|
1020
|
+
...f,
|
|
1022
1021
|
fixed: u
|
|
1023
1022
|
}
|
|
1024
1023
|
};
|
|
1025
|
-
|
|
1024
|
+
d == null || d.setColumnsMap(s, "fixed");
|
|
1026
1025
|
}
|
|
1027
|
-
}, [(
|
|
1026
|
+
}, [(v = o.default) == null ? void 0 : v.call(o)])];
|
|
1028
1027
|
}
|
|
1029
1028
|
}) : null;
|
|
1030
|
-
}, fa = /* @__PURE__ */
|
|
1029
|
+
}, fa = /* @__PURE__ */ me({
|
|
1031
1030
|
props: {
|
|
1032
1031
|
treeKey: String,
|
|
1033
1032
|
hashId: String,
|
|
@@ -1039,34 +1038,34 @@ const Ye = (e) => {
|
|
|
1039
1038
|
setup(e) {
|
|
1040
1039
|
const {
|
|
1041
1040
|
cacheColumns: a
|
|
1042
|
-
} =
|
|
1041
|
+
} = ge(), t = w(() => {
|
|
1043
1042
|
var o, i;
|
|
1044
|
-
return ((i = (o =
|
|
1045
|
-
}), u =
|
|
1043
|
+
return ((i = (o = C(a)) == null ? void 0 : o.find((d) => d.uuid === e.treeKey)) == null ? void 0 : i.key) || "";
|
|
1044
|
+
}), u = w(() => t.value === "action" && e.autoScroll);
|
|
1046
1045
|
return () => {
|
|
1047
1046
|
const o = c("span", {
|
|
1048
1047
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
1049
|
-
}, [c(
|
|
1048
|
+
}, [c(tl, {
|
|
1050
1049
|
treeKey: e.treeKey || "",
|
|
1051
1050
|
fixed: "left",
|
|
1052
1051
|
title: "固定在列首",
|
|
1053
1052
|
show: e.fixed !== "left" && !u.value
|
|
1054
1053
|
}, {
|
|
1055
|
-
default: () => [c(
|
|
1056
|
-
}), c(
|
|
1054
|
+
default: () => [c(It, null, null)]
|
|
1055
|
+
}), c(tl, {
|
|
1057
1056
|
treeKey: e.treeKey || "",
|
|
1058
1057
|
fixed: void 0,
|
|
1059
1058
|
title: "不固定",
|
|
1060
1059
|
show: !!e.fixed && !u.value
|
|
1061
1060
|
}, {
|
|
1062
|
-
default: () => [c(
|
|
1063
|
-
}), c(
|
|
1061
|
+
default: () => [c(Ot, null, null)]
|
|
1062
|
+
}), c(tl, {
|
|
1064
1063
|
treeKey: e.treeKey || "",
|
|
1065
1064
|
fixed: "right",
|
|
1066
1065
|
title: "固定在列尾",
|
|
1067
1066
|
show: e.fixed !== "right"
|
|
1068
1067
|
}, {
|
|
1069
|
-
default: () => [c(
|
|
1068
|
+
default: () => [c(Pt, null, null)]
|
|
1070
1069
|
})]);
|
|
1071
1070
|
return c("span", {
|
|
1072
1071
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1076,7 +1075,7 @@ const Ye = (e) => {
|
|
|
1076
1075
|
}, [e.title]), o]);
|
|
1077
1076
|
};
|
|
1078
1077
|
}
|
|
1079
|
-
}),
|
|
1078
|
+
}), al = /* @__PURE__ */ me({
|
|
1080
1079
|
props: {
|
|
1081
1080
|
list: Array,
|
|
1082
1081
|
keys: Array,
|
|
@@ -1091,74 +1090,74 @@ const Ye = (e) => {
|
|
|
1091
1090
|
}
|
|
1092
1091
|
},
|
|
1093
1092
|
setup(e) {
|
|
1094
|
-
const a =
|
|
1093
|
+
const a = D(il().uuid(15)), t = w(() => e.list && e.list.length > 0), u = D([]), o = D([]), {
|
|
1095
1094
|
cacheColumns: i,
|
|
1096
|
-
slots:
|
|
1097
|
-
settingsAction:
|
|
1098
|
-
} =
|
|
1095
|
+
slots: d,
|
|
1096
|
+
settingsAction: v
|
|
1097
|
+
} = ge(), b = (s, n) => s.map(({
|
|
1099
1098
|
key: r,
|
|
1100
1099
|
children: y,
|
|
1101
|
-
uuid:
|
|
1102
|
-
...
|
|
1100
|
+
uuid: p,
|
|
1101
|
+
...P
|
|
1103
1102
|
}) => {
|
|
1104
|
-
var
|
|
1105
|
-
const
|
|
1103
|
+
var W;
|
|
1104
|
+
const O = (v == null ? void 0 : v.columnsMap[r || "null"]) || {
|
|
1106
1105
|
show: !0
|
|
1107
1106
|
};
|
|
1108
|
-
let
|
|
1109
|
-
|
|
1110
|
-
const
|
|
1111
|
-
key:
|
|
1112
|
-
...Je(
|
|
1113
|
-
checked:
|
|
1107
|
+
let M = !1;
|
|
1108
|
+
O.show !== !1 && (n == null ? void 0 : n.show) !== !1 && !y && (M = !0);
|
|
1109
|
+
const G = {
|
|
1110
|
+
key: p || "",
|
|
1111
|
+
...Je(P, ["dataIndex"]),
|
|
1112
|
+
checked: M,
|
|
1114
1113
|
selectable: !1,
|
|
1115
|
-
disabled:
|
|
1116
|
-
disableCheckbox: typeof
|
|
1114
|
+
disabled: O.disable === !0,
|
|
1115
|
+
disableCheckbox: typeof O.disable == "boolean" ? O.disable : (W = O.disable) == null ? void 0 : W.checkbox,
|
|
1117
1116
|
isLeaf: !0
|
|
1118
1117
|
};
|
|
1119
|
-
return y && (
|
|
1118
|
+
return y && (G.children = b(y, O)), G;
|
|
1120
1119
|
});
|
|
1121
|
-
|
|
1122
|
-
const s =
|
|
1123
|
-
u.value = s, o.value = s.filter((n) => n.checked).map((n) => n.key), (
|
|
1120
|
+
He(() => {
|
|
1121
|
+
const s = b(e.list || []);
|
|
1122
|
+
u.value = s, o.value = s.filter((n) => n.checked).map((n) => n.key), (v == null ? void 0 : v.operationType.value) === "fixed" && (a.value = il().uuid(15));
|
|
1124
1123
|
});
|
|
1125
|
-
const x =
|
|
1126
|
-
var
|
|
1127
|
-
const y = ((
|
|
1128
|
-
...
|
|
1129
|
-
},
|
|
1130
|
-
if (
|
|
1124
|
+
const x = We((s, n, r) => {
|
|
1125
|
+
var le, z;
|
|
1126
|
+
const y = ((le = C(i).find((Y) => Y.uuid === s)) == null ? void 0 : le.key) || "", p = ((z = C(i).find((Y) => Y.uuid === n)) == null ? void 0 : z.key) || "", P = {
|
|
1127
|
+
...v == null ? void 0 : v.columnsMap
|
|
1128
|
+
}, O = [...v.sortKeyColumns.value], M = O.findIndex((Y) => Y === y), G = O.findIndex((Y) => Y === p), W = r > M;
|
|
1129
|
+
if (M < 0)
|
|
1131
1130
|
return;
|
|
1132
|
-
const
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
...
|
|
1136
|
-
order:
|
|
1131
|
+
const K = O[M];
|
|
1132
|
+
O.splice(M, 1), r === 0 ? O.unshift(K) : O.splice(W ? G : G + 1, 0, K), O.forEach((Y, te) => {
|
|
1133
|
+
P[Y] = {
|
|
1134
|
+
...P[Y] || {},
|
|
1135
|
+
order: te
|
|
1137
1136
|
};
|
|
1138
|
-
}),
|
|
1139
|
-
}),
|
|
1140
|
-
var
|
|
1141
|
-
const n = s.node.key, r = ((
|
|
1142
|
-
...(
|
|
1137
|
+
}), v == null || v.setColumnsMap(P, "drop"), v == null || v.setSortKeyColumns(O);
|
|
1138
|
+
}), f = We((s) => {
|
|
1139
|
+
var O;
|
|
1140
|
+
const n = s.node.key, r = ((O = C(i).find((M) => M.uuid === n)) == null ? void 0 : O.key) || "", p = {
|
|
1141
|
+
...(v == null ? void 0 : v.columnsMap[r]) || {}
|
|
1143
1142
|
};
|
|
1144
|
-
|
|
1145
|
-
const
|
|
1146
|
-
...
|
|
1147
|
-
[r]:
|
|
1143
|
+
p.show = s.checked;
|
|
1144
|
+
const P = {
|
|
1145
|
+
...v == null ? void 0 : v.columnsMap,
|
|
1146
|
+
[r]: p
|
|
1148
1147
|
};
|
|
1149
|
-
|
|
1148
|
+
v == null || v.setColumnsMap(P, "show");
|
|
1150
1149
|
}), S = (s) => {
|
|
1151
|
-
const n =
|
|
1152
|
-
return s.title ||
|
|
1150
|
+
const n = C(i).find((r) => r.uuid === s.key);
|
|
1151
|
+
return s.title || Ct(d, "headerCell", {
|
|
1153
1152
|
title: n.title,
|
|
1154
1153
|
column: n
|
|
1155
1154
|
}, () => [n.title]);
|
|
1156
1155
|
};
|
|
1157
1156
|
return () => {
|
|
1158
1157
|
var s, n;
|
|
1159
|
-
return
|
|
1158
|
+
return t.value ? c(Ye, null, [e.showTitle && c("span", {
|
|
1160
1159
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1161
|
-
}, [e.title]), c(
|
|
1160
|
+
}, [e.title]), c(qt, {
|
|
1162
1161
|
key: a.value,
|
|
1163
1162
|
draggable: e.draggable && !!((s = u.value) != null && s.length) && ((n = u.value) == null ? void 0 : n.length) > 1,
|
|
1164
1163
|
checkable: e.checkable,
|
|
@@ -1167,24 +1166,24 @@ const Ye = (e) => {
|
|
|
1167
1166
|
checkedKeys: o.value,
|
|
1168
1167
|
height: 280,
|
|
1169
1168
|
onDrop: (r) => {
|
|
1170
|
-
const y = r.node.key,
|
|
1171
|
-
dropPosition:
|
|
1172
|
-
dropToGap:
|
|
1173
|
-
} = r,
|
|
1174
|
-
x(
|
|
1169
|
+
const y = r.node.key, p = r.dragNode.key, {
|
|
1170
|
+
dropPosition: P,
|
|
1171
|
+
dropToGap: O
|
|
1172
|
+
} = r, M = P === -1 || !O ? P + 1 : P;
|
|
1173
|
+
x(p, y, M);
|
|
1175
1174
|
},
|
|
1176
|
-
onCheck: (r, y) =>
|
|
1175
|
+
onCheck: (r, y) => f(y),
|
|
1177
1176
|
treeData: u.value
|
|
1178
1177
|
}, {
|
|
1179
1178
|
title: (r) => {
|
|
1180
|
-
var
|
|
1179
|
+
var p;
|
|
1181
1180
|
const y = {
|
|
1182
1181
|
...r,
|
|
1183
1182
|
children: void 0,
|
|
1184
1183
|
title: S(r),
|
|
1185
|
-
autoScroll: (
|
|
1184
|
+
autoScroll: (p = v == null ? void 0 : v.autoScroll) == null ? void 0 : p.value
|
|
1186
1185
|
};
|
|
1187
|
-
return c(fa,
|
|
1186
|
+
return c(fa, V({
|
|
1188
1187
|
hashId: e.hashId,
|
|
1189
1188
|
className: e.className
|
|
1190
1189
|
}, y, {
|
|
@@ -1194,7 +1193,7 @@ const Ye = (e) => {
|
|
|
1194
1193
|
})]) : null;
|
|
1195
1194
|
};
|
|
1196
1195
|
}
|
|
1197
|
-
}), ha = /* @__PURE__ */
|
|
1196
|
+
}), ha = /* @__PURE__ */ me({
|
|
1198
1197
|
props: {
|
|
1199
1198
|
hashId: String,
|
|
1200
1199
|
className: String,
|
|
@@ -1204,22 +1203,22 @@ const Ye = (e) => {
|
|
|
1204
1203
|
setup(e) {
|
|
1205
1204
|
const {
|
|
1206
1205
|
columns: a
|
|
1207
|
-
} =
|
|
1208
|
-
q(() => a.value, (
|
|
1209
|
-
|
|
1206
|
+
} = ge(), t = D([]), u = D([]), o = D([]), i = D([]);
|
|
1207
|
+
q(() => a.value, (b) => {
|
|
1208
|
+
t.value = [], u.value = [], o.value = [], b.forEach((x) => {
|
|
1210
1209
|
if (x.hideInSetting)
|
|
1211
1210
|
return;
|
|
1212
1211
|
const {
|
|
1213
|
-
fixed:
|
|
1212
|
+
fixed: f,
|
|
1214
1213
|
show: S,
|
|
1215
1214
|
uuid: s
|
|
1216
1215
|
} = x;
|
|
1217
|
-
if ((S || S === void 0) && s && i.value.push(s),
|
|
1216
|
+
if ((S || S === void 0) && s && i.value.push(s), f === "left") {
|
|
1218
1217
|
u.value.push(x);
|
|
1219
1218
|
return;
|
|
1220
1219
|
}
|
|
1221
|
-
if (
|
|
1222
|
-
|
|
1220
|
+
if (f === "right") {
|
|
1221
|
+
t.value.push(x);
|
|
1223
1222
|
return;
|
|
1224
1223
|
}
|
|
1225
1224
|
o.value.push(x);
|
|
@@ -1227,14 +1226,14 @@ const Ye = (e) => {
|
|
|
1227
1226
|
}, {
|
|
1228
1227
|
immediate: !0
|
|
1229
1228
|
});
|
|
1230
|
-
const
|
|
1229
|
+
const d = w(() => t.value && t.value.length > 0), v = w(() => u.value && u.value.length > 0);
|
|
1231
1230
|
return () => c("div", {
|
|
1232
1231
|
class: {
|
|
1233
1232
|
[`${e.hashId}`]: !0,
|
|
1234
1233
|
[`${e.className}-list`]: !0,
|
|
1235
|
-
[`${e.className}-list-group`]:
|
|
1234
|
+
[`${e.className}-list-group`]: d.value || v.value
|
|
1236
1235
|
}
|
|
1237
|
-
}, [c(
|
|
1236
|
+
}, [c(al, {
|
|
1238
1237
|
title: "固定在左侧",
|
|
1239
1238
|
list: u.value,
|
|
1240
1239
|
keys: i.value,
|
|
@@ -1242,18 +1241,18 @@ const Ye = (e) => {
|
|
|
1242
1241
|
draggable: e.draggable,
|
|
1243
1242
|
checkable: e.checkable,
|
|
1244
1243
|
className: e.className
|
|
1245
|
-
}, null), c(
|
|
1244
|
+
}, null), c(al, {
|
|
1246
1245
|
list: o.value,
|
|
1247
1246
|
keys: i.value,
|
|
1248
1247
|
hashId: e.hashId,
|
|
1249
1248
|
draggable: e.draggable,
|
|
1250
1249
|
checkable: e.checkable,
|
|
1251
1250
|
title: "不固定",
|
|
1252
|
-
showTitle:
|
|
1251
|
+
showTitle: v.value || d.value,
|
|
1253
1252
|
className: e.className
|
|
1254
|
-
}, null), c(
|
|
1253
|
+
}, null), c(al, {
|
|
1255
1254
|
title: "固定在右侧",
|
|
1256
|
-
list:
|
|
1255
|
+
list: t.value,
|
|
1257
1256
|
keys: i.value,
|
|
1258
1257
|
hashId: e.hashId,
|
|
1259
1258
|
draggable: e.draggable,
|
|
@@ -1261,7 +1260,7 @@ const Ye = (e) => {
|
|
|
1261
1260
|
className: e.className
|
|
1262
1261
|
}, null)]);
|
|
1263
1262
|
}
|
|
1264
|
-
}), va = /* @__PURE__ */
|
|
1263
|
+
}), va = /* @__PURE__ */ me({
|
|
1265
1264
|
props: {
|
|
1266
1265
|
draggable: {
|
|
1267
1266
|
type: Boolean,
|
|
@@ -1275,53 +1274,53 @@ const Ye = (e) => {
|
|
|
1275
1274
|
extra: [Function, Object, String, Boolean]
|
|
1276
1275
|
},
|
|
1277
1276
|
setup(e) {
|
|
1278
|
-
const a =
|
|
1277
|
+
const a = ol({
|
|
1279
1278
|
suffixCls: "table-column-setting",
|
|
1280
1279
|
isPor: !0
|
|
1281
1280
|
}), {
|
|
1282
|
-
wrapSSR:
|
|
1281
|
+
wrapSSR: t,
|
|
1283
1282
|
hashId: u
|
|
1284
1283
|
} = Ze("ColumnSetting", [da], a), {
|
|
1285
1284
|
columns: o,
|
|
1286
1285
|
settingsAction: i
|
|
1287
|
-
} =
|
|
1286
|
+
} = ge(), d = We((S = !0) => {
|
|
1288
1287
|
const s = {}, n = (r) => {
|
|
1289
1288
|
r.forEach(({
|
|
1290
1289
|
key: y,
|
|
1291
|
-
fixed:
|
|
1292
|
-
index:
|
|
1293
|
-
children:
|
|
1290
|
+
fixed: p,
|
|
1291
|
+
index: P,
|
|
1292
|
+
children: O
|
|
1294
1293
|
}) => {
|
|
1295
|
-
const
|
|
1296
|
-
|
|
1294
|
+
const M = kl(y, P);
|
|
1295
|
+
M && (s[M] = {
|
|
1297
1296
|
show: S,
|
|
1298
|
-
fixed:
|
|
1299
|
-
}),
|
|
1297
|
+
fixed: p
|
|
1298
|
+
}), O && n(O);
|
|
1300
1299
|
});
|
|
1301
1300
|
};
|
|
1302
1301
|
n(o.value), i == null || i.setColumnsMap(s, "show");
|
|
1303
|
-
}),
|
|
1304
|
-
S.target.checked ?
|
|
1305
|
-
}),
|
|
1302
|
+
}), v = We((S) => {
|
|
1303
|
+
S.target.checked ? d() : d(!1);
|
|
1304
|
+
}), b = We(() => {
|
|
1306
1305
|
i == null || i.setColumnsMap(i == null ? void 0 : i.cacheColumnsMap, "fixed");
|
|
1307
|
-
}), x =
|
|
1306
|
+
}), x = w(() => (
|
|
1308
1307
|
// @ts-ignore
|
|
1309
1308
|
Object.values(i == null ? void 0 : i.columnsMap).filter((S) => !S || S.show === !1)
|
|
1310
|
-
)),
|
|
1311
|
-
return () =>
|
|
1309
|
+
)), f = w(() => C(x).length > 0 && C(x).length !== o.value.length);
|
|
1310
|
+
return () => t(c(Ht, {
|
|
1312
1311
|
arrowPointAtCenter: !0,
|
|
1313
1312
|
title: c("div", {
|
|
1314
1313
|
class: [`${a}-title`, u.value]
|
|
1315
|
-
}, [c(
|
|
1316
|
-
indeterminate:
|
|
1317
|
-
checked:
|
|
1318
|
-
onChange: (S) =>
|
|
1314
|
+
}, [c(Vt, {
|
|
1315
|
+
indeterminate: f.value,
|
|
1316
|
+
checked: C(x).length === 0 && C(x).length !== o.value.length,
|
|
1317
|
+
onChange: (S) => v(S)
|
|
1319
1318
|
}, {
|
|
1320
|
-
default: () => [
|
|
1319
|
+
default: () => [Le("列展示")]
|
|
1321
1320
|
}), e.checkedReset ? c("a", {
|
|
1322
|
-
onClick:
|
|
1321
|
+
onClick: b,
|
|
1323
1322
|
class: [`${a}-action-rest-button`, u.value]
|
|
1324
|
-
}, [
|
|
1323
|
+
}, [Le("重置")]) : null, e != null && e.extra ? c(xe, {
|
|
1325
1324
|
size: 12,
|
|
1326
1325
|
align: "center"
|
|
1327
1326
|
}, {
|
|
@@ -1337,10 +1336,10 @@ const Ye = (e) => {
|
|
|
1337
1336
|
className: a
|
|
1338
1337
|
}, null)
|
|
1339
1338
|
}, {
|
|
1340
|
-
default: () => [c(
|
|
1339
|
+
default: () => [c(ve, {
|
|
1341
1340
|
title: "列设置"
|
|
1342
1341
|
}, {
|
|
1343
|
-
default: () => [c(
|
|
1342
|
+
default: () => [c(El, null, null)]
|
|
1344
1343
|
})]
|
|
1345
1344
|
}));
|
|
1346
1345
|
}
|
|
@@ -1386,23 +1385,23 @@ const Ye = (e) => {
|
|
|
1386
1385
|
}
|
|
1387
1386
|
}
|
|
1388
1387
|
});
|
|
1389
|
-
function
|
|
1390
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1388
|
+
function Ol(e) {
|
|
1389
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ee(e);
|
|
1391
1390
|
}
|
|
1392
1391
|
const {
|
|
1393
1392
|
useBreakpoint: ga
|
|
1394
|
-
} =
|
|
1393
|
+
} = cl;
|
|
1395
1394
|
function ya(e) {
|
|
1396
|
-
if (
|
|
1395
|
+
if (ee(e))
|
|
1397
1396
|
return e;
|
|
1398
1397
|
if (e) {
|
|
1399
1398
|
const a = e, {
|
|
1400
|
-
icon:
|
|
1399
|
+
icon: t,
|
|
1401
1400
|
tooltip: u,
|
|
1402
1401
|
onClick: o,
|
|
1403
1402
|
key: i
|
|
1404
1403
|
} = a;
|
|
1405
|
-
return
|
|
1404
|
+
return t && u ? c(ve, {
|
|
1406
1405
|
title: u
|
|
1407
1406
|
}, {
|
|
1408
1407
|
default: () => [c("span", {
|
|
@@ -1410,39 +1409,39 @@ function ya(e) {
|
|
|
1410
1409
|
onClick: () => {
|
|
1411
1410
|
o && o(i);
|
|
1412
1411
|
}
|
|
1413
|
-
}, [
|
|
1414
|
-
}) :
|
|
1412
|
+
}, [t])]
|
|
1413
|
+
}) : t;
|
|
1415
1414
|
}
|
|
1416
1415
|
return null;
|
|
1417
1416
|
}
|
|
1418
|
-
const
|
|
1417
|
+
const Wl = /* @__PURE__ */ me({
|
|
1419
1418
|
props: {
|
|
1420
|
-
actions:
|
|
1419
|
+
actions: he.toolBarBtn,
|
|
1421
1420
|
settings: [Array],
|
|
1422
|
-
titleTip:
|
|
1421
|
+
titleTip: he.titleTip,
|
|
1423
1422
|
prefixCls: String,
|
|
1424
|
-
headerTitle:
|
|
1425
|
-
titleTipText:
|
|
1426
|
-
optionsExtra:
|
|
1423
|
+
headerTitle: he.headerTitle,
|
|
1424
|
+
titleTipText: he.titleTipText,
|
|
1425
|
+
optionsExtra: he.optionsExtra
|
|
1427
1426
|
},
|
|
1428
1427
|
setup(e) {
|
|
1429
1428
|
const {
|
|
1430
1429
|
wrapSSR: a,
|
|
1431
|
-
hashId:
|
|
1430
|
+
hashId: t
|
|
1432
1431
|
} = Ze("ListToolBar", [ma], e.prefixCls), u = ga(), {
|
|
1433
1432
|
isMobile: o
|
|
1434
|
-
} =
|
|
1433
|
+
} = ge(), i = w(() => {
|
|
1435
1434
|
var s;
|
|
1436
1435
|
return !!(e.titleTip || e.headerTitle || (s = e.actions) != null && s.length);
|
|
1437
|
-
}),
|
|
1436
|
+
}), d = w(() => {
|
|
1438
1437
|
var s;
|
|
1439
1438
|
return !!((s = e.settings) != null && s.length || e.optionsExtra);
|
|
1440
|
-
}),
|
|
1439
|
+
}), v = w(() => !!(e.titleTip || e.headerTitle)), b = w(() => {
|
|
1441
1440
|
var n;
|
|
1442
1441
|
let s;
|
|
1443
|
-
return Array.isArray(e.actions) ? ((n = e.actions) == null ? void 0 : n.length) < 1 ? null : c(
|
|
1442
|
+
return Array.isArray(e.actions) ? ((n = e.actions) == null ? void 0 : n.length) < 1 ? null : c(xe, {
|
|
1444
1443
|
align: "center"
|
|
1445
|
-
},
|
|
1444
|
+
}, Ol(s = e.actions.map((r, y) => ee(r) ? rl(r, {
|
|
1446
1445
|
key: y,
|
|
1447
1446
|
...r == null ? void 0 : r.props
|
|
1448
1447
|
}) : c("template", {
|
|
@@ -1450,81 +1449,81 @@ const Ht = /* @__PURE__ */ ge({
|
|
|
1450
1449
|
}, [r]))) ? s : {
|
|
1451
1450
|
default: () => [s]
|
|
1452
1451
|
}) : e.actions;
|
|
1453
|
-
}), x =
|
|
1454
|
-
class: `${e.prefixCls}-left ${
|
|
1455
|
-
}, null) :
|
|
1456
|
-
class: `${e.prefixCls}-left ${
|
|
1452
|
+
}), x = Xe(() => !i.value && d.value ? c("div", {
|
|
1453
|
+
class: `${e.prefixCls}-left ${t.value}`
|
|
1454
|
+
}, null) : v.value ? c(xe, {
|
|
1455
|
+
class: `${e.prefixCls}-left ${t.value}`
|
|
1457
1456
|
}, {
|
|
1458
1457
|
default: () => [c("div", {
|
|
1459
|
-
class: `${e.prefixCls}-title ${
|
|
1460
|
-
}, [e.headerTitle, e.titleTip && c(
|
|
1458
|
+
class: `${e.prefixCls}-title ${t.value}`
|
|
1459
|
+
}, [e.headerTitle, e.titleTip && c(ve, {
|
|
1461
1460
|
title: e.titleTipText
|
|
1462
1461
|
}, {
|
|
1463
|
-
default: () => [
|
|
1464
|
-
})]),
|
|
1465
|
-
class: `${e.prefixCls}-actions ${
|
|
1466
|
-
}, [
|
|
1467
|
-
}) : c(
|
|
1468
|
-
class: `${e.prefixCls}-left ${
|
|
1462
|
+
default: () => [ue(e.titleTip) && e.titleTip ? c(kt, null, null) : e.titleTip]
|
|
1463
|
+
})]), b.value && c("div", {
|
|
1464
|
+
class: `${e.prefixCls}-actions ${t.value}`
|
|
1465
|
+
}, [b.value])]
|
|
1466
|
+
}) : c(xe, {
|
|
1467
|
+
class: `${e.prefixCls}-left ${t.value}`
|
|
1469
1468
|
}, {
|
|
1470
|
-
default: () => [
|
|
1469
|
+
default: () => [b.value && c("div", {
|
|
1471
1470
|
class: `${e.prefixCls}-actions`
|
|
1472
|
-
}, [
|
|
1473
|
-
}), [() => i.value, () =>
|
|
1471
|
+
}, [b.value])]
|
|
1472
|
+
}), [() => i.value, () => d.value, () => v.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), f = Xe(() => {
|
|
1474
1473
|
let s;
|
|
1475
|
-
return
|
|
1474
|
+
return d.value ? c(xe, {
|
|
1476
1475
|
size: 16,
|
|
1477
|
-
class: `${e.prefixCls}-right ${
|
|
1476
|
+
class: `${e.prefixCls}-right ${t.value}`,
|
|
1478
1477
|
align: u.value.lg ? "center" : "end",
|
|
1479
1478
|
direction: u.value.lg ? "horizontal" : "vertical"
|
|
1480
1479
|
}, {
|
|
1481
1480
|
default: () => {
|
|
1482
1481
|
var n;
|
|
1483
|
-
return [e.optionsExtra, (n = e.settings) != null && n.length ? c(
|
|
1482
|
+
return [e.optionsExtra, (n = e.settings) != null && n.length ? c(xe, {
|
|
1484
1483
|
size: 12,
|
|
1485
1484
|
align: "center",
|
|
1486
1485
|
class: `${e.prefixCls}-setting-items`
|
|
1487
|
-
},
|
|
1488
|
-
const
|
|
1486
|
+
}, Ol(s = e.settings.map((r, y) => {
|
|
1487
|
+
const p = ya(r);
|
|
1489
1488
|
return c("div", {
|
|
1490
1489
|
key: y,
|
|
1491
1490
|
class: `${e.prefixCls}-setting-item`
|
|
1492
|
-
}, [
|
|
1491
|
+
}, [p]);
|
|
1493
1492
|
})) ? s : {
|
|
1494
1493
|
default: () => [s]
|
|
1495
1494
|
}) : null];
|
|
1496
1495
|
}
|
|
1497
1496
|
}) : null;
|
|
1498
|
-
}, [() => u.value, () =>
|
|
1499
|
-
if (!
|
|
1497
|
+
}, [() => u.value, () => d.value, () => e.prefixCls, () => v.value, () => b.value, () => e.settings]), S = Xe(() => {
|
|
1498
|
+
if (!d.value && !i.value) return null;
|
|
1500
1499
|
const s = {
|
|
1501
|
-
[`${
|
|
1500
|
+
[`${t.value}`]: !0,
|
|
1502
1501
|
[`${e.prefixCls}-container`]: !0,
|
|
1503
1502
|
[`${e.prefixCls}-container-mobile`]: o.value
|
|
1504
1503
|
};
|
|
1505
1504
|
return c("div", {
|
|
1506
1505
|
class: s
|
|
1507
|
-
}, [x.value,
|
|
1508
|
-
}, [() => o.value, () => i.value, () =>
|
|
1506
|
+
}, [x.value, f.value]);
|
|
1507
|
+
}, [() => o.value, () => i.value, () => d.value, () => x.value, () => e.prefixCls, () => f.value]);
|
|
1509
1508
|
return () => a(c("div", {
|
|
1510
|
-
class: `${e.prefixCls} ${
|
|
1509
|
+
class: `${e.prefixCls} ${t.value}`
|
|
1511
1510
|
}, [S.value]));
|
|
1512
1511
|
}
|
|
1513
1512
|
});
|
|
1514
|
-
|
|
1513
|
+
Wl.inheritAttrs = !1;
|
|
1515
1514
|
const ba = () => {
|
|
1516
1515
|
const {
|
|
1517
1516
|
action: e,
|
|
1518
1517
|
tableSize: a
|
|
1519
|
-
} =
|
|
1520
|
-
return c(
|
|
1518
|
+
} = ge();
|
|
1519
|
+
return c(Gt, {
|
|
1521
1520
|
overlay: c(Ge, {
|
|
1522
1521
|
selectedKeys: [a.value],
|
|
1523
1522
|
onClick: ({
|
|
1524
|
-
key:
|
|
1523
|
+
key: t
|
|
1525
1524
|
}) => {
|
|
1526
1525
|
var u;
|
|
1527
|
-
(u = e.setTableSize) == null || u.call(e,
|
|
1526
|
+
(u = e.setTableSize) == null || u.call(e, t);
|
|
1528
1527
|
},
|
|
1529
1528
|
style: {
|
|
1530
1529
|
width: 80
|
|
@@ -1533,38 +1532,38 @@ const ba = () => {
|
|
|
1533
1532
|
default: () => [c(Ge.Item, {
|
|
1534
1533
|
key: "large"
|
|
1535
1534
|
}, {
|
|
1536
|
-
default: () => [
|
|
1535
|
+
default: () => [Le("默认")]
|
|
1537
1536
|
}), c(Ge.Item, {
|
|
1538
1537
|
key: "middle"
|
|
1539
1538
|
}, {
|
|
1540
|
-
default: () => [
|
|
1539
|
+
default: () => [Le("中等")]
|
|
1541
1540
|
}), c(Ge.Item, {
|
|
1542
1541
|
key: "small"
|
|
1543
1542
|
}, {
|
|
1544
|
-
default: () => [
|
|
1543
|
+
default: () => [Le("紧凑")]
|
|
1545
1544
|
})]
|
|
1546
1545
|
}),
|
|
1547
1546
|
trigger: ["click"]
|
|
1548
1547
|
}, {
|
|
1549
|
-
default: () => [c(
|
|
1548
|
+
default: () => [c(ve, {
|
|
1550
1549
|
title: "表格密度"
|
|
1551
1550
|
}, {
|
|
1552
|
-
default: () => [c(
|
|
1551
|
+
default: () => [c(jt, null, null)]
|
|
1553
1552
|
})]
|
|
1554
1553
|
});
|
|
1555
|
-
},
|
|
1554
|
+
}, Hl = /* @__PURE__ */ me({
|
|
1556
1555
|
setup() {
|
|
1557
1556
|
const {
|
|
1558
1557
|
isFullscreen: e
|
|
1559
|
-
} =
|
|
1560
|
-
return () => e.value ? c(
|
|
1558
|
+
} = Kl();
|
|
1559
|
+
return () => e.value ? c(ve, {
|
|
1561
1560
|
title: "退出全屏"
|
|
1562
1561
|
}, {
|
|
1563
|
-
default: () => [c(
|
|
1564
|
-
}) : c(
|
|
1562
|
+
default: () => [c(Dt, null, null)]
|
|
1563
|
+
}) : c(ve, {
|
|
1565
1564
|
title: "全屏"
|
|
1566
1565
|
}, {
|
|
1567
|
-
default: () => [c(
|
|
1566
|
+
default: () => [c(Nt, null, null)]
|
|
1568
1567
|
});
|
|
1569
1568
|
}
|
|
1570
1569
|
});
|
|
@@ -1572,7 +1571,7 @@ function Ca() {
|
|
|
1572
1571
|
return {
|
|
1573
1572
|
reload: {
|
|
1574
1573
|
text: "刷新",
|
|
1575
|
-
icon: c(
|
|
1574
|
+
icon: c(Et, null, null)
|
|
1576
1575
|
},
|
|
1577
1576
|
density: {
|
|
1578
1577
|
text: "表格密度",
|
|
@@ -1580,40 +1579,40 @@ function Ca() {
|
|
|
1580
1579
|
},
|
|
1581
1580
|
setting: {
|
|
1582
1581
|
text: "列设置",
|
|
1583
|
-
icon: c(
|
|
1582
|
+
icon: c(El, null, null)
|
|
1584
1583
|
},
|
|
1585
1584
|
fullScreen: {
|
|
1586
1585
|
text: "全屏",
|
|
1587
|
-
icon: c(
|
|
1586
|
+
icon: c(Hl, null, null)
|
|
1588
1587
|
}
|
|
1589
1588
|
};
|
|
1590
1589
|
}
|
|
1591
1590
|
function xa(e, a) {
|
|
1592
|
-
return Object.keys(e).filter((
|
|
1593
|
-
const u = e[
|
|
1591
|
+
return Object.keys(e).filter((t) => t).map((t) => {
|
|
1592
|
+
const u = e[t];
|
|
1594
1593
|
if (!u)
|
|
1595
1594
|
return null;
|
|
1596
|
-
let o = u === !0 ? a[
|
|
1595
|
+
let o = u === !0 ? a[t] : () => u == null ? void 0 : u();
|
|
1597
1596
|
if (typeof o != "function" && (o = () => {
|
|
1598
|
-
}),
|
|
1599
|
-
return c(va,
|
|
1600
|
-
key:
|
|
1597
|
+
}), t === "setting")
|
|
1598
|
+
return c(va, V(e[t], {
|
|
1599
|
+
key: t
|
|
1601
1600
|
}), null);
|
|
1602
|
-
if (
|
|
1601
|
+
if (t === "fullScreen")
|
|
1603
1602
|
return c("span", {
|
|
1604
|
-
key:
|
|
1603
|
+
key: t,
|
|
1605
1604
|
onClick: o
|
|
1606
|
-
}, [c(
|
|
1607
|
-
const i = Ca()[
|
|
1605
|
+
}, [c(Hl, null, null)]);
|
|
1606
|
+
const i = Ca()[t];
|
|
1608
1607
|
return i ? c("span", {
|
|
1609
|
-
key:
|
|
1608
|
+
key: t,
|
|
1610
1609
|
onClick: o
|
|
1611
|
-
}, [c(
|
|
1610
|
+
}, [c(ve, {
|
|
1612
1611
|
title: i.text
|
|
1613
1612
|
}, {
|
|
1614
1613
|
default: () => [i.icon]
|
|
1615
1614
|
})]) : null;
|
|
1616
|
-
}).filter((
|
|
1615
|
+
}).filter((t) => t);
|
|
1617
1616
|
}
|
|
1618
1617
|
const Sa = {
|
|
1619
1618
|
options: [Boolean, Object, Array],
|
|
@@ -1623,24 +1622,24 @@ const Sa = {
|
|
|
1623
1622
|
titleTipText: [String],
|
|
1624
1623
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
1625
1624
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
1626
|
-
},
|
|
1625
|
+
}, pa = /* @__PURE__ */ me({
|
|
1627
1626
|
props: Sa,
|
|
1628
1627
|
inheritAttrs: !1,
|
|
1629
1628
|
setup(e) {
|
|
1630
|
-
const a =
|
|
1629
|
+
const a = ol({
|
|
1631
1630
|
suffixCls: "table-list-toolbar",
|
|
1632
1631
|
isPor: !0
|
|
1633
1632
|
}), {
|
|
1634
|
-
action:
|
|
1635
|
-
} =
|
|
1636
|
-
var
|
|
1633
|
+
action: t
|
|
1634
|
+
} = ge(), u = Xe(() => {
|
|
1635
|
+
var d;
|
|
1637
1636
|
const o = {
|
|
1638
|
-
reload: () =>
|
|
1637
|
+
reload: () => t == null ? void 0 : t.reload(),
|
|
1639
1638
|
density: !0,
|
|
1640
1639
|
setting: !0,
|
|
1641
|
-
fullScreen: () =>
|
|
1640
|
+
fullScreen: () => t == null ? void 0 : t.toggle()
|
|
1642
1641
|
};
|
|
1643
|
-
if (e.options === !1 || ((
|
|
1642
|
+
if (e.options === !1 || ((d = Object.keys(e.options)) == null ? void 0 : d.length) === 0) return [];
|
|
1644
1643
|
const i = {
|
|
1645
1644
|
...o,
|
|
1646
1645
|
...e.options
|
|
@@ -1648,353 +1647,353 @@ const Sa = {
|
|
|
1648
1647
|
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), xa(i, {
|
|
1649
1648
|
...o
|
|
1650
1649
|
});
|
|
1651
|
-
}, [() =>
|
|
1650
|
+
}, [() => t, () => e.options]);
|
|
1652
1651
|
return () => {
|
|
1653
1652
|
const o = e.toolBarBtn || [];
|
|
1654
|
-
return c(
|
|
1653
|
+
return c(Wl, {
|
|
1655
1654
|
prefixCls: a,
|
|
1656
1655
|
optionsExtra: e.optionsExtra,
|
|
1657
1656
|
headerTitle: e.headerTitle,
|
|
1658
1657
|
actions: o,
|
|
1659
|
-
settings:
|
|
1658
|
+
settings: C(u),
|
|
1660
1659
|
titleTip: e.titleTip,
|
|
1661
1660
|
titleTipText: e.titleTipText
|
|
1662
1661
|
}, null);
|
|
1663
1662
|
};
|
|
1664
1663
|
}
|
|
1665
1664
|
});
|
|
1666
|
-
function
|
|
1667
|
-
return
|
|
1665
|
+
function wa(e) {
|
|
1666
|
+
return pt();
|
|
1668
1667
|
}
|
|
1669
|
-
function Ta(e, a = !0,
|
|
1670
|
-
|
|
1668
|
+
function Ta(e, a = !0, t) {
|
|
1669
|
+
wa() ? xt(e, t) : a ? e() : St(e);
|
|
1671
1670
|
}
|
|
1672
1671
|
function $a(e) {
|
|
1673
|
-
const a =
|
|
1672
|
+
const a = w(() => e.draggabled), t = w(() => e.neverScroll), u = w(() => e.autoScroll);
|
|
1674
1673
|
return {
|
|
1675
1674
|
draggabled: a,
|
|
1676
|
-
neverScroll:
|
|
1675
|
+
neverScroll: t,
|
|
1677
1676
|
autoScroll: u
|
|
1678
1677
|
};
|
|
1679
1678
|
}
|
|
1680
|
-
function Ba({ scroll: e, columns: a, breakpoint:
|
|
1681
|
-
const
|
|
1679
|
+
function Ba({ scroll: e, columns: a, breakpoint: t, draggabled: u, autoScroll: o, neverScroll: i }) {
|
|
1680
|
+
const d = D([]), v = D([]);
|
|
1682
1681
|
q([
|
|
1683
1682
|
() => e.value,
|
|
1684
1683
|
() => a.value,
|
|
1685
|
-
() =>
|
|
1684
|
+
() => t.value,
|
|
1686
1685
|
() => u.value,
|
|
1687
|
-
() =>
|
|
1686
|
+
() => t.value,
|
|
1688
1687
|
() => o.value,
|
|
1689
1688
|
() => i.value
|
|
1690
1689
|
], () => {
|
|
1691
|
-
const r =
|
|
1692
|
-
|
|
1690
|
+
const r = f(Fe(a.value));
|
|
1691
|
+
Qe(r, Fe(d.value)) || (d.value = re(r)), Qe(r, Fe(v.value)) || (v.value = re(r));
|
|
1693
1692
|
}, {
|
|
1694
1693
|
deep: !0,
|
|
1695
1694
|
immediate: !0
|
|
1696
1695
|
});
|
|
1697
|
-
const
|
|
1698
|
-
const r = x(
|
|
1696
|
+
const b = w(() => {
|
|
1697
|
+
const r = x(C(d).filter((P) => P.fixed === "left")), y = x(C(d).filter((P) => P.fixed !== "left" && P.fixed !== "right")), p = x(C(d).filter((P) => P.fixed === "right"));
|
|
1699
1698
|
return [
|
|
1700
1699
|
...r,
|
|
1701
1700
|
...y,
|
|
1702
|
-
...
|
|
1701
|
+
...p
|
|
1703
1702
|
];
|
|
1704
1703
|
});
|
|
1705
1704
|
function x(r) {
|
|
1706
|
-
return r.sort((y,
|
|
1705
|
+
return r.sort((y, p) => rt(y, p, "order", 0));
|
|
1707
1706
|
}
|
|
1708
|
-
function
|
|
1709
|
-
return
|
|
1710
|
-
var
|
|
1711
|
-
if (y.dataIndex === "action" ||
|
|
1707
|
+
function f(r) {
|
|
1708
|
+
return re(r).map((y, p) => {
|
|
1709
|
+
var P;
|
|
1710
|
+
if (y.dataIndex === "action" || p === r.length - 1 ? y.resizable = !1 : y.resizable = ue(y.resizable) ? y.resizable : !!(Ue(y.width) && C(u)), !y.width || C(i))
|
|
1712
1711
|
return y;
|
|
1713
|
-
if (y.dataIndex === "action" &&
|
|
1714
|
-
if ((
|
|
1712
|
+
if (y.dataIndex === "action" && C(o))
|
|
1713
|
+
if ((P = C(e)) != null && P.x || !C(t))
|
|
1715
1714
|
y.width = y.width || 100, y.fixed = "right";
|
|
1716
1715
|
else {
|
|
1717
|
-
const
|
|
1718
|
-
y.width = (
|
|
1716
|
+
const O = C(a).find((M) => M.dataIndex === y.dataIndex);
|
|
1717
|
+
y.width = (O == null ? void 0 : O.width) || "", y.fixed = O == null ? void 0 : O.fixed;
|
|
1719
1718
|
}
|
|
1720
1719
|
return y;
|
|
1721
1720
|
});
|
|
1722
1721
|
}
|
|
1723
1722
|
function S(r, y) {
|
|
1724
|
-
|
|
1723
|
+
d.value = d.value.map((p) => (p.uuid === y.uuid && (p.width = r), p));
|
|
1725
1724
|
}
|
|
1726
1725
|
function s(r) {
|
|
1727
1726
|
if (r.length <= 0) {
|
|
1728
|
-
|
|
1727
|
+
d.value = [];
|
|
1729
1728
|
return;
|
|
1730
1729
|
}
|
|
1731
|
-
|
|
1730
|
+
Qe(f(r), Fe(d.value)) || (d.value = f(r));
|
|
1732
1731
|
}
|
|
1733
1732
|
function n(r) {
|
|
1734
|
-
s(
|
|
1735
|
-
var
|
|
1736
|
-
const
|
|
1737
|
-
show: (
|
|
1738
|
-
fixed: (
|
|
1739
|
-
order: (
|
|
1733
|
+
s(re(Fe(a.value)).map((y) => {
|
|
1734
|
+
var P, O, M;
|
|
1735
|
+
const p = y.key ? {
|
|
1736
|
+
show: (P = r[y.key]) == null ? void 0 : P.show,
|
|
1737
|
+
fixed: (O = r[y.key]) == null ? void 0 : O.fixed,
|
|
1738
|
+
order: (M = r[y.key]) == null ? void 0 : M.order
|
|
1740
1739
|
} : {};
|
|
1741
|
-
return { ...y, ...
|
|
1740
|
+
return { ...y, ...p };
|
|
1742
1741
|
}));
|
|
1743
1742
|
}
|
|
1744
1743
|
return {
|
|
1745
|
-
breakpoint:
|
|
1746
|
-
proColumns:
|
|
1747
|
-
cacheProColumns:
|
|
1744
|
+
breakpoint: t,
|
|
1745
|
+
proColumns: b,
|
|
1746
|
+
cacheProColumns: v,
|
|
1748
1747
|
setColumns: s,
|
|
1749
1748
|
changeColumns: n,
|
|
1750
1749
|
resizeColumnWidth: S
|
|
1751
1750
|
};
|
|
1752
1751
|
}
|
|
1753
|
-
function
|
|
1754
|
-
const u =
|
|
1752
|
+
function Ra({ columns: e, columnsState: a, changeColumns: t }) {
|
|
1753
|
+
const u = D(void 0), o = pe({}), i = pe({}), d = pe({}), v = D([]);
|
|
1755
1754
|
q(() => e.value, () => {
|
|
1756
1755
|
var S;
|
|
1757
|
-
(S =
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1756
|
+
(S = C(e)) == null || S.forEach(({ show: s, key: n, fixed: r }, y) => {
|
|
1757
|
+
const p = kl(n, y);
|
|
1758
|
+
p && (d[p] = { show: s === void 0 ? !0 : s, fixed: r });
|
|
1760
1759
|
});
|
|
1761
|
-
const
|
|
1762
|
-
x(
|
|
1763
|
-
}, { deep: !0, immediate: !0 }),
|
|
1760
|
+
const f = C(e).map((s) => s.key);
|
|
1761
|
+
x(f);
|
|
1762
|
+
}, { deep: !0, immediate: !0 }), He(() => {
|
|
1764
1763
|
var S;
|
|
1765
|
-
const
|
|
1766
|
-
...(S =
|
|
1767
|
-
...
|
|
1764
|
+
const f = {
|
|
1765
|
+
...(S = C(a)) == null ? void 0 : S.value,
|
|
1766
|
+
...C(d)
|
|
1768
1767
|
};
|
|
1769
|
-
Object.assign(o,
|
|
1768
|
+
Object.assign(o, f), Object.assign(i, f);
|
|
1770
1769
|
});
|
|
1771
|
-
function
|
|
1772
|
-
u.value = S, Object.assign(o,
|
|
1770
|
+
function b(f, S) {
|
|
1771
|
+
u.value = S, Object.assign(o, f), t == null || t(o, S === "fixed");
|
|
1773
1772
|
}
|
|
1774
|
-
function x(
|
|
1775
|
-
|
|
1773
|
+
function x(f) {
|
|
1774
|
+
v.value = f;
|
|
1776
1775
|
}
|
|
1777
1776
|
return {
|
|
1778
1777
|
columnsMap: o,
|
|
1779
1778
|
operationType: u,
|
|
1780
|
-
setColumnsMap:
|
|
1781
|
-
sortKeyColumns:
|
|
1779
|
+
setColumnsMap: b,
|
|
1780
|
+
sortKeyColumns: v,
|
|
1782
1781
|
cacheColumnsMap: i,
|
|
1783
1782
|
setSortKeyColumns: x
|
|
1784
1783
|
};
|
|
1785
1784
|
}
|
|
1786
|
-
function
|
|
1787
|
-
const
|
|
1785
|
+
function Fa(e, a) {
|
|
1786
|
+
const t = w(() => a), u = D(), o = D(e);
|
|
1788
1787
|
function i() {
|
|
1789
1788
|
u.value && clearTimeout(u.value);
|
|
1790
1789
|
}
|
|
1791
|
-
async function
|
|
1792
|
-
return
|
|
1790
|
+
async function d(...v) {
|
|
1791
|
+
return t.value === 0 || t.value === void 0 ? o.value(...v) : (i(), new Promise(async (b) => {
|
|
1793
1792
|
var x;
|
|
1794
|
-
(x =
|
|
1795
|
-
|
|
1796
|
-
},
|
|
1793
|
+
(x = v[0]) != null && x.immediate ? b(await o.value(...v)) : u.value = setTimeout(async () => {
|
|
1794
|
+
b(await o.value(...v));
|
|
1795
|
+
}, t.value);
|
|
1797
1796
|
}));
|
|
1798
1797
|
}
|
|
1799
|
-
return
|
|
1798
|
+
return Zt(i), {
|
|
1800
1799
|
cancel: i,
|
|
1801
|
-
run:
|
|
1800
|
+
run: d
|
|
1802
1801
|
};
|
|
1803
1802
|
}
|
|
1804
1803
|
function Ia(e) {
|
|
1805
|
-
const a =
|
|
1804
|
+
const a = w(() => e.rowKey), t = w(() => e.polling), u = w(() => e.debounceTime), o = w(() => e.dataSource);
|
|
1806
1805
|
return {
|
|
1807
1806
|
rowKey: a,
|
|
1808
|
-
polling:
|
|
1807
|
+
polling: t,
|
|
1809
1808
|
request: e.request,
|
|
1810
1809
|
postData: e.postData,
|
|
1811
1810
|
debounceTime: u,
|
|
1812
1811
|
dataSource: o
|
|
1813
1812
|
};
|
|
1814
1813
|
}
|
|
1815
|
-
function Oa({ rowKey: e, polling: a, request:
|
|
1816
|
-
const
|
|
1817
|
-
var
|
|
1818
|
-
return
|
|
1819
|
-
}),
|
|
1820
|
-
var
|
|
1821
|
-
const { pagination:
|
|
1822
|
-
if (!
|
|
1814
|
+
function Oa({ rowKey: e, polling: a, request: t, postData: u, dataSource: o, waitRequest: i, debounceTime: d }, { search: v, columns: b, loading: x, setLoading: f, setColumns: S, removeRowKeys: s, syncSelectedRows: n, formParamsRef: r, setPagination: y, paginationInfo: p, onBeforeSearchSubmit: P, hasCustomRender: O }, M) {
|
|
1815
|
+
const G = D(), W = D(!0), K = D(!1), le = D(!1), z = D([]), Y = D(), te = w(() => {
|
|
1816
|
+
var T;
|
|
1817
|
+
return J(v.value) ? ((T = v.value) == null ? void 0 : T.requestType) === "button" : !!v.value;
|
|
1818
|
+
}), we = async (T = {}) => {
|
|
1819
|
+
var _;
|
|
1820
|
+
const { pagination: R, filters: j = {}, sorter: m = {}, removeKeys: Q = [], isPolling: ce = !1 } = T;
|
|
1821
|
+
if (!t || !ze(t) || C(i) && x.value || K.value)
|
|
1823
1822
|
return o.value || [];
|
|
1824
|
-
if (
|
|
1825
|
-
|
|
1823
|
+
if (K.value = !0, !ce || C(i) || W.value ? f(!0) : l(!0), C(i)) {
|
|
1824
|
+
W.value = !1, K.value = !1;
|
|
1826
1825
|
return;
|
|
1827
1826
|
}
|
|
1828
|
-
|
|
1827
|
+
R && y(R);
|
|
1829
1828
|
try {
|
|
1830
|
-
let
|
|
1831
|
-
if (
|
|
1832
|
-
|
|
1829
|
+
let ae = {};
|
|
1830
|
+
if (ue(R) && !R || ue(p))
|
|
1831
|
+
ae = {};
|
|
1833
1832
|
else {
|
|
1834
|
-
const { current:
|
|
1835
|
-
|
|
1833
|
+
const { current: L = 1, pageSize: Re = 10, total: U } = C(p) || {};
|
|
1834
|
+
ae.pageNum = ft({ current: L, pageSize: Re, total: U }, Q.length), Q.length && s(Q), ae.pageSize = Re;
|
|
1836
1835
|
}
|
|
1837
|
-
const
|
|
1838
|
-
|
|
1839
|
-
const
|
|
1840
|
-
|
|
1836
|
+
const Be = J(m) ? [m] : m;
|
|
1837
|
+
Be.forEach((L) => {
|
|
1838
|
+
const Re = (L == null ? void 0 : L.columnKey) || (L == null ? void 0 : L.field);
|
|
1839
|
+
L && (L != null && L.order) ? S(C(b).map((U) => (U.dataIndex === Re ? U.sortOrder = L == null ? void 0 : L.order : U.sortOrder = null, U))) : L && S(C(b).map((U) => (U.dataIndex === Re && (U.sortOrder = null), U)));
|
|
1841
1840
|
});
|
|
1842
|
-
let
|
|
1843
|
-
...
|
|
1844
|
-
...
|
|
1841
|
+
let je = {
|
|
1842
|
+
...ae || {},
|
|
1843
|
+
...T.params,
|
|
1845
1844
|
...r
|
|
1846
1845
|
};
|
|
1847
|
-
|
|
1848
|
-
let
|
|
1849
|
-
const
|
|
1850
|
-
if (
|
|
1851
|
-
|
|
1852
|
-
const
|
|
1853
|
-
return
|
|
1854
|
-
total:
|
|
1855
|
-
}),
|
|
1846
|
+
P && ze(P) && (je = await P(je, m, j));
|
|
1847
|
+
let ne = [];
|
|
1848
|
+
const ye = await (t == null ? void 0 : t(je, Be, j));
|
|
1849
|
+
if (K.value = !1, ye && (ye != null && ye.success)) {
|
|
1850
|
+
ne = ye.data || [], u && ze(u) && (ne = await (u == null ? void 0 : u(ne))), n(ne);
|
|
1851
|
+
const L = ye.total || (ne == null ? void 0 : ne.length) || 0;
|
|
1852
|
+
return L !== ((_ = C(p)) == null ? void 0 : _.total) && y({
|
|
1853
|
+
total: L || 0
|
|
1854
|
+
}), F(ne), ne;
|
|
1856
1855
|
} else
|
|
1857
1856
|
return [];
|
|
1858
|
-
} catch (
|
|
1859
|
-
|
|
1857
|
+
} catch (ae) {
|
|
1858
|
+
z.value === void 0 && F([]), M("requestError", ae);
|
|
1860
1859
|
} finally {
|
|
1861
|
-
|
|
1860
|
+
W.value = !1, f(!1);
|
|
1862
1861
|
}
|
|
1863
1862
|
return [];
|
|
1864
|
-
},
|
|
1865
|
-
|
|
1866
|
-
const
|
|
1867
|
-
return
|
|
1868
|
-
|
|
1869
|
-
}, Math.max(
|
|
1870
|
-
},
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
}),
|
|
1874
|
-
|
|
1863
|
+
}, Z = Fa(async (T) => {
|
|
1864
|
+
Y.value && clearTimeout(Y.value);
|
|
1865
|
+
const R = await we(T), j = ct(a.value, R);
|
|
1866
|
+
return j && !G.value && (Y.value = setTimeout(() => {
|
|
1867
|
+
Z.run({ ...T, isPolling: j });
|
|
1868
|
+
}, Math.max(j, 2e3))), R;
|
|
1869
|
+
}, d.value || 10);
|
|
1870
|
+
wt(() => {
|
|
1871
|
+
G.value = !0, clearTimeout(Y.value);
|
|
1872
|
+
}), Tt(() => {
|
|
1873
|
+
G.value = !0, clearTimeout(Y.value);
|
|
1875
1874
|
}), q(() => a.value, () => {
|
|
1876
|
-
a.value ?
|
|
1875
|
+
a.value ? Z.run({ isPolling: !0 }) : clearTimeout(Y.value);
|
|
1877
1876
|
}, { immediate: !0 }), q([() => i.value, () => o.value], () => {
|
|
1878
|
-
|
|
1877
|
+
Te();
|
|
1879
1878
|
}, { deep: !0, immediate: !0 }), q([() => r], () => {
|
|
1880
|
-
|
|
1879
|
+
te.value || Te();
|
|
1881
1880
|
}, {
|
|
1882
1881
|
deep: !0,
|
|
1883
1882
|
immediate: !0
|
|
1884
1883
|
});
|
|
1885
|
-
function
|
|
1886
|
-
|
|
1884
|
+
function Te() {
|
|
1885
|
+
ke(t) ? (!W.value || !a.value) && Z.run({ isPolling: !1 }) : F(o.value || []);
|
|
1887
1886
|
}
|
|
1888
|
-
const
|
|
1889
|
-
if (
|
|
1890
|
-
return
|
|
1891
|
-
const
|
|
1892
|
-
return !
|
|
1893
|
-
}),
|
|
1894
|
-
function
|
|
1895
|
-
|
|
1887
|
+
const $e = w(() => {
|
|
1888
|
+
if (O.value)
|
|
1889
|
+
return C(z);
|
|
1890
|
+
const T = b.value.filter((R) => R.show || R.show === void 0);
|
|
1891
|
+
return !C(z) || !T || T.length === 0 ? [] : C(z);
|
|
1892
|
+
}), Ie = w(() => C(z).some((T) => oe(T.children) && T.children.length > 0));
|
|
1893
|
+
function l(T) {
|
|
1894
|
+
le.value = T;
|
|
1896
1895
|
}
|
|
1897
|
-
function
|
|
1898
|
-
|
|
1896
|
+
function g(T, R, j, m) {
|
|
1897
|
+
Z.run({ pagination: T, filters: R, sorter: j, extra: m, isPolling: !1 }), M("change", T, R, j, m);
|
|
1899
1898
|
}
|
|
1900
|
-
function
|
|
1901
|
-
var
|
|
1902
|
-
const
|
|
1903
|
-
if (!
|
|
1904
|
-
const
|
|
1905
|
-
|
|
1906
|
-
total:
|
|
1899
|
+
function F(T) {
|
|
1900
|
+
var j;
|
|
1901
|
+
const R = dt(re(T), C(p.value));
|
|
1902
|
+
if (!Qe(R, z.value) && (z.value = R, !t || !ze(t))) {
|
|
1903
|
+
const m = R.length || 0;
|
|
1904
|
+
m !== ((j = C(p)) == null ? void 0 : j.total) && y({
|
|
1905
|
+
total: m
|
|
1907
1906
|
});
|
|
1908
1907
|
}
|
|
1909
1908
|
}
|
|
1910
1909
|
return {
|
|
1911
|
-
dataSource:
|
|
1912
|
-
isTreeDataRef:
|
|
1913
|
-
reSetDataList:
|
|
1914
|
-
changeDataValue: ({ key:
|
|
1915
|
-
const
|
|
1916
|
-
switch (
|
|
1910
|
+
dataSource: $e,
|
|
1911
|
+
isTreeDataRef: Ie,
|
|
1912
|
+
reSetDataList: F,
|
|
1913
|
+
changeDataValue: ({ key: T, params: R, value: j, type: m = "update" }) => {
|
|
1914
|
+
const Q = T ?? e.value, ce = (R == null ? void 0 : R[Q]) ?? j;
|
|
1915
|
+
switch (m) {
|
|
1917
1916
|
case "update":
|
|
1918
|
-
|
|
1917
|
+
Q && ce && R && (z.value = z.value.map((_) => ce === _[Q] ? ht(_, R, {
|
|
1919
1918
|
omitNil: !1,
|
|
1920
1919
|
omitEmpty: !1
|
|
1921
|
-
}) :
|
|
1920
|
+
}) : _)), _e(!!R, "params is required");
|
|
1922
1921
|
break;
|
|
1923
1922
|
case "push":
|
|
1924
|
-
|
|
1923
|
+
R && z.value.push(R), _e(!!R, "params is required");
|
|
1925
1924
|
break;
|
|
1926
1925
|
case "unshift":
|
|
1927
|
-
|
|
1926
|
+
R && z.value.unshift(R), _e(!!R, "params is required");
|
|
1928
1927
|
break;
|
|
1929
1928
|
case "delete":
|
|
1930
|
-
|
|
1929
|
+
Q && (z.value = z.value.filter((_) => j !== _[Q]));
|
|
1931
1930
|
break;
|
|
1932
1931
|
}
|
|
1933
1932
|
},
|
|
1934
|
-
handleTableChange:
|
|
1935
|
-
reload: async (
|
|
1936
|
-
|
|
1933
|
+
handleTableChange: g,
|
|
1934
|
+
reload: async (T) => {
|
|
1935
|
+
ke(t) ? await Z.run({ ...T, isPolling: !1 }) : M("reload");
|
|
1937
1936
|
}
|
|
1938
1937
|
};
|
|
1939
1938
|
}
|
|
1940
1939
|
function Pa({ emit: e, loading: a }) {
|
|
1941
1940
|
var i;
|
|
1942
|
-
const
|
|
1943
|
-
q(() => a.value, (
|
|
1944
|
-
|
|
1941
|
+
const t = D(ue(a.value) ? a.value : J(a.value) ? (i = a.value) == null ? void 0 : i.spinning : !1);
|
|
1942
|
+
q(() => a.value, (d) => {
|
|
1943
|
+
t.value = ue(d) ? d : J(d) ? d == null ? void 0 : d.spinning : t.value;
|
|
1945
1944
|
});
|
|
1946
|
-
const u =
|
|
1947
|
-
function o(
|
|
1948
|
-
|
|
1945
|
+
const u = w(() => t.value);
|
|
1946
|
+
function o(d) {
|
|
1947
|
+
t.value = d, e("loadingChange", !0);
|
|
1949
1948
|
}
|
|
1950
|
-
return { loadingComputed: u, loading:
|
|
1949
|
+
return { loadingComputed: u, loading: t, setLoading: o };
|
|
1951
1950
|
}
|
|
1952
1951
|
function ka({
|
|
1953
1952
|
slots: e,
|
|
1954
1953
|
props: a,
|
|
1955
|
-
pagination:
|
|
1954
|
+
pagination: t
|
|
1956
1955
|
}) {
|
|
1957
|
-
const u =
|
|
1958
|
-
q(() =>
|
|
1956
|
+
const u = pe({}), o = D();
|
|
1957
|
+
q(() => t.value, () => {
|
|
1959
1958
|
var x;
|
|
1960
|
-
if (
|
|
1959
|
+
if (ue(t.value) && !t.value) {
|
|
1961
1960
|
o.value = !1;
|
|
1962
1961
|
return;
|
|
1963
1962
|
}
|
|
1964
|
-
const
|
|
1963
|
+
const d = jl(e, C(a), "pageItemRender"), v = ze(d) ? {
|
|
1965
1964
|
itemRender: ({
|
|
1966
|
-
page:
|
|
1965
|
+
page: f,
|
|
1967
1966
|
type: S,
|
|
1968
1967
|
originalElement: s
|
|
1969
|
-
}) =>
|
|
1970
|
-
page:
|
|
1968
|
+
}) => d ? d({
|
|
1969
|
+
page: f,
|
|
1971
1970
|
type: S,
|
|
1972
1971
|
originalElement: s
|
|
1973
1972
|
}) : null
|
|
1974
|
-
} : null,
|
|
1973
|
+
} : null, b = {
|
|
1975
1974
|
current: 1,
|
|
1976
1975
|
pageSize: 10,
|
|
1977
1976
|
size: "default",
|
|
1978
1977
|
showQuickJumper: !0,
|
|
1979
1978
|
showSizeChanger: !0,
|
|
1980
1979
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
1981
|
-
...
|
|
1982
|
-
...
|
|
1980
|
+
...t.value || {},
|
|
1981
|
+
...v || {}
|
|
1983
1982
|
};
|
|
1984
|
-
(x =
|
|
1985
|
-
pageNum:
|
|
1986
|
-
pageSize:
|
|
1983
|
+
(x = t.value) != null && x.showTotal || (b.showTotal = (f) => `共${f < b.pageSize ? 1 : Math.ceil(f / (b.pageSize || 10))}页 ${f}条记录`), o.value = b, Object.assign(u, {
|
|
1984
|
+
pageNum: b.current,
|
|
1985
|
+
pageSize: b.pageSize
|
|
1987
1986
|
});
|
|
1988
1987
|
}, {
|
|
1989
1988
|
deep: 1,
|
|
1990
1989
|
immediate: !0
|
|
1991
1990
|
});
|
|
1992
|
-
function i(
|
|
1993
|
-
if (
|
|
1994
|
-
const
|
|
1995
|
-
Object.keys(
|
|
1996
|
-
Object.prototype.hasOwnProperty.call(
|
|
1997
|
-
}), Object.keys(
|
|
1991
|
+
function i(d) {
|
|
1992
|
+
if (J(o.value) && J(d)) {
|
|
1993
|
+
const v = {};
|
|
1994
|
+
Object.keys(d).forEach((b) => {
|
|
1995
|
+
Object.prototype.hasOwnProperty.call(d, b) && o.value[b] === d[b] || (v[b] = d[b]);
|
|
1996
|
+
}), Object.keys(v).length > 0 && (Object.assign(o.value, v), ja(v) && Object.assign(u, v));
|
|
1998
1997
|
}
|
|
1999
1998
|
}
|
|
2000
1999
|
return {
|
|
@@ -2010,137 +2009,137 @@ function ja(e) {
|
|
|
2010
2009
|
return a.length === 2 && a.includes("pageNum") && a.includes("pageSize");
|
|
2011
2010
|
}
|
|
2012
2011
|
function Da(e, a) {
|
|
2013
|
-
const
|
|
2012
|
+
const t = D([]), u = D([]);
|
|
2014
2013
|
q(() => {
|
|
2015
|
-
var
|
|
2016
|
-
return (
|
|
2017
|
-
}, (
|
|
2018
|
-
|
|
2014
|
+
var f;
|
|
2015
|
+
return (f = a.value) == null ? void 0 : f.selectedRowKeys;
|
|
2016
|
+
}, (f) => {
|
|
2017
|
+
t.value = vt([...f || []]);
|
|
2019
2018
|
}, {
|
|
2020
2019
|
deep: !0,
|
|
2021
2020
|
immediate: !0
|
|
2022
2021
|
});
|
|
2023
|
-
const o = (
|
|
2022
|
+
const o = (f, S) => {
|
|
2024
2023
|
var n;
|
|
2025
2024
|
const s = (n = a.value) == null ? void 0 : n.type;
|
|
2026
|
-
e.value && (S ?
|
|
2025
|
+
e.value && (S ? f != null && f[e.value] && s === "checkbox" ? (t.value.push(f[e.value]), u.value.push(f)) : (t.value = [f[e.value]], u.value = [f]) : (t.value = t.value.filter((r) => r !== f[e.value]), u.value = u.value.filter((r) => r[e.value] !== f[e.value])));
|
|
2027
2026
|
}, i = () => {
|
|
2028
|
-
var
|
|
2029
|
-
a.value && ((S = (
|
|
2027
|
+
var f, S;
|
|
2028
|
+
a.value && ((S = (f = a.value) == null ? void 0 : f.onChange) == null || S.call(f, t.value, u.value));
|
|
2030
2029
|
};
|
|
2031
2030
|
return {
|
|
2032
|
-
selectedKeys:
|
|
2031
|
+
selectedKeys: t,
|
|
2033
2032
|
selectedItems: u,
|
|
2034
2033
|
selectRowKey: o,
|
|
2035
|
-
selectAllRowKey: (
|
|
2036
|
-
e.value && (
|
|
2034
|
+
selectAllRowKey: (f, S, s) => {
|
|
2035
|
+
e.value && (f ? S.map((n) => (t.value.every((r) => r !== (n == null ? void 0 : n[e.value])) && n != null && n[e.value] && (t.value.push(n[e.value]), u.value.push(n)), n)) : s.map((n) => (t.value.includes(n == null ? void 0 : n[e.value]) && (t.value = t.value.filter((r) => r !== n[e.value]), u.value = u.value.filter((r) => r[e.value] !== n[e.value])), n)));
|
|
2037
2036
|
},
|
|
2038
|
-
removeRowKeys: (
|
|
2039
|
-
|
|
2037
|
+
removeRowKeys: (f) => {
|
|
2038
|
+
t.value = t.value.filter((S) => !f.includes(S)), u.value = u.value.filter((S) => !f.includes(S == null ? void 0 : S[e.value || ""])), i();
|
|
2040
2039
|
},
|
|
2041
2040
|
changeRowKey: i,
|
|
2042
|
-
syncSelectedRows: (
|
|
2043
|
-
if (e.value &&
|
|
2044
|
-
const S = u.value.map((n) => n[e.value]), s =
|
|
2045
|
-
|
|
2046
|
-
s.includes(n[e.value]) && u.value.push(
|
|
2041
|
+
syncSelectedRows: (f) => {
|
|
2042
|
+
if (e.value && t.value.length !== u.value.length) {
|
|
2043
|
+
const S = u.value.map((n) => n[e.value]), s = t.value.filter((n) => !S.includes(n));
|
|
2044
|
+
f.forEach((n) => {
|
|
2045
|
+
s.includes(n[e.value]) && u.value.push(re(n));
|
|
2047
2046
|
});
|
|
2048
2047
|
}
|
|
2049
2048
|
},
|
|
2050
2049
|
clearAllRowKeys: () => {
|
|
2051
|
-
|
|
2050
|
+
t.value = [], u.value = [], i();
|
|
2052
2051
|
}
|
|
2053
2052
|
};
|
|
2054
2053
|
}
|
|
2055
2054
|
function Na(e) {
|
|
2056
2055
|
const a = {};
|
|
2057
|
-
return e.forEach((
|
|
2058
|
-
let u =
|
|
2056
|
+
return e.forEach((t) => {
|
|
2057
|
+
let u = t.initialValue;
|
|
2059
2058
|
const o = ["select"], i = ["date", "time", "dateRange"];
|
|
2060
|
-
!u && o.includes(
|
|
2059
|
+
!u && o.includes(t.valueType) ? u = void 0 : !u && i.includes(t.valueType) ? u = null : u || (u = ""), t.name === "dateRange" ? (a[t.rangeStartName || "start"] = u ? u[0] : null, a[t.rangeEndName || "end"] = u ? u[1] : null) : t.name && (a[t.name] = u);
|
|
2061
2060
|
}), a;
|
|
2062
2061
|
}
|
|
2063
|
-
function Ea({ searchMap: e, params: a, columns:
|
|
2064
|
-
const o =
|
|
2062
|
+
function Ea({ searchMap: e, params: a, columns: t, setPagination: u }) {
|
|
2063
|
+
const o = pe({}), i = pe({}), d = D([]), v = (x) => {
|
|
2065
2064
|
var S, s;
|
|
2066
|
-
const
|
|
2067
|
-
if ((x === "all" || x === "searchMap") && ((S = e.value) == null || S.forEach((n) =>
|
|
2068
|
-
|
|
2065
|
+
const f = [];
|
|
2066
|
+
if ((x === "all" || x === "searchMap") && ((S = e.value) == null || S.forEach((n) => f.push(n)), f.forEach((n) => {
|
|
2067
|
+
d.value.some((r) => r.name === n.name) ? d.value = d.value.map((r) => r.name === n.name ? {
|
|
2069
2068
|
...r,
|
|
2070
2069
|
...n
|
|
2071
|
-
} : r) :
|
|
2072
|
-
})), (x === "all" || x === "columns") && ((s =
|
|
2073
|
-
n.searchConfig &&
|
|
2074
|
-
}),
|
|
2075
|
-
|
|
2070
|
+
} : r) : d.value.push(n);
|
|
2071
|
+
})), (x === "all" || x === "columns") && ((s = t.value) != null && s.length) && (t.value && t.value.forEach((n) => {
|
|
2072
|
+
n.searchConfig && f.push(n.searchConfig);
|
|
2073
|
+
}), f.forEach((n) => {
|
|
2074
|
+
d.value.some((r) => r.name === n.name) ? d.value = d.value.map((r) => r.name === n.name ? {
|
|
2076
2075
|
...r,
|
|
2077
2076
|
...n
|
|
2078
|
-
} : r) :
|
|
2077
|
+
} : r) : d.value.push(n);
|
|
2079
2078
|
})), x === "all" || x === "searchMap" || x === "columns") {
|
|
2080
2079
|
u({ current: 1 });
|
|
2081
|
-
const n = Na(
|
|
2080
|
+
const n = Na(f);
|
|
2082
2081
|
Object.assign(i, { ...n });
|
|
2083
2082
|
for (const r in n)
|
|
2084
2083
|
o[r] || (o[r] = n[r]);
|
|
2085
2084
|
}
|
|
2086
2085
|
(x === "all" || x === "params") && (u({ current: 1 }), Object.assign(o, a.value));
|
|
2087
2086
|
};
|
|
2088
|
-
$
|
|
2089
|
-
|
|
2087
|
+
$t(() => {
|
|
2088
|
+
v("all");
|
|
2090
2089
|
}), q(() => a.value, () => {
|
|
2091
|
-
|
|
2090
|
+
v("params");
|
|
2092
2091
|
}, { deep: !0 }), q(() => e.value, () => {
|
|
2093
|
-
|
|
2094
|
-
}, { deep: !0 }), q(() =>
|
|
2095
|
-
|
|
2092
|
+
v("searchMap");
|
|
2093
|
+
}, { deep: !0 }), q(() => t.value, () => {
|
|
2094
|
+
v("columns");
|
|
2096
2095
|
}, { deep: !0 });
|
|
2097
|
-
function
|
|
2096
|
+
function b(x) {
|
|
2098
2097
|
u({ current: 1 }), Object.assign(o, x);
|
|
2099
2098
|
}
|
|
2100
|
-
return { formDataRef:
|
|
2099
|
+
return { formDataRef: d, formParamsRef: o, defaultParamsRef: i, setFormParams: b };
|
|
2101
2100
|
}
|
|
2102
2101
|
function Ma(e) {
|
|
2103
|
-
const a =
|
|
2102
|
+
const a = w(() => e.scroll), t = w(() => e.autoScroll), u = w(() => e.modalScroll), o = w(() => e.neverScroll), i = w(() => e.rowSelection), d = w(() => e.scrollBreakpoint);
|
|
2104
2103
|
return {
|
|
2105
2104
|
scroll: a,
|
|
2106
2105
|
neverScroll: o,
|
|
2107
2106
|
rowSelection: i,
|
|
2108
|
-
autoScroll:
|
|
2107
|
+
autoScroll: t,
|
|
2109
2108
|
modalScroll: u,
|
|
2110
|
-
scrollBreakpoint:
|
|
2109
|
+
scrollBreakpoint: d
|
|
2111
2110
|
};
|
|
2112
2111
|
}
|
|
2113
|
-
function Aa({ scroll: e, columns: a, autoScroll:
|
|
2114
|
-
const x =
|
|
2112
|
+
function Aa({ scroll: e, columns: a, autoScroll: t, modalScroll: u, neverScroll: o, rowSelection: i, screens: d, innerWidth: v, scrollBreakpoint: b }) {
|
|
2113
|
+
const x = w(() => {
|
|
2115
2114
|
var s, n, r;
|
|
2116
|
-
return b
|
|
2117
|
-
}),
|
|
2115
|
+
return C(b) ? Ue(C(b)) ? v.value > C(b) : Dl(C(b)) ? (s = d.value) == null ? void 0 : s[C(b)] : (n = d.value) == null ? void 0 : n.xl : (r = d.value) == null ? void 0 : r.xl;
|
|
2116
|
+
}), f = w(() => {
|
|
2118
2117
|
let s = 0;
|
|
2119
|
-
const n =
|
|
2120
|
-
y.forEach((
|
|
2121
|
-
s += Number.parseInt(String(
|
|
2118
|
+
const n = C(i) ? 60 : 0, r = 150, y = re(C(a));
|
|
2119
|
+
y.forEach((O) => {
|
|
2120
|
+
s += Number.parseInt(String(O.width)) || 0;
|
|
2122
2121
|
});
|
|
2123
|
-
const
|
|
2124
|
-
return
|
|
2122
|
+
const P = y.filter((O) => !Reflect.has(O, "width")).length;
|
|
2123
|
+
return P !== 0 && (s += P * r), n && (s += n), s;
|
|
2125
2124
|
});
|
|
2126
|
-
return { proScroll:
|
|
2125
|
+
return { proScroll: w(() => {
|
|
2127
2126
|
var s, n;
|
|
2128
|
-
return
|
|
2129
|
-
y: ((s =
|
|
2130
|
-
} :
|
|
2127
|
+
return C(o) ? {} : C(e) && Object.keys(C(e)).length ? C(e) : C(u) ? {
|
|
2128
|
+
y: ((s = C(e)) == null ? void 0 : s.y) || ((n = d.value) != null && n.xl ? 400 : 235)
|
|
2129
|
+
} : C(t) ? x.value ? {} : ue(x.value) ? { x: C(f) } : {} : {};
|
|
2131
2130
|
}), breakpoint: x };
|
|
2132
2131
|
}
|
|
2133
2132
|
function Ka({ size: e, emit: a }) {
|
|
2134
|
-
const
|
|
2135
|
-
|
|
2136
|
-
|
|
2133
|
+
const t = D("middle");
|
|
2134
|
+
He(() => {
|
|
2135
|
+
t.value = e.value;
|
|
2137
2136
|
});
|
|
2138
2137
|
function u(o) {
|
|
2139
|
-
|
|
2138
|
+
t.value = o, a("sizeChange", o);
|
|
2140
2139
|
}
|
|
2141
|
-
return { sizeRef:
|
|
2140
|
+
return { sizeRef: t, setTableSize: u };
|
|
2142
2141
|
}
|
|
2143
|
-
const
|
|
2142
|
+
const nl = {
|
|
2144
2143
|
"&::-webkit-scrollbar": {
|
|
2145
2144
|
width: 4,
|
|
2146
2145
|
height: 4
|
|
@@ -2248,7 +2247,7 @@ const nt = {
|
|
|
2248
2247
|
paddingBlock: e.paddingMD,
|
|
2249
2248
|
border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
|
|
2250
2249
|
borderRadius: e.borderRadiusLG,
|
|
2251
|
-
backgroundColor:
|
|
2250
|
+
backgroundColor: Al(e, e.colorBgContainer),
|
|
2252
2251
|
[`${e.antCls}-table-wrapper ${e.antCls}-table-pagination${e.antCls}-pagination`]: {
|
|
2253
2252
|
marginBottom: 0
|
|
2254
2253
|
}
|
|
@@ -2348,25 +2347,25 @@ const nt = {
|
|
|
2348
2347
|
}
|
|
2349
2348
|
},
|
|
2350
2349
|
[`&${e.componentCls}-beautify-scroll`]: {
|
|
2351
|
-
[`${e.antCls}-table-content`]:
|
|
2352
|
-
[`${e.antCls}-table-body`]:
|
|
2350
|
+
[`${e.antCls}-table-content`]: nl,
|
|
2351
|
+
[`${e.antCls}-table-body`]: nl,
|
|
2353
2352
|
[`${e.antCls}-table-empty`]: {
|
|
2354
|
-
[`${e.antCls}-table-content`]:
|
|
2353
|
+
[`${e.antCls}-table-content`]: nl
|
|
2355
2354
|
}
|
|
2356
2355
|
}
|
|
2357
2356
|
}
|
|
2358
2357
|
};
|
|
2359
2358
|
};
|
|
2360
2359
|
function Ya(e) {
|
|
2361
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2360
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ee(e);
|
|
2362
2361
|
}
|
|
2363
|
-
function La(e, a,
|
|
2362
|
+
function La(e, a, t, u) {
|
|
2364
2363
|
if (!a) return e;
|
|
2365
2364
|
let o = e;
|
|
2366
|
-
if (
|
|
2365
|
+
if (J(a)) {
|
|
2367
2366
|
const i = a.node === "a" ? "span" : a.node;
|
|
2368
|
-
return c(i,
|
|
2369
|
-
class: [a.class, a.node === "a" ? `${
|
|
2367
|
+
return c(i, V((a == null ? void 0 : a.attr) || {}, {
|
|
2368
|
+
class: [a.class, a.node === "a" ? `${t}-a` : ""],
|
|
2370
2369
|
onClick: a.click
|
|
2371
2370
|
}), Ya(e) ? e : {
|
|
2372
2371
|
default: () => [e]
|
|
@@ -2375,492 +2374,492 @@ function La(e, a, l, u) {
|
|
|
2375
2374
|
switch (a) {
|
|
2376
2375
|
case "link":
|
|
2377
2376
|
o = c("span", {
|
|
2378
|
-
class: [`${
|
|
2377
|
+
class: [`${t}-a`, u]
|
|
2379
2378
|
}, [e]);
|
|
2380
2379
|
break;
|
|
2381
2380
|
case "time":
|
|
2382
|
-
o =
|
|
2381
|
+
o = X(e).format("HH:mm:ss");
|
|
2383
2382
|
break;
|
|
2384
2383
|
case "dateMonth":
|
|
2385
|
-
o = `${
|
|
2384
|
+
o = `${X(e).month() + 1}月`;
|
|
2386
2385
|
break;
|
|
2387
2386
|
case "date":
|
|
2388
|
-
o =
|
|
2387
|
+
o = X(e).format("YYYY-MM-DD");
|
|
2389
2388
|
break;
|
|
2390
2389
|
case "dateTime":
|
|
2391
|
-
o =
|
|
2390
|
+
o = X(e).format("YYYY-MM-DD HH:mm:ss");
|
|
2392
2391
|
break;
|
|
2393
2392
|
}
|
|
2394
2393
|
return o;
|
|
2395
2394
|
}
|
|
2396
2395
|
function Wa(e, a) {
|
|
2397
|
-
const
|
|
2398
|
-
return e.filter((o, i) => i <
|
|
2396
|
+
const t = a && a.current || 1, u = a && a.pageSize || 10;
|
|
2397
|
+
return e.filter((o, i) => i < t * u && i >= u * (t - 1));
|
|
2399
2398
|
}
|
|
2400
2399
|
function Ha(e) {
|
|
2401
2400
|
const a = document.createElement("textarea");
|
|
2402
2401
|
a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
|
|
2403
2402
|
}
|
|
2404
2403
|
function Va(e) {
|
|
2405
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2404
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ee(e);
|
|
2406
2405
|
}
|
|
2407
2406
|
const {
|
|
2408
|
-
useBreakpoint:
|
|
2409
|
-
} =
|
|
2407
|
+
useBreakpoint: qa
|
|
2408
|
+
} = cl, Ga = {
|
|
2410
2409
|
reload: !0,
|
|
2411
2410
|
density: !0,
|
|
2412
2411
|
setting: !0,
|
|
2413
2412
|
fullScreen: !0
|
|
2414
|
-
}, Qa =
|
|
2413
|
+
}, Qa = Qt.useToken, ul = /* @__PURE__ */ me({
|
|
2415
2414
|
name: "GProTable",
|
|
2416
2415
|
inheritAttrs: !1,
|
|
2417
|
-
props:
|
|
2416
|
+
props: he,
|
|
2418
2417
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
|
|
2419
2418
|
slots: Object,
|
|
2420
2419
|
setup(e, {
|
|
2421
2420
|
emit: a,
|
|
2422
|
-
slots:
|
|
2421
|
+
slots: t,
|
|
2423
2422
|
attrs: u,
|
|
2424
2423
|
expose: o
|
|
2425
2424
|
}) {
|
|
2426
|
-
const i =
|
|
2425
|
+
const i = ol({
|
|
2427
2426
|
suffixCls: "table",
|
|
2428
2427
|
isPor: !0
|
|
2429
2428
|
}), {
|
|
2430
|
-
wrapSSR:
|
|
2431
|
-
hashId:
|
|
2429
|
+
wrapSSR: d,
|
|
2430
|
+
hashId: v
|
|
2432
2431
|
} = Ze("ProBaseTable", [za], i), {
|
|
2433
|
-
token:
|
|
2434
|
-
} = Qa(), x =
|
|
2432
|
+
token: b
|
|
2433
|
+
} = Qa(), x = Kt(), f = qa(), {
|
|
2435
2434
|
width: S
|
|
2436
|
-
} =
|
|
2437
|
-
|
|
2435
|
+
} = zt(), s = D(!1), n = Ml(), r = D(), y = D(), p = D(e.waitRequest);
|
|
2436
|
+
He(() => p.value = e.waitRequest);
|
|
2438
2437
|
const {
|
|
2439
|
-
toggle:
|
|
2440
|
-
isFullscreen:
|
|
2441
|
-
} =
|
|
2438
|
+
toggle: P,
|
|
2439
|
+
isFullscreen: O
|
|
2440
|
+
} = Kl(r), M = w(() => ({
|
|
2442
2441
|
...e
|
|
2443
|
-
})),
|
|
2444
|
-
var
|
|
2445
|
-
return e.virtualScroll &&
|
|
2446
|
-
}),
|
|
2442
|
+
})), G = w(() => !f.value.xl), W = w(() => {
|
|
2443
|
+
var h, $;
|
|
2444
|
+
return e.virtualScroll && _e(!((h = e.scroll) != null && h.y), "参数scroll的Y值不能为空!"), !!(($ = e.scroll) != null && $.y && e.virtualScroll);
|
|
2445
|
+
}), K = w(() => e.search === !1 ? !1 : J(e.search) ? e.search : {
|
|
2447
2446
|
type: "auto",
|
|
2448
2447
|
resetText: "重置",
|
|
2449
2448
|
searchText: "查询"
|
|
2450
|
-
}),
|
|
2451
|
-
var
|
|
2452
|
-
return ((
|
|
2453
|
-
}),
|
|
2454
|
-
var
|
|
2455
|
-
return (
|
|
2456
|
-
}),
|
|
2457
|
-
const
|
|
2458
|
-
const B =
|
|
2459
|
-
return
|
|
2449
|
+
}), le = w(() => K.value === !1 ? {} : K.value), z = w(() => {
|
|
2450
|
+
var h;
|
|
2451
|
+
return ((h = le.value) == null ? void 0 : h.requestType) === "button";
|
|
2452
|
+
}), Y = w(() => {
|
|
2453
|
+
var h;
|
|
2454
|
+
return (h = le.value) == null ? void 0 : h.actions;
|
|
2455
|
+
}), te = w(() => {
|
|
2456
|
+
const h = (e.columns || []).filter(($) => $.key || $.dataIndex).map(($) => {
|
|
2457
|
+
const B = $.key || $.dataIndex;
|
|
2458
|
+
return $.key = B, $.dataIndex = B, $.align = $.align || e.align, $.uuid = $.uuid || il().uuid(15), $;
|
|
2460
2459
|
});
|
|
2461
|
-
return
|
|
2460
|
+
return mt(h, {
|
|
2462
2461
|
align: e.align ?? "left",
|
|
2463
2462
|
showIndex: e.showIndex ?? !1
|
|
2464
2463
|
});
|
|
2465
2464
|
}), {
|
|
2466
|
-
loadingComputed:
|
|
2467
|
-
loading:
|
|
2468
|
-
setLoading:
|
|
2465
|
+
loadingComputed: we,
|
|
2466
|
+
loading: Z,
|
|
2467
|
+
setLoading: Te
|
|
2469
2468
|
} = Pa({
|
|
2470
2469
|
emit: a,
|
|
2471
|
-
loading:
|
|
2470
|
+
loading: fe(e, "loading")
|
|
2472
2471
|
}), {
|
|
2473
|
-
sizeRef:
|
|
2474
|
-
setTableSize:
|
|
2472
|
+
sizeRef: $e,
|
|
2473
|
+
setTableSize: Ie
|
|
2475
2474
|
} = Ka({
|
|
2476
2475
|
emit: a,
|
|
2477
|
-
size:
|
|
2476
|
+
size: fe(e, "size")
|
|
2478
2477
|
}), {
|
|
2479
|
-
paginationInfo:
|
|
2480
|
-
requestPagination:
|
|
2481
|
-
setPagination:
|
|
2478
|
+
paginationInfo: l,
|
|
2479
|
+
requestPagination: g,
|
|
2480
|
+
setPagination: F
|
|
2482
2481
|
} = ka({
|
|
2483
|
-
slots:
|
|
2484
|
-
props:
|
|
2485
|
-
pagination:
|
|
2486
|
-
}),
|
|
2487
|
-
proScroll:
|
|
2488
|
-
breakpoint:
|
|
2482
|
+
slots: t,
|
|
2483
|
+
props: M,
|
|
2484
|
+
pagination: fe(e, "pagination")
|
|
2485
|
+
}), I = Ma(e), {
|
|
2486
|
+
proScroll: T,
|
|
2487
|
+
breakpoint: R
|
|
2489
2488
|
} = Aa({
|
|
2490
|
-
...
|
|
2489
|
+
...I,
|
|
2491
2490
|
innerWidth: S,
|
|
2492
|
-
columns:
|
|
2493
|
-
screens:
|
|
2494
|
-
}),
|
|
2495
|
-
proColumns:
|
|
2496
|
-
cacheProColumns:
|
|
2497
|
-
setColumns:
|
|
2498
|
-
changeColumns:
|
|
2499
|
-
resizeColumnWidth:
|
|
2491
|
+
columns: te,
|
|
2492
|
+
screens: f
|
|
2493
|
+
}), j = $a(e), {
|
|
2494
|
+
proColumns: m,
|
|
2495
|
+
cacheProColumns: Q,
|
|
2496
|
+
setColumns: ce,
|
|
2497
|
+
changeColumns: _,
|
|
2498
|
+
resizeColumnWidth: ae
|
|
2500
2499
|
} = Ba({
|
|
2501
|
-
...
|
|
2502
|
-
breakpoint:
|
|
2503
|
-
scroll:
|
|
2504
|
-
columns:
|
|
2500
|
+
...j,
|
|
2501
|
+
breakpoint: R,
|
|
2502
|
+
scroll: T,
|
|
2503
|
+
columns: te
|
|
2505
2504
|
}), {
|
|
2506
|
-
columnsMap:
|
|
2507
|
-
operationType:
|
|
2508
|
-
setColumnsMap:
|
|
2509
|
-
sortKeyColumns:
|
|
2510
|
-
cacheColumnsMap:
|
|
2511
|
-
setSortKeyColumns:
|
|
2512
|
-
} =
|
|
2513
|
-
columns:
|
|
2514
|
-
columnsState:
|
|
2515
|
-
changeColumns:
|
|
2505
|
+
columnsMap: Be,
|
|
2506
|
+
operationType: je,
|
|
2507
|
+
setColumnsMap: ne,
|
|
2508
|
+
sortKeyColumns: ye,
|
|
2509
|
+
cacheColumnsMap: L,
|
|
2510
|
+
setSortKeyColumns: Re
|
|
2511
|
+
} = Ra({
|
|
2512
|
+
columns: Q,
|
|
2513
|
+
columnsState: fe(e, "columnsState"),
|
|
2514
|
+
changeColumns: _
|
|
2516
2515
|
}), {
|
|
2517
|
-
formDataRef:
|
|
2518
|
-
formParamsRef:
|
|
2519
|
-
defaultParamsRef:
|
|
2520
|
-
setFormParams:
|
|
2516
|
+
formDataRef: U,
|
|
2517
|
+
formParamsRef: dl,
|
|
2518
|
+
defaultParamsRef: Vl,
|
|
2519
|
+
setFormParams: el
|
|
2521
2520
|
} = Ea({
|
|
2522
|
-
searchMap:
|
|
2523
|
-
params:
|
|
2524
|
-
columns:
|
|
2525
|
-
setPagination:
|
|
2521
|
+
searchMap: fe(e, "searchMap"),
|
|
2522
|
+
params: fe(e, "params"),
|
|
2523
|
+
columns: te,
|
|
2524
|
+
setPagination: F
|
|
2526
2525
|
}), {
|
|
2527
|
-
selectedKeys:
|
|
2528
|
-
selectedItems:
|
|
2529
|
-
changeRowKey:
|
|
2530
|
-
selectRowKey:
|
|
2531
|
-
selectAllRowKey:
|
|
2532
|
-
syncSelectedRows:
|
|
2533
|
-
removeRowKeys:
|
|
2534
|
-
clearAllRowKeys:
|
|
2535
|
-
} = Da(
|
|
2536
|
-
reload:
|
|
2537
|
-
reSetDataList:
|
|
2538
|
-
changeDataValue:
|
|
2539
|
-
isTreeDataRef:
|
|
2540
|
-
dataSource:
|
|
2541
|
-
handleTableChange:
|
|
2526
|
+
selectedKeys: fl,
|
|
2527
|
+
selectedItems: ql,
|
|
2528
|
+
changeRowKey: Gl,
|
|
2529
|
+
selectRowKey: hl,
|
|
2530
|
+
selectAllRowKey: vl,
|
|
2531
|
+
syncSelectedRows: ml,
|
|
2532
|
+
removeRowKeys: gl,
|
|
2533
|
+
clearAllRowKeys: Ql
|
|
2534
|
+
} = Da(fe(e, "rowKey"), fe(e, "rowSelection")), _l = Ia(e), {
|
|
2535
|
+
reload: De,
|
|
2536
|
+
reSetDataList: Xl,
|
|
2537
|
+
changeDataValue: Ul,
|
|
2538
|
+
isTreeDataRef: Jl,
|
|
2539
|
+
dataSource: Ne,
|
|
2540
|
+
handleTableChange: yl
|
|
2542
2541
|
} = Oa({
|
|
2543
|
-
...
|
|
2544
|
-
waitRequest:
|
|
2542
|
+
..._l,
|
|
2543
|
+
waitRequest: p
|
|
2545
2544
|
}, {
|
|
2546
|
-
loading:
|
|
2547
|
-
paginationInfo:
|
|
2548
|
-
setPagination:
|
|
2549
|
-
removeRowKeys:
|
|
2550
|
-
syncSelectedRows:
|
|
2551
|
-
setLoading:
|
|
2552
|
-
setColumns:
|
|
2553
|
-
search:
|
|
2554
|
-
columns:
|
|
2555
|
-
formParamsRef:
|
|
2545
|
+
loading: we,
|
|
2546
|
+
paginationInfo: l,
|
|
2547
|
+
setPagination: F,
|
|
2548
|
+
removeRowKeys: gl,
|
|
2549
|
+
syncSelectedRows: ml,
|
|
2550
|
+
setLoading: Te,
|
|
2551
|
+
setColumns: ce,
|
|
2552
|
+
search: K,
|
|
2553
|
+
columns: m,
|
|
2554
|
+
formParamsRef: dl,
|
|
2556
2555
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2557
|
-
hasCustomRender:
|
|
2558
|
-
}, a),
|
|
2559
|
-
...
|
|
2560
|
-
...
|
|
2561
|
-
} : !1),
|
|
2562
|
-
size:
|
|
2563
|
-
scroll:
|
|
2564
|
-
dataSource:
|
|
2565
|
-
pagination:
|
|
2566
|
-
virtualScroll:
|
|
2567
|
-
columns:
|
|
2568
|
-
})),
|
|
2569
|
-
var
|
|
2570
|
-
const
|
|
2571
|
-
return !
|
|
2572
|
-
spinning: e.showLoading ?
|
|
2573
|
-
...
|
|
2556
|
+
hasCustomRender: w(() => ke(e.customRender || (t == null ? void 0 : t.customRender)))
|
|
2557
|
+
}, a), Ee = w(() => e.options ? {
|
|
2558
|
+
...Ga,
|
|
2559
|
+
...J(e.options) ? e.options : {}
|
|
2560
|
+
} : !1), Zl = w(() => ({
|
|
2561
|
+
size: C($e),
|
|
2562
|
+
scroll: C(T),
|
|
2563
|
+
dataSource: C(Ne),
|
|
2564
|
+
pagination: C(l),
|
|
2565
|
+
virtualScroll: W.value,
|
|
2566
|
+
columns: C(m).filter((h) => h.show || h.show === void 0)
|
|
2567
|
+
})), bl = w(() => {
|
|
2568
|
+
var $, B;
|
|
2569
|
+
const h = J(e.loading) ? Je(e.loading, "spinning") : {};
|
|
2570
|
+
return !h.indicator && (($ = n == null ? void 0 : n.indicator) != null && $.value) && (h.indicator = (B = n == null ? void 0 : n.indicator) == null ? void 0 : B.value), {
|
|
2571
|
+
spinning: e.showLoading ? ke(Z.value) : !1,
|
|
2572
|
+
...h
|
|
2574
2573
|
};
|
|
2575
|
-
}),
|
|
2576
|
-
var
|
|
2577
|
-
let
|
|
2578
|
-
const
|
|
2574
|
+
}), Cl = w(() => {
|
|
2575
|
+
var N;
|
|
2576
|
+
let h;
|
|
2577
|
+
const $ = C(M).direction === "rtl" ? "bottomLeft" : "right", B = (N = C(l)) == null ? void 0 : N.position;
|
|
2579
2578
|
if (B !== null && Array.isArray(B)) {
|
|
2580
|
-
const k = B.find((
|
|
2581
|
-
!k && !
|
|
2579
|
+
const k = B.find((A) => A.includes("top")), H = B.find((A) => A.includes("bottom")), ie = B.every((A) => `${A}` == "none");
|
|
2580
|
+
!k && !H && !ie && (h = $), k && (h = k.toLowerCase().replace("top", "")), H && (h = H.toLowerCase().replace("bottom", ""));
|
|
2582
2581
|
} else
|
|
2583
|
-
|
|
2584
|
-
return
|
|
2582
|
+
h = $;
|
|
2583
|
+
return h;
|
|
2585
2584
|
});
|
|
2586
2585
|
Ta(() => {
|
|
2587
|
-
s.value && e.keepAliveReload ?
|
|
2586
|
+
s.value && e.keepAliveReload ? De() : s.value = !0;
|
|
2588
2587
|
});
|
|
2589
|
-
const
|
|
2588
|
+
const xl = async (h, $) => {
|
|
2590
2589
|
var B;
|
|
2591
|
-
|
|
2590
|
+
z.value ? (B = Y.value) != null && B.reload && $ ? (el(h), await De()) : el(h) : (el({
|
|
2592
2591
|
...e.params || {},
|
|
2593
|
-
...
|
|
2594
|
-
}), await
|
|
2595
|
-
},
|
|
2596
|
-
|
|
2597
|
-
},
|
|
2598
|
-
|
|
2599
|
-
},
|
|
2592
|
+
...h
|
|
2593
|
+
}), await De());
|
|
2594
|
+
}, et = async (h, $) => {
|
|
2595
|
+
$ === "reset" ? (a("reset", h), e.request && await xl(h, $)) : e.request ? (a("submit", h), await xl(h, $)) : a("submit", h);
|
|
2596
|
+
}, Sl = (h, $, B, N) => {
|
|
2597
|
+
F($l(h, ["current", "pageSize"])), yl(h, $, B, N);
|
|
2598
|
+
}, lt = (h, $) => {
|
|
2600
2599
|
var B;
|
|
2601
|
-
|
|
2602
|
-
current:
|
|
2603
|
-
pageSize:
|
|
2604
|
-
}),
|
|
2605
|
-
current:
|
|
2606
|
-
pageSize:
|
|
2607
|
-
total:
|
|
2600
|
+
F({
|
|
2601
|
+
current: h,
|
|
2602
|
+
pageSize: $
|
|
2603
|
+
}), yl({
|
|
2604
|
+
current: h,
|
|
2605
|
+
pageSize: $,
|
|
2606
|
+
total: l.value && ((B = l.value) == null ? void 0 : B.total) || 0
|
|
2608
2607
|
}, {}, {});
|
|
2609
|
-
},
|
|
2610
|
-
a("expandedRowsChange",
|
|
2611
|
-
},
|
|
2612
|
-
a("expand",
|
|
2613
|
-
},
|
|
2614
|
-
var k,
|
|
2615
|
-
let
|
|
2616
|
-
if (
|
|
2617
|
-
const
|
|
2608
|
+
}, tt = (h) => {
|
|
2609
|
+
a("expandedRowsChange", h);
|
|
2610
|
+
}, at = (h, $) => {
|
|
2611
|
+
a("expand", h, $);
|
|
2612
|
+
}, nt = (h, $) => ae(h, $), ut = (h, $, B) => {
|
|
2613
|
+
var k, H, ie, A, de, be;
|
|
2614
|
+
let N = h;
|
|
2615
|
+
if ($) {
|
|
2616
|
+
const se = oe(h) ? typeof ((k = h == null ? void 0 : h[0]) == null ? void 0 : k.children) == "string" ? (H = h == null ? void 0 : h[0]) == null ? void 0 : H.children : "" : h.toString(), E = B.tooltip === !1 ? {} : B.tooltip, Me = B.tooltip === !1 ? 1 : Ue(E == null ? void 0 : E.hiddenLine) && (E == null ? void 0 : E.hiddenLine) > 0 ? E == null ? void 0 : E.hiddenLine : 1, Oe = B.tooltip === !1 ? 0 : Ue(E == null ? void 0 : E.width) ? E == null ? void 0 : E.width : 0, Ve = B.tooltip !== !1 && Dl(se) && Oe > 0 ? yt(se, {
|
|
2618
2617
|
cssObject: {
|
|
2619
2618
|
fontSize: "14px",
|
|
2620
2619
|
lineHeight: "22px",
|
|
2621
|
-
fontFamily: ((
|
|
2622
|
-
...(
|
|
2620
|
+
fontFamily: ((A = (ie = x == null ? void 0 : x.token) == null ? void 0 : ie.value) == null ? void 0 : A.fontFamily) || ((de = b == null ? void 0 : b.value) == null ? void 0 : de.fontFamily),
|
|
2621
|
+
...(E == null ? void 0 : E.targetStyle) || {}
|
|
2623
2622
|
}
|
|
2624
|
-
}) : 0,
|
|
2623
|
+
}) : 0, ot = document.querySelector(`.${i} .ant-table-tbody`), qe = c("div", {
|
|
2625
2624
|
class: `${i}-ellipsis-text`
|
|
2626
|
-
}, [
|
|
2627
|
-
title:
|
|
2628
|
-
getPopupContainer: (
|
|
2629
|
-
var
|
|
2630
|
-
return
|
|
2625
|
+
}, [h]), wl = () => B.tooltip === !1 || J(B.tooltip) && Ve < Oe && Oe > 0 ? qe : c(ve, V({
|
|
2626
|
+
title: h,
|
|
2627
|
+
getPopupContainer: (Ae) => {
|
|
2628
|
+
var Tl;
|
|
2629
|
+
return ot ?? ((Tl = Ae == null ? void 0 : Ae.parentNode) == null ? void 0 : Tl.parentNode);
|
|
2631
2630
|
}
|
|
2632
|
-
},
|
|
2631
|
+
}, J(B.tooltip) ? B.tooltip : {}, {
|
|
2633
2632
|
destroyTooltipOnHide: !0
|
|
2634
|
-
}), Va(
|
|
2635
|
-
default: () => [
|
|
2633
|
+
}), Va(qe) ? qe : {
|
|
2634
|
+
default: () => [qe]
|
|
2636
2635
|
});
|
|
2637
|
-
if (
|
|
2638
|
-
class: `${i}-ellipsis ${(
|
|
2636
|
+
if (N = c("div", {
|
|
2637
|
+
class: `${i}-ellipsis ${(E == null ? void 0 : E.class) ?? ""}`,
|
|
2639
2638
|
style: {
|
|
2640
|
-
"-webkit-line-clamp":
|
|
2639
|
+
"-webkit-line-clamp": Me
|
|
2641
2640
|
}
|
|
2642
|
-
}, [
|
|
2643
|
-
const
|
|
2644
|
-
|
|
2641
|
+
}, [wl()]), B.copyable) {
|
|
2642
|
+
const Ae = typeof B.copyText == "function" ? (be = B.copyText) == null ? void 0 : be.call(B, B) : B.copyText || se;
|
|
2643
|
+
N = c("div", {
|
|
2645
2644
|
class: `${i}-copyable`
|
|
2646
2645
|
}, [c("div", {
|
|
2647
|
-
class: `${i}-ellipsis ${(
|
|
2646
|
+
class: `${i}-ellipsis ${(E == null ? void 0 : E.class) ?? ""}`,
|
|
2648
2647
|
style: {
|
|
2649
|
-
"-webkit-line-clamp":
|
|
2648
|
+
"-webkit-line-clamp": Me
|
|
2650
2649
|
}
|
|
2651
|
-
}, [
|
|
2650
|
+
}, [wl()]), c(Mt, {
|
|
2652
2651
|
class: `${i}-copyable-icon`,
|
|
2653
2652
|
onClick: () => {
|
|
2654
|
-
Ha(
|
|
2653
|
+
Ha(Ae), Ut.success("复制成功");
|
|
2655
2654
|
}
|
|
2656
2655
|
}, null)]);
|
|
2657
2656
|
}
|
|
2658
2657
|
}
|
|
2659
|
-
return
|
|
2658
|
+
return N;
|
|
2660
2659
|
};
|
|
2661
|
-
function
|
|
2662
|
-
var B,
|
|
2663
|
-
const
|
|
2664
|
-
if (
|
|
2665
|
-
const
|
|
2660
|
+
function pl() {
|
|
2661
|
+
var B, N, k, H, ie;
|
|
2662
|
+
const h = Pe(t, e, "emptyText");
|
|
2663
|
+
if (h !== !1 && ((B = n == null ? void 0 : n.emptyText) == null ? void 0 : B.value) !== !1) {
|
|
2664
|
+
const A = ((N = e.emptyTextProps) == null ? void 0 : N.extraProps) || {}, de = h || ((k = n == null ? void 0 : n.emptyText) == null ? void 0 : k.value), be = ee(de), se = be ? Nl(de, A) : Pl(de || []);
|
|
2666
2665
|
return c("div", {
|
|
2667
|
-
class:
|
|
2668
|
-
style: (
|
|
2669
|
-
}, [
|
|
2666
|
+
class: Se(`${i}-empty-text`, v.value, (H = e.emptyTextProps) == null ? void 0 : H.class),
|
|
2667
|
+
style: (ie = e.emptyTextProps) == null ? void 0 : ie.style
|
|
2668
|
+
}, [be ? se : oe(se) ? se.map((E) => rl(E, A)) : c(Jt, null, null)]);
|
|
2670
2669
|
}
|
|
2671
2670
|
return null;
|
|
2672
2671
|
}
|
|
2673
|
-
const
|
|
2674
|
-
var
|
|
2675
|
-
const
|
|
2676
|
-
if (
|
|
2677
|
-
if ((
|
|
2678
|
-
const B =
|
|
2679
|
-
return
|
|
2672
|
+
const it = () => {
|
|
2673
|
+
var $;
|
|
2674
|
+
const h = jl(t, e, "customRender");
|
|
2675
|
+
if (h) {
|
|
2676
|
+
if (($ = Ne.value) != null && $.length) {
|
|
2677
|
+
const B = re(C(Ne));
|
|
2678
|
+
return h == null ? void 0 : h({
|
|
2680
2679
|
dataSource: B,
|
|
2681
|
-
currentData: Wa(B,
|
|
2680
|
+
currentData: Wa(B, l.value)
|
|
2682
2681
|
});
|
|
2683
2682
|
}
|
|
2684
|
-
return
|
|
2683
|
+
return pl();
|
|
2685
2684
|
}
|
|
2686
|
-
return c(
|
|
2687
|
-
},
|
|
2688
|
-
var k,
|
|
2689
|
-
const
|
|
2690
|
-
return c(
|
|
2691
|
-
headerTitle:
|
|
2685
|
+
return c(Ye, null, null);
|
|
2686
|
+
}, st = (h) => {
|
|
2687
|
+
var k, H;
|
|
2688
|
+
const $ = Pe(t, e, "headerTitle"), B = Pe(t, e, "titleTip"), N = Pe(t, e, "toolBarBtn");
|
|
2689
|
+
return c(pa, {
|
|
2690
|
+
headerTitle: $,
|
|
2692
2691
|
titleTip: B,
|
|
2693
2692
|
titleTipText: e.titleTipText,
|
|
2694
|
-
options:
|
|
2695
|
-
...
|
|
2696
|
-
setting:
|
|
2697
|
-
density:
|
|
2693
|
+
options: ue(Ee.value) ? Ee.value : {
|
|
2694
|
+
...Ee.value,
|
|
2695
|
+
setting: h ? !1 : (k = Ee.value) == null ? void 0 : k.setting,
|
|
2696
|
+
density: h ? !1 : (H = Ee.value) == null ? void 0 : H.density
|
|
2698
2697
|
},
|
|
2699
|
-
settingExtra:
|
|
2700
|
-
optionsExtra:
|
|
2701
|
-
toolBarBtn:
|
|
2698
|
+
settingExtra: Pe(t, e, "settingExtra"),
|
|
2699
|
+
optionsExtra: Pe(t, e, "optionsExtra"),
|
|
2700
|
+
toolBarBtn: N
|
|
2702
2701
|
}, null);
|
|
2703
2702
|
};
|
|
2704
|
-
return
|
|
2705
|
-
tableSize:
|
|
2706
|
-
columns:
|
|
2707
|
-
cacheColumns:
|
|
2708
|
-
isMobile:
|
|
2709
|
-
searchConfig:
|
|
2710
|
-
manualSearch:
|
|
2711
|
-
searchActions:
|
|
2703
|
+
return la({
|
|
2704
|
+
tableSize: $e,
|
|
2705
|
+
columns: m,
|
|
2706
|
+
cacheColumns: te,
|
|
2707
|
+
isMobile: G,
|
|
2708
|
+
searchConfig: le,
|
|
2709
|
+
manualSearch: z,
|
|
2710
|
+
searchActions: Y,
|
|
2712
2711
|
action: {
|
|
2713
|
-
setTableSize:
|
|
2714
|
-
reload: (
|
|
2715
|
-
toggle:
|
|
2712
|
+
setTableSize: Ie,
|
|
2713
|
+
reload: (h) => De(h),
|
|
2714
|
+
toggle: P
|
|
2716
2715
|
},
|
|
2717
2716
|
settingsAction: {
|
|
2718
|
-
autoScroll:
|
|
2719
|
-
columnsMap:
|
|
2720
|
-
operationType:
|
|
2721
|
-
setColumnsMap:
|
|
2722
|
-
sortKeyColumns:
|
|
2723
|
-
cacheColumnsMap:
|
|
2724
|
-
setSortKeyColumns:
|
|
2717
|
+
autoScroll: fe(e, "autoScroll"),
|
|
2718
|
+
columnsMap: Be,
|
|
2719
|
+
operationType: je,
|
|
2720
|
+
setColumnsMap: ne,
|
|
2721
|
+
sortKeyColumns: ye,
|
|
2722
|
+
cacheColumnsMap: L,
|
|
2723
|
+
setSortKeyColumns: Re
|
|
2725
2724
|
},
|
|
2726
|
-
setPagination:
|
|
2727
|
-
changeColumns:
|
|
2728
|
-
slots:
|
|
2725
|
+
setPagination: F,
|
|
2726
|
+
changeColumns: _,
|
|
2727
|
+
slots: t
|
|
2729
2728
|
}), o({
|
|
2730
2729
|
formRef: () => ({
|
|
2731
|
-
getFormState: () =>
|
|
2730
|
+
getFormState: () => C(dl),
|
|
2732
2731
|
getFormInnerState: () => {
|
|
2733
|
-
var
|
|
2734
|
-
return ((
|
|
2732
|
+
var h;
|
|
2733
|
+
return ((h = y.value) == null ? void 0 : h.getFormState()) || {};
|
|
2735
2734
|
},
|
|
2736
|
-
restFormState: (
|
|
2737
|
-
var
|
|
2738
|
-
|
|
2735
|
+
restFormState: (h) => {
|
|
2736
|
+
var $;
|
|
2737
|
+
p.value = !0, h && (h == null || h()), ($ = y.value) == null || $.resetForm(!1), p.value = !1;
|
|
2739
2738
|
}
|
|
2740
2739
|
}),
|
|
2741
2740
|
actionRef: () => ({
|
|
2742
|
-
loading:
|
|
2743
|
-
dataSource:
|
|
2744
|
-
pageState:
|
|
2745
|
-
pagination:
|
|
2746
|
-
selectedKeys:
|
|
2747
|
-
selectedItems:
|
|
2741
|
+
loading: Z,
|
|
2742
|
+
dataSource: Ne,
|
|
2743
|
+
pageState: g,
|
|
2744
|
+
pagination: l.value,
|
|
2745
|
+
selectedKeys: w(() => fl.value),
|
|
2746
|
+
selectedItems: w(() => ql.value),
|
|
2748
2747
|
rowsSelection: {
|
|
2749
|
-
clear:
|
|
2750
|
-
select:
|
|
2751
|
-
remove:
|
|
2752
|
-
sync:
|
|
2753
|
-
selectAll:
|
|
2748
|
+
clear: Ql,
|
|
2749
|
+
select: hl,
|
|
2750
|
+
remove: gl,
|
|
2751
|
+
sync: ml,
|
|
2752
|
+
selectAll: vl
|
|
2754
2753
|
},
|
|
2755
|
-
reload:
|
|
2756
|
-
getLoadingStatus: () =>
|
|
2757
|
-
reloadAndReset: async (
|
|
2758
|
-
var
|
|
2759
|
-
|
|
2754
|
+
reload: De,
|
|
2755
|
+
getLoadingStatus: () => C(we),
|
|
2756
|
+
reloadAndReset: async (h) => {
|
|
2757
|
+
var $, B, N;
|
|
2758
|
+
p.value = !0, F({
|
|
2760
2759
|
current: 1,
|
|
2761
|
-
pageSize: (
|
|
2762
|
-
}),
|
|
2760
|
+
pageSize: (g == null ? void 0 : g.pageSize) || 10
|
|
2761
|
+
}), h != null && h.callBack && (h != null && h.wait ? await (($ = h == null ? void 0 : h.callBack) == null ? void 0 : $.call(h)) : (B = h == null ? void 0 : h.callBack) == null || B.call(h)), (N = y.value) == null || N.resetForm(!1), p.value = !1;
|
|
2763
2762
|
},
|
|
2764
|
-
reSetDataList:
|
|
2765
|
-
setPageAndReload:
|
|
2766
|
-
setPagination:
|
|
2767
|
-
setDataValue:
|
|
2768
|
-
setLoading:
|
|
2763
|
+
reSetDataList: Xl,
|
|
2764
|
+
setPageAndReload: Sl,
|
|
2765
|
+
setPagination: F,
|
|
2766
|
+
setDataValue: Ul,
|
|
2767
|
+
setLoading: Te
|
|
2769
2768
|
})
|
|
2770
2769
|
}), () => {
|
|
2771
|
-
var
|
|
2772
|
-
const
|
|
2773
|
-
return
|
|
2770
|
+
var $, B;
|
|
2771
|
+
const h = ke(e.customRender || t.customRender);
|
|
2772
|
+
return d(c("div", {
|
|
2774
2773
|
ref: r,
|
|
2775
|
-
class:
|
|
2776
|
-
[`${
|
|
2774
|
+
class: Se([{
|
|
2775
|
+
[`${v.value}`]: !0,
|
|
2777
2776
|
[`${i}`]: !0,
|
|
2778
2777
|
[`${u.class}`]: u.class,
|
|
2779
|
-
[`${i}-beautify-scroll`]:
|
|
2780
|
-
[`${i}-no-scroll`]: !Object.keys(
|
|
2781
|
-
[`${i}-table-tree`]:
|
|
2782
|
-
[`${i}-full-screen`]:
|
|
2778
|
+
[`${i}-beautify-scroll`]: ue(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
|
|
2779
|
+
[`${i}-no-scroll`]: !Object.keys(C(T) || {}).length,
|
|
2780
|
+
[`${i}-table-tree`]: Jl.value,
|
|
2781
|
+
[`${i}-full-screen`]: O.value
|
|
2783
2782
|
}]),
|
|
2784
2783
|
style: u.style
|
|
2785
2784
|
}, [c("div", {
|
|
2786
|
-
class: [`${i}-content`,
|
|
2787
|
-
}, [(
|
|
2785
|
+
class: [`${i}-content`, v.value]
|
|
2786
|
+
}, [(U.value.length > 0 || ke(t.search)) && e.search !== !1 && c(Ll, {
|
|
2788
2787
|
ref: y,
|
|
2789
2788
|
modal: e.modalScroll,
|
|
2790
2789
|
cardBordered: e.cardBordered,
|
|
2791
|
-
searchMap:
|
|
2790
|
+
searchMap: U.value,
|
|
2792
2791
|
prefixCls: i,
|
|
2793
|
-
loading: !!
|
|
2794
|
-
onSearch:
|
|
2795
|
-
defaultParams:
|
|
2792
|
+
loading: !!C(we),
|
|
2793
|
+
onSearch: et,
|
|
2794
|
+
defaultParams: Vl
|
|
2796
2795
|
}, {
|
|
2797
|
-
default:
|
|
2798
|
-
var
|
|
2799
|
-
return (
|
|
2796
|
+
default: t.search ? () => {
|
|
2797
|
+
var N;
|
|
2798
|
+
return (N = t.search) == null ? void 0 : N.call(t);
|
|
2800
2799
|
} : null
|
|
2801
2800
|
}), c("div", {
|
|
2802
|
-
class:
|
|
2803
|
-
}, [
|
|
2801
|
+
class: Se(v.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
|
|
2802
|
+
}, [st(h), h ? c(sl, bl.value, {
|
|
2804
2803
|
default: () => {
|
|
2805
|
-
var
|
|
2804
|
+
var N, k, H;
|
|
2806
2805
|
return [c("div", {
|
|
2807
|
-
class: `${i}-wrapper ${
|
|
2806
|
+
class: `${i}-wrapper ${v.value}`
|
|
2808
2807
|
}, [c("div", {
|
|
2809
|
-
class:
|
|
2808
|
+
class: Se(`${i}-list`, v.value, (N = e.tableProps) == null ? void 0 : N.class),
|
|
2810
2809
|
style: (k = e.tableProps) == null ? void 0 : k.style
|
|
2811
|
-
}, [
|
|
2810
|
+
}, [it()]), e.pagination !== !1 && ((H = Ne.value) == null ? void 0 : H.length) > 0 && c(_t, V({
|
|
2812
2811
|
class: {
|
|
2813
|
-
[`${i}-pagination ${
|
|
2814
|
-
[`${i}-pagination-${
|
|
2812
|
+
[`${i}-pagination ${v.value}`]: !0,
|
|
2813
|
+
[`${i}-pagination-${Cl.value} ${v.value}`]: !!Cl.value
|
|
2815
2814
|
}
|
|
2816
|
-
},
|
|
2817
|
-
onChange:
|
|
2815
|
+
}, Fe(C(l)), {
|
|
2816
|
+
onChange: lt
|
|
2818
2817
|
}), null)])];
|
|
2819
2818
|
}
|
|
2820
|
-
}) : c(
|
|
2821
|
-
style: (
|
|
2819
|
+
}) : c(Xt, V($l(e, Object.keys(Yl)), Zl.value, {
|
|
2820
|
+
style: ($ = e.tableProps) == null ? void 0 : $.style,
|
|
2822
2821
|
class: (B = e.tableProps) == null ? void 0 : B.class,
|
|
2823
|
-
loading:
|
|
2824
|
-
rowKey: (
|
|
2825
|
-
transformCellText: (
|
|
2826
|
-
var
|
|
2827
|
-
e.transformCellText && typeof e.transformCellText && ((
|
|
2822
|
+
loading: bl.value,
|
|
2823
|
+
rowKey: (N) => N[e.rowKey],
|
|
2824
|
+
transformCellText: (N) => {
|
|
2825
|
+
var de, be, se, E, Me;
|
|
2826
|
+
e.transformCellText && typeof e.transformCellText && ((de = e.transformCellText) == null || de.call(e, N));
|
|
2828
2827
|
const {
|
|
2829
2828
|
column: k
|
|
2830
|
-
} =
|
|
2831
|
-
if (!k) return
|
|
2832
|
-
const
|
|
2833
|
-
let
|
|
2834
|
-
if (
|
|
2835
|
-
if (
|
|
2836
|
-
|
|
2837
|
-
const
|
|
2838
|
-
|
|
2839
|
-
} else ((
|
|
2840
|
-
return k != null && k.ellipsis ?
|
|
2829
|
+
} = N;
|
|
2830
|
+
if (!k) return N.text;
|
|
2831
|
+
const H = (k == null ? void 0 : k.key) || (k == null ? void 0 : k.dataIndex);
|
|
2832
|
+
let ie = !0, A = N.text;
|
|
2833
|
+
if (oe(A))
|
|
2834
|
+
if (A.length === 0 || A.length === 1 && !ee(A[0])) {
|
|
2835
|
+
A = A == null ? void 0 : A[0];
|
|
2836
|
+
const Oe = gt(A, (k == null ? void 0 : k.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || "");
|
|
2837
|
+
ie = Oe.success, A = La(Oe.value, (k == null ? void 0 : k.valueType) || ((se = (be = e.columns) == null ? void 0 : be.find((Ve) => (Ve.key || Ve.dataIndex) === H)) == null ? void 0 : se.valueType), i, v.value);
|
|
2838
|
+
} else ((E = A[0]) == null ? void 0 : E.type) === "template" && (A = (Me = A[0]) == null ? void 0 : Me.children);
|
|
2839
|
+
return k != null && k.ellipsis ? ut(A, ie, k) : A;
|
|
2841
2840
|
},
|
|
2842
2841
|
rowSelection: e.rowSelection ? {
|
|
2843
2842
|
...Je(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2844
|
-
selectedRowKeys:
|
|
2845
|
-
onSelect:
|
|
2846
|
-
onSelectAll:
|
|
2847
|
-
onChange:
|
|
2843
|
+
selectedRowKeys: fl.value || [],
|
|
2844
|
+
onSelect: hl,
|
|
2845
|
+
onSelectAll: vl,
|
|
2846
|
+
onChange: Gl
|
|
2848
2847
|
} : void 0,
|
|
2849
|
-
onChange:
|
|
2850
|
-
onExpandedRowsChange:
|
|
2851
|
-
onExpand:
|
|
2852
|
-
onResizeColumn: (
|
|
2848
|
+
onChange: Sl,
|
|
2849
|
+
onExpandedRowsChange: tt,
|
|
2850
|
+
onExpand: at,
|
|
2851
|
+
onResizeColumn: (N, k) => nt(N, k)
|
|
2853
2852
|
}), {
|
|
2854
|
-
...
|
|
2855
|
-
emptyText: () =>
|
|
2853
|
+
...t,
|
|
2854
|
+
emptyText: () => pl()
|
|
2856
2855
|
})])])]));
|
|
2857
2856
|
};
|
|
2858
2857
|
}
|
|
2859
2858
|
});
|
|
2860
|
-
|
|
2859
|
+
ul.install = (e) => (e.component(ul.name, ul), e);
|
|
2861
2860
|
export {
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2861
|
+
ul as GProTable,
|
|
2862
|
+
ul as default,
|
|
2863
|
+
he as proTableProps,
|
|
2865
2864
|
rn as useTable
|
|
2866
2865
|
};
|