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