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