@gx-design-vue/pro-table 0.2.0-beta.79 → 0.2.0-beta.80
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/hooks/useColums.d.ts +1 -0
- package/dist/pro-table.js +905 -891
- package/dist/pro-table.umd.cjs +1 -1
- package/dist/types/ColumnTypings.d.ts +1 -0
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import { isObject as
|
|
2
|
-
import { reactive as
|
|
1
|
+
import { isObject as Z, isBoolean as ue, getSlot as mt, isFunction as $e, arrayRepeat as Lt, runFunction as Vt, convertValueBoolean as Ce, isArray as ye, getSortIndex as Ht, isDeepEqualReact as De, handleCurrentPage as Wt, genColumnKey as vt, compareArray as _t, isNumber as gt, isString as Gt, filterEmpty as yt, classNames as je, getPrefixCls as Ge, getRandomNumber as We, handleShowIndex as qt, hanndleEmptyField as Ut, getSlotVNode as be } from "@gx-design-vue/pro-utils";
|
|
2
|
+
import { reactive as fe, isReactive as Xt, watch as W, computed as T, ref as D, toRaw as ve, createVNode as r, mergeProps as U, isVNode as xe, watchEffect as Pe, unref as S, onUnmounted as Jt, onDeactivated as Qt, onMounted as Zt, defineComponent as se, Fragment as Ne, nextTick as el, h as bt, cloneVNode as qe, createTextVNode as Fe, renderSlot as tl, toRef as le } from "vue";
|
|
3
3
|
import "ant-design-vue/es/_util/props-util";
|
|
4
|
-
import { warning as
|
|
5
|
-
import { omit as Ee, cloneDeep as
|
|
6
|
-
import { tableProps as
|
|
7
|
-
import { UpOutlined as
|
|
8
|
-
import { useFullscreen as xt, useWindowSize as
|
|
9
|
-
import { Form as ct, Grid as Ue, Space as
|
|
4
|
+
import { warning as ll } from "ant-design-vue/es/vc-util/warning";
|
|
5
|
+
import { omit as Ee, cloneDeep as ne, pick as rt } from "lodash-es";
|
|
6
|
+
import { tableProps as al } from "ant-design-vue/es/table/Table";
|
|
7
|
+
import { UpOutlined as nl, DownOutlined as ul, SettingOutlined as Ct, VerticalAlignTopOutlined as il, VerticalAlignMiddleOutlined as sl, VerticalAlignBottomOutlined as ol, FullscreenExitOutlined as rl, FullscreenOutlined as cl, ColumnHeightOutlined as dl, InfoCircleOutlined as fl, ReloadOutlined as hl, CopyOutlined as ml } from "@ant-design/icons-vue";
|
|
8
|
+
import { useFullscreen as xt, useWindowSize as vl } from "@vueuse/core";
|
|
9
|
+
import { Form as ct, Grid as Ue, Space as de, Button as dt, Input as ft, TimePicker as gl, DatePicker as St, TreeSelect as yl, Spin as _e, Select as bl, Popover as Cl, Checkbox as xl, Tooltip as ie, Tree as Sl, Dropdown as wl, Menu as ke, Pagination as Tl, Table as pl, message as $l, Empty as Fl } from "ant-design-vue";
|
|
10
10
|
import { useProAppContext as wt } from "@gx-design-vue/pro-app";
|
|
11
|
-
import { useContext as
|
|
12
|
-
import
|
|
13
|
-
import { tryOnUnmounted as
|
|
14
|
-
function Ia(e,
|
|
11
|
+
import { useContext as Rl, useProStyle as ze } from "@gx-design-vue/pro-provider";
|
|
12
|
+
import q from "dayjs";
|
|
13
|
+
import { tryOnUnmounted as Pl, useMemo as Me } from "@gx-design-vue/pro-hooks";
|
|
14
|
+
function Ia(e, a) {
|
|
15
15
|
var C, p, v;
|
|
16
16
|
function l() {
|
|
17
|
-
return
|
|
17
|
+
return a != null && a.state && Z(a == null ? void 0 : a.state) ? ve(a == null ? void 0 : a.state) : {};
|
|
18
18
|
}
|
|
19
|
-
const u =
|
|
19
|
+
const u = fe({
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
request: async (...s) => {
|
|
22
|
-
var
|
|
23
|
-
return
|
|
22
|
+
var n;
|
|
23
|
+
return a != null && a.request ? await ((n = a == null ? void 0 : a.request) == null ? void 0 : n.call(a, ...s)) : void 0;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
|
|
26
|
+
a != null && a.state && (Xt(a.state) ? W(() => a == null ? void 0 : a.state, () => {
|
|
27
27
|
Object.assign(u, l());
|
|
28
28
|
}, { deep: !0, immediate: !0 }) : Object.assign(u, l()));
|
|
29
29
|
const o = T(() => {
|
|
30
|
-
var s,
|
|
31
|
-
return (
|
|
30
|
+
var s, n;
|
|
31
|
+
return (n = (s = e == null ? void 0 : e.value) == null ? void 0 : s.actionRef) == null ? void 0 : n.call(s);
|
|
32
32
|
}), i = T(() => {
|
|
33
|
-
var s,
|
|
34
|
-
return (
|
|
33
|
+
var s, n;
|
|
34
|
+
return (n = (s = e == null ? void 0 : e.value) == null ? void 0 : s.formRef) == null ? void 0 : n.call(s);
|
|
35
35
|
}), d = T(() => {
|
|
36
|
-
var s,
|
|
36
|
+
var s, n, c;
|
|
37
37
|
return {
|
|
38
38
|
...((s = o.value) == null ? void 0 : s.pageState) || {},
|
|
39
|
-
...((c = (
|
|
39
|
+
...((c = (n = i.value) == null ? void 0 : n.getFormState) == null ? void 0 : c.call(n)) || {}
|
|
40
40
|
};
|
|
41
|
-
}),
|
|
42
|
-
return
|
|
43
|
-
var s,
|
|
44
|
-
return (
|
|
41
|
+
}), h = D(!!((p = (C = o.value) == null ? void 0 : C.loading) != null && p.value));
|
|
42
|
+
return W(() => {
|
|
43
|
+
var s, n;
|
|
44
|
+
return (n = (s = o.value) == null ? void 0 : s.loading) == null ? void 0 : n.value;
|
|
45
45
|
}, (s) => {
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
var
|
|
49
|
-
(c = (
|
|
46
|
+
h.value = !!s;
|
|
47
|
+
}), W(h, (s) => {
|
|
48
|
+
var n, c;
|
|
49
|
+
(c = (n = o.value) == null ? void 0 : n.setLoading) == null || c.call(n, !!s);
|
|
50
50
|
}), {
|
|
51
51
|
formRef: i,
|
|
52
52
|
actionRef: o,
|
|
53
53
|
tableState: u,
|
|
54
54
|
requestParams: d,
|
|
55
|
-
loading:
|
|
55
|
+
loading: h,
|
|
56
56
|
dataSource: T(() => {
|
|
57
|
-
var s,
|
|
58
|
-
return ((
|
|
57
|
+
var s, n;
|
|
58
|
+
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.dataSource) == null ? void 0 : n.value) || [];
|
|
59
59
|
}),
|
|
60
60
|
selectedKey: T(() => {
|
|
61
|
-
var s,
|
|
62
|
-
return ((
|
|
61
|
+
var s, n;
|
|
62
|
+
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedKey) == null ? void 0 : n.value) || [];
|
|
63
63
|
}),
|
|
64
64
|
selectedItem: T(() => {
|
|
65
|
-
var s,
|
|
66
|
-
return ((
|
|
65
|
+
var s, n;
|
|
66
|
+
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedItem) == null ? void 0 : n.value) || [];
|
|
67
67
|
}),
|
|
68
68
|
rowsSelection: (v = o == null ? void 0 : o.value) == null ? void 0 : v.rowsSelection,
|
|
69
69
|
mutate: (s) => {
|
|
70
|
-
var
|
|
71
|
-
return (c = (
|
|
70
|
+
var n, c;
|
|
71
|
+
return (c = (n = o.value) == null ? void 0 : n.reSetDataList) == null ? void 0 : c.call(n, s);
|
|
72
72
|
},
|
|
73
73
|
reloadAndReset: (s) => {
|
|
74
|
-
var
|
|
75
|
-
return (c = (
|
|
74
|
+
var n, c;
|
|
75
|
+
return (c = (n = o.value) == null ? void 0 : n.reloadAndReset) == null ? void 0 : c.call(n, s);
|
|
76
76
|
},
|
|
77
|
-
setPageAndReload: (s,
|
|
78
|
-
var
|
|
79
|
-
return (x = (
|
|
77
|
+
setPageAndReload: (s, n, c, g) => {
|
|
78
|
+
var m, x;
|
|
79
|
+
return (x = (m = o.value) == null ? void 0 : m.setPageAndReload) == null ? void 0 : x.call(m, s, n, c, g);
|
|
80
80
|
},
|
|
81
81
|
setPagination: (s) => {
|
|
82
|
-
var
|
|
83
|
-
return (c = (
|
|
82
|
+
var n, c;
|
|
83
|
+
return (c = (n = o.value) == null ? void 0 : n.setPagination) == null ? void 0 : c.call(n, s);
|
|
84
84
|
},
|
|
85
|
-
setLoading: (s) =>
|
|
85
|
+
setLoading: (s) => h.value = s,
|
|
86
86
|
setData: (s) => {
|
|
87
|
-
var
|
|
88
|
-
return (c = (
|
|
87
|
+
var n, c;
|
|
88
|
+
return (c = (n = o.value) == null ? void 0 : n.setData) == null ? void 0 : c.call(n, s);
|
|
89
89
|
},
|
|
90
90
|
reload: (s) => {
|
|
91
|
-
var
|
|
92
|
-
return (c = (
|
|
91
|
+
var n, c;
|
|
92
|
+
return (c = (n = o.value) == null ? void 0 : n.reload) == null ? void 0 : c.call(n, s);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
const Il = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Tt = {
|
|
97
|
-
...Ee(
|
|
97
|
+
...Ee(al(), Il),
|
|
98
98
|
transformCellText: Function,
|
|
99
99
|
/**
|
|
100
100
|
* @Author gx12358
|
|
@@ -114,7 +114,7 @@ const Il = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
114
114
|
type: Object,
|
|
115
115
|
default: void 0
|
|
116
116
|
}
|
|
117
|
-
},
|
|
117
|
+
}, ge = {
|
|
118
118
|
...Tt,
|
|
119
119
|
rowSelection: {
|
|
120
120
|
type: Object,
|
|
@@ -369,52 +369,52 @@ const Il = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
369
369
|
onBeforeSearchSubmit: Function,
|
|
370
370
|
onColumnsStateChange: Function
|
|
371
371
|
};
|
|
372
|
-
function
|
|
373
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
372
|
+
function Bl(e) {
|
|
373
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
if (!
|
|
375
|
+
function Ol(e, a, l, u) {
|
|
376
|
+
if (!a) return e;
|
|
377
377
|
let o = e;
|
|
378
|
-
if (
|
|
379
|
-
const i =
|
|
380
|
-
return r(i,
|
|
381
|
-
class: [
|
|
382
|
-
onClick:
|
|
383
|
-
}),
|
|
378
|
+
if (Z(a)) {
|
|
379
|
+
const i = a.node === "a" ? "span" : a.node;
|
|
380
|
+
return r(i, U((a == null ? void 0 : a.attr) || {}, {
|
|
381
|
+
class: [a.class, a.node === "a" ? `${l}-a` : ""],
|
|
382
|
+
onClick: a.click
|
|
383
|
+
}), Bl(e) ? e : {
|
|
384
384
|
default: () => [e]
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
switch (
|
|
387
|
+
switch (a) {
|
|
388
388
|
case "link":
|
|
389
389
|
o = r("span", {
|
|
390
390
|
class: [`${l}-a`, u]
|
|
391
391
|
}, [e]);
|
|
392
392
|
break;
|
|
393
393
|
case "time":
|
|
394
|
-
o =
|
|
394
|
+
o = q(e).format("HH:mm:ss");
|
|
395
395
|
break;
|
|
396
396
|
case "dateMonth":
|
|
397
|
-
o = `${
|
|
397
|
+
o = `${q(e).month() + 1}月`;
|
|
398
398
|
break;
|
|
399
399
|
case "dateTime":
|
|
400
|
-
o =
|
|
400
|
+
o = q(e).format("YYYY-MM-DD HH:mm:ss");
|
|
401
401
|
break;
|
|
402
402
|
}
|
|
403
403
|
return o;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
const l =
|
|
405
|
+
function kl(e, a) {
|
|
406
|
+
const l = a && a.current || 1, u = a && a.pageSize || 10;
|
|
407
407
|
return e.filter((o, i) => i < l * u && i >= u * (l - 1));
|
|
408
408
|
}
|
|
409
|
-
function
|
|
410
|
-
const
|
|
411
|
-
|
|
409
|
+
function Dl(e) {
|
|
410
|
+
const a = document.createElement("textarea");
|
|
411
|
+
a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function jl({ emit: e, loading: a }) {
|
|
414
414
|
var i;
|
|
415
|
-
const l =
|
|
416
|
-
|
|
417
|
-
l.value =
|
|
415
|
+
const l = D(ue(a.value) ? a.value : Z(a.value) ? (i = a.value) == null ? void 0 : i.spinning : !1);
|
|
416
|
+
W(() => a.value, (d) => {
|
|
417
|
+
l.value = ue(d) ? d : Z(d) ? d == null ? void 0 : d.spinning : l.value;
|
|
418
418
|
});
|
|
419
419
|
const u = T(() => l.value);
|
|
420
420
|
function o(d) {
|
|
@@ -422,37 +422,37 @@ function Ml({ emit: e, loading: n }) {
|
|
|
422
422
|
}
|
|
423
423
|
return { loadingComputed: u, loading: l, setLoading: o };
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
const l =
|
|
425
|
+
function Ml({ size: e, emit: a }) {
|
|
426
|
+
const l = D("middle");
|
|
427
427
|
Pe(() => {
|
|
428
428
|
l.value = e.value;
|
|
429
429
|
});
|
|
430
430
|
function u(o) {
|
|
431
|
-
l.value = o,
|
|
431
|
+
l.value = o, a("sizeChange", o);
|
|
432
432
|
}
|
|
433
433
|
return { sizeRef: l, setTableSize: u };
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Nl({
|
|
436
436
|
slots: e,
|
|
437
|
-
props:
|
|
437
|
+
props: a,
|
|
438
438
|
pagination: l
|
|
439
439
|
}) {
|
|
440
|
-
const u =
|
|
441
|
-
|
|
440
|
+
const u = fe({}), o = D();
|
|
441
|
+
W(() => l.value, () => {
|
|
442
442
|
var p;
|
|
443
|
-
if (
|
|
443
|
+
if (ue(l.value) && !l.value) {
|
|
444
444
|
o.value = !1;
|
|
445
445
|
return;
|
|
446
446
|
}
|
|
447
|
-
const d = mt(e, S(
|
|
447
|
+
const d = mt(e, S(a), "pageItemRender"), h = $e(d) ? {
|
|
448
448
|
itemRender: ({
|
|
449
449
|
page: v,
|
|
450
450
|
type: s,
|
|
451
|
-
originalElement:
|
|
451
|
+
originalElement: n
|
|
452
452
|
}) => d ? d({
|
|
453
453
|
page: v,
|
|
454
454
|
type: s,
|
|
455
|
-
originalElement:
|
|
455
|
+
originalElement: n
|
|
456
456
|
}) : null
|
|
457
457
|
} : null, C = {
|
|
458
458
|
current: 1,
|
|
@@ -462,7 +462,7 @@ function El({
|
|
|
462
462
|
showSizeChanger: !0,
|
|
463
463
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
464
464
|
...l.value || {},
|
|
465
|
-
...
|
|
465
|
+
...h || {}
|
|
466
466
|
};
|
|
467
467
|
(p = l.value) != null && p.showTotal || (C.showTotal = (v) => `共${v < C.pageSize ? 1 : Math.ceil(v / (C.pageSize || 10))}页 ${v}条记录`), o.value = C, Object.assign(u, {
|
|
468
468
|
pageNum: C.current,
|
|
@@ -473,11 +473,11 @@ function El({
|
|
|
473
473
|
immediate: !0
|
|
474
474
|
});
|
|
475
475
|
function i(d) {
|
|
476
|
-
if (
|
|
477
|
-
const
|
|
476
|
+
if (Z(o.value) && Z(d)) {
|
|
477
|
+
const h = {};
|
|
478
478
|
Object.keys(d).forEach((C) => {
|
|
479
|
-
Object.prototype.hasOwnProperty.call(d, C) && o.value[C] === d[C] || (
|
|
480
|
-
}), Object.keys(
|
|
479
|
+
Object.prototype.hasOwnProperty.call(d, C) && o.value[C] === d[C] || (h[C] = d[C]);
|
|
480
|
+
}), Object.keys(h).length > 0 && (Object.assign(o.value, h), El(h) && Object.assign(u, h));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
return {
|
|
@@ -486,35 +486,35 @@ function El({
|
|
|
486
486
|
setPagination: i
|
|
487
487
|
};
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function El(e) {
|
|
490
490
|
if (typeof e != "object" || e === null)
|
|
491
491
|
return !1;
|
|
492
|
-
const
|
|
493
|
-
return
|
|
492
|
+
const a = Object.keys(e);
|
|
493
|
+
return a.length === 2 && a.includes("pageNum") && a.includes("pageSize");
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
const l =
|
|
497
|
-
|
|
495
|
+
function zl(e, a) {
|
|
496
|
+
const l = D([]), u = D([]);
|
|
497
|
+
W(() => {
|
|
498
498
|
var v;
|
|
499
|
-
return (v =
|
|
499
|
+
return (v = a.value) == null ? void 0 : v.selectedRowKeys;
|
|
500
500
|
}, (v) => {
|
|
501
|
-
l.value =
|
|
501
|
+
l.value = Lt([...v || []]);
|
|
502
502
|
}, {
|
|
503
503
|
deep: !0,
|
|
504
504
|
immediate: !0
|
|
505
505
|
});
|
|
506
506
|
const o = (v, s) => {
|
|
507
|
-
e.value && (s ? v != null && v[e.value] && (l.value.push(v[e.value]), u.value.push(v)) : (l.value = l.value.filter((
|
|
507
|
+
e.value && (s ? v != null && v[e.value] && (l.value.push(v[e.value]), u.value.push(v)) : (l.value = l.value.filter((n) => n !== v[e.value]), u.value = u.value.filter((n) => n[e.value] !== v[e.value])));
|
|
508
508
|
}, i = () => {
|
|
509
509
|
var v, s;
|
|
510
|
-
|
|
510
|
+
a.value && ((s = (v = a.value) == null ? void 0 : v.onChange) == null || s.call(v, l.value, u.value));
|
|
511
511
|
};
|
|
512
512
|
return {
|
|
513
513
|
selectedKey: l,
|
|
514
514
|
selectedItem: u,
|
|
515
515
|
selectRowKey: o,
|
|
516
|
-
selectAllRowKey: (v, s,
|
|
517
|
-
e.value && (v ? s.map((c) => (l.value.every((g) => g !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (l.value.push(c[e.value]), u.value.push(c)), c)) :
|
|
516
|
+
selectAllRowKey: (v, s, n) => {
|
|
517
|
+
e.value && (v ? s.map((c) => (l.value.every((g) => g !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (l.value.push(c[e.value]), u.value.push(c)), c)) : n.map((c) => (l.value.includes(c == null ? void 0 : c[e.value]) && (l.value = l.value.filter((g) => g !== c[e.value]), u.value = u.value.filter((g) => g[e.value] !== c[e.value])), c)));
|
|
518
518
|
},
|
|
519
519
|
removeRowKeys: (v) => {
|
|
520
520
|
l.value = l.value.filter((s) => !v.includes(s)), u.value = u.value.filter((s) => !v.includes(s == null ? void 0 : s[e.value || ""])), i();
|
|
@@ -522,9 +522,9 @@ function Kl(e, n) {
|
|
|
522
522
|
changeRowKey: i,
|
|
523
523
|
syncSelectedRows: (v) => {
|
|
524
524
|
if (e.value && l.value.length !== u.value.length) {
|
|
525
|
-
const s = u.value.map((c) => c[e.value]),
|
|
525
|
+
const s = u.value.map((c) => c[e.value]), n = l.value.filter((c) => !s.includes(c));
|
|
526
526
|
v.forEach((c) => {
|
|
527
|
-
|
|
527
|
+
n.includes(c[e.value]) && u.value.push(ne(c));
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
530
|
},
|
|
@@ -533,122 +533,122 @@ function Kl(e, n) {
|
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
function
|
|
537
|
-
const l = T(() =>
|
|
536
|
+
function Kl(e, a) {
|
|
537
|
+
const l = T(() => a || 0), u = D(), o = D(e);
|
|
538
538
|
function i() {
|
|
539
539
|
u.value && clearTimeout(u.value);
|
|
540
540
|
}
|
|
541
|
-
async function d(...
|
|
542
|
-
return l.value === 0 || l.value === void 0 ? o.value(...
|
|
541
|
+
async function d(...h) {
|
|
542
|
+
return l.value === 0 || l.value === void 0 ? o.value(...h) : (i(), new Promise(async (C) => {
|
|
543
543
|
var p;
|
|
544
|
-
(p =
|
|
545
|
-
C(await o.value(...
|
|
544
|
+
(p = h[0]) != null && p.immediate ? C(await o.value(...h)) : u.value = setTimeout(async () => {
|
|
545
|
+
C(await o.value(...h));
|
|
546
546
|
}, l.value);
|
|
547
547
|
}));
|
|
548
548
|
}
|
|
549
|
-
return
|
|
549
|
+
return Pl(i), {
|
|
550
550
|
cancel: i,
|
|
551
551
|
run: d
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
const
|
|
554
|
+
function Al(e) {
|
|
555
|
+
const a = T(() => e.polling), l = T(() => e.debounceTime), u = T(() => e.dataSource);
|
|
556
556
|
return {
|
|
557
|
-
polling:
|
|
557
|
+
polling: a,
|
|
558
558
|
request: e.request,
|
|
559
559
|
postData: e.postData,
|
|
560
560
|
debounceTime: l,
|
|
561
561
|
dataSource: u
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
function
|
|
565
|
-
const R =
|
|
566
|
-
var
|
|
564
|
+
function Yl({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o, debounceTime: i }, { columns: d, loading: h, setLoading: C, setColumns: p, removeRowKeys: v, syncSelectedRows: s, formParamsRef: n, setPagination: c, paginationInfo: g, onBeforeSearchSubmit: m, hasCustomRender: x }, I) {
|
|
565
|
+
const R = D(), k = D(!0), A = D(!1), Y = D(!1), E = D([]), H = D(), oe = async (y = {}) => {
|
|
566
|
+
var Ie;
|
|
567
567
|
const { pagination: $, filters: N = {}, sorter: z = {}, removeKeys: w = [], isPolling: Ke = !1 } = y;
|
|
568
|
-
if (!
|
|
568
|
+
if (!a || !$e(a) || S(o) && h.value || A.value)
|
|
569
569
|
return u.value || [];
|
|
570
|
-
if (
|
|
571
|
-
|
|
570
|
+
if (A.value = !0, !Ke || S(o) || k.value ? C(!0) : Se(!0), S(o)) {
|
|
571
|
+
k.value = !1, A.value = !1;
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
574
574
|
$ && c($);
|
|
575
575
|
try {
|
|
576
|
-
let
|
|
577
|
-
if (
|
|
578
|
-
|
|
576
|
+
let re = {};
|
|
577
|
+
if (ue($) && !$ || ue(g))
|
|
578
|
+
re = {};
|
|
579
579
|
else {
|
|
580
|
-
const { current: K = 1, pageSize:
|
|
581
|
-
|
|
580
|
+
const { current: K = 1, pageSize: me = 10, total: G } = S(g) || {};
|
|
581
|
+
re.pageNum = Wt({ current: K, pageSize: me, total: G }, w.length), w.length && v(w), re.pageSize = me;
|
|
582
582
|
}
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
const
|
|
586
|
-
K && (K != null && K.order) ? p(S(d).map((
|
|
583
|
+
const Be = Z(z) ? [z] : z;
|
|
584
|
+
Be.forEach((K) => {
|
|
585
|
+
const me = (K == null ? void 0 : K.columnKey) || (K == null ? void 0 : K.field);
|
|
586
|
+
K && (K != null && K.order) ? p(S(d).map((G) => (G.dataIndex === me ? G.sortOrder = K == null ? void 0 : K.order : G.sortOrder = null, G))) : K && p(S(d).map((G) => (G.dataIndex === me && (G.sortOrder = null), G)));
|
|
587
587
|
});
|
|
588
|
-
let
|
|
589
|
-
...
|
|
588
|
+
let we = {
|
|
589
|
+
...re || {},
|
|
590
590
|
...y.params,
|
|
591
|
-
...
|
|
591
|
+
...n
|
|
592
592
|
};
|
|
593
|
-
|
|
594
|
-
let
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
|
|
598
|
-
const K =
|
|
599
|
-
return K !== ((
|
|
593
|
+
m && $e(m) && (we = await m(we, z, N));
|
|
594
|
+
let X = [];
|
|
595
|
+
const ae = await (a == null ? void 0 : a(we, Be, N));
|
|
596
|
+
if (A.value = !1, ae && (ae != null && ae.success)) {
|
|
597
|
+
X = ae.data || [], l && $e(l) && (X = await (l == null ? void 0 : l(X))), s(X);
|
|
598
|
+
const K = ae.total || (X == null ? void 0 : X.length) || 0;
|
|
599
|
+
return K !== ((Ie = S(g)) == null ? void 0 : Ie.total) && c({
|
|
600
600
|
total: K || 0
|
|
601
|
-
}), b(
|
|
601
|
+
}), b(X), X;
|
|
602
602
|
} else
|
|
603
603
|
return [];
|
|
604
|
-
} catch (
|
|
605
|
-
E.value === void 0 && b([]),
|
|
604
|
+
} catch (re) {
|
|
605
|
+
E.value === void 0 && b([]), I("requestError", re);
|
|
606
606
|
} finally {
|
|
607
|
-
|
|
607
|
+
k.value = !1, C(!1);
|
|
608
608
|
}
|
|
609
609
|
return [];
|
|
610
|
-
},
|
|
611
|
-
|
|
612
|
-
const $ = await
|
|
613
|
-
return N && !R.value && (
|
|
614
|
-
|
|
610
|
+
}, j = Kl(async (y) => {
|
|
611
|
+
H.value && clearTimeout(H.value);
|
|
612
|
+
const $ = await oe(y), N = Vt(e.value, $);
|
|
613
|
+
return N && !R.value && (H.value = setTimeout(() => {
|
|
614
|
+
j.run({ ...y, isPolling: N });
|
|
615
615
|
}, Math.max(N, 2e3))), $;
|
|
616
616
|
}, i.value || 10);
|
|
617
|
-
|
|
618
|
-
R.value = !0, clearTimeout(
|
|
619
|
-
}),
|
|
620
|
-
R.value = !0, clearTimeout(
|
|
621
|
-
}),
|
|
622
|
-
e.value ?
|
|
623
|
-
}, { immediate: !0 }),
|
|
624
|
-
|
|
617
|
+
Jt(() => {
|
|
618
|
+
R.value = !0, clearTimeout(H.value);
|
|
619
|
+
}), Qt(() => {
|
|
620
|
+
R.value = !0, clearTimeout(H.value);
|
|
621
|
+
}), W(() => e.value, () => {
|
|
622
|
+
e.value ? j.run({ isPolling: !0 }) : clearTimeout(H.value);
|
|
623
|
+
}, { immediate: !0 }), W([() => o.value, () => u.value, () => n], () => {
|
|
624
|
+
Ce(a) ? (!k.value || !e.value) && j.run({ isPolling: !1 }) : b(u.value || []);
|
|
625
625
|
}, {
|
|
626
626
|
deep: !0,
|
|
627
627
|
immediate: !0
|
|
628
628
|
});
|
|
629
|
-
const
|
|
629
|
+
const ee = T(() => {
|
|
630
630
|
if (x.value)
|
|
631
631
|
return S(E);
|
|
632
632
|
const y = d.value.filter(($) => $.show || $.show === void 0);
|
|
633
633
|
return !S(E) || !y || y.length === 0 ? [] : S(E);
|
|
634
|
-
}),
|
|
635
|
-
function
|
|
636
|
-
|
|
634
|
+
}), _ = T(() => S(E).some((y) => ye(y.children) && y.children.length > 0));
|
|
635
|
+
function Se(y) {
|
|
636
|
+
Y.value = y;
|
|
637
637
|
}
|
|
638
638
|
function t(y, $, N, z) {
|
|
639
|
-
|
|
639
|
+
j.run({ pagination: y, filters: $, sorter: N, extra: z, isPolling: !1 }), I("change", y, $, N, z);
|
|
640
640
|
}
|
|
641
641
|
function b(y) {
|
|
642
642
|
var N;
|
|
643
|
-
const $ =
|
|
644
|
-
if (!De($, E.value) && (E.value = $, !
|
|
643
|
+
const $ = Ht(ne(y), S(g.value));
|
|
644
|
+
if (!De($, E.value) && (E.value = $, !a || !$e(a))) {
|
|
645
645
|
const z = $.length || 0;
|
|
646
646
|
z !== ((N = S(g)) == null ? void 0 : N.total) && c({
|
|
647
647
|
total: z
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function O({ key: y, record: $, type: N = "update" }) {
|
|
652
652
|
switch (N) {
|
|
653
653
|
case "update":
|
|
654
654
|
E.value = E.value.map((z) => y && $[y] === z[y] ? { ...z, ...$ } : z);
|
|
@@ -665,80 +665,80 @@ function Ll({ polling: e, request: n, postData: l, dataSource: u, waitRequest: o
|
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
return {
|
|
668
|
-
dataSource:
|
|
669
|
-
isTreeDataRef:
|
|
668
|
+
dataSource: ee,
|
|
669
|
+
isTreeDataRef: _,
|
|
670
670
|
reSetDataList: b,
|
|
671
|
-
changeDataValue:
|
|
671
|
+
changeDataValue: O,
|
|
672
672
|
handleTableChange: t,
|
|
673
673
|
reload: async (y) => {
|
|
674
|
-
|
|
674
|
+
Ce(a) ? await j.run({ ...y, isPolling: !1 }) : I("reload");
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
677
|
}
|
|
678
|
-
function
|
|
679
|
-
const
|
|
678
|
+
function Ll(e) {
|
|
679
|
+
const a = {};
|
|
680
680
|
return e.forEach((l) => {
|
|
681
681
|
let u = l.initialValue;
|
|
682
682
|
const o = ["select"], i = ["date", "time", "dateRange"];
|
|
683
|
-
!u && o.includes(l.valueType) ? u = void 0 : !u && i.includes(l.valueType) ? u = null : u || (u = ""), l.name === "dateRange" ? (
|
|
684
|
-
}),
|
|
683
|
+
!u && o.includes(l.valueType) ? u = void 0 : !u && i.includes(l.valueType) ? u = null : u || (u = ""), l.name === "dateRange" ? (a[l.rangeStartName || "start"] = u ? u[0] : null, a[l.rangeEndName || "end"] = u ? u[1] : null) : l.name && (a[l.name] = u);
|
|
684
|
+
}), a;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
const i =
|
|
686
|
+
function Vl({ search: e, searchMap: a, params: l, columns: u, setPagination: o }) {
|
|
687
|
+
const i = fe({}), d = fe({}), h = D([]), C = T(() => {
|
|
688
688
|
var s;
|
|
689
|
-
return
|
|
689
|
+
return Z(e.value) ? !!((s = e.value) != null && s.showSearch) : !!e.value;
|
|
690
690
|
}), p = (s) => {
|
|
691
691
|
var c, g;
|
|
692
|
-
const
|
|
693
|
-
if ((s === "all" || s === "searchMap") && ((c =
|
|
694
|
-
|
|
692
|
+
const n = [];
|
|
693
|
+
if ((s === "all" || s === "searchMap") && ((c = a.value) == null || c.forEach((m) => n.push(m)), n.forEach((m) => {
|
|
694
|
+
h.value.some((x) => x.name === m.name) ? h.value = h.value.map((x) => x.name === m.name ? {
|
|
695
695
|
...x,
|
|
696
|
-
...
|
|
697
|
-
} : x) :
|
|
698
|
-
})), (s === "all" || s === "columns") && ((g = u.value) != null && g.length) && (u.value && u.value.forEach((
|
|
699
|
-
|
|
700
|
-
}),
|
|
701
|
-
|
|
696
|
+
...m
|
|
697
|
+
} : x) : h.value.push(m);
|
|
698
|
+
})), (s === "all" || s === "columns") && ((g = u.value) != null && g.length) && (u.value && u.value.forEach((m) => {
|
|
699
|
+
m.searchConfig && n.push(m.searchConfig);
|
|
700
|
+
}), n.forEach((m) => {
|
|
701
|
+
h.value.some((x) => x.name === m.name) ? h.value = h.value.map((x) => x.name === m.name ? {
|
|
702
702
|
...x,
|
|
703
|
-
...
|
|
704
|
-
} : x) :
|
|
703
|
+
...m
|
|
704
|
+
} : x) : h.value.push(m);
|
|
705
705
|
})), s === "all" || s === "searchMap" || s === "columns") {
|
|
706
706
|
o({ current: 1 });
|
|
707
|
-
const
|
|
708
|
-
Object.assign(d, { ...
|
|
709
|
-
for (const x in
|
|
710
|
-
i[x] || (i[x] =
|
|
707
|
+
const m = Ll(n);
|
|
708
|
+
Object.assign(d, { ...m });
|
|
709
|
+
for (const x in m)
|
|
710
|
+
i[x] || (i[x] = m[x]);
|
|
711
711
|
}
|
|
712
712
|
(s === "all" || s === "params") && !C.value && (o({ current: 1 }), Object.assign(i, l.value));
|
|
713
713
|
};
|
|
714
|
-
|
|
714
|
+
Zt(() => {
|
|
715
715
|
p("all");
|
|
716
|
-
}),
|
|
716
|
+
}), W(() => l.value, () => {
|
|
717
717
|
p("params");
|
|
718
|
-
}, { deep: !0 }),
|
|
718
|
+
}, { deep: !0 }), W(() => a.value, () => {
|
|
719
719
|
p("searchMap");
|
|
720
|
-
}, { deep: !0 }),
|
|
720
|
+
}, { deep: !0 }), W(() => u.value, () => {
|
|
721
721
|
p("columns");
|
|
722
722
|
}, { deep: !0 });
|
|
723
723
|
function v(s) {
|
|
724
724
|
o({ current: 1 }), Object.assign(i, s);
|
|
725
725
|
}
|
|
726
|
-
return { formDataRef:
|
|
726
|
+
return { formDataRef: h, formParamsRef: i, defaultParamsRef: d, setFormParams: v };
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
const u =
|
|
730
|
-
|
|
728
|
+
function Hl({ columns: e, columnsState: a, changeColumns: l }) {
|
|
729
|
+
const u = D(void 0), o = fe({}), i = fe({}), d = fe({}), h = D([]);
|
|
730
|
+
W(() => e.value, () => {
|
|
731
731
|
var s;
|
|
732
|
-
(s = S(e)) == null || s.forEach(({ show:
|
|
733
|
-
const x = vt(c,
|
|
734
|
-
x && (d[x] = { show:
|
|
732
|
+
(s = S(e)) == null || s.forEach(({ show: n, key: c, fixed: g }, m) => {
|
|
733
|
+
const x = vt(c, m);
|
|
734
|
+
x && (d[x] = { show: n === void 0 ? !0 : n, fixed: g });
|
|
735
735
|
});
|
|
736
|
-
const v = S(e).map((
|
|
736
|
+
const v = S(e).map((n) => n.key);
|
|
737
737
|
p(v);
|
|
738
738
|
}, { deep: !0, immediate: !0 }), Pe(() => {
|
|
739
739
|
var s;
|
|
740
740
|
const v = {
|
|
741
|
-
...(s = S(
|
|
741
|
+
...(s = S(a)) == null ? void 0 : s.value,
|
|
742
742
|
...S(d)
|
|
743
743
|
};
|
|
744
744
|
Object.assign(o, v), Object.assign(i, v);
|
|
@@ -747,102 +747,102 @@ function Wl({ columns: e, columnsState: n, changeColumns: l }) {
|
|
|
747
747
|
u.value = s, Object.assign(o, v), l == null || l(o, s === "fixed");
|
|
748
748
|
}
|
|
749
749
|
function p(v) {
|
|
750
|
-
|
|
750
|
+
h.value = v;
|
|
751
751
|
}
|
|
752
752
|
return {
|
|
753
753
|
columnsMap: o,
|
|
754
754
|
operationType: u,
|
|
755
755
|
setColumnsMap: C,
|
|
756
|
-
sortKeyColumns:
|
|
756
|
+
sortKeyColumns: h,
|
|
757
757
|
cacheColumnsMap: i,
|
|
758
758
|
setSortKeyColumns: p
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
const
|
|
761
|
+
function Wl(e) {
|
|
762
|
+
const a = T(() => e.draggabled), l = T(() => e.neverScroll), u = T(() => e.autoScroll);
|
|
763
763
|
return {
|
|
764
|
-
draggabled:
|
|
764
|
+
draggabled: a,
|
|
765
765
|
neverScroll: l,
|
|
766
766
|
autoScroll: u
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
const d =
|
|
771
|
-
|
|
769
|
+
function _l({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o, neverScroll: i }) {
|
|
770
|
+
const d = D([]), h = D([]);
|
|
771
|
+
W([
|
|
772
772
|
() => e.value,
|
|
773
|
-
() =>
|
|
773
|
+
() => a.value,
|
|
774
774
|
() => l.value,
|
|
775
775
|
() => u.value,
|
|
776
776
|
() => l.value,
|
|
777
777
|
() => o.value,
|
|
778
778
|
() => i.value
|
|
779
779
|
], () => {
|
|
780
|
-
const g = v(
|
|
781
|
-
De(g,
|
|
780
|
+
const g = v(ve(a.value));
|
|
781
|
+
De(g, ve(d.value)) || (d.value = ne(g)), De(g, ve(h.value)) || (h.value = ne(g));
|
|
782
782
|
}, {
|
|
783
783
|
deep: !0,
|
|
784
784
|
immediate: !0
|
|
785
785
|
});
|
|
786
786
|
const C = T(() => {
|
|
787
|
-
const g = p(S(d).filter((
|
|
787
|
+
const g = p(S(d).filter((I) => I.fixed === "left")), m = p(S(d).filter((I) => I.fixed !== "left" && I.fixed !== "right")), x = p(S(d).filter((I) => I.fixed === "right"));
|
|
788
788
|
return [
|
|
789
789
|
...g,
|
|
790
|
-
...
|
|
790
|
+
...m,
|
|
791
791
|
...x
|
|
792
792
|
];
|
|
793
793
|
});
|
|
794
794
|
function p(g) {
|
|
795
|
-
return g.sort((
|
|
795
|
+
return g.sort((m, x) => _t(m, x, "order", 0));
|
|
796
796
|
}
|
|
797
797
|
function v(g) {
|
|
798
|
-
return
|
|
799
|
-
var
|
|
800
|
-
if (
|
|
801
|
-
return
|
|
802
|
-
if (
|
|
803
|
-
if ((
|
|
804
|
-
|
|
798
|
+
return ne(g).map((m, x) => {
|
|
799
|
+
var I;
|
|
800
|
+
if (m.dataIndex === "action" || x === g.length - 1 ? m.resizable = !1 : m.resizable = ue(m.resizable) ? m.resizable : !!(gt(m.width) && S(u)), !m.width || S(i))
|
|
801
|
+
return m;
|
|
802
|
+
if (m.dataIndex === "action" && S(o))
|
|
803
|
+
if ((I = S(e)) != null && I.x || !S(l))
|
|
804
|
+
m.width = m.width || 100, m.fixed = "right";
|
|
805
805
|
else {
|
|
806
|
-
const R = S(
|
|
807
|
-
|
|
806
|
+
const R = S(a).find((k) => k.dataIndex === m.dataIndex);
|
|
807
|
+
m.width = (R == null ? void 0 : R.width) || "", m.fixed = R == null ? void 0 : R.fixed;
|
|
808
808
|
}
|
|
809
|
-
return
|
|
809
|
+
return m;
|
|
810
810
|
});
|
|
811
811
|
}
|
|
812
|
-
function s(g,
|
|
813
|
-
d.value = d.value.map((x) => (x.uuid ===
|
|
812
|
+
function s(g, m) {
|
|
813
|
+
d.value = d.value.map((x) => (x.uuid === m.uuid && (x.width = g), x));
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function n(g) {
|
|
816
816
|
if (g.length <= 0) {
|
|
817
817
|
d.value = [];
|
|
818
818
|
return;
|
|
819
819
|
}
|
|
820
|
-
De(v(g),
|
|
820
|
+
De(v(g), ve(d.value)) || (d.value = v(g));
|
|
821
821
|
}
|
|
822
822
|
function c(g) {
|
|
823
|
-
|
|
824
|
-
var
|
|
825
|
-
const x =
|
|
826
|
-
show: (
|
|
827
|
-
fixed: (R = g[
|
|
828
|
-
order: (
|
|
823
|
+
n(ne(ve(a.value)).map((m) => {
|
|
824
|
+
var I, R, k;
|
|
825
|
+
const x = m.key ? {
|
|
826
|
+
show: (I = g[m.key]) == null ? void 0 : I.show,
|
|
827
|
+
fixed: (R = g[m.key]) == null ? void 0 : R.fixed,
|
|
828
|
+
order: (k = g[m.key]) == null ? void 0 : k.order
|
|
829
829
|
} : {};
|
|
830
|
-
return { ...
|
|
830
|
+
return { ...m, ...x };
|
|
831
831
|
}));
|
|
832
832
|
}
|
|
833
833
|
return {
|
|
834
834
|
breakpoint: l,
|
|
835
835
|
proColumns: C,
|
|
836
|
-
cacheProColumns:
|
|
837
|
-
setColumns:
|
|
836
|
+
cacheProColumns: h,
|
|
837
|
+
setColumns: n,
|
|
838
838
|
changeColumns: c,
|
|
839
839
|
resizeColumnWidth: s
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
|
-
function
|
|
843
|
-
const
|
|
842
|
+
function Gl(e) {
|
|
843
|
+
const a = T(() => e.scroll), l = T(() => e.autoScroll), u = T(() => e.modalScroll), o = T(() => e.neverScroll), i = T(() => e.rowSelection), d = T(() => e.scrollBreakpoint);
|
|
844
844
|
return {
|
|
845
|
-
scroll:
|
|
845
|
+
scroll: a,
|
|
846
846
|
neverScroll: o,
|
|
847
847
|
rowSelection: i,
|
|
848
848
|
autoScroll: l,
|
|
@@ -850,34 +850,34 @@ function ql(e) {
|
|
|
850
850
|
scrollBreakpoint: d
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function ql({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll: o, rowSelection: i, screens: d, innerWidth: h, scrollBreakpoint: C }) {
|
|
854
854
|
const p = T(() => {
|
|
855
|
-
var
|
|
856
|
-
return S(C) ? gt(S(C)) ?
|
|
855
|
+
var n, c, g;
|
|
856
|
+
return S(C) ? gt(S(C)) ? h.value > S(C) : Gt(S(C)) ? (n = d.value) == null ? void 0 : n[S(C)] : (c = d.value) == null ? void 0 : c.xl : (g = d.value) == null ? void 0 : g.xl;
|
|
857
857
|
}), v = T(() => {
|
|
858
|
-
let
|
|
859
|
-
const c = S(i) ? 60 : 0, g = 150,
|
|
860
|
-
|
|
861
|
-
|
|
858
|
+
let n = 0;
|
|
859
|
+
const c = S(i) ? 60 : 0, g = 150, m = ne(S(a));
|
|
860
|
+
m.forEach((R) => {
|
|
861
|
+
n += Number.parseInt(String(R.width)) || 0;
|
|
862
862
|
});
|
|
863
|
-
const
|
|
864
|
-
return
|
|
863
|
+
const I = m.filter((R) => !Reflect.has(R, "width")).length;
|
|
864
|
+
return I !== 0 && (n += I * g), c && (n += c), n;
|
|
865
865
|
});
|
|
866
866
|
return { proScroll: T(() => {
|
|
867
|
-
var
|
|
867
|
+
var n, c;
|
|
868
868
|
return S(o) ? {} : S(e) && Object.keys(S(e)).length ? S(e) : S(u) ? {
|
|
869
|
-
y: ((
|
|
870
|
-
} : S(l) ? p.value ? {} :
|
|
869
|
+
y: ((n = S(e)) == null ? void 0 : n.y) || ((c = d.value) != null && c.xl ? 400 : 235)
|
|
870
|
+
} : S(l) ? p.value ? {} : ue(p.value) ? { x: S(v) } : {} : {};
|
|
871
871
|
}), breakpoint: p };
|
|
872
872
|
}
|
|
873
|
-
const { provideContext:
|
|
874
|
-
function
|
|
875
|
-
const l =
|
|
873
|
+
const { provideContext: Ul, useInjectContext: he } = Rl("pro-table");
|
|
874
|
+
function Xl(e, a) {
|
|
875
|
+
const l = fe({});
|
|
876
876
|
function u() {
|
|
877
877
|
Object.keys(e).forEach((d) => {
|
|
878
878
|
o(d, e[d]);
|
|
879
879
|
});
|
|
880
|
-
const i =
|
|
880
|
+
const i = a.find((d) => d.valueType === "dateRange");
|
|
881
881
|
i && o(i.name || "", e[i.rangeStartName || "start"] ? [
|
|
882
882
|
e[i.rangeStartName || "start"],
|
|
883
883
|
e[i.rangeEndName || "end"]
|
|
@@ -895,7 +895,7 @@ function Jl(e, n) {
|
|
|
895
895
|
changeFormState: o
|
|
896
896
|
};
|
|
897
897
|
}
|
|
898
|
-
const
|
|
898
|
+
const Jl = (e) => ({
|
|
899
899
|
[`${e.componentCls}-form`]: {
|
|
900
900
|
"&-collapse-button": {
|
|
901
901
|
display: "flex",
|
|
@@ -929,11 +929,11 @@ const Ql = (e) => ({
|
|
|
929
929
|
alignItems: "center"
|
|
930
930
|
}
|
|
931
931
|
}), {
|
|
932
|
-
useBreakpoint:
|
|
932
|
+
useBreakpoint: Ql
|
|
933
933
|
} = Ue, {
|
|
934
|
-
MonthPicker:
|
|
935
|
-
RangePicker:
|
|
936
|
-
} = St, pt = /* @__PURE__ */
|
|
934
|
+
MonthPicker: Zl,
|
|
935
|
+
RangePicker: ea
|
|
936
|
+
} = St, pt = /* @__PURE__ */ se({
|
|
937
937
|
name: "ProTableForm",
|
|
938
938
|
props: {
|
|
939
939
|
search: {
|
|
@@ -943,7 +943,7 @@ const Ql = (e) => ({
|
|
|
943
943
|
searchText: "查询"
|
|
944
944
|
})
|
|
945
945
|
},
|
|
946
|
-
modal:
|
|
946
|
+
modal: ge.modalScroll,
|
|
947
947
|
searchMap: {
|
|
948
948
|
type: Array,
|
|
949
949
|
default: () => []
|
|
@@ -954,23 +954,23 @@ const Ql = (e) => ({
|
|
|
954
954
|
},
|
|
955
955
|
emits: ["search"],
|
|
956
956
|
setup(e, {
|
|
957
|
-
emit:
|
|
957
|
+
emit: a,
|
|
958
958
|
slots: l,
|
|
959
959
|
expose: u
|
|
960
960
|
}) {
|
|
961
961
|
const {
|
|
962
962
|
wrapSSR: o,
|
|
963
963
|
hashId: i
|
|
964
|
-
} = ze("ProTableForm", [
|
|
964
|
+
} = ze("ProTableForm", [Jl], e.prefixCls), d = wt(), h = Ql(), {
|
|
965
965
|
formState: C,
|
|
966
966
|
resetFormState: p,
|
|
967
967
|
changeFormState: v
|
|
968
|
-
} =
|
|
968
|
+
} = Xl(e.defaultParams || {}, e.searchMap || []), s = D(!1), n = T(() => {
|
|
969
969
|
var t;
|
|
970
970
|
return !!((t = e.search) != null && t.showSearch);
|
|
971
971
|
}), c = T(() => {
|
|
972
972
|
var t, b;
|
|
973
|
-
return ((t = e.search) == null ? void 0 : t.showReset) === void 0 ?
|
|
973
|
+
return ((t = e.search) == null ? void 0 : t.showReset) === void 0 ? n.value : (b = e.search) == null ? void 0 : b.showReset;
|
|
974
974
|
}), g = [{
|
|
975
975
|
value: "xxl",
|
|
976
976
|
span: 4
|
|
@@ -989,43 +989,43 @@ const Ql = (e) => ({
|
|
|
989
989
|
}, {
|
|
990
990
|
value: "xs",
|
|
991
991
|
span: 1
|
|
992
|
-
}],
|
|
992
|
+
}], m = (t) => {
|
|
993
993
|
let b = 4;
|
|
994
|
-
for (let
|
|
995
|
-
const y = g[
|
|
996
|
-
if (
|
|
997
|
-
b = (t == null ? void 0 : t[y]) || (e.modal ? 3 : g[
|
|
994
|
+
for (let O = 0; O < g.length; O += 1) {
|
|
995
|
+
const y = g[O].value;
|
|
996
|
+
if (h.value[y]) {
|
|
997
|
+
b = (t == null ? void 0 : t[y]) || (e.modal ? 3 : g[O].span);
|
|
998
998
|
break;
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
return b;
|
|
1002
1002
|
}, x = T(() => {
|
|
1003
1003
|
var t;
|
|
1004
|
-
return
|
|
1004
|
+
return m((t = e.search) == null ? void 0 : t.span);
|
|
1005
1005
|
});
|
|
1006
|
-
|
|
1006
|
+
W(() => {
|
|
1007
1007
|
var t;
|
|
1008
1008
|
return (t = e.search) == null ? void 0 : t.defaultCollapsed;
|
|
1009
1009
|
}, (t) => {
|
|
1010
1010
|
s.value = s.value || !!t;
|
|
1011
1011
|
});
|
|
1012
|
-
const
|
|
1012
|
+
const I = (t) => {
|
|
1013
1013
|
s.value = t;
|
|
1014
|
-
}, R = (t, b,
|
|
1015
|
-
...
|
|
1014
|
+
}, R = (t, b, O) => (t + 1) % b === 0 ? {
|
|
1015
|
+
...O,
|
|
1016
1016
|
marginRight: 0
|
|
1017
1017
|
} : {
|
|
1018
|
-
...
|
|
1018
|
+
...O,
|
|
1019
1019
|
marginRight: "2%"
|
|
1020
|
-
},
|
|
1021
|
-
const t =
|
|
1022
|
-
return b && (t[b.name] = C[b.name] || b.initialValue || ""),
|
|
1023
|
-
},
|
|
1024
|
-
|
|
1025
|
-
(!
|
|
1020
|
+
}, k = () => {
|
|
1021
|
+
const t = ne(C), b = e.searchMap.find(($) => $.valueType === "text") || "", O = e.searchMap.find(($) => $.valueType === "dateRange") || "", y = e.searchMap.find(($) => $.valueType === "treeSelect");
|
|
1022
|
+
return b && (t[b.name] = C[b.name] || b.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]), y && (y != null && y.name && ye(C[y == null ? void 0 : y.name]) && (t[y.name] = C[y.name].length ? C[y.name].map(($) => $[y.valueKey === "text" ? "label" : "value"]).join() : ""), y != null && y.name && ye(t[y == null ? void 0 : y.name]) && (t[y.name] = t[y.name].length ? t[y.name].map(($) => $[y.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
1023
|
+
}, A = (t = !1, b) => {
|
|
1024
|
+
el(() => {
|
|
1025
|
+
(!n.value || t) && a("search", k(), !!b);
|
|
1026
1026
|
});
|
|
1027
|
-
},
|
|
1028
|
-
var
|
|
1027
|
+
}, Y = (t, b) => {
|
|
1028
|
+
var O, y, $;
|
|
1029
1029
|
switch (b.valueType) {
|
|
1030
1030
|
case "text":
|
|
1031
1031
|
v(b.name || "", t || b.initialValue || "");
|
|
@@ -1034,39 +1034,39 @@ const Ql = (e) => ({
|
|
|
1034
1034
|
v(b.name || "", t || t === 0 ? t : b.initialValue || void 0);
|
|
1035
1035
|
break;
|
|
1036
1036
|
case "treeSelect":
|
|
1037
|
-
v(b.name || "", t || t === 0 ? t : b.initialValue || ((
|
|
1037
|
+
v(b.name || "", t || t === 0 ? t : b.initialValue || ((O = b.field) != null && O.treeCheckable || (y = b.field) != null && y.multiple ? [] : null));
|
|
1038
1038
|
break;
|
|
1039
1039
|
case "date":
|
|
1040
|
-
v(b.name || "", t ?
|
|
1040
|
+
v(b.name || "", t ? q(t).format(b.valueFormat || "YYYY-MM-DD") : b.initialValue || null);
|
|
1041
1041
|
break;
|
|
1042
1042
|
case "dateMonth":
|
|
1043
|
-
v(b.name || "", t ?
|
|
1043
|
+
v(b.name || "", t ? q(t).format("YYYY-MM") : b.initialValue || null);
|
|
1044
1044
|
break;
|
|
1045
1045
|
case "dateRange":
|
|
1046
|
-
v(b.name || "", t && t.length > 0 ? [
|
|
1046
|
+
v(b.name || "", t && t.length > 0 ? [q(t[0]).format(b.valueFormat || "YYYY-MM-DD"), q(t[1]).format(b.valueFormat || "YYYY-MM-DD")] : b.initialValue || null);
|
|
1047
1047
|
break;
|
|
1048
1048
|
case "time":
|
|
1049
|
-
v(b.name || "", t ?
|
|
1049
|
+
v(b.name || "", t ? q(t).format(b.valueFormat || "HH:mm:ss") : b.initialValue || null);
|
|
1050
1050
|
break;
|
|
1051
1051
|
}
|
|
1052
|
-
($ = e.search) != null && $.showSearch || b.valueType === "text" || (b.valueType === "treeSelect" || b.valueType,
|
|
1052
|
+
($ = e.search) != null && $.showSearch || b.valueType === "text" || (b.valueType === "treeSelect" || b.valueType, A());
|
|
1053
1053
|
}, E = (t = !0) => {
|
|
1054
|
-
p(),
|
|
1054
|
+
p(), A(!0, t);
|
|
1055
1055
|
};
|
|
1056
1056
|
u({
|
|
1057
|
-
getFormState: () =>
|
|
1057
|
+
getFormState: () => k(),
|
|
1058
1058
|
resetForm: E
|
|
1059
1059
|
});
|
|
1060
|
-
const
|
|
1060
|
+
const H = () => {
|
|
1061
1061
|
var b;
|
|
1062
1062
|
const t = (b = d == null ? void 0 : d.emptyText) == null ? void 0 : b.value;
|
|
1063
1063
|
if (t) {
|
|
1064
|
-
const
|
|
1064
|
+
const O = xe(t), y = O ? bt(t) : yt(t || []);
|
|
1065
1065
|
return r("div", {
|
|
1066
1066
|
class: je(`${e.prefixCls}-search-empty-text`, i.value)
|
|
1067
|
-
}, [
|
|
1067
|
+
}, [O ? y : ye(y) ? y.map(($) => qe($)) : void 0]);
|
|
1068
1068
|
}
|
|
1069
|
-
},
|
|
1069
|
+
}, oe = () => (n.value || c.value) && r(de, null, {
|
|
1070
1070
|
default: () => [c.value && r(dt, {
|
|
1071
1071
|
onClick: () => E()
|
|
1072
1072
|
}, {
|
|
@@ -1074,52 +1074,52 @@ const Ql = (e) => ({
|
|
|
1074
1074
|
var t;
|
|
1075
1075
|
return [((t = e.search) == null ? void 0 : t.resetText) || "重置"];
|
|
1076
1076
|
}
|
|
1077
|
-
}),
|
|
1077
|
+
}), n.value && r(dt, {
|
|
1078
1078
|
loading: e.loading,
|
|
1079
1079
|
type: "primary",
|
|
1080
|
-
onClick: () =>
|
|
1080
|
+
onClick: () => A(!0)
|
|
1081
1081
|
}, {
|
|
1082
1082
|
default: () => {
|
|
1083
1083
|
var t;
|
|
1084
1084
|
return [((t = e.search) == null ? void 0 : t.searchText) || "查询"];
|
|
1085
1085
|
}
|
|
1086
1086
|
})]
|
|
1087
|
-
}),
|
|
1087
|
+
}), j = ({
|
|
1088
1088
|
formItemStyle: t,
|
|
1089
1089
|
advanced: b,
|
|
1090
|
-
showAdvanced:
|
|
1090
|
+
showAdvanced: O = !0
|
|
1091
1091
|
}) => r("div", {
|
|
1092
1092
|
style: t,
|
|
1093
1093
|
class: `${e.prefixCls}-form-collapse-button ${i.value}`
|
|
1094
|
-
}, [r(
|
|
1094
|
+
}, [r(de, {
|
|
1095
1095
|
size: 16
|
|
1096
1096
|
}, {
|
|
1097
1097
|
default: () => {
|
|
1098
1098
|
var y, $;
|
|
1099
|
-
return [
|
|
1099
|
+
return [oe(), O && r("span", {
|
|
1100
1100
|
class: `${e.prefixCls}-a ${i.value}`,
|
|
1101
|
-
onClick: () =>
|
|
1102
|
-
}, [b ? "收起" : "展开", (y = e.search) != null && y.collapseRender ? ($ = e.search) == null ? void 0 : $.collapseRender() : b ? r(
|
|
1101
|
+
onClick: () => I(!b)
|
|
1102
|
+
}, [b ? "收起" : "展开", (y = e.search) != null && y.collapseRender ? ($ = e.search) == null ? void 0 : $.collapseRender() : b ? r(nl, null, null) : r(ul, null, null)])];
|
|
1103
1103
|
}
|
|
1104
|
-
})]),
|
|
1104
|
+
})]), ee = (t) => {
|
|
1105
1105
|
var y, $, N, z;
|
|
1106
1106
|
let b;
|
|
1107
|
-
const
|
|
1107
|
+
const O = n.value ? ft : ft.Search;
|
|
1108
1108
|
switch (t.valueType) {
|
|
1109
1109
|
case "text":
|
|
1110
|
-
b = r(
|
|
1110
|
+
b = r(O, U({
|
|
1111
1111
|
style: {
|
|
1112
1112
|
width: "100%"
|
|
1113
1113
|
},
|
|
1114
1114
|
value: C[t.name],
|
|
1115
1115
|
placeholder: t.placeholder || "请输入",
|
|
1116
1116
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1117
|
-
onChange: (w) =>
|
|
1118
|
-
onSearch: (w) =>
|
|
1117
|
+
onChange: (w) => Y(w.target.value, t),
|
|
1118
|
+
onSearch: (w) => A()
|
|
1119
1119
|
}, t.field || {}), null);
|
|
1120
1120
|
break;
|
|
1121
1121
|
case "select":
|
|
1122
|
-
b = r(
|
|
1122
|
+
b = r(bl, U({
|
|
1123
1123
|
style: {
|
|
1124
1124
|
width: "100%"
|
|
1125
1125
|
},
|
|
@@ -1132,8 +1132,8 @@ const Ql = (e) => ({
|
|
|
1132
1132
|
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? r(_e, {
|
|
1133
1133
|
size: "small",
|
|
1134
1134
|
indicator: (y = d == null ? void 0 : d.indicator) == null ? void 0 : y.value
|
|
1135
|
-
}, null) :
|
|
1136
|
-
onChange: (w) =>
|
|
1135
|
+
}, null) : H(),
|
|
1136
|
+
onChange: (w) => Y(w, t),
|
|
1137
1137
|
options: t.loading ? [] : ($ = t == null ? void 0 : t.valueEnum) == null ? void 0 : $.map((w) => ({
|
|
1138
1138
|
label: w.text,
|
|
1139
1139
|
value: w.value
|
|
@@ -1141,7 +1141,7 @@ const Ql = (e) => ({
|
|
|
1141
1141
|
}, t.field || {}), null);
|
|
1142
1142
|
break;
|
|
1143
1143
|
case "treeSelect":
|
|
1144
|
-
b = r(
|
|
1144
|
+
b = r(yl, U({
|
|
1145
1145
|
style: {
|
|
1146
1146
|
width: "100%"
|
|
1147
1147
|
},
|
|
@@ -1153,97 +1153,97 @@ const Ql = (e) => ({
|
|
|
1153
1153
|
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? r(_e, {
|
|
1154
1154
|
size: "small",
|
|
1155
1155
|
indicator: (N = d == null ? void 0 : d.indicator) == null ? void 0 : N.value
|
|
1156
|
-
}, null) :
|
|
1157
|
-
onChange: (w) =>
|
|
1156
|
+
}, null) : H(),
|
|
1157
|
+
onChange: (w) => Y(w, t)
|
|
1158
1158
|
}, t.field || {}), null);
|
|
1159
1159
|
break;
|
|
1160
1160
|
case "date":
|
|
1161
|
-
b = r(St,
|
|
1161
|
+
b = r(St, U({
|
|
1162
1162
|
style: {
|
|
1163
1163
|
width: "100%"
|
|
1164
1164
|
},
|
|
1165
|
-
value: C[t.name] ?
|
|
1165
|
+
value: C[t.name] ? q(C[t.name], t.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1166
1166
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1167
1167
|
placeholder: t.placeholder || "请选择",
|
|
1168
1168
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1169
1169
|
format: t.valueFormat || "YYYY-MM-DD",
|
|
1170
1170
|
showTime: t.showTime,
|
|
1171
1171
|
showToday: t.showToday || !0,
|
|
1172
|
-
onChange: (w) =>
|
|
1172
|
+
onChange: (w) => Y(w, t)
|
|
1173
1173
|
}, t.field || {}), null);
|
|
1174
1174
|
break;
|
|
1175
1175
|
case "dateMonth":
|
|
1176
|
-
b = r(
|
|
1176
|
+
b = r(Zl, U({
|
|
1177
1177
|
style: {
|
|
1178
1178
|
width: "100%"
|
|
1179
1179
|
},
|
|
1180
|
-
value: C[t.name] ?
|
|
1180
|
+
value: C[t.name] ? q(C[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
1181
1181
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1182
1182
|
placeholder: t.placeholder || "请选择",
|
|
1183
|
-
onChange: (w) =>
|
|
1183
|
+
onChange: (w) => Y(w, t)
|
|
1184
1184
|
}, t.field || {}), null);
|
|
1185
1185
|
break;
|
|
1186
1186
|
case "dateRange":
|
|
1187
|
-
b = r(
|
|
1187
|
+
b = r(ea, U({
|
|
1188
1188
|
style: {
|
|
1189
1189
|
width: "100%"
|
|
1190
1190
|
},
|
|
1191
|
-
value: (z = C[t.name]) != null && z.length ? [
|
|
1191
|
+
value: (z = C[t.name]) != null && z.length ? [q(C[t.name][0], t.valueFormat || "YYYY-MM-DD HH:mm:ss"), q(C[t.name][1], t.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1192
1192
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1193
1193
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
1194
1194
|
format: t.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
1195
1195
|
showTime: t.showTime,
|
|
1196
|
-
onChange: (w) =>
|
|
1196
|
+
onChange: (w) => Y(w, t)
|
|
1197
1197
|
}, t.field || {}), null);
|
|
1198
1198
|
break;
|
|
1199
1199
|
case "time":
|
|
1200
|
-
b = r(
|
|
1200
|
+
b = r(gl, U({
|
|
1201
1201
|
style: {
|
|
1202
1202
|
width: "100%"
|
|
1203
1203
|
},
|
|
1204
|
-
value: C[t.name] ?
|
|
1204
|
+
value: C[t.name] ? q(C[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
1205
1205
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1206
1206
|
placeholder: t.placeholder || "请选择",
|
|
1207
1207
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1208
1208
|
use12Hours: t.use12Hours,
|
|
1209
1209
|
format: t.valueFormat || "HH:mm:ss",
|
|
1210
|
-
onChange: (w) =>
|
|
1210
|
+
onChange: (w) => Y(w, t)
|
|
1211
1211
|
}, t.field || {}), null);
|
|
1212
1212
|
break;
|
|
1213
1213
|
}
|
|
1214
1214
|
return b;
|
|
1215
|
-
},
|
|
1215
|
+
}, _ = ({
|
|
1216
1216
|
formItemStyle: t,
|
|
1217
1217
|
item: b
|
|
1218
1218
|
}) => r("div", {
|
|
1219
1219
|
class: `${e.prefixCls}-form-item`,
|
|
1220
1220
|
style: t
|
|
1221
1221
|
}, [r(ct.Item, null, {
|
|
1222
|
-
default: () => [b.__v_isVNode ? b :
|
|
1223
|
-
})]),
|
|
1222
|
+
default: () => [b.__v_isVNode ? b : ee(b)]
|
|
1223
|
+
})]), Se = () => {
|
|
1224
1224
|
var b;
|
|
1225
1225
|
const t = [...e.searchMap, ...((b = l.default) == null ? void 0 : b.call(l)) || []];
|
|
1226
|
-
return t.map((
|
|
1226
|
+
return t.map((O, y) => {
|
|
1227
1227
|
const $ = {
|
|
1228
1228
|
width: `${(100 - (x.value - 1) * 2) / x.value}%`
|
|
1229
1229
|
}, N = R(y, x.value, $);
|
|
1230
|
-
return t.length < x.value || s.value ? r(Ne, null, [
|
|
1230
|
+
return t.length < x.value || s.value ? r(Ne, null, [_({
|
|
1231
1231
|
formItemStyle: N,
|
|
1232
|
-
item:
|
|
1233
|
-
}), y === t.length - 1 &&
|
|
1232
|
+
item: O
|
|
1233
|
+
}), y === t.length - 1 && j({
|
|
1234
1234
|
formItemStyle: {
|
|
1235
1235
|
flex: 1,
|
|
1236
1236
|
justifyContent: "flex-end"
|
|
1237
1237
|
},
|
|
1238
1238
|
advanced: s.value,
|
|
1239
1239
|
showAdvanced: s.value
|
|
1240
|
-
})]) : r(Ne, null, [y < x.value - 1 &&
|
|
1240
|
+
})]) : r(Ne, null, [y < x.value - 1 && _({
|
|
1241
1241
|
formItemStyle: N,
|
|
1242
|
-
item:
|
|
1243
|
-
}), y === x.value - 1 && (x.value - 1 === 0 || t.length === x.value) &&
|
|
1242
|
+
item: O
|
|
1243
|
+
}), y === x.value - 1 && (x.value - 1 === 0 || t.length === x.value) && _({
|
|
1244
1244
|
formItemStyle: N,
|
|
1245
|
-
item:
|
|
1246
|
-
}), y === x.value - 1 && t.length !== x.value &&
|
|
1245
|
+
item: O
|
|
1246
|
+
}), y === x.value - 1 && t.length !== x.value && j({
|
|
1247
1247
|
formItemStyle: {
|
|
1248
1248
|
flex: 1,
|
|
1249
1249
|
justifyContent: "flex-end"
|
|
@@ -1267,19 +1267,19 @@ const Ql = (e) => ({
|
|
|
1267
1267
|
}, {
|
|
1268
1268
|
default: () => [r("div", {
|
|
1269
1269
|
class: `${S(e.prefixCls)}-form-container ${i.value}`
|
|
1270
|
-
}, [
|
|
1270
|
+
}, [Se()])]
|
|
1271
1271
|
})]));
|
|
1272
1272
|
};
|
|
1273
1273
|
}
|
|
1274
1274
|
});
|
|
1275
1275
|
pt.inheritAttrs = !1;
|
|
1276
1276
|
const Re = (e) => {
|
|
1277
|
-
const
|
|
1278
|
-
return
|
|
1277
|
+
const a = D(null);
|
|
1278
|
+
return a.value = e, (...l) => {
|
|
1279
1279
|
var u;
|
|
1280
|
-
return (u =
|
|
1280
|
+
return (u = a.value) == null ? void 0 : u.call(a, ...l);
|
|
1281
1281
|
};
|
|
1282
|
-
},
|
|
1282
|
+
}, ta = (e) => ({
|
|
1283
1283
|
[`${e.componentCls}`]: {
|
|
1284
1284
|
width: "auto",
|
|
1285
1285
|
"&-title": {
|
|
@@ -1363,7 +1363,7 @@ const Re = (e) => {
|
|
|
1363
1363
|
}
|
|
1364
1364
|
}), Ye = ({
|
|
1365
1365
|
title: e,
|
|
1366
|
-
show:
|
|
1366
|
+
show: a,
|
|
1367
1367
|
treeKey: l,
|
|
1368
1368
|
fixed: u
|
|
1369
1369
|
}, {
|
|
@@ -1372,31 +1372,31 @@ const Re = (e) => {
|
|
|
1372
1372
|
const {
|
|
1373
1373
|
cacheColumns: i,
|
|
1374
1374
|
settingsAction: d
|
|
1375
|
-
} =
|
|
1376
|
-
return
|
|
1375
|
+
} = he();
|
|
1376
|
+
return a ? r(ie, {
|
|
1377
1377
|
title: e
|
|
1378
1378
|
}, {
|
|
1379
1379
|
default: () => {
|
|
1380
|
-
var
|
|
1380
|
+
var h;
|
|
1381
1381
|
return [r("span", {
|
|
1382
1382
|
onClick: (C) => {
|
|
1383
|
-
var c, g,
|
|
1383
|
+
var c, g, m;
|
|
1384
1384
|
C.stopPropagation(), C.preventDefault();
|
|
1385
1385
|
const p = ((g = (c = S(i)) == null ? void 0 : c.find((x) => x.uuid === l)) == null ? void 0 : g.key) || "", v = (d == null ? void 0 : d.columnsMap[p]) || {};
|
|
1386
|
-
if (typeof v.disable == "boolean" ? v.disable : (
|
|
1387
|
-
const
|
|
1386
|
+
if (typeof v.disable == "boolean" ? v.disable : (m = v.disable) == null ? void 0 : m.icon) return;
|
|
1387
|
+
const n = {
|
|
1388
1388
|
...d == null ? void 0 : d.columnsMap,
|
|
1389
1389
|
[p]: {
|
|
1390
1390
|
...v,
|
|
1391
1391
|
fixed: u
|
|
1392
1392
|
}
|
|
1393
1393
|
};
|
|
1394
|
-
d == null || d.setColumnsMap(
|
|
1394
|
+
d == null || d.setColumnsMap(n, "fixed");
|
|
1395
1395
|
}
|
|
1396
|
-
}, [(
|
|
1396
|
+
}, [(h = o.default) == null ? void 0 : h.call(o)])];
|
|
1397
1397
|
}
|
|
1398
1398
|
}) : null;
|
|
1399
|
-
},
|
|
1399
|
+
}, la = /* @__PURE__ */ se({
|
|
1400
1400
|
props: {
|
|
1401
1401
|
treeKey: String,
|
|
1402
1402
|
hashId: String,
|
|
@@ -1407,10 +1407,10 @@ const Re = (e) => {
|
|
|
1407
1407
|
},
|
|
1408
1408
|
setup(e) {
|
|
1409
1409
|
const {
|
|
1410
|
-
cacheColumns:
|
|
1411
|
-
} =
|
|
1410
|
+
cacheColumns: a
|
|
1411
|
+
} = he(), l = T(() => {
|
|
1412
1412
|
var o, i;
|
|
1413
|
-
return ((i = (o = S(
|
|
1413
|
+
return ((i = (o = S(a)) == null ? void 0 : o.find((d) => d.uuid === e.treeKey)) == null ? void 0 : i.key) || "";
|
|
1414
1414
|
}), u = T(() => l.value === "action" && e.autoScroll);
|
|
1415
1415
|
return () => {
|
|
1416
1416
|
const o = r("span", {
|
|
@@ -1421,21 +1421,21 @@ const Re = (e) => {
|
|
|
1421
1421
|
title: "固定在列首",
|
|
1422
1422
|
show: e.fixed !== "left" && !u.value
|
|
1423
1423
|
}, {
|
|
1424
|
-
default: () => [r(
|
|
1424
|
+
default: () => [r(il, null, null)]
|
|
1425
1425
|
}), r(Ye, {
|
|
1426
1426
|
treeKey: e.treeKey || "",
|
|
1427
1427
|
fixed: void 0,
|
|
1428
1428
|
title: "不固定",
|
|
1429
1429
|
show: !!e.fixed && !u.value
|
|
1430
1430
|
}, {
|
|
1431
|
-
default: () => [r(
|
|
1431
|
+
default: () => [r(sl, null, null)]
|
|
1432
1432
|
}), r(Ye, {
|
|
1433
1433
|
treeKey: e.treeKey || "",
|
|
1434
1434
|
fixed: "right",
|
|
1435
1435
|
title: "固定在列尾",
|
|
1436
1436
|
show: e.fixed !== "right"
|
|
1437
1437
|
}, {
|
|
1438
|
-
default: () => [r(
|
|
1438
|
+
default: () => [r(ol, null, null)]
|
|
1439
1439
|
})]);
|
|
1440
1440
|
return r("span", {
|
|
1441
1441
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1445,7 +1445,7 @@ const Re = (e) => {
|
|
|
1445
1445
|
}, [e.title]), o]);
|
|
1446
1446
|
};
|
|
1447
1447
|
}
|
|
1448
|
-
}), Le = /* @__PURE__ */
|
|
1448
|
+
}), Le = /* @__PURE__ */ se({
|
|
1449
1449
|
props: {
|
|
1450
1450
|
list: Array,
|
|
1451
1451
|
keys: Array,
|
|
@@ -1460,110 +1460,110 @@ const Re = (e) => {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
},
|
|
1462
1462
|
setup(e) {
|
|
1463
|
-
const
|
|
1463
|
+
const a = D(We().uuid(15)), l = T(() => e.list && e.list.length > 0), u = D([]), o = D([]), {
|
|
1464
1464
|
cacheColumns: i,
|
|
1465
1465
|
slots: d,
|
|
1466
|
-
settingsAction:
|
|
1467
|
-
} =
|
|
1466
|
+
settingsAction: h
|
|
1467
|
+
} = he(), C = (n, c) => n.map(({
|
|
1468
1468
|
key: g,
|
|
1469
|
-
children:
|
|
1469
|
+
children: m,
|
|
1470
1470
|
uuid: x,
|
|
1471
|
-
...
|
|
1471
|
+
...I
|
|
1472
1472
|
}) => {
|
|
1473
|
-
var
|
|
1474
|
-
const R = (
|
|
1473
|
+
var Y;
|
|
1474
|
+
const R = (h == null ? void 0 : h.columnsMap[g || "null"]) || {
|
|
1475
1475
|
show: !0
|
|
1476
1476
|
};
|
|
1477
|
-
let
|
|
1478
|
-
R.show !== !1 && (c == null ? void 0 : c.show) !== !1 && !
|
|
1479
|
-
const
|
|
1477
|
+
let k = !1;
|
|
1478
|
+
R.show !== !1 && (c == null ? void 0 : c.show) !== !1 && !m && (k = !0);
|
|
1479
|
+
const A = {
|
|
1480
1480
|
key: x || "",
|
|
1481
|
-
...Ee(
|
|
1482
|
-
checked:
|
|
1481
|
+
...Ee(I, ["dataIndex"]),
|
|
1482
|
+
checked: k,
|
|
1483
1483
|
selectable: !1,
|
|
1484
1484
|
disabled: R.disable === !0,
|
|
1485
|
-
disableCheckbox: typeof R.disable == "boolean" ? R.disable : (
|
|
1485
|
+
disableCheckbox: typeof R.disable == "boolean" ? R.disable : (Y = R.disable) == null ? void 0 : Y.checkbox,
|
|
1486
1486
|
isLeaf: !0
|
|
1487
1487
|
};
|
|
1488
|
-
return
|
|
1488
|
+
return m && (A.children = C(m, R)), A;
|
|
1489
1489
|
});
|
|
1490
1490
|
Pe(() => {
|
|
1491
|
-
const
|
|
1492
|
-
u.value =
|
|
1491
|
+
const n = C(e.list || []);
|
|
1492
|
+
u.value = n, o.value = n.filter((c) => c.checked).map((c) => c.key), (h == null ? void 0 : h.operationType.value) === "fixed" && (a.value = We().uuid(15));
|
|
1493
1493
|
});
|
|
1494
|
-
const p = Re((
|
|
1495
|
-
var
|
|
1496
|
-
const
|
|
1497
|
-
...
|
|
1498
|
-
}, R = [...
|
|
1499
|
-
if (
|
|
1494
|
+
const p = Re((n, c, g) => {
|
|
1495
|
+
var H, oe;
|
|
1496
|
+
const m = ((H = S(i).find((j) => j.uuid === n)) == null ? void 0 : H.key) || "", x = ((oe = S(i).find((j) => j.uuid === c)) == null ? void 0 : oe.key) || "", I = {
|
|
1497
|
+
...h == null ? void 0 : h.columnsMap
|
|
1498
|
+
}, R = [...h.sortKeyColumns.value], k = R.findIndex((j) => j === m), A = R.findIndex((j) => j === x), Y = g > k;
|
|
1499
|
+
if (k < 0)
|
|
1500
1500
|
return;
|
|
1501
|
-
const E = R[
|
|
1502
|
-
R.splice(
|
|
1503
|
-
|
|
1504
|
-
...
|
|
1505
|
-
order:
|
|
1501
|
+
const E = R[k];
|
|
1502
|
+
R.splice(k, 1), g === 0 ? R.unshift(E) : R.splice(Y ? A : A + 1, 0, E), R.forEach((j, ee) => {
|
|
1503
|
+
I[j] = {
|
|
1504
|
+
...I[j] || {},
|
|
1505
|
+
order: ee
|
|
1506
1506
|
};
|
|
1507
|
-
}),
|
|
1508
|
-
}), v = Re((
|
|
1507
|
+
}), h == null || h.setColumnsMap(I, "drop"), h == null || h.setSortKeyColumns(R);
|
|
1508
|
+
}), v = Re((n) => {
|
|
1509
1509
|
var R;
|
|
1510
|
-
const c =
|
|
1511
|
-
...(
|
|
1510
|
+
const c = n.node.key, g = ((R = S(i).find((k) => k.uuid === c)) == null ? void 0 : R.key) || "", x = {
|
|
1511
|
+
...(h == null ? void 0 : h.columnsMap[g]) || {}
|
|
1512
1512
|
};
|
|
1513
|
-
x.show =
|
|
1514
|
-
const
|
|
1515
|
-
...
|
|
1513
|
+
x.show = n.checked;
|
|
1514
|
+
const I = {
|
|
1515
|
+
...h == null ? void 0 : h.columnsMap,
|
|
1516
1516
|
[g]: x
|
|
1517
1517
|
};
|
|
1518
|
-
|
|
1519
|
-
}), s = (
|
|
1520
|
-
const c = S(i).find((g) => g.uuid ===
|
|
1521
|
-
return
|
|
1518
|
+
h == null || h.setColumnsMap(I, "show");
|
|
1519
|
+
}), s = (n) => {
|
|
1520
|
+
const c = S(i).find((g) => g.uuid === n.key);
|
|
1521
|
+
return n.title || tl(d, "headerCell", {
|
|
1522
1522
|
title: c.title,
|
|
1523
1523
|
column: c
|
|
1524
1524
|
}, () => [c.title]);
|
|
1525
1525
|
};
|
|
1526
1526
|
return () => {
|
|
1527
|
-
var
|
|
1527
|
+
var n, c;
|
|
1528
1528
|
return l.value ? r(Ne, null, [e.showTitle && r("span", {
|
|
1529
1529
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1530
|
-
}, [e.title]), r(
|
|
1531
|
-
key:
|
|
1532
|
-
draggable: e.draggable && !!((
|
|
1530
|
+
}, [e.title]), r(Sl, {
|
|
1531
|
+
key: a.value,
|
|
1532
|
+
draggable: e.draggable && !!((n = u.value) != null && n.length) && ((c = u.value) == null ? void 0 : c.length) > 1,
|
|
1533
1533
|
checkable: e.checkable,
|
|
1534
1534
|
blockNode: !0,
|
|
1535
1535
|
showLine: !1,
|
|
1536
1536
|
checkedKeys: o.value,
|
|
1537
1537
|
height: 280,
|
|
1538
1538
|
onDrop: (g) => {
|
|
1539
|
-
const
|
|
1540
|
-
dropPosition:
|
|
1539
|
+
const m = g.node.key, x = g.dragNode.key, {
|
|
1540
|
+
dropPosition: I,
|
|
1541
1541
|
dropToGap: R
|
|
1542
|
-
} = g,
|
|
1543
|
-
p(x,
|
|
1542
|
+
} = g, k = I === -1 || !R ? I + 1 : I;
|
|
1543
|
+
p(x, m, k);
|
|
1544
1544
|
},
|
|
1545
|
-
onCheck: (g,
|
|
1545
|
+
onCheck: (g, m) => v(m),
|
|
1546
1546
|
treeData: u.value
|
|
1547
1547
|
}, {
|
|
1548
1548
|
title: (g) => {
|
|
1549
1549
|
var x;
|
|
1550
|
-
const
|
|
1550
|
+
const m = {
|
|
1551
1551
|
...g,
|
|
1552
1552
|
children: void 0,
|
|
1553
1553
|
title: s(g),
|
|
1554
|
-
autoScroll: (x =
|
|
1554
|
+
autoScroll: (x = h == null ? void 0 : h.autoScroll) == null ? void 0 : x.value
|
|
1555
1555
|
};
|
|
1556
|
-
return r(
|
|
1556
|
+
return r(la, U({
|
|
1557
1557
|
hashId: e.hashId,
|
|
1558
1558
|
className: e.className
|
|
1559
|
-
},
|
|
1560
|
-
treeKey:
|
|
1559
|
+
}, m, {
|
|
1560
|
+
treeKey: m.key
|
|
1561
1561
|
}), null);
|
|
1562
1562
|
}
|
|
1563
1563
|
})]) : null;
|
|
1564
1564
|
};
|
|
1565
1565
|
}
|
|
1566
|
-
}),
|
|
1566
|
+
}), aa = /* @__PURE__ */ se({
|
|
1567
1567
|
props: {
|
|
1568
1568
|
hashId: String,
|
|
1569
1569
|
className: String,
|
|
@@ -1572,18 +1572,18 @@ const Re = (e) => {
|
|
|
1572
1572
|
},
|
|
1573
1573
|
setup(e) {
|
|
1574
1574
|
const {
|
|
1575
|
-
columns:
|
|
1576
|
-
} =
|
|
1577
|
-
|
|
1575
|
+
columns: a
|
|
1576
|
+
} = he(), l = D([]), u = D([]), o = D([]), i = D([]);
|
|
1577
|
+
W(() => a.value, (C) => {
|
|
1578
1578
|
l.value = [], u.value = [], o.value = [], C.forEach((p) => {
|
|
1579
1579
|
if (p.hideInSetting)
|
|
1580
1580
|
return;
|
|
1581
1581
|
const {
|
|
1582
1582
|
fixed: v,
|
|
1583
1583
|
show: s,
|
|
1584
|
-
uuid:
|
|
1584
|
+
uuid: n
|
|
1585
1585
|
} = p;
|
|
1586
|
-
if ((s || s === void 0) &&
|
|
1586
|
+
if ((s || s === void 0) && n && i.value.push(n), v === "left") {
|
|
1587
1587
|
u.value.push(p);
|
|
1588
1588
|
return;
|
|
1589
1589
|
}
|
|
@@ -1596,12 +1596,12 @@ const Re = (e) => {
|
|
|
1596
1596
|
}, {
|
|
1597
1597
|
immediate: !0
|
|
1598
1598
|
});
|
|
1599
|
-
const d = T(() => l.value && l.value.length > 0),
|
|
1599
|
+
const d = T(() => l.value && l.value.length > 0), h = T(() => u.value && u.value.length > 0);
|
|
1600
1600
|
return () => r("div", {
|
|
1601
1601
|
class: {
|
|
1602
1602
|
[`${e.hashId}`]: !0,
|
|
1603
1603
|
[`${e.className}-list`]: !0,
|
|
1604
|
-
[`${e.className}-list-group`]: d.value ||
|
|
1604
|
+
[`${e.className}-list-group`]: d.value || h.value
|
|
1605
1605
|
}
|
|
1606
1606
|
}, [r(Le, {
|
|
1607
1607
|
title: "固定在左侧",
|
|
@@ -1618,7 +1618,7 @@ const Re = (e) => {
|
|
|
1618
1618
|
draggable: e.draggable,
|
|
1619
1619
|
checkable: e.checkable,
|
|
1620
1620
|
title: "不固定",
|
|
1621
|
-
showTitle:
|
|
1621
|
+
showTitle: h.value || d.value,
|
|
1622
1622
|
className: e.className
|
|
1623
1623
|
}, null), r(Le, {
|
|
1624
1624
|
title: "固定在右侧",
|
|
@@ -1630,7 +1630,7 @@ const Re = (e) => {
|
|
|
1630
1630
|
className: e.className
|
|
1631
1631
|
}, null)]);
|
|
1632
1632
|
}
|
|
1633
|
-
}),
|
|
1633
|
+
}), na = /* @__PURE__ */ se({
|
|
1634
1634
|
props: {
|
|
1635
1635
|
draggable: {
|
|
1636
1636
|
type: Boolean,
|
|
@@ -1644,32 +1644,32 @@ const Re = (e) => {
|
|
|
1644
1644
|
extra: [Function, Object, String, Boolean]
|
|
1645
1645
|
},
|
|
1646
1646
|
setup(e) {
|
|
1647
|
-
const
|
|
1647
|
+
const a = Ge({
|
|
1648
1648
|
suffixCls: "table-column-setting",
|
|
1649
1649
|
isPor: !0
|
|
1650
1650
|
}), {
|
|
1651
1651
|
wrapSSR: l,
|
|
1652
1652
|
hashId: u
|
|
1653
|
-
} = ze("ColumnSetting", [
|
|
1653
|
+
} = ze("ColumnSetting", [ta], a), {
|
|
1654
1654
|
columns: o,
|
|
1655
1655
|
settingsAction: i
|
|
1656
|
-
} =
|
|
1657
|
-
const
|
|
1656
|
+
} = he(), d = Re((s = !0) => {
|
|
1657
|
+
const n = {}, c = (g) => {
|
|
1658
1658
|
g.forEach(({
|
|
1659
|
-
key:
|
|
1659
|
+
key: m,
|
|
1660
1660
|
fixed: x,
|
|
1661
|
-
index:
|
|
1661
|
+
index: I,
|
|
1662
1662
|
children: R
|
|
1663
1663
|
}) => {
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1664
|
+
const k = vt(m, I);
|
|
1665
|
+
k && (n[k] = {
|
|
1666
1666
|
show: s,
|
|
1667
1667
|
fixed: x
|
|
1668
1668
|
}), R && c(R);
|
|
1669
1669
|
});
|
|
1670
1670
|
};
|
|
1671
|
-
c(o.value), i == null || i.setColumnsMap(
|
|
1672
|
-
}),
|
|
1671
|
+
c(o.value), i == null || i.setColumnsMap(n, "show");
|
|
1672
|
+
}), h = Re((s) => {
|
|
1673
1673
|
s.target.checked ? d() : d(!1);
|
|
1674
1674
|
}), C = Re(() => {
|
|
1675
1675
|
i == null || i.setColumnsMap(i == null ? void 0 : i.cacheColumnsMap, "fixed");
|
|
@@ -1677,65 +1677,65 @@ const Re = (e) => {
|
|
|
1677
1677
|
// @ts-ignore
|
|
1678
1678
|
Object.values(i == null ? void 0 : i.columnsMap).filter((s) => !s || s.show === !1)
|
|
1679
1679
|
)), v = T(() => S(p).length > 0 && S(p).length !== o.value.length);
|
|
1680
|
-
return () => l(r(
|
|
1680
|
+
return () => l(r(Cl, {
|
|
1681
1681
|
arrowPointAtCenter: !0,
|
|
1682
1682
|
title: r("div", {
|
|
1683
|
-
class: [`${
|
|
1684
|
-
}, [r(
|
|
1683
|
+
class: [`${a}-title`, u.value]
|
|
1684
|
+
}, [r(xl, {
|
|
1685
1685
|
indeterminate: v.value,
|
|
1686
1686
|
checked: S(p).length === 0 && S(p).length !== o.value.length,
|
|
1687
|
-
onChange: (s) =>
|
|
1687
|
+
onChange: (s) => h(s)
|
|
1688
1688
|
}, {
|
|
1689
1689
|
default: () => [Fe("列展示")]
|
|
1690
1690
|
}), e.checkedReset ? r("a", {
|
|
1691
1691
|
onClick: C,
|
|
1692
|
-
class: [`${
|
|
1693
|
-
}, [Fe("重置")]) : null, e != null && e.extra ? r(
|
|
1692
|
+
class: [`${a}-action-rest-button`, u.value]
|
|
1693
|
+
}, [Fe("重置")]) : null, e != null && e.extra ? r(de, {
|
|
1694
1694
|
size: 12,
|
|
1695
1695
|
align: "center"
|
|
1696
1696
|
}, {
|
|
1697
1697
|
default: () => [e.extra]
|
|
1698
1698
|
}) : null]),
|
|
1699
|
-
overlayClassName: `${
|
|
1699
|
+
overlayClassName: `${a}-overlay ${u.value}`,
|
|
1700
1700
|
trigger: "click",
|
|
1701
1701
|
placement: "bottomRight",
|
|
1702
|
-
content: r(
|
|
1702
|
+
content: r(aa, {
|
|
1703
1703
|
hashId: u.value,
|
|
1704
1704
|
checkable: e.checkable ?? !0,
|
|
1705
1705
|
draggable: e.draggable ?? !0,
|
|
1706
|
-
className:
|
|
1706
|
+
className: a
|
|
1707
1707
|
}, null)
|
|
1708
1708
|
}, {
|
|
1709
|
-
default: () => [r(
|
|
1709
|
+
default: () => [r(ie, {
|
|
1710
1710
|
title: "列设置"
|
|
1711
1711
|
}, {
|
|
1712
1712
|
default: () => [r(Ct, null, null)]
|
|
1713
1713
|
})]
|
|
1714
1714
|
}));
|
|
1715
1715
|
}
|
|
1716
|
-
}), $t = /* @__PURE__ */
|
|
1716
|
+
}), $t = /* @__PURE__ */ se({
|
|
1717
1717
|
setup() {
|
|
1718
1718
|
const {
|
|
1719
1719
|
isFullscreen: e
|
|
1720
1720
|
} = xt();
|
|
1721
|
-
return () => e.value ? r(
|
|
1721
|
+
return () => e.value ? r(ie, {
|
|
1722
1722
|
title: "退出全屏"
|
|
1723
1723
|
}, {
|
|
1724
|
-
default: () => [r(
|
|
1725
|
-
}) : r(
|
|
1724
|
+
default: () => [r(rl, null, null)]
|
|
1725
|
+
}) : r(ie, {
|
|
1726
1726
|
title: "全屏"
|
|
1727
1727
|
}, {
|
|
1728
|
-
default: () => [r(
|
|
1728
|
+
default: () => [r(cl, null, null)]
|
|
1729
1729
|
});
|
|
1730
1730
|
}
|
|
1731
|
-
}),
|
|
1731
|
+
}), ua = () => {
|
|
1732
1732
|
const {
|
|
1733
1733
|
action: e,
|
|
1734
|
-
tableSize:
|
|
1735
|
-
} =
|
|
1736
|
-
return r(
|
|
1734
|
+
tableSize: a
|
|
1735
|
+
} = he();
|
|
1736
|
+
return r(wl, {
|
|
1737
1737
|
overlay: r(ke, {
|
|
1738
|
-
selectedKeys: [
|
|
1738
|
+
selectedKeys: [a.value],
|
|
1739
1739
|
onClick: ({
|
|
1740
1740
|
key: l
|
|
1741
1741
|
}) => {
|
|
@@ -1762,13 +1762,13 @@ const Re = (e) => {
|
|
|
1762
1762
|
}),
|
|
1763
1763
|
trigger: ["click"]
|
|
1764
1764
|
}, {
|
|
1765
|
-
default: () => [r(
|
|
1765
|
+
default: () => [r(ie, {
|
|
1766
1766
|
title: "表格密度"
|
|
1767
1767
|
}, {
|
|
1768
|
-
default: () => [r(
|
|
1768
|
+
default: () => [r(dl, null, null)]
|
|
1769
1769
|
})]
|
|
1770
1770
|
});
|
|
1771
|
-
},
|
|
1771
|
+
}, ia = (e) => ({
|
|
1772
1772
|
[`${e.componentCls}`]: {
|
|
1773
1773
|
lineHeight: 1,
|
|
1774
1774
|
"&-container": {
|
|
@@ -1811,22 +1811,22 @@ const Re = (e) => {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
});
|
|
1813
1813
|
function ht(e) {
|
|
1814
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1814
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
|
|
1815
1815
|
}
|
|
1816
1816
|
const {
|
|
1817
|
-
useBreakpoint:
|
|
1817
|
+
useBreakpoint: sa
|
|
1818
1818
|
} = Ue;
|
|
1819
|
-
function
|
|
1820
|
-
if (
|
|
1819
|
+
function oa(e) {
|
|
1820
|
+
if (xe(e))
|
|
1821
1821
|
return e;
|
|
1822
1822
|
if (e) {
|
|
1823
|
-
const
|
|
1823
|
+
const a = e, {
|
|
1824
1824
|
icon: l,
|
|
1825
1825
|
tooltip: u,
|
|
1826
1826
|
onClick: o,
|
|
1827
1827
|
key: i
|
|
1828
|
-
} =
|
|
1829
|
-
return l && u ? r(
|
|
1828
|
+
} = a;
|
|
1829
|
+
return l && u ? r(ie, {
|
|
1830
1830
|
title: u
|
|
1831
1831
|
}, {
|
|
1832
1832
|
default: () => [r("span", {
|
|
@@ -1839,64 +1839,64 @@ function ra(e) {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
return null;
|
|
1841
1841
|
}
|
|
1842
|
-
const Ft = /* @__PURE__ */
|
|
1842
|
+
const Ft = /* @__PURE__ */ se({
|
|
1843
1843
|
props: {
|
|
1844
|
-
actions:
|
|
1844
|
+
actions: ge.toolBarBtn,
|
|
1845
1845
|
settings: [Array],
|
|
1846
|
-
titleTip:
|
|
1846
|
+
titleTip: ge.titleTip,
|
|
1847
1847
|
prefixCls: String,
|
|
1848
|
-
headerTitle:
|
|
1849
|
-
titleTipText:
|
|
1850
|
-
optionsExtra:
|
|
1848
|
+
headerTitle: ge.headerTitle,
|
|
1849
|
+
titleTipText: ge.titleTipText,
|
|
1850
|
+
optionsExtra: ge.optionsExtra
|
|
1851
1851
|
},
|
|
1852
1852
|
setup(e) {
|
|
1853
1853
|
const {
|
|
1854
|
-
wrapSSR:
|
|
1854
|
+
wrapSSR: a,
|
|
1855
1855
|
hashId: l
|
|
1856
|
-
} = ze("ListToolBar", [
|
|
1856
|
+
} = ze("ListToolBar", [ia], e.prefixCls), u = sa(), {
|
|
1857
1857
|
isMobile: o
|
|
1858
|
-
} =
|
|
1859
|
-
var
|
|
1860
|
-
return !!(e.titleTip || e.headerTitle || (
|
|
1858
|
+
} = he(), i = T(() => {
|
|
1859
|
+
var n;
|
|
1860
|
+
return !!(e.titleTip || e.headerTitle || (n = e.actions) != null && n.length);
|
|
1861
1861
|
}), d = T(() => {
|
|
1862
|
-
var
|
|
1863
|
-
return !!((
|
|
1864
|
-
}),
|
|
1862
|
+
var n;
|
|
1863
|
+
return !!((n = e.settings) != null && n.length || e.optionsExtra);
|
|
1864
|
+
}), h = T(() => !!(e.titleTip || e.headerTitle)), C = T(() => {
|
|
1865
1865
|
var c;
|
|
1866
|
-
let
|
|
1867
|
-
return Array.isArray(e.actions) ? ((c = e.actions) == null ? void 0 : c.length) < 1 ? null : r(
|
|
1866
|
+
let n;
|
|
1867
|
+
return Array.isArray(e.actions) ? ((c = e.actions) == null ? void 0 : c.length) < 1 ? null : r(de, {
|
|
1868
1868
|
align: "center"
|
|
1869
|
-
}, ht(
|
|
1870
|
-
key:
|
|
1869
|
+
}, ht(n = e.actions.map((g, m) => xe(g) ? qe(g, {
|
|
1870
|
+
key: m,
|
|
1871
1871
|
...g == null ? void 0 : g.props
|
|
1872
1872
|
}) : r("template", {
|
|
1873
|
-
key:
|
|
1874
|
-
}, [g]))) ?
|
|
1875
|
-
default: () => [
|
|
1873
|
+
key: m
|
|
1874
|
+
}, [g]))) ? n : {
|
|
1875
|
+
default: () => [n]
|
|
1876
1876
|
}) : e.actions;
|
|
1877
1877
|
}), p = Me(() => !i.value && d.value ? r("div", {
|
|
1878
1878
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1879
|
-
}, null) :
|
|
1879
|
+
}, null) : h.value ? r(de, {
|
|
1880
1880
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1881
1881
|
}, {
|
|
1882
1882
|
default: () => [r("div", {
|
|
1883
1883
|
class: `${e.prefixCls}-title ${l.value}`
|
|
1884
|
-
}, [e.headerTitle, e.titleTip && r(
|
|
1884
|
+
}, [e.headerTitle, e.titleTip && r(ie, {
|
|
1885
1885
|
title: e.titleTipText
|
|
1886
1886
|
}, {
|
|
1887
|
-
default: () => [
|
|
1887
|
+
default: () => [ue(e.titleTip) && e.titleTip ? r(fl, null, null) : e.titleTip]
|
|
1888
1888
|
})]), C.value && r("div", {
|
|
1889
1889
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
1890
1890
|
}, [C.value])]
|
|
1891
|
-
}) : r(
|
|
1891
|
+
}) : r(de, {
|
|
1892
1892
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1893
1893
|
}, {
|
|
1894
1894
|
default: () => [C.value && r("div", {
|
|
1895
1895
|
class: `${e.prefixCls}-actions`
|
|
1896
1896
|
}, [C.value])]
|
|
1897
|
-
}), [() => i.value, () => d.value, () =>
|
|
1898
|
-
let
|
|
1899
|
-
return d.value ? r(
|
|
1897
|
+
}), [() => i.value, () => d.value, () => h.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), v = Me(() => {
|
|
1898
|
+
let n;
|
|
1899
|
+
return d.value ? r(de, {
|
|
1900
1900
|
size: 16,
|
|
1901
1901
|
class: `${e.prefixCls}-right ${l.value}`,
|
|
1902
1902
|
align: u.value.lg ? "center" : "end",
|
|
@@ -1904,47 +1904,47 @@ const Ft = /* @__PURE__ */ ne({
|
|
|
1904
1904
|
}, {
|
|
1905
1905
|
default: () => {
|
|
1906
1906
|
var c;
|
|
1907
|
-
return [e.optionsExtra, (c = e.settings) != null && c.length ? r(
|
|
1907
|
+
return [e.optionsExtra, (c = e.settings) != null && c.length ? r(de, {
|
|
1908
1908
|
size: 12,
|
|
1909
1909
|
align: "center",
|
|
1910
1910
|
class: `${e.prefixCls}-setting-items`
|
|
1911
|
-
}, ht(
|
|
1912
|
-
const x =
|
|
1911
|
+
}, ht(n = e.settings.map((g, m) => {
|
|
1912
|
+
const x = oa(g);
|
|
1913
1913
|
return r("div", {
|
|
1914
|
-
key:
|
|
1914
|
+
key: m,
|
|
1915
1915
|
class: `${e.prefixCls}-setting-item`
|
|
1916
1916
|
}, [x]);
|
|
1917
|
-
})) ?
|
|
1918
|
-
default: () => [
|
|
1917
|
+
})) ? n : {
|
|
1918
|
+
default: () => [n]
|
|
1919
1919
|
}) : null];
|
|
1920
1920
|
}
|
|
1921
1921
|
}) : null;
|
|
1922
|
-
}, [() => u.value, () => d.value, () => e.prefixCls, () =>
|
|
1922
|
+
}, [() => u.value, () => d.value, () => e.prefixCls, () => h.value, () => C.value, () => e.settings]), s = Me(() => {
|
|
1923
1923
|
if (!d.value && !i.value) return null;
|
|
1924
|
-
const
|
|
1924
|
+
const n = {
|
|
1925
1925
|
[`${l.value}`]: !0,
|
|
1926
1926
|
[`${e.prefixCls}-container`]: !0,
|
|
1927
1927
|
[`${e.prefixCls}-container-mobile`]: o.value
|
|
1928
1928
|
};
|
|
1929
1929
|
return r("div", {
|
|
1930
|
-
class:
|
|
1930
|
+
class: n
|
|
1931
1931
|
}, [p.value, v.value]);
|
|
1932
1932
|
}, [() => o.value, () => i.value, () => d.value, () => p.value, () => e.prefixCls, () => v.value]);
|
|
1933
|
-
return () =>
|
|
1933
|
+
return () => a(r("div", {
|
|
1934
1934
|
class: `${e.prefixCls} ${l.value}`
|
|
1935
1935
|
}, [s.value]));
|
|
1936
1936
|
}
|
|
1937
1937
|
});
|
|
1938
1938
|
Ft.inheritAttrs = !1;
|
|
1939
|
-
function
|
|
1939
|
+
function ra() {
|
|
1940
1940
|
return {
|
|
1941
1941
|
reload: {
|
|
1942
1942
|
text: "刷新",
|
|
1943
|
-
icon: r(
|
|
1943
|
+
icon: r(hl, null, null)
|
|
1944
1944
|
},
|
|
1945
1945
|
density: {
|
|
1946
1946
|
text: "表格密度",
|
|
1947
|
-
icon: r(
|
|
1947
|
+
icon: r(ua, null, null)
|
|
1948
1948
|
},
|
|
1949
1949
|
setting: {
|
|
1950
1950
|
text: "列设置",
|
|
@@ -1956,15 +1956,15 @@ function ca() {
|
|
|
1956
1956
|
}
|
|
1957
1957
|
};
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function ca(e, a) {
|
|
1960
1960
|
return Object.keys(e).filter((l) => l).map((l) => {
|
|
1961
1961
|
const u = e[l];
|
|
1962
1962
|
if (!u)
|
|
1963
1963
|
return null;
|
|
1964
|
-
let o = u === !0 ?
|
|
1964
|
+
let o = u === !0 ? a[l] : () => u == null ? void 0 : u();
|
|
1965
1965
|
if (typeof o != "function" && (o = () => {
|
|
1966
1966
|
}), l === "setting")
|
|
1967
|
-
return r(
|
|
1967
|
+
return r(na, U(e[l], {
|
|
1968
1968
|
key: l
|
|
1969
1969
|
}), null);
|
|
1970
1970
|
if (l === "fullScreen")
|
|
@@ -1972,18 +1972,18 @@ function da(e, n) {
|
|
|
1972
1972
|
key: l,
|
|
1973
1973
|
onClick: o
|
|
1974
1974
|
}, [r($t, null, null)]);
|
|
1975
|
-
const i =
|
|
1975
|
+
const i = ra()[l];
|
|
1976
1976
|
return i ? r("span", {
|
|
1977
1977
|
key: l,
|
|
1978
1978
|
onClick: o
|
|
1979
|
-
}, [r(
|
|
1979
|
+
}, [r(ie, {
|
|
1980
1980
|
title: i.text
|
|
1981
1981
|
}, {
|
|
1982
1982
|
default: () => [i.icon]
|
|
1983
1983
|
})]) : null;
|
|
1984
1984
|
}).filter((l) => l);
|
|
1985
1985
|
}
|
|
1986
|
-
const
|
|
1986
|
+
const da = {
|
|
1987
1987
|
options: [Boolean, Object, Array],
|
|
1988
1988
|
titleTip: [Function, Boolean, Object, String],
|
|
1989
1989
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -1991,16 +1991,16 @@ const fa = {
|
|
|
1991
1991
|
titleTipText: [String],
|
|
1992
1992
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
1993
1993
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
1994
|
-
},
|
|
1995
|
-
props:
|
|
1994
|
+
}, fa = /* @__PURE__ */ se({
|
|
1995
|
+
props: da,
|
|
1996
1996
|
inheritAttrs: !1,
|
|
1997
1997
|
setup(e) {
|
|
1998
|
-
const
|
|
1998
|
+
const a = Ge({
|
|
1999
1999
|
suffixCls: "table-list-toolbar",
|
|
2000
2000
|
isPor: !0
|
|
2001
2001
|
}), {
|
|
2002
2002
|
action: l
|
|
2003
|
-
} =
|
|
2003
|
+
} = he(), u = Me(() => {
|
|
2004
2004
|
var d;
|
|
2005
2005
|
const o = {
|
|
2006
2006
|
reload: () => l == null ? void 0 : l.reload(),
|
|
@@ -2013,14 +2013,14 @@ const fa = {
|
|
|
2013
2013
|
...o,
|
|
2014
2014
|
...e.options
|
|
2015
2015
|
};
|
|
2016
|
-
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra),
|
|
2016
|
+
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), ca(i, {
|
|
2017
2017
|
...o
|
|
2018
2018
|
});
|
|
2019
2019
|
}, [() => l, () => e.options]);
|
|
2020
2020
|
return () => {
|
|
2021
2021
|
const o = e.toolBarBtn || [];
|
|
2022
2022
|
return r(Ft, {
|
|
2023
|
-
prefixCls:
|
|
2023
|
+
prefixCls: a,
|
|
2024
2024
|
optionsExtra: e.optionsExtra,
|
|
2025
2025
|
headerTitle: e.headerTitle,
|
|
2026
2026
|
actions: o,
|
|
@@ -2043,202 +2043,211 @@ const fa = {
|
|
|
2043
2043
|
backgroundColor: "transparent",
|
|
2044
2044
|
borderRadius: 2
|
|
2045
2045
|
}
|
|
2046
|
-
},
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
color: e.
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
"&-empty-text": {
|
|
2056
|
-
display: "flex",
|
|
2057
|
-
flexDirection: "column",
|
|
2058
|
-
alignItems: "center",
|
|
2059
|
-
justifyContent: "center"
|
|
2060
|
-
},
|
|
2061
|
-
"&-table-tree": {
|
|
2062
|
-
[`${e.antCls}-table-row-cell-ellipsis`]: {
|
|
2063
|
-
overflow: "hidden",
|
|
2064
|
-
textOverflow: "ellipsis",
|
|
2065
|
-
whiteSpace: "nowrap",
|
|
2066
|
-
[`${e.antCls}-table-column-title`]: {
|
|
2067
|
-
overflow: "hidden",
|
|
2068
|
-
textOverflow: "ellipsis",
|
|
2069
|
-
whiteSpace: "nowrap"
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
},
|
|
2073
|
-
"&-full-screen": {
|
|
2074
|
-
[`${e.componentCls}-content`]: {
|
|
2075
|
-
height: "100% !important",
|
|
2076
|
-
padding: 24,
|
|
2077
|
-
backgroundColor: e.colorWhite,
|
|
2078
|
-
boxShadow: "0 4px 8px #0003, 0 6px 20px #00000030 !important"
|
|
2079
|
-
}
|
|
2080
|
-
},
|
|
2081
|
-
"&-no-scroll": {
|
|
2082
|
-
[`${e.antCls}-table`]: {
|
|
2083
|
-
table: {
|
|
2084
|
-
width: "100% !important",
|
|
2085
|
-
minWidth: "unset"
|
|
2046
|
+
}, ha = (e) => {
|
|
2047
|
+
const a = `${e.antCls}-table`;
|
|
2048
|
+
return {
|
|
2049
|
+
[e.componentCls]: {
|
|
2050
|
+
"&-a": {
|
|
2051
|
+
cursor: "pointer",
|
|
2052
|
+
color: e.colorPrimary,
|
|
2053
|
+
"&:hover": {
|
|
2054
|
+
color: e.colorPrimaryHover
|
|
2086
2055
|
}
|
|
2087
2056
|
},
|
|
2088
|
-
[`${
|
|
2089
|
-
[`${
|
|
2090
|
-
|
|
2057
|
+
[`${a}`]: {
|
|
2058
|
+
[`${a}-cell-ellipsis`]: {
|
|
2059
|
+
overflow: "unset",
|
|
2060
|
+
whiteSpace: "unset"
|
|
2091
2061
|
}
|
|
2092
2062
|
},
|
|
2093
|
-
|
|
2094
|
-
"
|
|
2095
|
-
|
|
2063
|
+
"&-empty-text": {
|
|
2064
|
+
display: "flex",
|
|
2065
|
+
flexDirection: "column",
|
|
2066
|
+
alignItems: "center",
|
|
2067
|
+
justifyContent: "center"
|
|
2068
|
+
},
|
|
2069
|
+
"&-table-tree": {
|
|
2070
|
+
[`${e.antCls}-table-row-cell-ellipsis`]: {
|
|
2071
|
+
overflow: "hidden",
|
|
2072
|
+
textOverflow: "ellipsis",
|
|
2073
|
+
whiteSpace: "nowrap",
|
|
2074
|
+
[`${e.antCls}-table-column-title`]: {
|
|
2075
|
+
overflow: "hidden",
|
|
2076
|
+
textOverflow: "ellipsis",
|
|
2077
|
+
whiteSpace: "nowrap"
|
|
2078
|
+
}
|
|
2096
2079
|
}
|
|
2097
2080
|
},
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2081
|
+
"&-full-screen": {
|
|
2082
|
+
[`${e.componentCls}-content`]: {
|
|
2083
|
+
height: "100% !important",
|
|
2084
|
+
padding: 24,
|
|
2085
|
+
backgroundColor: e.colorWhite,
|
|
2086
|
+
boxShadow: "0 4px 8px #0003, 0 6px 20px #00000030 !important"
|
|
2101
2087
|
}
|
|
2102
|
-
}
|
|
2103
|
-
},
|
|
2104
|
-
"&-wrapper": {
|
|
2105
|
-
clear: "both",
|
|
2106
|
-
maxWidth: "100%",
|
|
2107
|
-
[`${e.componentCls}-pagination${e.antCls}-pagination`]: {
|
|
2108
|
-
margin: `${e.margin}px 0`
|
|
2109
2088
|
},
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2089
|
+
"&-no-scroll": {
|
|
2090
|
+
[`${e.antCls}-table`]: {
|
|
2091
|
+
table: {
|
|
2092
|
+
width: "100% !important",
|
|
2093
|
+
minWidth: "unset"
|
|
2094
|
+
}
|
|
2116
2095
|
},
|
|
2117
|
-
|
|
2118
|
-
|
|
2096
|
+
[`${e.antCls}-table-ping-right:not(${e.antCls}-table-has-fix-right)`]: {
|
|
2097
|
+
[`${e.antCls}-table-container::after`]: {
|
|
2098
|
+
boxShadow: "none"
|
|
2099
|
+
}
|
|
2119
2100
|
},
|
|
2120
|
-
|
|
2121
|
-
|
|
2101
|
+
[`${e.antCls}-table-bordered ${e.antCls}-table-fixed-left ${e.antCls}-table-thead > tr > th`]: {
|
|
2102
|
+
"&:last-child": {
|
|
2103
|
+
borderRight: 0
|
|
2104
|
+
}
|
|
2122
2105
|
},
|
|
2123
|
-
|
|
2124
|
-
|
|
2106
|
+
[`${e.antCls}-table-bordered ${e.antCls}-table-fixed-left ${e.antCls}-table-tbody > tr > td`]: {
|
|
2107
|
+
"&:last-child": {
|
|
2108
|
+
borderRight: 0
|
|
2109
|
+
}
|
|
2125
2110
|
}
|
|
2126
|
-
}
|
|
2127
|
-
},
|
|
2128
|
-
[`${e.componentCls}-copyable`]: {
|
|
2129
|
-
display: "flex",
|
|
2130
|
-
alignItems: "center",
|
|
2131
|
-
[`${e.componentCls}-copyable-icon`]: {
|
|
2132
|
-
marginLeft: 8,
|
|
2133
|
-
color: e.colorPrimary,
|
|
2134
|
-
cursor: "pointer"
|
|
2135
|
-
}
|
|
2136
|
-
},
|
|
2137
|
-
[`${e.componentCls}-ellipsis`]: {
|
|
2138
|
-
overflow: "hidden",
|
|
2139
|
-
textOverflow: "ellipsis",
|
|
2140
|
-
wordBreak: "break-word",
|
|
2141
|
-
whiteSpace: "nowrap"
|
|
2142
|
-
},
|
|
2143
|
-
[`${e.componentCls}-action-size`]: {
|
|
2144
|
-
display: "inline-block"
|
|
2145
|
-
},
|
|
2146
|
-
[`${e.componentCls}-action-columns`]: {
|
|
2147
|
-
display: "inline-block",
|
|
2148
|
-
[`${e.antCls}-popover-inner-content`]: {
|
|
2149
|
-
padding: "8px 0 8px 16px"
|
|
2150
|
-
},
|
|
2151
|
-
[`${e.antCls}-tree ${e.antCls}-tree-switcher-noop`]: {
|
|
2152
|
-
display: "none"
|
|
2153
2111
|
},
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
},
|
|
2160
|
-
"&:last-child": {
|
|
2161
|
-
paddingBottom: 4
|
|
2112
|
+
"&-wrapper": {
|
|
2113
|
+
clear: "both",
|
|
2114
|
+
maxWidth: "100%",
|
|
2115
|
+
[`${e.componentCls}-pagination${e.antCls}-pagination`]: {
|
|
2116
|
+
margin: `${e.margin}px 0`
|
|
2162
2117
|
},
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2118
|
+
[`${e.componentCls}-pagination`]: {
|
|
2119
|
+
display: "flex",
|
|
2120
|
+
flexWrap: "wrap",
|
|
2121
|
+
rowGap: e.paddingXS,
|
|
2122
|
+
"> *": {
|
|
2123
|
+
flex: "none"
|
|
2124
|
+
},
|
|
2125
|
+
"&-left": {
|
|
2126
|
+
justifyContent: "flex-start"
|
|
2127
|
+
},
|
|
2128
|
+
"&-center": {
|
|
2129
|
+
justifyContent: "center"
|
|
2130
|
+
},
|
|
2131
|
+
"&-right": {
|
|
2132
|
+
justifyContent: "flex-end"
|
|
2167
2133
|
}
|
|
2168
2134
|
}
|
|
2169
2135
|
},
|
|
2170
|
-
[`${e.
|
|
2171
|
-
flex: "1",
|
|
2172
|
-
"&:hover": {
|
|
2173
|
-
backgroundColor: "transparent"
|
|
2174
|
-
}
|
|
2175
|
-
},
|
|
2176
|
-
"&-popover-title": {
|
|
2136
|
+
[`${e.componentCls}-copyable`]: {
|
|
2177
2137
|
display: "flex",
|
|
2178
2138
|
alignItems: "center",
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
[`${e.antCls}-btn-sm`]: {
|
|
2184
|
-
padding: 0
|
|
2139
|
+
[`${e.componentCls}-copyable-icon`]: {
|
|
2140
|
+
marginLeft: 8,
|
|
2141
|
+
color: e.colorPrimary,
|
|
2142
|
+
cursor: "pointer"
|
|
2185
2143
|
}
|
|
2186
2144
|
},
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2145
|
+
[`${e.componentCls}-ellipsis`]: {
|
|
2146
|
+
overflow: "hidden",
|
|
2147
|
+
textOverflow: "ellipsis",
|
|
2148
|
+
wordBreak: "break-word",
|
|
2149
|
+
whiteSpace: "nowrap"
|
|
2192
2150
|
},
|
|
2193
|
-
|
|
2194
|
-
display: "
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
"
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2151
|
+
[`${e.componentCls}-action-size`]: {
|
|
2152
|
+
display: "inline-block"
|
|
2153
|
+
},
|
|
2154
|
+
[`${e.componentCls}-action-columns`]: {
|
|
2155
|
+
display: "inline-block",
|
|
2156
|
+
[`${e.antCls}-popover-inner-content`]: {
|
|
2157
|
+
padding: "8px 0 8px 16px"
|
|
2158
|
+
},
|
|
2159
|
+
[`${e.antCls}-tree ${e.antCls}-tree-switcher-noop`]: {
|
|
2160
|
+
display: "none"
|
|
2161
|
+
},
|
|
2162
|
+
[`${e.antCls}-tree > ${e.antCls}-tree-treenode`]: {
|
|
2163
|
+
width: "100%",
|
|
2164
|
+
alignItems: "center",
|
|
2165
|
+
"&:first-child": {
|
|
2166
|
+
paddingTop: 0
|
|
2203
2167
|
},
|
|
2204
|
-
"
|
|
2205
|
-
|
|
2206
|
-
|
|
2168
|
+
"&:last-child": {
|
|
2169
|
+
paddingBottom: 4
|
|
2170
|
+
},
|
|
2171
|
+
"&:hover": {
|
|
2172
|
+
backgroundColor: "#e6f7ff",
|
|
2173
|
+
[`${e.componentCls}-action-columns-list-item-actions`]: {
|
|
2174
|
+
display: "block"
|
|
2207
2175
|
}
|
|
2176
|
+
}
|
|
2177
|
+
},
|
|
2178
|
+
[`${e.antCls}-tree ${e.antCls}-tree-node-content-wrapper`]: {
|
|
2179
|
+
flex: "1",
|
|
2180
|
+
"&:hover": {
|
|
2181
|
+
backgroundColor: "transparent"
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
2184
|
+
"&-popover-title": {
|
|
2185
|
+
display: "flex",
|
|
2186
|
+
alignItems: "center",
|
|
2187
|
+
justifyContent: "space-between",
|
|
2188
|
+
"&-check": {
|
|
2189
|
+
marginRight: 8
|
|
2208
2190
|
},
|
|
2209
|
-
|
|
2210
|
-
|
|
2191
|
+
[`${e.antCls}-btn-sm`]: {
|
|
2192
|
+
padding: 0
|
|
2193
|
+
}
|
|
2194
|
+
},
|
|
2195
|
+
"&-list-group": {
|
|
2196
|
+
marginTop: 6,
|
|
2197
|
+
marginBottom: 6,
|
|
2198
|
+
fontSize: 12,
|
|
2199
|
+
color: "rgba(0, 0, 0, 0.45)"
|
|
2200
|
+
},
|
|
2201
|
+
"$-list-item": {
|
|
2202
|
+
display: "flex",
|
|
2203
|
+
alignItems: "center",
|
|
2204
|
+
justifyContent: "space-between",
|
|
2205
|
+
"&-actions": {
|
|
2206
|
+
display: "block",
|
|
2207
|
+
float: "right",
|
|
2208
|
+
cursor: "pointer",
|
|
2209
|
+
"> span + span": {
|
|
2210
|
+
marginLeft: 8
|
|
2211
|
+
},
|
|
2212
|
+
"&-disabled": {
|
|
2213
|
+
action: {
|
|
2214
|
+
color: "rgba(0, 0, 0, 0.25)"
|
|
2215
|
+
}
|
|
2216
|
+
},
|
|
2217
|
+
anticon: {
|
|
2218
|
+
color: e.colorPrimary
|
|
2219
|
+
}
|
|
2211
2220
|
}
|
|
2212
2221
|
}
|
|
2222
|
+
},
|
|
2223
|
+
// ant-class
|
|
2224
|
+
[`${e.antCls}-tooltip-inner`]: {
|
|
2225
|
+
a: {
|
|
2226
|
+
color: e.colorWhite
|
|
2227
|
+
}
|
|
2228
|
+
},
|
|
2229
|
+
[`${e.antCls}-table-content`]: Ve,
|
|
2230
|
+
[`${e.antCls}-table-body`]: Ve,
|
|
2231
|
+
[`${e.antCls}-table-empty`]: {
|
|
2232
|
+
[`${e.antCls}-table-content`]: Ve
|
|
2213
2233
|
}
|
|
2214
|
-
},
|
|
2215
|
-
// ant-class
|
|
2216
|
-
[`${e.antCls}-tooltip-inner`]: {
|
|
2217
|
-
a: {
|
|
2218
|
-
color: e.colorWhite
|
|
2219
|
-
}
|
|
2220
|
-
},
|
|
2221
|
-
[`${e.antCls}-table-content`]: Ve,
|
|
2222
|
-
[`${e.antCls}-table-body`]: Ve,
|
|
2223
|
-
[`${e.antCls}-table-empty`]: {
|
|
2224
|
-
[`${e.antCls}-table-content`]: Ve
|
|
2225
2234
|
}
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
useBreakpoint:
|
|
2229
|
-
} = Ue,
|
|
2235
|
+
};
|
|
2236
|
+
}, {
|
|
2237
|
+
useBreakpoint: ma
|
|
2238
|
+
} = Ue, va = {
|
|
2230
2239
|
reload: !0,
|
|
2231
2240
|
density: !0,
|
|
2232
2241
|
setting: !0,
|
|
2233
2242
|
fullScreen: !0
|
|
2234
|
-
}, He = /* @__PURE__ */
|
|
2243
|
+
}, He = /* @__PURE__ */ se({
|
|
2235
2244
|
name: "GProTable",
|
|
2236
2245
|
inheritAttrs: !1,
|
|
2237
|
-
props:
|
|
2246
|
+
props: ge,
|
|
2238
2247
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
|
|
2239
2248
|
slots: Object,
|
|
2240
2249
|
setup(e, {
|
|
2241
|
-
emit:
|
|
2250
|
+
emit: a,
|
|
2242
2251
|
slots: l,
|
|
2243
2252
|
attrs: u,
|
|
2244
2253
|
expose: o
|
|
@@ -2248,92 +2257,92 @@ const fa = {
|
|
|
2248
2257
|
isPor: !0
|
|
2249
2258
|
}), {
|
|
2250
2259
|
wrapSSR: d,
|
|
2251
|
-
hashId:
|
|
2252
|
-
} = ze("ProBaseTable", [
|
|
2260
|
+
hashId: h
|
|
2261
|
+
} = ze("ProBaseTable", [ha], i), C = ma(), {
|
|
2253
2262
|
width: p
|
|
2254
|
-
} =
|
|
2263
|
+
} = vl(), v = wt(), s = D(), n = D(), c = D(e.waitRequest);
|
|
2255
2264
|
Pe(() => c.value = e.waitRequest);
|
|
2256
2265
|
const {
|
|
2257
2266
|
toggle: g,
|
|
2258
|
-
isFullscreen:
|
|
2267
|
+
isFullscreen: m
|
|
2259
2268
|
} = xt(s), x = T(() => ({
|
|
2260
2269
|
...e
|
|
2261
|
-
})),
|
|
2262
|
-
var
|
|
2263
|
-
return e.virtualScroll &&
|
|
2264
|
-
}),
|
|
2265
|
-
const
|
|
2270
|
+
})), I = T(() => !C.value.xl), R = T(() => {
|
|
2271
|
+
var f, F;
|
|
2272
|
+
return e.virtualScroll && ll(!((f = e.scroll) != null && f.y), "参数scroll的Y值不能为空!"), !!((F = e.scroll) != null && F.y && e.virtualScroll);
|
|
2273
|
+
}), k = T(() => {
|
|
2274
|
+
const f = (e.columns || []).filter((F) => F.key || F.dataIndex).map((F) => ({
|
|
2266
2275
|
...F,
|
|
2267
2276
|
key: F.key || F.dataIndex,
|
|
2268
2277
|
align: F.align || e.align,
|
|
2269
2278
|
uuid: We().uuid(15)
|
|
2270
2279
|
}));
|
|
2271
|
-
return
|
|
2280
|
+
return qt(f, {
|
|
2272
2281
|
align: e.align || "left",
|
|
2273
2282
|
showIndex: e.showIndex || !1
|
|
2274
2283
|
});
|
|
2275
2284
|
}), {
|
|
2276
|
-
loadingComputed:
|
|
2277
|
-
loading:
|
|
2285
|
+
loadingComputed: A,
|
|
2286
|
+
loading: Y,
|
|
2278
2287
|
setLoading: E
|
|
2288
|
+
} = jl({
|
|
2289
|
+
emit: a,
|
|
2290
|
+
loading: le(e, "loading")
|
|
2291
|
+
}), {
|
|
2292
|
+
sizeRef: H,
|
|
2293
|
+
setTableSize: oe
|
|
2279
2294
|
} = Ml({
|
|
2280
|
-
emit:
|
|
2281
|
-
|
|
2295
|
+
emit: a,
|
|
2296
|
+
size: le(e, "size")
|
|
2282
2297
|
}), {
|
|
2283
|
-
|
|
2284
|
-
|
|
2298
|
+
paginationInfo: j,
|
|
2299
|
+
requestPagination: ee,
|
|
2300
|
+
setPagination: _
|
|
2285
2301
|
} = Nl({
|
|
2286
|
-
emit: n,
|
|
2287
|
-
size: Z(e, "size")
|
|
2288
|
-
}), {
|
|
2289
|
-
paginationInfo: D,
|
|
2290
|
-
requestPagination: Q,
|
|
2291
|
-
setPagination: W
|
|
2292
|
-
} = El({
|
|
2293
2302
|
slots: l,
|
|
2294
2303
|
props: x,
|
|
2295
|
-
pagination:
|
|
2296
|
-
}),
|
|
2304
|
+
pagination: le(e, "pagination")
|
|
2305
|
+
}), Se = Gl(e), {
|
|
2297
2306
|
proScroll: t,
|
|
2298
2307
|
breakpoint: b
|
|
2299
|
-
} =
|
|
2300
|
-
...
|
|
2308
|
+
} = ql({
|
|
2309
|
+
...Se,
|
|
2301
2310
|
innerWidth: p,
|
|
2302
|
-
columns:
|
|
2311
|
+
columns: k,
|
|
2303
2312
|
screens: C
|
|
2304
|
-
}),
|
|
2313
|
+
}), O = Wl(e), {
|
|
2305
2314
|
proColumns: y,
|
|
2306
2315
|
cacheProColumns: $,
|
|
2307
2316
|
setColumns: N,
|
|
2308
2317
|
changeColumns: z,
|
|
2309
2318
|
resizeColumnWidth: w
|
|
2310
|
-
} =
|
|
2311
|
-
...
|
|
2319
|
+
} = _l({
|
|
2320
|
+
...O,
|
|
2312
2321
|
breakpoint: b,
|
|
2313
2322
|
scroll: t,
|
|
2314
|
-
columns:
|
|
2323
|
+
columns: k
|
|
2315
2324
|
}), {
|
|
2316
2325
|
columnsMap: Ke,
|
|
2317
|
-
operationType:
|
|
2318
|
-
setColumnsMap:
|
|
2319
|
-
sortKeyColumns:
|
|
2320
|
-
cacheColumnsMap:
|
|
2321
|
-
setSortKeyColumns:
|
|
2322
|
-
} =
|
|
2326
|
+
operationType: Ie,
|
|
2327
|
+
setColumnsMap: re,
|
|
2328
|
+
sortKeyColumns: Be,
|
|
2329
|
+
cacheColumnsMap: we,
|
|
2330
|
+
setSortKeyColumns: X
|
|
2331
|
+
} = Hl({
|
|
2323
2332
|
columns: $,
|
|
2324
|
-
columnsState:
|
|
2333
|
+
columnsState: le(e, "columnsState"),
|
|
2325
2334
|
changeColumns: z
|
|
2326
2335
|
}), {
|
|
2327
|
-
formDataRef:
|
|
2336
|
+
formDataRef: ae,
|
|
2328
2337
|
formParamsRef: K,
|
|
2329
|
-
defaultParamsRef:
|
|
2330
|
-
setFormParams:
|
|
2331
|
-
} =
|
|
2332
|
-
search:
|
|
2333
|
-
searchMap:
|
|
2334
|
-
params:
|
|
2335
|
-
columns:
|
|
2336
|
-
setPagination:
|
|
2338
|
+
defaultParamsRef: me,
|
|
2339
|
+
setFormParams: G
|
|
2340
|
+
} = Vl({
|
|
2341
|
+
search: le(e, "search"),
|
|
2342
|
+
searchMap: le(e, "searchMap"),
|
|
2343
|
+
params: le(e, "params"),
|
|
2344
|
+
columns: k,
|
|
2345
|
+
setPagination: _
|
|
2337
2346
|
}), {
|
|
2338
2347
|
selectedKey: Xe,
|
|
2339
2348
|
selectedItem: Rt,
|
|
@@ -2342,21 +2351,21 @@ const fa = {
|
|
|
2342
2351
|
selectAllRowKey: Qe,
|
|
2343
2352
|
syncSelectedRows: Ze,
|
|
2344
2353
|
removeRowKeys: et,
|
|
2345
|
-
clearAllRowKeys:
|
|
2346
|
-
} =
|
|
2354
|
+
clearAllRowKeys: It
|
|
2355
|
+
} = zl(le(e, "rowKey"), le(e, "rowSelection")), Bt = Al(e), {
|
|
2347
2356
|
reload: Ae,
|
|
2348
2357
|
reSetDataList: Ot,
|
|
2349
2358
|
changeDataValue: kt,
|
|
2350
2359
|
isTreeDataRef: tt,
|
|
2351
|
-
dataSource:
|
|
2360
|
+
dataSource: Te,
|
|
2352
2361
|
handleTableChange: lt
|
|
2353
|
-
} =
|
|
2354
|
-
...
|
|
2362
|
+
} = Yl({
|
|
2363
|
+
...Bt,
|
|
2355
2364
|
waitRequest: c
|
|
2356
2365
|
}, {
|
|
2357
|
-
loading:
|
|
2358
|
-
paginationInfo:
|
|
2359
|
-
setPagination:
|
|
2366
|
+
loading: A,
|
|
2367
|
+
paginationInfo: j,
|
|
2368
|
+
setPagination: _,
|
|
2360
2369
|
removeRowKeys: et,
|
|
2361
2370
|
syncSelectedRows: Ze,
|
|
2362
2371
|
setLoading: E,
|
|
@@ -2364,254 +2373,259 @@ const fa = {
|
|
|
2364
2373
|
columns: y,
|
|
2365
2374
|
formParamsRef: K,
|
|
2366
2375
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2367
|
-
hasCustomRender: T(() =>
|
|
2368
|
-
},
|
|
2369
|
-
...
|
|
2370
|
-
...
|
|
2376
|
+
hasCustomRender: T(() => Ce(e.customRender || (l == null ? void 0 : l.customRender)))
|
|
2377
|
+
}, a), pe = T(() => e.options ? {
|
|
2378
|
+
...va,
|
|
2379
|
+
...Z(e.options) ? e.options : {}
|
|
2371
2380
|
} : !1), Dt = T(() => ({
|
|
2372
|
-
size: S(
|
|
2381
|
+
size: S(H),
|
|
2373
2382
|
scroll: S(t),
|
|
2374
|
-
dataSource: S(
|
|
2375
|
-
pagination: S(
|
|
2383
|
+
dataSource: S(Te),
|
|
2384
|
+
pagination: S(j),
|
|
2376
2385
|
virtualScroll: R.value,
|
|
2377
|
-
columns: S(y).filter((
|
|
2386
|
+
columns: S(y).filter((f) => f.show || f.show === void 0)
|
|
2378
2387
|
})), at = T(() => {
|
|
2379
|
-
var F,
|
|
2380
|
-
const
|
|
2381
|
-
return !
|
|
2382
|
-
spinning: e.showLoading ?
|
|
2383
|
-
...
|
|
2388
|
+
var F, P;
|
|
2389
|
+
const f = Z(e.loading) ? Ee(e.loading, "spinning") : {};
|
|
2390
|
+
return !f.indicator && ((F = v == null ? void 0 : v.indicator) != null && F.value) && (f.indicator = (P = v == null ? void 0 : v.indicator) == null ? void 0 : P.value), {
|
|
2391
|
+
spinning: e.showLoading ? Ce(Y.value) : !1,
|
|
2392
|
+
...f
|
|
2384
2393
|
};
|
|
2385
2394
|
}), nt = T(() => {
|
|
2386
|
-
var
|
|
2387
|
-
let
|
|
2388
|
-
const F = S(x).direction === "rtl" ? "bottomLeft" : "right",
|
|
2389
|
-
if (
|
|
2390
|
-
const
|
|
2391
|
-
!
|
|
2395
|
+
var M;
|
|
2396
|
+
let f;
|
|
2397
|
+
const F = S(x).direction === "rtl" ? "bottomLeft" : "right", P = (M = S(j)) == null ? void 0 : M.position;
|
|
2398
|
+
if (P !== null && Array.isArray(P)) {
|
|
2399
|
+
const B = P.find((V) => V.includes("top")), L = P.find((V) => V.includes("bottom")), te = P.every((V) => `${V}` == "none");
|
|
2400
|
+
!B && !L && !te && (f = F), B && (f = B.toLowerCase().replace("top", "")), L && (f = L.toLowerCase().replace("bottom", ""));
|
|
2392
2401
|
} else
|
|
2393
|
-
|
|
2394
|
-
return
|
|
2395
|
-
}), ut = async (
|
|
2402
|
+
f = F;
|
|
2403
|
+
return f;
|
|
2404
|
+
}), ut = async (f) => {
|
|
2396
2405
|
var F;
|
|
2397
|
-
|
|
2398
|
-
...
|
|
2406
|
+
Z(e.search) && ((F = e.search) != null && F.showSearch) ? (G({
|
|
2407
|
+
...f,
|
|
2399
2408
|
...e.params || {}
|
|
2400
|
-
}), await Ae()) :
|
|
2401
|
-
}, jt = async (
|
|
2402
|
-
F ? (
|
|
2403
|
-
}, it = (
|
|
2404
|
-
|
|
2405
|
-
}, Mt = (
|
|
2406
|
-
var
|
|
2407
|
-
|
|
2408
|
-
current:
|
|
2409
|
+
}), await Ae()) : G(f);
|
|
2410
|
+
}, jt = async (f, F) => {
|
|
2411
|
+
F ? (a("reset", f), e.request && await ut(f)) : e.request ? (a("submit", f), await ut(f)) : a("submit", f);
|
|
2412
|
+
}, it = (f, F, P, M) => {
|
|
2413
|
+
_(rt(f, ["current", "pageSize"])), lt(f, F, P, M);
|
|
2414
|
+
}, Mt = (f, F) => {
|
|
2415
|
+
var P;
|
|
2416
|
+
_({
|
|
2417
|
+
current: f,
|
|
2409
2418
|
pageSize: F
|
|
2410
2419
|
}), lt({
|
|
2411
|
-
current:
|
|
2420
|
+
current: f,
|
|
2412
2421
|
pageSize: F,
|
|
2413
|
-
total:
|
|
2422
|
+
total: j.value && ((P = j.value) == null ? void 0 : P.total) || 0
|
|
2414
2423
|
}, {}, {});
|
|
2415
|
-
}, Nt = (
|
|
2416
|
-
|
|
2417
|
-
}, Et = (
|
|
2418
|
-
|
|
2419
|
-
}, zt = (
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2424
|
+
}, Nt = (f) => {
|
|
2425
|
+
a("expandedRowsChange", f);
|
|
2426
|
+
}, Et = (f, F) => {
|
|
2427
|
+
a("expand", f, F);
|
|
2428
|
+
}, zt = (f, F) => w(f, F), Kt = (f, F, P) => {
|
|
2429
|
+
var L, te, V;
|
|
2430
|
+
const M = P.align === "center" ? "top" : P.align === "left" || !P.align ? "topLeft" : "topRight";
|
|
2431
|
+
let B = f;
|
|
2432
|
+
if (F) {
|
|
2433
|
+
const ce = r(ie, {
|
|
2434
|
+
title: f,
|
|
2435
|
+
placement: M,
|
|
2436
|
+
getPopupContainer: (J) => {
|
|
2437
|
+
var Q;
|
|
2438
|
+
return (Q = J == null ? void 0 : J.parentNode) == null ? void 0 : Q.parentNode;
|
|
2439
|
+
}
|
|
2440
|
+
}, {
|
|
2441
|
+
default: () => [tt.value ? f : r("div", {
|
|
2442
|
+
class: `${i}-ellipsis`
|
|
2443
|
+
}, [f])]
|
|
2444
|
+
});
|
|
2445
|
+
if (P.copyable) {
|
|
2446
|
+
const J = ye(f) ? typeof ((L = f == null ? void 0 : f[0]) == null ? void 0 : L.children) == "string" ? (te = f == null ? void 0 : f[0]) == null ? void 0 : te.children : "" : f.toString(), Q = typeof P.copyText == "function" ? (V = P.copyText) == null ? void 0 : V.call(P, P) : P.copyText || J;
|
|
2447
|
+
B = r("div", {
|
|
2448
|
+
class: `${i}-copyable`
|
|
2449
|
+
}, [ce, r(ml, {
|
|
2450
|
+
class: `${i}-copyable-icon`,
|
|
2451
|
+
onClick: () => {
|
|
2452
|
+
Dl(Q), $l.success("复制成功");
|
|
2453
|
+
}
|
|
2454
|
+
}, null)]);
|
|
2434
2455
|
}
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
placement: j
|
|
2438
|
-
}, {
|
|
2439
|
-
default: () => [tt.value ? m : r("div", {
|
|
2440
|
-
class: `${i}-ellipsis`
|
|
2441
|
-
}, [m])]
|
|
2442
|
-
}) : m;
|
|
2456
|
+
}
|
|
2457
|
+
return B;
|
|
2443
2458
|
};
|
|
2444
2459
|
function st() {
|
|
2445
|
-
var
|
|
2446
|
-
const
|
|
2447
|
-
if (
|
|
2448
|
-
const
|
|
2460
|
+
var P, M, B, L, te;
|
|
2461
|
+
const f = be(l, e, "emptyText");
|
|
2462
|
+
if (f !== !1 && ((P = v == null ? void 0 : v.emptyText) == null ? void 0 : P.value) !== !1) {
|
|
2463
|
+
const V = ((M = e.emptyTextProps) == null ? void 0 : M.extraProps) || {}, ce = f || ((B = v == null ? void 0 : v.emptyText) == null ? void 0 : B.value), J = xe(ce), Q = J ? bt(ce, V) : yt(ce || []);
|
|
2449
2464
|
return r("div", {
|
|
2450
|
-
class: je(`${i}-empty-text`,
|
|
2451
|
-
style: (
|
|
2452
|
-
}, [
|
|
2465
|
+
class: je(`${i}-empty-text`, h.value, (L = e.emptyTextProps) == null ? void 0 : L.class),
|
|
2466
|
+
style: (te = e.emptyTextProps) == null ? void 0 : te.style
|
|
2467
|
+
}, [J ? Q : ye(Q) ? Q.map((Oe) => qe(Oe, V)) : r(Fl, null, null)]);
|
|
2453
2468
|
}
|
|
2454
2469
|
return null;
|
|
2455
2470
|
}
|
|
2456
2471
|
const At = () => {
|
|
2457
2472
|
var F;
|
|
2458
|
-
const
|
|
2459
|
-
if (
|
|
2460
|
-
if ((F =
|
|
2461
|
-
const
|
|
2462
|
-
return
|
|
2463
|
-
dataSource:
|
|
2464
|
-
currentData:
|
|
2473
|
+
const f = mt(l, e, "customRender");
|
|
2474
|
+
if (f) {
|
|
2475
|
+
if ((F = Te.value) != null && F.length) {
|
|
2476
|
+
const P = ne(S(Te));
|
|
2477
|
+
return f == null ? void 0 : f({
|
|
2478
|
+
dataSource: P,
|
|
2479
|
+
currentData: kl(P, j.value)
|
|
2465
2480
|
});
|
|
2466
2481
|
}
|
|
2467
2482
|
return st();
|
|
2468
2483
|
}
|
|
2469
2484
|
return r(Ne, null, null);
|
|
2470
|
-
}, Yt = (
|
|
2471
|
-
var
|
|
2472
|
-
const F =
|
|
2473
|
-
return r(
|
|
2485
|
+
}, Yt = (f) => {
|
|
2486
|
+
var B, L;
|
|
2487
|
+
const F = be(l, e, "headerTitle"), P = be(l, e, "titleTip"), M = be(l, e, "toolBarBtn");
|
|
2488
|
+
return r(fa, {
|
|
2474
2489
|
headerTitle: F,
|
|
2475
|
-
titleTip:
|
|
2490
|
+
titleTip: P,
|
|
2476
2491
|
titleTipText: e.titleTipText,
|
|
2477
|
-
options:
|
|
2478
|
-
...
|
|
2479
|
-
setting:
|
|
2480
|
-
density:
|
|
2492
|
+
options: ue(pe.value) ? pe.value : {
|
|
2493
|
+
...pe.value,
|
|
2494
|
+
setting: f ? !1 : (B = pe.value) == null ? void 0 : B.setting,
|
|
2495
|
+
density: f ? !1 : (L = pe.value) == null ? void 0 : L.density
|
|
2481
2496
|
},
|
|
2482
|
-
settingExtra:
|
|
2483
|
-
optionsExtra:
|
|
2484
|
-
toolBarBtn:
|
|
2497
|
+
settingExtra: be(l, e, "settingExtra"),
|
|
2498
|
+
optionsExtra: be(l, e, "optionsExtra"),
|
|
2499
|
+
toolBarBtn: M
|
|
2485
2500
|
}, null);
|
|
2486
2501
|
};
|
|
2487
|
-
return
|
|
2488
|
-
tableSize:
|
|
2502
|
+
return Ul({
|
|
2503
|
+
tableSize: H,
|
|
2489
2504
|
columns: y,
|
|
2490
|
-
cacheColumns:
|
|
2491
|
-
isMobile:
|
|
2505
|
+
cacheColumns: k,
|
|
2506
|
+
isMobile: I,
|
|
2492
2507
|
action: {
|
|
2493
|
-
setTableSize:
|
|
2494
|
-
reload: (
|
|
2508
|
+
setTableSize: oe,
|
|
2509
|
+
reload: (f) => Ae(f),
|
|
2495
2510
|
toggle: g
|
|
2496
2511
|
},
|
|
2497
2512
|
settingsAction: {
|
|
2498
|
-
autoScroll:
|
|
2513
|
+
autoScroll: le(e, "autoScroll"),
|
|
2499
2514
|
columnsMap: Ke,
|
|
2500
|
-
operationType:
|
|
2501
|
-
setColumnsMap:
|
|
2502
|
-
sortKeyColumns:
|
|
2503
|
-
cacheColumnsMap:
|
|
2504
|
-
setSortKeyColumns:
|
|
2515
|
+
operationType: Ie,
|
|
2516
|
+
setColumnsMap: re,
|
|
2517
|
+
sortKeyColumns: Be,
|
|
2518
|
+
cacheColumnsMap: we,
|
|
2519
|
+
setSortKeyColumns: X
|
|
2505
2520
|
},
|
|
2506
|
-
setPagination:
|
|
2521
|
+
setPagination: _,
|
|
2507
2522
|
changeColumns: z,
|
|
2508
2523
|
slots: l
|
|
2509
2524
|
}), o({
|
|
2510
2525
|
formRef: () => ({
|
|
2511
2526
|
getFormState: () => S(K),
|
|
2512
2527
|
getFormInnerState: () => {
|
|
2513
|
-
var
|
|
2514
|
-
return ((
|
|
2528
|
+
var f;
|
|
2529
|
+
return ((f = n.value) == null ? void 0 : f.getFormState()) || {};
|
|
2515
2530
|
},
|
|
2516
|
-
restFormState: (
|
|
2531
|
+
restFormState: (f) => {
|
|
2517
2532
|
var F;
|
|
2518
|
-
c.value = !0,
|
|
2533
|
+
c.value = !0, f && (f == null || f()), (F = n.value) == null || F.resetForm(!1), c.value = !1;
|
|
2519
2534
|
}
|
|
2520
2535
|
}),
|
|
2521
2536
|
actionRef: () => ({
|
|
2522
|
-
loading:
|
|
2523
|
-
dataSource:
|
|
2524
|
-
pageState:
|
|
2525
|
-
pagination:
|
|
2537
|
+
loading: Y,
|
|
2538
|
+
dataSource: Te,
|
|
2539
|
+
pageState: ee,
|
|
2540
|
+
pagination: j.value,
|
|
2526
2541
|
selectedKey: T(() => Xe.value),
|
|
2527
2542
|
selectedItem: T(() => Rt.value),
|
|
2528
2543
|
rowsSelection: {
|
|
2529
|
-
clear:
|
|
2544
|
+
clear: It,
|
|
2530
2545
|
select: Je,
|
|
2531
2546
|
remove: et,
|
|
2532
2547
|
sync: Ze,
|
|
2533
2548
|
selectAll: Qe
|
|
2534
2549
|
},
|
|
2535
2550
|
reload: Ae,
|
|
2536
|
-
getLoadingStatus: () => S(
|
|
2537
|
-
reloadAndReset: async (
|
|
2538
|
-
var F,
|
|
2539
|
-
c.value = !0,
|
|
2551
|
+
getLoadingStatus: () => S(A),
|
|
2552
|
+
reloadAndReset: async (f) => {
|
|
2553
|
+
var F, P, M;
|
|
2554
|
+
c.value = !0, _({
|
|
2540
2555
|
current: 1,
|
|
2541
|
-
pageSize: (
|
|
2542
|
-
}),
|
|
2556
|
+
pageSize: (ee == null ? void 0 : ee.pageSize) || 10
|
|
2557
|
+
}), f != null && f.callBack && (f != null && f.wait ? await ((F = f == null ? void 0 : f.callBack) == null ? void 0 : F.call(f)) : (P = f == null ? void 0 : f.callBack) == null || P.call(f)), (M = n.value) == null || M.resetForm(!1), c.value = !1;
|
|
2543
2558
|
},
|
|
2544
2559
|
reSetDataList: Ot,
|
|
2545
2560
|
setPageAndReload: it,
|
|
2546
|
-
setPagination:
|
|
2561
|
+
setPagination: _,
|
|
2547
2562
|
setData: kt,
|
|
2548
2563
|
setLoading: E
|
|
2549
2564
|
})
|
|
2550
2565
|
}), () => {
|
|
2551
|
-
var F,
|
|
2552
|
-
const
|
|
2566
|
+
var F, P;
|
|
2567
|
+
const f = Ce(e.customRender || l.customRender);
|
|
2553
2568
|
return d(r("div", {
|
|
2554
2569
|
ref: s,
|
|
2555
2570
|
class: je([{
|
|
2556
|
-
[`${
|
|
2571
|
+
[`${h.value}`]: !0,
|
|
2557
2572
|
[`${i}`]: !0,
|
|
2558
2573
|
[`${u.class}`]: u.class,
|
|
2559
2574
|
[`${i}-no-scroll`]: !Object.keys(S(t) || {}).length,
|
|
2560
2575
|
[`${i}-table-tree`]: tt.value,
|
|
2561
|
-
[`${i}-full-screen`]:
|
|
2576
|
+
[`${i}-full-screen`]: m.value
|
|
2562
2577
|
}]),
|
|
2563
2578
|
style: u.style
|
|
2564
2579
|
}, [r("div", {
|
|
2565
|
-
class: [`${i}-content`,
|
|
2566
|
-
}, [(
|
|
2567
|
-
ref:
|
|
2580
|
+
class: [`${i}-content`, h.value]
|
|
2581
|
+
}, [(ae.value.length > 0 || Ce(l.search)) && r(pt, {
|
|
2582
|
+
ref: n,
|
|
2568
2583
|
search: e.search,
|
|
2569
2584
|
modal: e.modalScroll,
|
|
2570
|
-
searchMap:
|
|
2585
|
+
searchMap: ae.value,
|
|
2571
2586
|
prefixCls: i,
|
|
2572
|
-
loading: !!S(
|
|
2587
|
+
loading: !!S(A),
|
|
2573
2588
|
onSearch: jt,
|
|
2574
|
-
defaultParams:
|
|
2589
|
+
defaultParams: me
|
|
2575
2590
|
}, {
|
|
2576
2591
|
default: l.search ? () => {
|
|
2577
|
-
var
|
|
2578
|
-
return (
|
|
2592
|
+
var M;
|
|
2593
|
+
return (M = l.search) == null ? void 0 : M.call(l);
|
|
2579
2594
|
} : null
|
|
2580
|
-
}), !R.value && Yt(
|
|
2595
|
+
}), !R.value && Yt(f), f ? r(_e, at.value, {
|
|
2581
2596
|
default: () => {
|
|
2582
|
-
var
|
|
2597
|
+
var M, B, L;
|
|
2583
2598
|
return [r("div", {
|
|
2584
|
-
class: `${i}-wrapper ${
|
|
2599
|
+
class: `${i}-wrapper ${h.value}`
|
|
2585
2600
|
}, [r("div", {
|
|
2586
|
-
class: je(`${i}-list`,
|
|
2587
|
-
style: (
|
|
2588
|
-
}, [At()]), e.pagination !== !1 && ((
|
|
2601
|
+
class: je(`${i}-list`, h.value, (M = e.tableProps) == null ? void 0 : M.class),
|
|
2602
|
+
style: (B = e.tableProps) == null ? void 0 : B.style
|
|
2603
|
+
}, [At()]), e.pagination !== !1 && ((L = Te.value) == null ? void 0 : L.length) > 0 && r(Tl, U({
|
|
2589
2604
|
class: {
|
|
2590
|
-
[`${i}-pagination ${
|
|
2591
|
-
[`${i}-pagination-${nt.value} ${
|
|
2605
|
+
[`${i}-pagination ${h.value}`]: !0,
|
|
2606
|
+
[`${i}-pagination-${nt.value} ${h.value}`]: !!nt.value
|
|
2592
2607
|
}
|
|
2593
|
-
},
|
|
2608
|
+
}, ve(S(j)), {
|
|
2594
2609
|
onChange: Mt
|
|
2595
2610
|
}), null)])];
|
|
2596
2611
|
}
|
|
2597
|
-
}) : r(
|
|
2612
|
+
}) : r(pl, U(rt(e, Object.keys(Tt)), Dt.value, {
|
|
2598
2613
|
style: (F = e.tableProps) == null ? void 0 : F.style,
|
|
2599
|
-
class: (
|
|
2614
|
+
class: (P = e.tableProps) == null ? void 0 : P.class,
|
|
2600
2615
|
loading: at.value,
|
|
2601
|
-
rowKey: (
|
|
2602
|
-
transformCellText: (
|
|
2603
|
-
var
|
|
2604
|
-
e.transformCellText && typeof e.transformCellText && ((
|
|
2616
|
+
rowKey: (M) => M[e.rowKey],
|
|
2617
|
+
transformCellText: (M) => {
|
|
2618
|
+
var ce, J, Q;
|
|
2619
|
+
e.transformCellText && typeof e.transformCellText && ((ce = e.transformCellText) == null || ce.call(e, M));
|
|
2605
2620
|
const {
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
X = ot.success, he = kl(ot.value, ((Oe = (ge = e.columns) == null ? void 0 : ge.find((Lt) => Lt.key === A.key)) == null ? void 0 : Oe.valueType) || A.valueType, i, f.value);
|
|
2621
|
+
column: B
|
|
2622
|
+
} = M, L = (B == null ? void 0 : B.key) || (B == null ? void 0 : B.dataIndex);
|
|
2623
|
+
let te = !0, V = M.text;
|
|
2624
|
+
if (!ye(V) && B) {
|
|
2625
|
+
const Oe = Ut(V, (B == null ? void 0 : B.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || "");
|
|
2626
|
+
te = Oe.success, V = Ol(Oe.value, (B == null ? void 0 : B.valueType) || ((Q = (J = e.columns) == null ? void 0 : J.find((ot) => (ot.key || ot.dataIndex) === L)) == null ? void 0 : Q.valueType), i, h.value);
|
|
2613
2627
|
}
|
|
2614
|
-
return
|
|
2628
|
+
return B != null && B.ellipsis ? Kt(V, te, B) : V;
|
|
2615
2629
|
},
|
|
2616
2630
|
rowSelection: e.rowSelection ? {
|
|
2617
2631
|
...Ee(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
@@ -2623,7 +2637,7 @@ const fa = {
|
|
|
2623
2637
|
onChange: it,
|
|
2624
2638
|
onExpandedRowsChange: Nt,
|
|
2625
2639
|
onExpand: Et,
|
|
2626
|
-
onResizeColumn: (
|
|
2640
|
+
onResizeColumn: (M, B) => zt(M, B)
|
|
2627
2641
|
}), {
|
|
2628
2642
|
...l,
|
|
2629
2643
|
emptyText: () => st()
|
|
@@ -2635,6 +2649,6 @@ He.install = (e) => (e.component(He.name, He), e);
|
|
|
2635
2649
|
export {
|
|
2636
2650
|
He as GProTable,
|
|
2637
2651
|
He as default,
|
|
2638
|
-
|
|
2652
|
+
ge as proTableProps,
|
|
2639
2653
|
Ia as useTable
|
|
2640
2654
|
};
|