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