@gx-design-vue/pro-table 0.2.0-beta.116 → 0.2.0-beta.117
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 +12 -9
- package/dist/components/Form/index.d.ts +6 -36
- package/dist/hooks/useFetchData.d.ts +1 -1
- package/dist/hooks/useTable.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/pro-table.js +332 -322
- package/dist/pro-table.umd.cjs +12 -1
- package/dist/types/ColumnTypings.d.ts +4 -4
- package/dist/types/SlotsTypings.d.ts +6 -1
- package/package.json +5 -5
package/dist/pro-table.js
CHANGED
|
@@ -1,77 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Gx Design Pro
|
|
3
|
+
* Version: 0.2.0-beta.116
|
|
4
|
+
* Author: gx12358
|
|
5
|
+
* Copyright (C) 2024 gx12358
|
|
6
|
+
* License: MIT License
|
|
7
|
+
* Description: Gx Design Pro Table
|
|
8
|
+
* Date Created: 2025-08-15
|
|
9
|
+
* Homepage:
|
|
10
|
+
* Contact: gx12358@gmail.com
|
|
11
|
+
*/
|
|
12
|
+
import { defineComponent as ne, ref as I, watch as M, cloneVNode as Ve, reactive as be, watchEffect as Ee, computed as S, createVNode as u, Fragment as Ae, isVNode as U, mergeProps as z, h as Tt, unref as b, createTextVNode as Oe, renderSlot as il, onActivated as ul, nextTick as sl, getCurrentInstance as rl, toRaw as ve, onUnmounted as cl, onDeactivated as dl, onMounted as fl, toRef as se, isRef as Qe, isReactive as ml } from "vue";
|
|
13
|
+
import { UpOutlined as hl, DownOutlined as vl, SettingOutlined as $t, VerticalAlignTopOutlined as gl, VerticalAlignMiddleOutlined as pl, VerticalAlignBottomOutlined as yl, InfoCircleOutlined as bl, ColumnHeightOutlined as Cl, FullscreenExitOutlined as xl, FullscreenOutlined as Sl, ReloadOutlined as wl, CopyOutlined as Tl } from "@ant-design/icons-vue";
|
|
14
|
+
import { useProAppContext as Rt } from "@gx-design-vue/pro-app";
|
|
15
|
+
import { useContext as $l, getProSolidColor as Ft, useProStyle as qe, unit as bt, useProConfigContext as Rl } from "@gx-design-vue/pro-provider";
|
|
16
|
+
import { isArray as H, isBoolean as le, classNames as re, isNumber as je, filterEmpty as Bt, getPrefixCls as at, getRandomNumber as lt, genColumnKey as It, isDeepEqualReact as Le, cloneDeep as Z, compareArray as Fl, isObject as q, runFunction as Bl, convertValueBoolean as Te, getSortIndex as Il, isFunction as ke, handleCurrentPage as Pl, deepMerge as Pt, getSlot as kt, arrayRepeat as kl, isString as At, handleShowIndex as Al, handleEmptyField as Ol, getSlotVNode as we, getTextWidth as Dl } from "@gx-design-vue/pro-utils";
|
|
17
|
+
import { useDebounceFn as jl, useFullscreen as Ot, useWindowSize as Nl, toReactive as El } from "@vueuse/core";
|
|
18
|
+
import { Grid as nt, DatePicker as Dt, Space as ge, Input as Ke, TimePicker as Ml, TreeSelect as zl, Select as Kl, InputNumber as Xe, Button as Ct, Spin as jt, Popover as Yl, Checkbox as Ll, Tooltip as de, Tree as Wl, Dropdown as Hl, Menu as Ye, theme as Vl, Pagination as ql, Table as Gl, message as _l, Empty as Ql } from "ant-design-vue";
|
|
19
|
+
import { omit as Ne, cloneDeep as Nt, pick as xt } from "lodash-es";
|
|
20
|
+
import { tableProps as Xl } from "ant-design-vue/es/table/Table";
|
|
6
21
|
import "ant-design-vue/es/_util/props-util";
|
|
7
22
|
import { warning as We } from "ant-design-vue/es/vc-util/warning";
|
|
8
|
-
import
|
|
9
|
-
import { useProAppContext as Ot } from "@gx-design-vue/pro-app";
|
|
10
|
-
import { useContext as El, getProSolidColor as Dt, useProStyle as qe, unit as Ct, useProConfigContext as Ml } from "@gx-design-vue/pro-provider";
|
|
11
|
-
import { Grid as nt, DatePicker as jt, Space as ge, Input as Ke, TimePicker as zl, TreeSelect as Kl, Select as Yl, InputNumber as Xe, Button as xt, Spin as Nt, Popover as Ll, Checkbox as Wl, Tooltip as de, Tree as Hl, Dropdown as Vl, Menu as Ye, theme as ql, Pagination as Gl, Table as _l, message as Ql, Empty as Xl } from "ant-design-vue";
|
|
12
|
-
import H from "dayjs";
|
|
23
|
+
import V from "dayjs";
|
|
13
24
|
import { useMemo as He, tryOnUnmounted as Ul } from "@gx-design-vue/pro-hooks";
|
|
14
|
-
function rn(e, a) {
|
|
15
|
-
function l() {
|
|
16
|
-
if (a?.state) {
|
|
17
|
-
if (Qe(a.state) && V(a.state.value))
|
|
18
|
-
return Z({
|
|
19
|
-
...a.state.value,
|
|
20
|
-
params: a.state.value?.params || {}
|
|
21
|
-
});
|
|
22
|
-
if (V(a.state) && !Qe(a.state))
|
|
23
|
-
return Z({
|
|
24
|
-
...ve(a.state),
|
|
25
|
-
params: a.state?.params || {}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return {};
|
|
29
|
-
}
|
|
30
|
-
const n = I({
|
|
31
|
-
...l(),
|
|
32
|
-
request: a?.request
|
|
33
|
-
});
|
|
34
|
-
a?.state && (Qe(a.state) ? E(() => a.state.value, () => {
|
|
35
|
-
g();
|
|
36
|
-
}, { deep: !0 }) : pl(a.state) && E(() => a?.state, () => {
|
|
37
|
-
g();
|
|
38
|
-
}, { deep: !0 }));
|
|
39
|
-
const o = S(() => e?.value?.actionRef?.()), i = S(() => e?.value?.formRef?.()), d = S(() => ({
|
|
40
|
-
...o.value?.pageState || {},
|
|
41
|
-
...i.value?.getFormState?.() || {}
|
|
42
|
-
})), m = I(!!o.value?.loading?.value);
|
|
43
|
-
E(() => o.value?.loading?.value, (p) => {
|
|
44
|
-
m.value = !!p;
|
|
45
|
-
}), E(m, (p) => {
|
|
46
|
-
o.value?.setLoading?.(!!p);
|
|
47
|
-
});
|
|
48
|
-
function g() {
|
|
49
|
-
n.value = Tt(n.value, l(), {
|
|
50
|
-
omitNil: !0,
|
|
51
|
-
omitEmpty: !0
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
formRef: i,
|
|
56
|
-
actionRef: o,
|
|
57
|
-
tableState: hl(n),
|
|
58
|
-
requestSearch: d,
|
|
59
|
-
loading: m,
|
|
60
|
-
dataSource: S(() => o?.value?.dataSource?.value || []),
|
|
61
|
-
selectedKeys: S(() => o?.value?.selectedKeys?.value || []),
|
|
62
|
-
selectedItems: S(() => o?.value?.selectedItems?.value || []),
|
|
63
|
-
rowsSelection: o?.value?.rowsSelection,
|
|
64
|
-
mutate: (p) => o.value?.reSetDataList?.(p),
|
|
65
|
-
reloadAndReset: (p) => o.value?.reloadAndReset?.(p),
|
|
66
|
-
setPageAndReload: (p, r, C, c) => o.value?.setPageAndReload?.(p, r, C, c),
|
|
67
|
-
setPagination: (p) => o.value?.setPagination?.(p),
|
|
68
|
-
setLoading: (p) => m.value = p,
|
|
69
|
-
setDataValue: (p) => o.value?.setDataValue?.(p),
|
|
70
|
-
reload: (p) => o.value?.reload?.(p)
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
25
|
const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Et = {
|
|
74
|
-
...Ne(
|
|
26
|
+
...Ne(Xl(), Jl),
|
|
75
27
|
transformCellText: Function,
|
|
76
28
|
/**
|
|
77
29
|
* @Author gx12358
|
|
@@ -91,7 +43,7 @@ const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
91
43
|
type: Object,
|
|
92
44
|
default: void 0
|
|
93
45
|
}
|
|
94
|
-
}, ce = {
|
|
46
|
+
}, { provideContext: Zl, useInjectContext: fe } = $l("pro-table"), ce = {
|
|
95
47
|
...Et,
|
|
96
48
|
rowSelection: {
|
|
97
49
|
type: Object,
|
|
@@ -368,7 +320,7 @@ const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
368
320
|
onRequestError: Function,
|
|
369
321
|
onBeforeSearchSubmit: Function,
|
|
370
322
|
onColumnsStateChange: Function
|
|
371
|
-
},
|
|
323
|
+
}, ea = /* @__PURE__ */ ne({
|
|
372
324
|
name: "RequestSelect",
|
|
373
325
|
props: {
|
|
374
326
|
fetch: Function,
|
|
@@ -389,12 +341,12 @@ const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
389
341
|
setup(e, {
|
|
390
342
|
slots: a
|
|
391
343
|
}) {
|
|
392
|
-
const l = I([]), n = I(e.loading ?? !1), o = I("init"), i =
|
|
393
|
-
return
|
|
344
|
+
const l = I([]), n = I(e.loading ?? !1), o = I("init"), i = jl(e.fetch, e.debounceTime || 10);
|
|
345
|
+
return M([() => e.fetch, () => e.manual], () => {
|
|
394
346
|
if (o.value !== "init" && n.value) return;
|
|
395
347
|
const d = e.manual ?? !1;
|
|
396
348
|
e.fetch && !d && (n.value = !0, i().then((m) => {
|
|
397
|
-
l.value =
|
|
349
|
+
l.value = Nt(m), o.value = "success";
|
|
398
350
|
}).catch((m) => {
|
|
399
351
|
console.error(m), o.value = "error";
|
|
400
352
|
}).finally(() => {
|
|
@@ -404,7 +356,7 @@ const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
404
356
|
immediate: !0
|
|
405
357
|
}), () => {
|
|
406
358
|
const d = a.default?.();
|
|
407
|
-
return Ve(
|
|
359
|
+
return Ve(H(d) ? d[0] : d, {
|
|
408
360
|
options: l.value,
|
|
409
361
|
notFoundContent: e.notFoundContent?.(n.value)
|
|
410
362
|
});
|
|
@@ -448,7 +400,7 @@ const la = (e) => ({
|
|
|
448
400
|
border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
|
|
449
401
|
borderRadius: e.borderRadiusLG,
|
|
450
402
|
marginBottom: e.marginLG,
|
|
451
|
-
backgroundColor:
|
|
403
|
+
backgroundColor: Ft(e, e.colorBgContainer)
|
|
452
404
|
},
|
|
453
405
|
"&-collapse-buttons": {
|
|
454
406
|
display: "flex",
|
|
@@ -530,20 +482,20 @@ const la = (e) => ({
|
|
|
530
482
|
{ value: "xs", span: 1 }
|
|
531
483
|
];
|
|
532
484
|
function he(e, a) {
|
|
533
|
-
return typeof a == "function" ? a(
|
|
485
|
+
return typeof a == "function" ? a(V(e)) : V(e).format(a);
|
|
534
486
|
}
|
|
535
487
|
function Pe(e, a) {
|
|
536
488
|
return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
537
489
|
}
|
|
538
490
|
const St = (e, a, l = "string") => {
|
|
539
|
-
if (
|
|
491
|
+
if (H(e)) {
|
|
540
492
|
const [n, o] = e;
|
|
541
493
|
let i, d;
|
|
542
494
|
if (Array.isArray(a) ? (i = a[0], d = a[1]) : typeof a == "object" && a.type === "mask" ? (i = a.format, d = a.format) : (i = a, d = a), l === "string") {
|
|
543
495
|
const m = n ? he(n, i) : "", g = o ? he(o, d) : "";
|
|
544
496
|
return [m, g];
|
|
545
497
|
}
|
|
546
|
-
return [
|
|
498
|
+
return [V(n), V(o)];
|
|
547
499
|
}
|
|
548
500
|
};
|
|
549
501
|
function aa(e) {
|
|
@@ -557,27 +509,27 @@ const {
|
|
|
557
509
|
YearPicker: ua,
|
|
558
510
|
WeekPicker: sa,
|
|
559
511
|
QuarterPicker: ra
|
|
560
|
-
} =
|
|
512
|
+
} = Dt;
|
|
561
513
|
function ca(e) {
|
|
562
514
|
let a = e.reduce((l, n) => n.order !== void 0 ? Math.max(l, n.order) : l, 0);
|
|
563
515
|
return e.forEach((l) => {
|
|
564
516
|
l.order === void 0 && (a += 1, l.order = a);
|
|
565
517
|
}), e.sort((l, n) => l.order - n.order), e;
|
|
566
518
|
}
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
type: Array,
|
|
573
|
-
default: () => []
|
|
574
|
-
},
|
|
575
|
-
loading: ce.loading,
|
|
576
|
-
cardBordered: ce.cardBordered,
|
|
577
|
-
prefixCls: String,
|
|
578
|
-
defaultParams: Object,
|
|
579
|
-
onSearch: Function
|
|
519
|
+
const da = {
|
|
520
|
+
modal: ce.modalScroll,
|
|
521
|
+
searchMap: {
|
|
522
|
+
type: Array,
|
|
523
|
+
default: () => []
|
|
580
524
|
},
|
|
525
|
+
loading: ce.loading,
|
|
526
|
+
cardBordered: ce.cardBordered,
|
|
527
|
+
prefixCls: String,
|
|
528
|
+
defaultParams: Object,
|
|
529
|
+
onSearch: Function
|
|
530
|
+
}, Mt = /* @__PURE__ */ ne({
|
|
531
|
+
name: "ProTableForm",
|
|
532
|
+
props: da,
|
|
581
533
|
setup(e, {
|
|
582
534
|
slots: a,
|
|
583
535
|
expose: l
|
|
@@ -585,7 +537,7 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
585
537
|
const {
|
|
586
538
|
wrapSSR: n,
|
|
587
539
|
hashId: o
|
|
588
|
-
} = qe("ProTableForm", [la], e.prefixCls), i =
|
|
540
|
+
} = qe("ProTableForm", [la], e.prefixCls), i = Rt(), d = na(), {
|
|
589
541
|
manualSearch: m,
|
|
590
542
|
searchConfig: g,
|
|
591
543
|
searchActions: p
|
|
@@ -594,7 +546,7 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
594
546
|
resetFormState: C,
|
|
595
547
|
changeFormState: c
|
|
596
548
|
} = ta(e.defaultParams || {}, e.searchMap || []), h = I(g.value?.collapsed ?? g.value?.defaultCollapsed), x = S(() => le(p.value?.reset) ? p.value?.reset : m.value), v = S(() => P(g.value?.span)), F = S(() => g.value?.label);
|
|
597
|
-
|
|
549
|
+
M(() => g.value?.collapsed, (t) => {
|
|
598
550
|
h.value = t;
|
|
599
551
|
});
|
|
600
552
|
function P(t) {
|
|
@@ -617,8 +569,8 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
617
569
|
...R,
|
|
618
570
|
marginRight: "2%"
|
|
619
571
|
}, L = () => {
|
|
620
|
-
const t =
|
|
621
|
-
return f && (t[f.name] = r[f.name] || f.initialValue || ""), R && (t[R.rangeStartName || "start"] = t[R.name] ? t[R.name][0] : "", t[R.rangeEndName || "end"] = t[R.name] ? t[R.name][1] : "", delete t[R.name]), $ && ($?.name &&
|
|
572
|
+
const t = Nt(r), f = e.searchMap.find((w) => w.valueType === "text") || "", R = e.searchMap.find((w) => w.valueType === "dateRange") || "", $ = e.searchMap.find((w) => w.valueType === "treeSelect");
|
|
573
|
+
return f && (t[f.name] = r[f.name] || f.initialValue || ""), R && (t[R.rangeStartName || "start"] = t[R.name] ? t[R.name][0] : "", t[R.rangeEndName || "end"] = t[R.name] ? t[R.name][1] : "", delete t[R.name]), $ && ($?.name && H(r[$?.name]) && (t[$.name] = r[$.name].length ? r[$.name].map((w) => w[$.valueKey === "text" ? "label" : "value"]).join() : ""), $?.name && H(t[$?.name]) && (t[$.name] = t[$.name].length ? t[$.name].map((w) => w[$.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
622
574
|
}, W = (t = !1, f) => {
|
|
623
575
|
(!m.value || t) && e.onSearch?.(L(), t ? f ? "reset" : "submit" : void 0);
|
|
624
576
|
}, O = (t, f, R) => {
|
|
@@ -655,7 +607,7 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
655
607
|
c(f.name || "", t ? he(t, "YYYY") : null);
|
|
656
608
|
break;
|
|
657
609
|
case "dateRange":
|
|
658
|
-
c(f.name || "", t &&
|
|
610
|
+
c(f.name || "", t && H(t) && t.length === 2 ? St(t, Pe(f.valueFormat, f.showTime)) : null);
|
|
659
611
|
break;
|
|
660
612
|
case "time":
|
|
661
613
|
c(f.name || "", t ? he(t, f.valueFormat || "HH:mm:ss") : null);
|
|
@@ -672,17 +624,17 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
672
624
|
const D = () => {
|
|
673
625
|
const t = i?.emptyText?.value;
|
|
674
626
|
if (t) {
|
|
675
|
-
const f = U(t), R = f ?
|
|
627
|
+
const f = U(t), R = f ? Tt(t) : Bt(t || []);
|
|
676
628
|
return u("div", {
|
|
677
629
|
class: re(`${e.prefixCls}-search-empty-text`, o.value)
|
|
678
|
-
}, [f ? R :
|
|
630
|
+
}, [f ? R : H(R) ? R.map(($) => Ve($)) : void 0]);
|
|
679
631
|
}
|
|
680
632
|
}, ee = () => (m.value || x.value) && u(ge, null, {
|
|
681
|
-
default: () => [x.value && u(
|
|
633
|
+
default: () => [x.value && u(Ct, {
|
|
682
634
|
onClick: () => N()
|
|
683
635
|
}, {
|
|
684
636
|
default: () => [p.value?.resetText || "重置"]
|
|
685
|
-
}), m.value && u(
|
|
637
|
+
}), m.value && u(Ct, {
|
|
686
638
|
loading: e.loading,
|
|
687
639
|
type: "primary",
|
|
688
640
|
onClick: () => W(!0)
|
|
@@ -702,16 +654,16 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
702
654
|
default: () => [ee(), g.value?.collapseRender !== !1 && R && u(Ae, null, [typeof g.value?.collapseRender == "function" ? g.value?.collapseRender(f) : u("span", {
|
|
703
655
|
class: `${e.prefixCls}-a ${o.value}`,
|
|
704
656
|
onClick: () => k(!f)
|
|
705
|
-
}, [f ? "收起" : "展开", f ? u(
|
|
657
|
+
}, [f ? "收起" : "展开", f ? u(hl, null, null) : u(vl, null, null)])])]
|
|
706
658
|
})]);
|
|
707
659
|
function ie(t) {
|
|
708
|
-
return t === void 0 ? void 0 : t ? u(
|
|
660
|
+
return t === void 0 ? void 0 : t ? u(jt, {
|
|
709
661
|
size: "small",
|
|
710
662
|
indicator: i?.indicator?.value
|
|
711
663
|
}, null) : D();
|
|
712
664
|
}
|
|
713
665
|
function ae(t, f) {
|
|
714
|
-
return u(ea,
|
|
666
|
+
return u(ea, z(t.request, {
|
|
715
667
|
loading: t.loading,
|
|
716
668
|
notFoundContent: ie
|
|
717
669
|
}), aa(f) ? f : {
|
|
@@ -724,7 +676,7 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
724
676
|
let w = null;
|
|
725
677
|
switch (t.valueType) {
|
|
726
678
|
case "text":
|
|
727
|
-
f = u(R,
|
|
679
|
+
f = u(R, z({
|
|
728
680
|
style: {
|
|
729
681
|
width: "100%"
|
|
730
682
|
},
|
|
@@ -736,7 +688,7 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
736
688
|
}, $), null);
|
|
737
689
|
break;
|
|
738
690
|
case "number":
|
|
739
|
-
f = u(Xe,
|
|
691
|
+
f = u(Xe, z({
|
|
740
692
|
style: {
|
|
741
693
|
width: "100%"
|
|
742
694
|
},
|
|
@@ -755,7 +707,7 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
755
707
|
onChange: (s) => O(s, t, {
|
|
756
708
|
key: 0
|
|
757
709
|
}),
|
|
758
|
-
placeholder:
|
|
710
|
+
placeholder: H(t.placeholder) && t.placeholder?.[0] || "请输入"
|
|
759
711
|
}, null), u(Ke, {
|
|
760
712
|
disabled: !0,
|
|
761
713
|
placeholder: "~"
|
|
@@ -764,12 +716,12 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
764
716
|
onChange: (s) => O(s, t, {
|
|
765
717
|
key: 1
|
|
766
718
|
}),
|
|
767
|
-
placeholder:
|
|
719
|
+
placeholder: H(t.placeholder) && t.placeholder?.[1] || "请输入"
|
|
768
720
|
}, null)]
|
|
769
721
|
});
|
|
770
722
|
break;
|
|
771
723
|
case "select":
|
|
772
|
-
w = u(
|
|
724
|
+
w = u(Kl, z({
|
|
773
725
|
style: {
|
|
774
726
|
width: "100%"
|
|
775
727
|
},
|
|
@@ -785,7 +737,7 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
785
737
|
}, $), null);
|
|
786
738
|
break;
|
|
787
739
|
case "treeSelect":
|
|
788
|
-
w = u(
|
|
740
|
+
w = u(zl, z({
|
|
789
741
|
style: {
|
|
790
742
|
width: "100%"
|
|
791
743
|
},
|
|
@@ -799,11 +751,11 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
799
751
|
}, $), null);
|
|
800
752
|
break;
|
|
801
753
|
case "date":
|
|
802
|
-
f = u(
|
|
754
|
+
f = u(Dt, z({
|
|
803
755
|
style: {
|
|
804
756
|
width: "100%"
|
|
805
757
|
},
|
|
806
|
-
value: r[t.name] ?
|
|
758
|
+
value: r[t.name] ? V(r[t.name]) : void 0,
|
|
807
759
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
808
760
|
placeholder: t.placeholder || "请选择",
|
|
809
761
|
allowClear: t.allowClear ?? !0,
|
|
@@ -814,11 +766,11 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
814
766
|
}, $), null);
|
|
815
767
|
break;
|
|
816
768
|
case "dateWeek":
|
|
817
|
-
f = u(sa,
|
|
769
|
+
f = u(sa, z({
|
|
818
770
|
style: {
|
|
819
771
|
width: "100%"
|
|
820
772
|
},
|
|
821
|
-
value: r[t.name] ?
|
|
773
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY-wo") : void 0,
|
|
822
774
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
823
775
|
allowClear: t.allowClear ?? !0,
|
|
824
776
|
placeholder: t.placeholder || "请选择",
|
|
@@ -826,11 +778,11 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
826
778
|
}, $), null);
|
|
827
779
|
break;
|
|
828
780
|
case "dateMonth":
|
|
829
|
-
f = u(oa,
|
|
781
|
+
f = u(oa, z({
|
|
830
782
|
style: {
|
|
831
783
|
width: "100%"
|
|
832
784
|
},
|
|
833
|
-
value: r[t.name] ?
|
|
785
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
834
786
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
835
787
|
allowClear: t.allowClear ?? !0,
|
|
836
788
|
placeholder: t.placeholder || "请选择",
|
|
@@ -838,11 +790,11 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
838
790
|
}, $), null);
|
|
839
791
|
break;
|
|
840
792
|
case "dateQuarter":
|
|
841
|
-
f = u(ra,
|
|
793
|
+
f = u(ra, z({
|
|
842
794
|
style: {
|
|
843
795
|
width: "100%"
|
|
844
796
|
},
|
|
845
|
-
value: r[t.name] ?
|
|
797
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY-QQ") : void 0,
|
|
846
798
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
847
799
|
allowClear: t.allowClear ?? !0,
|
|
848
800
|
placeholder: t.placeholder || "请选择",
|
|
@@ -850,11 +802,11 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
850
802
|
}, $), null);
|
|
851
803
|
break;
|
|
852
804
|
case "dateYear":
|
|
853
|
-
f = u(ua,
|
|
805
|
+
f = u(ua, z({
|
|
854
806
|
style: {
|
|
855
807
|
width: "100%"
|
|
856
808
|
},
|
|
857
|
-
value: r[t.name] ?
|
|
809
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY") : void 0,
|
|
858
810
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
859
811
|
allowClear: t.allowClear ?? !0,
|
|
860
812
|
placeholder: t.placeholder || "请选择",
|
|
@@ -862,11 +814,11 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
862
814
|
}, $), null);
|
|
863
815
|
break;
|
|
864
816
|
case "dateRange":
|
|
865
|
-
f = u(ia,
|
|
817
|
+
f = u(ia, z({
|
|
866
818
|
style: {
|
|
867
819
|
width: "100%"
|
|
868
820
|
},
|
|
869
|
-
value: r[t.name] &&
|
|
821
|
+
value: r[t.name] && H(r[t.name]) && r[t.name]?.length === 2 ? St(r[t.name], Pe(t.valueFormat, t.showTime), "dayjs") : void 0,
|
|
870
822
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
871
823
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
872
824
|
format: Pe(t.valueFormat, t.showTime),
|
|
@@ -875,11 +827,11 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
875
827
|
}, $), null);
|
|
876
828
|
break;
|
|
877
829
|
case "time":
|
|
878
|
-
f = u(
|
|
830
|
+
f = u(Ml, z({
|
|
879
831
|
style: {
|
|
880
832
|
width: "100%"
|
|
881
833
|
},
|
|
882
|
-
value: r[t.name] ?
|
|
834
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
883
835
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
884
836
|
placeholder: t.placeholder || "请选择",
|
|
885
837
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
@@ -899,12 +851,12 @@ const Mt = /* @__PURE__ */ ne({
|
|
|
899
851
|
class: `${e.prefixCls}-search-item`,
|
|
900
852
|
style: {
|
|
901
853
|
...t,
|
|
902
|
-
gap: F.value?.gap ?
|
|
854
|
+
gap: F.value?.gap ? bt(F.value?.gap) : void 0
|
|
903
855
|
}
|
|
904
856
|
}, [R && u("div", {
|
|
905
857
|
class: re(`${e.prefixCls}-search-item-label`, F.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, w && `${e.prefixCls}-search-item-label-${w}`),
|
|
906
858
|
style: {
|
|
907
|
-
width: $ ?
|
|
859
|
+
width: $ ? bt($) : void 0
|
|
908
860
|
}
|
|
909
861
|
}, [R]), u("div", {
|
|
910
862
|
class: re(`${e.prefixCls}-search-item-children`)
|
|
@@ -958,7 +910,7 @@ Mt.inheritAttrs = !1;
|
|
|
958
910
|
const De = (e) => {
|
|
959
911
|
const a = I(null);
|
|
960
912
|
return a.value = e, (...l) => a.value?.(...l);
|
|
961
|
-
},
|
|
913
|
+
}, fa = (e) => ({
|
|
962
914
|
[`${e.componentCls}`]: {
|
|
963
915
|
width: "auto",
|
|
964
916
|
"&-title": {
|
|
@@ -1071,7 +1023,7 @@ const De = (e) => {
|
|
|
1071
1023
|
}
|
|
1072
1024
|
}, [o.default?.()])]
|
|
1073
1025
|
}) : null;
|
|
1074
|
-
},
|
|
1026
|
+
}, ma = /* @__PURE__ */ ne({
|
|
1075
1027
|
props: {
|
|
1076
1028
|
treeKey: String,
|
|
1077
1029
|
hashId: String,
|
|
@@ -1093,21 +1045,21 @@ const De = (e) => {
|
|
|
1093
1045
|
title: "固定在列首",
|
|
1094
1046
|
show: e.fixed !== "left" && !n.value
|
|
1095
1047
|
}, {
|
|
1096
|
-
default: () => [u(
|
|
1048
|
+
default: () => [u(gl, null, null)]
|
|
1097
1049
|
}), u(Je, {
|
|
1098
1050
|
treeKey: e.treeKey || "",
|
|
1099
1051
|
fixed: void 0,
|
|
1100
1052
|
title: "不固定",
|
|
1101
1053
|
show: !!e.fixed && !n.value
|
|
1102
1054
|
}, {
|
|
1103
|
-
default: () => [u(
|
|
1055
|
+
default: () => [u(pl, null, null)]
|
|
1104
1056
|
}), u(Je, {
|
|
1105
1057
|
treeKey: e.treeKey || "",
|
|
1106
1058
|
fixed: "right",
|
|
1107
1059
|
title: "固定在列尾",
|
|
1108
1060
|
show: e.fixed !== "right"
|
|
1109
1061
|
}, {
|
|
1110
|
-
default: () => [u(
|
|
1062
|
+
default: () => [u(yl, null, null)]
|
|
1111
1063
|
})]);
|
|
1112
1064
|
return u("span", {
|
|
1113
1065
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1187,14 +1139,14 @@ const De = (e) => {
|
|
|
1187
1139
|
m?.setColumnsMap(P, "show");
|
|
1188
1140
|
}), C = (c) => {
|
|
1189
1141
|
const h = b(i).find((x) => x.uuid === c.key);
|
|
1190
|
-
return c.title ||
|
|
1142
|
+
return c.title || il(d, "headerCell", {
|
|
1191
1143
|
title: h.title,
|
|
1192
1144
|
column: h
|
|
1193
1145
|
}, () => [h.title]);
|
|
1194
1146
|
};
|
|
1195
1147
|
return () => l.value ? u(Ae, null, [e.showTitle && u("span", {
|
|
1196
1148
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1197
|
-
}, [e.title]), u(
|
|
1149
|
+
}, [e.title]), u(Wl, {
|
|
1198
1150
|
key: a.value,
|
|
1199
1151
|
draggable: e.draggable && !!n.value?.length && n.value?.length > 1,
|
|
1200
1152
|
checkable: e.checkable,
|
|
@@ -1219,7 +1171,7 @@ const De = (e) => {
|
|
|
1219
1171
|
title: C(c),
|
|
1220
1172
|
autoScroll: m?.autoScroll?.value
|
|
1221
1173
|
};
|
|
1222
|
-
return u(
|
|
1174
|
+
return u(ma, z({
|
|
1223
1175
|
hashId: e.hashId,
|
|
1224
1176
|
className: e.className
|
|
1225
1177
|
}, h, {
|
|
@@ -1228,7 +1180,7 @@ const De = (e) => {
|
|
|
1228
1180
|
}
|
|
1229
1181
|
})]) : null;
|
|
1230
1182
|
}
|
|
1231
|
-
}),
|
|
1183
|
+
}), ha = /* @__PURE__ */ ne({
|
|
1232
1184
|
props: {
|
|
1233
1185
|
hashId: String,
|
|
1234
1186
|
className: String,
|
|
@@ -1239,7 +1191,7 @@ const De = (e) => {
|
|
|
1239
1191
|
const {
|
|
1240
1192
|
columns: a
|
|
1241
1193
|
} = fe(), l = I([]), n = I([]), o = I([]), i = I([]);
|
|
1242
|
-
|
|
1194
|
+
M(() => a.value, (g) => {
|
|
1243
1195
|
l.value = [], n.value = [], o.value = [], g.forEach((p) => {
|
|
1244
1196
|
if (p.hideInSetting)
|
|
1245
1197
|
return;
|
|
@@ -1295,7 +1247,7 @@ const De = (e) => {
|
|
|
1295
1247
|
className: e.className
|
|
1296
1248
|
}, null)]);
|
|
1297
1249
|
}
|
|
1298
|
-
}),
|
|
1250
|
+
}), va = /* @__PURE__ */ ne({
|
|
1299
1251
|
props: {
|
|
1300
1252
|
draggable: {
|
|
1301
1253
|
type: Boolean,
|
|
@@ -1315,7 +1267,7 @@ const De = (e) => {
|
|
|
1315
1267
|
}), {
|
|
1316
1268
|
wrapSSR: l,
|
|
1317
1269
|
hashId: n
|
|
1318
|
-
} = qe("ColumnSetting", [
|
|
1270
|
+
} = qe("ColumnSetting", [fa], a), {
|
|
1319
1271
|
columns: o,
|
|
1320
1272
|
settingsAction: i
|
|
1321
1273
|
} = fe(), d = De((C = !0) => {
|
|
@@ -1326,7 +1278,7 @@ const De = (e) => {
|
|
|
1326
1278
|
index: P,
|
|
1327
1279
|
children: k
|
|
1328
1280
|
}) => {
|
|
1329
|
-
const j =
|
|
1281
|
+
const j = It(v, P);
|
|
1330
1282
|
j && (c[j] = {
|
|
1331
1283
|
show: C,
|
|
1332
1284
|
fixed: F
|
|
@@ -1342,11 +1294,11 @@ const De = (e) => {
|
|
|
1342
1294
|
// @ts-ignore
|
|
1343
1295
|
Object.values(i?.columnsMap).filter((C) => !C || C.show === !1)
|
|
1344
1296
|
)), r = S(() => b(p).length > 0 && b(p).length !== o.value.length);
|
|
1345
|
-
return () => l(u(
|
|
1297
|
+
return () => l(u(Yl, {
|
|
1346
1298
|
arrowPointAtCenter: !0,
|
|
1347
1299
|
title: u("div", {
|
|
1348
1300
|
class: [`${a}-title`, n.value]
|
|
1349
|
-
}, [u(
|
|
1301
|
+
}, [u(Ll, {
|
|
1350
1302
|
indeterminate: r.value,
|
|
1351
1303
|
checked: b(p).length === 0 && b(p).length !== o.value.length,
|
|
1352
1304
|
onChange: (C) => m(C)
|
|
@@ -1364,7 +1316,7 @@ const De = (e) => {
|
|
|
1364
1316
|
overlayClassName: `${a}-overlay ${n.value}`,
|
|
1365
1317
|
trigger: "click",
|
|
1366
1318
|
placement: "bottomRight",
|
|
1367
|
-
content: u(
|
|
1319
|
+
content: u(ha, {
|
|
1368
1320
|
hashId: n.value,
|
|
1369
1321
|
checkable: e.checkable ?? !0,
|
|
1370
1322
|
draggable: e.draggable ?? !0,
|
|
@@ -1374,11 +1326,11 @@ const De = (e) => {
|
|
|
1374
1326
|
default: () => [u(de, {
|
|
1375
1327
|
title: "列设置"
|
|
1376
1328
|
}, {
|
|
1377
|
-
default: () => [u(
|
|
1329
|
+
default: () => [u($t, null, null)]
|
|
1378
1330
|
})]
|
|
1379
1331
|
}));
|
|
1380
1332
|
}
|
|
1381
|
-
}),
|
|
1333
|
+
}), ga = (e) => ({
|
|
1382
1334
|
[`${e.componentCls}`]: {
|
|
1383
1335
|
lineHeight: 1,
|
|
1384
1336
|
"&-container": {
|
|
@@ -1424,9 +1376,9 @@ function wt(e) {
|
|
|
1424
1376
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
|
|
1425
1377
|
}
|
|
1426
1378
|
const {
|
|
1427
|
-
useBreakpoint:
|
|
1379
|
+
useBreakpoint: pa
|
|
1428
1380
|
} = nt;
|
|
1429
|
-
function
|
|
1381
|
+
function ya(e) {
|
|
1430
1382
|
if (U(e))
|
|
1431
1383
|
return e;
|
|
1432
1384
|
if (e) {
|
|
@@ -1463,7 +1415,7 @@ const zt = /* @__PURE__ */ ne({
|
|
|
1463
1415
|
const {
|
|
1464
1416
|
wrapSSR: a,
|
|
1465
1417
|
hashId: l
|
|
1466
|
-
} = qe("ListToolBar", [
|
|
1418
|
+
} = qe("ListToolBar", [ga], e.prefixCls), n = pa(), {
|
|
1467
1419
|
isMobile: o
|
|
1468
1420
|
} = fe(), i = S(() => !!(e.titleTip || e.headerTitle || e.actions?.length)), d = S(() => !!(e.settings?.length || e.optionsExtra)), m = S(() => !!(e.titleTip || e.headerTitle)), g = S(() => {
|
|
1469
1421
|
let c;
|
|
@@ -1487,7 +1439,7 @@ const zt = /* @__PURE__ */ ne({
|
|
|
1487
1439
|
}, [e.headerTitle, e.titleTip && u(de, {
|
|
1488
1440
|
title: e.titleTipText
|
|
1489
1441
|
}, {
|
|
1490
|
-
default: () => [le(e.titleTip) && e.titleTip ? u(
|
|
1442
|
+
default: () => [le(e.titleTip) && e.titleTip ? u(bl, null, null) : e.titleTip]
|
|
1491
1443
|
})]), g.value && u("div", {
|
|
1492
1444
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
1493
1445
|
}, [g.value])]
|
|
@@ -1510,7 +1462,7 @@ const zt = /* @__PURE__ */ ne({
|
|
|
1510
1462
|
align: "center",
|
|
1511
1463
|
class: `${e.prefixCls}-setting-items`
|
|
1512
1464
|
}, wt(c = e.settings.map((h, x) => {
|
|
1513
|
-
const v =
|
|
1465
|
+
const v = ya(h);
|
|
1514
1466
|
return u("div", {
|
|
1515
1467
|
key: x,
|
|
1516
1468
|
class: `${e.prefixCls}-setting-item`
|
|
@@ -1536,12 +1488,12 @@ const zt = /* @__PURE__ */ ne({
|
|
|
1536
1488
|
}
|
|
1537
1489
|
});
|
|
1538
1490
|
zt.inheritAttrs = !1;
|
|
1539
|
-
const
|
|
1491
|
+
const ba = () => {
|
|
1540
1492
|
const {
|
|
1541
1493
|
action: e,
|
|
1542
1494
|
tableSize: a
|
|
1543
1495
|
} = fe();
|
|
1544
|
-
return u(
|
|
1496
|
+
return u(Hl, {
|
|
1545
1497
|
overlay: u(Ye, {
|
|
1546
1498
|
selectedKeys: [a.value],
|
|
1547
1499
|
onClick: ({
|
|
@@ -1572,38 +1524,38 @@ const ya = () => {
|
|
|
1572
1524
|
default: () => [u(de, {
|
|
1573
1525
|
title: "表格密度"
|
|
1574
1526
|
}, {
|
|
1575
|
-
default: () => [u(
|
|
1527
|
+
default: () => [u(Cl, null, null)]
|
|
1576
1528
|
})]
|
|
1577
1529
|
});
|
|
1578
1530
|
}, Kt = /* @__PURE__ */ ne({
|
|
1579
1531
|
setup() {
|
|
1580
1532
|
const {
|
|
1581
1533
|
isFullscreen: e
|
|
1582
|
-
} =
|
|
1534
|
+
} = Ot();
|
|
1583
1535
|
return () => e.value ? u(de, {
|
|
1584
1536
|
title: "退出全屏"
|
|
1585
1537
|
}, {
|
|
1586
|
-
default: () => [u(
|
|
1538
|
+
default: () => [u(xl, null, null)]
|
|
1587
1539
|
}) : u(de, {
|
|
1588
1540
|
title: "全屏"
|
|
1589
1541
|
}, {
|
|
1590
|
-
default: () => [u(
|
|
1542
|
+
default: () => [u(Sl, null, null)]
|
|
1591
1543
|
});
|
|
1592
1544
|
}
|
|
1593
1545
|
});
|
|
1594
|
-
function
|
|
1546
|
+
function Ca() {
|
|
1595
1547
|
return {
|
|
1596
1548
|
reload: {
|
|
1597
1549
|
text: "刷新",
|
|
1598
|
-
icon: u(
|
|
1550
|
+
icon: u(wl, null, null)
|
|
1599
1551
|
},
|
|
1600
1552
|
density: {
|
|
1601
1553
|
text: "表格密度",
|
|
1602
|
-
icon: u(
|
|
1554
|
+
icon: u(ba, null, null)
|
|
1603
1555
|
},
|
|
1604
1556
|
setting: {
|
|
1605
1557
|
text: "列设置",
|
|
1606
|
-
icon: u(
|
|
1558
|
+
icon: u($t, null, null)
|
|
1607
1559
|
},
|
|
1608
1560
|
fullScreen: {
|
|
1609
1561
|
text: "全屏",
|
|
@@ -1611,7 +1563,7 @@ function ba() {
|
|
|
1611
1563
|
}
|
|
1612
1564
|
};
|
|
1613
1565
|
}
|
|
1614
|
-
function
|
|
1566
|
+
function xa(e, a) {
|
|
1615
1567
|
return Object.keys(e).filter((l) => l).map((l) => {
|
|
1616
1568
|
const n = e[l];
|
|
1617
1569
|
if (!n)
|
|
@@ -1619,7 +1571,7 @@ function Ca(e, a) {
|
|
|
1619
1571
|
let o = n === !0 ? a[l] : () => n?.();
|
|
1620
1572
|
if (typeof o != "function" && (o = () => {
|
|
1621
1573
|
}), l === "setting")
|
|
1622
|
-
return u(
|
|
1574
|
+
return u(va, z(e[l], {
|
|
1623
1575
|
key: l
|
|
1624
1576
|
}), null);
|
|
1625
1577
|
if (l === "fullScreen")
|
|
@@ -1627,7 +1579,7 @@ function Ca(e, a) {
|
|
|
1627
1579
|
key: l,
|
|
1628
1580
|
onClick: o
|
|
1629
1581
|
}, [u(Kt, null, null)]);
|
|
1630
|
-
const i =
|
|
1582
|
+
const i = Ca()[l];
|
|
1631
1583
|
return i ? u("span", {
|
|
1632
1584
|
key: l,
|
|
1633
1585
|
onClick: o
|
|
@@ -1638,7 +1590,7 @@ function Ca(e, a) {
|
|
|
1638
1590
|
})]) : null;
|
|
1639
1591
|
}).filter((l) => l);
|
|
1640
1592
|
}
|
|
1641
|
-
const
|
|
1593
|
+
const Sa = {
|
|
1642
1594
|
options: [Boolean, Object, Array],
|
|
1643
1595
|
titleTip: [Function, Boolean, Object, String],
|
|
1644
1596
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -1646,8 +1598,8 @@ const xa = {
|
|
|
1646
1598
|
titleTipText: [String],
|
|
1647
1599
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
1648
1600
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
1649
|
-
},
|
|
1650
|
-
props:
|
|
1601
|
+
}, wa = /* @__PURE__ */ ne({
|
|
1602
|
+
props: Sa,
|
|
1651
1603
|
inheritAttrs: !1,
|
|
1652
1604
|
setup(e) {
|
|
1653
1605
|
const a = at({
|
|
@@ -1667,7 +1619,7 @@ const xa = {
|
|
|
1667
1619
|
...o,
|
|
1668
1620
|
...e.options
|
|
1669
1621
|
};
|
|
1670
|
-
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra),
|
|
1622
|
+
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), xa(i, {
|
|
1671
1623
|
...o
|
|
1672
1624
|
});
|
|
1673
1625
|
}, [() => l, () => e.options]);
|
|
@@ -1685,13 +1637,13 @@ const xa = {
|
|
|
1685
1637
|
};
|
|
1686
1638
|
}
|
|
1687
1639
|
});
|
|
1688
|
-
function
|
|
1689
|
-
return
|
|
1640
|
+
function Ta(e) {
|
|
1641
|
+
return rl();
|
|
1690
1642
|
}
|
|
1691
|
-
function
|
|
1692
|
-
|
|
1643
|
+
function $a(e, a = !0, l) {
|
|
1644
|
+
Ta() ? ul(e, l) : a ? e() : sl(e);
|
|
1693
1645
|
}
|
|
1694
|
-
function
|
|
1646
|
+
function Ra(e) {
|
|
1695
1647
|
const a = S(() => e.draggable), l = S(() => e.neverScroll), n = S(() => e.autoScroll);
|
|
1696
1648
|
return {
|
|
1697
1649
|
draggable: a,
|
|
@@ -1699,9 +1651,9 @@ function $a(e) {
|
|
|
1699
1651
|
autoScroll: n
|
|
1700
1652
|
};
|
|
1701
1653
|
}
|
|
1702
|
-
function
|
|
1654
|
+
function Fa({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o, neverScroll: i }) {
|
|
1703
1655
|
const d = I([]), m = I([]);
|
|
1704
|
-
|
|
1656
|
+
M([
|
|
1705
1657
|
() => e.value,
|
|
1706
1658
|
() => a.value,
|
|
1707
1659
|
() => l.value,
|
|
@@ -1725,7 +1677,7 @@ function Ra({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
|
|
|
1725
1677
|
];
|
|
1726
1678
|
});
|
|
1727
1679
|
function p(x) {
|
|
1728
|
-
return x.sort((v, F) =>
|
|
1680
|
+
return x.sort((v, F) => Fl(v, F, "order", 0));
|
|
1729
1681
|
}
|
|
1730
1682
|
function r(x) {
|
|
1731
1683
|
return Z(x).map((v, F) => {
|
|
@@ -1770,11 +1722,11 @@ function Ra({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
|
|
|
1770
1722
|
resizeColumnWidth: C
|
|
1771
1723
|
};
|
|
1772
1724
|
}
|
|
1773
|
-
function
|
|
1725
|
+
function Ba({ columns: e, columnsState: a, changeColumns: l }) {
|
|
1774
1726
|
const n = I(void 0), o = be({}), i = be({}), d = be({}), m = I([]);
|
|
1775
|
-
|
|
1727
|
+
M(() => e.value, () => {
|
|
1776
1728
|
b(e)?.forEach(({ show: C, key: c, fixed: h }, x) => {
|
|
1777
|
-
const v =
|
|
1729
|
+
const v = It(c, x);
|
|
1778
1730
|
v && (d[v] = { show: C === void 0 ? !0 : C, fixed: h });
|
|
1779
1731
|
});
|
|
1780
1732
|
const r = b(e).map((C) => C.key);
|
|
@@ -1801,7 +1753,7 @@ function Fa({ columns: e, columnsState: a, changeColumns: l }) {
|
|
|
1801
1753
|
setSortKeyColumns: p
|
|
1802
1754
|
};
|
|
1803
1755
|
}
|
|
1804
|
-
function
|
|
1756
|
+
function Ia(e, a) {
|
|
1805
1757
|
const l = S(() => a), n = I(), o = I(e);
|
|
1806
1758
|
function i() {
|
|
1807
1759
|
n.value && clearTimeout(n.value);
|
|
@@ -1818,7 +1770,7 @@ function Ba(e, a) {
|
|
|
1818
1770
|
run: d
|
|
1819
1771
|
};
|
|
1820
1772
|
}
|
|
1821
|
-
function
|
|
1773
|
+
function Pa(e) {
|
|
1822
1774
|
const a = S(() => e.rowKey), l = S(() => e.polling), n = S(() => e.debounceTime), o = S(() => e.dataSource);
|
|
1823
1775
|
return {
|
|
1824
1776
|
rowKey: a,
|
|
@@ -1829,9 +1781,9 @@ function Ia(e) {
|
|
|
1829
1781
|
dataSource: o
|
|
1830
1782
|
};
|
|
1831
1783
|
}
|
|
1832
|
-
function
|
|
1833
|
-
const L = I(), W = I(!0), O = I(!1), N = I(!1), D = I([]), ee = I(), oe = S(() =>
|
|
1834
|
-
const { pagination: s, filters:
|
|
1784
|
+
function ka({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, waitRequest: i, debounceTime: d }, { search: m, columns: g, loading: p, setLoading: r, setColumns: C, removeRowKeys: c, syncSelectedRows: h, formParamsRef: x, setPagination: v, paginationInfo: F, onBeforeSearchSubmit: P, hasCustomRender: k }, j) {
|
|
1785
|
+
const L = I(), W = I(!0), O = I(!1), N = I(!1), D = I([]), ee = I(), oe = S(() => q(m.value) ? m.value?.manualRequest : !1), ie = async (w = {}) => {
|
|
1786
|
+
const { pagination: s, filters: K = {}, sorter: G = {}, removeKeys: te = [], isPolling: Ce = !1 } = w;
|
|
1835
1787
|
if (!l || !ke(l) || b(i) && p.value || O.value)
|
|
1836
1788
|
return o.value || [];
|
|
1837
1789
|
if (O.value = !0, !Ce || b(i) || W.value ? r(!0) : t(!0), b(i)) {
|
|
@@ -1844,27 +1796,27 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
|
|
|
1844
1796
|
if (le(s) && !s || le(F))
|
|
1845
1797
|
Y = {};
|
|
1846
1798
|
else {
|
|
1847
|
-
const { current:
|
|
1848
|
-
Y.pageNum =
|
|
1799
|
+
const { current: _ = 1, pageSize: ye = 10, total: J } = b(F) || {};
|
|
1800
|
+
Y.pageNum = Pl({ current: _, pageSize: ye, total: J }, te.length), te.length && c(te), Y.pageSize = ye;
|
|
1849
1801
|
}
|
|
1850
|
-
const Me =
|
|
1851
|
-
Me.forEach((
|
|
1852
|
-
const ye =
|
|
1853
|
-
|
|
1802
|
+
const Me = q(G) ? [G] : G;
|
|
1803
|
+
Me.forEach((_) => {
|
|
1804
|
+
const ye = _?.columnKey || _?.field;
|
|
1805
|
+
_ && _?.order ? C(b(g).map((J) => (J.dataIndex === ye ? J.sortOrder = _?.order : J.sortOrder = null, J))) : _ && C(b(g).map((J) => (J.dataIndex === ye && (J.sortOrder = null), J)));
|
|
1854
1806
|
});
|
|
1855
1807
|
let Re = {
|
|
1856
1808
|
...Y || {},
|
|
1857
1809
|
...w.params,
|
|
1858
1810
|
...x
|
|
1859
1811
|
};
|
|
1860
|
-
P && ke(P) && (Re = await P(Re,
|
|
1812
|
+
P && ke(P) && (Re = await P(Re, G, K));
|
|
1861
1813
|
let ue = [];
|
|
1862
|
-
const xe = await l?.(Z(ve(Re)), Me,
|
|
1814
|
+
const xe = await l?.(Z(ve(Re)), Me, K);
|
|
1863
1815
|
if (O.value = !1, xe && xe?.success) {
|
|
1864
1816
|
ue = xe.data || [], n && ke(n) && (ue = await n?.(ue)), h(ue);
|
|
1865
|
-
const
|
|
1866
|
-
return
|
|
1867
|
-
total:
|
|
1817
|
+
const _ = xe.total || ue?.length || 0;
|
|
1818
|
+
return _ !== b(F)?.total && v({
|
|
1819
|
+
total: _ || 0
|
|
1868
1820
|
}), R(ue), ue;
|
|
1869
1821
|
} else
|
|
1870
1822
|
return [];
|
|
@@ -1874,22 +1826,22 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
|
|
|
1874
1826
|
W.value = !1, r(!1);
|
|
1875
1827
|
}
|
|
1876
1828
|
return [];
|
|
1877
|
-
}, ae =
|
|
1829
|
+
}, ae = Ia(async (w) => {
|
|
1878
1830
|
ee.value && clearTimeout(ee.value);
|
|
1879
|
-
const s = await ie(w),
|
|
1880
|
-
return
|
|
1881
|
-
ae.run({ ...w, isPolling:
|
|
1882
|
-
}, Math.max(
|
|
1831
|
+
const s = await ie(w), K = Bl(a.value, s);
|
|
1832
|
+
return K && !L.value && (ee.value = setTimeout(() => {
|
|
1833
|
+
ae.run({ ...w, isPolling: K });
|
|
1834
|
+
}, Math.max(K, 2e3))), s;
|
|
1883
1835
|
}, d.value || 10);
|
|
1884
|
-
|
|
1836
|
+
cl(() => {
|
|
1885
1837
|
L.value = !0, clearTimeout(ee.value);
|
|
1886
|
-
}),
|
|
1838
|
+
}), dl(() => {
|
|
1887
1839
|
L.value = !0, clearTimeout(ee.value);
|
|
1888
|
-
}),
|
|
1840
|
+
}), M(() => a.value, () => {
|
|
1889
1841
|
a.value ? ae.run({ isPolling: !0 }) : clearTimeout(ee.value);
|
|
1890
|
-
}, { immediate: !0 }),
|
|
1842
|
+
}, { immediate: !0 }), M([() => i.value, () => o.value], () => {
|
|
1891
1843
|
pe();
|
|
1892
|
-
}, { deep: !0, immediate: !0 }),
|
|
1844
|
+
}, { deep: !0, immediate: !0 }), M([() => x], () => {
|
|
1893
1845
|
oe.value || pe();
|
|
1894
1846
|
}, {
|
|
1895
1847
|
deep: !0,
|
|
@@ -1903,19 +1855,19 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
|
|
|
1903
1855
|
return b(D);
|
|
1904
1856
|
const w = g.value.filter((s) => s.show || s.show === void 0);
|
|
1905
1857
|
return !b(D) || !w || w.length === 0 ? [] : b(D);
|
|
1906
|
-
}), $e = S(() => b(D).some((w) =>
|
|
1858
|
+
}), $e = S(() => b(D).some((w) => H(w.children) && w.children.length > 0));
|
|
1907
1859
|
function t(w) {
|
|
1908
1860
|
N.value = w;
|
|
1909
1861
|
}
|
|
1910
|
-
function f(w, s,
|
|
1911
|
-
ae.run({ pagination: w, filters: s, sorter:
|
|
1862
|
+
function f(w, s, K, G) {
|
|
1863
|
+
ae.run({ pagination: w, filters: s, sorter: K, extra: G, isPolling: !1 }), j("change", w, s, K, G);
|
|
1912
1864
|
}
|
|
1913
1865
|
function R(w) {
|
|
1914
|
-
const s =
|
|
1866
|
+
const s = Il(Z(w), b(F.value));
|
|
1915
1867
|
if (!Le(s, D.value) && (D.value = s, !l || !ke(l))) {
|
|
1916
|
-
const
|
|
1917
|
-
|
|
1918
|
-
total:
|
|
1868
|
+
const K = s.length || 0;
|
|
1869
|
+
K !== b(F)?.total && v({
|
|
1870
|
+
total: K
|
|
1919
1871
|
});
|
|
1920
1872
|
}
|
|
1921
1873
|
}
|
|
@@ -1923,11 +1875,11 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
|
|
|
1923
1875
|
dataSource: me,
|
|
1924
1876
|
isTreeDataRef: $e,
|
|
1925
1877
|
reSetDataList: R,
|
|
1926
|
-
changeDataValue: ({ key: w, params: s, value:
|
|
1927
|
-
const te = w ?? e.value, Ce = s?.[te] ??
|
|
1928
|
-
switch (
|
|
1878
|
+
changeDataValue: ({ key: w, params: s, value: K, type: G = "update" }) => {
|
|
1879
|
+
const te = w ?? e.value, Ce = s?.[te] ?? K;
|
|
1880
|
+
switch (G) {
|
|
1929
1881
|
case "update":
|
|
1930
|
-
te && Ce && s && (D.value = D.value.map((Y) => Ce === Y[te] ?
|
|
1882
|
+
te && Ce && s && (D.value = D.value.map((Y) => Ce === Y[te] ? Pt(Y, s, {
|
|
1931
1883
|
omitNil: !1,
|
|
1932
1884
|
omitEmpty: !1
|
|
1933
1885
|
}) : Y)), We(!!s, "params is required");
|
|
@@ -1939,7 +1891,7 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
|
|
|
1939
1891
|
s && D.value.unshift(s), We(!!s, "params is required");
|
|
1940
1892
|
break;
|
|
1941
1893
|
case "delete":
|
|
1942
|
-
te && (D.value = D.value.filter((Y) =>
|
|
1894
|
+
te && (D.value = D.value.filter((Y) => K !== Y[te]));
|
|
1943
1895
|
break;
|
|
1944
1896
|
}
|
|
1945
1897
|
},
|
|
@@ -1949,10 +1901,10 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
|
|
|
1949
1901
|
}
|
|
1950
1902
|
};
|
|
1951
1903
|
}
|
|
1952
|
-
function
|
|
1953
|
-
const l = I(le(a.value) ? a.value :
|
|
1954
|
-
|
|
1955
|
-
l.value = le(i) ? i :
|
|
1904
|
+
function Aa({ emit: e, loading: a }) {
|
|
1905
|
+
const l = I(le(a.value) ? a.value : q(a.value) ? a.value?.spinning : !1);
|
|
1906
|
+
M(() => a.value, (i) => {
|
|
1907
|
+
l.value = le(i) ? i : q(i) ? i?.spinning : l.value;
|
|
1956
1908
|
});
|
|
1957
1909
|
const n = S(() => l.value);
|
|
1958
1910
|
function o(i) {
|
|
@@ -1960,18 +1912,18 @@ function ka({ emit: e, loading: a }) {
|
|
|
1960
1912
|
}
|
|
1961
1913
|
return { loadingComputed: n, loading: l, setLoading: o };
|
|
1962
1914
|
}
|
|
1963
|
-
function
|
|
1915
|
+
function Oa({
|
|
1964
1916
|
slots: e,
|
|
1965
1917
|
props: a,
|
|
1966
1918
|
pagination: l
|
|
1967
1919
|
}) {
|
|
1968
1920
|
const n = be({}), o = I();
|
|
1969
|
-
|
|
1921
|
+
M(() => l.value, () => {
|
|
1970
1922
|
if (le(l.value) && !l.value) {
|
|
1971
1923
|
o.value = !1;
|
|
1972
1924
|
return;
|
|
1973
1925
|
}
|
|
1974
|
-
const d =
|
|
1926
|
+
const d = kt(e, b(a), "pageItemRender"), m = ke(d) ? {
|
|
1975
1927
|
itemRender: ({
|
|
1976
1928
|
page: p,
|
|
1977
1929
|
type: r,
|
|
@@ -2000,11 +1952,11 @@ function Aa({
|
|
|
2000
1952
|
immediate: !0
|
|
2001
1953
|
});
|
|
2002
1954
|
function i(d) {
|
|
2003
|
-
if (
|
|
1955
|
+
if (q(o.value) && q(d)) {
|
|
2004
1956
|
const m = {};
|
|
2005
1957
|
Object.keys(d).forEach((g) => {
|
|
2006
1958
|
Object.prototype.hasOwnProperty.call(d, g) && o.value[g] === d[g] || (m[g] = d[g]);
|
|
2007
|
-
}), Object.keys(m).length > 0 && (Object.assign(o.value, m),
|
|
1959
|
+
}), Object.keys(m).length > 0 && (Object.assign(o.value, m), Da(m) && Object.assign(n, m));
|
|
2008
1960
|
}
|
|
2009
1961
|
}
|
|
2010
1962
|
return {
|
|
@@ -2013,21 +1965,21 @@ function Aa({
|
|
|
2013
1965
|
setPagination: i
|
|
2014
1966
|
};
|
|
2015
1967
|
}
|
|
2016
|
-
function
|
|
1968
|
+
function Da(e) {
|
|
2017
1969
|
if (typeof e != "object" || e === null)
|
|
2018
1970
|
return !1;
|
|
2019
1971
|
const a = Object.keys(e);
|
|
2020
1972
|
return a.length === 2 && a.includes("pageNum") && a.includes("pageSize");
|
|
2021
1973
|
}
|
|
2022
|
-
function
|
|
1974
|
+
function ja(e, a) {
|
|
2023
1975
|
const l = I([]), n = I([]);
|
|
2024
|
-
|
|
1976
|
+
M(() => a.value?.selectedRows, (r) => {
|
|
2025
1977
|
n.value = Z(r || []);
|
|
2026
1978
|
}, {
|
|
2027
1979
|
deep: !0,
|
|
2028
1980
|
immediate: !0
|
|
2029
|
-
}),
|
|
2030
|
-
l.value =
|
|
1981
|
+
}), M(() => a.value?.selectedRowKeys, (r) => {
|
|
1982
|
+
l.value = kl([...r || []]);
|
|
2031
1983
|
}, {
|
|
2032
1984
|
deep: !0,
|
|
2033
1985
|
immediate: !0
|
|
@@ -2062,7 +2014,7 @@ function Da(e, a) {
|
|
|
2062
2014
|
}
|
|
2063
2015
|
};
|
|
2064
2016
|
}
|
|
2065
|
-
function
|
|
2017
|
+
function Na(e) {
|
|
2066
2018
|
const a = {};
|
|
2067
2019
|
return e.forEach((l) => {
|
|
2068
2020
|
let n = l.initialValue;
|
|
@@ -2070,7 +2022,7 @@ function ja(e) {
|
|
|
2070
2022
|
l.valueType ? !n && o.includes(l.valueType) ? n = void 0 : !n && i.includes(l.valueType) ? n = null : !n && d.includes(l.valueType) ? n = [] : n || (n = "") : n || (n = ""), l.name === "dateRange" ? (a[l.rangeStartName || "start"] = n ? n[0] : null, a[l.rangeEndName || "end"] = n ? n[1] : null) : l.name && (a[l.name] = n);
|
|
2071
2023
|
}), a;
|
|
2072
2024
|
}
|
|
2073
|
-
function
|
|
2025
|
+
function Ea({ searchMap: e, params: a, columns: l, setPagination: n }) {
|
|
2074
2026
|
const o = be({}), i = be({}), d = I([]);
|
|
2075
2027
|
function m(r) {
|
|
2076
2028
|
r.forEach((C) => {
|
|
@@ -2086,20 +2038,20 @@ function Na({ searchMap: e, params: a, columns: l, setPagination: n }) {
|
|
|
2086
2038
|
c.searchConfig && C.push(c.searchConfig);
|
|
2087
2039
|
}), m(C)), r === "all" || r === "searchMap" || r === "columns") {
|
|
2088
2040
|
n({ current: 1 });
|
|
2089
|
-
const c =
|
|
2041
|
+
const c = Na(C);
|
|
2090
2042
|
Object.assign(i, { ...c });
|
|
2091
2043
|
for (const h in c)
|
|
2092
2044
|
o[h] || (o[h] = c[h]);
|
|
2093
2045
|
}
|
|
2094
2046
|
(r === "all" || r === "params") && (n({ current: 1 }), Object.assign(o, a.value));
|
|
2095
2047
|
};
|
|
2096
|
-
|
|
2048
|
+
fl(() => {
|
|
2097
2049
|
g("all");
|
|
2098
|
-
}),
|
|
2050
|
+
}), M(() => a.value, () => {
|
|
2099
2051
|
g("params");
|
|
2100
|
-
}, { deep: !0 }),
|
|
2052
|
+
}, { deep: !0 }), M(() => e.value, () => {
|
|
2101
2053
|
g("searchMap");
|
|
2102
|
-
}, { deep: !0 }),
|
|
2054
|
+
}, { deep: !0 }), M(() => l.value, () => {
|
|
2103
2055
|
g("columns");
|
|
2104
2056
|
}, { deep: !0 });
|
|
2105
2057
|
function p(r) {
|
|
@@ -2107,7 +2059,7 @@ function Na({ searchMap: e, params: a, columns: l, setPagination: n }) {
|
|
|
2107
2059
|
}
|
|
2108
2060
|
return { formDataRef: d, formParamsRef: o, defaultParamsRef: i, setFormParams: p };
|
|
2109
2061
|
}
|
|
2110
|
-
function
|
|
2062
|
+
function Ma(e) {
|
|
2111
2063
|
const a = S(() => e.scroll), l = S(() => e.autoScroll), n = S(() => e.modalScroll), o = S(() => e.neverScroll), i = S(() => e.rowSelection), d = S(() => e.scrollBreakpoint);
|
|
2112
2064
|
return {
|
|
2113
2065
|
scroll: a,
|
|
@@ -2118,8 +2070,8 @@ function Ea(e) {
|
|
|
2118
2070
|
scrollBreakpoint: d
|
|
2119
2071
|
};
|
|
2120
2072
|
}
|
|
2121
|
-
function
|
|
2122
|
-
const p = S(() => b(g) ? je(b(g)) ? m.value > b(g) :
|
|
2073
|
+
function za({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: o, rowSelection: i, screens: d, innerWidth: m, scrollBreakpoint: g }) {
|
|
2074
|
+
const p = S(() => b(g) ? je(b(g)) ? m.value > b(g) : At(b(g)) ? d.value?.[b(g)] : d.value?.xl : d.value?.xl), r = S(() => {
|
|
2123
2075
|
let c = 0;
|
|
2124
2076
|
const h = b(i) ? 60 : 0, x = 150, v = Z(b(a));
|
|
2125
2077
|
v.forEach((k) => {
|
|
@@ -2132,7 +2084,7 @@ function Ma({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll:
|
|
|
2132
2084
|
y: b(e)?.y || (d.value?.xl ? 400 : 235)
|
|
2133
2085
|
} : b(l) ? p.value ? {} : le(p.value) ? { x: b(r) } : {} : {}), breakpoint: p };
|
|
2134
2086
|
}
|
|
2135
|
-
function
|
|
2087
|
+
function Ka({ size: e, emit: a }) {
|
|
2136
2088
|
const l = I("middle");
|
|
2137
2089
|
Ee(() => {
|
|
2138
2090
|
l.value = e.value;
|
|
@@ -2155,7 +2107,7 @@ const et = {
|
|
|
2155
2107
|
backgroundColor: "transparent",
|
|
2156
2108
|
borderRadius: 2
|
|
2157
2109
|
}
|
|
2158
|
-
},
|
|
2110
|
+
}, Ya = (e) => {
|
|
2159
2111
|
const a = `${e.antCls}-table`;
|
|
2160
2112
|
return {
|
|
2161
2113
|
[e.componentCls]: {
|
|
@@ -2250,7 +2202,7 @@ const et = {
|
|
|
2250
2202
|
paddingBlock: e.paddingMD,
|
|
2251
2203
|
border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
|
|
2252
2204
|
borderRadius: e.borderRadiusLG,
|
|
2253
|
-
backgroundColor:
|
|
2205
|
+
backgroundColor: Ft(e, e.colorBgContainer),
|
|
2254
2206
|
[`${e.antCls}-table-wrapper ${e.antCls}-table-pagination${e.antCls}-pagination`]: {
|
|
2255
2207
|
marginBottom: 0
|
|
2256
2208
|
}
|
|
@@ -2359,18 +2311,18 @@ const et = {
|
|
|
2359
2311
|
}
|
|
2360
2312
|
};
|
|
2361
2313
|
};
|
|
2362
|
-
function
|
|
2314
|
+
function La(e) {
|
|
2363
2315
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
|
|
2364
2316
|
}
|
|
2365
|
-
function
|
|
2317
|
+
function Wa(e, a, l, n) {
|
|
2366
2318
|
if (!a) return e;
|
|
2367
2319
|
let o = e;
|
|
2368
|
-
if (
|
|
2320
|
+
if (q(a)) {
|
|
2369
2321
|
const i = a.node === "a" ? "span" : a.node;
|
|
2370
|
-
return u(i,
|
|
2322
|
+
return u(i, z(a?.attr || {}, {
|
|
2371
2323
|
class: [a.class, a.node === "a" ? `${l}-a` : ""],
|
|
2372
2324
|
onClick: a.click
|
|
2373
|
-
}),
|
|
2325
|
+
}), La(e) ? e : {
|
|
2374
2326
|
default: () => [e]
|
|
2375
2327
|
});
|
|
2376
2328
|
}
|
|
@@ -2381,39 +2333,39 @@ function La(e, a, l, n) {
|
|
|
2381
2333
|
}, [e]);
|
|
2382
2334
|
break;
|
|
2383
2335
|
case "time":
|
|
2384
|
-
o =
|
|
2336
|
+
o = V(e).format("HH:mm:ss");
|
|
2385
2337
|
break;
|
|
2386
2338
|
case "dateMonth":
|
|
2387
|
-
o = `${
|
|
2339
|
+
o = `${V(e).month() + 1}月`;
|
|
2388
2340
|
break;
|
|
2389
2341
|
case "date":
|
|
2390
|
-
o =
|
|
2342
|
+
o = V(e).format("YYYY-MM-DD");
|
|
2391
2343
|
break;
|
|
2392
2344
|
case "dateTime":
|
|
2393
|
-
o =
|
|
2345
|
+
o = V(e).format("YYYY-MM-DD HH:mm:ss");
|
|
2394
2346
|
break;
|
|
2395
2347
|
}
|
|
2396
2348
|
return o;
|
|
2397
2349
|
}
|
|
2398
|
-
function
|
|
2350
|
+
function Ha(e, a) {
|
|
2399
2351
|
const l = a && a.current || 1, n = a && a.pageSize || 10;
|
|
2400
2352
|
return e.filter((o, i) => i < l * n && i >= n * (l - 1));
|
|
2401
2353
|
}
|
|
2402
|
-
function
|
|
2354
|
+
function Va(e) {
|
|
2403
2355
|
const a = document.createElement("textarea");
|
|
2404
2356
|
a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
|
|
2405
2357
|
}
|
|
2406
|
-
function
|
|
2358
|
+
function qa(e) {
|
|
2407
2359
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
|
|
2408
2360
|
}
|
|
2409
2361
|
const {
|
|
2410
|
-
useBreakpoint:
|
|
2411
|
-
} = nt,
|
|
2362
|
+
useBreakpoint: Ga
|
|
2363
|
+
} = nt, _a = {
|
|
2412
2364
|
reload: !0,
|
|
2413
2365
|
density: !0,
|
|
2414
2366
|
setting: !0,
|
|
2415
2367
|
fullScreen: !0
|
|
2416
|
-
},
|
|
2368
|
+
}, Qa = Vl.useToken, tt = /* @__PURE__ */ ne({
|
|
2417
2369
|
name: "GProTable",
|
|
2418
2370
|
inheritAttrs: !1,
|
|
2419
2371
|
props: ce,
|
|
@@ -2431,18 +2383,18 @@ const {
|
|
|
2431
2383
|
}), {
|
|
2432
2384
|
wrapSSR: d,
|
|
2433
2385
|
hashId: m
|
|
2434
|
-
} = qe("ProBaseTable", [
|
|
2386
|
+
} = qe("ProBaseTable", [Ya], i), {
|
|
2435
2387
|
token: g
|
|
2436
|
-
} =
|
|
2388
|
+
} = Qa(), p = Rl(), r = Ga(), {
|
|
2437
2389
|
width: C
|
|
2438
|
-
} =
|
|
2390
|
+
} = Nl(), c = I(!1), h = Rt(), x = I(), v = I(), F = I(e.waitRequest);
|
|
2439
2391
|
Ee(() => F.value = e.waitRequest);
|
|
2440
2392
|
const {
|
|
2441
2393
|
toggle: P,
|
|
2442
2394
|
isFullscreen: k
|
|
2443
|
-
} =
|
|
2395
|
+
} = Ot(x), j = S(() => ({
|
|
2444
2396
|
...e
|
|
2445
|
-
})), L = S(() => !r.value.xl), W = S(() => (e.virtualScroll && We(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), O = S(() => e.search === !1 ? !1 :
|
|
2397
|
+
})), L = S(() => !r.value.xl), W = S(() => (e.virtualScroll && We(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), O = S(() => e.search === !1 ? !1 : q(e.search) ? e.search : {
|
|
2446
2398
|
type: "auto",
|
|
2447
2399
|
resetText: "重置",
|
|
2448
2400
|
searchText: "查询"
|
|
@@ -2451,7 +2403,7 @@ const {
|
|
|
2451
2403
|
const B = T.key || T.dataIndex;
|
|
2452
2404
|
return T.key = B, T.dataIndex = B, T.align = T.align || e.align, T.uuid = T.uuid || lt().uuid(15), T;
|
|
2453
2405
|
});
|
|
2454
|
-
return
|
|
2406
|
+
return Al(y, {
|
|
2455
2407
|
align: e.align ?? "left",
|
|
2456
2408
|
showIndex: e.showIndex ?? !1
|
|
2457
2409
|
});
|
|
@@ -2459,39 +2411,39 @@ const {
|
|
|
2459
2411
|
loadingComputed: ie,
|
|
2460
2412
|
loading: ae,
|
|
2461
2413
|
setLoading: pe
|
|
2462
|
-
} =
|
|
2414
|
+
} = Aa({
|
|
2463
2415
|
emit: a,
|
|
2464
2416
|
loading: se(e, "loading")
|
|
2465
2417
|
}), {
|
|
2466
2418
|
sizeRef: me,
|
|
2467
2419
|
setTableSize: $e
|
|
2468
|
-
} =
|
|
2420
|
+
} = Ka({
|
|
2469
2421
|
emit: a,
|
|
2470
2422
|
size: se(e, "size")
|
|
2471
2423
|
}), {
|
|
2472
2424
|
paginationInfo: t,
|
|
2473
2425
|
requestPagination: f,
|
|
2474
2426
|
setPagination: R
|
|
2475
|
-
} =
|
|
2427
|
+
} = Oa({
|
|
2476
2428
|
slots: l,
|
|
2477
2429
|
props: j,
|
|
2478
2430
|
pagination: se(e, "pagination")
|
|
2479
|
-
}), $ =
|
|
2431
|
+
}), $ = Ma(e), {
|
|
2480
2432
|
proScroll: w,
|
|
2481
2433
|
breakpoint: s
|
|
2482
|
-
} =
|
|
2434
|
+
} = za({
|
|
2483
2435
|
...$,
|
|
2484
2436
|
innerWidth: C,
|
|
2485
2437
|
columns: oe,
|
|
2486
2438
|
screens: r
|
|
2487
|
-
}),
|
|
2488
|
-
proColumns:
|
|
2439
|
+
}), K = Ra(e), {
|
|
2440
|
+
proColumns: G,
|
|
2489
2441
|
cacheProColumns: te,
|
|
2490
2442
|
setColumns: Ce,
|
|
2491
2443
|
changeColumns: Y,
|
|
2492
2444
|
resizeColumnWidth: Me
|
|
2493
|
-
} =
|
|
2494
|
-
...
|
|
2445
|
+
} = Fa({
|
|
2446
|
+
...K,
|
|
2495
2447
|
breakpoint: s,
|
|
2496
2448
|
scroll: w,
|
|
2497
2449
|
columns: oe
|
|
@@ -2499,10 +2451,10 @@ const {
|
|
|
2499
2451
|
columnsMap: Re,
|
|
2500
2452
|
operationType: ue,
|
|
2501
2453
|
setColumnsMap: xe,
|
|
2502
|
-
sortKeyColumns:
|
|
2454
|
+
sortKeyColumns: _,
|
|
2503
2455
|
cacheColumnsMap: ye,
|
|
2504
2456
|
setSortKeyColumns: J
|
|
2505
|
-
} =
|
|
2457
|
+
} = Ba({
|
|
2506
2458
|
columns: te,
|
|
2507
2459
|
columnsState: se(e, "columnsState"),
|
|
2508
2460
|
changeColumns: Y
|
|
@@ -2511,7 +2463,7 @@ const {
|
|
|
2511
2463
|
formParamsRef: it,
|
|
2512
2464
|
defaultParamsRef: Yt,
|
|
2513
2465
|
setFormParams: Ge
|
|
2514
|
-
} =
|
|
2466
|
+
} = Ea({
|
|
2515
2467
|
searchMap: se(e, "searchMap"),
|
|
2516
2468
|
params: se(e, "params"),
|
|
2517
2469
|
columns: oe,
|
|
@@ -2525,14 +2477,14 @@ const {
|
|
|
2525
2477
|
syncSelectedRows: ct,
|
|
2526
2478
|
removeRowKeys: dt,
|
|
2527
2479
|
clearAllRowKeys: Ht
|
|
2528
|
-
} =
|
|
2480
|
+
} = ja(se(e, "rowKey"), se(e, "rowSelection")), Vt = Pa(e), {
|
|
2529
2481
|
reload: Fe,
|
|
2530
2482
|
reSetDataList: qt,
|
|
2531
2483
|
changeDataValue: Gt,
|
|
2532
2484
|
isTreeDataRef: _t,
|
|
2533
2485
|
dataSource: Be,
|
|
2534
2486
|
handleTableChange: ft
|
|
2535
|
-
} =
|
|
2487
|
+
} = ka({
|
|
2536
2488
|
...Vt,
|
|
2537
2489
|
waitRequest: F
|
|
2538
2490
|
}, {
|
|
@@ -2544,22 +2496,22 @@ const {
|
|
|
2544
2496
|
setLoading: pe,
|
|
2545
2497
|
setColumns: Ce,
|
|
2546
2498
|
search: O,
|
|
2547
|
-
columns:
|
|
2499
|
+
columns: G,
|
|
2548
2500
|
formParamsRef: it,
|
|
2549
2501
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2550
2502
|
hasCustomRender: S(() => Te(e.customRender || l?.customRender))
|
|
2551
2503
|
}, a), Ie = S(() => e.options ? {
|
|
2552
|
-
...
|
|
2553
|
-
...
|
|
2504
|
+
..._a,
|
|
2505
|
+
...q(e.options) ? e.options : {}
|
|
2554
2506
|
} : !1), Qt = S(() => ({
|
|
2555
2507
|
size: b(me),
|
|
2556
2508
|
scroll: b(w),
|
|
2557
2509
|
dataSource: b(Be),
|
|
2558
2510
|
pagination: b(t),
|
|
2559
2511
|
virtualScroll: W.value,
|
|
2560
|
-
columns: b(
|
|
2512
|
+
columns: b(G).filter((y) => y.show || y.show === void 0)
|
|
2561
2513
|
})), mt = S(() => {
|
|
2562
|
-
const y =
|
|
2514
|
+
const y = q(e.loading) ? Ne(e.loading, "spinning") : {};
|
|
2563
2515
|
return !y.indicator && h?.indicator?.value && (y.indicator = h?.indicator?.value), {
|
|
2564
2516
|
spinning: e.showLoading ? Te(ae.value) : !1,
|
|
2565
2517
|
...y
|
|
@@ -2568,13 +2520,13 @@ const {
|
|
|
2568
2520
|
let y;
|
|
2569
2521
|
const T = b(j).direction === "rtl" ? "bottomLeft" : "right", B = b(t)?.position;
|
|
2570
2522
|
if (B !== null && Array.isArray(B)) {
|
|
2571
|
-
const
|
|
2572
|
-
!
|
|
2523
|
+
const E = B.find((X) => X.includes("top")), Q = B.find((X) => X.includes("bottom")), A = B.every((X) => `${X}` == "none");
|
|
2524
|
+
!E && !Q && !A && (y = T), E && (y = E.toLowerCase().replace("top", "")), Q && (y = Q.toLowerCase().replace("bottom", ""));
|
|
2573
2525
|
} else
|
|
2574
2526
|
y = T;
|
|
2575
2527
|
return y;
|
|
2576
2528
|
});
|
|
2577
|
-
|
|
2529
|
+
$a(() => {
|
|
2578
2530
|
c.value && e.keepAliveReload ? Fe() : c.value = !0;
|
|
2579
2531
|
});
|
|
2580
2532
|
const vt = async (y, T) => {
|
|
@@ -2584,8 +2536,8 @@ const {
|
|
|
2584
2536
|
}), await Fe());
|
|
2585
2537
|
}, Xt = async (y, T) => {
|
|
2586
2538
|
T === "reset" ? (a("reset", y), e.request && await vt(y, T)) : e.request ? (a("submit", y), await vt(y, T)) : a("submit", y);
|
|
2587
|
-
}, gt = (y, T, B,
|
|
2588
|
-
R(
|
|
2539
|
+
}, gt = (y, T, B, E) => {
|
|
2540
|
+
R(xt(y, ["current", "pageSize"])), ft(y, T, B, E);
|
|
2589
2541
|
}, Ut = (y, T) => {
|
|
2590
2542
|
R({
|
|
2591
2543
|
current: y,
|
|
@@ -2600,9 +2552,9 @@ const {
|
|
|
2600
2552
|
}, Zt = (y, T) => {
|
|
2601
2553
|
a("expand", y, T);
|
|
2602
2554
|
}, el = (y, T) => Me(y, T), tl = (y, T, B) => {
|
|
2603
|
-
let
|
|
2555
|
+
let E = y;
|
|
2604
2556
|
if (T) {
|
|
2605
|
-
const
|
|
2557
|
+
const Q = H(y) ? typeof y?.[0]?.children == "string" ? y?.[0]?.children : "" : y ? y.toString() : "", A = B.tooltip === !1 ? {} : B.tooltip, X = B.tooltip === !1 ? 1 : je(A?.hiddenLine) && A?.hiddenLine > 0 ? A?.hiddenLine : 1, Se = B.tooltip === !1 ? 0 : je(A?.width) ? A?.width : 0, nl = B.tooltip !== !1 && At(Q) && Se > 0 ? Dl(Q, {
|
|
2606
2558
|
cssObject: {
|
|
2607
2559
|
fontSize: "14px",
|
|
2608
2560
|
lineHeight: "22px",
|
|
@@ -2611,65 +2563,65 @@ const {
|
|
|
2611
2563
|
}
|
|
2612
2564
|
}) : 0, ol = document.querySelector(`.${i} .ant-table-tbody`), ze = u("div", {
|
|
2613
2565
|
class: `${i}-ellipsis-text`
|
|
2614
|
-
}, [y]), yt = () => B.tooltip === !1 ||
|
|
2566
|
+
}, [y]), yt = () => B.tooltip === !1 || q(B.tooltip) && nl < Se && Se > 0 ? ze : u(de, z({
|
|
2615
2567
|
title: y,
|
|
2616
2568
|
getPopupContainer: (_e) => ol ?? _e?.parentNode?.parentNode
|
|
2617
|
-
},
|
|
2569
|
+
}, q(B.tooltip) ? B.tooltip : {}, {
|
|
2618
2570
|
destroyTooltipOnHide: !0
|
|
2619
|
-
}),
|
|
2571
|
+
}), qa(ze) ? ze : {
|
|
2620
2572
|
default: () => [ze]
|
|
2621
2573
|
});
|
|
2622
|
-
if (
|
|
2574
|
+
if (E = u("div", {
|
|
2623
2575
|
class: `${i}-ellipsis ${A?.class ?? ""}`,
|
|
2624
2576
|
style: {
|
|
2625
|
-
"-webkit-line-clamp":
|
|
2577
|
+
"-webkit-line-clamp": X
|
|
2626
2578
|
}
|
|
2627
2579
|
}, [yt()]), B.copyable) {
|
|
2628
|
-
const _e = typeof B.copyText == "function" ? B.copyText?.(B) : B.copyText ||
|
|
2629
|
-
|
|
2580
|
+
const _e = typeof B.copyText == "function" ? B.copyText?.(B) : B.copyText || Q;
|
|
2581
|
+
E = u("div", {
|
|
2630
2582
|
class: `${i}-copyable`
|
|
2631
2583
|
}, [u("div", {
|
|
2632
2584
|
class: `${i}-ellipsis ${A?.class ?? ""}`,
|
|
2633
2585
|
style: {
|
|
2634
|
-
"-webkit-line-clamp":
|
|
2586
|
+
"-webkit-line-clamp": X
|
|
2635
2587
|
}
|
|
2636
|
-
}, [yt()]), u(
|
|
2588
|
+
}, [yt()]), u(Tl, {
|
|
2637
2589
|
class: `${i}-copyable-icon`,
|
|
2638
2590
|
onClick: () => {
|
|
2639
|
-
|
|
2591
|
+
Va(_e), _l.success("复制成功");
|
|
2640
2592
|
}
|
|
2641
2593
|
}, null)]);
|
|
2642
2594
|
}
|
|
2643
2595
|
}
|
|
2644
|
-
return
|
|
2596
|
+
return E;
|
|
2645
2597
|
};
|
|
2646
2598
|
function pt() {
|
|
2647
2599
|
const y = we(l, e, "emptyText");
|
|
2648
2600
|
if (y !== !1 && h?.emptyText?.value !== !1) {
|
|
2649
|
-
const B = e.emptyTextProps?.extraProps || {},
|
|
2601
|
+
const B = e.emptyTextProps?.extraProps || {}, E = y || h?.emptyText?.value, Q = U(E), A = Q ? Tt(E, B) : Bt(H(E) ? E : [E]);
|
|
2650
2602
|
return u("div", {
|
|
2651
2603
|
class: re(`${i}-empty-text`, m.value, e.emptyTextProps?.class),
|
|
2652
2604
|
style: e.emptyTextProps?.style
|
|
2653
|
-
}, [
|
|
2605
|
+
}, [Q ? A : H(A) ? A.map((X) => Ve(X, B)) : u(Ql, null, null)]);
|
|
2654
2606
|
}
|
|
2655
2607
|
return null;
|
|
2656
2608
|
}
|
|
2657
2609
|
const ll = () => {
|
|
2658
|
-
const y =
|
|
2610
|
+
const y = kt(l, e, "customRender");
|
|
2659
2611
|
if (y) {
|
|
2660
2612
|
if (Be.value?.length) {
|
|
2661
2613
|
const T = Z(b(Be));
|
|
2662
2614
|
return y?.({
|
|
2663
2615
|
dataSource: T,
|
|
2664
|
-
currentData:
|
|
2616
|
+
currentData: Ha(T, t.value)
|
|
2665
2617
|
});
|
|
2666
2618
|
}
|
|
2667
2619
|
return pt();
|
|
2668
2620
|
}
|
|
2669
2621
|
return u(Ae, null, null);
|
|
2670
2622
|
}, al = (y) => {
|
|
2671
|
-
const T = we(l, e, "headerTitle"), B = we(l, e, "titleTip"),
|
|
2672
|
-
return u(
|
|
2623
|
+
const T = we(l, e, "headerTitle"), B = we(l, e, "titleTip"), E = we(l, e, "toolBarBtn");
|
|
2624
|
+
return u(wa, {
|
|
2673
2625
|
headerTitle: T,
|
|
2674
2626
|
titleTip: B,
|
|
2675
2627
|
titleTipText: e.titleTipText,
|
|
@@ -2680,12 +2632,12 @@ const {
|
|
|
2680
2632
|
},
|
|
2681
2633
|
settingExtra: we(l, e, "settingExtra"),
|
|
2682
2634
|
optionsExtra: we(l, e, "optionsExtra"),
|
|
2683
|
-
toolBarBtn:
|
|
2635
|
+
toolBarBtn: E
|
|
2684
2636
|
}, null);
|
|
2685
2637
|
};
|
|
2686
2638
|
return Zl({
|
|
2687
2639
|
tableSize: me,
|
|
2688
|
-
columns:
|
|
2640
|
+
columns: G,
|
|
2689
2641
|
cacheColumns: oe,
|
|
2690
2642
|
isMobile: L,
|
|
2691
2643
|
searchConfig: N,
|
|
@@ -2701,7 +2653,7 @@ const {
|
|
|
2701
2653
|
columnsMap: Re,
|
|
2702
2654
|
operationType: ue,
|
|
2703
2655
|
setColumnsMap: xe,
|
|
2704
|
-
sortKeyColumns:
|
|
2656
|
+
sortKeyColumns: _,
|
|
2705
2657
|
cacheColumnsMap: ye,
|
|
2706
2658
|
setSortKeyColumns: J
|
|
2707
2659
|
},
|
|
@@ -2773,13 +2725,13 @@ const {
|
|
|
2773
2725
|
default: l.search ? () => l.search?.() : null
|
|
2774
2726
|
}), u("div", {
|
|
2775
2727
|
class: re(m.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
|
|
2776
|
-
}, [al(y), y ? u(
|
|
2728
|
+
}, [al(y), y ? u(jt, mt.value, {
|
|
2777
2729
|
default: () => [u("div", {
|
|
2778
2730
|
class: `${i}-wrapper ${m.value}`
|
|
2779
2731
|
}, [u("div", {
|
|
2780
2732
|
class: re(`${i}-list`, m.value, e.tableProps?.class),
|
|
2781
2733
|
style: e.tableProps?.style
|
|
2782
|
-
}, [ll()]), e.pagination !== !1 && Be.value?.length > 0 && u(
|
|
2734
|
+
}, [ll()]), e.pagination !== !1 && Be.value?.length > 0 && u(ql, z({
|
|
2783
2735
|
class: {
|
|
2784
2736
|
[`${i}-pagination ${m.value}`]: !0,
|
|
2785
2737
|
[`${i}-pagination-${ht.value} ${m.value}`]: !!ht.value
|
|
@@ -2787,7 +2739,7 @@ const {
|
|
|
2787
2739
|
}, ve(b(t)), {
|
|
2788
2740
|
onChange: Ut
|
|
2789
2741
|
}), null)])]
|
|
2790
|
-
}) : u(
|
|
2742
|
+
}) : u(Gl, z(xt(e, Object.keys(Et)), Qt.value, {
|
|
2791
2743
|
style: e.tableProps?.style,
|
|
2792
2744
|
class: e.tableProps?.class,
|
|
2793
2745
|
loading: mt.value,
|
|
@@ -2798,15 +2750,15 @@ const {
|
|
|
2798
2750
|
column: B
|
|
2799
2751
|
} = T;
|
|
2800
2752
|
if (!B) return T.text;
|
|
2801
|
-
const
|
|
2802
|
-
let
|
|
2803
|
-
if (
|
|
2753
|
+
const E = B?.key || B?.dataIndex;
|
|
2754
|
+
let Q = !0, A = T.text;
|
|
2755
|
+
if (H(A))
|
|
2804
2756
|
if (A.length === 0 || A.length === 1 && !U(A[0])) {
|
|
2805
2757
|
A = A?.[0];
|
|
2806
|
-
const
|
|
2807
|
-
|
|
2758
|
+
const X = Ol(A, B?.columnEmptyText || e?.columnEmptyText || "");
|
|
2759
|
+
Q = X.success, A = Wa(X.value, B?.valueType || e.columns?.find((Se) => (Se.key || Se.dataIndex) === E)?.valueType, i, m.value);
|
|
2808
2760
|
} else A[0]?.type === "template" && (A = A[0]?.children);
|
|
2809
|
-
return B?.ellipsis ? tl(A,
|
|
2761
|
+
return B?.ellipsis ? tl(A, Q, B) : A;
|
|
2810
2762
|
},
|
|
2811
2763
|
rowSelection: e.rowSelection ? {
|
|
2812
2764
|
...Ne(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
@@ -2827,9 +2779,67 @@ const {
|
|
|
2827
2779
|
}
|
|
2828
2780
|
});
|
|
2829
2781
|
tt.install = (e) => (e.component(tt.name, tt), e);
|
|
2782
|
+
function cn(e, a) {
|
|
2783
|
+
function l() {
|
|
2784
|
+
if (a?.state) {
|
|
2785
|
+
if (Qe(a.state) && q(a.state.value))
|
|
2786
|
+
return Z({
|
|
2787
|
+
...a.state.value,
|
|
2788
|
+
params: a.state.value?.params || {}
|
|
2789
|
+
});
|
|
2790
|
+
if (q(a.state) && !Qe(a.state))
|
|
2791
|
+
return Z({
|
|
2792
|
+
...ve(a.state),
|
|
2793
|
+
params: a.state?.params || {}
|
|
2794
|
+
});
|
|
2795
|
+
}
|
|
2796
|
+
return {};
|
|
2797
|
+
}
|
|
2798
|
+
const n = I({
|
|
2799
|
+
...l(),
|
|
2800
|
+
request: a?.request
|
|
2801
|
+
});
|
|
2802
|
+
a?.state && (Qe(a.state) ? M(() => a.state.value, () => {
|
|
2803
|
+
g();
|
|
2804
|
+
}, { deep: !0 }) : ml(a.state) && M(() => a?.state, () => {
|
|
2805
|
+
g();
|
|
2806
|
+
}, { deep: !0 }));
|
|
2807
|
+
const o = S(() => e?.value?.actionRef?.()), i = S(() => e?.value?.formRef?.()), d = S(() => ({
|
|
2808
|
+
...o.value?.pageState || {},
|
|
2809
|
+
...i.value?.getFormState?.() || {}
|
|
2810
|
+
})), m = I(!!o.value?.loading?.value);
|
|
2811
|
+
M(() => o.value?.loading?.value, (p) => {
|
|
2812
|
+
m.value = !!p;
|
|
2813
|
+
}), M(m, (p) => {
|
|
2814
|
+
o.value?.setLoading?.(!!p);
|
|
2815
|
+
});
|
|
2816
|
+
function g() {
|
|
2817
|
+
n.value = Pt(n.value, l(), {
|
|
2818
|
+
omitNil: !0,
|
|
2819
|
+
omitEmpty: !0
|
|
2820
|
+
});
|
|
2821
|
+
}
|
|
2822
|
+
return {
|
|
2823
|
+
formRef: i,
|
|
2824
|
+
actionRef: o,
|
|
2825
|
+
tableState: El(n),
|
|
2826
|
+
requestSearch: d,
|
|
2827
|
+
loading: m,
|
|
2828
|
+
dataSource: S(() => o?.value?.dataSource?.value || []),
|
|
2829
|
+
selectedKeys: S(() => o?.value?.selectedKeys?.value || []),
|
|
2830
|
+
selectedItems: S(() => o?.value?.selectedItems?.value || []),
|
|
2831
|
+
rowsSelection: o?.value?.rowsSelection,
|
|
2832
|
+
mutate: (p) => o.value?.reSetDataList?.(p),
|
|
2833
|
+
reloadAndReset: (p) => o.value?.reloadAndReset?.(p),
|
|
2834
|
+
setPageAndReload: (p, r, C, c) => o.value?.setPageAndReload?.(p, r, C, c),
|
|
2835
|
+
setPagination: (p) => o.value?.setPagination?.(p),
|
|
2836
|
+
setLoading: (p) => m.value = p,
|
|
2837
|
+
setDataValue: (p) => o.value?.setDataValue?.(p),
|
|
2838
|
+
reload: (p) => o.value?.reload?.(p)
|
|
2839
|
+
};
|
|
2840
|
+
}
|
|
2830
2841
|
export {
|
|
2831
2842
|
tt as GProTable,
|
|
2832
|
-
tt as default,
|
|
2833
2843
|
ce as proTableProps,
|
|
2834
|
-
|
|
2844
|
+
cn as useTable
|
|
2835
2845
|
};
|