@gx-design-vue/pro-table 0.2.0-beta.145 → 0.2.0-beta.147
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
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.2.0-beta.
|
|
3
|
+
* Version: 0.2.0-beta.146
|
|
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: 2025-12-
|
|
8
|
+
* Date Created: 2025-12-28
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
|
-
import { defineComponent as ge, ref as
|
|
13
|
-
import { UpOutlined as
|
|
14
|
-
import { useProAppContext as
|
|
15
|
-
import { useBreakpoint as
|
|
16
|
-
import { useProStyle as
|
|
17
|
-
import { isArray as J, cloneDeep as ee, isObject as ne, isBoolean as
|
|
18
|
-
import { useDebounceFn as Sl, useEventListener as
|
|
19
|
-
import { DatePicker as
|
|
20
|
-
import { omit as
|
|
12
|
+
import { defineComponent as ge, ref as x, watch as K, cloneVNode as tt, reactive as lt, toRaw as ce, computed as T, createVNode as d, Fragment as we, isVNode as ae, mergeProps as Q, h as gt, onBeforeUnmount as Xt, onMounted as at, nextTick as nt, watchEffect as bt, unref as R, onActivated as pt, getCurrentInstance as _t, onUnmounted as yt, onDeactivated as Ct, onUpdated as Gt, toRef as X, Teleport as Qt, isRef as _e } from "vue";
|
|
13
|
+
import { UpOutlined as Ut, DownOutlined as Jt, InfoCircleOutlined as Zt, FullscreenExitOutlined as el, FullscreenOutlined as tl, ReloadOutlined as ll, CopyOutlined as al } from "@ant-design/icons-vue";
|
|
14
|
+
import { useProAppContext as St } from "@gx-design-vue/pro-app";
|
|
15
|
+
import { useBreakpoint as ot, useMemo as nl, tryOnUnmounted as ol, onMountedOrActivated as il } from "@gx-design-vue/pro-hooks";
|
|
16
|
+
import { useProStyle as Tt, unit as pe, useProConfigContext as sl } from "@gx-design-vue/pro-provider";
|
|
17
|
+
import { isArray as J, cloneDeep as ee, isObject as ne, isBoolean as De, classNames as A, isNumber as Ce, filterEmpty as xt, keysOf as wt, isFunction as Ne, isDeepEqualReact as Me, compareArray as rl, runFunction as ul, getSortIndex as cl, handleCurrentPage as dl, getRandomNumber as $t, deepMerge as ye, forInObject as fl, arrayRepeat as vl, isString as Rt, getPrefixCls as ml, handleShowIndex as hl, getSlot as dt, convertValueBoolean as Ge, getSlotsProps as gl, handleEmptyField as bl, getTextWidth as pl, getSlotVNode as yl, useDeepMerge as Cl } from "@gx-design-vue/pro-utils";
|
|
18
|
+
import { useDebounceFn as Sl, useEventListener as ft, isClient as Tl, useElementBounding as xl, useFullscreen as Pt, useElementSize as He, useScroll as wl, useResizeObserver as $l, useWindowSize as Rl } from "@vueuse/core";
|
|
19
|
+
import { DatePicker as Ft, Input as We, TimePicker as Pl, TreeSelect as Fl, Select as Il, InputNumber as Qe, Button as vt, Spin as It, Tooltip as $e, Empty as Bt, theme as Bl, Pagination as Al, Table as Nl, message as zl } from "ant-design-vue";
|
|
20
|
+
import { omit as ze, cloneDeep as At, pick as Dl } from "lodash-es";
|
|
21
21
|
import { tableProps as Ol } from "ant-design-vue/es/table/Table";
|
|
22
22
|
import "ant-design-vue/es/_util/props-util";
|
|
23
23
|
import { warning as El } from "ant-design-vue/es/vc-util/warning";
|
|
24
24
|
import Z from "dayjs";
|
|
25
|
-
import { useContext as
|
|
26
|
-
import { TinyColor as
|
|
27
|
-
const Ll = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"],
|
|
28
|
-
...
|
|
25
|
+
import { useContext as Nt } from "@gx-design-vue/context";
|
|
26
|
+
import { TinyColor as mt } from "@ctrl/tinycolor";
|
|
27
|
+
const Ll = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], zt = {
|
|
28
|
+
...ze(Ol(), Ll),
|
|
29
29
|
direction: {
|
|
30
30
|
type: String,
|
|
31
31
|
default: "ltr"
|
|
@@ -49,8 +49,8 @@ const Ll = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
49
49
|
type: Object,
|
|
50
50
|
default: void 0
|
|
51
51
|
}
|
|
52
|
-
}, { provideContext: jl, useInjectContext:
|
|
53
|
-
...
|
|
52
|
+
}, { provideContext: jl, useInjectContext: qe } = Nt("pro-table"), he = {
|
|
53
|
+
...zt,
|
|
54
54
|
id: {
|
|
55
55
|
type: String,
|
|
56
56
|
default: ""
|
|
@@ -334,49 +334,49 @@ const Ll = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
334
334
|
}
|
|
335
335
|
},
|
|
336
336
|
setup(e, {
|
|
337
|
-
slots:
|
|
337
|
+
slots: a
|
|
338
338
|
}) {
|
|
339
|
-
const l =
|
|
340
|
-
return
|
|
341
|
-
if (o.value !== "init" &&
|
|
342
|
-
const
|
|
343
|
-
e.fetch && !
|
|
344
|
-
l.value =
|
|
345
|
-
}).catch((
|
|
346
|
-
console.error(
|
|
339
|
+
const l = x([]), n = x(e.loading ?? !1), o = x("init"), r = Sl(e.fetch, e.debounceTime || 10);
|
|
340
|
+
return K([() => e.fetch, () => e.manual], () => {
|
|
341
|
+
if (o.value !== "init" && n.value) return;
|
|
342
|
+
const s = e.manual ?? !1;
|
|
343
|
+
e.fetch && !s && (n.value = !0, r().then((h) => {
|
|
344
|
+
l.value = At(h), o.value = "success";
|
|
345
|
+
}).catch((h) => {
|
|
346
|
+
console.error(h), o.value = "error";
|
|
347
347
|
}).finally(() => {
|
|
348
|
-
|
|
348
|
+
n.value = !1;
|
|
349
349
|
}));
|
|
350
350
|
}, {
|
|
351
351
|
immediate: !0
|
|
352
352
|
}), () => {
|
|
353
|
-
const
|
|
354
|
-
return
|
|
353
|
+
const s = a.default?.();
|
|
354
|
+
return tt(J(s) ? s[0] : s, {
|
|
355
355
|
options: l.value,
|
|
356
|
-
notFoundContent: e.notFoundContent?.(
|
|
356
|
+
notFoundContent: e.notFoundContent?.(n.value)
|
|
357
357
|
});
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
});
|
|
361
|
-
function Wl(e,
|
|
362
|
-
const l =
|
|
363
|
-
function
|
|
361
|
+
function Wl(e, a) {
|
|
362
|
+
const l = lt({});
|
|
363
|
+
function n() {
|
|
364
364
|
Object.assign(l, ee(ce(e)));
|
|
365
|
-
const r =
|
|
365
|
+
const r = a.find((s) => s.valueType === "dateRange");
|
|
366
366
|
r && o(r.name || "", e[r.rangeStartName || "start"] ? [
|
|
367
367
|
e[r.rangeStartName || "start"],
|
|
368
368
|
e[r.rangeEndName || "end"]
|
|
369
369
|
] : []);
|
|
370
370
|
}
|
|
371
|
-
|
|
372
|
-
|
|
371
|
+
K(() => e, () => {
|
|
372
|
+
n();
|
|
373
373
|
}, { deep: !0, immediate: !0 });
|
|
374
|
-
function o(r,
|
|
375
|
-
l[r] =
|
|
374
|
+
function o(r, s) {
|
|
375
|
+
l[r] = s;
|
|
376
376
|
}
|
|
377
377
|
return {
|
|
378
378
|
formState: l,
|
|
379
|
-
resetFormState:
|
|
379
|
+
resetFormState: n,
|
|
380
380
|
changeFormState: o
|
|
381
381
|
};
|
|
382
382
|
}
|
|
@@ -487,7 +487,7 @@ const Yl = (e) => ({
|
|
|
487
487
|
justifyContent: "center",
|
|
488
488
|
alignItems: "center"
|
|
489
489
|
}
|
|
490
|
-
}),
|
|
490
|
+
}), Ue = [
|
|
491
491
|
{ value: "xxl", span: 4 },
|
|
492
492
|
{ value: "xl", span: 3 },
|
|
493
493
|
{ value: "lg", span: 2 },
|
|
@@ -495,21 +495,21 @@ const Yl = (e) => ({
|
|
|
495
495
|
{ value: "sm", span: 2 },
|
|
496
496
|
{ value: "xs", span: 1 }
|
|
497
497
|
];
|
|
498
|
-
function me(e,
|
|
499
|
-
return typeof
|
|
498
|
+
function me(e, a) {
|
|
499
|
+
return typeof a == "function" ? a(Z(e)) : Z(e).format(a);
|
|
500
500
|
}
|
|
501
|
-
function Be(e,
|
|
502
|
-
return
|
|
501
|
+
function Be(e, a) {
|
|
502
|
+
return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const ht = (e, a, l = "string") => {
|
|
505
505
|
if (J(e)) {
|
|
506
|
-
const [
|
|
507
|
-
let r,
|
|
508
|
-
if (Array.isArray(
|
|
509
|
-
const
|
|
510
|
-
return [
|
|
506
|
+
const [n, o] = e;
|
|
507
|
+
let r, s;
|
|
508
|
+
if (Array.isArray(a) ? (r = a[0], s = a[1]) : typeof a == "object" && a.type === "mask" ? (r = a.format, s = a.format) : (r = a, s = a), l === "string") {
|
|
509
|
+
const h = n ? me(n, r) : "", f = o ? me(o, s) : "";
|
|
510
|
+
return [h, f];
|
|
511
511
|
}
|
|
512
|
-
return [Z(
|
|
512
|
+
return [Z(n), Z(o)];
|
|
513
513
|
}
|
|
514
514
|
};
|
|
515
515
|
function Ml(e) {
|
|
@@ -521,12 +521,12 @@ const {
|
|
|
521
521
|
YearPicker: kl,
|
|
522
522
|
WeekPicker: Vl,
|
|
523
523
|
QuarterPicker: Xl
|
|
524
|
-
} =
|
|
524
|
+
} = Ft;
|
|
525
525
|
function _l(e) {
|
|
526
|
-
let
|
|
526
|
+
let a = e.reduce((l, n) => n.order !== void 0 ? Math.max(l, n.order) : l, 0);
|
|
527
527
|
return e.forEach((l) => {
|
|
528
|
-
l.order === void 0 && (
|
|
529
|
-
}), e.sort((l,
|
|
528
|
+
l.order === void 0 && (a += 1, l.order = a);
|
|
529
|
+
}), e.sort((l, n) => l.order - n.order), e;
|
|
530
530
|
}
|
|
531
531
|
const Gl = {
|
|
532
532
|
modalScroll: he.modalScroll,
|
|
@@ -547,131 +547,131 @@ const Gl = {
|
|
|
547
547
|
inheritAttrs: !1,
|
|
548
548
|
props: Gl,
|
|
549
549
|
setup(e, {
|
|
550
|
-
slots:
|
|
550
|
+
slots: a,
|
|
551
551
|
expose: l
|
|
552
552
|
}) {
|
|
553
553
|
const {
|
|
554
|
-
wrapSSR:
|
|
554
|
+
wrapSSR: n,
|
|
555
555
|
hashId: o
|
|
556
|
-
} =
|
|
557
|
-
formAutoRequest:
|
|
556
|
+
} = Tt("ProTableForm", [Yl], e.prefixCls), r = St(), s = ot(), {
|
|
557
|
+
formAutoRequest: h,
|
|
558
558
|
formConfig: f,
|
|
559
559
|
formActions: $,
|
|
560
|
-
screenWidth:
|
|
561
|
-
styles:
|
|
562
|
-
classNames:
|
|
563
|
-
} =
|
|
564
|
-
formState:
|
|
565
|
-
resetFormState:
|
|
566
|
-
changeFormState:
|
|
567
|
-
} = Wl(e.defaultFormSearch, e.formCols),
|
|
560
|
+
screenWidth: v,
|
|
561
|
+
styles: w,
|
|
562
|
+
classNames: m
|
|
563
|
+
} = qe(), {
|
|
564
|
+
formState: u,
|
|
565
|
+
resetFormState: S,
|
|
566
|
+
changeFormState: g
|
|
567
|
+
} = Wl(e.defaultFormSearch, e.formCols), O = x(pe(f.value?.gap || 16)), H = T(() => {
|
|
568
568
|
if (f.value?.breakpoint && ne(f.value.breakpoint) && Object.keys(f.value.breakpoint).length)
|
|
569
569
|
return f.value?.breakpoint;
|
|
570
|
-
}),
|
|
571
|
-
|
|
572
|
-
|
|
570
|
+
}), B = x(f.value?.collapsed ?? f.value?.defaultCollapsed), E = T(() => De($.value?.reset) ? $.value?.reset : !h.value), F = T(() => H.value ? V(H.value, v.value) : L(f.value?.span, s.value)), Y = T(() => f.value?.label);
|
|
571
|
+
K(() => f.value?.collapsed, (t) => {
|
|
572
|
+
B.value = t;
|
|
573
573
|
});
|
|
574
|
-
function V(t,
|
|
574
|
+
function V(t, i) {
|
|
575
575
|
let y = 4;
|
|
576
|
-
const
|
|
577
|
-
for (let C = 0; C <
|
|
578
|
-
const c =
|
|
579
|
-
if (t[c] &&
|
|
576
|
+
const b = Object.keys(t).map((C) => Number(C)).filter((C) => !Number.isNaN(C)).sort((C, c) => c - C);
|
|
577
|
+
for (let C = 0; C < b.length; C += 1) {
|
|
578
|
+
const c = b[C];
|
|
579
|
+
if (t[c] && i >= c) {
|
|
580
580
|
y = t[c];
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
return y;
|
|
585
585
|
}
|
|
586
|
-
function L(t,
|
|
586
|
+
function L(t, i) {
|
|
587
587
|
let y = 4;
|
|
588
|
-
for (let
|
|
589
|
-
const C =
|
|
590
|
-
if (
|
|
591
|
-
y = t?.[C] || (e.modalScroll ? 3 :
|
|
588
|
+
for (let b = 0; b < Ue.length; b += 1) {
|
|
589
|
+
const C = Ue[b].value;
|
|
590
|
+
if (i[C]) {
|
|
591
|
+
y = t?.[C] || (e.modalScroll ? 3 : Ue[b].span);
|
|
592
592
|
break;
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
return y;
|
|
596
596
|
}
|
|
597
|
-
const
|
|
598
|
-
|
|
599
|
-
},
|
|
597
|
+
const N = (t) => {
|
|
598
|
+
B.value = t;
|
|
599
|
+
}, k = (t, i, y) => (t + 1) % i === 0 ? {
|
|
600
600
|
...y,
|
|
601
601
|
marginRight: pe(0)
|
|
602
602
|
} : {
|
|
603
603
|
...y,
|
|
604
|
-
marginRight:
|
|
604
|
+
marginRight: O.value
|
|
605
605
|
}, z = () => {
|
|
606
|
-
const t =
|
|
607
|
-
return
|
|
608
|
-
}, j = (t = !1,
|
|
609
|
-
(
|
|
610
|
-
},
|
|
611
|
-
const
|
|
612
|
-
switch (
|
|
606
|
+
const t = At(u), i = e.formCols.find((C) => C.valueType === "text") || "", y = e.formCols.find((C) => C.valueType === "dateRange") || "", b = e.formCols.find((C) => C.valueType === "treeSelect");
|
|
607
|
+
return i && (t[i.name] = u[i.name] || i.initialValue || ""), y && (t[y.rangeStartName || "start"] = t[y.name] ? t[y.name][0] : "", t[y.rangeEndName || "end"] = t[y.name] ? t[y.name][1] : "", delete t[y.name]), b && (b?.name && J(u[b?.name]) && (t[b.name] = u[b.name].length ? u[b.name].map((C) => C[b.valueKey === "text" ? "label" : "value"]).join() : ""), b?.name && J(t[b?.name]) && (t[b.name] = t[b.name].length ? t[b.name].map((C) => C[b.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
608
|
+
}, j = (t = !1, i) => {
|
|
609
|
+
(h.value || t) && e.onSearch?.(z(), t ? i ? "reset" : "submit" : void 0);
|
|
610
|
+
}, M = (t, i, y) => {
|
|
611
|
+
const b = u[i.name || ""];
|
|
612
|
+
switch (i.valueType) {
|
|
613
613
|
case "text":
|
|
614
|
-
|
|
614
|
+
g(i.name || "", t || "");
|
|
615
615
|
break;
|
|
616
616
|
case "number":
|
|
617
|
-
|
|
617
|
+
g(i.name || "", t || void 0);
|
|
618
618
|
break;
|
|
619
619
|
case "numberRange":
|
|
620
|
-
Ce(y?.key) &&
|
|
620
|
+
Ce(y?.key) && b && (b[y.key] = t, g(i.name || "", b || []));
|
|
621
621
|
break;
|
|
622
622
|
case "select":
|
|
623
|
-
|
|
623
|
+
g(i.name || "", t ?? void 0);
|
|
624
624
|
break;
|
|
625
625
|
case "treeSelect":
|
|
626
|
-
|
|
626
|
+
g(i.name || "", t ?? (i.field?.treeCheckable || i.field?.multiple ? [] : null));
|
|
627
627
|
break;
|
|
628
628
|
case "date":
|
|
629
|
-
|
|
629
|
+
g(i.name || "", t ? me(t, Be(i.valueFormat, i.showTime)) : null);
|
|
630
630
|
break;
|
|
631
631
|
case "dateWeek":
|
|
632
|
-
|
|
632
|
+
g(i.name || "", t ? me(t, "YYYY-wo") : null);
|
|
633
633
|
break;
|
|
634
634
|
case "dateMonth":
|
|
635
|
-
|
|
635
|
+
g(i.name || "", t ? me(t, "YYYY-MM") : null);
|
|
636
636
|
break;
|
|
637
637
|
case "dateQuarter":
|
|
638
|
-
|
|
638
|
+
g(i.name || "", t ? me(t, "YYYY-QQ") : null);
|
|
639
639
|
break;
|
|
640
640
|
case "dateYear":
|
|
641
|
-
|
|
641
|
+
g(i.name || "", t ? me(t, "YYYY") : null);
|
|
642
642
|
break;
|
|
643
643
|
case "dateRange":
|
|
644
|
-
|
|
644
|
+
g(i.name || "", t && J(t) && t.length === 2 ? ht(t, Be(i.valueFormat, i.showTime)) : null);
|
|
645
645
|
break;
|
|
646
646
|
case "time":
|
|
647
|
-
|
|
647
|
+
g(i.name || "", t ? me(t, i.valueFormat || "HH:mm:ss") : null);
|
|
648
648
|
break;
|
|
649
649
|
}
|
|
650
|
-
|
|
651
|
-
},
|
|
652
|
-
|
|
650
|
+
i.valueType === "treeSelect" || i.valueType, j();
|
|
651
|
+
}, q = (t = !0) => {
|
|
652
|
+
S(), j(!0, t);
|
|
653
653
|
};
|
|
654
654
|
l({
|
|
655
655
|
getFormSearch: () => z(),
|
|
656
|
-
resetForm:
|
|
656
|
+
resetForm: q
|
|
657
657
|
});
|
|
658
658
|
const te = () => {
|
|
659
659
|
const t = r?.emptyText?.value;
|
|
660
660
|
if (t) {
|
|
661
|
-
const
|
|
661
|
+
const i = ae(t), y = i ? gt(t) : xt(t || []);
|
|
662
662
|
return d("div", {
|
|
663
|
-
class:
|
|
664
|
-
}, [
|
|
663
|
+
class: A(`${e.prefixCls}-search-empty-text`, o.value)
|
|
664
|
+
}, [i ? y : J(y) ? y.map((b) => tt(b)) : void 0]);
|
|
665
665
|
}
|
|
666
|
-
}, se = () => (!
|
|
667
|
-
class:
|
|
668
|
-
style:
|
|
669
|
-
}, [
|
|
666
|
+
}, se = () => (!h.value || E.value) && d("div", {
|
|
667
|
+
class: A(`${e.prefixCls}-search-buttons ${o.value}`, m.value?.searchButtons),
|
|
668
|
+
style: w.value?.searchButtons
|
|
669
|
+
}, [E.value && d(vt, {
|
|
670
670
|
key: "reset",
|
|
671
|
-
onClick: () =>
|
|
671
|
+
onClick: () => q()
|
|
672
672
|
}, {
|
|
673
673
|
default: () => [$.value?.resetText || "重置"]
|
|
674
|
-
}), !
|
|
674
|
+
}), !h.value && d(vt, {
|
|
675
675
|
key: "submit",
|
|
676
676
|
loading: e.loading,
|
|
677
677
|
type: "primary",
|
|
@@ -680,79 +680,79 @@ const Gl = {
|
|
|
680
680
|
default: () => [$.value?.searchText || "查询"]
|
|
681
681
|
})]), re = ({
|
|
682
682
|
formItemStyle: t = {},
|
|
683
|
-
collapsed:
|
|
683
|
+
collapsed: i,
|
|
684
684
|
collapseRender: y = !0
|
|
685
685
|
}) => d("div", {
|
|
686
686
|
style: {
|
|
687
687
|
...t,
|
|
688
|
-
...
|
|
688
|
+
...w.value?.searchControl
|
|
689
689
|
},
|
|
690
|
-
class:
|
|
690
|
+
class: A(`${e.prefixCls}-search-control ${o.value}`, m.value?.searchControl)
|
|
691
691
|
}, [d("div", {
|
|
692
|
-
class:
|
|
693
|
-
}, [se(), f.value?.collapseRender !== !1 && y && d(we, null, [typeof f.value?.collapseRender == "function" ? f.value?.collapseRender(
|
|
694
|
-
class:
|
|
695
|
-
style:
|
|
696
|
-
onClick: () =>
|
|
697
|
-
}, [
|
|
692
|
+
class: A(`${e.prefixCls}-search-control-content ${o.value}`, m.value?.searchContent)
|
|
693
|
+
}, [se(), f.value?.collapseRender !== !1 && y && d(we, null, [typeof f.value?.collapseRender == "function" ? f.value?.collapseRender(i) : d("span", {
|
|
694
|
+
class: A(`${e.prefixCls}-search-control-text ${o.value}`, m.value?.searchText),
|
|
695
|
+
style: w.value?.searchText,
|
|
696
|
+
onClick: () => N(!i)
|
|
697
|
+
}, [i ? "收起" : "展开", i ? d(Ut, null, null) : d(Jt, null, null)])])])]);
|
|
698
698
|
function be(t) {
|
|
699
|
-
return t === void 0 ? void 0 : t ? d(
|
|
699
|
+
return t === void 0 ? void 0 : t ? d(It, {
|
|
700
700
|
size: "small",
|
|
701
701
|
indicator: r?.indicator?.value
|
|
702
702
|
}, null) : te();
|
|
703
703
|
}
|
|
704
|
-
function de(t,
|
|
704
|
+
function de(t, i) {
|
|
705
705
|
return d(Hl, Q(t.request, {
|
|
706
706
|
loading: t.loading,
|
|
707
707
|
notFoundContent: be
|
|
708
|
-
}), Ml(
|
|
709
|
-
default: () => [
|
|
708
|
+
}), Ml(i) ? i : {
|
|
709
|
+
default: () => [i]
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
712
|
const Re = (t) => {
|
|
713
|
-
let
|
|
714
|
-
const y =
|
|
713
|
+
let i;
|
|
714
|
+
const y = h.value ? We.Search : We, b = ze(t.field || {}, "rules");
|
|
715
715
|
let C = null;
|
|
716
716
|
switch (t.valueType) {
|
|
717
717
|
case "text":
|
|
718
|
-
|
|
718
|
+
i = d(y, Q({
|
|
719
719
|
style: {
|
|
720
720
|
width: "100%"
|
|
721
721
|
},
|
|
722
|
-
value:
|
|
722
|
+
value: u[t.name],
|
|
723
723
|
placeholder: t.placeholder || "请输入",
|
|
724
724
|
allowClear: t.allowClear ?? !0,
|
|
725
|
-
onChange: (c) =>
|
|
725
|
+
onChange: (c) => M(c.target.value, t),
|
|
726
726
|
onSearch: (c) => j()
|
|
727
|
-
},
|
|
727
|
+
}, b), null);
|
|
728
728
|
break;
|
|
729
729
|
case "number":
|
|
730
|
-
|
|
730
|
+
i = d(Qe, Q({
|
|
731
731
|
style: {
|
|
732
732
|
width: "100%"
|
|
733
733
|
},
|
|
734
|
-
value:
|
|
734
|
+
value: u[t.name],
|
|
735
735
|
placeholder: t.placeholder || "请输入",
|
|
736
|
-
onChange: (c) =>
|
|
737
|
-
},
|
|
736
|
+
onChange: (c) => M(c, t)
|
|
737
|
+
}, b), null);
|
|
738
738
|
break;
|
|
739
739
|
case "numberRange":
|
|
740
|
-
|
|
740
|
+
i = d(We.Group, {
|
|
741
741
|
compact: !0,
|
|
742
|
-
class:
|
|
742
|
+
class: A(o.value, `${e.prefixCls}-search-input-compact`)
|
|
743
743
|
}, {
|
|
744
|
-
default: () => [d(
|
|
745
|
-
value:
|
|
746
|
-
onChange: (c) =>
|
|
744
|
+
default: () => [d(Qe, {
|
|
745
|
+
value: u[t.name]?.[0],
|
|
746
|
+
onChange: (c) => M(c, t, {
|
|
747
747
|
key: 0
|
|
748
748
|
}),
|
|
749
749
|
placeholder: J(t.placeholder) && t.placeholder?.[0] || "请输入"
|
|
750
|
-
}, null), d(
|
|
750
|
+
}, null), d(We, {
|
|
751
751
|
disabled: !0,
|
|
752
752
|
placeholder: "~"
|
|
753
|
-
}, null), d(
|
|
754
|
-
value:
|
|
755
|
-
onChange: (c) =>
|
|
753
|
+
}, null), d(Qe, {
|
|
754
|
+
value: u[t.name]?.[1],
|
|
755
|
+
onChange: (c) => M(c, t, {
|
|
756
756
|
key: 1
|
|
757
757
|
}),
|
|
758
758
|
placeholder: J(t.placeholder) && t.placeholder?.[1] || "请输入"
|
|
@@ -764,189 +764,264 @@ const Gl = {
|
|
|
764
764
|
style: {
|
|
765
765
|
width: "100%"
|
|
766
766
|
},
|
|
767
|
-
value: t.loading ? void 0 :
|
|
767
|
+
value: t.loading ? void 0 : u[t.name],
|
|
768
768
|
optionFilterProp: "label",
|
|
769
769
|
placeholder: t.placeholder || "请选择",
|
|
770
770
|
showSearch: t.showSearch,
|
|
771
771
|
allowClear: t.allowClear ?? !0,
|
|
772
772
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
773
773
|
notFoundContent: be(t.loading),
|
|
774
|
-
onChange: (c) =>
|
|
774
|
+
onChange: (c) => M(c, t),
|
|
775
775
|
options: t.loading ? [] : t?.valueEnum || []
|
|
776
|
-
},
|
|
776
|
+
}, b), null);
|
|
777
777
|
break;
|
|
778
778
|
case "treeSelect":
|
|
779
779
|
C = d(Fl, Q({
|
|
780
780
|
style: {
|
|
781
781
|
width: "100%"
|
|
782
782
|
},
|
|
783
|
-
value:
|
|
783
|
+
value: u[t.name],
|
|
784
784
|
placeholder: t.placeholder || "请选择",
|
|
785
785
|
allowClear: t.allowClear ?? !0,
|
|
786
786
|
treeData: t.loading ? [] : t.valueEnum || [],
|
|
787
787
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
788
788
|
notFoundContent: be(t.loading),
|
|
789
|
-
onChange: (c) =>
|
|
790
|
-
},
|
|
789
|
+
onChange: (c) => M(c, t)
|
|
790
|
+
}, b), null);
|
|
791
791
|
break;
|
|
792
792
|
case "date":
|
|
793
|
-
|
|
793
|
+
i = d(Ft, Q({
|
|
794
794
|
style: {
|
|
795
795
|
width: "100%"
|
|
796
796
|
},
|
|
797
|
-
value:
|
|
797
|
+
value: u[t.name] ? Z(u[t.name]) : void 0,
|
|
798
798
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
799
799
|
placeholder: t.placeholder || "请选择",
|
|
800
800
|
allowClear: t.allowClear ?? !0,
|
|
801
801
|
format: Be(t.valueFormat, t.showTime),
|
|
802
802
|
showTime: t.showTime,
|
|
803
803
|
showToday: t.showToday || !0,
|
|
804
|
-
onChange: (c) =>
|
|
805
|
-
},
|
|
804
|
+
onChange: (c) => M(c, t)
|
|
805
|
+
}, b), null);
|
|
806
806
|
break;
|
|
807
807
|
case "dateWeek":
|
|
808
|
-
|
|
808
|
+
i = d(Vl, Q({
|
|
809
809
|
style: {
|
|
810
810
|
width: "100%"
|
|
811
811
|
},
|
|
812
|
-
value:
|
|
812
|
+
value: u[t.name] ? Z(u[t.name], t.valueFormat || "YYYY-wo") : void 0,
|
|
813
813
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
814
814
|
allowClear: t.allowClear ?? !0,
|
|
815
815
|
placeholder: t.placeholder || "请选择",
|
|
816
|
-
onChange: (c) =>
|
|
817
|
-
},
|
|
816
|
+
onChange: (c) => M(c, t)
|
|
817
|
+
}, b), null);
|
|
818
818
|
break;
|
|
819
819
|
case "dateMonth":
|
|
820
|
-
|
|
820
|
+
i = d(ql, Q({
|
|
821
821
|
style: {
|
|
822
822
|
width: "100%"
|
|
823
823
|
},
|
|
824
|
-
value:
|
|
824
|
+
value: u[t.name] ? Z(u[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
825
825
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
826
826
|
allowClear: t.allowClear ?? !0,
|
|
827
827
|
placeholder: t.placeholder || "请选择",
|
|
828
|
-
onChange: (c) =>
|
|
829
|
-
},
|
|
828
|
+
onChange: (c) => M(c, t)
|
|
829
|
+
}, b), null);
|
|
830
830
|
break;
|
|
831
831
|
case "dateQuarter":
|
|
832
|
-
|
|
832
|
+
i = d(Xl, Q({
|
|
833
833
|
style: {
|
|
834
834
|
width: "100%"
|
|
835
835
|
},
|
|
836
|
-
value:
|
|
836
|
+
value: u[t.name] ? Z(u[t.name], t.valueFormat || "YYYY-QQ") : void 0,
|
|
837
837
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
838
838
|
allowClear: t.allowClear ?? !0,
|
|
839
839
|
placeholder: t.placeholder || "请选择",
|
|
840
|
-
onChange: (c) =>
|
|
841
|
-
},
|
|
840
|
+
onChange: (c) => M(c, t)
|
|
841
|
+
}, b), null);
|
|
842
842
|
break;
|
|
843
843
|
case "dateYear":
|
|
844
|
-
|
|
844
|
+
i = d(kl, Q({
|
|
845
845
|
style: {
|
|
846
846
|
width: "100%"
|
|
847
847
|
},
|
|
848
|
-
value:
|
|
848
|
+
value: u[t.name] ? Z(u[t.name], t.valueFormat || "YYYY") : void 0,
|
|
849
849
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
850
850
|
allowClear: t.allowClear ?? !0,
|
|
851
851
|
placeholder: t.placeholder || "请选择",
|
|
852
|
-
onChange: (c) =>
|
|
853
|
-
},
|
|
852
|
+
onChange: (c) => M(c, t)
|
|
853
|
+
}, b), null);
|
|
854
854
|
break;
|
|
855
855
|
case "dateRange":
|
|
856
|
-
|
|
856
|
+
i = d(Kl, Q({
|
|
857
857
|
style: {
|
|
858
858
|
width: "100%"
|
|
859
859
|
},
|
|
860
|
-
value:
|
|
860
|
+
value: u[t.name] && J(u[t.name]) && u[t.name]?.length === 2 ? ht(u[t.name], Be(t.valueFormat, t.showTime), "dayjs") : void 0,
|
|
861
861
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
862
862
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
863
863
|
format: Be(t.valueFormat, t.showTime),
|
|
864
864
|
showTime: t.showTime,
|
|
865
|
-
onChange: (c) =>
|
|
866
|
-
},
|
|
865
|
+
onChange: (c) => M(c, t)
|
|
866
|
+
}, b), null);
|
|
867
867
|
break;
|
|
868
868
|
case "time":
|
|
869
|
-
|
|
869
|
+
i = d(Pl, Q({
|
|
870
870
|
style: {
|
|
871
871
|
width: "100%"
|
|
872
872
|
},
|
|
873
|
-
value:
|
|
873
|
+
value: u[t.name] ? Z(u[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
874
874
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
875
875
|
placeholder: t.placeholder || "请选择",
|
|
876
876
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
877
877
|
use12Hours: t.use12Hours,
|
|
878
878
|
format: t.valueFormat || "HH:mm:ss",
|
|
879
|
-
onChange: (c) =>
|
|
880
|
-
},
|
|
879
|
+
onChange: (c) => M(c, t)
|
|
880
|
+
}, b), null);
|
|
881
881
|
break;
|
|
882
882
|
}
|
|
883
|
-
return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (
|
|
883
|
+
return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (i = t.request ? de(t, C) : C), i;
|
|
884
884
|
}, oe = ({
|
|
885
885
|
formItemStyle: t = {},
|
|
886
|
-
item:
|
|
886
|
+
item: i
|
|
887
887
|
}) => {
|
|
888
|
-
const y = ae(
|
|
888
|
+
const y = ae(i) ? i.props?.label : i.label, b = (ae(i) ? i.props?.labelWidth : i.labelWidth) || Y.value?.width, C = (ae(i) ? i.props?.labelAlign : i.labelAlign) || Y.value?.align;
|
|
889
889
|
return d("div", {
|
|
890
|
-
class:
|
|
890
|
+
class: A(`${e.prefixCls}-search-item`, o.value, m.value?.searchItem),
|
|
891
891
|
style: {
|
|
892
892
|
...t,
|
|
893
|
-
gap:
|
|
894
|
-
...
|
|
893
|
+
gap: Y.value?.gap ? pe(Y.value?.gap) : void 0,
|
|
894
|
+
...w.value?.searchItem || {}
|
|
895
895
|
}
|
|
896
896
|
}, [y && d("div", {
|
|
897
|
-
class:
|
|
897
|
+
class: A(`${e.prefixCls}-search-item-label`, Y.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, C && `${e.prefixCls}-search-item-label-${C}`),
|
|
898
898
|
style: {
|
|
899
|
-
width:
|
|
899
|
+
width: b ? pe(b) : void 0
|
|
900
900
|
}
|
|
901
901
|
}, [y]), d("div", {
|
|
902
|
-
class:
|
|
903
|
-
}, [ae(
|
|
902
|
+
class: A(`${e.prefixCls}-search-item-children`)
|
|
903
|
+
}, [ae(i) ? i : Re(i)])]);
|
|
904
904
|
}, Pe = () => {
|
|
905
|
-
let t =
|
|
905
|
+
let t = a.default?.() || [];
|
|
906
906
|
t.length === 1 && t[0].type === "template" && (t = t[0]?.children || []);
|
|
907
|
-
const
|
|
908
|
-
...
|
|
909
|
-
order:
|
|
907
|
+
const i = _l([...e.formCols, ...t.map((b) => ({
|
|
908
|
+
...b,
|
|
909
|
+
order: b.props?.order || void 0
|
|
910
910
|
}))]), y = {
|
|
911
|
-
width: `calc((100% - (${
|
|
911
|
+
width: `calc((100% - (${F.value - 1} * ${O.value})) / ${F.value})`
|
|
912
912
|
};
|
|
913
|
-
return
|
|
914
|
-
const c =
|
|
915
|
-
return
|
|
913
|
+
return i.map((b, C) => {
|
|
914
|
+
const c = k(C, F.value, y);
|
|
915
|
+
return i.length < F.value || B.value ? d(we, null, [oe({
|
|
916
916
|
formItemStyle: c,
|
|
917
|
-
item:
|
|
918
|
-
}), C ===
|
|
917
|
+
item: b
|
|
918
|
+
}), C === i.length - 1 && re({
|
|
919
919
|
formItemStyle: {
|
|
920
920
|
flex: 1,
|
|
921
921
|
justifyContent: "flex-end"
|
|
922
922
|
},
|
|
923
|
-
collapsed:
|
|
924
|
-
collapseRender: !!
|
|
925
|
-
})]) : d(we, null, [C <
|
|
923
|
+
collapsed: B.value,
|
|
924
|
+
collapseRender: !!B.value
|
|
925
|
+
})]) : d(we, null, [C < F.value - 1 && oe({
|
|
926
926
|
formItemStyle: c,
|
|
927
|
-
item:
|
|
928
|
-
}), C ===
|
|
927
|
+
item: b
|
|
928
|
+
}), C === F.value - 1 && (F.value - 1 === 0 || i.length === F.value) && oe({
|
|
929
929
|
formItemStyle: c,
|
|
930
|
-
item:
|
|
931
|
-
}), C ===
|
|
930
|
+
item: b
|
|
931
|
+
}), C === F.value - 1 && i.length >= F.value && re({
|
|
932
932
|
formItemStyle: {
|
|
933
933
|
flex: 1,
|
|
934
934
|
justifyContent: "flex-end"
|
|
935
935
|
},
|
|
936
936
|
collapsed: !1,
|
|
937
|
-
collapseRender:
|
|
937
|
+
collapseRender: i.length !== F.value
|
|
938
938
|
})]);
|
|
939
939
|
});
|
|
940
940
|
};
|
|
941
941
|
return () => {
|
|
942
942
|
const t = e.cardBordered && `${e.prefixCls}-search-border`;
|
|
943
|
-
return
|
|
944
|
-
class:
|
|
945
|
-
style:
|
|
943
|
+
return n(d("div", {
|
|
944
|
+
class: A(m.value?.search, o.value, `${e.prefixCls}-search`, t, o.value, f.value?.className),
|
|
945
|
+
style: w.value?.search
|
|
946
946
|
}, [Pe()]));
|
|
947
947
|
};
|
|
948
948
|
}
|
|
949
|
-
}),
|
|
949
|
+
}), Ul = (e) => ({
|
|
950
|
+
[`${e.componentCls}-list-toolbar`]: {
|
|
951
|
+
lineHeight: 1,
|
|
952
|
+
"&-with-after": {
|
|
953
|
+
paddingBottom: e.margin
|
|
954
|
+
},
|
|
955
|
+
"&-container": {
|
|
956
|
+
display: "flex",
|
|
957
|
+
alignItems: "center",
|
|
958
|
+
justifyContent: "space-between",
|
|
959
|
+
gap: e.padding,
|
|
960
|
+
paddingBottom: e.padding,
|
|
961
|
+
"&-mobile": {
|
|
962
|
+
flexDirection: "column",
|
|
963
|
+
flexWrap: "wrap",
|
|
964
|
+
alignItems: "flex-start",
|
|
965
|
+
[`${e.componentCls}-left`]: {
|
|
966
|
+
flexWrap: "wrap",
|
|
967
|
+
maxWidth: "100%"
|
|
968
|
+
},
|
|
969
|
+
[`${e.componentCls}-right`]: {
|
|
970
|
+
width: "100%"
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
"&-title": {
|
|
975
|
+
display: "flex",
|
|
976
|
+
alignItems: "center",
|
|
977
|
+
justifyContent: "flex-start",
|
|
978
|
+
color: e.colorTextHeading,
|
|
979
|
+
fontWeight: "500",
|
|
980
|
+
fontSize: e.fontSizeLG
|
|
981
|
+
},
|
|
982
|
+
"&-left": {
|
|
983
|
+
display: "flex",
|
|
984
|
+
flexWrap: "wrap",
|
|
985
|
+
alignItems: "center",
|
|
986
|
+
gap: e.marginXS,
|
|
987
|
+
justifyContent: "flex-start",
|
|
988
|
+
[`${e.antCls}-tabs`]: {
|
|
989
|
+
width: "100%"
|
|
990
|
+
},
|
|
991
|
+
"&-has-tabs": {
|
|
992
|
+
overflow: "hidden"
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
"&-right": {
|
|
996
|
+
flex: 1,
|
|
997
|
+
display: "flex",
|
|
998
|
+
flexWrap: "wrap",
|
|
999
|
+
justifyContent: "flex-end",
|
|
1000
|
+
gap: e.marginSM,
|
|
1001
|
+
[`${e.componentCls}-actions`]: {
|
|
1002
|
+
display: "flex",
|
|
1003
|
+
alignItems: "center",
|
|
1004
|
+
gap: e.marginXS
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
"&-setting-items": {
|
|
1008
|
+
display: "flex",
|
|
1009
|
+
gap: e.marginSM,
|
|
1010
|
+
lineHeight: "32px",
|
|
1011
|
+
alignItems: "center"
|
|
1012
|
+
},
|
|
1013
|
+
"&-setting-item": {
|
|
1014
|
+
color: e.colorIconHover,
|
|
1015
|
+
fontSize: e.fontSizeLG,
|
|
1016
|
+
cursor: "pointer",
|
|
1017
|
+
transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
|
|
1018
|
+
"> span": { display: "block", width: "100%", height: "100%" },
|
|
1019
|
+
"&:hover": {
|
|
1020
|
+
color: e.colorPrimary
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}), { useInjectContext: Dt, provideContext: Jl } = Nt("scrollbar"), xe = 4, Zl = {
|
|
950
1025
|
vertical: {
|
|
951
1026
|
offset: "offsetHeight",
|
|
952
1027
|
scroll: "scrollTop",
|
|
@@ -967,10 +1042,10 @@ const Gl = {
|
|
|
967
1042
|
client: "clientX",
|
|
968
1043
|
direction: "left"
|
|
969
1044
|
}
|
|
970
|
-
},
|
|
971
|
-
[l.size]:
|
|
1045
|
+
}, ea = ({ move: e, size: a, bar: l }) => ({
|
|
1046
|
+
[l.size]: a,
|
|
972
1047
|
transform: `translate${l.axis}(${e}%)`
|
|
973
|
-
}),
|
|
1048
|
+
}), ta = {
|
|
974
1049
|
vertical: Boolean,
|
|
975
1050
|
size: String,
|
|
976
1051
|
move: Number,
|
|
@@ -983,84 +1058,84 @@ const Gl = {
|
|
|
983
1058
|
type: [Object],
|
|
984
1059
|
default: () => ({})
|
|
985
1060
|
}
|
|
986
|
-
},
|
|
987
|
-
props:
|
|
1061
|
+
}, et = /* @__PURE__ */ ge({
|
|
1062
|
+
props: ta,
|
|
988
1063
|
setup(e) {
|
|
989
1064
|
const {
|
|
990
|
-
tableHeaderHeight:
|
|
1065
|
+
tableHeaderHeight: a,
|
|
991
1066
|
hashId: l,
|
|
992
|
-
wrapElement:
|
|
1067
|
+
wrapElement: n,
|
|
993
1068
|
scrollbarElement: o,
|
|
994
1069
|
className: r
|
|
995
|
-
} =
|
|
996
|
-
let
|
|
997
|
-
const
|
|
1070
|
+
} = Dt(), s = x(), h = x(), f = x({}), $ = x(!1);
|
|
1071
|
+
let v = !1, w = !1, m = 0, u = 0, S = Tl ? document.onselectstart : null;
|
|
1072
|
+
const g = T(() => Zl[e.vertical ? "vertical" : "horizontal"]), O = T(() => ea({
|
|
998
1073
|
size: e.size,
|
|
999
1074
|
move: e.move,
|
|
1000
|
-
bar:
|
|
1001
|
-
})),
|
|
1075
|
+
bar: g.value
|
|
1076
|
+
})), H = T(() => (
|
|
1002
1077
|
// offsetRatioX = original width of thumb / current width of thumb / ratioX
|
|
1003
1078
|
// offsetRatioY = original height of thumb / current height of thumb / ratioY
|
|
1004
1079
|
// instance height = wrap height - GAP
|
|
1005
|
-
|
|
1006
|
-
)),
|
|
1080
|
+
s.value[g.value.offset] ** 2 / n.value[g.value.scrollSize] / e.ratio / h.value[g.value.offset]
|
|
1081
|
+
)), B = (z) => {
|
|
1007
1082
|
if (z.stopPropagation(), z.ctrlKey || [1, 2].includes(z.button)) return;
|
|
1008
|
-
window.getSelection()?.removeAllRanges(),
|
|
1083
|
+
window.getSelection()?.removeAllRanges(), F(z);
|
|
1009
1084
|
const j = z.currentTarget;
|
|
1010
|
-
j && (f.value[
|
|
1011
|
-
},
|
|
1012
|
-
if (!
|
|
1013
|
-
const j = Math.abs(z.target.getBoundingClientRect()[
|
|
1014
|
-
|
|
1085
|
+
j && (f.value[g.value.axis] = j[g.value.offset] - (z[g.value.client] - j.getBoundingClientRect()[g.value.direction]));
|
|
1086
|
+
}, E = (z) => {
|
|
1087
|
+
if (!h.value || !s.value || !n.value) return;
|
|
1088
|
+
const j = Math.abs(z.target.getBoundingClientRect()[g.value.direction] - z[g.value.client]), M = h.value[g.value.offset] / 2, q = (j - M) * 100 * H.value / s.value[g.value.offset];
|
|
1089
|
+
n.value[g.value.scroll] = q * n.value[g.value.scrollSize] / 100;
|
|
1015
1090
|
};
|
|
1016
|
-
function
|
|
1017
|
-
|
|
1091
|
+
function F(z) {
|
|
1092
|
+
n.value && (z.stopImmediatePropagation(), v = !0, m = n.value.scrollHeight, u = n.value.scrollWidth, document.addEventListener("mousemove", Y), document.addEventListener("mouseup", V), S = document.onselectstart, document.onselectstart = () => !1);
|
|
1018
1093
|
}
|
|
1019
|
-
function
|
|
1020
|
-
if (!
|
|
1021
|
-
const j = f.value[
|
|
1094
|
+
function Y(z) {
|
|
1095
|
+
if (!n.value || !s.value || !h.value || v === !1) return;
|
|
1096
|
+
const j = f.value[g.value.axis];
|
|
1022
1097
|
if (!j) return;
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1098
|
+
const M = (s.value.getBoundingClientRect()[g.value.direction] - z[g.value.client]) * -1, q = h.value[g.value.offset] - j, te = (M - q) * 100 * H.value / s.value[g.value.offset];
|
|
1099
|
+
g.value.scroll === "scrollLeft" ? n.value[g.value.scroll] = te * u / 100 : n.value[g.value.scroll] = te * m / 100;
|
|
1025
1100
|
}
|
|
1026
1101
|
function V() {
|
|
1027
|
-
|
|
1102
|
+
v = !1, f.value[g.value.axis] = 0, document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", V), k(), w && ($.value = !1);
|
|
1028
1103
|
}
|
|
1029
1104
|
const L = () => {
|
|
1030
|
-
|
|
1031
|
-
},
|
|
1032
|
-
|
|
1105
|
+
w = !1, $.value = !!e.size;
|
|
1106
|
+
}, N = () => {
|
|
1107
|
+
w = !0, $.value = v;
|
|
1033
1108
|
};
|
|
1034
|
-
|
|
1035
|
-
|
|
1109
|
+
Xt(() => {
|
|
1110
|
+
k(), document.removeEventListener("mouseup", V);
|
|
1036
1111
|
});
|
|
1037
|
-
function
|
|
1038
|
-
document.onselectstart !==
|
|
1112
|
+
function k() {
|
|
1113
|
+
document.onselectstart !== S && (document.onselectstart = S);
|
|
1039
1114
|
}
|
|
1040
|
-
return
|
|
1041
|
-
const z =
|
|
1042
|
-
height: `calc(100% - ${pe(
|
|
1043
|
-
top: pe(
|
|
1115
|
+
return ft(o, "mousemove", L), ft(o, "mouseleave", N), () => {
|
|
1116
|
+
const z = g.value.key === "vertical" ? {
|
|
1117
|
+
height: `calc(100% - ${pe(a.value + 1)})`,
|
|
1118
|
+
top: pe(a.value + 1)
|
|
1044
1119
|
} : {};
|
|
1045
1120
|
return d("div", {
|
|
1046
|
-
ref:
|
|
1121
|
+
ref: s,
|
|
1047
1122
|
style: {
|
|
1048
1123
|
...e.barStyle,
|
|
1049
1124
|
...z
|
|
1050
1125
|
},
|
|
1051
|
-
class: [`${r}-bar`, "is-" +
|
|
1052
|
-
onMousedown:
|
|
1126
|
+
class: [`${r}-bar`, "is-" + g.value.key, l.value],
|
|
1127
|
+
onMousedown: E
|
|
1053
1128
|
}, [d("div", {
|
|
1054
|
-
ref:
|
|
1129
|
+
ref: h,
|
|
1055
1130
|
class: `${r}-thumb ${l.value}`,
|
|
1056
|
-
style:
|
|
1057
|
-
onMousedown:
|
|
1131
|
+
style: O.value,
|
|
1132
|
+
onMousedown: B
|
|
1058
1133
|
}, null)]);
|
|
1059
1134
|
};
|
|
1060
1135
|
}
|
|
1061
1136
|
});
|
|
1062
|
-
|
|
1063
|
-
const
|
|
1137
|
+
et.inheritAttrs = !1;
|
|
1138
|
+
const la = {
|
|
1064
1139
|
always: {
|
|
1065
1140
|
type: Boolean,
|
|
1066
1141
|
default: !0
|
|
@@ -1076,135 +1151,60 @@ const ta = {
|
|
|
1076
1151
|
type: [Object],
|
|
1077
1152
|
default: () => ({})
|
|
1078
1153
|
}
|
|
1079
|
-
},
|
|
1154
|
+
}, aa = /* @__PURE__ */ ge({
|
|
1080
1155
|
inheritAttrs: !1,
|
|
1081
|
-
props:
|
|
1156
|
+
props: la,
|
|
1082
1157
|
setup(e, {
|
|
1083
|
-
expose:
|
|
1158
|
+
expose: a
|
|
1084
1159
|
}) {
|
|
1085
1160
|
const {
|
|
1086
1161
|
tableScrollState: l
|
|
1087
|
-
} =
|
|
1088
|
-
if (
|
|
1089
|
-
const
|
|
1090
|
-
r.value =
|
|
1162
|
+
} = qe(), n = Dt(), o = x(0), r = x(0), s = x(""), h = x(""), f = x(1), $ = x(1), v = (m) => {
|
|
1163
|
+
if (m) {
|
|
1164
|
+
const u = m.offsetHeight - xe, S = m.offsetWidth - xe;
|
|
1165
|
+
r.value = m.scrollTop * 100 / u * f.value, o.value = m.scrollLeft * 100 / S * $.value;
|
|
1091
1166
|
}
|
|
1092
|
-
},
|
|
1093
|
-
const
|
|
1094
|
-
if (!
|
|
1095
|
-
const
|
|
1096
|
-
f.value =
|
|
1167
|
+
}, w = () => {
|
|
1168
|
+
const m = n?.wrapElement;
|
|
1169
|
+
if (!m?.value) return;
|
|
1170
|
+
const u = m.value.offsetHeight - xe, S = m.value.offsetWidth - xe, g = u ** 2 / m.value.scrollHeight, O = S ** 2 / m.value.scrollWidth, H = Math.max(g, e.minSize), B = Math.max(O, e.minSize);
|
|
1171
|
+
f.value = g / (u - g) / (H / (u - H)), $.value = O / (S - O) / (B / (S - B)), h.value = H + xe < u ? `${H}px` : "", s.value = B + xe < S ? `${B}px` : "";
|
|
1097
1172
|
};
|
|
1098
|
-
return
|
|
1099
|
-
|
|
1100
|
-
|
|
1173
|
+
return at(() => {
|
|
1174
|
+
nt(() => {
|
|
1175
|
+
w();
|
|
1101
1176
|
});
|
|
1102
|
-
}),
|
|
1103
|
-
update:
|
|
1104
|
-
handleScroll:
|
|
1105
|
-
}), () => d(we, null, [d(
|
|
1177
|
+
}), a({
|
|
1178
|
+
update: w,
|
|
1179
|
+
handleScroll: v
|
|
1180
|
+
}), () => d(we, null, [d(et, {
|
|
1106
1181
|
move: o.value,
|
|
1107
1182
|
barStyle: e.barStyle.x,
|
|
1108
1183
|
ratio: $.value,
|
|
1109
|
-
size:
|
|
1184
|
+
size: s.value,
|
|
1110
1185
|
always: e.always
|
|
1111
|
-
}, null), !!l.value.y && d(
|
|
1186
|
+
}, null), !!l.value.y && d(et, {
|
|
1112
1187
|
move: r.value,
|
|
1113
1188
|
barStyle: e.barStyle.y,
|
|
1114
1189
|
ratio: f.value,
|
|
1115
|
-
size:
|
|
1190
|
+
size: h.value,
|
|
1116
1191
|
vertical: !0,
|
|
1117
1192
|
always: e.always
|
|
1118
1193
|
}, null)]);
|
|
1119
1194
|
}
|
|
1120
|
-
}), aa = (e) => ({
|
|
1121
|
-
[`${e.componentCls}`]: {
|
|
1122
|
-
lineHeight: 1,
|
|
1123
|
-
"&-with-after": {
|
|
1124
|
-
paddingBottom: e.margin
|
|
1125
|
-
},
|
|
1126
|
-
"&-container": {
|
|
1127
|
-
display: "flex",
|
|
1128
|
-
alignItems: "center",
|
|
1129
|
-
justifyContent: "space-between",
|
|
1130
|
-
gap: e.padding,
|
|
1131
|
-
paddingBottom: e.padding,
|
|
1132
|
-
"&-mobile": {
|
|
1133
|
-
flexDirection: "column",
|
|
1134
|
-
flexWrap: "wrap",
|
|
1135
|
-
alignItems: "flex-start",
|
|
1136
|
-
[`${e.componentCls}-left`]: {
|
|
1137
|
-
flexWrap: "wrap",
|
|
1138
|
-
maxWidth: "100%"
|
|
1139
|
-
},
|
|
1140
|
-
[`${e.componentCls}-right`]: {
|
|
1141
|
-
width: "100%"
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
},
|
|
1145
|
-
"&-title": {
|
|
1146
|
-
display: "flex",
|
|
1147
|
-
alignItems: "center",
|
|
1148
|
-
justifyContent: "flex-start",
|
|
1149
|
-
color: e.colorTextHeading,
|
|
1150
|
-
fontWeight: "500",
|
|
1151
|
-
fontSize: e.fontSizeLG
|
|
1152
|
-
},
|
|
1153
|
-
"&-left": {
|
|
1154
|
-
display: "flex",
|
|
1155
|
-
flexWrap: "wrap",
|
|
1156
|
-
alignItems: "center",
|
|
1157
|
-
gap: e.marginXS,
|
|
1158
|
-
justifyContent: "flex-start",
|
|
1159
|
-
[`${e.antCls}-tabs`]: {
|
|
1160
|
-
width: "100%"
|
|
1161
|
-
},
|
|
1162
|
-
"&-has-tabs": {
|
|
1163
|
-
overflow: "hidden"
|
|
1164
|
-
}
|
|
1165
|
-
},
|
|
1166
|
-
"&-right": {
|
|
1167
|
-
flex: 1,
|
|
1168
|
-
display: "flex",
|
|
1169
|
-
flexWrap: "wrap",
|
|
1170
|
-
justifyContent: "flex-end",
|
|
1171
|
-
gap: e.marginSM,
|
|
1172
|
-
[`${e.componentCls}-actions`]: {
|
|
1173
|
-
display: "flex",
|
|
1174
|
-
alignItems: "center",
|
|
1175
|
-
gap: e.marginXS
|
|
1176
|
-
}
|
|
1177
|
-
},
|
|
1178
|
-
"&-setting-items": {
|
|
1179
|
-
display: "flex",
|
|
1180
|
-
gap: e.marginSM,
|
|
1181
|
-
lineHeight: "32px",
|
|
1182
|
-
alignItems: "center"
|
|
1183
|
-
},
|
|
1184
|
-
"&-setting-item": {
|
|
1185
|
-
color: e.colorIconHover,
|
|
1186
|
-
fontSize: e.fontSizeLG,
|
|
1187
|
-
cursor: "pointer",
|
|
1188
|
-
transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
|
|
1189
|
-
"> span": { display: "block", width: "100%", height: "100%" },
|
|
1190
|
-
"&:hover": {
|
|
1191
|
-
color: e.colorPrimary
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
1195
|
});
|
|
1196
1196
|
function na(e) {
|
|
1197
1197
|
if (ae(e))
|
|
1198
1198
|
return e;
|
|
1199
1199
|
if (e) {
|
|
1200
|
-
const
|
|
1200
|
+
const a = e, {
|
|
1201
1201
|
icon: l,
|
|
1202
|
-
tooltip:
|
|
1202
|
+
tooltip: n,
|
|
1203
1203
|
onClick: o,
|
|
1204
1204
|
key: r
|
|
1205
|
-
} =
|
|
1206
|
-
return l &&
|
|
1207
|
-
title:
|
|
1205
|
+
} = a;
|
|
1206
|
+
return l && n ? d($e, {
|
|
1207
|
+
title: n,
|
|
1208
1208
|
key: r
|
|
1209
1209
|
}, {
|
|
1210
1210
|
default: () => [d("span", {
|
|
@@ -1217,11 +1217,10 @@ function na(e) {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
return null;
|
|
1219
1219
|
}
|
|
1220
|
-
const
|
|
1220
|
+
const Ot = /* @__PURE__ */ ge({
|
|
1221
1221
|
props: {
|
|
1222
1222
|
actions: [Array],
|
|
1223
1223
|
settings: [Array],
|
|
1224
|
-
prefixCls: String,
|
|
1225
1224
|
headerTitle: he.headerTitle,
|
|
1226
1225
|
listToolAfter: he.listToolAfter,
|
|
1227
1226
|
headerTitleTip: he.headerTitleTip,
|
|
@@ -1229,108 +1228,99 @@ const Lt = /* @__PURE__ */ ge({
|
|
|
1229
1228
|
actionsPlacement: String
|
|
1230
1229
|
},
|
|
1231
1230
|
setup(e) {
|
|
1232
|
-
const {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
b.value = o.value || 0;
|
|
1231
|
+
const a = x(), {
|
|
1232
|
+
height: l
|
|
1233
|
+
} = xl(a), n = ot(), {
|
|
1234
|
+
isMobile: o,
|
|
1235
|
+
tableListToolsHeight: r,
|
|
1236
|
+
classNames: s,
|
|
1237
|
+
styles: h,
|
|
1238
|
+
hashId: f,
|
|
1239
|
+
prefixCls: $
|
|
1240
|
+
} = qe(), v = `${$}-list-toolbar`;
|
|
1241
|
+
bt(() => {
|
|
1242
|
+
r.value = l.value || 0;
|
|
1245
1243
|
});
|
|
1246
|
-
const
|
|
1244
|
+
const w = T(() => !!(e.headerTitleTip || e.headerTitle)), m = T(() => {
|
|
1247
1245
|
if (!Array.isArray(e.actions) || e.actions?.length < 1)
|
|
1248
1246
|
return {
|
|
1249
1247
|
left: null,
|
|
1250
1248
|
right: null
|
|
1251
1249
|
};
|
|
1252
|
-
const B = e.actions.filter((
|
|
1250
|
+
const B = e.actions.filter((F) => ae(F)).filter((F) => (F?.props?.placement || e.actionsPlacement) === "left"), E = e.actions.filter((F) => ae(F)).filter((F) => (F?.props?.placement || e.actionsPlacement) === "right");
|
|
1253
1251
|
return {
|
|
1254
1252
|
left: B.length ? d("div", {
|
|
1255
|
-
class: `${
|
|
1253
|
+
class: A(`${v}-actions`, f.value)
|
|
1256
1254
|
}, [B]) : null,
|
|
1257
|
-
right:
|
|
1258
|
-
class: `${
|
|
1259
|
-
}, [
|
|
1255
|
+
right: E.length ? d("div", {
|
|
1256
|
+
class: A(`${v}-actions`, f.value)
|
|
1257
|
+
}, [E]) : null
|
|
1260
1258
|
};
|
|
1261
|
-
}
|
|
1262
|
-
if (!
|
|
1259
|
+
}), u = T(() => !!(e.headerTitleTip || e.headerTitle || m.value.left)), S = T(() => !!(e.settings?.length || m.value.right)), g = () => {
|
|
1260
|
+
if (!u.value && S.value)
|
|
1263
1261
|
return d("div", {
|
|
1264
|
-
class: `${
|
|
1262
|
+
class: A(`${v}-left`, f.value)
|
|
1265
1263
|
}, null);
|
|
1266
|
-
const B =
|
|
1267
|
-
return
|
|
1268
|
-
class:
|
|
1269
|
-
style:
|
|
1264
|
+
const B = m.value.left, E = A(`${v}-left ${f.value}`, s.value?.toolbarLeft), F = h.value?.toolbarLeft;
|
|
1265
|
+
return w.value ? d("div", {
|
|
1266
|
+
class: E,
|
|
1267
|
+
style: F
|
|
1270
1268
|
}, [d("div", {
|
|
1271
|
-
class: `${
|
|
1269
|
+
class: A(`${v}-title`, f.value)
|
|
1272
1270
|
}, [e.headerTitle, e.headerTitleTip && d($e, {
|
|
1273
1271
|
title: e.titleTipText
|
|
1274
1272
|
}, {
|
|
1275
|
-
default: () => [
|
|
1273
|
+
default: () => [De(e.headerTitleTip) && e.headerTitleTip ? d(Zt, null, null) : e.headerTitleTip]
|
|
1276
1274
|
})]), B]) : d("div", {
|
|
1277
|
-
class:
|
|
1278
|
-
style:
|
|
1275
|
+
class: E,
|
|
1276
|
+
style: F
|
|
1279
1277
|
}, [B]);
|
|
1280
|
-
},
|
|
1281
|
-
if (!
|
|
1282
|
-
const B =
|
|
1278
|
+
}, O = () => {
|
|
1279
|
+
if (!S.value) return null;
|
|
1280
|
+
const B = m.value.right;
|
|
1283
1281
|
return d("div", {
|
|
1284
|
-
class:
|
|
1282
|
+
class: A(`${v}-right ${f.value}`, s.value?.toolbarRight),
|
|
1285
1283
|
style: {
|
|
1286
|
-
alignItems:
|
|
1287
|
-
flexDirection:
|
|
1288
|
-
|
|
1284
|
+
alignItems: n.value.lg ? "center" : "flex-end",
|
|
1285
|
+
flexDirection: n.value.lg ? "row" : "column",
|
|
1286
|
+
...h.value?.toolbarRight || {}
|
|
1289
1287
|
}
|
|
1290
1288
|
}, [B, e.settings?.length ? d("div", {
|
|
1291
|
-
class:
|
|
1292
|
-
}, [e.settings.map((
|
|
1293
|
-
const
|
|
1289
|
+
class: A(`${v}-setting-items`, f.value)
|
|
1290
|
+
}, [e.settings.map((E, F) => {
|
|
1291
|
+
const Y = na(E);
|
|
1294
1292
|
return d("div", {
|
|
1295
|
-
key:
|
|
1296
|
-
class:
|
|
1297
|
-
}, [
|
|
1293
|
+
key: F,
|
|
1294
|
+
class: A(`${v}-setting-item`, f.value)
|
|
1295
|
+
}, [Y]);
|
|
1298
1296
|
})]) : null]);
|
|
1299
|
-
},
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
[`${e.prefixCls}-container`]: !0,
|
|
1304
|
-
[`${e.prefixCls}-container-mobile`]: u.value
|
|
1305
|
-
};
|
|
1306
|
-
return d("div", {
|
|
1307
|
-
class: B
|
|
1308
|
-
}, [x.value, h.value]);
|
|
1309
|
-
}, [() => u.value, () => v.value, () => i.value, () => x.value, () => e.prefixCls, () => h.value]);
|
|
1310
|
-
return () => n(d("div", {
|
|
1297
|
+
}, H = () => !S.value && !u.value ? null : d("div", {
|
|
1298
|
+
class: A(f.value, `${v}-container`, o.value && `${v}-container-mobile`)
|
|
1299
|
+
}, [g(), O()]);
|
|
1300
|
+
return () => d("div", {
|
|
1311
1301
|
ref: a,
|
|
1312
|
-
class:
|
|
1313
|
-
style:
|
|
1314
|
-
}, [
|
|
1315
|
-
class:
|
|
1316
|
-
style:
|
|
1317
|
-
}, [e.listToolAfter])])
|
|
1302
|
+
class: A(`${v} ${f.value}`, e.listToolAfter && `${v}-with-after`, s.value?.toolbar),
|
|
1303
|
+
style: h.value?.toolbar
|
|
1304
|
+
}, [H(), e.listToolAfter && d("div", {
|
|
1305
|
+
class: A(`${v}-after ${f.value}`, s.value?.toolbarAfter),
|
|
1306
|
+
style: h.value?.toolbarAfter
|
|
1307
|
+
}, [e.listToolAfter])]);
|
|
1318
1308
|
}
|
|
1319
1309
|
});
|
|
1320
|
-
|
|
1310
|
+
Ot.inheritAttrs = !1;
|
|
1321
1311
|
const oa = /* @__PURE__ */ ge({
|
|
1322
1312
|
setup() {
|
|
1323
1313
|
const {
|
|
1324
1314
|
isFullscreen: e
|
|
1325
|
-
} =
|
|
1315
|
+
} = Pt();
|
|
1326
1316
|
return () => e.value ? d($e, {
|
|
1327
1317
|
title: "退出全屏"
|
|
1328
1318
|
}, {
|
|
1329
|
-
default: () => [d(
|
|
1319
|
+
default: () => [d(el, null, null)]
|
|
1330
1320
|
}) : d($e, {
|
|
1331
1321
|
title: "全屏"
|
|
1332
1322
|
}, {
|
|
1333
|
-
default: () => [d(
|
|
1323
|
+
default: () => [d(tl, null, null)]
|
|
1334
1324
|
});
|
|
1335
1325
|
}
|
|
1336
1326
|
});
|
|
@@ -1338,7 +1328,7 @@ function ia() {
|
|
|
1338
1328
|
return {
|
|
1339
1329
|
reload: {
|
|
1340
1330
|
text: "刷新",
|
|
1341
|
-
icon: d(
|
|
1331
|
+
icon: d(ll, null, null)
|
|
1342
1332
|
},
|
|
1343
1333
|
fullScreen: {
|
|
1344
1334
|
text: "全屏",
|
|
@@ -1346,21 +1336,21 @@ function ia() {
|
|
|
1346
1336
|
}
|
|
1347
1337
|
};
|
|
1348
1338
|
}
|
|
1349
|
-
function sa(e,
|
|
1350
|
-
return
|
|
1351
|
-
const
|
|
1352
|
-
if (!
|
|
1339
|
+
function sa(e, a) {
|
|
1340
|
+
return wt(e).filter((l) => l).map((l) => {
|
|
1341
|
+
const n = e[l];
|
|
1342
|
+
if (!n)
|
|
1353
1343
|
return null;
|
|
1354
|
-
const o =
|
|
1344
|
+
const o = n ? a[l] : () => () => {
|
|
1355
1345
|
}, r = ia()[l];
|
|
1356
|
-
return r ? typeof
|
|
1346
|
+
return r ? typeof n == "boolean" || !Ne(n) ? d("span", {
|
|
1357
1347
|
key: l,
|
|
1358
1348
|
onClick: o
|
|
1359
1349
|
}, [d($e, {
|
|
1360
1350
|
title: r.text
|
|
1361
1351
|
}, {
|
|
1362
1352
|
default: () => [r.icon]
|
|
1363
|
-
})]) :
|
|
1353
|
+
})]) : n?.(o) : null;
|
|
1364
1354
|
}).filter((l) => l);
|
|
1365
1355
|
}
|
|
1366
1356
|
const ra = {
|
|
@@ -1375,22 +1365,18 @@ const ra = {
|
|
|
1375
1365
|
props: ra,
|
|
1376
1366
|
inheritAttrs: !1,
|
|
1377
1367
|
setup(e) {
|
|
1378
|
-
const
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
} = Ke(), a = Ne(() => e.options === !1 ? [] : sa(ne(e.options) ? e.options : {}, {
|
|
1384
|
-
reload: () => l.reload(),
|
|
1385
|
-
fullScreen: () => l.toggle()
|
|
1368
|
+
const {
|
|
1369
|
+
action: a
|
|
1370
|
+
} = qe(), l = nl(() => e.options === !1 ? [] : sa(ne(e.options) ? e.options : {}, {
|
|
1371
|
+
reload: () => a.reload(),
|
|
1372
|
+
fullScreen: () => a.toggle()
|
|
1386
1373
|
}), [() => e.options]);
|
|
1387
1374
|
return () => {
|
|
1388
|
-
const
|
|
1389
|
-
return d(
|
|
1390
|
-
|
|
1391
|
-
actions: o,
|
|
1375
|
+
const n = e.actionsRender || [];
|
|
1376
|
+
return d(Ot, {
|
|
1377
|
+
actions: n,
|
|
1392
1378
|
actionsPlacement: e.actionsPlacement,
|
|
1393
|
-
settings: R(
|
|
1379
|
+
settings: R(l),
|
|
1394
1380
|
headerTitle: e.headerTitle,
|
|
1395
1381
|
listToolAfter: e.listToolAfter,
|
|
1396
1382
|
headerTitleTip: e.headerTitleTip,
|
|
@@ -1400,222 +1386,222 @@ const ra = {
|
|
|
1400
1386
|
}
|
|
1401
1387
|
});
|
|
1402
1388
|
function ca(e) {
|
|
1403
|
-
return
|
|
1389
|
+
return _t();
|
|
1404
1390
|
}
|
|
1405
|
-
function da(e,
|
|
1406
|
-
ca() ?
|
|
1391
|
+
function da(e, a = !0, l) {
|
|
1392
|
+
ca() ? pt(e, l) : a ? e() : nt(e);
|
|
1407
1393
|
}
|
|
1408
|
-
function fa({ scroll: e, columns:
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1394
|
+
function fa({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o, neverScroll: r }) {
|
|
1395
|
+
const s = x([]);
|
|
1396
|
+
K([
|
|
1411
1397
|
() => e.value,
|
|
1412
|
-
() => n.value,
|
|
1413
|
-
() => l.value,
|
|
1414
1398
|
() => a.value,
|
|
1415
1399
|
() => l.value,
|
|
1400
|
+
() => n.value,
|
|
1401
|
+
() => l.value,
|
|
1416
1402
|
() => o.value,
|
|
1417
1403
|
() => r.value
|
|
1418
1404
|
], () => {
|
|
1419
|
-
const
|
|
1420
|
-
|
|
1405
|
+
const m = $(ce(a.value));
|
|
1406
|
+
Me(m, ce(s.value)) || (s.value = ee(m));
|
|
1421
1407
|
}, {
|
|
1422
1408
|
deep: !0,
|
|
1423
1409
|
immediate: !0
|
|
1424
1410
|
});
|
|
1425
|
-
const
|
|
1426
|
-
function f(
|
|
1427
|
-
return
|
|
1411
|
+
const h = T(() => f(R(s)));
|
|
1412
|
+
function f(m) {
|
|
1413
|
+
return m.sort((u, S) => rl(u, S, "order", 0));
|
|
1428
1414
|
}
|
|
1429
|
-
function $(
|
|
1430
|
-
return ee(
|
|
1431
|
-
if (
|
|
1432
|
-
return
|
|
1433
|
-
if (
|
|
1415
|
+
function $(m) {
|
|
1416
|
+
return ee(m).map((u, S) => {
|
|
1417
|
+
if (u.dataIndex === "action" || S === m.length - 1 ? u.resizable = !1 : u.resizable = De(u.resizable) ? u.resizable : !!(Ce(u.width) && R(n)), !u.width || R(r))
|
|
1418
|
+
return u;
|
|
1419
|
+
if (u.dataIndex === "action" && R(o))
|
|
1434
1420
|
if (R(e)?.x || !R(l))
|
|
1435
|
-
|
|
1421
|
+
u.width = u.width || 100, u.fixed = "right";
|
|
1436
1422
|
else {
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1423
|
+
const g = R(a).find((O) => O.dataIndex === u.dataIndex);
|
|
1424
|
+
u.width = g?.width || "", u.fixed = g?.fixed;
|
|
1439
1425
|
}
|
|
1440
|
-
return
|
|
1426
|
+
return u;
|
|
1441
1427
|
});
|
|
1442
1428
|
}
|
|
1443
|
-
function m
|
|
1444
|
-
|
|
1429
|
+
function v(m, u) {
|
|
1430
|
+
s.value = s.value.map((S) => (S.uuid === u.uuid && (S.width = m), S));
|
|
1445
1431
|
}
|
|
1446
|
-
function
|
|
1447
|
-
if (
|
|
1448
|
-
|
|
1432
|
+
function w(m) {
|
|
1433
|
+
if (m.length <= 0) {
|
|
1434
|
+
s.value = [];
|
|
1449
1435
|
return;
|
|
1450
1436
|
}
|
|
1451
|
-
|
|
1437
|
+
Me($(m), ce(s.value)) || (s.value = $(m));
|
|
1452
1438
|
}
|
|
1453
1439
|
return {
|
|
1454
1440
|
breakpoint: l,
|
|
1455
|
-
proColumns:
|
|
1456
|
-
setColumns:
|
|
1457
|
-
resizeColumnWidth:
|
|
1441
|
+
proColumns: h,
|
|
1442
|
+
setColumns: w,
|
|
1443
|
+
resizeColumnWidth: v
|
|
1458
1444
|
};
|
|
1459
1445
|
}
|
|
1460
|
-
function va(e,
|
|
1461
|
-
const l = T(() =>
|
|
1446
|
+
function va(e, a) {
|
|
1447
|
+
const l = T(() => a), n = x(), o = x(e);
|
|
1462
1448
|
function r() {
|
|
1463
|
-
|
|
1449
|
+
n.value && (clearTimeout(n.value), n.value = null);
|
|
1464
1450
|
}
|
|
1465
|
-
async function
|
|
1466
|
-
return l.value === 0 || l.value === void 0 ? o.value(...
|
|
1467
|
-
|
|
1468
|
-
f(await o.value(...
|
|
1451
|
+
async function s(...h) {
|
|
1452
|
+
return l.value === 0 || l.value === void 0 ? o.value(...h) : (r(), new Promise(async (f) => {
|
|
1453
|
+
h[0]?.immediate ? f(await o.value(...h)) : n.value = setTimeout(async () => {
|
|
1454
|
+
f(await o.value(...h));
|
|
1469
1455
|
}, l.value);
|
|
1470
1456
|
}));
|
|
1471
1457
|
}
|
|
1472
|
-
return
|
|
1458
|
+
return ol(r), {
|
|
1473
1459
|
cancel: r,
|
|
1474
|
-
run:
|
|
1460
|
+
run: s
|
|
1475
1461
|
};
|
|
1476
1462
|
}
|
|
1477
1463
|
function ma(e) {
|
|
1478
|
-
const
|
|
1464
|
+
const a = T(() => e.rowKey), l = T(() => e.polling), n = T(() => e.debounceTime), o = T(() => e.dataSource), r = T(() => e.autoRequest);
|
|
1479
1465
|
return {
|
|
1480
|
-
rowKey:
|
|
1466
|
+
rowKey: a,
|
|
1481
1467
|
polling: l,
|
|
1482
1468
|
request: e.request,
|
|
1483
1469
|
postData: e.postData,
|
|
1484
|
-
debounceTime:
|
|
1470
|
+
debounceTime: n,
|
|
1485
1471
|
dataSource: o,
|
|
1486
1472
|
autoRequest: r
|
|
1487
1473
|
};
|
|
1488
1474
|
}
|
|
1489
|
-
function ha({ rowKey: e, autoRequest:
|
|
1490
|
-
const
|
|
1491
|
-
(V.value || t) &&
|
|
1492
|
-
},
|
|
1493
|
-
const { pagination:
|
|
1494
|
-
if (!
|
|
1475
|
+
function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, dataSource: r, waitRequest: s, debounceTime: h }, { params: f, columns: $, setLoading: v, setColumns: w, removeRowKeys: m, syncSelectedRows: u, defaultFormSearch: S, setPagination: g, pageInfo: O, onRequestError: H, onBeforeSearchSubmit: B, hasCustomRender: E }, F) {
|
|
1476
|
+
const Y = x(""), V = x(!1), L = x(!1), N = x([]), k = x(), z = x(null), j = (t = !1) => {
|
|
1477
|
+
(V.value || t) && v(!1), de(!1);
|
|
1478
|
+
}, M = async (t = {}) => {
|
|
1479
|
+
const { pagination: i = {}, filters: y = {}, sorter: b = {}, removeKeys: C = [], isPolling: c = !1, extra: fe } = t;
|
|
1480
|
+
if (!n || !Ne(n))
|
|
1495
1481
|
return r.value || [];
|
|
1496
|
-
c ? de(!0) :
|
|
1482
|
+
c ? de(!0) : v(!0), i && g(i);
|
|
1497
1483
|
try {
|
|
1498
|
-
C.length &&
|
|
1499
|
-
const U = ne(
|
|
1500
|
-
|
|
1501
|
-
const
|
|
1484
|
+
C.length && m(C);
|
|
1485
|
+
const U = ne(b) ? Object.keys(b).length ? [b] : [] : b;
|
|
1486
|
+
w(R($).map((Se) => {
|
|
1487
|
+
const Te = U.find((ie) => (ie?.columnKey || ie?.field) === Se.dataIndex);
|
|
1502
1488
|
return {
|
|
1503
1489
|
...Se,
|
|
1504
|
-
sortOrder:
|
|
1490
|
+
sortOrder: Te?.order
|
|
1505
1491
|
};
|
|
1506
1492
|
}));
|
|
1507
1493
|
let Fe = {
|
|
1508
|
-
...ce(
|
|
1509
|
-
current:
|
|
1510
|
-
...R(
|
|
1494
|
+
...ce(O),
|
|
1495
|
+
current: dl(ce(O), C.length),
|
|
1496
|
+
...R(S),
|
|
1511
1497
|
...R(f),
|
|
1512
1498
|
...t.params
|
|
1513
1499
|
};
|
|
1514
|
-
|
|
1500
|
+
B && Ne(B) && (Fe = await B({
|
|
1515
1501
|
params: Fe,
|
|
1516
1502
|
sorter: U,
|
|
1517
1503
|
filter: y,
|
|
1518
1504
|
extra: fe
|
|
1519
1505
|
}));
|
|
1520
1506
|
let ve = [];
|
|
1521
|
-
const ue = `table_request_${
|
|
1522
|
-
|
|
1523
|
-
const Ie = await
|
|
1507
|
+
const ue = `table_request_${$t().uuid(10)}`;
|
|
1508
|
+
Y.value = ue;
|
|
1509
|
+
const Ie = await n?.({
|
|
1524
1510
|
params: ee(ce(Fe)),
|
|
1525
1511
|
sorter: U,
|
|
1526
1512
|
filter: y,
|
|
1527
1513
|
extra: fe
|
|
1528
1514
|
});
|
|
1529
|
-
if (
|
|
1515
|
+
if (Y.value !== ue)
|
|
1530
1516
|
return [];
|
|
1531
1517
|
if (Ie) {
|
|
1532
|
-
const { success: Se = !0, data:
|
|
1518
|
+
const { success: Se = !0, data: Te = [] } = Ie;
|
|
1533
1519
|
if (!Se)
|
|
1534
1520
|
return [];
|
|
1535
|
-
ve = typeof o == "function" ? await o?.(
|
|
1521
|
+
ve = typeof o == "function" ? await o?.(Te) : Te, u(ve);
|
|
1536
1522
|
const ie = Ie.total || ve?.length || 0;
|
|
1537
|
-
ie !==
|
|
1523
|
+
ie !== O.total && g({
|
|
1538
1524
|
total: ie
|
|
1539
1525
|
});
|
|
1540
|
-
const
|
|
1541
|
-
return
|
|
1526
|
+
const Ke = R(N).map((ke) => ze(ke, "sortIndex"));
|
|
1527
|
+
return Me(ve, Ke) ? R(N) : (oe(ve), ve);
|
|
1542
1528
|
} else
|
|
1543
1529
|
return [];
|
|
1544
1530
|
} catch (U) {
|
|
1545
|
-
if (
|
|
1531
|
+
if (H === void 0)
|
|
1546
1532
|
throw new Error(U);
|
|
1547
|
-
|
|
1533
|
+
N.value === void 0 && oe([]), H(U);
|
|
1548
1534
|
} finally {
|
|
1549
1535
|
j(!0);
|
|
1550
1536
|
}
|
|
1551
1537
|
return [];
|
|
1552
|
-
},
|
|
1553
|
-
if (
|
|
1538
|
+
}, q = va(async (t = {}) => {
|
|
1539
|
+
if (k.value && clearTimeout(k.value), !n)
|
|
1554
1540
|
return;
|
|
1555
|
-
const
|
|
1556
|
-
z.value =
|
|
1541
|
+
const i = new AbortController();
|
|
1542
|
+
z.value = i;
|
|
1557
1543
|
try {
|
|
1558
1544
|
const y = await Promise.race([
|
|
1559
|
-
|
|
1545
|
+
M(t),
|
|
1560
1546
|
new Promise((C, c) => {
|
|
1561
1547
|
z.value?.signal?.addEventListener?.("abort", () => {
|
|
1562
|
-
c("aborted"),
|
|
1548
|
+
c("aborted"), q.cancel(), j();
|
|
1563
1549
|
});
|
|
1564
1550
|
})
|
|
1565
1551
|
]);
|
|
1566
|
-
if (
|
|
1552
|
+
if (i.signal.aborted)
|
|
1567
1553
|
return;
|
|
1568
|
-
const
|
|
1569
|
-
return
|
|
1570
|
-
|
|
1571
|
-
}, Math.max(
|
|
1554
|
+
const b = ul(l.value, y);
|
|
1555
|
+
return b && !V.value && (k.value = setTimeout(() => {
|
|
1556
|
+
q.run({ ...t, isPolling: b });
|
|
1557
|
+
}, Math.max(b, 2e3))), y;
|
|
1572
1558
|
} catch (y) {
|
|
1573
1559
|
if (y === "aborted")
|
|
1574
1560
|
return;
|
|
1575
1561
|
throw y;
|
|
1576
1562
|
}
|
|
1577
|
-
},
|
|
1578
|
-
z.value?.abort(),
|
|
1563
|
+
}, h.value || 30), te = () => {
|
|
1564
|
+
z.value?.abort(), q.cancel(), j();
|
|
1579
1565
|
};
|
|
1580
|
-
|
|
1566
|
+
at(() => {
|
|
1581
1567
|
V.value = !1;
|
|
1582
|
-
}),
|
|
1568
|
+
}), pt(() => {
|
|
1583
1569
|
V.value = !1;
|
|
1584
|
-
}),
|
|
1585
|
-
te(), V.value = !0, clearTimeout(
|
|
1586
|
-
}),
|
|
1587
|
-
te(), V.value = !0, clearTimeout(
|
|
1588
|
-
}),
|
|
1589
|
-
|
|
1590
|
-
}, { immediate: !0 }),
|
|
1591
|
-
|
|
1592
|
-
}, { immediate: !0 }),
|
|
1570
|
+
}), yt(() => {
|
|
1571
|
+
te(), V.value = !0, clearTimeout(k.value);
|
|
1572
|
+
}), Ct(() => {
|
|
1573
|
+
te(), V.value = !0, clearTimeout(k.value);
|
|
1574
|
+
}), K(() => l.value, () => {
|
|
1575
|
+
s.value || (l.value ? q.run({ isPolling: !0 }) : clearTimeout(k.value));
|
|
1576
|
+
}, { immediate: !0 }), K(() => s.value, () => {
|
|
1577
|
+
s.value ? v(!0) : q.run({ isPolling: !1 });
|
|
1578
|
+
}, { immediate: !0 }), K(() => r.value, () => {
|
|
1593
1579
|
r.value && oe(r.value || []);
|
|
1594
|
-
}, { deep: !0, immediate: !0 }),
|
|
1595
|
-
|
|
1596
|
-
}, { deep: !0, immediate: !0 }),
|
|
1597
|
-
|
|
1580
|
+
}, { deep: !0, immediate: !0 }), K(() => f.value, () => {
|
|
1581
|
+
s.value || a.value && (g({ current: 1 }), se());
|
|
1582
|
+
}, { deep: !0, immediate: !0 }), K(() => S.value, (t, i) => {
|
|
1583
|
+
s.value || Me(t, i) || (g({ current: 1 }), se());
|
|
1598
1584
|
}, { deep: !0, immediate: !0 });
|
|
1599
1585
|
function se() {
|
|
1600
|
-
|
|
1586
|
+
n ? l.value || (te(), q.run({ isPolling: !1 })) : oe(r.value || []);
|
|
1601
1587
|
}
|
|
1602
1588
|
const re = T(() => {
|
|
1603
|
-
if (
|
|
1604
|
-
return R(
|
|
1605
|
-
const t = $.value.filter((
|
|
1606
|
-
return !R(
|
|
1607
|
-
}), be = T(() => R(
|
|
1589
|
+
if (E.value)
|
|
1590
|
+
return R(N);
|
|
1591
|
+
const t = $.value.filter((i) => i.show || i.show === void 0);
|
|
1592
|
+
return !R(N) || !t || t.length === 0 ? [] : R(N);
|
|
1593
|
+
}), be = T(() => R(N).some((t) => J(t.children) && t.children.length > 0));
|
|
1608
1594
|
function de(t) {
|
|
1609
1595
|
L.value = t;
|
|
1610
1596
|
}
|
|
1611
|
-
function Re(t,
|
|
1612
|
-
te(),
|
|
1597
|
+
function Re(t, i = {}, y = {}, b) {
|
|
1598
|
+
te(), q.run({ pagination: t, filters: i, sorter: y, extra: b, isPolling: !1 });
|
|
1613
1599
|
}
|
|
1614
1600
|
function oe(t) {
|
|
1615
|
-
const
|
|
1616
|
-
if (
|
|
1617
|
-
const y =
|
|
1618
|
-
y !==
|
|
1601
|
+
const i = cl(ee(t), ce(O));
|
|
1602
|
+
if (N.value = i, !n || !Ne(n)) {
|
|
1603
|
+
const y = i.length || 0;
|
|
1604
|
+
y !== O.total && g({
|
|
1619
1605
|
total: y
|
|
1620
1606
|
});
|
|
1621
1607
|
}
|
|
@@ -1625,42 +1611,42 @@ function ha({ rowKey: e, autoRequest: n, polling: l, request: a, postData: o, da
|
|
|
1625
1611
|
isTreeDataRef: be,
|
|
1626
1612
|
setTableDataList: oe,
|
|
1627
1613
|
operateTableDataRow: (t) => {
|
|
1628
|
-
const { key:
|
|
1614
|
+
const { key: i, row: y, value: b, type: C = "update" } = t, c = i ?? e.value, fe = y?.[c] ?? b;
|
|
1629
1615
|
switch (!y && C !== "delete" && console.warn("row is required"), C) {
|
|
1630
1616
|
case "update":
|
|
1631
|
-
c && fe && y && (
|
|
1617
|
+
c && fe && y && (N.value = N.value.map((U) => fe === U[c] ? ye(U, y) : U));
|
|
1632
1618
|
break;
|
|
1633
1619
|
case "push":
|
|
1634
|
-
y &&
|
|
1620
|
+
y && N.value.push(y);
|
|
1635
1621
|
break;
|
|
1636
1622
|
case "unshift":
|
|
1637
|
-
y &&
|
|
1623
|
+
y && N.value.unshift(y);
|
|
1638
1624
|
break;
|
|
1639
1625
|
case "delete":
|
|
1640
|
-
c && (
|
|
1626
|
+
c && (N.value = N.value.filter((U) => b !== U[c]));
|
|
1641
1627
|
break;
|
|
1642
1628
|
}
|
|
1643
1629
|
},
|
|
1644
1630
|
handleTableChange: Re,
|
|
1645
1631
|
run: async (t) => {
|
|
1646
|
-
|
|
1632
|
+
s.value || (n ? await q.run({ ...t, isPolling: !1 }) : F("reload"));
|
|
1647
1633
|
}
|
|
1648
1634
|
};
|
|
1649
1635
|
}
|
|
1650
1636
|
function ga(e) {
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1653
|
-
|
|
1637
|
+
const a = x(l(e.loading.value));
|
|
1638
|
+
K(() => e.loading.value, (o) => {
|
|
1639
|
+
a.value = l(o, a.value);
|
|
1654
1640
|
});
|
|
1655
1641
|
function l(o, r = !1) {
|
|
1656
|
-
return
|
|
1642
|
+
return De(o) ? o : ne(o) ? o?.spinning ?? r : r;
|
|
1657
1643
|
}
|
|
1658
|
-
function
|
|
1659
|
-
|
|
1644
|
+
function n(o) {
|
|
1645
|
+
a.value = o;
|
|
1660
1646
|
}
|
|
1661
|
-
return [
|
|
1647
|
+
return [a, n];
|
|
1662
1648
|
}
|
|
1663
|
-
const
|
|
1649
|
+
const Ye = {
|
|
1664
1650
|
current: 1,
|
|
1665
1651
|
pageSize: 10,
|
|
1666
1652
|
size: "default",
|
|
@@ -1670,37 +1656,37 @@ const Me = {
|
|
|
1670
1656
|
};
|
|
1671
1657
|
function ba({
|
|
1672
1658
|
pagination: e,
|
|
1673
|
-
pageItemRender:
|
|
1659
|
+
pageItemRender: a
|
|
1674
1660
|
}) {
|
|
1675
|
-
const l =
|
|
1676
|
-
...
|
|
1677
|
-
}),
|
|
1678
|
-
current:
|
|
1679
|
-
pageSize:
|
|
1661
|
+
const l = x({
|
|
1662
|
+
...Ye
|
|
1663
|
+
}), n = lt({
|
|
1664
|
+
current: Ye.current,
|
|
1665
|
+
pageSize: Ye.pageSize,
|
|
1680
1666
|
total: 0
|
|
1681
1667
|
});
|
|
1682
|
-
|
|
1668
|
+
K(() => e.value, () => {
|
|
1683
1669
|
if (e.value === !1) {
|
|
1684
1670
|
l.value = !1;
|
|
1685
1671
|
return;
|
|
1686
1672
|
}
|
|
1687
|
-
const r =
|
|
1673
|
+
const r = Ne(a) ? {
|
|
1688
1674
|
itemRender: ({
|
|
1689
|
-
page:
|
|
1675
|
+
page: h,
|
|
1690
1676
|
type: f,
|
|
1691
1677
|
originalElement: $
|
|
1692
|
-
}) =>
|
|
1693
|
-
page:
|
|
1678
|
+
}) => a ? a({
|
|
1679
|
+
page: h,
|
|
1694
1680
|
type: f,
|
|
1695
1681
|
originalElement: $
|
|
1696
1682
|
}) : null
|
|
1697
|
-
} : null,
|
|
1698
|
-
...
|
|
1683
|
+
} : null, s = {
|
|
1684
|
+
...Ye,
|
|
1699
1685
|
...e.value || {},
|
|
1700
1686
|
...r || {}
|
|
1701
1687
|
};
|
|
1702
|
-
e.value?.showTotal || (
|
|
1703
|
-
Ce(
|
|
1688
|
+
e.value?.showTotal || (s.showTotal = (h) => `共${h < s.pageSize ? 1 : Math.ceil(h / (s.pageSize || 10))}页 ${h}条记录`), l.value = ee(s), fl(n, (h) => {
|
|
1689
|
+
Ce(s[h]) && (n[h] = s[h]);
|
|
1704
1690
|
});
|
|
1705
1691
|
}, {
|
|
1706
1692
|
deep: 1,
|
|
@@ -1708,77 +1694,77 @@ function ba({
|
|
|
1708
1694
|
});
|
|
1709
1695
|
function o(r) {
|
|
1710
1696
|
l.value = ye(R(l), r);
|
|
1711
|
-
for (const
|
|
1712
|
-
r[
|
|
1697
|
+
for (const s in n)
|
|
1698
|
+
r[s] && Ce(r[s]) && (n[s] = r[s]);
|
|
1713
1699
|
}
|
|
1714
1700
|
return {
|
|
1715
1701
|
paginationInfo: l,
|
|
1716
|
-
requestPagination:
|
|
1702
|
+
requestPagination: n,
|
|
1717
1703
|
setPagination: o
|
|
1718
1704
|
};
|
|
1719
1705
|
}
|
|
1720
|
-
function pa(e,
|
|
1721
|
-
const l =
|
|
1722
|
-
|
|
1723
|
-
|
|
1706
|
+
function pa(e, a) {
|
|
1707
|
+
const l = x([]), n = x([]);
|
|
1708
|
+
K(() => a.value?.selectedRows, (v) => {
|
|
1709
|
+
n.value = ee(v || []);
|
|
1724
1710
|
}, {
|
|
1725
1711
|
deep: !0,
|
|
1726
1712
|
immediate: !0
|
|
1727
|
-
}),
|
|
1728
|
-
l.value =
|
|
1713
|
+
}), K(() => a.value?.selectedRowKeys, (v) => {
|
|
1714
|
+
l.value = vl([...v || []]);
|
|
1729
1715
|
}, {
|
|
1730
1716
|
deep: !0,
|
|
1731
1717
|
immediate: !0
|
|
1732
1718
|
});
|
|
1733
|
-
const o = (
|
|
1734
|
-
const
|
|
1735
|
-
e.value && (
|
|
1719
|
+
const o = (v, w) => {
|
|
1720
|
+
const m = a.value?.type || "checkbox";
|
|
1721
|
+
e.value && (w ? v?.[e.value] && m === "checkbox" ? (l.value.push(v[e.value]), n.value.push(v)) : (l.value = [v[e.value]], n.value = [v]) : (l.value = l.value.filter((u) => u !== v[e.value]), n.value = n.value.filter((u) => u[e.value] !== v[e.value])));
|
|
1736
1722
|
}, r = () => {
|
|
1737
|
-
|
|
1723
|
+
a.value && a.value?.onChange?.(l.value, n.value);
|
|
1738
1724
|
};
|
|
1739
1725
|
return {
|
|
1740
1726
|
selectedKeys: l,
|
|
1741
|
-
selectedItems:
|
|
1727
|
+
selectedItems: n,
|
|
1742
1728
|
selectRowKey: o,
|
|
1743
|
-
selectAllRowKey: (
|
|
1744
|
-
e.value && (
|
|
1729
|
+
selectAllRowKey: (v, w, m) => {
|
|
1730
|
+
e.value && (v ? w.map((u) => (l.value.every((S) => S !== u?.[e.value]) && u?.[e.value] && (l.value.push(u[e.value]), n.value.push(u)), u)) : m.map((u) => (l.value.includes(u?.[e.value]) && (l.value = l.value.filter((S) => S !== u[e.value]), n.value = n.value.filter((S) => S[e.value] !== u[e.value])), u)));
|
|
1745
1731
|
},
|
|
1746
|
-
removeRowKeys: (
|
|
1747
|
-
l.value = l.value.filter((
|
|
1732
|
+
removeRowKeys: (v) => {
|
|
1733
|
+
l.value = l.value.filter((w) => !v.includes(w)), n.value = n.value.filter((w) => !v.includes(w?.[e.value || ""])), r();
|
|
1748
1734
|
},
|
|
1749
1735
|
changeRowKey: r,
|
|
1750
|
-
syncSelectedRows: (
|
|
1751
|
-
if (e.value && l.value.length !==
|
|
1752
|
-
const
|
|
1753
|
-
|
|
1754
|
-
|
|
1736
|
+
syncSelectedRows: (v) => {
|
|
1737
|
+
if (e.value && l.value.length !== n.value.length) {
|
|
1738
|
+
const w = n.value.map((u) => u[e.value]), m = l.value.filter((u) => !w.includes(u));
|
|
1739
|
+
v.forEach((u) => {
|
|
1740
|
+
m.includes(u[e.value]) && n.value.push(ee(u));
|
|
1755
1741
|
});
|
|
1756
1742
|
}
|
|
1757
1743
|
},
|
|
1758
1744
|
clearAllRowKeys: () => {
|
|
1759
|
-
l.value = [],
|
|
1745
|
+
l.value = [], n.value = [], r();
|
|
1760
1746
|
}
|
|
1761
1747
|
};
|
|
1762
1748
|
}
|
|
1763
1749
|
function ya(e) {
|
|
1764
1750
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ae(e);
|
|
1765
1751
|
}
|
|
1766
|
-
function Ca(e,
|
|
1767
|
-
if (!
|
|
1752
|
+
function Ca(e, a, l, n) {
|
|
1753
|
+
if (!a) return e;
|
|
1768
1754
|
let o = e;
|
|
1769
|
-
if (ne(
|
|
1770
|
-
const r =
|
|
1771
|
-
return d(r, Q(
|
|
1772
|
-
class:
|
|
1773
|
-
onClick:
|
|
1755
|
+
if (ne(a)) {
|
|
1756
|
+
const r = a.node === "a" ? "span" : a.node;
|
|
1757
|
+
return d(r, Q(a?.attr || {}, {
|
|
1758
|
+
class: a.class,
|
|
1759
|
+
onClick: a.click
|
|
1774
1760
|
}), ya(e) ? e : {
|
|
1775
1761
|
default: () => [e]
|
|
1776
1762
|
});
|
|
1777
1763
|
}
|
|
1778
|
-
switch (
|
|
1764
|
+
switch (a) {
|
|
1779
1765
|
case "link":
|
|
1780
1766
|
o = d("span", {
|
|
1781
|
-
class: [`${l}-a`,
|
|
1767
|
+
class: [`${l}-a`, n]
|
|
1782
1768
|
}, [e]);
|
|
1783
1769
|
break;
|
|
1784
1770
|
case "time":
|
|
@@ -1796,153 +1782,153 @@ function Ca(e, n, l, a) {
|
|
|
1796
1782
|
}
|
|
1797
1783
|
return o;
|
|
1798
1784
|
}
|
|
1799
|
-
function Sa(e,
|
|
1800
|
-
const l =
|
|
1801
|
-
return e.filter((o, r) => r < l *
|
|
1785
|
+
function Sa(e, a) {
|
|
1786
|
+
const l = a && a.current || 1, n = a && a.pageSize || 10;
|
|
1787
|
+
return e.filter((o, r) => r < l * n && r >= n * (l - 1));
|
|
1802
1788
|
}
|
|
1803
|
-
function
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1789
|
+
function Ta(e) {
|
|
1790
|
+
const a = document.createElement("textarea");
|
|
1791
|
+
a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
|
|
1806
1792
|
}
|
|
1807
|
-
function Ae(e,
|
|
1808
|
-
let l = null,
|
|
1793
|
+
function Ae(e, a) {
|
|
1794
|
+
let l = null, n = null;
|
|
1809
1795
|
function o() {
|
|
1810
|
-
l && l.disconnect(),
|
|
1796
|
+
l && l.disconnect(), n && n.disconnect();
|
|
1811
1797
|
}
|
|
1812
1798
|
function r(f) {
|
|
1813
1799
|
f && (l = new ResizeObserver(() => {
|
|
1814
|
-
|
|
1815
|
-
}), l.observe(f),
|
|
1800
|
+
a(f);
|
|
1801
|
+
}), l.observe(f), a(f));
|
|
1816
1802
|
}
|
|
1817
|
-
function
|
|
1803
|
+
function s() {
|
|
1818
1804
|
return typeof e == "string" ? document.querySelector(e) : e();
|
|
1819
1805
|
}
|
|
1820
|
-
const
|
|
1821
|
-
return
|
|
1822
|
-
const f =
|
|
1823
|
-
f && (
|
|
1824
|
-
}),
|
|
1806
|
+
const h = s();
|
|
1807
|
+
return h ? (r(h), o) : (n = new MutationObserver(() => {
|
|
1808
|
+
const f = s();
|
|
1809
|
+
f && (n.disconnect(), r(f));
|
|
1810
|
+
}), n.observe(document.body, {
|
|
1825
1811
|
childList: !0,
|
|
1826
1812
|
subtree: !0
|
|
1827
1813
|
}), o);
|
|
1828
1814
|
}
|
|
1829
|
-
function
|
|
1830
|
-
const o =
|
|
1831
|
-
let
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
L && (
|
|
1835
|
-
}),
|
|
1836
|
-
L && (
|
|
1837
|
-
}),
|
|
1815
|
+
function xa({ fitPage: e, hashId: a, scroll: l, baseClassName: n }) {
|
|
1816
|
+
const o = x(), r = x(), s = x(), h = x(), f = x(), $ = x(), v = x(0);
|
|
1817
|
+
let w, m, u, S;
|
|
1818
|
+
il(() => {
|
|
1819
|
+
w = Ae(() => r.value?.querySelector(".ant-pagination"), (L) => {
|
|
1820
|
+
L && (s.value = L);
|
|
1821
|
+
}), u = Ae(() => r.value?.querySelector(".ant-table-header"), (L) => {
|
|
1822
|
+
L && (h.value = L);
|
|
1823
|
+
}), S = Ae(() => r.value?.querySelector(".ant-table-body>table"), (L) => {
|
|
1838
1824
|
L && ($.value = L);
|
|
1839
1825
|
});
|
|
1840
|
-
}),
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
}) : L.x && (
|
|
1844
|
-
|
|
1826
|
+
}), K(() => l.value, (L) => {
|
|
1827
|
+
m && m(), L.y || e.value ? m = Ae(() => r.value?.querySelector(".ant-table-body"), (N) => {
|
|
1828
|
+
N && (f.value = N);
|
|
1829
|
+
}) : L.x && (m = Ae(() => r.value?.querySelector(".ant-table-content"), (N) => {
|
|
1830
|
+
N && (f.value = N);
|
|
1845
1831
|
}));
|
|
1846
1832
|
}, { immediate: !0 });
|
|
1847
|
-
const { height:
|
|
1833
|
+
const { height: g } = He(r), { height: O } = He(h), { height: H } = He($), { height: B } = He(s), E = T(() => {
|
|
1848
1834
|
if (!r.value || !e.value)
|
|
1849
1835
|
return 0;
|
|
1850
1836
|
let L = 0;
|
|
1851
|
-
if (
|
|
1852
|
-
const
|
|
1837
|
+
if (s.value) {
|
|
1838
|
+
const k = getComputedStyle(s.value), z = Number.parseFloat(k.marginTop) || 0, j = Number.parseFloat(k.marginBottom) || 0;
|
|
1853
1839
|
L = z + j;
|
|
1854
1840
|
}
|
|
1855
|
-
return
|
|
1856
|
-
}),
|
|
1857
|
-
|
|
1841
|
+
return g.value - O.value - v.value - (B.value + L);
|
|
1842
|
+
}), F = T(() => E.value && e.value ? H.value <= E.value : !1);
|
|
1843
|
+
K([
|
|
1858
1844
|
() => f.value,
|
|
1859
|
-
() =>
|
|
1845
|
+
() => E.value
|
|
1860
1846
|
], () => {
|
|
1861
|
-
f.value && e.value && f.value.setAttribute("style", `height: ${
|
|
1847
|
+
f.value && e.value && f.value.setAttribute("style", `height: ${E.value}px;`);
|
|
1862
1848
|
}), wl(f, {
|
|
1863
1849
|
onScroll: () => {
|
|
1864
1850
|
f.value && o.value?.handleScroll(f.value);
|
|
1865
1851
|
}
|
|
1866
1852
|
});
|
|
1867
|
-
const
|
|
1853
|
+
const Y = () => {
|
|
1868
1854
|
o.value?.update();
|
|
1869
1855
|
};
|
|
1870
|
-
$l(f,
|
|
1871
|
-
|
|
1872
|
-
|
|
1856
|
+
$l(f, Y), at(() => {
|
|
1857
|
+
nt(() => {
|
|
1858
|
+
Y();
|
|
1873
1859
|
});
|
|
1874
|
-
}),
|
|
1860
|
+
}), Gt(() => Y());
|
|
1875
1861
|
function V() {
|
|
1876
|
-
|
|
1862
|
+
w && w(), m && m(), u && u(), S && S();
|
|
1877
1863
|
}
|
|
1878
|
-
return
|
|
1864
|
+
return yt(() => {
|
|
1879
1865
|
V();
|
|
1880
|
-
}),
|
|
1866
|
+
}), Ct(() => {
|
|
1881
1867
|
V && V();
|
|
1882
|
-
}),
|
|
1883
|
-
className: `${
|
|
1884
|
-
hashId:
|
|
1885
|
-
tableScrollYHeight:
|
|
1886
|
-
tableHeaderHeight:
|
|
1868
|
+
}), Jl({
|
|
1869
|
+
className: `${n}-scroll`,
|
|
1870
|
+
hashId: a,
|
|
1871
|
+
tableScrollYHeight: E,
|
|
1872
|
+
tableHeaderHeight: O,
|
|
1887
1873
|
scrollbarElement: r,
|
|
1888
1874
|
wrapElement: f
|
|
1889
1875
|
}), {
|
|
1890
1876
|
barRef: o,
|
|
1891
1877
|
tableCardEl: r,
|
|
1892
1878
|
tableScrollEl: f,
|
|
1893
|
-
tableOverHidden:
|
|
1894
|
-
tableScrollYHeight:
|
|
1895
|
-
tableListToolsHeight:
|
|
1879
|
+
tableOverHidden: F,
|
|
1880
|
+
tableScrollYHeight: E,
|
|
1881
|
+
tableListToolsHeight: v
|
|
1896
1882
|
};
|
|
1897
1883
|
}
|
|
1898
1884
|
function wa(e) {
|
|
1899
|
-
const
|
|
1885
|
+
const a = {};
|
|
1900
1886
|
return e.forEach((l) => {
|
|
1901
|
-
let
|
|
1902
|
-
const o = ["select", "number"], r = ["date", "time", "dateRange"],
|
|
1903
|
-
l.valueType ? !
|
|
1904
|
-
}),
|
|
1887
|
+
let n = l.initialValue;
|
|
1888
|
+
const o = ["select", "number"], r = ["date", "time", "dateRange"], s = ["treeSelect", "numberRange"];
|
|
1889
|
+
l.valueType ? !n && o.includes(l.valueType) ? n = void 0 : !n && r.includes(l.valueType) ? n = null : !n && s.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);
|
|
1890
|
+
}), a;
|
|
1905
1891
|
}
|
|
1906
|
-
function $a({ searchMap: e, columns:
|
|
1907
|
-
const l =
|
|
1892
|
+
function $a({ searchMap: e, columns: a }) {
|
|
1893
|
+
const l = x([]), n = x({});
|
|
1908
1894
|
function o(r) {
|
|
1909
|
-
r.forEach((
|
|
1910
|
-
l.value.some((f) => f.name ===
|
|
1895
|
+
r.forEach((h) => {
|
|
1896
|
+
l.value.some((f) => f.name === h.name) ? l.value = l.value.map((f) => f.name === h.name ? { ...f, ...h } : f) : l.value.push(h);
|
|
1911
1897
|
});
|
|
1912
|
-
const
|
|
1913
|
-
|
|
1898
|
+
const s = wa(r);
|
|
1899
|
+
n.value = { ...n.value, ...s };
|
|
1914
1900
|
}
|
|
1915
|
-
return
|
|
1901
|
+
return K(() => e.value, () => {
|
|
1916
1902
|
const r = [];
|
|
1917
|
-
e.value?.forEach((
|
|
1918
|
-
}, { deep: !0, immediate: !0 }),
|
|
1903
|
+
e.value?.forEach((s) => r.push(s)), o(r);
|
|
1904
|
+
}, { deep: !0, immediate: !0 }), K(() => a.value, () => {
|
|
1919
1905
|
const r = [];
|
|
1920
|
-
|
|
1921
|
-
|
|
1906
|
+
a.value && a.value?.length && a.value.forEach((s) => {
|
|
1907
|
+
s.searchConfig && r.push(s.searchConfig);
|
|
1922
1908
|
}), o(r);
|
|
1923
|
-
}, { deep: !0, immediate: !0 }), { formCols: l, defaultFormSearch:
|
|
1909
|
+
}, { deep: !0, immediate: !0 }), { formCols: l, defaultFormSearch: n };
|
|
1924
1910
|
}
|
|
1925
|
-
function Ra({ scroll: e, columns:
|
|
1926
|
-
const $ = T(() => f.value ? Ce(f.value) ?
|
|
1927
|
-
let
|
|
1928
|
-
const
|
|
1929
|
-
|
|
1930
|
-
|
|
1911
|
+
function Ra({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: o, rowSelection: r, screens: s, innerWidth: h, scrollBreakpoint: f }) {
|
|
1912
|
+
const $ = T(() => f.value ? Ce(f.value) ? h.value > f.value : Rt(f.value) ? s.value?.[f.value] : s.value?.xl : s.value?.xl), v = T(() => {
|
|
1913
|
+
let m = 0;
|
|
1914
|
+
const u = R(r) ? 60 : 0, S = 150, g = ee(R(a));
|
|
1915
|
+
g.forEach((B) => {
|
|
1916
|
+
m += Number.parseInt(String(B.width)) || 0;
|
|
1931
1917
|
});
|
|
1932
|
-
const
|
|
1933
|
-
return
|
|
1918
|
+
const H = g.filter((B) => !Reflect.has(B, "width")).length;
|
|
1919
|
+
return H !== 0 && (m += H * S), u && (m += u), m;
|
|
1934
1920
|
});
|
|
1935
|
-
return { proScroll: T(() => o.value ? {} : e.value &&
|
|
1936
|
-
y: e.value?.y || (
|
|
1937
|
-
} : l.value ? $.value ? {} :
|
|
1921
|
+
return { proScroll: T(() => o.value ? {} : e.value && wt(e.value).length ? R(e) : n.value ? {
|
|
1922
|
+
y: e.value?.y || (s.value?.xl ? 400 : 235)
|
|
1923
|
+
} : l.value ? $.value ? {} : De($.value) ? { x: v.value } : {} : {}), breakpoint: $ };
|
|
1938
1924
|
}
|
|
1939
1925
|
function Pa(e) {
|
|
1940
|
-
const
|
|
1941
|
-
|
|
1942
|
-
function l(
|
|
1943
|
-
|
|
1926
|
+
const a = x(e.size.value || "middle");
|
|
1927
|
+
K(() => e.size.value, (n) => a.value = n);
|
|
1928
|
+
function l(n) {
|
|
1929
|
+
a.value = n || a.value;
|
|
1944
1930
|
}
|
|
1945
|
-
return [
|
|
1931
|
+
return [a, l];
|
|
1946
1932
|
}
|
|
1947
1933
|
const Fa = (e) => ({
|
|
1948
1934
|
[e.componentCls]: {
|
|
@@ -1971,14 +1957,14 @@ const Fa = (e) => ({
|
|
|
1971
1957
|
}
|
|
1972
1958
|
}
|
|
1973
1959
|
}
|
|
1974
|
-
}),
|
|
1960
|
+
}), Je = () => ({
|
|
1975
1961
|
scrollbarWidth: "none",
|
|
1976
1962
|
"&::-webkit-scrollbar": {
|
|
1977
1963
|
width: 0,
|
|
1978
1964
|
height: 0
|
|
1979
1965
|
}
|
|
1980
1966
|
}), Ia = (e) => {
|
|
1981
|
-
const
|
|
1967
|
+
const a = new mt(e.colorText).setAlpha(0.2).toRgbString(), l = new mt(e.colorText).setAlpha(0.4).toRgbString();
|
|
1982
1968
|
return {
|
|
1983
1969
|
[e.componentCls]: {
|
|
1984
1970
|
[`${e.antCls}-table-container`]: {
|
|
@@ -2013,7 +1999,7 @@ const Fa = (e) => ({
|
|
|
2013
1999
|
height: 0,
|
|
2014
2000
|
cursor: "pointer",
|
|
2015
2001
|
opacity: 1,
|
|
2016
|
-
backgroundColor:
|
|
2002
|
+
backgroundColor: a,
|
|
2017
2003
|
borderRadius: "inherit",
|
|
2018
2004
|
transition: ".3s background-color",
|
|
2019
2005
|
"&:hover": {
|
|
@@ -2022,15 +2008,15 @@ const Fa = (e) => ({
|
|
|
2022
2008
|
}
|
|
2023
2009
|
}
|
|
2024
2010
|
},
|
|
2025
|
-
[`${e.antCls}-table-content`]:
|
|
2026
|
-
[`${e.antCls}-table-body`]:
|
|
2011
|
+
[`${e.antCls}-table-content`]: Je(),
|
|
2012
|
+
[`${e.antCls}-table-body`]: Je(),
|
|
2027
2013
|
[`${e.antCls}-table-empty`]: {
|
|
2028
|
-
[`${e.antCls}-table-content`]:
|
|
2014
|
+
[`${e.antCls}-table-content`]: Je()
|
|
2029
2015
|
}
|
|
2030
2016
|
}
|
|
2031
2017
|
};
|
|
2032
2018
|
}, Ba = (e) => {
|
|
2033
|
-
const
|
|
2019
|
+
const a = `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`;
|
|
2034
2020
|
return {
|
|
2035
2021
|
[e.componentCls]: {
|
|
2036
2022
|
[`&${e.componentCls}-full-page`]: {
|
|
@@ -2048,9 +2034,9 @@ const Fa = (e) => ({
|
|
|
2048
2034
|
overflow: "hidden",
|
|
2049
2035
|
[`${e.componentCls}-overflow-hidden`]: {
|
|
2050
2036
|
[`${e.antCls}-table${e.antCls}-table-bordered>${e.antCls}-table-container`]: {
|
|
2051
|
-
borderBlockEnd:
|
|
2037
|
+
borderBlockEnd: a,
|
|
2052
2038
|
[`${e.antCls}-table-body`]: {
|
|
2053
|
-
borderInlineEnd:
|
|
2039
|
+
borderInlineEnd: a
|
|
2054
2040
|
},
|
|
2055
2041
|
[`${e.antCls}-table-row`]: {
|
|
2056
2042
|
[`${e.antCls}-table-cell`]: {
|
|
@@ -2241,33 +2227,33 @@ const Fa = (e) => ({
|
|
|
2241
2227
|
function Na(e) {
|
|
2242
2228
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ae(e);
|
|
2243
2229
|
}
|
|
2244
|
-
const za =
|
|
2230
|
+
const za = Bt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, Ze = /* @__PURE__ */ ge({
|
|
2245
2231
|
name: "GProTable",
|
|
2246
2232
|
inheritAttrs: !1,
|
|
2247
2233
|
props: he,
|
|
2248
2234
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "columnsStateChange", "loadingChange"],
|
|
2249
2235
|
slots: Object,
|
|
2250
2236
|
setup(e, {
|
|
2251
|
-
emit:
|
|
2237
|
+
emit: a,
|
|
2252
2238
|
slots: l,
|
|
2253
|
-
expose:
|
|
2239
|
+
expose: n
|
|
2254
2240
|
}) {
|
|
2255
|
-
const o =
|
|
2241
|
+
const o = ml({
|
|
2256
2242
|
suffixCls: "table",
|
|
2257
2243
|
isPor: !0
|
|
2258
2244
|
}), {
|
|
2259
2245
|
wrapSSR: r,
|
|
2260
|
-
hashId:
|
|
2261
|
-
} =
|
|
2262
|
-
token:
|
|
2263
|
-
} = Da(), f =
|
|
2264
|
-
width:
|
|
2265
|
-
} = Rl(),
|
|
2266
|
-
|
|
2246
|
+
hashId: s
|
|
2247
|
+
} = Tt("ProBaseTable", [Aa, Ia, Ba, Fa, Ul], o), {
|
|
2248
|
+
token: h
|
|
2249
|
+
} = Da(), f = sl(), $ = ot(), {
|
|
2250
|
+
width: v
|
|
2251
|
+
} = Rl(), w = x(!1), m = St(), u = x(), S = x(), g = x(e.waitRequest);
|
|
2252
|
+
bt(() => g.value = e.waitRequest);
|
|
2267
2253
|
const {
|
|
2268
|
-
toggle:
|
|
2269
|
-
isFullscreen:
|
|
2270
|
-
} =
|
|
2254
|
+
toggle: O,
|
|
2255
|
+
isFullscreen: H
|
|
2256
|
+
} = Pt(u), B = T(() => !$.value.xl), E = T(() => (e.virtualScroll && El(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), F = T(() => {
|
|
2271
2257
|
if (e.form === !1) return !1;
|
|
2272
2258
|
const p = {
|
|
2273
2259
|
actions: {
|
|
@@ -2283,26 +2269,26 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge(
|
|
|
2283
2269
|
searchText: "查询"
|
|
2284
2270
|
};
|
|
2285
2271
|
return ne(e.form) ? ye(p, e.form) : p;
|
|
2286
|
-
}),
|
|
2272
|
+
}), Y = T(() => F.value === !1 ? {} : F.value), V = T(() => Y.value?.autoRequest ?? e.autoRequest), L = T(() => Y.value?.actions), N = T(() => {
|
|
2287
2273
|
const p = ee(e.columns || []).filter((P) => P.key || P.dataIndex).filter((P) => P.show ?? !0).map((P) => {
|
|
2288
|
-
const
|
|
2289
|
-
return P.key =
|
|
2274
|
+
const I = P.key || P.dataIndex;
|
|
2275
|
+
return P.key = I, P.dataIndex = I, P.align = P.align || e.align, P.uuid = P.uuid || $t().uuid(15), P;
|
|
2290
2276
|
});
|
|
2291
2277
|
return hl(p, {
|
|
2292
2278
|
align: e.align || "left",
|
|
2293
2279
|
showIndex: e.showIndex ?? !1
|
|
2294
2280
|
});
|
|
2295
|
-
}), [
|
|
2281
|
+
}), [k, z] = ga({
|
|
2296
2282
|
loading: X(e, "loading")
|
|
2297
|
-
}), [j,
|
|
2283
|
+
}), [j, M] = Pa({
|
|
2298
2284
|
size: X(e, "size")
|
|
2299
2285
|
}), {
|
|
2300
|
-
paginationInfo:
|
|
2286
|
+
paginationInfo: q,
|
|
2301
2287
|
requestPagination: te,
|
|
2302
2288
|
setPagination: se
|
|
2303
2289
|
} = ba({
|
|
2304
2290
|
pagination: X(e, "pagination"),
|
|
2305
|
-
pageItemRender:
|
|
2291
|
+
pageItemRender: dt({
|
|
2306
2292
|
slots: l,
|
|
2307
2293
|
props: e,
|
|
2308
2294
|
key: "pageItemRender"
|
|
@@ -2317,8 +2303,8 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge(
|
|
|
2317
2303
|
neverScroll: X(e, "neverScroll"),
|
|
2318
2304
|
rowSelection: X(e, "rowSelection"),
|
|
2319
2305
|
scrollBreakpoint: X(e, "scrollBreakpoint"),
|
|
2320
|
-
innerWidth:
|
|
2321
|
-
columns:
|
|
2306
|
+
innerWidth: v,
|
|
2307
|
+
columns: N,
|
|
2322
2308
|
screens: $
|
|
2323
2309
|
}), {
|
|
2324
2310
|
proColumns: de,
|
|
@@ -2330,17 +2316,17 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge(
|
|
|
2330
2316
|
autoScroll: X(e, "autoScroll"),
|
|
2331
2317
|
breakpoint: be,
|
|
2332
2318
|
scroll: re,
|
|
2333
|
-
columns:
|
|
2319
|
+
columns: N
|
|
2334
2320
|
}), {
|
|
2335
2321
|
formCols: Pe,
|
|
2336
2322
|
defaultFormSearch: t
|
|
2337
2323
|
} = $a({
|
|
2338
2324
|
searchMap: X(e, "searchMap"),
|
|
2339
|
-
columns:
|
|
2325
|
+
columns: N
|
|
2340
2326
|
}), {
|
|
2341
|
-
selectedKeys:
|
|
2327
|
+
selectedKeys: i,
|
|
2342
2328
|
selectedItems: y,
|
|
2343
|
-
changeRowKey:
|
|
2329
|
+
changeRowKey: b,
|
|
2344
2330
|
selectRowKey: C,
|
|
2345
2331
|
selectAllRowKey: c,
|
|
2346
2332
|
syncSelectedRows: fe,
|
|
@@ -2350,14 +2336,14 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge(
|
|
|
2350
2336
|
run: ue,
|
|
2351
2337
|
setTableDataList: Ie,
|
|
2352
2338
|
operateTableDataRow: Se,
|
|
2353
|
-
isTreeDataRef:
|
|
2339
|
+
isTreeDataRef: Te,
|
|
2354
2340
|
dataSource: ie,
|
|
2355
|
-
handleTableChange:
|
|
2341
|
+
handleTableChange: Ke
|
|
2356
2342
|
} = ha({
|
|
2357
2343
|
...ve,
|
|
2358
|
-
waitRequest:
|
|
2344
|
+
waitRequest: g
|
|
2359
2345
|
}, {
|
|
2360
|
-
loading:
|
|
2346
|
+
loading: k,
|
|
2361
2347
|
pageInfo: te,
|
|
2362
2348
|
setPagination: se,
|
|
2363
2349
|
removeRowKeys: U,
|
|
@@ -2369,136 +2355,136 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge(
|
|
|
2369
2355
|
params: X(e, "params"),
|
|
2370
2356
|
onRequestError: e.onRequestError,
|
|
2371
2357
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2372
|
-
hasCustomRender: T(() =>
|
|
2373
|
-
},
|
|
2374
|
-
tableCardEl:
|
|
2375
|
-
tableScrollYHeight:
|
|
2376
|
-
tableListToolsHeight:
|
|
2377
|
-
tableScrollEl:
|
|
2378
|
-
tableOverHidden:
|
|
2379
|
-
barRef:
|
|
2380
|
-
} =
|
|
2381
|
-
hashId:
|
|
2358
|
+
hasCustomRender: T(() => Ge(e.customRender || l?.customRender))
|
|
2359
|
+
}, a), {
|
|
2360
|
+
tableCardEl: ke,
|
|
2361
|
+
tableScrollYHeight: Oe,
|
|
2362
|
+
tableListToolsHeight: Et,
|
|
2363
|
+
tableScrollEl: it,
|
|
2364
|
+
tableOverHidden: Lt,
|
|
2365
|
+
barRef: jt
|
|
2366
|
+
} = xa({
|
|
2367
|
+
hashId: s,
|
|
2382
2368
|
scroll: re,
|
|
2383
2369
|
baseClassName: o,
|
|
2384
2370
|
fitPage: X(e, "fitPage")
|
|
2385
|
-
}),
|
|
2386
|
-
const p =
|
|
2387
|
-
y:
|
|
2371
|
+
}), st = T(() => {
|
|
2372
|
+
const p = Oe.value && e.fitPage ? {
|
|
2373
|
+
y: Oe.value
|
|
2388
2374
|
} : {};
|
|
2389
2375
|
return {
|
|
2390
2376
|
...R(re),
|
|
2391
2377
|
...p
|
|
2392
2378
|
};
|
|
2393
|
-
}),
|
|
2379
|
+
}), Ht = T(() => ({
|
|
2394
2380
|
size: R(j),
|
|
2395
|
-
scroll: R(
|
|
2381
|
+
scroll: R(st),
|
|
2396
2382
|
dataSource: R(ie),
|
|
2397
|
-
pagination: R(
|
|
2398
|
-
virtualScroll:
|
|
2383
|
+
pagination: R(q),
|
|
2384
|
+
virtualScroll: E.value,
|
|
2399
2385
|
columns: R(de).filter((p) => p.show || p.show === void 0)
|
|
2400
|
-
})),
|
|
2401
|
-
const p = ne(e.loading) ?
|
|
2402
|
-
return !p.indicator &&
|
|
2403
|
-
spinning: e.showLoading ?
|
|
2386
|
+
})), rt = T(() => {
|
|
2387
|
+
const p = ne(e.loading) ? ze(e.loading, "spinning") : {};
|
|
2388
|
+
return !p.indicator && m?.indicator?.value && (p.indicator = m?.indicator?.value), {
|
|
2389
|
+
spinning: e.showLoading ? Ge(k.value) : !1,
|
|
2404
2390
|
...p
|
|
2405
2391
|
};
|
|
2406
|
-
}),
|
|
2392
|
+
}), Wt = T(() => {
|
|
2407
2393
|
let p;
|
|
2408
|
-
const P = e.direction === "rtl" ? "bottomLeft" : "right",
|
|
2409
|
-
if (
|
|
2410
|
-
const D =
|
|
2394
|
+
const P = e.direction === "rtl" ? "bottomLeft" : "right", I = R(q)?.position;
|
|
2395
|
+
if (I !== null && Array.isArray(I)) {
|
|
2396
|
+
const D = I.find((le) => le.includes("top")), W = I.find((le) => le.includes("bottom")), _ = I.every((le) => `${le}` == "none");
|
|
2411
2397
|
!D && !W && !_ && (p = P), D && (p = D.toLowerCase().replace("top", "")), W && (p = W.toLowerCase().replace("bottom", ""));
|
|
2412
2398
|
} else
|
|
2413
2399
|
p = P;
|
|
2414
2400
|
return p;
|
|
2415
2401
|
});
|
|
2416
2402
|
da(() => {
|
|
2417
|
-
|
|
2403
|
+
w.value ? e.keepAliveReload && ue({
|
|
2418
2404
|
params: e.params
|
|
2419
|
-
}) :
|
|
2405
|
+
}) : w.value = !0;
|
|
2420
2406
|
});
|
|
2421
|
-
const
|
|
2407
|
+
const Yt = async (p, P) => {
|
|
2422
2408
|
if (V.value) {
|
|
2423
2409
|
ue({
|
|
2424
2410
|
params: p
|
|
2425
2411
|
});
|
|
2426
2412
|
return;
|
|
2427
2413
|
}
|
|
2428
|
-
P === "reset" ? (
|
|
2414
|
+
P === "reset" ? (a("reset", p), e.request && L.value?.resetReload && ue({
|
|
2429
2415
|
params: p
|
|
2430
|
-
})) : e.request && (
|
|
2416
|
+
})) : e.request && (a("submit", p), ue({
|
|
2431
2417
|
params: p
|
|
2432
2418
|
}));
|
|
2433
|
-
},
|
|
2434
|
-
|
|
2435
|
-
},
|
|
2436
|
-
|
|
2437
|
-
},
|
|
2438
|
-
|
|
2439
|
-
},
|
|
2419
|
+
}, Ve = (p, P, I, D) => {
|
|
2420
|
+
Ke(p, P, I, D), a("change", p, P, I, D);
|
|
2421
|
+
}, Mt = (p) => {
|
|
2422
|
+
a("expandedRowsChange", p);
|
|
2423
|
+
}, qt = (p, P) => {
|
|
2424
|
+
a("expand", p, P);
|
|
2425
|
+
}, Kt = (p, P) => oe(p, P), kt = (p, P, I) => {
|
|
2440
2426
|
let D = p;
|
|
2441
2427
|
if (P) {
|
|
2442
|
-
const W = J(p) ? typeof p?.[0]?.children == "string" ? p?.[0]?.children : "" : p ? p.toString() : "", _ =
|
|
2428
|
+
const W = J(p) ? typeof p?.[0]?.children == "string" ? p?.[0]?.children : "" : p ? p.toString() : "", _ = I.tooltip === !1 ? {} : I.tooltip, le = I.tooltip === !1 ? 1 : Ce(_?.hiddenLine) && _?.hiddenLine > 0 ? _?.hiddenLine : 1, G = I.tooltip === !1 ? 0 : Ce(_?.width) ? _?.width : 0, Ee = I.tooltip !== !1 && Rt(W) && G > 0 ? pl(W, {
|
|
2443
2429
|
cssObject: {
|
|
2444
2430
|
fontSize: "14px",
|
|
2445
2431
|
lineHeight: "22px",
|
|
2446
|
-
fontFamily: f?.token?.value?.fontFamily ||
|
|
2432
|
+
fontFamily: f?.token?.value?.fontFamily || h?.value?.fontFamily,
|
|
2447
2433
|
..._?.targetStyle || {}
|
|
2448
2434
|
}
|
|
2449
|
-
}) : 0,
|
|
2435
|
+
}) : 0, Le = document.querySelector(`.${o} .ant-table-tbody`), je = d("div", {
|
|
2450
2436
|
class: `${o}-ellipsis-text`
|
|
2451
|
-
}, [p]),
|
|
2437
|
+
}, [p]), ct = () => I.tooltip === !1 || ne(I.tooltip) && Ee < G && G > 0 ? je : d($e, Q({
|
|
2452
2438
|
title: p,
|
|
2453
|
-
getPopupContainer: (
|
|
2454
|
-
}, ne(
|
|
2439
|
+
getPopupContainer: (Xe) => Le ?? Xe?.parentNode?.parentNode
|
|
2440
|
+
}, ne(I.tooltip) ? I.tooltip : {}, {
|
|
2455
2441
|
destroyTooltipOnHide: !0
|
|
2456
|
-
}), Na(
|
|
2457
|
-
default: () => [
|
|
2442
|
+
}), Na(je) ? je : {
|
|
2443
|
+
default: () => [je]
|
|
2458
2444
|
});
|
|
2459
2445
|
if (D = d("div", {
|
|
2460
|
-
class:
|
|
2446
|
+
class: A(`${o}-ellipsis`, _?.class),
|
|
2461
2447
|
style: {
|
|
2462
2448
|
"-webkit-line-clamp": le
|
|
2463
2449
|
}
|
|
2464
|
-
}, [
|
|
2465
|
-
const
|
|
2450
|
+
}, [ct()]), I.copyable) {
|
|
2451
|
+
const Xe = typeof I.copyText == "function" ? I.copyText?.(I) : I.copyText || W;
|
|
2466
2452
|
D = d("div", {
|
|
2467
2453
|
class: `${o}-copyable`
|
|
2468
2454
|
}, [d("div", {
|
|
2469
|
-
class:
|
|
2455
|
+
class: A(`${o}-ellipsis`, _?.class),
|
|
2470
2456
|
style: {
|
|
2471
2457
|
"-webkit-line-clamp": le
|
|
2472
2458
|
}
|
|
2473
|
-
}, [
|
|
2459
|
+
}, [ct()]), d(al, {
|
|
2474
2460
|
class: `${o}-copyable-icon`,
|
|
2475
2461
|
onClick: () => {
|
|
2476
|
-
|
|
2462
|
+
Ta(Xe), zl.success("复制成功");
|
|
2477
2463
|
}
|
|
2478
2464
|
}, null)]);
|
|
2479
2465
|
}
|
|
2480
2466
|
}
|
|
2481
2467
|
return D;
|
|
2482
2468
|
};
|
|
2483
|
-
function
|
|
2469
|
+
function ut() {
|
|
2484
2470
|
const p = yl({
|
|
2485
2471
|
slots: l,
|
|
2486
2472
|
props: e,
|
|
2487
2473
|
key: "emptyText"
|
|
2488
2474
|
});
|
|
2489
|
-
if (p !== !1 &&
|
|
2490
|
-
const
|
|
2475
|
+
if (p !== !1 && m?.emptyText?.value !== !1) {
|
|
2476
|
+
const I = e.emptyTextProps?.extraProps || {}, D = p || m?.emptyText?.value, W = ae(D), _ = W ? gt(D, I) : xt(J(D) ? D : [D]);
|
|
2491
2477
|
return d("div", {
|
|
2492
|
-
class:
|
|
2478
|
+
class: A(`${o}-empty-text`, s.value, e.emptyTextProps?.class),
|
|
2493
2479
|
style: e.emptyTextProps?.style
|
|
2494
|
-
}, [W ? _ : J(_) && _.length ? _.map((le) =>
|
|
2480
|
+
}, [W ? _ : J(_) && _.length ? _.map((le) => tt(le, I)) : d(Bt, {
|
|
2495
2481
|
image: za
|
|
2496
2482
|
}, null)]);
|
|
2497
2483
|
}
|
|
2498
2484
|
return null;
|
|
2499
2485
|
}
|
|
2500
|
-
const
|
|
2501
|
-
const p =
|
|
2486
|
+
const Vt = () => {
|
|
2487
|
+
const p = dt({
|
|
2502
2488
|
slots: l,
|
|
2503
2489
|
props: e,
|
|
2504
2490
|
key: "customRender"
|
|
@@ -2508,50 +2494,52 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge(
|
|
|
2508
2494
|
const P = ee(R(ie));
|
|
2509
2495
|
return p?.({
|
|
2510
2496
|
dataSource: P,
|
|
2511
|
-
currentData: Sa(P,
|
|
2497
|
+
currentData: Sa(P, q.value)
|
|
2512
2498
|
});
|
|
2513
2499
|
}
|
|
2514
|
-
return
|
|
2500
|
+
return ut();
|
|
2515
2501
|
}
|
|
2516
2502
|
return d(we, null, null);
|
|
2517
2503
|
};
|
|
2518
2504
|
return jl({
|
|
2519
|
-
|
|
2505
|
+
hashId: s,
|
|
2506
|
+
prefixCls: o,
|
|
2507
|
+
tableScrollState: st,
|
|
2520
2508
|
tableSize: j,
|
|
2521
2509
|
columns: de,
|
|
2522
|
-
cacheColumns:
|
|
2523
|
-
isMobile:
|
|
2524
|
-
formConfig:
|
|
2510
|
+
cacheColumns: N,
|
|
2511
|
+
isMobile: B,
|
|
2512
|
+
formConfig: Y,
|
|
2525
2513
|
formAutoRequest: V,
|
|
2526
2514
|
formActions: L,
|
|
2527
|
-
screenWidth:
|
|
2528
|
-
tableListToolsHeight:
|
|
2515
|
+
screenWidth: v,
|
|
2516
|
+
tableListToolsHeight: Et,
|
|
2529
2517
|
styles: X(e, "styles"),
|
|
2530
2518
|
classNames: X(e, "classNames"),
|
|
2531
2519
|
action: {
|
|
2532
|
-
setTableSize:
|
|
2520
|
+
setTableSize: M,
|
|
2533
2521
|
reload: (p) => ue(p),
|
|
2534
|
-
toggle:
|
|
2522
|
+
toggle: O
|
|
2535
2523
|
},
|
|
2536
2524
|
setPagination: se
|
|
2537
|
-
}),
|
|
2525
|
+
}), n({
|
|
2538
2526
|
formRef: () => ({
|
|
2539
2527
|
getFormSearch: () => ({
|
|
2540
2528
|
...R(t),
|
|
2541
|
-
...
|
|
2529
|
+
...S.value?.getFormSearch(),
|
|
2542
2530
|
...e.params
|
|
2543
2531
|
}),
|
|
2544
|
-
getFormInnerState: () =>
|
|
2532
|
+
getFormInnerState: () => S.value?.getFormSearch() || {},
|
|
2545
2533
|
restFormState: (p) => {
|
|
2546
|
-
|
|
2534
|
+
g.value = !0, p && p?.(), S.value?.resetForm(!1), g.value = !1;
|
|
2547
2535
|
}
|
|
2548
2536
|
}),
|
|
2549
2537
|
actionRef: () => ({
|
|
2550
|
-
loading:
|
|
2538
|
+
loading: k,
|
|
2551
2539
|
dataSource: ie,
|
|
2552
2540
|
pageInfo: te,
|
|
2553
|
-
pagination:
|
|
2554
|
-
selectedKeys: T(() =>
|
|
2541
|
+
pagination: q.value,
|
|
2542
|
+
selectedKeys: T(() => i.value),
|
|
2555
2543
|
selectedItems: T(() => y.value),
|
|
2556
2544
|
rowsSelection: {
|
|
2557
2545
|
clear: Fe,
|
|
@@ -2561,55 +2549,55 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge(
|
|
|
2561
2549
|
selectAll: c
|
|
2562
2550
|
},
|
|
2563
2551
|
reload: ue,
|
|
2564
|
-
getLoadingStatus: () => R(
|
|
2552
|
+
getLoadingStatus: () => R(k),
|
|
2565
2553
|
reloadAndReset: async (p) => {
|
|
2566
|
-
|
|
2554
|
+
g.value = !0, se({
|
|
2567
2555
|
current: 1,
|
|
2568
2556
|
pageSize: te?.pageSize || 10
|
|
2569
|
-
}), p && p?.callBack && (p.wait ? await p.callBack() : p.callBack()),
|
|
2557
|
+
}), p && p?.callBack && (p.wait ? await p.callBack() : p.callBack()), S.value?.resetForm(!0), g.value = !1;
|
|
2570
2558
|
},
|
|
2571
|
-
setPageInfo:
|
|
2559
|
+
setPageInfo: Ve,
|
|
2572
2560
|
setTableDataList: Ie,
|
|
2573
2561
|
setPagination: se,
|
|
2574
2562
|
operateTableDataRow: Se,
|
|
2575
2563
|
setLoading: z
|
|
2576
2564
|
})
|
|
2577
2565
|
}), () => {
|
|
2578
|
-
const p =
|
|
2566
|
+
const p = Ge(e.customRender || l.customRender), P = l.actions?.() || e.actionProps?.actions, I = gl({
|
|
2579
2567
|
slots: l,
|
|
2580
2568
|
props: e,
|
|
2581
2569
|
keys: ["headerTitle", "headerTitleTip", "listToolAfter"],
|
|
2582
2570
|
render: !0
|
|
2583
2571
|
});
|
|
2584
2572
|
return r(d("div", {
|
|
2585
|
-
ref:
|
|
2586
|
-
class:
|
|
2573
|
+
ref: u,
|
|
2574
|
+
class: A(o, s.value, e.class, e.classNames?.root, [{
|
|
2587
2575
|
[`${o}-no-scroll`]: !Object.keys(R(re) || {}).length,
|
|
2588
|
-
[`${o}-table-tree`]:
|
|
2576
|
+
[`${o}-table-tree`]: Te.value,
|
|
2589
2577
|
[`${o}-full-page`]: e.fitPage,
|
|
2590
|
-
[`${o}-full-screen`]:
|
|
2578
|
+
[`${o}-full-screen`]: H.value
|
|
2591
2579
|
}]),
|
|
2592
2580
|
style: {
|
|
2593
2581
|
...e.style,
|
|
2594
2582
|
...e.styles?.root || {}
|
|
2595
2583
|
}
|
|
2596
2584
|
}, [d("div", {
|
|
2597
|
-
class:
|
|
2585
|
+
class: A(`${o}-content`, s.value, e.classNames?.content),
|
|
2598
2586
|
style: e.styles?.content
|
|
2599
2587
|
}, [(Pe.value.length > 0 || !!l.form) && e.form !== !1 && d(Ql, {
|
|
2600
|
-
ref:
|
|
2588
|
+
ref: S,
|
|
2601
2589
|
modalScroll: e.modalScroll,
|
|
2602
2590
|
cardBordered: e.cardBordered,
|
|
2603
2591
|
formCols: Pe.value,
|
|
2604
2592
|
prefixCls: o,
|
|
2605
|
-
loading: R(
|
|
2606
|
-
onSearch:
|
|
2593
|
+
loading: R(k),
|
|
2594
|
+
onSearch: Yt,
|
|
2607
2595
|
defaultFormSearch: t.value
|
|
2608
2596
|
}, {
|
|
2609
2597
|
default: l.form ? () => l.form?.() : null
|
|
2610
2598
|
}), d("div", {
|
|
2611
|
-
ref:
|
|
2612
|
-
class:
|
|
2599
|
+
ref: ke,
|
|
2600
|
+
class: A(e.classNames?.card, s.value, `${o}-card`, e.cardBordered && `${o}-card-border`),
|
|
2613
2601
|
style: e.styles?.card
|
|
2614
2602
|
}, [d(ua, {
|
|
2615
2603
|
options: e.options ? {
|
|
@@ -2618,31 +2606,31 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge(
|
|
|
2618
2606
|
titleTipText: e.titleTipText,
|
|
2619
2607
|
actionsPlacement: e.actionProps?.placement,
|
|
2620
2608
|
actionsRender: P,
|
|
2621
|
-
headerTitle:
|
|
2622
|
-
listToolAfter:
|
|
2623
|
-
headerTitleTip:
|
|
2624
|
-
}, null), p ? d(
|
|
2609
|
+
headerTitle: I.headerTitle,
|
|
2610
|
+
listToolAfter: I.listToolAfter,
|
|
2611
|
+
headerTitleTip: I.headerTitleTip
|
|
2612
|
+
}, null), p ? d(It, rt.value, {
|
|
2625
2613
|
default: () => [d("div", {
|
|
2626
|
-
class:
|
|
2614
|
+
class: A(`${o}-list ${s.value}`, e.classNames?.list),
|
|
2627
2615
|
style: e.styles?.list
|
|
2628
2616
|
}, [d("div", {
|
|
2629
|
-
class:
|
|
2617
|
+
class: A(`${o}-list-content`, s.value, e.classNames?.listContent),
|
|
2630
2618
|
style: {
|
|
2631
2619
|
...e.styles?.listContent || {},
|
|
2632
|
-
height:
|
|
2620
|
+
height: Oe.value ? pe(Oe.value) : e.styles?.listContent?.height
|
|
2633
2621
|
}
|
|
2634
|
-
}, [
|
|
2635
|
-
class:
|
|
2622
|
+
}, [Vt()]), e.pagination !== !1 && ie.value?.length > 0 && d(Al, Q(ce(R(q)), {
|
|
2623
|
+
class: A(s.value, `${o}-pagination`, `${o}-pagination-${Wt.value}`, e.classNames?.pagination),
|
|
2636
2624
|
style: e.styles?.pagination,
|
|
2637
|
-
onChange: (D, W) =>
|
|
2625
|
+
onChange: (D, W) => Ve({
|
|
2638
2626
|
current: D,
|
|
2639
2627
|
pageSize: W
|
|
2640
2628
|
})
|
|
2641
2629
|
}), null)])]
|
|
2642
|
-
}) : d(we, null, [d(Nl, Q(Dl(e, Object.keys(
|
|
2630
|
+
}) : d(we, null, [d(Nl, Q(Dl(e, Object.keys(zt)), R(Ht), {
|
|
2643
2631
|
style: e.styles?.table,
|
|
2644
|
-
class:
|
|
2645
|
-
loading:
|
|
2632
|
+
class: A(e.classNames?.table, s.value, Lt.value && `${o}-overflow-hidden`),
|
|
2633
|
+
loading: rt.value,
|
|
2646
2634
|
rowKey: (D) => D[e.rowKey],
|
|
2647
2635
|
transformCellText: (D) => {
|
|
2648
2636
|
e.transformCellText && typeof e.transformCellText && e.transformCellText?.(D);
|
|
@@ -2655,93 +2643,93 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge(
|
|
|
2655
2643
|
if (J(G))
|
|
2656
2644
|
if (G.length === 0 || G.length === 1 && !ae(G[0])) {
|
|
2657
2645
|
G = G?.[0];
|
|
2658
|
-
const
|
|
2659
|
-
le =
|
|
2646
|
+
const Ee = bl(G, W?.columnEmptyText || e?.columnEmptyText || "");
|
|
2647
|
+
le = Ee.success, G = Ca(Ee.value, W?.valueType || e.columns?.find((Le) => (Le.key || Le.dataIndex) === _)?.valueType, o, s.value);
|
|
2660
2648
|
} else G[0]?.type === "template" && (G = G[0]?.children);
|
|
2661
|
-
return W?.ellipsis ?
|
|
2649
|
+
return W?.ellipsis ? kt(G, le, W) : G;
|
|
2662
2650
|
},
|
|
2663
2651
|
rowSelection: e.rowSelection ? {
|
|
2664
|
-
...
|
|
2665
|
-
selectedRowKeys:
|
|
2652
|
+
...ze(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2653
|
+
selectedRowKeys: i.value || [],
|
|
2666
2654
|
onSelect: C,
|
|
2667
2655
|
onSelectAll: c,
|
|
2668
|
-
onChange:
|
|
2656
|
+
onChange: b
|
|
2669
2657
|
} : void 0,
|
|
2670
|
-
onChange:
|
|
2671
|
-
onExpandedRowsChange:
|
|
2672
|
-
onExpand:
|
|
2673
|
-
onResizeColumn: (D, W) =>
|
|
2658
|
+
onChange: Ve,
|
|
2659
|
+
onExpandedRowsChange: Mt,
|
|
2660
|
+
onExpand: qt,
|
|
2661
|
+
onResizeColumn: (D, W) => Kt(D, W)
|
|
2674
2662
|
}), {
|
|
2675
2663
|
...l,
|
|
2676
|
-
emptyText: () =>
|
|
2677
|
-
}),
|
|
2678
|
-
to:
|
|
2664
|
+
emptyText: () => ut()
|
|
2665
|
+
}), it.value && !p && d(Qt, {
|
|
2666
|
+
to: it.value
|
|
2679
2667
|
}, {
|
|
2680
|
-
default: () => [d(
|
|
2681
|
-
ref:
|
|
2668
|
+
default: () => [d(aa, {
|
|
2669
|
+
ref: jt
|
|
2682
2670
|
}, null)]
|
|
2683
2671
|
})])])])]));
|
|
2684
2672
|
};
|
|
2685
2673
|
}
|
|
2686
2674
|
});
|
|
2687
|
-
|
|
2688
|
-
function Qa(e,
|
|
2675
|
+
Ze.install = (e) => (e.component(Ze.name, Ze), e);
|
|
2676
|
+
function Qa(e, a) {
|
|
2689
2677
|
function l() {
|
|
2690
|
-
const
|
|
2678
|
+
const v = {
|
|
2691
2679
|
params: {},
|
|
2692
2680
|
searchMap: []
|
|
2693
2681
|
};
|
|
2694
|
-
if (
|
|
2695
|
-
if (
|
|
2696
|
-
return ye(
|
|
2697
|
-
if (ne(
|
|
2698
|
-
return ye(
|
|
2682
|
+
if (a?.state) {
|
|
2683
|
+
if (_e(a.state) && ne(a.state.value))
|
|
2684
|
+
return ye(v, ee(a.state.value));
|
|
2685
|
+
if (ne(a.state) && !_e(a.state))
|
|
2686
|
+
return ye(v, ee(a.state));
|
|
2699
2687
|
}
|
|
2700
|
-
return
|
|
2688
|
+
return v;
|
|
2701
2689
|
}
|
|
2702
|
-
const
|
|
2703
|
-
request:
|
|
2690
|
+
const n = lt(ye(l(), {
|
|
2691
|
+
request: a?.request
|
|
2704
2692
|
}));
|
|
2705
|
-
|
|
2693
|
+
a?.state && K(() => a.state && _e(a.state) ? a.state.value : a.state, () => {
|
|
2706
2694
|
f();
|
|
2707
2695
|
}, { deep: !0 });
|
|
2708
|
-
const o = T(() => e.value ? e.value.actionRef() : {}), r = T(() => e.value ? e.value.formRef() : {}),
|
|
2696
|
+
const o = T(() => e.value ? e.value.actionRef() : {}), r = T(() => e.value ? e.value.formRef() : {}), s = T(() => ({
|
|
2709
2697
|
...o.value.pageInfo || {},
|
|
2710
2698
|
...r.value.getFormSearch?.() || {}
|
|
2711
|
-
})),
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
}),
|
|
2715
|
-
o.value?.setLoading?.(!!
|
|
2699
|
+
})), h = x(!!o.value.loading?.value);
|
|
2700
|
+
K(() => o.value.loading?.value, (v) => {
|
|
2701
|
+
h.value = !!v;
|
|
2702
|
+
}), K(h, (v) => {
|
|
2703
|
+
o.value?.setLoading?.(!!v);
|
|
2716
2704
|
});
|
|
2717
2705
|
function f() {
|
|
2718
|
-
Cl(
|
|
2706
|
+
Cl(n, l());
|
|
2719
2707
|
}
|
|
2720
|
-
function $(
|
|
2721
|
-
|
|
2708
|
+
function $(v, w) {
|
|
2709
|
+
n.searchMap && (n.searchMap = ee(n.searchMap).map((m) => m.name === v ? ye(m, w) : m));
|
|
2722
2710
|
}
|
|
2723
2711
|
return {
|
|
2724
2712
|
formRef: r,
|
|
2725
2713
|
actionRef: o,
|
|
2726
|
-
tableState:
|
|
2727
|
-
requestSearch:
|
|
2728
|
-
loading:
|
|
2714
|
+
tableState: n,
|
|
2715
|
+
requestSearch: s,
|
|
2716
|
+
loading: h,
|
|
2729
2717
|
dataSource: T(() => o?.value?.dataSource?.value || []),
|
|
2730
2718
|
selectedKeys: T(() => o?.value?.selectedKeys?.value || []),
|
|
2731
2719
|
selectedItems: T(() => o?.value?.selectedItems?.value || []),
|
|
2732
2720
|
rowsSelection: o?.value?.rowsSelection,
|
|
2733
|
-
setTableDataList: (
|
|
2734
|
-
reloadAndReset: (
|
|
2735
|
-
setPageInfo: (
|
|
2736
|
-
setPagination: (
|
|
2737
|
-
setLoading: (
|
|
2738
|
-
operateTableDataRow: (
|
|
2739
|
-
reload: (
|
|
2721
|
+
setTableDataList: (v) => o.value?.setTableDataList?.(v),
|
|
2722
|
+
reloadAndReset: (v) => o.value?.reloadAndReset?.(v),
|
|
2723
|
+
setPageInfo: (v, w, m, u) => o.value?.setPageInfo?.(v, w, m, u),
|
|
2724
|
+
setPagination: (v) => o.value?.setPagination?.(v),
|
|
2725
|
+
setLoading: (v) => h.value = v,
|
|
2726
|
+
operateTableDataRow: (v) => o.value?.operateTableDataRow?.(v),
|
|
2727
|
+
reload: (v) => o.value?.reload?.(v),
|
|
2740
2728
|
updateSearchMap: $
|
|
2741
2729
|
};
|
|
2742
2730
|
}
|
|
2743
2731
|
export {
|
|
2744
|
-
|
|
2732
|
+
Ze as GProTable,
|
|
2745
2733
|
he as proTableProps,
|
|
2746
2734
|
Qa as useTable
|
|
2747
2735
|
};
|