@gx-design-vue/pro-table 0.2.0-beta.82 → 0.2.0-beta.84
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/pro-table.js +421 -421
- package/dist/pro-table.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { isObject as Q, isBoolean as se, getSlot as
|
|
2
|
-
import { reactive as
|
|
1
|
+
import { isObject as Q, isBoolean as se, getSlot as mt, isFunction as Fe, arrayRepeat as Vt, runFunction as Ht, convertValueBoolean as xe, isArray as fe, getSortIndex as Wt, isDeepEqualReact as De, handleCurrentPage as _t, genColumnKey as vt, compareArray as Gt, isNumber as gt, isString as qt, filterEmpty as yt, classNames as je, getPrefixCls as Ge, getRandomNumber as We, handleShowIndex as Ut, hanndleEmptyField as Xt, getSlotVNode as Se } from "@gx-design-vue/pro-utils";
|
|
2
|
+
import { reactive as he, isReactive as Jt, watch as W, computed as T, ref as D, toRaw as ye, createVNode as r, mergeProps as X, isVNode as Ce, watchEffect as Ie, unref as x, onUnmounted as Qt, onDeactivated as Zt, onMounted as el, defineComponent as oe, Fragment as Ne, nextTick as tl, h as bt, cloneVNode as qe, createTextVNode as Re, renderSlot as ll, toRef as ae } from "vue";
|
|
3
3
|
import "ant-design-vue/es/_util/props-util";
|
|
4
|
-
import { warning as
|
|
5
|
-
import { omit as Ee, cloneDeep as ie, pick as
|
|
6
|
-
import { tableProps as
|
|
7
|
-
import { UpOutlined as
|
|
8
|
-
import { useFullscreen as
|
|
9
|
-
import { Form as
|
|
10
|
-
import { useProAppContext as
|
|
11
|
-
import { useContext as
|
|
4
|
+
import { warning as al } from "ant-design-vue/es/vc-util/warning";
|
|
5
|
+
import { omit as Ee, cloneDeep as ie, pick as rt } from "lodash-es";
|
|
6
|
+
import { tableProps as nl } from "ant-design-vue/es/table/Table";
|
|
7
|
+
import { UpOutlined as ul, DownOutlined as il, SettingOutlined as Ct, VerticalAlignTopOutlined as sl, VerticalAlignMiddleOutlined as ol, VerticalAlignBottomOutlined as rl, FullscreenExitOutlined as cl, FullscreenOutlined as dl, ColumnHeightOutlined as fl, InfoCircleOutlined as hl, ReloadOutlined as ml, CopyOutlined as vl } from "@ant-design/icons-vue";
|
|
8
|
+
import { useFullscreen as St, useWindowSize as gl } from "@vueuse/core";
|
|
9
|
+
import { Form as ct, Grid as Ue, Space as de, Button as dt, Input as ft, TimePicker as yl, DatePicker as xt, TreeSelect as bl, Spin as _e, Select as Cl, Popover as Sl, Checkbox as xl, Tooltip as ne, Tree as wl, Dropdown as pl, Menu as ke, Pagination as Tl, Table as $l, message as Fl, Empty as Rl } from "ant-design-vue";
|
|
10
|
+
import { useProAppContext as wt } from "@gx-design-vue/pro-app";
|
|
11
|
+
import { useContext as Pl, useProStyle as ze } from "@gx-design-vue/pro-provider";
|
|
12
12
|
import q from "dayjs";
|
|
13
|
-
import { tryOnUnmounted as
|
|
14
|
-
function
|
|
15
|
-
var
|
|
13
|
+
import { tryOnUnmounted as Il, useMemo as Me } from "@gx-design-vue/pro-hooks";
|
|
14
|
+
function Ba(e, a) {
|
|
15
|
+
var b, $, v;
|
|
16
16
|
function l() {
|
|
17
|
-
return a != null && a.state && Q(a == null ? void 0 : a.state) ?
|
|
17
|
+
return a != null && a.state && Q(a == null ? void 0 : a.state) ? ye(a == null ? void 0 : a.state) : {};
|
|
18
18
|
}
|
|
19
|
-
const u =
|
|
19
|
+
const u = he({
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
request: async (...s) => {
|
|
22
22
|
var n;
|
|
23
23
|
return a != null && a.request ? await ((n = a == null ? void 0 : a.request) == null ? void 0 : n.call(a, ...s)) : void 0;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
a != null && a.state && (
|
|
26
|
+
a != null && a.state && (Jt(a.state) ? W(() => a == null ? void 0 : a.state, () => {
|
|
27
27
|
Object.assign(u, l());
|
|
28
28
|
}, { deep: !0, immediate: !0 }) : Object.assign(u, l()));
|
|
29
29
|
const o = T(() => {
|
|
@@ -38,7 +38,7 @@ function Ia(e, a) {
|
|
|
38
38
|
...((s = o.value) == null ? void 0 : s.pageState) || {},
|
|
39
39
|
...((c = (n = i.value) == null ? void 0 : n.getFormState) == null ? void 0 : c.call(n)) || {}
|
|
40
40
|
};
|
|
41
|
-
}), h = D(!!((
|
|
41
|
+
}), h = D(!!(($ = (b = o.value) == null ? void 0 : b.loading) != null && $.value));
|
|
42
42
|
return W(() => {
|
|
43
43
|
var s, n;
|
|
44
44
|
return (n = (s = o.value) == null ? void 0 : s.loading) == null ? void 0 : n.value;
|
|
@@ -93,8 +93,8 @@ function Ia(e, a) {
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
...Ee(
|
|
96
|
+
const Bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], pt = {
|
|
97
|
+
...Ee(nl(), Bl),
|
|
98
98
|
transformCellText: Function,
|
|
99
99
|
/**
|
|
100
100
|
* @Author gx12358
|
|
@@ -114,8 +114,8 @@ const Il = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
114
114
|
type: Object,
|
|
115
115
|
default: void 0
|
|
116
116
|
}
|
|
117
|
-
},
|
|
118
|
-
...
|
|
117
|
+
}, be = {
|
|
118
|
+
...pt,
|
|
119
119
|
rowSelection: {
|
|
120
120
|
type: Object,
|
|
121
121
|
default: void 0
|
|
@@ -369,10 +369,10 @@ const Il = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
369
369
|
onBeforeSearchSubmit: Function,
|
|
370
370
|
onColumnsStateChange: Function
|
|
371
371
|
};
|
|
372
|
-
function
|
|
372
|
+
function Ol(e) {
|
|
373
373
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function kl(e, a, l, u) {
|
|
376
376
|
if (!a) return e;
|
|
377
377
|
let o = e;
|
|
378
378
|
if (Q(a)) {
|
|
@@ -380,7 +380,7 @@ function Ol(e, a, l, u) {
|
|
|
380
380
|
return r(i, X((a == null ? void 0 : a.attr) || {}, {
|
|
381
381
|
class: [a.class, a.node === "a" ? `${l}-a` : ""],
|
|
382
382
|
onClick: a.click
|
|
383
|
-
}),
|
|
383
|
+
}), Ol(e) ? e : {
|
|
384
384
|
default: () => [e]
|
|
385
385
|
});
|
|
386
386
|
}
|
|
@@ -402,15 +402,15 @@ function Ol(e, a, l, u) {
|
|
|
402
402
|
}
|
|
403
403
|
return o;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Dl(e, a) {
|
|
406
406
|
const l = a && a.current || 1, u = a && a.pageSize || 10;
|
|
407
407
|
return e.filter((o, i) => i < l * u && i >= u * (l - 1));
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function jl(e) {
|
|
410
410
|
const a = document.createElement("textarea");
|
|
411
411
|
a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Ml({ emit: e, loading: a }) {
|
|
414
414
|
var i;
|
|
415
415
|
const l = D(se(a.value) ? a.value : Q(a.value) ? (i = a.value) == null ? void 0 : i.spinning : !1);
|
|
416
416
|
W(() => a.value, (d) => {
|
|
@@ -422,7 +422,7 @@ function jl({ emit: e, loading: a }) {
|
|
|
422
422
|
}
|
|
423
423
|
return { loadingComputed: u, loading: l, setLoading: o };
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function Nl({ size: e, emit: a }) {
|
|
426
426
|
const l = D("middle");
|
|
427
427
|
Ie(() => {
|
|
428
428
|
l.value = e.value;
|
|
@@ -432,19 +432,19 @@ function Ml({ size: e, emit: a }) {
|
|
|
432
432
|
}
|
|
433
433
|
return { sizeRef: l, setTableSize: u };
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function El({
|
|
436
436
|
slots: e,
|
|
437
437
|
props: a,
|
|
438
438
|
pagination: l
|
|
439
439
|
}) {
|
|
440
|
-
const u =
|
|
440
|
+
const u = he({}), o = D();
|
|
441
441
|
W(() => l.value, () => {
|
|
442
|
-
var
|
|
442
|
+
var $;
|
|
443
443
|
if (se(l.value) && !l.value) {
|
|
444
444
|
o.value = !1;
|
|
445
445
|
return;
|
|
446
446
|
}
|
|
447
|
-
const d =
|
|
447
|
+
const d = mt(e, x(a), "pageItemRender"), h = Fe(d) ? {
|
|
448
448
|
itemRender: ({
|
|
449
449
|
page: v,
|
|
450
450
|
type: s,
|
|
@@ -454,7 +454,7 @@ function Nl({
|
|
|
454
454
|
type: s,
|
|
455
455
|
originalElement: n
|
|
456
456
|
}) : null
|
|
457
|
-
} : null,
|
|
457
|
+
} : null, b = {
|
|
458
458
|
current: 1,
|
|
459
459
|
pageSize: 10,
|
|
460
460
|
size: "default",
|
|
@@ -464,9 +464,9 @@ function Nl({
|
|
|
464
464
|
...l.value || {},
|
|
465
465
|
...h || {}
|
|
466
466
|
};
|
|
467
|
-
(
|
|
468
|
-
pageNum:
|
|
469
|
-
pageSize:
|
|
467
|
+
($ = l.value) != null && $.showTotal || (b.showTotal = (v) => `共${v < b.pageSize ? 1 : Math.ceil(v / (b.pageSize || 10))}页 ${v}条记录`), o.value = b, Object.assign(u, {
|
|
468
|
+
pageNum: b.current,
|
|
469
|
+
pageSize: b.pageSize
|
|
470
470
|
});
|
|
471
471
|
}, {
|
|
472
472
|
deep: 1,
|
|
@@ -475,9 +475,9 @@ function Nl({
|
|
|
475
475
|
function i(d) {
|
|
476
476
|
if (Q(o.value) && Q(d)) {
|
|
477
477
|
const h = {};
|
|
478
|
-
Object.keys(d).forEach((
|
|
479
|
-
Object.prototype.hasOwnProperty.call(d,
|
|
480
|
-
}), Object.keys(h).length > 0 && (Object.assign(o.value, h),
|
|
478
|
+
Object.keys(d).forEach((b) => {
|
|
479
|
+
Object.prototype.hasOwnProperty.call(d, b) && o.value[b] === d[b] || (h[b] = d[b]);
|
|
480
|
+
}), Object.keys(h).length > 0 && (Object.assign(o.value, h), zl(h) && Object.assign(u, h));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
return {
|
|
@@ -486,19 +486,19 @@ function Nl({
|
|
|
486
486
|
setPagination: i
|
|
487
487
|
};
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function zl(e) {
|
|
490
490
|
if (typeof e != "object" || e === null)
|
|
491
491
|
return !1;
|
|
492
492
|
const a = Object.keys(e);
|
|
493
493
|
return a.length === 2 && a.includes("pageNum") && a.includes("pageSize");
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Kl(e, a) {
|
|
496
496
|
const l = D([]), u = D([]);
|
|
497
497
|
W(() => {
|
|
498
498
|
var v;
|
|
499
499
|
return (v = a.value) == null ? void 0 : v.selectedRowKeys;
|
|
500
500
|
}, (v) => {
|
|
501
|
-
l.value =
|
|
501
|
+
l.value = Vt([...v || []]);
|
|
502
502
|
}, {
|
|
503
503
|
deep: !0,
|
|
504
504
|
immediate: !0
|
|
@@ -533,25 +533,25 @@ function zl(e, a) {
|
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function Al(e, a) {
|
|
537
537
|
const l = T(() => a || 0), u = D(), o = D(e);
|
|
538
538
|
function i() {
|
|
539
539
|
u.value && clearTimeout(u.value);
|
|
540
540
|
}
|
|
541
541
|
async function d(...h) {
|
|
542
|
-
return l.value === 0 || l.value === void 0 ? o.value(...h) : (i(), new Promise(async (
|
|
543
|
-
var
|
|
544
|
-
(
|
|
545
|
-
|
|
542
|
+
return l.value === 0 || l.value === void 0 ? o.value(...h) : (i(), new Promise(async (b) => {
|
|
543
|
+
var $;
|
|
544
|
+
($ = h[0]) != null && $.immediate ? b(await o.value(...h)) : u.value = setTimeout(async () => {
|
|
545
|
+
b(await o.value(...h));
|
|
546
546
|
}, l.value);
|
|
547
547
|
}));
|
|
548
548
|
}
|
|
549
|
-
return
|
|
549
|
+
return Il(i), {
|
|
550
550
|
cancel: i,
|
|
551
551
|
run: d
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Yl(e) {
|
|
555
555
|
const a = T(() => e.polling), l = T(() => e.debounceTime), u = T(() => e.dataSource);
|
|
556
556
|
return {
|
|
557
557
|
polling: a,
|
|
@@ -561,67 +561,67 @@ function Al(e) {
|
|
|
561
561
|
dataSource: u
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Ll({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o, debounceTime: i }, { columns: d, loading: h, setLoading: b, setColumns: $, removeRowKeys: v, syncSelectedRows: s, formParamsRef: n, setPagination: c, paginationInfo: g, onBeforeSearchSubmit: m, hasCustomRender: S }, P) {
|
|
565
565
|
const R = D(), k = D(!0), Y = D(!1), L = D(!1), z = D([]), H = D(), re = async (y = {}) => {
|
|
566
566
|
var Be;
|
|
567
|
-
const { pagination:
|
|
567
|
+
const { pagination: p, filters: E = {}, sorter: K = {}, removeKeys: w = [], isPolling: Ke = !1 } = y;
|
|
568
568
|
if (!a || !Fe(a) || x(o) && h.value || Y.value)
|
|
569
569
|
return u.value || [];
|
|
570
|
-
if (Y.value = !0, !Ke || x(o) || k.value ?
|
|
570
|
+
if (Y.value = !0, !Ke || x(o) || k.value ? b(!0) : we(!0), x(o)) {
|
|
571
571
|
k.value = !1, Y.value = !1;
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
574
|
-
|
|
574
|
+
p && c(p);
|
|
575
575
|
try {
|
|
576
576
|
let ce = {};
|
|
577
|
-
if (se(
|
|
577
|
+
if (se(p) && !p || se(g))
|
|
578
578
|
ce = {};
|
|
579
579
|
else {
|
|
580
|
-
const { current: A = 1, pageSize:
|
|
581
|
-
ce.pageNum =
|
|
580
|
+
const { current: A = 1, pageSize: ve = 10, total: G } = x(g) || {};
|
|
581
|
+
ce.pageNum = _t({ current: A, pageSize: ve, total: G }, w.length), w.length && v(w), ce.pageSize = ve;
|
|
582
582
|
}
|
|
583
583
|
const Oe = Q(K) ? [K] : K;
|
|
584
584
|
Oe.forEach((A) => {
|
|
585
|
-
const
|
|
586
|
-
A && (A != null && A.order) ?
|
|
585
|
+
const ve = (A == null ? void 0 : A.columnKey) || (A == null ? void 0 : A.field);
|
|
586
|
+
A && (A != null && A.order) ? $(x(d).map((G) => (G.dataIndex === ve ? G.sortOrder = A == null ? void 0 : A.order : G.sortOrder = null, G))) : A && $(x(d).map((G) => (G.dataIndex === ve && (G.sortOrder = null), G)));
|
|
587
587
|
});
|
|
588
|
-
let
|
|
588
|
+
let pe = {
|
|
589
589
|
...ce || {},
|
|
590
590
|
...y.params,
|
|
591
591
|
...n
|
|
592
592
|
};
|
|
593
|
-
m && Fe(m) && (
|
|
593
|
+
m && Fe(m) && (pe = await m(pe, K, E));
|
|
594
594
|
let J = [];
|
|
595
|
-
const ue = await (a == null ? void 0 : a(
|
|
595
|
+
const ue = await (a == null ? void 0 : a(pe, Oe, E));
|
|
596
596
|
if (Y.value = !1, ue && (ue != null && ue.success)) {
|
|
597
597
|
J = ue.data || [], l && Fe(l) && (J = await (l == null ? void 0 : l(J))), s(J);
|
|
598
598
|
const A = ue.total || (J == null ? void 0 : J.length) || 0;
|
|
599
599
|
return A !== ((Be = x(g)) == null ? void 0 : Be.total) && c({
|
|
600
600
|
total: A || 0
|
|
601
|
-
}),
|
|
601
|
+
}), C(J), J;
|
|
602
602
|
} else
|
|
603
603
|
return [];
|
|
604
604
|
} catch (ce) {
|
|
605
|
-
z.value === void 0 &&
|
|
605
|
+
z.value === void 0 && C([]), P("requestError", ce);
|
|
606
606
|
} finally {
|
|
607
|
-
k.value = !1,
|
|
607
|
+
k.value = !1, b(!1);
|
|
608
608
|
}
|
|
609
609
|
return [];
|
|
610
|
-
},
|
|
610
|
+
}, N = Al(async (y) => {
|
|
611
611
|
H.value && clearTimeout(H.value);
|
|
612
|
-
const
|
|
612
|
+
const p = await re(y), E = Ht(e.value, p);
|
|
613
613
|
return E && !R.value && (H.value = setTimeout(() => {
|
|
614
|
-
|
|
615
|
-
}, Math.max(E, 2e3))),
|
|
614
|
+
N.run({ ...y, isPolling: E });
|
|
615
|
+
}, Math.max(E, 2e3))), p;
|
|
616
616
|
}, i.value || 10);
|
|
617
|
-
|
|
617
|
+
Qt(() => {
|
|
618
618
|
R.value = !0, clearTimeout(H.value);
|
|
619
|
-
}),
|
|
619
|
+
}), Zt(() => {
|
|
620
620
|
R.value = !0, clearTimeout(H.value);
|
|
621
621
|
}), W(() => e.value, () => {
|
|
622
|
-
e.value ?
|
|
622
|
+
e.value ? N.run({ isPolling: !0 }) : clearTimeout(H.value);
|
|
623
623
|
}, { immediate: !0 }), W([() => o.value, () => u.value, () => n], () => {
|
|
624
|
-
xe(a) ? (!k.value || !e.value) &&
|
|
624
|
+
xe(a) ? (!k.value || !e.value) && N.run({ isPolling: !1 }) : C(u.value || []);
|
|
625
625
|
}, {
|
|
626
626
|
deep: !0,
|
|
627
627
|
immediate: !0
|
|
@@ -629,53 +629,53 @@ function Yl({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o
|
|
|
629
629
|
const Z = T(() => {
|
|
630
630
|
if (S.value)
|
|
631
631
|
return x(z);
|
|
632
|
-
const y = d.value.filter((
|
|
632
|
+
const y = d.value.filter((p) => p.show || p.show === void 0);
|
|
633
633
|
return !x(z) || !y || y.length === 0 ? [] : x(z);
|
|
634
|
-
}), _ = T(() => x(z).some((y) =>
|
|
634
|
+
}), _ = T(() => x(z).some((y) => fe(y.children) && y.children.length > 0));
|
|
635
635
|
function we(y) {
|
|
636
636
|
L.value = y;
|
|
637
637
|
}
|
|
638
|
-
function t(y,
|
|
639
|
-
|
|
638
|
+
function t(y, p, E, K) {
|
|
639
|
+
N.run({ pagination: y, filters: p, sorter: E, extra: K, isPolling: !1 }), P("change", y, p, E, K);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function C(y) {
|
|
642
642
|
var E;
|
|
643
|
-
const
|
|
644
|
-
if (!De(
|
|
645
|
-
const K =
|
|
643
|
+
const p = Wt(ie(y), x(g.value));
|
|
644
|
+
if (!De(p, z.value) && (z.value = p, !a || !Fe(a))) {
|
|
645
|
+
const K = p.length || 0;
|
|
646
646
|
K !== ((E = x(g)) == null ? void 0 : E.total) && c({
|
|
647
647
|
total: K
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function O({ key: y, record: p, type: E = "update" }) {
|
|
652
652
|
switch (E) {
|
|
653
653
|
case "update":
|
|
654
|
-
z.value = z.value.map((K) => y &&
|
|
654
|
+
z.value = z.value.map((K) => y && p[y] === K[y] ? { ...K, ...p } : K);
|
|
655
655
|
break;
|
|
656
656
|
case "push":
|
|
657
|
-
z.value.push(
|
|
657
|
+
z.value.push(p);
|
|
658
658
|
break;
|
|
659
659
|
case "unshift":
|
|
660
|
-
z.value.unshift(
|
|
660
|
+
z.value.unshift(p);
|
|
661
661
|
break;
|
|
662
662
|
case "delete":
|
|
663
|
-
z.value = z.value.filter((K) => y ? y &&
|
|
663
|
+
z.value = z.value.filter((K) => y ? y && p[y] !== K[y] : !0);
|
|
664
664
|
break;
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
return {
|
|
668
668
|
dataSource: Z,
|
|
669
669
|
isTreeDataRef: _,
|
|
670
|
-
reSetDataList:
|
|
671
|
-
changeDataValue:
|
|
670
|
+
reSetDataList: C,
|
|
671
|
+
changeDataValue: O,
|
|
672
672
|
handleTableChange: t,
|
|
673
673
|
reload: async (y) => {
|
|
674
|
-
xe(a) ? await
|
|
674
|
+
xe(a) ? await N.run({ ...y, isPolling: !1 }) : P("reload");
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function Vl(e) {
|
|
679
679
|
const a = {};
|
|
680
680
|
return e.forEach((l) => {
|
|
681
681
|
let u = l.initialValue;
|
|
@@ -683,11 +683,11 @@ function Ll(e) {
|
|
|
683
683
|
!u && o.includes(l.valueType) ? u = void 0 : !u && i.includes(l.valueType) ? u = null : u || (u = ""), l.name === "dateRange" ? (a[l.rangeStartName || "start"] = u ? u[0] : null, a[l.rangeEndName || "end"] = u ? u[1] : null) : l.name && (a[l.name] = u);
|
|
684
684
|
}), a;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
const i =
|
|
686
|
+
function Hl({ search: e, searchMap: a, params: l, columns: u, setPagination: o }) {
|
|
687
|
+
const i = he({}), d = he({}), h = D([]), b = T(() => {
|
|
688
688
|
var s;
|
|
689
689
|
return Q(e.value) ? !!((s = e.value) != null && s.showSearch) : !!e.value;
|
|
690
|
-
}),
|
|
690
|
+
}), $ = (s) => {
|
|
691
691
|
var c, g;
|
|
692
692
|
const n = [];
|
|
693
693
|
if ((s === "all" || s === "searchMap") && ((c = a.value) == null || c.forEach((m) => n.push(m)), n.forEach((m) => {
|
|
@@ -704,37 +704,37 @@ function Vl({ search: e, searchMap: a, params: l, columns: u, setPagination: o }
|
|
|
704
704
|
} : S) : h.value.push(m);
|
|
705
705
|
})), s === "all" || s === "searchMap" || s === "columns") {
|
|
706
706
|
o({ current: 1 });
|
|
707
|
-
const m =
|
|
707
|
+
const m = Vl(n);
|
|
708
708
|
Object.assign(d, { ...m });
|
|
709
709
|
for (const S in m)
|
|
710
710
|
i[S] || (i[S] = m[S]);
|
|
711
711
|
}
|
|
712
|
-
(s === "all" || s === "params") && !
|
|
712
|
+
(s === "all" || s === "params") && !b.value && (o({ current: 1 }), Object.assign(i, l.value));
|
|
713
713
|
};
|
|
714
|
-
|
|
715
|
-
|
|
714
|
+
el(() => {
|
|
715
|
+
$("all");
|
|
716
716
|
}), W(() => l.value, () => {
|
|
717
|
-
|
|
717
|
+
$("params");
|
|
718
718
|
}, { deep: !0 }), W(() => a.value, () => {
|
|
719
|
-
|
|
719
|
+
$("searchMap");
|
|
720
720
|
}, { deep: !0 }), W(() => u.value, () => {
|
|
721
|
-
|
|
721
|
+
$("columns");
|
|
722
722
|
}, { deep: !0 });
|
|
723
723
|
function v(s) {
|
|
724
724
|
o({ current: 1 }), Object.assign(i, s);
|
|
725
725
|
}
|
|
726
726
|
return { formDataRef: h, formParamsRef: i, defaultParamsRef: d, setFormParams: v };
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
const u = D(void 0), o =
|
|
728
|
+
function Wl({ columns: e, columnsState: a, changeColumns: l }) {
|
|
729
|
+
const u = D(void 0), o = he({}), i = he({}), d = he({}), h = D([]);
|
|
730
730
|
W(() => e.value, () => {
|
|
731
731
|
var s;
|
|
732
732
|
(s = x(e)) == null || s.forEach(({ show: n, key: c, fixed: g }, m) => {
|
|
733
|
-
const S =
|
|
733
|
+
const S = vt(c, m);
|
|
734
734
|
S && (d[S] = { show: n === void 0 ? !0 : n, fixed: g });
|
|
735
735
|
});
|
|
736
736
|
const v = x(e).map((n) => n.key);
|
|
737
|
-
|
|
737
|
+
$(v);
|
|
738
738
|
}, { deep: !0, immediate: !0 }), Ie(() => {
|
|
739
739
|
var s;
|
|
740
740
|
const v = {
|
|
@@ -743,22 +743,22 @@ function Hl({ columns: e, columnsState: a, changeColumns: l }) {
|
|
|
743
743
|
};
|
|
744
744
|
Object.assign(o, v), Object.assign(i, v);
|
|
745
745
|
});
|
|
746
|
-
function
|
|
746
|
+
function b(v, s) {
|
|
747
747
|
u.value = s, Object.assign(o, v), l == null || l(o, s === "fixed");
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function $(v) {
|
|
750
750
|
h.value = v;
|
|
751
751
|
}
|
|
752
752
|
return {
|
|
753
753
|
columnsMap: o,
|
|
754
754
|
operationType: u,
|
|
755
|
-
setColumnsMap:
|
|
755
|
+
setColumnsMap: b,
|
|
756
756
|
sortKeyColumns: h,
|
|
757
757
|
cacheColumnsMap: i,
|
|
758
|
-
setSortKeyColumns:
|
|
758
|
+
setSortKeyColumns: $
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function _l(e) {
|
|
762
762
|
const a = T(() => e.draggabled), l = T(() => e.neverScroll), u = T(() => e.autoScroll);
|
|
763
763
|
return {
|
|
764
764
|
draggabled: a,
|
|
@@ -766,7 +766,7 @@ function Wl(e) {
|
|
|
766
766
|
autoScroll: u
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function Gl({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o, neverScroll: i }) {
|
|
770
770
|
const d = D([]), h = D([]);
|
|
771
771
|
W([
|
|
772
772
|
() => e.value,
|
|
@@ -777,27 +777,27 @@ function _l({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
777
777
|
() => o.value,
|
|
778
778
|
() => i.value
|
|
779
779
|
], () => {
|
|
780
|
-
const g = v(
|
|
781
|
-
De(g,
|
|
780
|
+
const g = v(ye(a.value));
|
|
781
|
+
De(g, ye(d.value)) || (d.value = ie(g)), De(g, ye(h.value)) || (h.value = ie(g));
|
|
782
782
|
}, {
|
|
783
783
|
deep: !0,
|
|
784
784
|
immediate: !0
|
|
785
785
|
});
|
|
786
|
-
const
|
|
787
|
-
const g =
|
|
786
|
+
const b = T(() => {
|
|
787
|
+
const g = $(x(d).filter((P) => P.fixed === "left")), m = $(x(d).filter((P) => P.fixed !== "left" && P.fixed !== "right")), S = $(x(d).filter((P) => P.fixed === "right"));
|
|
788
788
|
return [
|
|
789
789
|
...g,
|
|
790
790
|
...m,
|
|
791
791
|
...S
|
|
792
792
|
];
|
|
793
793
|
});
|
|
794
|
-
function
|
|
795
|
-
return g.sort((m, S) =>
|
|
794
|
+
function $(g) {
|
|
795
|
+
return g.sort((m, S) => Gt(m, S, "order", 0));
|
|
796
796
|
}
|
|
797
797
|
function v(g) {
|
|
798
798
|
return ie(g).map((m, S) => {
|
|
799
799
|
var P;
|
|
800
|
-
if (m.dataIndex === "action" || S === g.length - 1 ? m.resizable = !1 : m.resizable = se(m.resizable) ? m.resizable : !!(
|
|
800
|
+
if (m.dataIndex === "action" || S === g.length - 1 ? m.resizable = !1 : m.resizable = se(m.resizable) ? m.resizable : !!(gt(m.width) && x(u)), !m.width || x(i))
|
|
801
801
|
return m;
|
|
802
802
|
if (m.dataIndex === "action" && x(o))
|
|
803
803
|
if ((P = x(e)) != null && P.x || !x(l))
|
|
@@ -817,10 +817,10 @@ function _l({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
817
817
|
d.value = [];
|
|
818
818
|
return;
|
|
819
819
|
}
|
|
820
|
-
De(v(g),
|
|
820
|
+
De(v(g), ye(d.value)) || (d.value = v(g));
|
|
821
821
|
}
|
|
822
822
|
function c(g) {
|
|
823
|
-
n(ie(
|
|
823
|
+
n(ie(ye(a.value)).map((m) => {
|
|
824
824
|
var P, R, k;
|
|
825
825
|
const S = m.key ? {
|
|
826
826
|
show: (P = g[m.key]) == null ? void 0 : P.show,
|
|
@@ -832,14 +832,14 @@ function _l({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
832
832
|
}
|
|
833
833
|
return {
|
|
834
834
|
breakpoint: l,
|
|
835
|
-
proColumns:
|
|
835
|
+
proColumns: b,
|
|
836
836
|
cacheProColumns: h,
|
|
837
837
|
setColumns: n,
|
|
838
838
|
changeColumns: c,
|
|
839
839
|
resizeColumnWidth: s
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function ql(e) {
|
|
843
843
|
const a = T(() => e.scroll), l = T(() => e.autoScroll), u = T(() => e.modalScroll), o = T(() => e.neverScroll), i = T(() => e.rowSelection), d = T(() => e.scrollBreakpoint);
|
|
844
844
|
return {
|
|
845
845
|
scroll: a,
|
|
@@ -850,10 +850,10 @@ function Gl(e) {
|
|
|
850
850
|
scrollBreakpoint: d
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
|
-
function
|
|
854
|
-
const
|
|
853
|
+
function Ul({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll: o, rowSelection: i, screens: d, innerWidth: h, scrollBreakpoint: b }) {
|
|
854
|
+
const $ = T(() => {
|
|
855
855
|
var n, c, g;
|
|
856
|
-
return x(
|
|
856
|
+
return x(b) ? gt(x(b)) ? h.value > x(b) : qt(x(b)) ? (n = d.value) == null ? void 0 : n[x(b)] : (c = d.value) == null ? void 0 : c.xl : (g = d.value) == null ? void 0 : g.xl;
|
|
857
857
|
}), v = T(() => {
|
|
858
858
|
let n = 0;
|
|
859
859
|
const c = x(i) ? 60 : 0, g = 150, m = ie(x(a));
|
|
@@ -867,12 +867,12 @@ function ql({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll:
|
|
|
867
867
|
var n, c;
|
|
868
868
|
return x(o) ? {} : x(e) && Object.keys(x(e)).length ? x(e) : x(u) ? {
|
|
869
869
|
y: ((n = x(e)) == null ? void 0 : n.y) || ((c = d.value) != null && c.xl ? 400 : 235)
|
|
870
|
-
} : x(l) ?
|
|
871
|
-
}), breakpoint:
|
|
870
|
+
} : x(l) ? $.value ? {} : se($.value) ? { x: x(v) } : {} : {};
|
|
871
|
+
}), breakpoint: $ };
|
|
872
872
|
}
|
|
873
|
-
const { provideContext:
|
|
874
|
-
function
|
|
875
|
-
const l =
|
|
873
|
+
const { provideContext: Xl, useInjectContext: me } = Pl("pro-table");
|
|
874
|
+
function Jl(e, a) {
|
|
875
|
+
const l = he({});
|
|
876
876
|
function u() {
|
|
877
877
|
Object.keys(e).forEach((d) => {
|
|
878
878
|
o(d, e[d]);
|
|
@@ -895,7 +895,7 @@ function Xl(e, a) {
|
|
|
895
895
|
changeFormState: o
|
|
896
896
|
};
|
|
897
897
|
}
|
|
898
|
-
const
|
|
898
|
+
const Ql = (e) => ({
|
|
899
899
|
[`${e.componentCls}-form`]: {
|
|
900
900
|
"&-collapse-button": {
|
|
901
901
|
display: "flex",
|
|
@@ -929,11 +929,11 @@ const Jl = (e) => ({
|
|
|
929
929
|
alignItems: "center"
|
|
930
930
|
}
|
|
931
931
|
}), {
|
|
932
|
-
useBreakpoint:
|
|
932
|
+
useBreakpoint: Zl
|
|
933
933
|
} = Ue, {
|
|
934
|
-
MonthPicker:
|
|
935
|
-
RangePicker:
|
|
936
|
-
} =
|
|
934
|
+
MonthPicker: ea,
|
|
935
|
+
RangePicker: ta
|
|
936
|
+
} = xt, Tt = /* @__PURE__ */ oe({
|
|
937
937
|
name: "ProTableForm",
|
|
938
938
|
props: {
|
|
939
939
|
search: {
|
|
@@ -943,7 +943,7 @@ const Jl = (e) => ({
|
|
|
943
943
|
searchText: "查询"
|
|
944
944
|
})
|
|
945
945
|
},
|
|
946
|
-
modal:
|
|
946
|
+
modal: be.modalScroll,
|
|
947
947
|
searchMap: {
|
|
948
948
|
type: Array,
|
|
949
949
|
default: () => []
|
|
@@ -961,16 +961,16 @@ const Jl = (e) => ({
|
|
|
961
961
|
const {
|
|
962
962
|
wrapSSR: o,
|
|
963
963
|
hashId: i
|
|
964
|
-
} = ze("ProTableForm", [
|
|
965
|
-
formState:
|
|
966
|
-
resetFormState:
|
|
964
|
+
} = ze("ProTableForm", [Ql], e.prefixCls), d = wt(), h = Zl(), {
|
|
965
|
+
formState: b,
|
|
966
|
+
resetFormState: $,
|
|
967
967
|
changeFormState: v
|
|
968
|
-
} =
|
|
968
|
+
} = Jl(e.defaultParams || {}, e.searchMap || []), s = D(!1), n = T(() => {
|
|
969
969
|
var t;
|
|
970
970
|
return !!((t = e.search) != null && t.showSearch);
|
|
971
971
|
}), c = T(() => {
|
|
972
|
-
var t,
|
|
973
|
-
return ((t = e.search) == null ? void 0 : t.showReset) === void 0 ? n.value : (
|
|
972
|
+
var t, C;
|
|
973
|
+
return ((t = e.search) == null ? void 0 : t.showReset) === void 0 ? n.value : (C = e.search) == null ? void 0 : C.showReset;
|
|
974
974
|
}), g = [{
|
|
975
975
|
value: "xxl",
|
|
976
976
|
span: 4
|
|
@@ -990,15 +990,15 @@ const Jl = (e) => ({
|
|
|
990
990
|
value: "xs",
|
|
991
991
|
span: 1
|
|
992
992
|
}], m = (t) => {
|
|
993
|
-
let
|
|
994
|
-
for (let
|
|
995
|
-
const y = g[
|
|
993
|
+
let C = 4;
|
|
994
|
+
for (let O = 0; O < g.length; O += 1) {
|
|
995
|
+
const y = g[O].value;
|
|
996
996
|
if (h.value[y]) {
|
|
997
|
-
|
|
997
|
+
C = (t == null ? void 0 : t[y]) || (e.modal ? 3 : g[O].span);
|
|
998
998
|
break;
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
|
-
return
|
|
1001
|
+
return C;
|
|
1002
1002
|
}, S = T(() => {
|
|
1003
1003
|
var t;
|
|
1004
1004
|
return m((t = e.search) == null ? void 0 : t.span);
|
|
@@ -1011,70 +1011,70 @@ const Jl = (e) => ({
|
|
|
1011
1011
|
});
|
|
1012
1012
|
const P = (t) => {
|
|
1013
1013
|
s.value = t;
|
|
1014
|
-
}, R = (t,
|
|
1015
|
-
...
|
|
1014
|
+
}, R = (t, C, O) => (t + 1) % C === 0 ? {
|
|
1015
|
+
...O,
|
|
1016
1016
|
marginRight: 0
|
|
1017
1017
|
} : {
|
|
1018
|
-
...
|
|
1018
|
+
...O,
|
|
1019
1019
|
marginRight: "2%"
|
|
1020
1020
|
}, k = () => {
|
|
1021
|
-
const t = ie(
|
|
1022
|
-
return
|
|
1023
|
-
}, Y = (t = !1,
|
|
1024
|
-
|
|
1025
|
-
(!n.value || t) && a("search", k(), !!
|
|
1021
|
+
const t = ie(b), C = e.searchMap.find((p) => p.valueType === "text") || "", O = e.searchMap.find((p) => p.valueType === "dateRange") || "", y = e.searchMap.find((p) => p.valueType === "treeSelect");
|
|
1022
|
+
return C && (t[C.name] = b[C.name] || C.initialValue || ""), O && (t[O.rangeStartName || "start"] = t[O.name] ? t[O.name][0] : "", t[O.rangeEndName || "end"] = t[O.name] ? t[O.name][1] : "", delete t[O.name]), y && (y != null && y.name && fe(b[y == null ? void 0 : y.name]) && (t[y.name] = b[y.name].length ? b[y.name].map((p) => p[y.valueKey === "text" ? "label" : "value"]).join() : ""), y != null && y.name && fe(t[y == null ? void 0 : y.name]) && (t[y.name] = t[y.name].length ? t[y.name].map((p) => p[y.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
1023
|
+
}, Y = (t = !1, C) => {
|
|
1024
|
+
tl(() => {
|
|
1025
|
+
(!n.value || t) && a("search", k(), !!C);
|
|
1026
1026
|
});
|
|
1027
|
-
}, L = (t,
|
|
1028
|
-
var
|
|
1029
|
-
switch (
|
|
1027
|
+
}, L = (t, C) => {
|
|
1028
|
+
var O, y, p;
|
|
1029
|
+
switch (C.valueType) {
|
|
1030
1030
|
case "text":
|
|
1031
|
-
v(
|
|
1031
|
+
v(C.name || "", t || C.initialValue || "");
|
|
1032
1032
|
break;
|
|
1033
1033
|
case "select":
|
|
1034
|
-
v(
|
|
1034
|
+
v(C.name || "", t || t === 0 ? t : C.initialValue || void 0);
|
|
1035
1035
|
break;
|
|
1036
1036
|
case "treeSelect":
|
|
1037
|
-
v(
|
|
1037
|
+
v(C.name || "", t || t === 0 ? t : C.initialValue || ((O = C.field) != null && O.treeCheckable || (y = C.field) != null && y.multiple ? [] : null));
|
|
1038
1038
|
break;
|
|
1039
1039
|
case "date":
|
|
1040
|
-
v(
|
|
1040
|
+
v(C.name || "", t ? q(t).format(C.valueFormat || "YYYY-MM-DD") : C.initialValue || null);
|
|
1041
1041
|
break;
|
|
1042
1042
|
case "dateMonth":
|
|
1043
|
-
v(
|
|
1043
|
+
v(C.name || "", t ? q(t).format("YYYY-MM") : C.initialValue || null);
|
|
1044
1044
|
break;
|
|
1045
1045
|
case "dateRange":
|
|
1046
|
-
v(
|
|
1046
|
+
v(C.name || "", t && t.length > 0 ? [q(t[0]).format(C.valueFormat || "YYYY-MM-DD"), q(t[1]).format(C.valueFormat || "YYYY-MM-DD")] : C.initialValue || null);
|
|
1047
1047
|
break;
|
|
1048
1048
|
case "time":
|
|
1049
|
-
v(
|
|
1049
|
+
v(C.name || "", t ? q(t).format(C.valueFormat || "HH:mm:ss") : C.initialValue || null);
|
|
1050
1050
|
break;
|
|
1051
1051
|
}
|
|
1052
|
-
(
|
|
1052
|
+
(p = e.search) != null && p.showSearch || C.valueType === "text" || (C.valueType === "treeSelect" || C.valueType, Y());
|
|
1053
1053
|
}, z = (t = !0) => {
|
|
1054
|
-
|
|
1054
|
+
$(), Y(!0, t);
|
|
1055
1055
|
};
|
|
1056
1056
|
u({
|
|
1057
1057
|
getFormState: () => k(),
|
|
1058
1058
|
resetForm: z
|
|
1059
1059
|
});
|
|
1060
1060
|
const H = () => {
|
|
1061
|
-
var
|
|
1062
|
-
const t = (
|
|
1061
|
+
var C;
|
|
1062
|
+
const t = (C = d == null ? void 0 : d.emptyText) == null ? void 0 : C.value;
|
|
1063
1063
|
if (t) {
|
|
1064
|
-
const
|
|
1064
|
+
const O = Ce(t), y = O ? bt(t) : yt(t || []);
|
|
1065
1065
|
return r("div", {
|
|
1066
1066
|
class: je(`${e.prefixCls}-search-empty-text`, i.value)
|
|
1067
|
-
}, [
|
|
1067
|
+
}, [O ? y : fe(y) ? y.map((p) => qe(p)) : void 0]);
|
|
1068
1068
|
}
|
|
1069
1069
|
}, re = () => (n.value || c.value) && r(de, null, {
|
|
1070
|
-
default: () => [c.value && r(
|
|
1070
|
+
default: () => [c.value && r(dt, {
|
|
1071
1071
|
onClick: () => z()
|
|
1072
1072
|
}, {
|
|
1073
1073
|
default: () => {
|
|
1074
1074
|
var t;
|
|
1075
1075
|
return [((t = e.search) == null ? void 0 : t.resetText) || "重置"];
|
|
1076
1076
|
}
|
|
1077
|
-
}), n.value && r(
|
|
1077
|
+
}), n.value && r(dt, {
|
|
1078
1078
|
loading: e.loading,
|
|
1079
1079
|
type: "primary",
|
|
1080
1080
|
onClick: () => Y(!0)
|
|
@@ -1084,10 +1084,10 @@ const Jl = (e) => ({
|
|
|
1084
1084
|
return [((t = e.search) == null ? void 0 : t.searchText) || "查询"];
|
|
1085
1085
|
}
|
|
1086
1086
|
})]
|
|
1087
|
-
}),
|
|
1087
|
+
}), N = ({
|
|
1088
1088
|
formItemStyle: t,
|
|
1089
|
-
advanced:
|
|
1090
|
-
showAdvanced:
|
|
1089
|
+
advanced: C,
|
|
1090
|
+
showAdvanced: O = !0
|
|
1091
1091
|
}) => r("div", {
|
|
1092
1092
|
style: t,
|
|
1093
1093
|
class: `${e.prefixCls}-form-collapse-button ${i.value}`
|
|
@@ -1095,23 +1095,23 @@ const Jl = (e) => ({
|
|
|
1095
1095
|
size: 16
|
|
1096
1096
|
}, {
|
|
1097
1097
|
default: () => {
|
|
1098
|
-
var y,
|
|
1099
|
-
return [re(),
|
|
1098
|
+
var y, p;
|
|
1099
|
+
return [re(), O && r("span", {
|
|
1100
1100
|
class: `${e.prefixCls}-a ${i.value}`,
|
|
1101
|
-
onClick: () => P(!
|
|
1102
|
-
}, [
|
|
1101
|
+
onClick: () => P(!C)
|
|
1102
|
+
}, [C ? "收起" : "展开", (y = e.search) != null && y.collapseRender ? (p = e.search) == null ? void 0 : p.collapseRender() : C ? r(ul, null, null) : r(il, null, null)])];
|
|
1103
1103
|
}
|
|
1104
1104
|
})]), Z = (t) => {
|
|
1105
|
-
var y,
|
|
1106
|
-
let
|
|
1107
|
-
const
|
|
1105
|
+
var y, p, E, K;
|
|
1106
|
+
let C;
|
|
1107
|
+
const O = n.value ? ft : ft.Search;
|
|
1108
1108
|
switch (t.valueType) {
|
|
1109
1109
|
case "text":
|
|
1110
|
-
|
|
1110
|
+
C = r(O, X({
|
|
1111
1111
|
style: {
|
|
1112
1112
|
width: "100%"
|
|
1113
1113
|
},
|
|
1114
|
-
value:
|
|
1114
|
+
value: b[t.name],
|
|
1115
1115
|
placeholder: t.placeholder || "请输入",
|
|
1116
1116
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1117
1117
|
onChange: (w) => L(w.target.value, t),
|
|
@@ -1119,11 +1119,11 @@ const Jl = (e) => ({
|
|
|
1119
1119
|
}, t.field || {}), null);
|
|
1120
1120
|
break;
|
|
1121
1121
|
case "select":
|
|
1122
|
-
|
|
1122
|
+
C = r(Cl, X({
|
|
1123
1123
|
style: {
|
|
1124
1124
|
width: "100%"
|
|
1125
1125
|
},
|
|
1126
|
-
value: t.loading ? void 0 :
|
|
1126
|
+
value: t.loading ? void 0 : b[t.name],
|
|
1127
1127
|
optionFilterProp: "label",
|
|
1128
1128
|
placeholder: t.placeholder || "请选择",
|
|
1129
1129
|
showSearch: t.showSearch,
|
|
@@ -1134,18 +1134,18 @@ const Jl = (e) => ({
|
|
|
1134
1134
|
indicator: (y = d == null ? void 0 : d.indicator) == null ? void 0 : y.value
|
|
1135
1135
|
}, null) : H(),
|
|
1136
1136
|
onChange: (w) => L(w, t),
|
|
1137
|
-
options: t.loading ? [] : (
|
|
1137
|
+
options: t.loading ? [] : (p = t == null ? void 0 : t.valueEnum) == null ? void 0 : p.map((w) => ({
|
|
1138
1138
|
label: w.text,
|
|
1139
1139
|
value: w.value
|
|
1140
1140
|
}))
|
|
1141
1141
|
}, t.field || {}), null);
|
|
1142
1142
|
break;
|
|
1143
1143
|
case "treeSelect":
|
|
1144
|
-
|
|
1144
|
+
C = r(bl, X({
|
|
1145
1145
|
style: {
|
|
1146
1146
|
width: "100%"
|
|
1147
1147
|
},
|
|
1148
|
-
value:
|
|
1148
|
+
value: b[t.name],
|
|
1149
1149
|
placeholder: t.placeholder || "请选择",
|
|
1150
1150
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1151
1151
|
treeData: t.loading ? [] : t.valueEnum,
|
|
@@ -1158,11 +1158,11 @@ const Jl = (e) => ({
|
|
|
1158
1158
|
}, t.field || {}), null);
|
|
1159
1159
|
break;
|
|
1160
1160
|
case "date":
|
|
1161
|
-
|
|
1161
|
+
C = r(xt, X({
|
|
1162
1162
|
style: {
|
|
1163
1163
|
width: "100%"
|
|
1164
1164
|
},
|
|
1165
|
-
value:
|
|
1165
|
+
value: b[t.name] ? q(b[t.name], t.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1166
1166
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1167
1167
|
placeholder: t.placeholder || "请选择",
|
|
1168
1168
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
@@ -1173,22 +1173,22 @@ const Jl = (e) => ({
|
|
|
1173
1173
|
}, t.field || {}), null);
|
|
1174
1174
|
break;
|
|
1175
1175
|
case "dateMonth":
|
|
1176
|
-
|
|
1176
|
+
C = r(ea, X({
|
|
1177
1177
|
style: {
|
|
1178
1178
|
width: "100%"
|
|
1179
1179
|
},
|
|
1180
|
-
value:
|
|
1180
|
+
value: b[t.name] ? q(b[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
1181
1181
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1182
1182
|
placeholder: t.placeholder || "请选择",
|
|
1183
1183
|
onChange: (w) => L(w, t)
|
|
1184
1184
|
}, t.field || {}), null);
|
|
1185
1185
|
break;
|
|
1186
1186
|
case "dateRange":
|
|
1187
|
-
|
|
1187
|
+
C = r(ta, X({
|
|
1188
1188
|
style: {
|
|
1189
1189
|
width: "100%"
|
|
1190
1190
|
},
|
|
1191
|
-
value: (K =
|
|
1191
|
+
value: (K = b[t.name]) != null && K.length ? [q(b[t.name][0], t.valueFormat || "YYYY-MM-DD HH:mm:ss"), q(b[t.name][1], t.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1192
1192
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1193
1193
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
1194
1194
|
format: t.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1197,11 +1197,11 @@ const Jl = (e) => ({
|
|
|
1197
1197
|
}, t.field || {}), null);
|
|
1198
1198
|
break;
|
|
1199
1199
|
case "time":
|
|
1200
|
-
|
|
1200
|
+
C = r(yl, X({
|
|
1201
1201
|
style: {
|
|
1202
1202
|
width: "100%"
|
|
1203
1203
|
},
|
|
1204
|
-
value:
|
|
1204
|
+
value: b[t.name] ? q(b[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
1205
1205
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1206
1206
|
placeholder: t.placeholder || "请选择",
|
|
1207
1207
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
@@ -1211,57 +1211,57 @@ const Jl = (e) => ({
|
|
|
1211
1211
|
}, t.field || {}), null);
|
|
1212
1212
|
break;
|
|
1213
1213
|
}
|
|
1214
|
-
return
|
|
1214
|
+
return C;
|
|
1215
1215
|
}, _ = ({
|
|
1216
1216
|
formItemStyle: t,
|
|
1217
|
-
item:
|
|
1217
|
+
item: C
|
|
1218
1218
|
}) => r("div", {
|
|
1219
1219
|
class: `${e.prefixCls}-form-item`,
|
|
1220
1220
|
style: t
|
|
1221
|
-
}, [r(
|
|
1222
|
-
default: () => [
|
|
1221
|
+
}, [r(ct.Item, null, {
|
|
1222
|
+
default: () => [C.__v_isVNode ? C : Z(C)]
|
|
1223
1223
|
})]), we = () => {
|
|
1224
|
-
var
|
|
1225
|
-
const t = [...e.searchMap, ...((
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1224
|
+
var O;
|
|
1225
|
+
const t = [...e.searchMap, ...((O = l.default) == null ? void 0 : O.call(l)) || []], C = {
|
|
1226
|
+
width: `${(100 - (S.value - 1) * 2) / S.value}%`
|
|
1227
|
+
};
|
|
1228
|
+
return t.map((y, p) => {
|
|
1229
|
+
const E = R(p, S.value, C);
|
|
1230
1230
|
return t.length < S.value || s.value ? r(Ne, null, [_({
|
|
1231
1231
|
formItemStyle: E,
|
|
1232
|
-
item:
|
|
1233
|
-
}),
|
|
1232
|
+
item: y
|
|
1233
|
+
}), p === t.length - 1 && N({
|
|
1234
1234
|
formItemStyle: {
|
|
1235
1235
|
flex: 1,
|
|
1236
1236
|
justifyContent: "flex-end"
|
|
1237
1237
|
},
|
|
1238
1238
|
advanced: s.value,
|
|
1239
1239
|
showAdvanced: s.value
|
|
1240
|
-
})]) : r(Ne, null, [
|
|
1240
|
+
})]) : r(Ne, null, [p < S.value - 1 && _({
|
|
1241
1241
|
formItemStyle: E,
|
|
1242
|
-
item:
|
|
1243
|
-
}),
|
|
1242
|
+
item: y
|
|
1243
|
+
}), p === S.value - 1 && (S.value - 1 === 0 || t.length === S.value) && _({
|
|
1244
1244
|
formItemStyle: E,
|
|
1245
|
-
item:
|
|
1246
|
-
}),
|
|
1245
|
+
item: y
|
|
1246
|
+
}), p === S.value - 1 && t.length >= S.value && N({
|
|
1247
1247
|
formItemStyle: {
|
|
1248
1248
|
flex: 1,
|
|
1249
1249
|
justifyContent: "flex-end"
|
|
1250
1250
|
},
|
|
1251
1251
|
advanced: !1,
|
|
1252
|
-
showAdvanced: t.length
|
|
1252
|
+
showAdvanced: t.length !== S.value
|
|
1253
1253
|
})]);
|
|
1254
1254
|
});
|
|
1255
1255
|
};
|
|
1256
1256
|
return () => {
|
|
1257
|
-
var t,
|
|
1257
|
+
var t, C;
|
|
1258
1258
|
return o(r("div", {
|
|
1259
1259
|
class: {
|
|
1260
1260
|
[`${i.value}`]: !0,
|
|
1261
1261
|
[`${x(e.prefixCls)}-search`]: !0,
|
|
1262
|
-
[`${(t = e.search) == null ? void 0 : t.className}`]: (
|
|
1262
|
+
[`${(t = e.search) == null ? void 0 : t.className}`]: (C = e.search) == null ? void 0 : C.className
|
|
1263
1263
|
}
|
|
1264
|
-
}, [r(
|
|
1264
|
+
}, [r(ct, {
|
|
1265
1265
|
class: `${x(e.prefixCls)}-form ${i.value}`,
|
|
1266
1266
|
layout: "horizontal"
|
|
1267
1267
|
}, {
|
|
@@ -1279,7 +1279,7 @@ const Pe = (e) => {
|
|
|
1279
1279
|
var u;
|
|
1280
1280
|
return (u = a.value) == null ? void 0 : u.call(a, ...l);
|
|
1281
1281
|
};
|
|
1282
|
-
},
|
|
1282
|
+
}, la = (e) => ({
|
|
1283
1283
|
[`${e.componentCls}`]: {
|
|
1284
1284
|
width: "auto",
|
|
1285
1285
|
"&-title": {
|
|
@@ -1372,21 +1372,21 @@ const Pe = (e) => {
|
|
|
1372
1372
|
const {
|
|
1373
1373
|
cacheColumns: i,
|
|
1374
1374
|
settingsAction: d
|
|
1375
|
-
} =
|
|
1375
|
+
} = me();
|
|
1376
1376
|
return a ? r(ne, {
|
|
1377
1377
|
title: e
|
|
1378
1378
|
}, {
|
|
1379
1379
|
default: () => {
|
|
1380
1380
|
var h;
|
|
1381
1381
|
return [r("span", {
|
|
1382
|
-
onClick: (
|
|
1382
|
+
onClick: (b) => {
|
|
1383
1383
|
var c, g, m;
|
|
1384
|
-
|
|
1385
|
-
const
|
|
1384
|
+
b.stopPropagation(), b.preventDefault();
|
|
1385
|
+
const $ = ((g = (c = x(i)) == null ? void 0 : c.find((S) => S.uuid === l)) == null ? void 0 : g.key) || "", v = (d == null ? void 0 : d.columnsMap[$]) || {};
|
|
1386
1386
|
if (typeof v.disable == "boolean" ? v.disable : (m = v.disable) == null ? void 0 : m.icon) return;
|
|
1387
1387
|
const n = {
|
|
1388
1388
|
...d == null ? void 0 : d.columnsMap,
|
|
1389
|
-
[
|
|
1389
|
+
[$]: {
|
|
1390
1390
|
...v,
|
|
1391
1391
|
fixed: u
|
|
1392
1392
|
}
|
|
@@ -1396,7 +1396,7 @@ const Pe = (e) => {
|
|
|
1396
1396
|
}, [(h = o.default) == null ? void 0 : h.call(o)])];
|
|
1397
1397
|
}
|
|
1398
1398
|
}) : null;
|
|
1399
|
-
},
|
|
1399
|
+
}, aa = /* @__PURE__ */ oe({
|
|
1400
1400
|
props: {
|
|
1401
1401
|
treeKey: String,
|
|
1402
1402
|
hashId: String,
|
|
@@ -1408,7 +1408,7 @@ const Pe = (e) => {
|
|
|
1408
1408
|
setup(e) {
|
|
1409
1409
|
const {
|
|
1410
1410
|
cacheColumns: a
|
|
1411
|
-
} =
|
|
1411
|
+
} = me(), l = T(() => {
|
|
1412
1412
|
var o, i;
|
|
1413
1413
|
return ((i = (o = x(a)) == null ? void 0 : o.find((d) => d.uuid === e.treeKey)) == null ? void 0 : i.key) || "";
|
|
1414
1414
|
}), u = T(() => l.value === "action" && e.autoScroll);
|
|
@@ -1421,21 +1421,21 @@ const Pe = (e) => {
|
|
|
1421
1421
|
title: "固定在列首",
|
|
1422
1422
|
show: e.fixed !== "left" && !u.value
|
|
1423
1423
|
}, {
|
|
1424
|
-
default: () => [r(
|
|
1424
|
+
default: () => [r(sl, null, null)]
|
|
1425
1425
|
}), r(Ye, {
|
|
1426
1426
|
treeKey: e.treeKey || "",
|
|
1427
1427
|
fixed: void 0,
|
|
1428
1428
|
title: "不固定",
|
|
1429
1429
|
show: !!e.fixed && !u.value
|
|
1430
1430
|
}, {
|
|
1431
|
-
default: () => [r(
|
|
1431
|
+
default: () => [r(ol, null, null)]
|
|
1432
1432
|
}), r(Ye, {
|
|
1433
1433
|
treeKey: e.treeKey || "",
|
|
1434
1434
|
fixed: "right",
|
|
1435
1435
|
title: "固定在列尾",
|
|
1436
1436
|
show: e.fixed !== "right"
|
|
1437
1437
|
}, {
|
|
1438
|
-
default: () => [r(
|
|
1438
|
+
default: () => [r(rl, null, null)]
|
|
1439
1439
|
})]);
|
|
1440
1440
|
return r("span", {
|
|
1441
1441
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1464,7 +1464,7 @@ const Pe = (e) => {
|
|
|
1464
1464
|
cacheColumns: i,
|
|
1465
1465
|
slots: d,
|
|
1466
1466
|
settingsAction: h
|
|
1467
|
-
} =
|
|
1467
|
+
} = me(), b = (n, c) => n.map(({
|
|
1468
1468
|
key: g,
|
|
1469
1469
|
children: m,
|
|
1470
1470
|
uuid: S,
|
|
@@ -1485,23 +1485,23 @@ const Pe = (e) => {
|
|
|
1485
1485
|
disableCheckbox: typeof R.disable == "boolean" ? R.disable : (L = R.disable) == null ? void 0 : L.checkbox,
|
|
1486
1486
|
isLeaf: !0
|
|
1487
1487
|
};
|
|
1488
|
-
return m && (Y.children =
|
|
1488
|
+
return m && (Y.children = b(m, R)), Y;
|
|
1489
1489
|
});
|
|
1490
1490
|
Ie(() => {
|
|
1491
|
-
const n =
|
|
1491
|
+
const n = b(e.list || []);
|
|
1492
1492
|
u.value = n, o.value = n.filter((c) => c.checked).map((c) => c.key), (h == null ? void 0 : h.operationType.value) === "fixed" && (a.value = We().uuid(15));
|
|
1493
1493
|
});
|
|
1494
|
-
const
|
|
1494
|
+
const $ = Pe((n, c, g) => {
|
|
1495
1495
|
var H, re;
|
|
1496
|
-
const m = ((H = x(i).find((
|
|
1496
|
+
const m = ((H = x(i).find((N) => N.uuid === n)) == null ? void 0 : H.key) || "", S = ((re = x(i).find((N) => N.uuid === c)) == null ? void 0 : re.key) || "", P = {
|
|
1497
1497
|
...h == null ? void 0 : h.columnsMap
|
|
1498
|
-
}, R = [...h.sortKeyColumns.value], k = R.findIndex((
|
|
1498
|
+
}, R = [...h.sortKeyColumns.value], k = R.findIndex((N) => N === m), Y = R.findIndex((N) => N === S), L = g > k;
|
|
1499
1499
|
if (k < 0)
|
|
1500
1500
|
return;
|
|
1501
1501
|
const z = R[k];
|
|
1502
|
-
R.splice(k, 1), g === 0 ? R.unshift(z) : R.splice(L ? Y : Y + 1, 0, z), R.forEach((
|
|
1503
|
-
P[
|
|
1504
|
-
...P[
|
|
1502
|
+
R.splice(k, 1), g === 0 ? R.unshift(z) : R.splice(L ? Y : Y + 1, 0, z), R.forEach((N, Z) => {
|
|
1503
|
+
P[N] = {
|
|
1504
|
+
...P[N] || {},
|
|
1505
1505
|
order: Z
|
|
1506
1506
|
};
|
|
1507
1507
|
}), h == null || h.setColumnsMap(P, "drop"), h == null || h.setSortKeyColumns(R);
|
|
@@ -1518,7 +1518,7 @@ const Pe = (e) => {
|
|
|
1518
1518
|
h == null || h.setColumnsMap(P, "show");
|
|
1519
1519
|
}), s = (n) => {
|
|
1520
1520
|
const c = x(i).find((g) => g.uuid === n.key);
|
|
1521
|
-
return n.title ||
|
|
1521
|
+
return n.title || ll(d, "headerCell", {
|
|
1522
1522
|
title: c.title,
|
|
1523
1523
|
column: c
|
|
1524
1524
|
}, () => [c.title]);
|
|
@@ -1527,7 +1527,7 @@ const Pe = (e) => {
|
|
|
1527
1527
|
var n, c;
|
|
1528
1528
|
return l.value ? r(Ne, null, [e.showTitle && r("span", {
|
|
1529
1529
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1530
|
-
}, [e.title]), r(
|
|
1530
|
+
}, [e.title]), r(wl, {
|
|
1531
1531
|
key: a.value,
|
|
1532
1532
|
draggable: e.draggable && !!((n = u.value) != null && n.length) && ((c = u.value) == null ? void 0 : c.length) > 1,
|
|
1533
1533
|
checkable: e.checkable,
|
|
@@ -1540,7 +1540,7 @@ const Pe = (e) => {
|
|
|
1540
1540
|
dropPosition: P,
|
|
1541
1541
|
dropToGap: R
|
|
1542
1542
|
} = g, k = P === -1 || !R ? P + 1 : P;
|
|
1543
|
-
|
|
1543
|
+
$(S, m, k);
|
|
1544
1544
|
},
|
|
1545
1545
|
onCheck: (g, m) => v(m),
|
|
1546
1546
|
treeData: u.value
|
|
@@ -1553,7 +1553,7 @@ const Pe = (e) => {
|
|
|
1553
1553
|
title: s(g),
|
|
1554
1554
|
autoScroll: (S = h == null ? void 0 : h.autoScroll) == null ? void 0 : S.value
|
|
1555
1555
|
};
|
|
1556
|
-
return r(
|
|
1556
|
+
return r(aa, X({
|
|
1557
1557
|
hashId: e.hashId,
|
|
1558
1558
|
className: e.className
|
|
1559
1559
|
}, m, {
|
|
@@ -1563,7 +1563,7 @@ const Pe = (e) => {
|
|
|
1563
1563
|
})]) : null;
|
|
1564
1564
|
};
|
|
1565
1565
|
}
|
|
1566
|
-
}),
|
|
1566
|
+
}), na = /* @__PURE__ */ oe({
|
|
1567
1567
|
props: {
|
|
1568
1568
|
hashId: String,
|
|
1569
1569
|
className: String,
|
|
@@ -1573,25 +1573,25 @@ const Pe = (e) => {
|
|
|
1573
1573
|
setup(e) {
|
|
1574
1574
|
const {
|
|
1575
1575
|
columns: a
|
|
1576
|
-
} =
|
|
1577
|
-
W(() => a.value, (
|
|
1578
|
-
l.value = [], u.value = [], o.value = [],
|
|
1579
|
-
if (
|
|
1576
|
+
} = me(), l = D([]), u = D([]), o = D([]), i = D([]);
|
|
1577
|
+
W(() => a.value, (b) => {
|
|
1578
|
+
l.value = [], u.value = [], o.value = [], b.forEach(($) => {
|
|
1579
|
+
if ($.hideInSetting)
|
|
1580
1580
|
return;
|
|
1581
1581
|
const {
|
|
1582
1582
|
fixed: v,
|
|
1583
1583
|
show: s,
|
|
1584
1584
|
uuid: n
|
|
1585
|
-
} =
|
|
1585
|
+
} = $;
|
|
1586
1586
|
if ((s || s === void 0) && n && i.value.push(n), v === "left") {
|
|
1587
|
-
u.value.push(
|
|
1587
|
+
u.value.push($);
|
|
1588
1588
|
return;
|
|
1589
1589
|
}
|
|
1590
1590
|
if (v === "right") {
|
|
1591
|
-
l.value.push(
|
|
1591
|
+
l.value.push($);
|
|
1592
1592
|
return;
|
|
1593
1593
|
}
|
|
1594
|
-
o.value.push(
|
|
1594
|
+
o.value.push($);
|
|
1595
1595
|
});
|
|
1596
1596
|
}, {
|
|
1597
1597
|
immediate: !0
|
|
@@ -1630,7 +1630,7 @@ const Pe = (e) => {
|
|
|
1630
1630
|
className: e.className
|
|
1631
1631
|
}, null)]);
|
|
1632
1632
|
}
|
|
1633
|
-
}),
|
|
1633
|
+
}), ua = /* @__PURE__ */ oe({
|
|
1634
1634
|
props: {
|
|
1635
1635
|
draggable: {
|
|
1636
1636
|
type: Boolean,
|
|
@@ -1650,10 +1650,10 @@ const Pe = (e) => {
|
|
|
1650
1650
|
}), {
|
|
1651
1651
|
wrapSSR: l,
|
|
1652
1652
|
hashId: u
|
|
1653
|
-
} = ze("ColumnSetting", [
|
|
1653
|
+
} = ze("ColumnSetting", [la], a), {
|
|
1654
1654
|
columns: o,
|
|
1655
1655
|
settingsAction: i
|
|
1656
|
-
} =
|
|
1656
|
+
} = me(), d = Pe((s = !0) => {
|
|
1657
1657
|
const n = {}, c = (g) => {
|
|
1658
1658
|
g.forEach(({
|
|
1659
1659
|
key: m,
|
|
@@ -1661,7 +1661,7 @@ const Pe = (e) => {
|
|
|
1661
1661
|
index: P,
|
|
1662
1662
|
children: R
|
|
1663
1663
|
}) => {
|
|
1664
|
-
const k =
|
|
1664
|
+
const k = vt(m, P);
|
|
1665
1665
|
k && (n[k] = {
|
|
1666
1666
|
show: s,
|
|
1667
1667
|
fixed: S
|
|
@@ -1671,24 +1671,24 @@ const Pe = (e) => {
|
|
|
1671
1671
|
c(o.value), i == null || i.setColumnsMap(n, "show");
|
|
1672
1672
|
}), h = Pe((s) => {
|
|
1673
1673
|
s.target.checked ? d() : d(!1);
|
|
1674
|
-
}),
|
|
1674
|
+
}), b = Pe(() => {
|
|
1675
1675
|
i == null || i.setColumnsMap(i == null ? void 0 : i.cacheColumnsMap, "fixed");
|
|
1676
|
-
}),
|
|
1676
|
+
}), $ = T(() => (
|
|
1677
1677
|
// @ts-ignore
|
|
1678
1678
|
Object.values(i == null ? void 0 : i.columnsMap).filter((s) => !s || s.show === !1)
|
|
1679
|
-
)), v = T(() => x(
|
|
1680
|
-
return () => l(r(
|
|
1679
|
+
)), v = T(() => x($).length > 0 && x($).length !== o.value.length);
|
|
1680
|
+
return () => l(r(Sl, {
|
|
1681
1681
|
arrowPointAtCenter: !0,
|
|
1682
1682
|
title: r("div", {
|
|
1683
1683
|
class: [`${a}-title`, u.value]
|
|
1684
|
-
}, [r(
|
|
1684
|
+
}, [r(xl, {
|
|
1685
1685
|
indeterminate: v.value,
|
|
1686
|
-
checked: x(
|
|
1686
|
+
checked: x($).length === 0 && x($).length !== o.value.length,
|
|
1687
1687
|
onChange: (s) => h(s)
|
|
1688
1688
|
}, {
|
|
1689
1689
|
default: () => [Re("列展示")]
|
|
1690
1690
|
}), e.checkedReset ? r("a", {
|
|
1691
|
-
onClick:
|
|
1691
|
+
onClick: b,
|
|
1692
1692
|
class: [`${a}-action-rest-button`, u.value]
|
|
1693
1693
|
}, [Re("重置")]) : null, e != null && e.extra ? r(de, {
|
|
1694
1694
|
size: 12,
|
|
@@ -1699,7 +1699,7 @@ const Pe = (e) => {
|
|
|
1699
1699
|
overlayClassName: `${a}-overlay ${u.value}`,
|
|
1700
1700
|
trigger: "click",
|
|
1701
1701
|
placement: "bottomRight",
|
|
1702
|
-
content: r(
|
|
1702
|
+
content: r(na, {
|
|
1703
1703
|
hashId: u.value,
|
|
1704
1704
|
checkable: e.checkable ?? !0,
|
|
1705
1705
|
draggable: e.draggable ?? !0,
|
|
@@ -1709,31 +1709,31 @@ const Pe = (e) => {
|
|
|
1709
1709
|
default: () => [r(ne, {
|
|
1710
1710
|
title: "列设置"
|
|
1711
1711
|
}, {
|
|
1712
|
-
default: () => [r(
|
|
1712
|
+
default: () => [r(Ct, null, null)]
|
|
1713
1713
|
})]
|
|
1714
1714
|
}));
|
|
1715
1715
|
}
|
|
1716
|
-
}),
|
|
1716
|
+
}), $t = /* @__PURE__ */ oe({
|
|
1717
1717
|
setup() {
|
|
1718
1718
|
const {
|
|
1719
1719
|
isFullscreen: e
|
|
1720
|
-
} =
|
|
1720
|
+
} = St();
|
|
1721
1721
|
return () => e.value ? r(ne, {
|
|
1722
1722
|
title: "退出全屏"
|
|
1723
1723
|
}, {
|
|
1724
|
-
default: () => [r(
|
|
1724
|
+
default: () => [r(cl, null, null)]
|
|
1725
1725
|
}) : r(ne, {
|
|
1726
1726
|
title: "全屏"
|
|
1727
1727
|
}, {
|
|
1728
|
-
default: () => [r(
|
|
1728
|
+
default: () => [r(dl, null, null)]
|
|
1729
1729
|
});
|
|
1730
1730
|
}
|
|
1731
|
-
}),
|
|
1731
|
+
}), ia = () => {
|
|
1732
1732
|
const {
|
|
1733
1733
|
action: e,
|
|
1734
1734
|
tableSize: a
|
|
1735
|
-
} =
|
|
1736
|
-
return r(
|
|
1735
|
+
} = me();
|
|
1736
|
+
return r(pl, {
|
|
1737
1737
|
overlay: r(ke, {
|
|
1738
1738
|
selectedKeys: [a.value],
|
|
1739
1739
|
onClick: ({
|
|
@@ -1765,10 +1765,10 @@ const Pe = (e) => {
|
|
|
1765
1765
|
default: () => [r(ne, {
|
|
1766
1766
|
title: "表格密度"
|
|
1767
1767
|
}, {
|
|
1768
|
-
default: () => [r(
|
|
1768
|
+
default: () => [r(fl, null, null)]
|
|
1769
1769
|
})]
|
|
1770
1770
|
});
|
|
1771
|
-
},
|
|
1771
|
+
}, sa = (e) => ({
|
|
1772
1772
|
[`${e.componentCls}`]: {
|
|
1773
1773
|
lineHeight: 1,
|
|
1774
1774
|
"&-container": {
|
|
@@ -1810,13 +1810,13 @@ const Pe = (e) => {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
}
|
|
1812
1812
|
});
|
|
1813
|
-
function
|
|
1813
|
+
function ht(e) {
|
|
1814
1814
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
1815
1815
|
}
|
|
1816
1816
|
const {
|
|
1817
|
-
useBreakpoint:
|
|
1817
|
+
useBreakpoint: oa
|
|
1818
1818
|
} = Ue;
|
|
1819
|
-
function
|
|
1819
|
+
function ra(e) {
|
|
1820
1820
|
if (Ce(e))
|
|
1821
1821
|
return e;
|
|
1822
1822
|
if (e) {
|
|
@@ -1839,34 +1839,34 @@ function oa(e) {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
return null;
|
|
1841
1841
|
}
|
|
1842
|
-
const
|
|
1842
|
+
const Ft = /* @__PURE__ */ oe({
|
|
1843
1843
|
props: {
|
|
1844
|
-
actions:
|
|
1844
|
+
actions: be.toolBarBtn,
|
|
1845
1845
|
settings: [Array],
|
|
1846
|
-
titleTip:
|
|
1846
|
+
titleTip: be.titleTip,
|
|
1847
1847
|
prefixCls: String,
|
|
1848
|
-
headerTitle:
|
|
1849
|
-
titleTipText:
|
|
1850
|
-
optionsExtra:
|
|
1848
|
+
headerTitle: be.headerTitle,
|
|
1849
|
+
titleTipText: be.titleTipText,
|
|
1850
|
+
optionsExtra: be.optionsExtra
|
|
1851
1851
|
},
|
|
1852
1852
|
setup(e) {
|
|
1853
1853
|
const {
|
|
1854
1854
|
wrapSSR: a,
|
|
1855
1855
|
hashId: l
|
|
1856
|
-
} = ze("ListToolBar", [
|
|
1856
|
+
} = ze("ListToolBar", [sa], e.prefixCls), u = oa(), {
|
|
1857
1857
|
isMobile: o
|
|
1858
|
-
} =
|
|
1858
|
+
} = me(), i = T(() => {
|
|
1859
1859
|
var n;
|
|
1860
1860
|
return !!(e.titleTip || e.headerTitle || (n = e.actions) != null && n.length);
|
|
1861
1861
|
}), d = T(() => {
|
|
1862
1862
|
var n;
|
|
1863
1863
|
return !!((n = e.settings) != null && n.length || e.optionsExtra);
|
|
1864
|
-
}), h = T(() => !!(e.titleTip || e.headerTitle)),
|
|
1864
|
+
}), h = T(() => !!(e.titleTip || e.headerTitle)), b = T(() => {
|
|
1865
1865
|
var c;
|
|
1866
1866
|
let n;
|
|
1867
1867
|
return Array.isArray(e.actions) ? ((c = e.actions) == null ? void 0 : c.length) < 1 ? null : r(de, {
|
|
1868
1868
|
align: "center"
|
|
1869
|
-
},
|
|
1869
|
+
}, ht(n = e.actions.map((g, m) => Ce(g) ? qe(g, {
|
|
1870
1870
|
key: m,
|
|
1871
1871
|
...g == null ? void 0 : g.props
|
|
1872
1872
|
}) : r("template", {
|
|
@@ -1874,7 +1874,7 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1874
1874
|
}, [g]))) ? n : {
|
|
1875
1875
|
default: () => [n]
|
|
1876
1876
|
}) : e.actions;
|
|
1877
|
-
}),
|
|
1877
|
+
}), $ = Me(() => !i.value && d.value ? r("div", {
|
|
1878
1878
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1879
1879
|
}, null) : h.value ? r(de, {
|
|
1880
1880
|
class: `${e.prefixCls}-left ${l.value}`
|
|
@@ -1884,16 +1884,16 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1884
1884
|
}, [e.headerTitle, e.titleTip && r(ne, {
|
|
1885
1885
|
title: e.titleTipText
|
|
1886
1886
|
}, {
|
|
1887
|
-
default: () => [se(e.titleTip) && e.titleTip ? r(
|
|
1888
|
-
})]),
|
|
1887
|
+
default: () => [se(e.titleTip) && e.titleTip ? r(hl, null, null) : e.titleTip]
|
|
1888
|
+
})]), b.value && r("div", {
|
|
1889
1889
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
1890
|
-
}, [
|
|
1890
|
+
}, [b.value])]
|
|
1891
1891
|
}) : r(de, {
|
|
1892
1892
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1893
1893
|
}, {
|
|
1894
|
-
default: () => [
|
|
1894
|
+
default: () => [b.value && r("div", {
|
|
1895
1895
|
class: `${e.prefixCls}-actions`
|
|
1896
|
-
}, [
|
|
1896
|
+
}, [b.value])]
|
|
1897
1897
|
}), [() => i.value, () => d.value, () => h.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), v = Me(() => {
|
|
1898
1898
|
let n;
|
|
1899
1899
|
return d.value ? r(de, {
|
|
@@ -1908,8 +1908,8 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1908
1908
|
size: 12,
|
|
1909
1909
|
align: "center",
|
|
1910
1910
|
class: `${e.prefixCls}-setting-items`
|
|
1911
|
-
},
|
|
1912
|
-
const S =
|
|
1911
|
+
}, ht(n = e.settings.map((g, m) => {
|
|
1912
|
+
const S = ra(g);
|
|
1913
1913
|
return r("div", {
|
|
1914
1914
|
key: m,
|
|
1915
1915
|
class: `${e.prefixCls}-setting-item`
|
|
@@ -1919,7 +1919,7 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1919
1919
|
}) : null];
|
|
1920
1920
|
}
|
|
1921
1921
|
}) : null;
|
|
1922
|
-
}, [() => u.value, () => d.value, () => e.prefixCls, () => h.value, () =>
|
|
1922
|
+
}, [() => u.value, () => d.value, () => e.prefixCls, () => h.value, () => b.value, () => e.settings]), s = Me(() => {
|
|
1923
1923
|
if (!d.value && !i.value) return null;
|
|
1924
1924
|
const n = {
|
|
1925
1925
|
[`${l.value}`]: !0,
|
|
@@ -1928,35 +1928,35 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1928
1928
|
};
|
|
1929
1929
|
return r("div", {
|
|
1930
1930
|
class: n
|
|
1931
|
-
}, [
|
|
1932
|
-
}, [() => o.value, () => i.value, () => d.value, () =>
|
|
1931
|
+
}, [$.value, v.value]);
|
|
1932
|
+
}, [() => o.value, () => i.value, () => d.value, () => $.value, () => e.prefixCls, () => v.value]);
|
|
1933
1933
|
return () => a(r("div", {
|
|
1934
1934
|
class: `${e.prefixCls} ${l.value}`
|
|
1935
1935
|
}, [s.value]));
|
|
1936
1936
|
}
|
|
1937
1937
|
});
|
|
1938
|
-
|
|
1939
|
-
function
|
|
1938
|
+
Ft.inheritAttrs = !1;
|
|
1939
|
+
function ca() {
|
|
1940
1940
|
return {
|
|
1941
1941
|
reload: {
|
|
1942
1942
|
text: "刷新",
|
|
1943
|
-
icon: r(
|
|
1943
|
+
icon: r(ml, null, null)
|
|
1944
1944
|
},
|
|
1945
1945
|
density: {
|
|
1946
1946
|
text: "表格密度",
|
|
1947
|
-
icon: r(
|
|
1947
|
+
icon: r(ia, null, null)
|
|
1948
1948
|
},
|
|
1949
1949
|
setting: {
|
|
1950
1950
|
text: "列设置",
|
|
1951
|
-
icon: r(
|
|
1951
|
+
icon: r(Ct, null, null)
|
|
1952
1952
|
},
|
|
1953
1953
|
fullScreen: {
|
|
1954
1954
|
text: "全屏",
|
|
1955
|
-
icon: r(
|
|
1955
|
+
icon: r($t, null, null)
|
|
1956
1956
|
}
|
|
1957
1957
|
};
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function da(e, a) {
|
|
1960
1960
|
return Object.keys(e).filter((l) => l).map((l) => {
|
|
1961
1961
|
const u = e[l];
|
|
1962
1962
|
if (!u)
|
|
@@ -1964,15 +1964,15 @@ function ca(e, a) {
|
|
|
1964
1964
|
let o = u === !0 ? a[l] : () => u == null ? void 0 : u();
|
|
1965
1965
|
if (typeof o != "function" && (o = () => {
|
|
1966
1966
|
}), l === "setting")
|
|
1967
|
-
return r(
|
|
1967
|
+
return r(ua, X(e[l], {
|
|
1968
1968
|
key: l
|
|
1969
1969
|
}), null);
|
|
1970
1970
|
if (l === "fullScreen")
|
|
1971
1971
|
return r("span", {
|
|
1972
1972
|
key: l,
|
|
1973
1973
|
onClick: o
|
|
1974
|
-
}, [r(
|
|
1975
|
-
const i =
|
|
1974
|
+
}, [r($t, null, null)]);
|
|
1975
|
+
const i = ca()[l];
|
|
1976
1976
|
return i ? r("span", {
|
|
1977
1977
|
key: l,
|
|
1978
1978
|
onClick: o
|
|
@@ -1983,7 +1983,7 @@ function ca(e, a) {
|
|
|
1983
1983
|
})]) : null;
|
|
1984
1984
|
}).filter((l) => l);
|
|
1985
1985
|
}
|
|
1986
|
-
const
|
|
1986
|
+
const fa = {
|
|
1987
1987
|
options: [Boolean, Object, Array],
|
|
1988
1988
|
titleTip: [Function, Boolean, Object, String],
|
|
1989
1989
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -1991,8 +1991,8 @@ const da = {
|
|
|
1991
1991
|
titleTipText: [String],
|
|
1992
1992
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
1993
1993
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
1994
|
-
},
|
|
1995
|
-
props:
|
|
1994
|
+
}, ha = /* @__PURE__ */ oe({
|
|
1995
|
+
props: fa,
|
|
1996
1996
|
inheritAttrs: !1,
|
|
1997
1997
|
setup(e) {
|
|
1998
1998
|
const a = Ge({
|
|
@@ -2000,7 +2000,7 @@ const da = {
|
|
|
2000
2000
|
isPor: !0
|
|
2001
2001
|
}), {
|
|
2002
2002
|
action: l
|
|
2003
|
-
} =
|
|
2003
|
+
} = me(), u = Me(() => {
|
|
2004
2004
|
var d;
|
|
2005
2005
|
const o = {
|
|
2006
2006
|
reload: () => l == null ? void 0 : l.reload(),
|
|
@@ -2013,13 +2013,13 @@ const da = {
|
|
|
2013
2013
|
...o,
|
|
2014
2014
|
...e.options
|
|
2015
2015
|
};
|
|
2016
|
-
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra),
|
|
2016
|
+
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), da(i, {
|
|
2017
2017
|
...o
|
|
2018
2018
|
});
|
|
2019
2019
|
}, [() => l, () => e.options]);
|
|
2020
2020
|
return () => {
|
|
2021
2021
|
const o = e.toolBarBtn || [];
|
|
2022
|
-
return r(
|
|
2022
|
+
return r(Ft, {
|
|
2023
2023
|
prefixCls: a,
|
|
2024
2024
|
optionsExtra: e.optionsExtra,
|
|
2025
2025
|
headerTitle: e.headerTitle,
|
|
@@ -2043,7 +2043,7 @@ const da = {
|
|
|
2043
2043
|
backgroundColor: "transparent",
|
|
2044
2044
|
borderRadius: 2
|
|
2045
2045
|
}
|
|
2046
|
-
},
|
|
2046
|
+
}, ma = (e) => {
|
|
2047
2047
|
const a = `${e.antCls}-table`;
|
|
2048
2048
|
return {
|
|
2049
2049
|
[e.componentCls]: {
|
|
@@ -2234,8 +2234,8 @@ const da = {
|
|
|
2234
2234
|
}
|
|
2235
2235
|
};
|
|
2236
2236
|
}, {
|
|
2237
|
-
useBreakpoint:
|
|
2238
|
-
} = Ue,
|
|
2237
|
+
useBreakpoint: va
|
|
2238
|
+
} = Ue, ga = {
|
|
2239
2239
|
reload: !0,
|
|
2240
2240
|
density: !0,
|
|
2241
2241
|
setting: !0,
|
|
@@ -2243,7 +2243,7 @@ const da = {
|
|
|
2243
2243
|
}, He = /* @__PURE__ */ oe({
|
|
2244
2244
|
name: "GProTable",
|
|
2245
2245
|
inheritAttrs: !1,
|
|
2246
|
-
props:
|
|
2246
|
+
props: be,
|
|
2247
2247
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
|
|
2248
2248
|
slots: Object,
|
|
2249
2249
|
setup(e, {
|
|
@@ -2258,18 +2258,18 @@ const da = {
|
|
|
2258
2258
|
}), {
|
|
2259
2259
|
wrapSSR: d,
|
|
2260
2260
|
hashId: h
|
|
2261
|
-
} = ze("ProBaseTable", [
|
|
2262
|
-
width:
|
|
2263
|
-
} =
|
|
2261
|
+
} = ze("ProBaseTable", [ma], i), b = va(), {
|
|
2262
|
+
width: $
|
|
2263
|
+
} = gl(), v = wt(), s = D(), n = D(), c = D(e.waitRequest);
|
|
2264
2264
|
Ie(() => c.value = e.waitRequest);
|
|
2265
2265
|
const {
|
|
2266
2266
|
toggle: g,
|
|
2267
2267
|
isFullscreen: m
|
|
2268
|
-
} =
|
|
2268
|
+
} = St(s), S = T(() => ({
|
|
2269
2269
|
...e
|
|
2270
|
-
})), P = T(() => !
|
|
2270
|
+
})), P = T(() => !b.value.xl), R = T(() => {
|
|
2271
2271
|
var f, F;
|
|
2272
|
-
return e.virtualScroll &&
|
|
2272
|
+
return e.virtualScroll && al(!((f = e.scroll) != null && f.y), "参数scroll的Y值不能为空!"), !!((F = e.scroll) != null && F.y && e.virtualScroll);
|
|
2273
2273
|
}), k = T(() => {
|
|
2274
2274
|
const f = (e.columns || []).filter((F) => F.key || F.dataIndex).map((F) => ({
|
|
2275
2275
|
...F,
|
|
@@ -2277,7 +2277,7 @@ const da = {
|
|
|
2277
2277
|
align: F.align || e.align,
|
|
2278
2278
|
uuid: We().uuid(15)
|
|
2279
2279
|
}));
|
|
2280
|
-
return
|
|
2280
|
+
return Ut(f, {
|
|
2281
2281
|
align: e.align || "left",
|
|
2282
2282
|
showIndex: e.showIndex || !1
|
|
2283
2283
|
});
|
|
@@ -2285,40 +2285,40 @@ const da = {
|
|
|
2285
2285
|
loadingComputed: Y,
|
|
2286
2286
|
loading: L,
|
|
2287
2287
|
setLoading: z
|
|
2288
|
-
} =
|
|
2288
|
+
} = Ml({
|
|
2289
2289
|
emit: a,
|
|
2290
2290
|
loading: ae(e, "loading")
|
|
2291
2291
|
}), {
|
|
2292
2292
|
sizeRef: H,
|
|
2293
2293
|
setTableSize: re
|
|
2294
|
-
} =
|
|
2294
|
+
} = Nl({
|
|
2295
2295
|
emit: a,
|
|
2296
2296
|
size: ae(e, "size")
|
|
2297
2297
|
}), {
|
|
2298
|
-
paginationInfo:
|
|
2298
|
+
paginationInfo: N,
|
|
2299
2299
|
requestPagination: Z,
|
|
2300
2300
|
setPagination: _
|
|
2301
|
-
} =
|
|
2301
|
+
} = El({
|
|
2302
2302
|
slots: l,
|
|
2303
2303
|
props: S,
|
|
2304
2304
|
pagination: ae(e, "pagination")
|
|
2305
|
-
}), we =
|
|
2305
|
+
}), we = ql(e), {
|
|
2306
2306
|
proScroll: t,
|
|
2307
|
-
breakpoint:
|
|
2308
|
-
} =
|
|
2307
|
+
breakpoint: C
|
|
2308
|
+
} = Ul({
|
|
2309
2309
|
...we,
|
|
2310
|
-
innerWidth:
|
|
2310
|
+
innerWidth: $,
|
|
2311
2311
|
columns: k,
|
|
2312
|
-
screens:
|
|
2313
|
-
}),
|
|
2312
|
+
screens: b
|
|
2313
|
+
}), O = _l(e), {
|
|
2314
2314
|
proColumns: y,
|
|
2315
|
-
cacheProColumns:
|
|
2315
|
+
cacheProColumns: p,
|
|
2316
2316
|
setColumns: E,
|
|
2317
2317
|
changeColumns: K,
|
|
2318
2318
|
resizeColumnWidth: w
|
|
2319
|
-
} =
|
|
2320
|
-
...
|
|
2321
|
-
breakpoint:
|
|
2319
|
+
} = Gl({
|
|
2320
|
+
...O,
|
|
2321
|
+
breakpoint: C,
|
|
2322
2322
|
scroll: t,
|
|
2323
2323
|
columns: k
|
|
2324
2324
|
}), {
|
|
@@ -2326,18 +2326,18 @@ const da = {
|
|
|
2326
2326
|
operationType: Be,
|
|
2327
2327
|
setColumnsMap: ce,
|
|
2328
2328
|
sortKeyColumns: Oe,
|
|
2329
|
-
cacheColumnsMap:
|
|
2329
|
+
cacheColumnsMap: pe,
|
|
2330
2330
|
setSortKeyColumns: J
|
|
2331
|
-
} =
|
|
2332
|
-
columns:
|
|
2331
|
+
} = Wl({
|
|
2332
|
+
columns: p,
|
|
2333
2333
|
columnsState: ae(e, "columnsState"),
|
|
2334
2334
|
changeColumns: K
|
|
2335
2335
|
}), {
|
|
2336
2336
|
formDataRef: ue,
|
|
2337
2337
|
formParamsRef: A,
|
|
2338
|
-
defaultParamsRef:
|
|
2338
|
+
defaultParamsRef: ve,
|
|
2339
2339
|
setFormParams: G
|
|
2340
|
-
} =
|
|
2340
|
+
} = Hl({
|
|
2341
2341
|
search: ae(e, "search"),
|
|
2342
2342
|
searchMap: ae(e, "searchMap"),
|
|
2343
2343
|
params: ae(e, "params"),
|
|
@@ -2345,26 +2345,26 @@ const da = {
|
|
|
2345
2345
|
setPagination: _
|
|
2346
2346
|
}), {
|
|
2347
2347
|
selectedKey: Xe,
|
|
2348
|
-
selectedItem:
|
|
2349
|
-
changeRowKey:
|
|
2348
|
+
selectedItem: Rt,
|
|
2349
|
+
changeRowKey: Pt,
|
|
2350
2350
|
selectRowKey: Je,
|
|
2351
2351
|
selectAllRowKey: Qe,
|
|
2352
2352
|
syncSelectedRows: Ze,
|
|
2353
2353
|
removeRowKeys: et,
|
|
2354
|
-
clearAllRowKeys:
|
|
2355
|
-
} =
|
|
2354
|
+
clearAllRowKeys: It
|
|
2355
|
+
} = Kl(ae(e, "rowKey"), ae(e, "rowSelection")), Bt = Yl(e), {
|
|
2356
2356
|
reload: Ae,
|
|
2357
|
-
reSetDataList:
|
|
2358
|
-
changeDataValue:
|
|
2359
|
-
isTreeDataRef:
|
|
2360
|
-
dataSource:
|
|
2357
|
+
reSetDataList: Ot,
|
|
2358
|
+
changeDataValue: kt,
|
|
2359
|
+
isTreeDataRef: Dt,
|
|
2360
|
+
dataSource: Te,
|
|
2361
2361
|
handleTableChange: tt
|
|
2362
|
-
} =
|
|
2363
|
-
...
|
|
2362
|
+
} = Ll({
|
|
2363
|
+
...Bt,
|
|
2364
2364
|
waitRequest: c
|
|
2365
2365
|
}, {
|
|
2366
2366
|
loading: Y,
|
|
2367
|
-
paginationInfo:
|
|
2367
|
+
paginationInfo: N,
|
|
2368
2368
|
setPagination: _,
|
|
2369
2369
|
removeRowKeys: et,
|
|
2370
2370
|
syncSelectedRows: Ze,
|
|
@@ -2375,13 +2375,13 @@ const da = {
|
|
|
2375
2375
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2376
2376
|
hasCustomRender: T(() => xe(e.customRender || (l == null ? void 0 : l.customRender)))
|
|
2377
2377
|
}, a), $e = T(() => e.options ? {
|
|
2378
|
-
...
|
|
2378
|
+
...ga,
|
|
2379
2379
|
...Q(e.options) ? e.options : {}
|
|
2380
|
-
} : !1),
|
|
2380
|
+
} : !1), jt = T(() => ({
|
|
2381
2381
|
size: x(H),
|
|
2382
2382
|
scroll: x(t),
|
|
2383
|
-
dataSource: x(
|
|
2384
|
-
pagination: x(
|
|
2383
|
+
dataSource: x(Te),
|
|
2384
|
+
pagination: x(N),
|
|
2385
2385
|
virtualScroll: R.value,
|
|
2386
2386
|
columns: x(y).filter((f) => f.show || f.show === void 0)
|
|
2387
2387
|
})), lt = T(() => {
|
|
@@ -2394,10 +2394,10 @@ const da = {
|
|
|
2394
2394
|
}), at = T(() => {
|
|
2395
2395
|
var j;
|
|
2396
2396
|
let f;
|
|
2397
|
-
const F = x(S).direction === "rtl" ? "bottomLeft" : "right", I = (j = x(
|
|
2397
|
+
const F = x(S).direction === "rtl" ? "bottomLeft" : "right", I = (j = x(N)) == null ? void 0 : j.position;
|
|
2398
2398
|
if (I !== null && Array.isArray(I)) {
|
|
2399
|
-
const
|
|
2400
|
-
!
|
|
2399
|
+
const B = I.find((M) => M.includes("top")), V = I.find((M) => M.includes("bottom")), ee = I.every((M) => `${M}` == "none");
|
|
2400
|
+
!B && !V && !ee && (f = F), B && (f = B.toLowerCase().replace("top", "")), V && (f = V.toLowerCase().replace("bottom", ""));
|
|
2401
2401
|
} else
|
|
2402
2402
|
f = F;
|
|
2403
2403
|
return f;
|
|
@@ -2407,11 +2407,11 @@ const da = {
|
|
|
2407
2407
|
...f,
|
|
2408
2408
|
...e.params || {}
|
|
2409
2409
|
}), await Ae()) : G(f);
|
|
2410
|
-
},
|
|
2410
|
+
}, Mt = async (f, F) => {
|
|
2411
2411
|
F ? (a("reset", f), e.request && await nt(f)) : e.request ? (a("submit", f), await nt(f)) : a("submit", f);
|
|
2412
2412
|
}, ut = (f, F, I, j) => {
|
|
2413
|
-
_(
|
|
2414
|
-
},
|
|
2413
|
+
_(rt(f, ["current", "pageSize"])), tt(f, F, I, j);
|
|
2414
|
+
}, Nt = (f, F) => {
|
|
2415
2415
|
var I;
|
|
2416
2416
|
_({
|
|
2417
2417
|
current: f,
|
|
@@ -2419,47 +2419,47 @@ const da = {
|
|
|
2419
2419
|
}), tt({
|
|
2420
2420
|
current: f,
|
|
2421
2421
|
pageSize: F,
|
|
2422
|
-
total:
|
|
2422
|
+
total: N.value && ((I = N.value) == null ? void 0 : I.total) || 0
|
|
2423
2423
|
}, {}, {});
|
|
2424
|
-
},
|
|
2424
|
+
}, Et = (f) => {
|
|
2425
2425
|
a("expandedRowsChange", f);
|
|
2426
|
-
},
|
|
2426
|
+
}, zt = (f, F) => {
|
|
2427
2427
|
a("expand", f, F);
|
|
2428
|
-
},
|
|
2429
|
-
var
|
|
2428
|
+
}, Kt = (f, F) => w(f, F), At = (f, F, I) => {
|
|
2429
|
+
var B, V, ee;
|
|
2430
2430
|
let j = f;
|
|
2431
2431
|
if (F) {
|
|
2432
|
-
const
|
|
2432
|
+
const M = document.querySelector(`.${i} .ant-table-tbody`);
|
|
2433
2433
|
if (j = r("div", {
|
|
2434
2434
|
class: `${i}-ellipsis`
|
|
2435
2435
|
}, [r(ne, {
|
|
2436
2436
|
title: f,
|
|
2437
2437
|
getPopupContainer: (U) => {
|
|
2438
2438
|
var te;
|
|
2439
|
-
return
|
|
2439
|
+
return M ?? ((te = U == null ? void 0 : U.parentNode) == null ? void 0 : te.parentNode);
|
|
2440
2440
|
}
|
|
2441
2441
|
}, {
|
|
2442
2442
|
default: () => [r("div", {
|
|
2443
2443
|
class: `${i}-ellipsis-text`
|
|
2444
2444
|
}, [f])]
|
|
2445
2445
|
})]), I.copyable) {
|
|
2446
|
-
const U =
|
|
2446
|
+
const U = fe(f) ? typeof ((B = f == null ? void 0 : f[0]) == null ? void 0 : B.children) == "string" ? (V = f == null ? void 0 : f[0]) == null ? void 0 : V.children : "" : f.toString(), te = typeof I.copyText == "function" ? (ee = I.copyText) == null ? void 0 : ee.call(I, I) : I.copyText || U;
|
|
2447
2447
|
j = r("div", {
|
|
2448
2448
|
class: `${i}-copyable`
|
|
2449
2449
|
}, [r(ne, {
|
|
2450
2450
|
title: f,
|
|
2451
2451
|
getPopupContainer: (le) => {
|
|
2452
|
-
var
|
|
2453
|
-
return
|
|
2452
|
+
var ge;
|
|
2453
|
+
return M ?? ((ge = le == null ? void 0 : le.parentNode) == null ? void 0 : ge.parentNode);
|
|
2454
2454
|
}
|
|
2455
2455
|
}, {
|
|
2456
2456
|
default: () => [r("div", {
|
|
2457
2457
|
class: `${i}-ellipsis-text`
|
|
2458
2458
|
}, [f])]
|
|
2459
|
-
}), r(
|
|
2459
|
+
}), r(vl, {
|
|
2460
2460
|
class: `${i}-copyable-icon`,
|
|
2461
2461
|
onClick: () => {
|
|
2462
|
-
|
|
2462
|
+
jl(te), Fl.success("复制成功");
|
|
2463
2463
|
}
|
|
2464
2464
|
}, null)]);
|
|
2465
2465
|
}
|
|
@@ -2467,41 +2467,41 @@ const da = {
|
|
|
2467
2467
|
return j;
|
|
2468
2468
|
};
|
|
2469
2469
|
function it() {
|
|
2470
|
-
var I, j,
|
|
2470
|
+
var I, j, B, V, ee;
|
|
2471
2471
|
const f = Se(l, e, "emptyText");
|
|
2472
2472
|
if (f !== !1 && ((I = v == null ? void 0 : v.emptyText) == null ? void 0 : I.value) !== !1) {
|
|
2473
|
-
const
|
|
2473
|
+
const M = ((j = e.emptyTextProps) == null ? void 0 : j.extraProps) || {}, U = f || ((B = v == null ? void 0 : v.emptyText) == null ? void 0 : B.value), te = Ce(U), le = te ? bt(U, M) : yt(U || []);
|
|
2474
2474
|
return r("div", {
|
|
2475
2475
|
class: je(`${i}-empty-text`, h.value, (V = e.emptyTextProps) == null ? void 0 : V.class),
|
|
2476
2476
|
style: (ee = e.emptyTextProps) == null ? void 0 : ee.style
|
|
2477
|
-
}, [te ? le :
|
|
2477
|
+
}, [te ? le : fe(le) ? le.map((ge) => qe(ge, M)) : r(Rl, null, null)]);
|
|
2478
2478
|
}
|
|
2479
2479
|
return null;
|
|
2480
2480
|
}
|
|
2481
|
-
const
|
|
2481
|
+
const Yt = () => {
|
|
2482
2482
|
var F;
|
|
2483
|
-
const f =
|
|
2483
|
+
const f = mt(l, e, "customRender");
|
|
2484
2484
|
if (f) {
|
|
2485
|
-
if ((F =
|
|
2486
|
-
const I = ie(x(
|
|
2485
|
+
if ((F = Te.value) != null && F.length) {
|
|
2486
|
+
const I = ie(x(Te));
|
|
2487
2487
|
return f == null ? void 0 : f({
|
|
2488
2488
|
dataSource: I,
|
|
2489
|
-
currentData:
|
|
2489
|
+
currentData: Dl(I, N.value)
|
|
2490
2490
|
});
|
|
2491
2491
|
}
|
|
2492
2492
|
return it();
|
|
2493
2493
|
}
|
|
2494
2494
|
return r(Ne, null, null);
|
|
2495
|
-
},
|
|
2496
|
-
var
|
|
2495
|
+
}, Lt = (f) => {
|
|
2496
|
+
var B, V;
|
|
2497
2497
|
const F = Se(l, e, "headerTitle"), I = Se(l, e, "titleTip"), j = Se(l, e, "toolBarBtn");
|
|
2498
|
-
return r(
|
|
2498
|
+
return r(ha, {
|
|
2499
2499
|
headerTitle: F,
|
|
2500
2500
|
titleTip: I,
|
|
2501
2501
|
titleTipText: e.titleTipText,
|
|
2502
2502
|
options: se($e.value) ? $e.value : {
|
|
2503
2503
|
...$e.value,
|
|
2504
|
-
setting: f ? !1 : (
|
|
2504
|
+
setting: f ? !1 : (B = $e.value) == null ? void 0 : B.setting,
|
|
2505
2505
|
density: f ? !1 : (V = $e.value) == null ? void 0 : V.density
|
|
2506
2506
|
},
|
|
2507
2507
|
settingExtra: Se(l, e, "settingExtra"),
|
|
@@ -2509,7 +2509,7 @@ const da = {
|
|
|
2509
2509
|
toolBarBtn: j
|
|
2510
2510
|
}, null);
|
|
2511
2511
|
};
|
|
2512
|
-
return
|
|
2512
|
+
return Xl({
|
|
2513
2513
|
tableSize: H,
|
|
2514
2514
|
columns: y,
|
|
2515
2515
|
cacheColumns: k,
|
|
@@ -2525,7 +2525,7 @@ const da = {
|
|
|
2525
2525
|
operationType: Be,
|
|
2526
2526
|
setColumnsMap: ce,
|
|
2527
2527
|
sortKeyColumns: Oe,
|
|
2528
|
-
cacheColumnsMap:
|
|
2528
|
+
cacheColumnsMap: pe,
|
|
2529
2529
|
setSortKeyColumns: J
|
|
2530
2530
|
},
|
|
2531
2531
|
setPagination: _,
|
|
@@ -2545,13 +2545,13 @@ const da = {
|
|
|
2545
2545
|
}),
|
|
2546
2546
|
actionRef: () => ({
|
|
2547
2547
|
loading: L,
|
|
2548
|
-
dataSource:
|
|
2548
|
+
dataSource: Te,
|
|
2549
2549
|
pageState: Z,
|
|
2550
|
-
pagination:
|
|
2550
|
+
pagination: N.value,
|
|
2551
2551
|
selectedKey: T(() => Xe.value),
|
|
2552
|
-
selectedItem: T(() =>
|
|
2552
|
+
selectedItem: T(() => Rt.value),
|
|
2553
2553
|
rowsSelection: {
|
|
2554
|
-
clear:
|
|
2554
|
+
clear: It,
|
|
2555
2555
|
select: Je,
|
|
2556
2556
|
remove: et,
|
|
2557
2557
|
sync: Ze,
|
|
@@ -2566,10 +2566,10 @@ const da = {
|
|
|
2566
2566
|
pageSize: (Z == null ? void 0 : Z.pageSize) || 10
|
|
2567
2567
|
}), f != null && f.callBack && (f != null && f.wait ? await ((F = f == null ? void 0 : f.callBack) == null ? void 0 : F.call(f)) : (I = f == null ? void 0 : f.callBack) == null || I.call(f)), (j = n.value) == null || j.resetForm(!1), c.value = !1;
|
|
2568
2568
|
},
|
|
2569
|
-
reSetDataList:
|
|
2569
|
+
reSetDataList: Ot,
|
|
2570
2570
|
setPageAndReload: ut,
|
|
2571
2571
|
setPagination: _,
|
|
2572
|
-
setData:
|
|
2572
|
+
setData: kt,
|
|
2573
2573
|
setLoading: z
|
|
2574
2574
|
})
|
|
2575
2575
|
}), () => {
|
|
@@ -2582,7 +2582,7 @@ const da = {
|
|
|
2582
2582
|
[`${i}`]: !0,
|
|
2583
2583
|
[`${u.class}`]: u.class,
|
|
2584
2584
|
[`${i}-no-scroll`]: !Object.keys(x(t) || {}).length,
|
|
2585
|
-
[`${i}-table-tree`]:
|
|
2585
|
+
[`${i}-table-tree`]: Dt.value,
|
|
2586
2586
|
[`${i}-full-screen`]: m.value
|
|
2587
2587
|
}]),
|
|
2588
2588
|
style: u.style
|
|
@@ -2595,60 +2595,60 @@ const da = {
|
|
|
2595
2595
|
searchMap: ue.value,
|
|
2596
2596
|
prefixCls: i,
|
|
2597
2597
|
loading: !!x(Y),
|
|
2598
|
-
onSearch:
|
|
2599
|
-
defaultParams:
|
|
2598
|
+
onSearch: Mt,
|
|
2599
|
+
defaultParams: ve
|
|
2600
2600
|
}, {
|
|
2601
2601
|
default: l.search ? () => {
|
|
2602
2602
|
var j;
|
|
2603
2603
|
return (j = l.search) == null ? void 0 : j.call(l);
|
|
2604
2604
|
} : null
|
|
2605
|
-
}), !R.value &&
|
|
2605
|
+
}), !R.value && Lt(f), f ? r(_e, lt.value, {
|
|
2606
2606
|
default: () => {
|
|
2607
|
-
var j,
|
|
2607
|
+
var j, B, V;
|
|
2608
2608
|
return [r("div", {
|
|
2609
2609
|
class: `${i}-wrapper ${h.value}`
|
|
2610
2610
|
}, [r("div", {
|
|
2611
2611
|
class: je(`${i}-list`, h.value, (j = e.tableProps) == null ? void 0 : j.class),
|
|
2612
|
-
style: (
|
|
2613
|
-
}, [
|
|
2612
|
+
style: (B = e.tableProps) == null ? void 0 : B.style
|
|
2613
|
+
}, [Yt()]), e.pagination !== !1 && ((V = Te.value) == null ? void 0 : V.length) > 0 && r(Tl, X({
|
|
2614
2614
|
class: {
|
|
2615
2615
|
[`${i}-pagination ${h.value}`]: !0,
|
|
2616
2616
|
[`${i}-pagination-${at.value} ${h.value}`]: !!at.value
|
|
2617
2617
|
}
|
|
2618
|
-
},
|
|
2619
|
-
onChange:
|
|
2618
|
+
}, ye(x(N)), {
|
|
2619
|
+
onChange: Nt
|
|
2620
2620
|
}), null)])];
|
|
2621
2621
|
}
|
|
2622
|
-
}) : r(
|
|
2622
|
+
}) : r($l, X(rt(e, Object.keys(pt)), jt.value, {
|
|
2623
2623
|
style: (F = e.tableProps) == null ? void 0 : F.style,
|
|
2624
2624
|
class: (I = e.tableProps) == null ? void 0 : I.class,
|
|
2625
2625
|
loading: lt.value,
|
|
2626
2626
|
rowKey: (j) => j[e.rowKey],
|
|
2627
2627
|
transformCellText: (j) => {
|
|
2628
|
-
var U, te, le;
|
|
2628
|
+
var U, te, le, ge;
|
|
2629
2629
|
e.transformCellText && typeof e.transformCellText && ((U = e.transformCellText) == null || U.call(e, j));
|
|
2630
2630
|
const {
|
|
2631
|
-
column:
|
|
2632
|
-
} = j, V = (
|
|
2633
|
-
let ee = !0,
|
|
2634
|
-
if (
|
|
2635
|
-
|
|
2636
|
-
const
|
|
2637
|
-
ee =
|
|
2638
|
-
}
|
|
2639
|
-
return
|
|
2631
|
+
column: B
|
|
2632
|
+
} = j, V = (B == null ? void 0 : B.key) || (B == null ? void 0 : B.dataIndex);
|
|
2633
|
+
let ee = !0, M = j.text;
|
|
2634
|
+
if (fe(M) && M.length === 1 && !Ce(M == null ? void 0 : M[0])) {
|
|
2635
|
+
M = M == null ? void 0 : M[0];
|
|
2636
|
+
const st = Xt(M, (B == null ? void 0 : B.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || "");
|
|
2637
|
+
ee = st.success, M = kl(st.value, (B == null ? void 0 : B.valueType) || ((le = (te = e.columns) == null ? void 0 : te.find((ot) => (ot.key || ot.dataIndex) === V)) == null ? void 0 : le.valueType), i, h.value);
|
|
2638
|
+
} else fe(M) && M[0].type === "template" && (M = (ge = M[0]) == null ? void 0 : ge.children);
|
|
2639
|
+
return B != null && B.ellipsis ? At(M, ee, B) : M;
|
|
2640
2640
|
},
|
|
2641
2641
|
rowSelection: e.rowSelection ? {
|
|
2642
2642
|
...Ee(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2643
2643
|
selectedRowKeys: Xe.value,
|
|
2644
2644
|
onSelect: Je,
|
|
2645
2645
|
onSelectAll: Qe,
|
|
2646
|
-
onChange:
|
|
2646
|
+
onChange: Pt
|
|
2647
2647
|
} : void 0,
|
|
2648
2648
|
onChange: ut,
|
|
2649
|
-
onExpandedRowsChange:
|
|
2650
|
-
onExpand:
|
|
2651
|
-
onResizeColumn: (j,
|
|
2649
|
+
onExpandedRowsChange: Et,
|
|
2650
|
+
onExpand: zt,
|
|
2651
|
+
onResizeColumn: (j, B) => Kt(j, B)
|
|
2652
2652
|
}), {
|
|
2653
2653
|
...l,
|
|
2654
2654
|
emptyText: () => it()
|
|
@@ -2660,6 +2660,6 @@ He.install = (e) => (e.component(He.name, He), e);
|
|
|
2660
2660
|
export {
|
|
2661
2661
|
He as GProTable,
|
|
2662
2662
|
He as default,
|
|
2663
|
-
|
|
2664
|
-
|
|
2663
|
+
be as proTableProps,
|
|
2664
|
+
Ba as useTable
|
|
2665
2665
|
};
|