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