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