@gx-design-vue/pro-table 0.2.0-beta.157 → 0.2.0-beta.158
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 +216 -213
- package/dist/pro-table.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.2.0-beta.
|
|
3
|
+
* Version: 0.2.0-beta.157
|
|
4
4
|
* Author: gx12358
|
|
5
5
|
* Copyright (C) 2024 gx12358
|
|
6
6
|
* License: MIT License
|
|
7
7
|
* Description: Gx Design Pro Table
|
|
8
|
-
* Date Created: 2026-01-
|
|
8
|
+
* Date Created: 2026-01-05
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
|
-
import { defineComponent as ge, ref as w, watch as M, cloneVNode as lt, reactive as at, toRaw as he, computed as x, createVNode as d, Fragment as Pe, isVNode as ne, mergeProps as Q, h as
|
|
13
|
-
import { UpOutlined as
|
|
14
|
-
import { useProAppContext as
|
|
15
|
-
import { useBreakpoint as it, useMemo as
|
|
16
|
-
import { useProStyle as
|
|
17
|
-
import { isArray as k, cloneDeep as le, isObject as oe, isBoolean as Oe, classNames as B, isNumber as we, filterEmpty as
|
|
18
|
-
import { useDebounceFn as
|
|
19
|
-
import { DatePicker as
|
|
20
|
-
import { omit as Ie, cloneDeep as
|
|
21
|
-
import { tableProps as
|
|
12
|
+
import { defineComponent as ge, ref as w, watch as M, cloneVNode as lt, reactive as at, toRaw as he, computed as x, createVNode as d, Fragment as Pe, isVNode as ne, mergeProps as Q, h as yt, onBeforeUnmount as _t, onMounted as nt, nextTick as ot, watchEffect as Ct, unref as F, onActivated as St, getCurrentInstance as Gt, onUnmounted as xt, onDeactivated as wt, onUpdated as Qt, toRef as K, Teleport as Ut, isRef as _e } from "vue";
|
|
13
|
+
import { UpOutlined as Jt, DownOutlined as Zt, InfoCircleOutlined as el, FullscreenExitOutlined as tl, FullscreenOutlined as ll, ReloadOutlined as al, CopyOutlined as nl } from "@ant-design/icons-vue";
|
|
14
|
+
import { useProAppContext as Tt } from "@gx-design-vue/pro-app";
|
|
15
|
+
import { useBreakpoint as it, useMemo as ol, tryOnUnmounted as il, onMountedOrActivated as rl } from "@gx-design-vue/pro-hooks";
|
|
16
|
+
import { useProStyle as Rt, unit as Se, useProConfigContext as sl } from "@gx-design-vue/pro-provider";
|
|
17
|
+
import { isArray as k, cloneDeep as le, isObject as oe, isBoolean as Oe, classNames as B, isNumber as we, filterEmpty as $t, keysOf as Ft, isFunction as ze, isDeepEqualReact as qe, compareArray as ul, runFunction as cl, getSortIndex as dl, handleCurrentPage as fl, getRandomNumber as Pt, deepMerge as xe, forInObject as ml, arrayRepeat as vl, isString as It, getPrefixCls as hl, handleShowIndex as gl, getSlot as vt, convertValueBoolean as Ge, getSlotsProps as bl, handleEmptyField as pl, getTextWidth as yl, getSlotVNode as Cl, useDeepMerge as Sl } from "@gx-design-vue/pro-utils";
|
|
18
|
+
import { useDebounceFn as xl, useEventListener as ht, isClient as wl, useElementBounding as Tl, useFullscreen as At, useElementSize as We, useScroll as Rl, useResizeObserver as $l, useWindowSize as Fl } from "@vueuse/core";
|
|
19
|
+
import { DatePicker as Bt, Input as Ye, TimePicker as Pl, TreeSelect as Il, Select as Al, InputNumber as Qe, Button as gt, Spin as Nt, Tooltip as Ae, Empty as Et, theme as Bl, Pagination as Nl, Table as El, message as zl } from "ant-design-vue";
|
|
20
|
+
import { omit as Ie, cloneDeep as zt, pick as Ol } from "lodash-es";
|
|
21
|
+
import { tableProps as Dl } from "ant-design-vue/es/table/Table";
|
|
22
22
|
import "ant-design-vue/es/_util/props-util";
|
|
23
|
-
import { warning as
|
|
23
|
+
import { warning as jl } from "ant-design-vue/es/vc-util/warning";
|
|
24
24
|
import te from "dayjs";
|
|
25
|
-
import { useContext as
|
|
26
|
-
import { TinyColor as
|
|
27
|
-
const
|
|
28
|
-
...Ie(
|
|
25
|
+
import { useContext as Ot } from "@gx-design-vue/context";
|
|
26
|
+
import { TinyColor as bt } from "@ctrl/tinycolor";
|
|
27
|
+
const Hl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading", "onExpand", "onExpandedRowsChange", "onResizeColumn", "expandedRowKeys", "customHeaderRow", "customRow", "defaultExpandedRowKeys", "expandedRowRender", "expandIcon", "footer", "title", "rowClassName", "rowExpandable", "transformCellText", "onChange"], et = {
|
|
28
|
+
...Ie(Dl(), Hl),
|
|
29
29
|
direction: {
|
|
30
30
|
type: String,
|
|
31
31
|
default: "ltr"
|
|
@@ -48,7 +48,7 @@ const jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
48
48
|
type: Object,
|
|
49
49
|
default: void 0
|
|
50
50
|
}
|
|
51
|
-
}, { provideContext:
|
|
51
|
+
}, { provideContext: Ll, useInjectContext: Ke } = Ot("pro-table"), ve = {
|
|
52
52
|
...et,
|
|
53
53
|
id: {
|
|
54
54
|
type: String,
|
|
@@ -329,7 +329,7 @@ const jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
329
329
|
onExpand: Function,
|
|
330
330
|
onResizeColumn: Function,
|
|
331
331
|
onExpandedRowsChange: Function
|
|
332
|
-
},
|
|
332
|
+
}, Wl = /* @__PURE__ */ ge({
|
|
333
333
|
name: "RequestSelect",
|
|
334
334
|
props: {
|
|
335
335
|
fetch: Function,
|
|
@@ -350,12 +350,12 @@ const jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
350
350
|
setup(e, {
|
|
351
351
|
slots: a
|
|
352
352
|
}) {
|
|
353
|
-
const l = w([]), n = w(e.loading ?? !1), o = w("init"), s =
|
|
353
|
+
const l = w([]), n = w(e.loading ?? !1), o = w("init"), s = xl(e.fetch, e.debounceTime || 10);
|
|
354
354
|
return M([() => e.fetch, () => e.manual], () => {
|
|
355
355
|
if (o.value !== "init" && n.value) return;
|
|
356
356
|
const u = e.manual ?? !1;
|
|
357
357
|
e.fetch && !u && (n.value = !0, s().then((g) => {
|
|
358
|
-
l.value =
|
|
358
|
+
l.value = zt(g), o.value = "success";
|
|
359
359
|
}).catch((g) => {
|
|
360
360
|
console.error(g), o.value = "error";
|
|
361
361
|
}).finally(() => {
|
|
@@ -372,7 +372,7 @@ const jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
374
|
});
|
|
375
|
-
function
|
|
375
|
+
function Yl(e, a) {
|
|
376
376
|
const l = at({});
|
|
377
377
|
function n() {
|
|
378
378
|
Object.assign(l, le(he(e)));
|
|
@@ -397,7 +397,7 @@ function Wl(e, a) {
|
|
|
397
397
|
changeFormState: o
|
|
398
398
|
};
|
|
399
399
|
}
|
|
400
|
-
const
|
|
400
|
+
const Ml = (e) => ({
|
|
401
401
|
[`${e.componentCls}-search`]: {
|
|
402
402
|
position: "relative",
|
|
403
403
|
display: "flex",
|
|
@@ -518,7 +518,7 @@ function me(e, a) {
|
|
|
518
518
|
function Ne(e, a) {
|
|
519
519
|
return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
520
520
|
}
|
|
521
|
-
const
|
|
521
|
+
const pt = (e, a, l = "string") => {
|
|
522
522
|
if (k(e)) {
|
|
523
523
|
const [n, o] = e;
|
|
524
524
|
let s, u;
|
|
@@ -529,23 +529,23 @@ const bt = (e, a, l = "string") => {
|
|
|
529
529
|
return [te(n), te(o)];
|
|
530
530
|
}
|
|
531
531
|
};
|
|
532
|
-
function
|
|
532
|
+
function ql(e) {
|
|
533
533
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ne(e);
|
|
534
534
|
}
|
|
535
535
|
const {
|
|
536
|
-
MonthPicker:
|
|
537
|
-
RangePicker:
|
|
538
|
-
YearPicker:
|
|
539
|
-
WeekPicker:
|
|
540
|
-
QuarterPicker:
|
|
541
|
-
} =
|
|
542
|
-
function
|
|
536
|
+
MonthPicker: Kl,
|
|
537
|
+
RangePicker: kl,
|
|
538
|
+
YearPicker: Vl,
|
|
539
|
+
WeekPicker: Xl,
|
|
540
|
+
QuarterPicker: _l
|
|
541
|
+
} = Bt;
|
|
542
|
+
function Gl(e) {
|
|
543
543
|
let a = e.reduce((l, n) => n.order !== void 0 ? Math.max(l, n.order) : l, 0);
|
|
544
544
|
return e.forEach((l) => {
|
|
545
545
|
l.order === void 0 && (a += 1, l.order = a);
|
|
546
546
|
}), e.sort((l, n) => l.order - n.order), e;
|
|
547
547
|
}
|
|
548
|
-
const
|
|
548
|
+
const Ql = {
|
|
549
549
|
modalScroll: ve.modalScroll,
|
|
550
550
|
formCols: {
|
|
551
551
|
type: Array,
|
|
@@ -559,10 +559,10 @@ const Gl = {
|
|
|
559
559
|
default: () => ({})
|
|
560
560
|
},
|
|
561
561
|
onSearch: Function
|
|
562
|
-
},
|
|
562
|
+
}, Ul = /* @__PURE__ */ ge({
|
|
563
563
|
name: "ProTableForm",
|
|
564
564
|
inheritAttrs: !1,
|
|
565
|
-
props:
|
|
565
|
+
props: Ql,
|
|
566
566
|
setup(e, {
|
|
567
567
|
slots: a,
|
|
568
568
|
expose: l
|
|
@@ -570,7 +570,7 @@ const Gl = {
|
|
|
570
570
|
const {
|
|
571
571
|
wrapSSR: n,
|
|
572
572
|
hashId: o
|
|
573
|
-
} =
|
|
573
|
+
} = Rt("ProTableForm", [Ml], e.prefixCls), s = Tt(), u = it(), {
|
|
574
574
|
formAutoRequest: g,
|
|
575
575
|
formConfig: f,
|
|
576
576
|
formActions: R,
|
|
@@ -581,7 +581,7 @@ const Gl = {
|
|
|
581
581
|
formState: c,
|
|
582
582
|
resetFormState: S,
|
|
583
583
|
changeFormState: b
|
|
584
|
-
} =
|
|
584
|
+
} = Yl(e.defaultFormSearch, e.formCols), j = w(Se(f.value?.gap || 16)), Y = x(() => {
|
|
585
585
|
if (f.value?.breakpoint && oe(f.value.breakpoint) && Object.keys(f.value.breakpoint).length)
|
|
586
586
|
return f.value?.breakpoint;
|
|
587
587
|
}), A = w(f.value?.collapsed ?? f.value?.defaultCollapsed), D = x(() => Oe(R.value?.reset) ? R.value?.reset : !g.value), P = x(() => Y.value ? U(Y.value, m.value) : E(f.value?.span, u.value)), q = x(() => f.value?.label);
|
|
@@ -620,7 +620,7 @@ const Gl = {
|
|
|
620
620
|
...C,
|
|
621
621
|
marginRight: j.value
|
|
622
622
|
}, N = () => {
|
|
623
|
-
const t =
|
|
623
|
+
const t = zt(c), i = e.formCols.find((r) => r.valueType === "text"), C = e.formCols.find((r) => r.valueType === "dateRange"), h = e.formCols.find((r) => r.valueType === "numberRange"), p = e.formCols.find((r) => r.valueType === "treeSelect");
|
|
624
624
|
if (i && (t[i.name] = c[i.name] || i.initialValue), C && (C.rangeStartName || C.rangeEndName ? (t[C.rangeStartName || "start"] = t[C.name] ? t[C.name][0] : void 0, t[C.rangeEndName || "end"] = t[C.name] ? t[C.name][1] : void 0, delete t[C.name]) : t[C.name] = k(t[C.name]) && t[C.name].length > 0 ? c[C.name] : void 0), h) {
|
|
625
625
|
const r = t[h.name];
|
|
626
626
|
t[h.name] = k(r) && r.some((Z) => we(Z)) ? r : void 0;
|
|
@@ -667,7 +667,7 @@ const Gl = {
|
|
|
667
667
|
b(i.name, t ? me(t, "YYYY") : null);
|
|
668
668
|
break;
|
|
669
669
|
case "dateRange":
|
|
670
|
-
b(i.name, t && k(t) && t.length === 2 ?
|
|
670
|
+
b(i.name, t && k(t) && t.length === 2 ? pt(t, Ne(i.valueFormat, i.showTime)) : null);
|
|
671
671
|
break;
|
|
672
672
|
case "time":
|
|
673
673
|
b(i.name, t ? me(t, i.valueFormat || "HH:mm:ss") : null);
|
|
@@ -684,7 +684,7 @@ const Gl = {
|
|
|
684
684
|
const X = () => {
|
|
685
685
|
const t = s?.emptyText?.value;
|
|
686
686
|
if (t) {
|
|
687
|
-
const i = ne(t), C = i ?
|
|
687
|
+
const i = ne(t), C = i ? yt(t) : $t(t || []);
|
|
688
688
|
return d("div", {
|
|
689
689
|
class: B(`${e.prefixCls}-search-empty-text`, o.value)
|
|
690
690
|
}, [i ? C : k(C) ? C.map((h) => lt(h)) : void 0]);
|
|
@@ -692,12 +692,12 @@ const Gl = {
|
|
|
692
692
|
}, ie = () => (!g.value || D.value) && d("div", {
|
|
693
693
|
class: B(`${e.prefixCls}-search-buttons ${o.value}`, v.value?.searchButtons),
|
|
694
694
|
style: T.value?.searchButtons
|
|
695
|
-
}, [D.value && d(
|
|
695
|
+
}, [D.value && d(gt, {
|
|
696
696
|
key: "reset",
|
|
697
697
|
onClick: () => J()
|
|
698
698
|
}, {
|
|
699
699
|
default: () => [R.value?.resetText || "重置"]
|
|
700
|
-
}), !g.value && d(
|
|
700
|
+
}), !g.value && d(gt, {
|
|
701
701
|
key: "submit",
|
|
702
702
|
loading: e.loading,
|
|
703
703
|
type: "primary",
|
|
@@ -720,18 +720,18 @@ const Gl = {
|
|
|
720
720
|
class: B(`${e.prefixCls}-search-control-text ${o.value}`, v.value?.searchText),
|
|
721
721
|
style: T.value?.searchText,
|
|
722
722
|
onClick: () => V(!i)
|
|
723
|
-
}, [i ? "收起" : "展开", i ? d(
|
|
723
|
+
}, [i ? "收起" : "展开", i ? d(Jt, null, null) : d(Zt, null, null)])])])]);
|
|
724
724
|
function be(t) {
|
|
725
|
-
return t === void 0 ? void 0 : t ? d(
|
|
725
|
+
return t === void 0 ? void 0 : t ? d(Nt, {
|
|
726
726
|
size: "small",
|
|
727
727
|
indicator: s?.indicator?.value
|
|
728
728
|
}, null) : X();
|
|
729
729
|
}
|
|
730
730
|
function pe(t, i) {
|
|
731
|
-
return d(
|
|
731
|
+
return d(Wl, Q(t.request, {
|
|
732
732
|
loading: t.loading,
|
|
733
733
|
notFoundContent: be
|
|
734
|
-
}),
|
|
734
|
+
}), ql(i) ? i : {
|
|
735
735
|
default: () => [i]
|
|
736
736
|
});
|
|
737
737
|
}
|
|
@@ -786,7 +786,7 @@ const Gl = {
|
|
|
786
786
|
});
|
|
787
787
|
break;
|
|
788
788
|
case "select":
|
|
789
|
-
p = d(
|
|
789
|
+
p = d(Al, Q({
|
|
790
790
|
style: {
|
|
791
791
|
width: "100%"
|
|
792
792
|
},
|
|
@@ -802,7 +802,7 @@ const Gl = {
|
|
|
802
802
|
}, h), null);
|
|
803
803
|
break;
|
|
804
804
|
case "treeSelect":
|
|
805
|
-
p = d(
|
|
805
|
+
p = d(Il, Q({
|
|
806
806
|
style: {
|
|
807
807
|
width: "100%"
|
|
808
808
|
},
|
|
@@ -816,7 +816,7 @@ const Gl = {
|
|
|
816
816
|
}, h), null);
|
|
817
817
|
break;
|
|
818
818
|
case "date":
|
|
819
|
-
i = d(
|
|
819
|
+
i = d(Bt, Q({
|
|
820
820
|
style: {
|
|
821
821
|
width: "100%"
|
|
822
822
|
},
|
|
@@ -831,7 +831,7 @@ const Gl = {
|
|
|
831
831
|
}, h), null);
|
|
832
832
|
break;
|
|
833
833
|
case "dateWeek":
|
|
834
|
-
i = d(
|
|
834
|
+
i = d(Xl, Q({
|
|
835
835
|
style: {
|
|
836
836
|
width: "100%"
|
|
837
837
|
},
|
|
@@ -843,7 +843,7 @@ const Gl = {
|
|
|
843
843
|
}, h), null);
|
|
844
844
|
break;
|
|
845
845
|
case "dateMonth":
|
|
846
|
-
i = d(
|
|
846
|
+
i = d(Kl, Q({
|
|
847
847
|
style: {
|
|
848
848
|
width: "100%"
|
|
849
849
|
},
|
|
@@ -855,7 +855,7 @@ const Gl = {
|
|
|
855
855
|
}, h), null);
|
|
856
856
|
break;
|
|
857
857
|
case "dateQuarter":
|
|
858
|
-
i = d(
|
|
858
|
+
i = d(_l, Q({
|
|
859
859
|
style: {
|
|
860
860
|
width: "100%"
|
|
861
861
|
},
|
|
@@ -867,7 +867,7 @@ const Gl = {
|
|
|
867
867
|
}, h), null);
|
|
868
868
|
break;
|
|
869
869
|
case "dateYear":
|
|
870
|
-
i = d(
|
|
870
|
+
i = d(Vl, Q({
|
|
871
871
|
style: {
|
|
872
872
|
width: "100%"
|
|
873
873
|
},
|
|
@@ -879,11 +879,11 @@ const Gl = {
|
|
|
879
879
|
}, h), null);
|
|
880
880
|
break;
|
|
881
881
|
case "dateRange":
|
|
882
|
-
i = d(
|
|
882
|
+
i = d(kl, Q({
|
|
883
883
|
style: {
|
|
884
884
|
width: "100%"
|
|
885
885
|
},
|
|
886
|
-
value: c[t.name] && k(c[t.name]) && c[t.name]?.length === 2 ?
|
|
886
|
+
value: c[t.name] && k(c[t.name]) && c[t.name]?.length === 2 ? pt(c[t.name], Ne(t.valueFormat, t.showTime), "dayjs") : void 0,
|
|
887
887
|
getPopupContainer: (r) => r && r.parentNode ? r.parentNode : r,
|
|
888
888
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
889
889
|
format: Ne(t.valueFormat, t.showTime),
|
|
@@ -892,7 +892,7 @@ const Gl = {
|
|
|
892
892
|
}, h), null);
|
|
893
893
|
break;
|
|
894
894
|
case "time":
|
|
895
|
-
i = d(
|
|
895
|
+
i = d(Pl, Q({
|
|
896
896
|
style: {
|
|
897
897
|
width: "100%"
|
|
898
898
|
},
|
|
@@ -930,7 +930,7 @@ const Gl = {
|
|
|
930
930
|
}, se = () => {
|
|
931
931
|
let t = a.default?.() || [];
|
|
932
932
|
t.length === 1 && t[0].type === "template" && (t = t[0]?.children || []);
|
|
933
|
-
const i =
|
|
933
|
+
const i = Gl([...e.formCols, ...t.map((h) => ({
|
|
934
934
|
...h,
|
|
935
935
|
order: h.props?.order || void 0
|
|
936
936
|
}))]), C = {
|
|
@@ -972,7 +972,7 @@ const Gl = {
|
|
|
972
972
|
}, [se()]));
|
|
973
973
|
};
|
|
974
974
|
}
|
|
975
|
-
}),
|
|
975
|
+
}), Jl = (e) => ({
|
|
976
976
|
[`${e.componentCls}-list-toolbar`]: {
|
|
977
977
|
lineHeight: 1,
|
|
978
978
|
"&-with-after": {
|
|
@@ -1047,7 +1047,7 @@ const Gl = {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
|
-
}), { useInjectContext:
|
|
1050
|
+
}), { useInjectContext: Dt, provideContext: Zl } = Ot("scrollbar"), Fe = 4, ea = {
|
|
1051
1051
|
vertical: {
|
|
1052
1052
|
offset: "offsetHeight",
|
|
1053
1053
|
scroll: "scrollTop",
|
|
@@ -1068,10 +1068,10 @@ const Gl = {
|
|
|
1068
1068
|
client: "clientX",
|
|
1069
1069
|
direction: "left"
|
|
1070
1070
|
}
|
|
1071
|
-
},
|
|
1071
|
+
}, ta = ({ move: e, size: a, bar: l }) => ({
|
|
1072
1072
|
[l.size]: a,
|
|
1073
1073
|
transform: `translate${l.axis}(${e}%)`
|
|
1074
|
-
}),
|
|
1074
|
+
}), la = {
|
|
1075
1075
|
vertical: Boolean,
|
|
1076
1076
|
size: String,
|
|
1077
1077
|
move: Number,
|
|
@@ -1085,7 +1085,7 @@ const Gl = {
|
|
|
1085
1085
|
default: () => ({})
|
|
1086
1086
|
}
|
|
1087
1087
|
}, tt = /* @__PURE__ */ ge({
|
|
1088
|
-
props:
|
|
1088
|
+
props: la,
|
|
1089
1089
|
setup(e) {
|
|
1090
1090
|
const {
|
|
1091
1091
|
tableHeaderHeight: a,
|
|
@@ -1093,9 +1093,9 @@ const Gl = {
|
|
|
1093
1093
|
wrapElement: n,
|
|
1094
1094
|
scrollbarElement: o,
|
|
1095
1095
|
className: s
|
|
1096
|
-
} =
|
|
1097
|
-
let m = !1, T = !1, v = 0, c = 0, S =
|
|
1098
|
-
const b = x(() =>
|
|
1096
|
+
} = Dt(), u = w(), g = w(), f = w({}), R = w(!1);
|
|
1097
|
+
let m = !1, T = !1, v = 0, c = 0, S = wl ? document.onselectstart : null;
|
|
1098
|
+
const b = x(() => ea[e.vertical ? "vertical" : "horizontal"]), j = x(() => ta({
|
|
1099
1099
|
size: e.size,
|
|
1100
1100
|
move: e.move,
|
|
1101
1101
|
bar: b.value
|
|
@@ -1132,13 +1132,13 @@ const Gl = {
|
|
|
1132
1132
|
}, V = () => {
|
|
1133
1133
|
T = !0, R.value = m;
|
|
1134
1134
|
};
|
|
1135
|
-
|
|
1135
|
+
_t(() => {
|
|
1136
1136
|
z(), document.removeEventListener("mouseup", U);
|
|
1137
1137
|
});
|
|
1138
1138
|
function z() {
|
|
1139
1139
|
document.onselectstart !== S && (document.onselectstart = S);
|
|
1140
1140
|
}
|
|
1141
|
-
return
|
|
1141
|
+
return ht(o, "mousemove", E), ht(o, "mouseleave", V), () => {
|
|
1142
1142
|
const N = b.value.key === "vertical" ? {
|
|
1143
1143
|
height: `calc(100% - ${Se(a.value + 1)})`,
|
|
1144
1144
|
top: Se(a.value + 1)
|
|
@@ -1161,7 +1161,7 @@ const Gl = {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
});
|
|
1163
1163
|
tt.inheritAttrs = !1;
|
|
1164
|
-
const
|
|
1164
|
+
const aa = {
|
|
1165
1165
|
always: {
|
|
1166
1166
|
type: Boolean,
|
|
1167
1167
|
default: !0
|
|
@@ -1177,15 +1177,15 @@ const la = {
|
|
|
1177
1177
|
type: [Object],
|
|
1178
1178
|
default: () => ({})
|
|
1179
1179
|
}
|
|
1180
|
-
},
|
|
1180
|
+
}, na = /* @__PURE__ */ ge({
|
|
1181
1181
|
inheritAttrs: !1,
|
|
1182
|
-
props:
|
|
1182
|
+
props: aa,
|
|
1183
1183
|
setup(e, {
|
|
1184
1184
|
expose: a
|
|
1185
1185
|
}) {
|
|
1186
1186
|
const {
|
|
1187
1187
|
tableScrollState: l
|
|
1188
|
-
} = Ke(), n =
|
|
1188
|
+
} = Ke(), n = Dt(), o = w(0), s = w(0), u = w(""), g = w(""), f = w(1), R = w(1), m = (v) => {
|
|
1189
1189
|
if (v) {
|
|
1190
1190
|
const c = v.offsetHeight - Fe, S = v.offsetWidth - Fe;
|
|
1191
1191
|
s.value = v.scrollTop * 100 / c * f.value, o.value = v.scrollLeft * 100 / S * R.value;
|
|
@@ -1219,7 +1219,7 @@ const la = {
|
|
|
1219
1219
|
}, null)]);
|
|
1220
1220
|
}
|
|
1221
1221
|
});
|
|
1222
|
-
function
|
|
1222
|
+
function oa(e) {
|
|
1223
1223
|
if (ne(e))
|
|
1224
1224
|
return e;
|
|
1225
1225
|
if (e) {
|
|
@@ -1243,7 +1243,7 @@ function na(e) {
|
|
|
1243
1243
|
}
|
|
1244
1244
|
return null;
|
|
1245
1245
|
}
|
|
1246
|
-
const
|
|
1246
|
+
const jt = /* @__PURE__ */ ge({
|
|
1247
1247
|
props: {
|
|
1248
1248
|
actions: [Array],
|
|
1249
1249
|
settings: [Array],
|
|
@@ -1256,7 +1256,7 @@ const Dt = /* @__PURE__ */ ge({
|
|
|
1256
1256
|
setup(e) {
|
|
1257
1257
|
const a = w(), {
|
|
1258
1258
|
height: l
|
|
1259
|
-
} =
|
|
1259
|
+
} = Tl(a), n = it(), {
|
|
1260
1260
|
isMobile: o,
|
|
1261
1261
|
tableListToolsHeight: s,
|
|
1262
1262
|
classNames: u,
|
|
@@ -1264,7 +1264,7 @@ const Dt = /* @__PURE__ */ ge({
|
|
|
1264
1264
|
hashId: f,
|
|
1265
1265
|
prefixCls: R
|
|
1266
1266
|
} = Ke(), m = `${R}-list-toolbar`;
|
|
1267
|
-
|
|
1267
|
+
Ct(() => {
|
|
1268
1268
|
s.value = l.value || 0;
|
|
1269
1269
|
});
|
|
1270
1270
|
const T = x(() => !!(e.headerTitleTip || e.headerTitle)), v = x(() => {
|
|
@@ -1296,7 +1296,7 @@ const Dt = /* @__PURE__ */ ge({
|
|
|
1296
1296
|
}, [e.headerTitle, e.headerTitleTip && d(Ae, {
|
|
1297
1297
|
title: e.titleTipText
|
|
1298
1298
|
}, {
|
|
1299
|
-
default: () => [Oe(e.headerTitleTip) && e.headerTitleTip ? d(
|
|
1299
|
+
default: () => [Oe(e.headerTitleTip) && e.headerTitleTip ? d(el, null, null) : e.headerTitleTip]
|
|
1300
1300
|
})]), A]) : d("div", {
|
|
1301
1301
|
class: D,
|
|
1302
1302
|
style: P
|
|
@@ -1314,7 +1314,7 @@ const Dt = /* @__PURE__ */ ge({
|
|
|
1314
1314
|
}, [A, e.settings?.length ? d("div", {
|
|
1315
1315
|
class: B(`${m}-setting-items`, f.value)
|
|
1316
1316
|
}, [e.settings.map((D, P) => {
|
|
1317
|
-
const q =
|
|
1317
|
+
const q = oa(D);
|
|
1318
1318
|
return d("div", {
|
|
1319
1319
|
key: P,
|
|
1320
1320
|
class: B(`${m}-setting-item`, f.value)
|
|
@@ -1333,42 +1333,42 @@ const Dt = /* @__PURE__ */ ge({
|
|
|
1333
1333
|
}, [e.listToolAfter])]);
|
|
1334
1334
|
}
|
|
1335
1335
|
});
|
|
1336
|
-
|
|
1337
|
-
const
|
|
1336
|
+
jt.inheritAttrs = !1;
|
|
1337
|
+
const ia = /* @__PURE__ */ ge({
|
|
1338
1338
|
setup() {
|
|
1339
1339
|
const {
|
|
1340
1340
|
isFullscreen: e
|
|
1341
|
-
} =
|
|
1341
|
+
} = At();
|
|
1342
1342
|
return () => e.value ? d(Ae, {
|
|
1343
1343
|
title: "退出全屏"
|
|
1344
1344
|
}, {
|
|
1345
|
-
default: () => [d(
|
|
1345
|
+
default: () => [d(tl, null, null)]
|
|
1346
1346
|
}) : d(Ae, {
|
|
1347
1347
|
title: "全屏"
|
|
1348
1348
|
}, {
|
|
1349
|
-
default: () => [d(
|
|
1349
|
+
default: () => [d(ll, null, null)]
|
|
1350
1350
|
});
|
|
1351
1351
|
}
|
|
1352
1352
|
});
|
|
1353
|
-
function
|
|
1353
|
+
function ra() {
|
|
1354
1354
|
return {
|
|
1355
1355
|
reload: {
|
|
1356
1356
|
text: "刷新",
|
|
1357
|
-
icon: d(
|
|
1357
|
+
icon: d(al, null, null)
|
|
1358
1358
|
},
|
|
1359
1359
|
fullScreen: {
|
|
1360
1360
|
text: "全屏",
|
|
1361
|
-
icon: d(
|
|
1361
|
+
icon: d(ia, null, null)
|
|
1362
1362
|
}
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1366
|
-
return
|
|
1365
|
+
function sa(e, a) {
|
|
1366
|
+
return Ft(e).filter((l) => l).map((l) => {
|
|
1367
1367
|
const n = e[l];
|
|
1368
1368
|
if (!n)
|
|
1369
1369
|
return null;
|
|
1370
1370
|
const o = n ? a[l] : () => () => {
|
|
1371
|
-
}, s =
|
|
1371
|
+
}, s = ra()[l];
|
|
1372
1372
|
return s ? typeof n == "boolean" || !ze(n) ? d("span", {
|
|
1373
1373
|
key: l,
|
|
1374
1374
|
onClick: o
|
|
@@ -1379,7 +1379,7 @@ function ra(e, a) {
|
|
|
1379
1379
|
})]) : n?.(o) : null;
|
|
1380
1380
|
}).filter((l) => l);
|
|
1381
1381
|
}
|
|
1382
|
-
const
|
|
1382
|
+
const ua = {
|
|
1383
1383
|
options: [Boolean, Object, Array],
|
|
1384
1384
|
actionsPlacement: [String],
|
|
1385
1385
|
headerTitle: [Function, Boolean, Object, Array, String],
|
|
@@ -1387,19 +1387,19 @@ const sa = {
|
|
|
1387
1387
|
headerTitleTip: [Function, Boolean, Object, String],
|
|
1388
1388
|
titleTipText: [String],
|
|
1389
1389
|
actionsRender: [Array]
|
|
1390
|
-
},
|
|
1391
|
-
props:
|
|
1390
|
+
}, ca = /* @__PURE__ */ ge({
|
|
1391
|
+
props: ua,
|
|
1392
1392
|
inheritAttrs: !1,
|
|
1393
1393
|
setup(e) {
|
|
1394
1394
|
const {
|
|
1395
1395
|
action: a
|
|
1396
|
-
} = Ke(), l =
|
|
1396
|
+
} = Ke(), l = ol(() => e.options === !1 ? [] : sa(oe(e.options) ? e.options : {}, {
|
|
1397
1397
|
reload: () => a.reload(),
|
|
1398
1398
|
fullScreen: () => a.toggle()
|
|
1399
1399
|
}), [() => e.options]);
|
|
1400
1400
|
return () => {
|
|
1401
1401
|
const n = e.actionsRender || [];
|
|
1402
|
-
return d(
|
|
1402
|
+
return d(jt, {
|
|
1403
1403
|
actions: n,
|
|
1404
1404
|
actionsPlacement: e.actionsPlacement,
|
|
1405
1405
|
settings: F(l),
|
|
@@ -1411,13 +1411,13 @@ const sa = {
|
|
|
1411
1411
|
};
|
|
1412
1412
|
}
|
|
1413
1413
|
});
|
|
1414
|
-
function
|
|
1415
|
-
return
|
|
1414
|
+
function da(e) {
|
|
1415
|
+
return Gt();
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
|
|
1417
|
+
function fa(e, a = !0, l) {
|
|
1418
|
+
da() ? St(e, l) : a ? e() : ot(e);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function ma({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o, neverScroll: s }) {
|
|
1421
1421
|
const u = w([]);
|
|
1422
1422
|
M([
|
|
1423
1423
|
() => e.value,
|
|
@@ -1436,7 +1436,7 @@ function fa({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
|
|
|
1436
1436
|
});
|
|
1437
1437
|
const g = x(() => f(F(u)));
|
|
1438
1438
|
function f(v) {
|
|
1439
|
-
return v.sort((c, S) =>
|
|
1439
|
+
return v.sort((c, S) => ul(c, S, "order", 0));
|
|
1440
1440
|
}
|
|
1441
1441
|
function R(v) {
|
|
1442
1442
|
return le(v).map((c, S) => {
|
|
@@ -1469,7 +1469,7 @@ function fa({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
|
|
|
1469
1469
|
resizeColumnWidth: m
|
|
1470
1470
|
};
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function va(e, a) {
|
|
1473
1473
|
const l = x(() => a), n = w(), o = w(e);
|
|
1474
1474
|
function s() {
|
|
1475
1475
|
n.value && (clearTimeout(n.value), n.value = null);
|
|
@@ -1481,12 +1481,12 @@ function ma(e, a) {
|
|
|
1481
1481
|
}, l.value);
|
|
1482
1482
|
}));
|
|
1483
1483
|
}
|
|
1484
|
-
return
|
|
1484
|
+
return il(s), {
|
|
1485
1485
|
cancel: s,
|
|
1486
1486
|
run: u
|
|
1487
1487
|
};
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1489
|
+
function ha(e) {
|
|
1490
1490
|
const a = x(() => e.rowKey), l = x(() => e.polling), n = x(() => e.debounceTime), o = x(() => e.dataSource), s = x(() => e.autoRequest);
|
|
1491
1491
|
return {
|
|
1492
1492
|
rowKey: a,
|
|
@@ -1498,7 +1498,7 @@ function va(e) {
|
|
|
1498
1498
|
autoRequest: s
|
|
1499
1499
|
};
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function ga({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, dataSource: s, waitRequest: u, debounceTime: g }, { params: f, columns: R, setLoading: m, setColumns: T, removeRowKeys: v, syncSelectedRows: c, defaultFormSearch: S, setPagination: b, pageInfo: j, paginationInfo: Y, onRequestError: A, onBeforeSearchSubmit: D, hasCustomRender: P }, q) {
|
|
1502
1502
|
const U = w(""), E = w(!1), V = w(!1), z = w([]), N = w(), L = w(null), H = (i = !1) => {
|
|
1503
1503
|
(E.value || i) && m(!1), Te(!1);
|
|
1504
1504
|
}, J = async (i = {}) => {
|
|
@@ -1519,7 +1519,7 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1519
1519
|
let ue = {
|
|
1520
1520
|
...Y.value === !1 ? {} : {
|
|
1521
1521
|
pageSize: j.pageSize,
|
|
1522
|
-
current:
|
|
1522
|
+
current: fl(he(j), r.length)
|
|
1523
1523
|
},
|
|
1524
1524
|
...F(S),
|
|
1525
1525
|
...F(f),
|
|
@@ -1532,7 +1532,7 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1532
1532
|
extra: de
|
|
1533
1533
|
}));
|
|
1534
1534
|
let fe = [];
|
|
1535
|
-
const De = `table_request_${
|
|
1535
|
+
const De = `table_request_${Pt().uuid(10)}`;
|
|
1536
1536
|
U.value = De;
|
|
1537
1537
|
const Be = await n?.({
|
|
1538
1538
|
params: le(he(ue)),
|
|
@@ -1563,7 +1563,7 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1563
1563
|
H(!0);
|
|
1564
1564
|
}
|
|
1565
1565
|
return [];
|
|
1566
|
-
}, X =
|
|
1566
|
+
}, X = va(async (i = {}) => {
|
|
1567
1567
|
if (N.value && clearTimeout(N.value), !n)
|
|
1568
1568
|
return;
|
|
1569
1569
|
const C = new AbortController();
|
|
@@ -1579,7 +1579,7 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1579
1579
|
]);
|
|
1580
1580
|
if (C.signal.aborted)
|
|
1581
1581
|
return;
|
|
1582
|
-
const p =
|
|
1582
|
+
const p = cl(l.value, h);
|
|
1583
1583
|
return p && !E.value && (N.value = setTimeout(() => {
|
|
1584
1584
|
X.run({ ...i, isPolling: p });
|
|
1585
1585
|
}, Math.max(p, 2e3))), h;
|
|
@@ -1593,12 +1593,12 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1593
1593
|
};
|
|
1594
1594
|
nt(() => {
|
|
1595
1595
|
E.value = !1;
|
|
1596
|
-
}), Ct(() => {
|
|
1597
|
-
E.value = !1;
|
|
1598
1596
|
}), St(() => {
|
|
1599
|
-
|
|
1597
|
+
E.value = !1;
|
|
1600
1598
|
}), xt(() => {
|
|
1601
1599
|
ie(), E.value = !0, clearTimeout(N.value);
|
|
1600
|
+
}), wt(() => {
|
|
1601
|
+
ie(), E.value = !0, clearTimeout(N.value);
|
|
1602
1602
|
}), M(() => l.value, () => {
|
|
1603
1603
|
u.value || (l.value ? X.run({ isPolling: !0 }) : clearTimeout(N.value));
|
|
1604
1604
|
}, { immediate: !0 }), M(() => u.value, () => {
|
|
@@ -1626,7 +1626,7 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1626
1626
|
ie(), X.run({ pagination: i, filters: C, sorter: h, extra: p, isPolling: !1 });
|
|
1627
1627
|
}
|
|
1628
1628
|
function se(i) {
|
|
1629
|
-
const C =
|
|
1629
|
+
const C = dl(le(i), he(j));
|
|
1630
1630
|
if (z.value = C, !n || !ze(n)) {
|
|
1631
1631
|
const h = C.length || 0;
|
|
1632
1632
|
h !== j.total && b({
|
|
@@ -1661,7 +1661,7 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1661
1661
|
}
|
|
1662
1662
|
};
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1664
|
+
function ba(e) {
|
|
1665
1665
|
const a = w(l(e.loading.value));
|
|
1666
1666
|
M(() => e.loading.value, (o) => {
|
|
1667
1667
|
a.value = l(o, a.value);
|
|
@@ -1682,7 +1682,7 @@ const Me = {
|
|
|
1682
1682
|
showSizeChanger: !0,
|
|
1683
1683
|
pageSizeOptions: ["10", "20", "50", "100"]
|
|
1684
1684
|
};
|
|
1685
|
-
function
|
|
1685
|
+
function pa({
|
|
1686
1686
|
pagination: e,
|
|
1687
1687
|
pageItemRender: a
|
|
1688
1688
|
}) {
|
|
@@ -1713,7 +1713,7 @@ function ba({
|
|
|
1713
1713
|
...e.value || {},
|
|
1714
1714
|
...s || {}
|
|
1715
1715
|
};
|
|
1716
|
-
e.value?.showTotal || (u.showTotal = (g) => `共${g < u.pageSize ? 1 : Math.ceil(g / (u.pageSize || 10))}页 ${g}条记录`), l.value = le(u),
|
|
1716
|
+
e.value?.showTotal || (u.showTotal = (g) => `共${g < u.pageSize ? 1 : Math.ceil(g / (u.pageSize || 10))}页 ${g}条记录`), l.value = le(u), ml(n, (g) => {
|
|
1717
1717
|
we(u[g]) && (n[g] = u[g]);
|
|
1718
1718
|
});
|
|
1719
1719
|
}, {
|
|
@@ -1733,7 +1733,7 @@ function ba({
|
|
|
1733
1733
|
setPagination: o
|
|
1734
1734
|
};
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function ya(e, a) {
|
|
1737
1737
|
const l = w([]), n = w([]);
|
|
1738
1738
|
M(() => a.value?.selectedRows, (m) => {
|
|
1739
1739
|
n.value = le(m || []);
|
|
@@ -1741,7 +1741,7 @@ function pa(e, a) {
|
|
|
1741
1741
|
deep: !0,
|
|
1742
1742
|
immediate: !0
|
|
1743
1743
|
}), M(() => a.value?.selectedRowKeys, (m) => {
|
|
1744
|
-
l.value =
|
|
1744
|
+
l.value = vl([...m || []]);
|
|
1745
1745
|
}, {
|
|
1746
1746
|
deep: !0,
|
|
1747
1747
|
immediate: !0
|
|
@@ -1776,10 +1776,10 @@ function pa(e, a) {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
};
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1779
|
+
function Ca(e) {
|
|
1780
1780
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ne(e);
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1782
|
+
function Sa(e, a, l, n) {
|
|
1783
1783
|
if (!a) return e;
|
|
1784
1784
|
let o = e;
|
|
1785
1785
|
if (oe(a)) {
|
|
@@ -1787,7 +1787,7 @@ function Ca(e, a, l, n) {
|
|
|
1787
1787
|
return d(s, Q(a?.attr || {}, {
|
|
1788
1788
|
class: a.class,
|
|
1789
1789
|
onClick: a.click
|
|
1790
|
-
}),
|
|
1790
|
+
}), Ca(e) ? e : {
|
|
1791
1791
|
default: () => [e]
|
|
1792
1792
|
});
|
|
1793
1793
|
}
|
|
@@ -1812,11 +1812,11 @@ function Ca(e, a, l, n) {
|
|
|
1812
1812
|
}
|
|
1813
1813
|
return o;
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1815
|
+
function xa(e, a) {
|
|
1816
1816
|
const l = a && a.current || 1, n = a && a.pageSize || 10;
|
|
1817
1817
|
return e.filter((o, s) => s < l * n && s >= n * (l - 1));
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1819
|
+
function wa(e) {
|
|
1820
1820
|
const a = document.createElement("textarea");
|
|
1821
1821
|
a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
|
|
1822
1822
|
}
|
|
@@ -1842,10 +1842,10 @@ function Ee(e, a) {
|
|
|
1842
1842
|
subtree: !0
|
|
1843
1843
|
}), o);
|
|
1844
1844
|
}
|
|
1845
|
-
function
|
|
1845
|
+
function Ta({ fitPage: e, hashId: a, scroll: l, baseClassName: n }) {
|
|
1846
1846
|
const o = w(), s = w(), u = w(), g = w(), f = w(), R = w(), m = w(0);
|
|
1847
1847
|
let T, v, c, S;
|
|
1848
|
-
|
|
1848
|
+
rl(() => {
|
|
1849
1849
|
T = Ee(() => s.value?.querySelector(".ant-pagination"), (E) => {
|
|
1850
1850
|
E && (u.value = E);
|
|
1851
1851
|
}), c = Ee(() => s.value?.querySelector(".ant-table-header"), (E) => {
|
|
@@ -1875,7 +1875,7 @@ function wa({ fitPage: e, hashId: a, scroll: l, baseClassName: n }) {
|
|
|
1875
1875
|
() => D.value
|
|
1876
1876
|
], () => {
|
|
1877
1877
|
f.value && e.value && f.value.setAttribute("style", `height: ${D.value}px;`);
|
|
1878
|
-
}),
|
|
1878
|
+
}), Rl(f, {
|
|
1879
1879
|
onScroll: () => {
|
|
1880
1880
|
f.value && o.value?.handleScroll(f.value);
|
|
1881
1881
|
}
|
|
@@ -1883,19 +1883,19 @@ function wa({ fitPage: e, hashId: a, scroll: l, baseClassName: n }) {
|
|
|
1883
1883
|
const q = () => {
|
|
1884
1884
|
o.value?.update();
|
|
1885
1885
|
};
|
|
1886
|
-
|
|
1886
|
+
$l(f, q), nt(() => {
|
|
1887
1887
|
ot(() => {
|
|
1888
1888
|
q();
|
|
1889
1889
|
});
|
|
1890
|
-
}),
|
|
1890
|
+
}), Qt(() => q());
|
|
1891
1891
|
function U() {
|
|
1892
1892
|
T && T(), v && v(), c && c(), S && S();
|
|
1893
1893
|
}
|
|
1894
|
-
return
|
|
1894
|
+
return xt(() => {
|
|
1895
1895
|
U();
|
|
1896
|
-
}),
|
|
1896
|
+
}), wt(() => {
|
|
1897
1897
|
U && U();
|
|
1898
|
-
}),
|
|
1898
|
+
}), Zl({
|
|
1899
1899
|
className: `${n}-scroll`,
|
|
1900
1900
|
hashId: a,
|
|
1901
1901
|
tableScrollYHeight: D,
|
|
@@ -1911,7 +1911,7 @@ function wa({ fitPage: e, hashId: a, scroll: l, baseClassName: n }) {
|
|
|
1911
1911
|
tableListToolsHeight: m
|
|
1912
1912
|
};
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Ra(e) {
|
|
1915
1915
|
const a = {};
|
|
1916
1916
|
return e.forEach((l) => {
|
|
1917
1917
|
let n = l.initialValue;
|
|
@@ -1919,13 +1919,13 @@ function Ta(e) {
|
|
|
1919
1919
|
l.valueType && !n && o.includes(l.valueType) && (n = []), l.name && (a[l.name] = n), l.valueType === "dateRange" && (l.rangeStartName || l.rangeEndName) && (a[l.rangeStartName || "start"] = k(n) ? n[0] : void 0, a[l.rangeEndName || "end"] = k(n) ? n[1] : void 0, delete a[l.name]);
|
|
1920
1920
|
}), a;
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1922
|
+
function $a({ searchMap: e, columns: a }) {
|
|
1923
1923
|
const l = w([]), n = w({});
|
|
1924
1924
|
function o(s) {
|
|
1925
1925
|
s.forEach((g) => {
|
|
1926
1926
|
l.value.some((f) => f.name === g.name) ? l.value = l.value.map((f) => f.name === g.name ? { ...f, ...g } : f) : l.value.push(g);
|
|
1927
1927
|
});
|
|
1928
|
-
const u =
|
|
1928
|
+
const u = Ra(s);
|
|
1929
1929
|
n.value = { ...n.value, ...u };
|
|
1930
1930
|
}
|
|
1931
1931
|
return M(() => e.value, () => {
|
|
@@ -1938,8 +1938,8 @@ function Ra({ searchMap: e, columns: a }) {
|
|
|
1938
1938
|
}), s.length && o(s);
|
|
1939
1939
|
}, { deep: !0, immediate: !0 }), { formCols: l, defaultFormSearch: n };
|
|
1940
1940
|
}
|
|
1941
|
-
function
|
|
1942
|
-
const R = x(() => f.value ? we(f.value) ? g.value > f.value :
|
|
1941
|
+
function Fa({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: o, rowSelection: s, screens: u, innerWidth: g, scrollBreakpoint: f }) {
|
|
1942
|
+
const R = x(() => f.value ? we(f.value) ? g.value > f.value : It(f.value) ? u.value?.[f.value] : u.value?.xl : u.value?.xl), m = x(() => {
|
|
1943
1943
|
let v = 0;
|
|
1944
1944
|
const c = F(s) ? 60 : 0, S = 150, b = le(F(a));
|
|
1945
1945
|
b.forEach((A) => {
|
|
@@ -1948,11 +1948,11 @@ function $a({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll:
|
|
|
1948
1948
|
const Y = b.filter((A) => !Reflect.has(A, "width")).length;
|
|
1949
1949
|
return Y !== 0 && (v += Y * S), c && (v += c), v;
|
|
1950
1950
|
});
|
|
1951
|
-
return { proScroll: x(() => o.value ? {} : e.value &&
|
|
1951
|
+
return { proScroll: x(() => o.value ? {} : e.value && Ft(e.value).length ? F(e) : n.value ? {
|
|
1952
1952
|
y: e.value?.y || (u.value?.xl ? 400 : 235)
|
|
1953
1953
|
} : l.value ? R.value ? {} : Oe(R.value) ? { x: m.value } : {} : {}), breakpoint: R };
|
|
1954
1954
|
}
|
|
1955
|
-
function
|
|
1955
|
+
function Pa(e) {
|
|
1956
1956
|
const a = w(e.size.value || "middle");
|
|
1957
1957
|
M(() => e.size.value, (n) => a.value = n);
|
|
1958
1958
|
function l(n) {
|
|
@@ -1960,7 +1960,7 @@ function Fa(e) {
|
|
|
1960
1960
|
}
|
|
1961
1961
|
return [a, l];
|
|
1962
1962
|
}
|
|
1963
|
-
const
|
|
1963
|
+
const Ia = (e) => ({
|
|
1964
1964
|
[e.componentCls]: {
|
|
1965
1965
|
[`${e.componentCls}-list`]: {
|
|
1966
1966
|
clear: "both",
|
|
@@ -1993,8 +1993,8 @@ const Pa = (e) => ({
|
|
|
1993
1993
|
width: 0,
|
|
1994
1994
|
height: 0
|
|
1995
1995
|
}
|
|
1996
|
-
}),
|
|
1997
|
-
const a = new
|
|
1996
|
+
}), Aa = (e) => {
|
|
1997
|
+
const a = new bt(e.colorText).setAlpha(0.2).toRgbString(), l = new bt(e.colorText).setAlpha(0.4).toRgbString();
|
|
1998
1998
|
return {
|
|
1999
1999
|
[e.componentCls]: {
|
|
2000
2000
|
[`${e.antCls}-table-container`]: {
|
|
@@ -2045,7 +2045,7 @@ const Pa = (e) => ({
|
|
|
2045
2045
|
}
|
|
2046
2046
|
}
|
|
2047
2047
|
};
|
|
2048
|
-
},
|
|
2048
|
+
}, Ba = (e) => {
|
|
2049
2049
|
const a = `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`;
|
|
2050
2050
|
return {
|
|
2051
2051
|
[e.componentCls]: {
|
|
@@ -2085,7 +2085,7 @@ const Pa = (e) => ({
|
|
|
2085
2085
|
}
|
|
2086
2086
|
}
|
|
2087
2087
|
};
|
|
2088
|
-
},
|
|
2088
|
+
}, Na = (e) => ({
|
|
2089
2089
|
[e.componentCls]: {
|
|
2090
2090
|
[`${e.componentCls}-card`]: {
|
|
2091
2091
|
[`${e.antCls}-table-pagination${e.antCls}-pagination`]: {
|
|
@@ -2254,10 +2254,10 @@ const Pa = (e) => ({
|
|
|
2254
2254
|
}
|
|
2255
2255
|
}
|
|
2256
2256
|
});
|
|
2257
|
-
function
|
|
2257
|
+
function Ea(e) {
|
|
2258
2258
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ne(e);
|
|
2259
2259
|
}
|
|
2260
|
-
const
|
|
2260
|
+
const za = Et.PRESENTED_IMAGE_SIMPLE, Oa = Bl.useToken, Ze = /* @__PURE__ */ ge({
|
|
2261
2261
|
name: "GProTable",
|
|
2262
2262
|
inheritAttrs: !1,
|
|
2263
2263
|
props: ve,
|
|
@@ -2268,22 +2268,22 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2268
2268
|
slots: l,
|
|
2269
2269
|
expose: n
|
|
2270
2270
|
}) {
|
|
2271
|
-
const o =
|
|
2271
|
+
const o = hl({
|
|
2272
2272
|
suffixCls: "table",
|
|
2273
2273
|
isPor: !0
|
|
2274
2274
|
}), {
|
|
2275
2275
|
wrapSSR: s,
|
|
2276
2276
|
hashId: u
|
|
2277
|
-
} =
|
|
2277
|
+
} = Rt("ProBaseTable", [Na, Aa, Ba, Ia, Jl], o), {
|
|
2278
2278
|
token: g
|
|
2279
|
-
} =
|
|
2279
|
+
} = Oa(), f = sl(), R = it(), {
|
|
2280
2280
|
width: m
|
|
2281
|
-
} =
|
|
2282
|
-
|
|
2281
|
+
} = Fl(), T = w(!1), v = Tt(), c = w(), S = w(), b = w(e.waitRequest);
|
|
2282
|
+
Ct(() => b.value = e.waitRequest);
|
|
2283
2283
|
const {
|
|
2284
2284
|
toggle: j,
|
|
2285
2285
|
isFullscreen: Y
|
|
2286
|
-
} =
|
|
2286
|
+
} = At(c), A = x(() => !R.value.xl), D = x(() => (e.virtualScroll && jl(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), P = x(() => {
|
|
2287
2287
|
if (e.form === !1) return !1;
|
|
2288
2288
|
const y = {
|
|
2289
2289
|
actions: {
|
|
@@ -2302,23 +2302,23 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2302
2302
|
}), q = x(() => P.value === !1 ? {} : P.value), U = x(() => q.value?.autoRequest ?? e.autoRequest), E = x(() => q.value?.actions), V = x(() => {
|
|
2303
2303
|
const y = le(e.columns || []).filter(($) => $.key || $.dataIndex).filter(($) => $.show ?? !0).map(($) => {
|
|
2304
2304
|
const I = $.key || $.dataIndex;
|
|
2305
|
-
return $.key = I, $.dataIndex = I, $.align = $.align || e.align, $.uuid = $.uuid ||
|
|
2305
|
+
return $.key = I, $.dataIndex = I, $.align = $.align || e.align, $.uuid = $.uuid || Pt().uuid(15), $;
|
|
2306
2306
|
});
|
|
2307
|
-
return
|
|
2307
|
+
return gl(y, {
|
|
2308
2308
|
align: e.align || "left",
|
|
2309
2309
|
showIndex: e.showIndex ?? !1
|
|
2310
2310
|
});
|
|
2311
|
-
}), [z, N] =
|
|
2311
|
+
}), [z, N] = ba({
|
|
2312
2312
|
loading: K(e, "loading")
|
|
2313
|
-
}), [L, H] =
|
|
2313
|
+
}), [L, H] = Pa({
|
|
2314
2314
|
size: K(e, "size")
|
|
2315
2315
|
}), {
|
|
2316
2316
|
paginationInfo: J,
|
|
2317
2317
|
requestPagination: X,
|
|
2318
2318
|
setPagination: ie
|
|
2319
|
-
} =
|
|
2319
|
+
} = pa({
|
|
2320
2320
|
pagination: K(e, "pagination"),
|
|
2321
|
-
pageItemRender:
|
|
2321
|
+
pageItemRender: vt({
|
|
2322
2322
|
slots: l,
|
|
2323
2323
|
props: e,
|
|
2324
2324
|
key: "pageItemRender"
|
|
@@ -2326,7 +2326,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2326
2326
|
}), {
|
|
2327
2327
|
proScroll: re,
|
|
2328
2328
|
breakpoint: be
|
|
2329
|
-
} =
|
|
2329
|
+
} = Fa({
|
|
2330
2330
|
scroll: K(e, "scroll"),
|
|
2331
2331
|
autoScroll: K(e, "autoScroll"),
|
|
2332
2332
|
modalScroll: K(e, "modalScroll"),
|
|
@@ -2340,7 +2340,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2340
2340
|
proColumns: pe,
|
|
2341
2341
|
setColumns: Te,
|
|
2342
2342
|
resizeColumnWidth: ye
|
|
2343
|
-
} =
|
|
2343
|
+
} = ma({
|
|
2344
2344
|
draggable: K(e, "draggable"),
|
|
2345
2345
|
neverScroll: K(e, "neverScroll"),
|
|
2346
2346
|
autoScroll: K(e, "autoScroll"),
|
|
@@ -2350,7 +2350,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2350
2350
|
}), {
|
|
2351
2351
|
formCols: se,
|
|
2352
2352
|
defaultFormSearch: t
|
|
2353
|
-
} =
|
|
2353
|
+
} = $a({
|
|
2354
2354
|
searchMap: K(e, "searchMap"),
|
|
2355
2355
|
columns: V
|
|
2356
2356
|
}), {
|
|
@@ -2362,14 +2362,14 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2362
2362
|
syncSelectedRows: Z,
|
|
2363
2363
|
removeRowKeys: de,
|
|
2364
2364
|
clearAllRowKeys: ee
|
|
2365
|
-
} =
|
|
2365
|
+
} = ya(K(e, "rowKey"), K(e, "rowSelection")), rt = ha(e), {
|
|
2366
2366
|
run: ue,
|
|
2367
2367
|
setTableDataList: fe,
|
|
2368
2368
|
operateTableDataRow: De,
|
|
2369
2369
|
isTreeDataRef: Be,
|
|
2370
2370
|
dataSource: ce,
|
|
2371
2371
|
handleTableChange: Re
|
|
2372
|
-
} =
|
|
2372
|
+
} = ga({
|
|
2373
2373
|
...rt,
|
|
2374
2374
|
waitRequest: b
|
|
2375
2375
|
}, {
|
|
@@ -2392,9 +2392,9 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2392
2392
|
tableScrollYHeight: $e,
|
|
2393
2393
|
tableListToolsHeight: ke,
|
|
2394
2394
|
tableScrollEl: st,
|
|
2395
|
-
tableOverHidden:
|
|
2396
|
-
barRef:
|
|
2397
|
-
} =
|
|
2395
|
+
tableOverHidden: Ht,
|
|
2396
|
+
barRef: Lt
|
|
2397
|
+
} = Ta({
|
|
2398
2398
|
hashId: u,
|
|
2399
2399
|
scroll: re,
|
|
2400
2400
|
baseClassName: o,
|
|
@@ -2407,7 +2407,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2407
2407
|
...F(re),
|
|
2408
2408
|
...y
|
|
2409
2409
|
};
|
|
2410
|
-
}),
|
|
2410
|
+
}), Wt = x(() => ({
|
|
2411
2411
|
size: F(L),
|
|
2412
2412
|
scroll: F(ut),
|
|
2413
2413
|
dataSource: F(ce),
|
|
@@ -2421,7 +2421,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2421
2421
|
spinning: e.showLoading ? Ge(z.value) : !1,
|
|
2422
2422
|
...y
|
|
2423
2423
|
};
|
|
2424
|
-
}),
|
|
2424
|
+
}), Yt = x(() => {
|
|
2425
2425
|
let y;
|
|
2426
2426
|
const $ = e.direction === "rtl" ? "bottomLeft" : "right", I = F(J)?.position;
|
|
2427
2427
|
if (I !== null && Array.isArray(I)) {
|
|
@@ -2431,12 +2431,19 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2431
2431
|
y = $;
|
|
2432
2432
|
return y;
|
|
2433
2433
|
});
|
|
2434
|
-
|
|
2434
|
+
function dt() {
|
|
2435
|
+
return {
|
|
2436
|
+
...F(t),
|
|
2437
|
+
...S.value?.getFormSearch(),
|
|
2438
|
+
...e.params
|
|
2439
|
+
};
|
|
2440
|
+
}
|
|
2441
|
+
fa(() => {
|
|
2435
2442
|
T.value ? e.keepAliveReload && ue({
|
|
2436
|
-
params:
|
|
2443
|
+
params: dt()
|
|
2437
2444
|
}) : T.value = !0;
|
|
2438
2445
|
});
|
|
2439
|
-
const
|
|
2446
|
+
const Mt = async (y, $) => {
|
|
2440
2447
|
if (U.value) {
|
|
2441
2448
|
ue({
|
|
2442
2449
|
params: y
|
|
@@ -2450,12 +2457,12 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2450
2457
|
}));
|
|
2451
2458
|
}, Ve = (y, $, I, O) => {
|
|
2452
2459
|
Re(y, $, I, O), e.onChange?.(y, $, I, O);
|
|
2453
|
-
},
|
|
2460
|
+
}, qt = (y) => e.onExpandedRowsChange?.(y), Kt = (y, $) => e.onExpand?.(y, $), kt = (y, $) => {
|
|
2454
2461
|
ye(y, $), e.onResizeColumn?.(y, $);
|
|
2455
|
-
},
|
|
2462
|
+
}, Vt = (y, $, I) => {
|
|
2456
2463
|
let O = y;
|
|
2457
2464
|
if ($) {
|
|
2458
|
-
const W = k(y) ? typeof y?.[0]?.children == "string" ? y?.[0]?.children : "" : y ? y.toString() : "", _ = I.tooltip === !1 ? {} : I.tooltip, ae = I.tooltip === !1 ? 1 : we(_?.hiddenLine) && _?.hiddenLine > 0 ? _?.hiddenLine : 1, G = I.tooltip === !1 ? 0 : we(_?.width) ? _?.width : 0, je = I.tooltip !== !1 &&
|
|
2465
|
+
const W = k(y) ? typeof y?.[0]?.children == "string" ? y?.[0]?.children : "" : y ? y.toString() : "", _ = I.tooltip === !1 ? {} : I.tooltip, ae = I.tooltip === !1 ? 1 : we(_?.hiddenLine) && _?.hiddenLine > 0 ? _?.hiddenLine : 1, G = I.tooltip === !1 ? 0 : we(_?.width) ? _?.width : 0, je = I.tooltip !== !1 && It(W) && G > 0 ? yl(W, {
|
|
2459
2466
|
cssObject: {
|
|
2460
2467
|
fontSize: "14px",
|
|
2461
2468
|
lineHeight: "22px",
|
|
@@ -2464,12 +2471,12 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2464
2471
|
}
|
|
2465
2472
|
}) : 0, He = document.querySelector(`.${o} .ant-table-tbody`), Le = d("div", {
|
|
2466
2473
|
class: `${o}-ellipsis-text`
|
|
2467
|
-
}, [y]),
|
|
2474
|
+
}, [y]), mt = () => I.tooltip === !1 || oe(I.tooltip) && je < G && G > 0 ? Le : d(Ae, Q({
|
|
2468
2475
|
title: y,
|
|
2469
2476
|
getPopupContainer: (Xe) => He ?? Xe?.parentNode?.parentNode
|
|
2470
2477
|
}, oe(I.tooltip) ? I.tooltip : {}, {
|
|
2471
2478
|
destroyTooltipOnHide: !0
|
|
2472
|
-
}),
|
|
2479
|
+
}), Ea(Le) ? Le : {
|
|
2473
2480
|
default: () => [Le]
|
|
2474
2481
|
});
|
|
2475
2482
|
if (O = d("div", {
|
|
@@ -2477,7 +2484,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2477
2484
|
style: {
|
|
2478
2485
|
"-webkit-line-clamp": ae
|
|
2479
2486
|
}
|
|
2480
|
-
}, [
|
|
2487
|
+
}, [mt()]), I.copyable) {
|
|
2481
2488
|
const Xe = typeof I.copyText == "function" ? I.copyText?.(I) : I.copyText || W;
|
|
2482
2489
|
O = d("div", {
|
|
2483
2490
|
class: `${o}-copyable`
|
|
@@ -2486,35 +2493,35 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2486
2493
|
style: {
|
|
2487
2494
|
"-webkit-line-clamp": ae
|
|
2488
2495
|
}
|
|
2489
|
-
}, [
|
|
2496
|
+
}, [mt()]), d(nl, {
|
|
2490
2497
|
class: `${o}-copyable-icon`,
|
|
2491
2498
|
onClick: () => {
|
|
2492
|
-
|
|
2499
|
+
wa(Xe), zl.success("复制成功");
|
|
2493
2500
|
}
|
|
2494
2501
|
}, null)]);
|
|
2495
2502
|
}
|
|
2496
2503
|
}
|
|
2497
2504
|
return O;
|
|
2498
2505
|
};
|
|
2499
|
-
function
|
|
2500
|
-
const y =
|
|
2506
|
+
function ft() {
|
|
2507
|
+
const y = Cl({
|
|
2501
2508
|
slots: l,
|
|
2502
2509
|
props: e,
|
|
2503
2510
|
key: "emptyText"
|
|
2504
2511
|
});
|
|
2505
2512
|
if (y !== !1 && v?.emptyText?.value !== !1) {
|
|
2506
|
-
const I = e.emptyTextProps?.extraProps || {}, O = y || v?.emptyText?.value, W = ne(O), _ = W ?
|
|
2513
|
+
const I = e.emptyTextProps?.extraProps || {}, O = y || v?.emptyText?.value, W = ne(O), _ = W ? yt(O, I) : $t(k(O) ? O : [O]);
|
|
2507
2514
|
return d("div", {
|
|
2508
2515
|
class: B(`${o}-empty-text`, u.value, e.emptyTextProps?.class),
|
|
2509
2516
|
style: e.emptyTextProps?.style
|
|
2510
|
-
}, [W ? _ : k(_) && _.length ? _.map((ae) => lt(ae, I)) : d(
|
|
2511
|
-
image:
|
|
2517
|
+
}, [W ? _ : k(_) && _.length ? _.map((ae) => lt(ae, I)) : d(Et, {
|
|
2518
|
+
image: za
|
|
2512
2519
|
}, null)]);
|
|
2513
2520
|
}
|
|
2514
2521
|
return null;
|
|
2515
2522
|
}
|
|
2516
|
-
const
|
|
2517
|
-
const y =
|
|
2523
|
+
const Xt = () => {
|
|
2524
|
+
const y = vt({
|
|
2518
2525
|
slots: l,
|
|
2519
2526
|
props: e,
|
|
2520
2527
|
key: "customRender"
|
|
@@ -2524,14 +2531,14 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2524
2531
|
const $ = le(F(ce));
|
|
2525
2532
|
return y?.({
|
|
2526
2533
|
dataSource: $,
|
|
2527
|
-
currentData:
|
|
2534
|
+
currentData: xa($, J.value)
|
|
2528
2535
|
});
|
|
2529
2536
|
}
|
|
2530
|
-
return
|
|
2537
|
+
return ft();
|
|
2531
2538
|
}
|
|
2532
2539
|
return d(Pe, null, null);
|
|
2533
2540
|
};
|
|
2534
|
-
return
|
|
2541
|
+
return Ll({
|
|
2535
2542
|
hashId: u,
|
|
2536
2543
|
prefixCls: o,
|
|
2537
2544
|
tableScrollState: ut,
|
|
@@ -2554,11 +2561,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2554
2561
|
setPagination: ie
|
|
2555
2562
|
}), n({
|
|
2556
2563
|
formRef: () => ({
|
|
2557
|
-
getFormSearch:
|
|
2558
|
-
...F(t),
|
|
2559
|
-
...S.value?.getFormSearch(),
|
|
2560
|
-
...e.params
|
|
2561
|
-
}),
|
|
2564
|
+
getFormSearch: dt,
|
|
2562
2565
|
getFormInnerState: () => S.value?.getFormSearch() || {},
|
|
2563
2566
|
restFormState: (y) => {
|
|
2564
2567
|
b.value = !0, y && y?.(), S.value?.resetForm(!1), b.value = !1;
|
|
@@ -2593,7 +2596,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2593
2596
|
setLoading: N
|
|
2594
2597
|
})
|
|
2595
2598
|
}), () => {
|
|
2596
|
-
const y = Ge(e.customRender || l.customRender), $ = l.actions?.() || e.actionProps?.actions, I =
|
|
2599
|
+
const y = Ge(e.customRender || l.customRender), $ = l.actions?.() || e.actionProps?.actions, I = bl({
|
|
2597
2600
|
slots: l,
|
|
2598
2601
|
props: e,
|
|
2599
2602
|
keys: ["headerTitle", "headerTitleTip", "listToolAfter"],
|
|
@@ -2614,14 +2617,14 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2614
2617
|
}, [d("div", {
|
|
2615
2618
|
class: B(`${o}-content`, u.value, e.classNames?.content),
|
|
2616
2619
|
style: e.styles?.content
|
|
2617
|
-
}, [(se.value.length > 0 || !!l.form) && e.form !== !1 && d(
|
|
2620
|
+
}, [(se.value.length > 0 || !!l.form) && e.form !== !1 && d(Ul, {
|
|
2618
2621
|
ref: S,
|
|
2619
2622
|
modalScroll: e.modalScroll,
|
|
2620
2623
|
cardBordered: e.cardBordered,
|
|
2621
2624
|
formCols: se.value,
|
|
2622
2625
|
prefixCls: o,
|
|
2623
2626
|
loading: F(z),
|
|
2624
|
-
onSearch:
|
|
2627
|
+
onSearch: Mt,
|
|
2625
2628
|
defaultFormSearch: t.value
|
|
2626
2629
|
}, {
|
|
2627
2630
|
default: l.form ? () => l.form?.() : null
|
|
@@ -2629,7 +2632,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2629
2632
|
ref: Ce,
|
|
2630
2633
|
class: B(e.classNames?.card, u.value, `${o}-card`, e.cardBordered && `${o}-card-border`),
|
|
2631
2634
|
style: e.styles?.card
|
|
2632
|
-
}, [d(
|
|
2635
|
+
}, [d(ca, {
|
|
2633
2636
|
options: e.options ? {
|
|
2634
2637
|
...oe(e.options) ? e.options : {}
|
|
2635
2638
|
} : !1,
|
|
@@ -2639,7 +2642,7 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2639
2642
|
headerTitle: I.headerTitle,
|
|
2640
2643
|
listToolAfter: I.listToolAfter,
|
|
2641
2644
|
headerTitleTip: I.headerTitleTip
|
|
2642
|
-
}, null), y ? d(
|
|
2645
|
+
}, null), y ? d(Nt, ct.value, {
|
|
2643
2646
|
default: () => [d("div", {
|
|
2644
2647
|
class: B(`${o}-list ${u.value}`, e.classNames?.list),
|
|
2645
2648
|
style: e.styles?.list
|
|
@@ -2649,17 +2652,17 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2649
2652
|
...e.styles?.listContent || {},
|
|
2650
2653
|
height: $e.value ? Se($e.value) : e.styles?.listContent?.height
|
|
2651
2654
|
}
|
|
2652
|
-
}, [
|
|
2653
|
-
class: B(u.value, `${o}-pagination`, `${o}-pagination-${
|
|
2655
|
+
}, [Xt()]), e.pagination !== !1 && ce.value?.length > 0 && d(Nl, Q(he(F(J)), {
|
|
2656
|
+
class: B(u.value, `${o}-pagination`, `${o}-pagination-${Yt.value}`, e.classNames?.pagination),
|
|
2654
2657
|
style: e.styles?.pagination,
|
|
2655
2658
|
onChange: (O, W) => Ve({
|
|
2656
2659
|
current: O,
|
|
2657
2660
|
pageSize: W
|
|
2658
2661
|
})
|
|
2659
2662
|
}), null)])]
|
|
2660
|
-
}) : d(Pe, null, [d(
|
|
2663
|
+
}) : d(Pe, null, [d(El, Q(Ol(e, Object.keys(et)), F(Wt), {
|
|
2661
2664
|
style: e.styles?.table,
|
|
2662
|
-
class: B(e.classNames?.table, u.value,
|
|
2665
|
+
class: B(e.classNames?.table, u.value, Ht.value && `${o}-overflow-hidden`),
|
|
2663
2666
|
loading: ct.value,
|
|
2664
2667
|
rowKey: (O) => O[e.rowKey],
|
|
2665
2668
|
transformCellText: (O) => {
|
|
@@ -2673,10 +2676,10 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2673
2676
|
if (k(G))
|
|
2674
2677
|
if (G.length === 0 || G.length === 1 && !ne(G[0])) {
|
|
2675
2678
|
G = G?.[0];
|
|
2676
|
-
const je =
|
|
2677
|
-
ae = je.success, G =
|
|
2679
|
+
const je = pl(G, W?.columnEmptyText || e?.columnEmptyText || "");
|
|
2680
|
+
ae = je.success, G = Sa(je.value, W?.valueType || e.columns?.find((He) => (He.key || He.dataIndex) === _)?.valueType, o, u.value);
|
|
2678
2681
|
} else G[0]?.type === "template" && (G = G[0]?.children);
|
|
2679
|
-
return W?.ellipsis ?
|
|
2682
|
+
return W?.ellipsis ? Vt(G, ae, W) : G;
|
|
2680
2683
|
},
|
|
2681
2684
|
rowSelection: e.rowSelection ? {
|
|
2682
2685
|
...Ie(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
@@ -2686,24 +2689,24 @@ const Ea = Nt.PRESENTED_IMAGE_SIMPLE, za = Al.useToken, Ze = /* @__PURE__ */ ge(
|
|
|
2686
2689
|
onChange: h
|
|
2687
2690
|
} : void 0,
|
|
2688
2691
|
onChange: Ve,
|
|
2689
|
-
onExpandedRowsChange:
|
|
2690
|
-
onExpand:
|
|
2691
|
-
onResizeColumn: (O, W) =>
|
|
2692
|
+
onExpandedRowsChange: qt,
|
|
2693
|
+
onExpand: Kt,
|
|
2694
|
+
onResizeColumn: (O, W) => kt(O, W)
|
|
2692
2695
|
}), {
|
|
2693
2696
|
...l,
|
|
2694
|
-
emptyText: () =>
|
|
2695
|
-
}), st.value && !y && d(
|
|
2697
|
+
emptyText: () => ft()
|
|
2698
|
+
}), st.value && !y && d(Ut, {
|
|
2696
2699
|
to: st.value
|
|
2697
2700
|
}, {
|
|
2698
|
-
default: () => [d(
|
|
2699
|
-
ref:
|
|
2701
|
+
default: () => [d(na, {
|
|
2702
|
+
ref: Lt
|
|
2700
2703
|
}, null)]
|
|
2701
2704
|
})])])])]));
|
|
2702
2705
|
};
|
|
2703
2706
|
}
|
|
2704
2707
|
});
|
|
2705
2708
|
Ze.install = (e) => (e.component(Ze.name, Ze), e);
|
|
2706
|
-
function
|
|
2709
|
+
function Ua(e, a) {
|
|
2707
2710
|
function l() {
|
|
2708
2711
|
const m = {
|
|
2709
2712
|
params: {},
|
|
@@ -2733,7 +2736,7 @@ function Qa(e, a) {
|
|
|
2733
2736
|
o.value?.setLoading?.(!!m);
|
|
2734
2737
|
});
|
|
2735
2738
|
function f() {
|
|
2736
|
-
|
|
2739
|
+
Sl(n, l());
|
|
2737
2740
|
}
|
|
2738
2741
|
function R(m, T) {
|
|
2739
2742
|
n.searchMap && (n.searchMap = le(n.searchMap).map((v) => v.name === m ? xe(v, T) : v));
|
|
@@ -2761,5 +2764,5 @@ function Qa(e, a) {
|
|
|
2761
2764
|
export {
|
|
2762
2765
|
Ze as GProTable,
|
|
2763
2766
|
ve as proTableProps,
|
|
2764
|
-
|
|
2767
|
+
Ua as useTable
|
|
2765
2768
|
};
|