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