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