@gx-design-vue/pro-table 0.2.0-beta.138 → 0.2.0-beta.139
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 +17 -19
- package/dist/components/ListToolBar/index.d.ts +9 -9
- package/dist/components/ToolBar/index.d.ts +3 -6
- package/dist/pro-table.js +284 -286
- package/dist/pro-table.umd.cjs +2 -2
- package/dist/props.d.ts +6 -12
- package/dist/types/TableTypings.d.ts +2 -2
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.2.0-beta.
|
|
3
|
+
* Version: 0.2.0-beta.138
|
|
4
4
|
* Author: gx12358
|
|
5
5
|
* Copyright (C) 2024 gx12358
|
|
6
6
|
* License: MIT License
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
|
-
import { defineComponent as
|
|
13
|
-
import { UpOutlined as
|
|
12
|
+
import { defineComponent as we, ref as I, watch as z, cloneVNode as Qe, reactive as Ue, toRaw as re, computed as C, createVNode as s, Fragment as Ye, isVNode as _, mergeProps as W, h as st, unref as T, onActivated as ct, nextTick as At, getCurrentInstance as Ot, onMounted as jt, onUnmounted as Nt, onDeactivated as Yt, watchEffect as zt, toRef as M, isRef as He } from "vue";
|
|
13
|
+
import { UpOutlined as Lt, DownOutlined as Et, InfoCircleOutlined as Mt, FullscreenExitOutlined as Wt, FullscreenOutlined as kt, ReloadOutlined as Ht, CopyOutlined as qt } from "@ant-design/icons-vue";
|
|
14
14
|
import { useProAppContext as dt } from "@gx-design-vue/pro-app";
|
|
15
|
-
import { useBreakpoint as ft, useMemo as
|
|
15
|
+
import { useBreakpoint as ft, useMemo as Fe, tryOnUnmounted as Kt } from "@gx-design-vue/pro-hooks";
|
|
16
16
|
import { useContext as Vt, useProStyle as Je, unit as nt, useProConfigContext as Gt } from "@gx-design-vue/pro-provider";
|
|
17
|
-
import { isArray as K, cloneDeep as ee, isBoolean as Re, classNames as ae, isNumber as De, filterEmpty as mt, getPrefixCls as vt, isObject as Q, keysOf as ht, isDeepEqualReact as
|
|
17
|
+
import { isArray as K, cloneDeep as ee, isBoolean as Re, classNames as ae, isNumber as De, filterEmpty as mt, getPrefixCls as vt, isObject as Q, keysOf as ht, isDeepEqualReact as Le, compareArray as Xt, runFunction as _t, getSortIndex as Qt, isFunction as ze, handleCurrentPage as Ut, getRandomNumber as gt, deepMerge as Se, arrayRepeat as Jt, isString as pt, handleShowIndex as Zt, getSlot as it, convertValueBoolean as qe, getSlotsProps as el, handleEmptyField as tl, getTextWidth as ll, getSlotVNode as al, useDeepMerge as nl } from "@gx-design-vue/pro-utils";
|
|
18
18
|
import { useDebounceFn as il, useFullscreen as bt, useWindowSize as ol } from "@vueuse/core";
|
|
19
|
-
import { Grid as ul, DatePicker as yt, Space as ot, Input as Ne, TimePicker as rl, TreeSelect as sl, Select as cl, InputNumber as Ke, Button as ut, Spin as Ct, Tooltip as
|
|
20
|
-
import { omit as Ie, cloneDeep as xt, pick as
|
|
19
|
+
import { Grid as ul, DatePicker as yt, Space as ot, Input as Ne, TimePicker as rl, TreeSelect as sl, Select as cl, InputNumber as Ke, Button as ut, Spin as Ct, Tooltip as Te, theme as dl, Pagination as fl, Table as ml, message as vl, Empty as hl } from "ant-design-vue";
|
|
20
|
+
import { omit as Ie, cloneDeep as xt, pick as Ee } from "lodash-es";
|
|
21
21
|
import { tableProps as gl } from "ant-design-vue/es/table/Table";
|
|
22
22
|
import "ant-design-vue/es/_util/props-util";
|
|
23
23
|
import { warning as pl } from "ant-design-vue/es/vc-util/warning";
|
|
@@ -151,6 +151,12 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
151
151
|
placement: "right"
|
|
152
152
|
})
|
|
153
153
|
},
|
|
154
|
+
// 表格标题下方的内容
|
|
155
|
+
headerAfter: {
|
|
156
|
+
type: [Object, Function, Boolean, String, Array],
|
|
157
|
+
default: () => {
|
|
158
|
+
}
|
|
159
|
+
},
|
|
154
160
|
// 表格标题
|
|
155
161
|
headerTitle: {
|
|
156
162
|
type: [Object, Function, Boolean, String, Array],
|
|
@@ -158,7 +164,7 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
158
164
|
}
|
|
159
165
|
},
|
|
160
166
|
// 标题提示
|
|
161
|
-
|
|
167
|
+
headerTitleTip: {
|
|
162
168
|
type: [Object, Function, Boolean, String, Array],
|
|
163
169
|
default: () => {
|
|
164
170
|
}
|
|
@@ -178,17 +184,6 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
178
184
|
type: [Object, Boolean],
|
|
179
185
|
default: !1
|
|
180
186
|
},
|
|
181
|
-
/**
|
|
182
|
-
* @Author gx12358
|
|
183
|
-
* @DateTime 2022/2/8
|
|
184
|
-
* @lastTime 2022/2/8
|
|
185
|
-
* @description 列设置额外的元素
|
|
186
|
-
*/
|
|
187
|
-
settingExtra: {
|
|
188
|
-
type: [Object, Function, Array],
|
|
189
|
-
default: () => {
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
187
|
// 针对 keepalive 缓存的页面 是否重新reload
|
|
193
188
|
keepAliveReload: {
|
|
194
189
|
type: Boolean,
|
|
@@ -308,7 +303,7 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
308
303
|
onLoadingChange: Function,
|
|
309
304
|
onRequestError: Function,
|
|
310
305
|
onBeforeSearchSubmit: Function
|
|
311
|
-
}, Cl = /* @__PURE__ */
|
|
306
|
+
}, Cl = /* @__PURE__ */ we({
|
|
312
307
|
name: "RequestSelect",
|
|
313
308
|
props: {
|
|
314
309
|
fetch: Function,
|
|
@@ -333,10 +328,10 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
333
328
|
return z([() => e.fetch, () => e.manual], () => {
|
|
334
329
|
if (o.value !== "init" && n.value) return;
|
|
335
330
|
const d = e.manual ?? !1;
|
|
336
|
-
e.fetch && !d && (n.value = !0, i().then((
|
|
337
|
-
l.value = xt(
|
|
338
|
-
}).catch((
|
|
339
|
-
console.error(
|
|
331
|
+
e.fetch && !d && (n.value = !0, i().then((m) => {
|
|
332
|
+
l.value = xt(m), o.value = "success";
|
|
333
|
+
}).catch((m) => {
|
|
334
|
+
console.error(m), o.value = "error";
|
|
340
335
|
}).finally(() => {
|
|
341
336
|
n.value = !1;
|
|
342
337
|
}));
|
|
@@ -470,7 +465,7 @@ const Sl = (e) => ({
|
|
|
470
465
|
function fe(e, a) {
|
|
471
466
|
return typeof a == "function" ? a(V(e)) : V(e).format(a);
|
|
472
467
|
}
|
|
473
|
-
function
|
|
468
|
+
function Pe(e, a) {
|
|
474
469
|
return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
475
470
|
}
|
|
476
471
|
const rt = (e, a, l = "string") => {
|
|
@@ -478,22 +473,22 @@ const rt = (e, a, l = "string") => {
|
|
|
478
473
|
const [n, o] = e;
|
|
479
474
|
let i, d;
|
|
480
475
|
if (Array.isArray(a) ? (i = a[0], d = a[1]) : typeof a == "object" && a.type === "mask" ? (i = a.format, d = a.format) : (i = a, d = a), l === "string") {
|
|
481
|
-
const
|
|
482
|
-
return [
|
|
476
|
+
const m = n ? fe(n, i) : "", p = o ? fe(o, d) : "";
|
|
477
|
+
return [m, p];
|
|
483
478
|
}
|
|
484
479
|
return [V(n), V(o)];
|
|
485
480
|
}
|
|
486
481
|
};
|
|
487
|
-
function
|
|
482
|
+
function Tl(e) {
|
|
488
483
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !_(e);
|
|
489
484
|
}
|
|
490
485
|
const {
|
|
491
|
-
useBreakpoint:
|
|
486
|
+
useBreakpoint: wl
|
|
492
487
|
} = ul, {
|
|
493
488
|
MonthPicker: Rl,
|
|
494
489
|
RangePicker: $l,
|
|
495
|
-
YearPicker:
|
|
496
|
-
WeekPicker:
|
|
490
|
+
YearPicker: Pl,
|
|
491
|
+
WeekPicker: Fl,
|
|
497
492
|
QuarterPicker: Dl
|
|
498
493
|
} = yt;
|
|
499
494
|
function Il(e) {
|
|
@@ -516,7 +511,7 @@ const Bl = {
|
|
|
516
511
|
default: () => ({})
|
|
517
512
|
},
|
|
518
513
|
onSearch: Function
|
|
519
|
-
},
|
|
514
|
+
}, Al = /* @__PURE__ */ we({
|
|
520
515
|
name: "ProTableForm",
|
|
521
516
|
inheritAttrs: !1,
|
|
522
517
|
props: Bl,
|
|
@@ -527,15 +522,15 @@ const Bl = {
|
|
|
527
522
|
const {
|
|
528
523
|
wrapSSR: n,
|
|
529
524
|
hashId: o
|
|
530
|
-
} = Je("ProTableForm", [Sl], e.prefixCls), i = dt(), d =
|
|
531
|
-
formAutoRequest:
|
|
525
|
+
} = Je("ProTableForm", [Sl], e.prefixCls), i = dt(), d = wl(), {
|
|
526
|
+
formAutoRequest: m,
|
|
532
527
|
formConfig: p,
|
|
533
|
-
formActions:
|
|
528
|
+
formActions: F
|
|
534
529
|
} = Ze(), {
|
|
535
530
|
formState: r,
|
|
536
531
|
resetFormState: B,
|
|
537
532
|
changeFormState: h
|
|
538
|
-
} = xl(e.defaultFormSearch, e.formCols), f = I(p.value?.collapsed ?? p.value?.defaultCollapsed), x = C(() => Re(
|
|
533
|
+
} = xl(e.defaultFormSearch, e.formCols), f = I(p.value?.collapsed ?? p.value?.defaultCollapsed), x = C(() => Re(F.value?.reset) ? F.value?.reset : !m.value), b = C(() => oe(p.value?.span)), j = C(() => p.value?.label);
|
|
539
534
|
z(() => p.value?.collapsed, (t) => {
|
|
540
535
|
f.value = t;
|
|
541
536
|
});
|
|
@@ -562,8 +557,8 @@ const Bl = {
|
|
|
562
557
|
const t = xt(r), u = e.formCols.find((R) => R.valueType === "text") || "", y = e.formCols.find((R) => R.valueType === "dateRange") || "", g = e.formCols.find((R) => R.valueType === "treeSelect");
|
|
563
558
|
return u && (t[u.name] = r[u.name] || u.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]), g && (g?.name && K(r[g?.name]) && (t[g.name] = r[g.name].length ? r[g.name].map((R) => R[g.valueKey === "text" ? "label" : "value"]).join() : ""), g?.name && K(t[g?.name]) && (t[g.name] = t[g.name].length ? t[g.name].map((R) => R[g.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
564
559
|
}, le = (t = !1, u) => {
|
|
565
|
-
(
|
|
566
|
-
},
|
|
560
|
+
(m.value || t) && e.onSearch?.(pe(), t ? u ? "reset" : "submit" : void 0);
|
|
561
|
+
}, A = (t, u, y) => {
|
|
567
562
|
const g = r[u.name || ""];
|
|
568
563
|
switch (u.valueType) {
|
|
569
564
|
case "text":
|
|
@@ -582,7 +577,7 @@ const Bl = {
|
|
|
582
577
|
h(u.name || "", t ?? (u.field?.treeCheckable || u.field?.multiple ? [] : null));
|
|
583
578
|
break;
|
|
584
579
|
case "date":
|
|
585
|
-
h(u.name || "", t ? fe(t,
|
|
580
|
+
h(u.name || "", t ? fe(t, Pe(u.valueFormat, u.showTime)) : null);
|
|
586
581
|
break;
|
|
587
582
|
case "dateWeek":
|
|
588
583
|
h(u.name || "", t ? fe(t, "YYYY-wo") : null);
|
|
@@ -597,7 +592,7 @@ const Bl = {
|
|
|
597
592
|
h(u.name || "", t ? fe(t, "YYYY") : null);
|
|
598
593
|
break;
|
|
599
594
|
case "dateRange":
|
|
600
|
-
h(u.name || "", t && K(t) && t.length === 2 ? rt(t,
|
|
595
|
+
h(u.name || "", t && K(t) && t.length === 2 ? rt(t, Pe(u.valueFormat, u.showTime)) : null);
|
|
601
596
|
break;
|
|
602
597
|
case "time":
|
|
603
598
|
h(u.name || "", t ? fe(t, u.valueFormat || "HH:mm:ss") : null);
|
|
@@ -619,17 +614,17 @@ const Bl = {
|
|
|
619
614
|
class: ae(`${e.prefixCls}-search-empty-text`, o.value)
|
|
620
615
|
}, [u ? y : K(y) ? y.map((g) => Qe(g)) : void 0]);
|
|
621
616
|
}
|
|
622
|
-
}, G = () => (!
|
|
617
|
+
}, G = () => (!m.value || x.value) && s(ot, null, {
|
|
623
618
|
default: () => [x.value && s(ut, {
|
|
624
619
|
onClick: () => me()
|
|
625
620
|
}, {
|
|
626
|
-
default: () => [
|
|
627
|
-
}), !
|
|
621
|
+
default: () => [F.value?.resetText || "重置"]
|
|
622
|
+
}), !m.value && s(ut, {
|
|
628
623
|
loading: e.loading,
|
|
629
624
|
type: "primary",
|
|
630
625
|
onClick: () => le(!0)
|
|
631
626
|
}, {
|
|
632
|
-
default: () => [
|
|
627
|
+
default: () => [F.value?.searchText || "查询"]
|
|
633
628
|
})]
|
|
634
629
|
}), U = ({
|
|
635
630
|
formItemStyle: t,
|
|
@@ -644,7 +639,7 @@ const Bl = {
|
|
|
644
639
|
default: () => [G(), p.value?.collapseRender !== !1 && y && s(Ye, null, [typeof p.value?.collapseRender == "function" ? p.value?.collapseRender(u) : s("span", {
|
|
645
640
|
class: `${e.prefixCls}-a ${o.value}`,
|
|
646
641
|
onClick: () => te(!u)
|
|
647
|
-
}, [u ? "收起" : "展开", u ? s(
|
|
642
|
+
}, [u ? "收起" : "展开", u ? s(Lt, null, null) : s(Et, null, null)])])]
|
|
648
643
|
})]);
|
|
649
644
|
function ne(t) {
|
|
650
645
|
return t === void 0 ? void 0 : t ? s(Ct, {
|
|
@@ -656,13 +651,13 @@ const Bl = {
|
|
|
656
651
|
return s(Cl, W(t.request, {
|
|
657
652
|
loading: t.loading,
|
|
658
653
|
notFoundContent: ne
|
|
659
|
-
}),
|
|
654
|
+
}), Tl(u) ? u : {
|
|
660
655
|
default: () => [u]
|
|
661
656
|
});
|
|
662
657
|
}
|
|
663
658
|
const J = (t) => {
|
|
664
659
|
let u;
|
|
665
|
-
const y =
|
|
660
|
+
const y = m.value ? Ne.Search : Ne, g = Ie(t.field || {}, "rules");
|
|
666
661
|
let R = null;
|
|
667
662
|
switch (t.valueType) {
|
|
668
663
|
case "text":
|
|
@@ -673,7 +668,7 @@ const Bl = {
|
|
|
673
668
|
value: r[t.name],
|
|
674
669
|
placeholder: t.placeholder || "请输入",
|
|
675
670
|
allowClear: t.allowClear ?? !0,
|
|
676
|
-
onChange: (c) =>
|
|
671
|
+
onChange: (c) => A(c.target.value, t),
|
|
677
672
|
onSearch: (c) => le()
|
|
678
673
|
}, g), null);
|
|
679
674
|
break;
|
|
@@ -684,7 +679,7 @@ const Bl = {
|
|
|
684
679
|
},
|
|
685
680
|
value: r[t.name],
|
|
686
681
|
placeholder: t.placeholder || "请输入",
|
|
687
|
-
onChange: (c) =>
|
|
682
|
+
onChange: (c) => A(c, t)
|
|
688
683
|
}, g), null);
|
|
689
684
|
break;
|
|
690
685
|
case "numberRange":
|
|
@@ -694,7 +689,7 @@ const Bl = {
|
|
|
694
689
|
}, {
|
|
695
690
|
default: () => [s(Ke, {
|
|
696
691
|
value: r[t.name]?.[0],
|
|
697
|
-
onChange: (c) =>
|
|
692
|
+
onChange: (c) => A(c, t, {
|
|
698
693
|
key: 0
|
|
699
694
|
}),
|
|
700
695
|
placeholder: K(t.placeholder) && t.placeholder?.[0] || "请输入"
|
|
@@ -703,7 +698,7 @@ const Bl = {
|
|
|
703
698
|
placeholder: "~"
|
|
704
699
|
}, null), s(Ke, {
|
|
705
700
|
value: r[t.name]?.[1],
|
|
706
|
-
onChange: (c) =>
|
|
701
|
+
onChange: (c) => A(c, t, {
|
|
707
702
|
key: 1
|
|
708
703
|
}),
|
|
709
704
|
placeholder: K(t.placeholder) && t.placeholder?.[1] || "请输入"
|
|
@@ -722,7 +717,7 @@ const Bl = {
|
|
|
722
717
|
allowClear: t.allowClear ?? !0,
|
|
723
718
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
724
719
|
notFoundContent: ne(t.loading),
|
|
725
|
-
onChange: (c) =>
|
|
720
|
+
onChange: (c) => A(c, t),
|
|
726
721
|
options: t.loading ? [] : t?.valueEnum || []
|
|
727
722
|
}, g), null);
|
|
728
723
|
break;
|
|
@@ -737,7 +732,7 @@ const Bl = {
|
|
|
737
732
|
treeData: t.loading ? [] : t.valueEnum || [],
|
|
738
733
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
739
734
|
notFoundContent: ne(t.loading),
|
|
740
|
-
onChange: (c) =>
|
|
735
|
+
onChange: (c) => A(c, t)
|
|
741
736
|
}, g), null);
|
|
742
737
|
break;
|
|
743
738
|
case "date":
|
|
@@ -749,14 +744,14 @@ const Bl = {
|
|
|
749
744
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
750
745
|
placeholder: t.placeholder || "请选择",
|
|
751
746
|
allowClear: t.allowClear ?? !0,
|
|
752
|
-
format:
|
|
747
|
+
format: Pe(t.valueFormat, t.showTime),
|
|
753
748
|
showTime: t.showTime,
|
|
754
749
|
showToday: t.showToday || !0,
|
|
755
|
-
onChange: (c) =>
|
|
750
|
+
onChange: (c) => A(c, t)
|
|
756
751
|
}, g), null);
|
|
757
752
|
break;
|
|
758
753
|
case "dateWeek":
|
|
759
|
-
u = s(
|
|
754
|
+
u = s(Fl, W({
|
|
760
755
|
style: {
|
|
761
756
|
width: "100%"
|
|
762
757
|
},
|
|
@@ -764,7 +759,7 @@ const Bl = {
|
|
|
764
759
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
765
760
|
allowClear: t.allowClear ?? !0,
|
|
766
761
|
placeholder: t.placeholder || "请选择",
|
|
767
|
-
onChange: (c) =>
|
|
762
|
+
onChange: (c) => A(c, t)
|
|
768
763
|
}, g), null);
|
|
769
764
|
break;
|
|
770
765
|
case "dateMonth":
|
|
@@ -776,7 +771,7 @@ const Bl = {
|
|
|
776
771
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
777
772
|
allowClear: t.allowClear ?? !0,
|
|
778
773
|
placeholder: t.placeholder || "请选择",
|
|
779
|
-
onChange: (c) =>
|
|
774
|
+
onChange: (c) => A(c, t)
|
|
780
775
|
}, g), null);
|
|
781
776
|
break;
|
|
782
777
|
case "dateQuarter":
|
|
@@ -788,11 +783,11 @@ const Bl = {
|
|
|
788
783
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
789
784
|
allowClear: t.allowClear ?? !0,
|
|
790
785
|
placeholder: t.placeholder || "请选择",
|
|
791
|
-
onChange: (c) =>
|
|
786
|
+
onChange: (c) => A(c, t)
|
|
792
787
|
}, g), null);
|
|
793
788
|
break;
|
|
794
789
|
case "dateYear":
|
|
795
|
-
u = s(
|
|
790
|
+
u = s(Pl, W({
|
|
796
791
|
style: {
|
|
797
792
|
width: "100%"
|
|
798
793
|
},
|
|
@@ -800,7 +795,7 @@ const Bl = {
|
|
|
800
795
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
801
796
|
allowClear: t.allowClear ?? !0,
|
|
802
797
|
placeholder: t.placeholder || "请选择",
|
|
803
|
-
onChange: (c) =>
|
|
798
|
+
onChange: (c) => A(c, t)
|
|
804
799
|
}, g), null);
|
|
805
800
|
break;
|
|
806
801
|
case "dateRange":
|
|
@@ -808,12 +803,12 @@ const Bl = {
|
|
|
808
803
|
style: {
|
|
809
804
|
width: "100%"
|
|
810
805
|
},
|
|
811
|
-
value: r[t.name] && K(r[t.name]) && r[t.name]?.length === 2 ? rt(r[t.name],
|
|
806
|
+
value: r[t.name] && K(r[t.name]) && r[t.name]?.length === 2 ? rt(r[t.name], Pe(t.valueFormat, t.showTime), "dayjs") : void 0,
|
|
812
807
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
813
808
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
814
|
-
format:
|
|
809
|
+
format: Pe(t.valueFormat, t.showTime),
|
|
815
810
|
showTime: t.showTime,
|
|
816
|
-
onChange: (c) =>
|
|
811
|
+
onChange: (c) => A(c, t)
|
|
817
812
|
}, g), null);
|
|
818
813
|
break;
|
|
819
814
|
case "time":
|
|
@@ -827,7 +822,7 @@ const Bl = {
|
|
|
827
822
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
828
823
|
use12Hours: t.use12Hours,
|
|
829
824
|
format: t.valueFormat || "HH:mm:ss",
|
|
830
|
-
onChange: (c) =>
|
|
825
|
+
onChange: (c) => A(c, t)
|
|
831
826
|
}, g), null);
|
|
832
827
|
break;
|
|
833
828
|
}
|
|
@@ -836,15 +831,15 @@ const Bl = {
|
|
|
836
831
|
formItemStyle: t = {},
|
|
837
832
|
item: u
|
|
838
833
|
}) => {
|
|
839
|
-
const y = _(u) ? u.props?.label : u.label, g = (_(u) ? u.props?.labelWidth : u.labelWidth) ||
|
|
834
|
+
const y = _(u) ? u.props?.label : u.label, g = (_(u) ? u.props?.labelWidth : u.labelWidth) || j.value?.width, R = (_(u) ? u.props?.labelAlign : u.labelAlign) || j.value?.align;
|
|
840
835
|
return s("div", {
|
|
841
836
|
class: `${e.prefixCls}-search-item`,
|
|
842
837
|
style: {
|
|
843
838
|
...t,
|
|
844
|
-
gap:
|
|
839
|
+
gap: j.value?.gap ? nt(j.value?.gap) : void 0
|
|
845
840
|
}
|
|
846
841
|
}, [y && s("div", {
|
|
847
|
-
class: ae(`${e.prefixCls}-search-item-label`,
|
|
842
|
+
class: ae(`${e.prefixCls}-search-item-label`, j.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, R && `${e.prefixCls}-search-item-label-${R}`),
|
|
848
843
|
style: {
|
|
849
844
|
width: g ? nt(g) : void 0
|
|
850
845
|
}
|
|
@@ -895,7 +890,7 @@ const Bl = {
|
|
|
895
890
|
}, [se()]));
|
|
896
891
|
};
|
|
897
892
|
}
|
|
898
|
-
}),
|
|
893
|
+
}), Ol = (e) => ({
|
|
899
894
|
[`${e.componentCls}`]: {
|
|
900
895
|
lineHeight: 1,
|
|
901
896
|
"&-container": {
|
|
@@ -967,7 +962,7 @@ const Bl = {
|
|
|
967
962
|
}
|
|
968
963
|
}
|
|
969
964
|
});
|
|
970
|
-
function
|
|
965
|
+
function jl(e) {
|
|
971
966
|
if (_(e))
|
|
972
967
|
return e;
|
|
973
968
|
if (e) {
|
|
@@ -977,7 +972,7 @@ function Al(e) {
|
|
|
977
972
|
onClick: o,
|
|
978
973
|
key: i
|
|
979
974
|
} = a;
|
|
980
|
-
return l && n ? s(
|
|
975
|
+
return l && n ? s(Te, {
|
|
981
976
|
title: n,
|
|
982
977
|
key: i
|
|
983
978
|
}, {
|
|
@@ -991,13 +986,13 @@ function Al(e) {
|
|
|
991
986
|
}
|
|
992
987
|
return null;
|
|
993
988
|
}
|
|
994
|
-
const
|
|
989
|
+
const Tt = /* @__PURE__ */ we({
|
|
995
990
|
props: {
|
|
996
991
|
actions: [Array],
|
|
997
992
|
settings: [Array],
|
|
998
|
-
titleTip: ge.titleTip,
|
|
999
993
|
prefixCls: String,
|
|
1000
994
|
headerTitle: ge.headerTitle,
|
|
995
|
+
headerTitleTip: ge.headerTitleTip,
|
|
1001
996
|
titleTipText: ge.titleTipText,
|
|
1002
997
|
actionsPlacement: String
|
|
1003
998
|
},
|
|
@@ -1005,9 +1000,9 @@ const wt = /* @__PURE__ */ Te({
|
|
|
1005
1000
|
const {
|
|
1006
1001
|
wrapSSR: a,
|
|
1007
1002
|
hashId: l
|
|
1008
|
-
} = Je("ListToolBar", [
|
|
1003
|
+
} = Je("ListToolBar", [Ol], e.prefixCls), n = ft(), {
|
|
1009
1004
|
isMobile: o
|
|
1010
|
-
} = Ze(), i = C(() => !!(e.
|
|
1005
|
+
} = Ze(), i = C(() => !!(e.headerTitleTip || e.headerTitle)), d = Fe(() => {
|
|
1011
1006
|
if (!Array.isArray(e.actions) || e.actions?.length < 1)
|
|
1012
1007
|
return {
|
|
1013
1008
|
left: null,
|
|
@@ -1022,8 +1017,8 @@ const wt = /* @__PURE__ */ Te({
|
|
|
1022
1017
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
1023
1018
|
}, [f]) : null
|
|
1024
1019
|
};
|
|
1025
|
-
}, [() => e.actions, () => e.actionsPlacement]),
|
|
1026
|
-
if (!
|
|
1020
|
+
}, [() => e.actions, () => e.actionsPlacement]), m = C(() => !!(e.headerTitleTip || e.headerTitle || d.value.left)), p = C(() => !!(e.settings?.length || d.value.right)), F = Fe(() => {
|
|
1021
|
+
if (!m.value && p.value)
|
|
1027
1022
|
return s("div", {
|
|
1028
1023
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1029
1024
|
}, null);
|
|
@@ -1032,14 +1027,14 @@ const wt = /* @__PURE__ */ Te({
|
|
|
1032
1027
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1033
1028
|
}, [s("div", {
|
|
1034
1029
|
class: `${e.prefixCls}-title ${l.value}`
|
|
1035
|
-
}, [e.headerTitle, e.
|
|
1030
|
+
}, [e.headerTitle, e.headerTitleTip && s(Te, {
|
|
1036
1031
|
title: e.titleTipText
|
|
1037
1032
|
}, {
|
|
1038
|
-
default: () => [Re(e.
|
|
1033
|
+
default: () => [Re(e.headerTitleTip) && e.headerTitleTip ? s(Mt, null, null) : e.headerTitleTip]
|
|
1039
1034
|
})]), h]) : s("div", {
|
|
1040
1035
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1041
1036
|
}, [h]);
|
|
1042
|
-
}, [() =>
|
|
1037
|
+
}, [() => m.value, () => p.value, () => i.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.headerTitleTip]), r = Fe(() => {
|
|
1043
1038
|
if (!p.value) return null;
|
|
1044
1039
|
const h = d.value.right;
|
|
1045
1040
|
return s("div", {
|
|
@@ -1051,14 +1046,14 @@ const wt = /* @__PURE__ */ Te({
|
|
|
1051
1046
|
}, [h, e.settings?.length ? s("div", {
|
|
1052
1047
|
class: ae(`${e.prefixCls}-setting-items`, l.value)
|
|
1053
1048
|
}, [e.settings.map((f, x) => {
|
|
1054
|
-
const b =
|
|
1049
|
+
const b = jl(f);
|
|
1055
1050
|
return s("div", {
|
|
1056
1051
|
key: x,
|
|
1057
1052
|
class: ae(`${e.prefixCls}-setting-item`, l.value)
|
|
1058
1053
|
}, [b]);
|
|
1059
1054
|
})]) : null]);
|
|
1060
|
-
}, [() => n.value, () => p.value, () => e.prefixCls, () => i.value, () => d.value, () => e.settings]), B =
|
|
1061
|
-
if (!p.value && !
|
|
1055
|
+
}, [() => n.value, () => p.value, () => e.prefixCls, () => i.value, () => d.value, () => e.settings]), B = Fe(() => {
|
|
1056
|
+
if (!p.value && !m.value) return null;
|
|
1062
1057
|
const h = {
|
|
1063
1058
|
[`${l.value}`]: !0,
|
|
1064
1059
|
[`${e.prefixCls}-container`]: !0,
|
|
@@ -1066,24 +1061,24 @@ const wt = /* @__PURE__ */ Te({
|
|
|
1066
1061
|
};
|
|
1067
1062
|
return s("div", {
|
|
1068
1063
|
class: h
|
|
1069
|
-
}, [
|
|
1070
|
-
}, [() => o.value, () =>
|
|
1064
|
+
}, [F.value, r.value]);
|
|
1065
|
+
}, [() => o.value, () => m.value, () => p.value, () => F.value, () => e.prefixCls, () => r.value]);
|
|
1071
1066
|
return () => a(s("div", {
|
|
1072
1067
|
class: `${e.prefixCls} ${l.value}`
|
|
1073
1068
|
}, [B.value]));
|
|
1074
1069
|
}
|
|
1075
1070
|
});
|
|
1076
|
-
|
|
1077
|
-
const
|
|
1071
|
+
Tt.inheritAttrs = !1;
|
|
1072
|
+
const wt = /* @__PURE__ */ we({
|
|
1078
1073
|
setup() {
|
|
1079
1074
|
const {
|
|
1080
1075
|
isFullscreen: e
|
|
1081
1076
|
} = bt();
|
|
1082
|
-
return () => e.value ? s(
|
|
1077
|
+
return () => e.value ? s(Te, {
|
|
1083
1078
|
title: "退出全屏"
|
|
1084
1079
|
}, {
|
|
1085
1080
|
default: () => [s(Wt, null, null)]
|
|
1086
|
-
}) : s(
|
|
1081
|
+
}) : s(Te, {
|
|
1087
1082
|
title: "全屏"
|
|
1088
1083
|
}, {
|
|
1089
1084
|
default: () => [s(kt, null, null)]
|
|
@@ -1098,7 +1093,7 @@ function Nl() {
|
|
|
1098
1093
|
},
|
|
1099
1094
|
fullScreen: {
|
|
1100
1095
|
text: "全屏",
|
|
1101
|
-
icon: s(
|
|
1096
|
+
icon: s(wt, null, null)
|
|
1102
1097
|
}
|
|
1103
1098
|
};
|
|
1104
1099
|
}
|
|
@@ -1113,12 +1108,12 @@ function Yl(e, a) {
|
|
|
1113
1108
|
return s("span", {
|
|
1114
1109
|
key: l,
|
|
1115
1110
|
onClick: o
|
|
1116
|
-
}, [s(
|
|
1111
|
+
}, [s(wt, null, null)]);
|
|
1117
1112
|
const i = Nl()[l];
|
|
1118
1113
|
return i ? s("span", {
|
|
1119
1114
|
key: l,
|
|
1120
1115
|
onClick: o
|
|
1121
|
-
}, [s(
|
|
1116
|
+
}, [s(Te, {
|
|
1122
1117
|
title: i.text
|
|
1123
1118
|
}, {
|
|
1124
1119
|
default: () => [i.icon]
|
|
@@ -1128,12 +1123,11 @@ function Yl(e, a) {
|
|
|
1128
1123
|
const zl = {
|
|
1129
1124
|
options: [Boolean, Object, Array],
|
|
1130
1125
|
actionsPlacement: [String],
|
|
1131
|
-
|
|
1132
|
-
settingExtra: [Function, Boolean, Object, Array],
|
|
1126
|
+
headerTitleTip: [Function, Boolean, Object, String],
|
|
1133
1127
|
titleTipText: [String],
|
|
1134
1128
|
actionsRender: [Array],
|
|
1135
1129
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
1136
|
-
},
|
|
1130
|
+
}, Ll = /* @__PURE__ */ we({
|
|
1137
1131
|
props: zl,
|
|
1138
1132
|
inheritAttrs: !1,
|
|
1139
1133
|
setup(e) {
|
|
@@ -1142,29 +1136,29 @@ const zl = {
|
|
|
1142
1136
|
isPor: !0
|
|
1143
1137
|
}), {
|
|
1144
1138
|
action: l
|
|
1145
|
-
} = Ze(), n =
|
|
1139
|
+
} = Ze(), n = Fe(() => e.options === !1 ? [] : Yl({
|
|
1146
1140
|
reload: () => l?.reload(),
|
|
1147
1141
|
fullScreen: () => l?.toggle()
|
|
1148
1142
|
}, Q(e.options) ? e.options : {}), [() => e.options]);
|
|
1149
1143
|
return () => {
|
|
1150
1144
|
const o = e.actionsRender || [];
|
|
1151
|
-
return s(
|
|
1145
|
+
return s(Tt, {
|
|
1152
1146
|
prefixCls: a,
|
|
1153
|
-
headerTitle: e.headerTitle,
|
|
1154
1147
|
actions: o,
|
|
1155
1148
|
actionsPlacement: e.actionsPlacement,
|
|
1156
|
-
settings:
|
|
1157
|
-
|
|
1149
|
+
settings: T(n),
|
|
1150
|
+
headerTitle: e.headerTitle,
|
|
1151
|
+
headerTitleTip: e.headerTitleTip,
|
|
1158
1152
|
titleTipText: e.titleTipText
|
|
1159
1153
|
}, null);
|
|
1160
1154
|
};
|
|
1161
1155
|
}
|
|
1162
1156
|
});
|
|
1163
|
-
function
|
|
1164
|
-
return
|
|
1157
|
+
function El(e) {
|
|
1158
|
+
return Ot();
|
|
1165
1159
|
}
|
|
1166
1160
|
function Ml(e, a = !0, l) {
|
|
1167
|
-
|
|
1161
|
+
El() ? ct(e, l) : a ? e() : At(e);
|
|
1168
1162
|
}
|
|
1169
1163
|
function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o, neverScroll: i }) {
|
|
1170
1164
|
const d = I([]);
|
|
@@ -1177,14 +1171,14 @@ function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
|
|
|
1177
1171
|
() => o.value,
|
|
1178
1172
|
() => i.value
|
|
1179
1173
|
], () => {
|
|
1180
|
-
const h =
|
|
1181
|
-
|
|
1174
|
+
const h = F(re(a.value));
|
|
1175
|
+
Le(h, re(d.value)) || (d.value = ee(h));
|
|
1182
1176
|
}, {
|
|
1183
1177
|
deep: !0,
|
|
1184
1178
|
immediate: !0
|
|
1185
1179
|
});
|
|
1186
|
-
const
|
|
1187
|
-
const h = p(
|
|
1180
|
+
const m = C(() => {
|
|
1181
|
+
const h = p(T(d).filter((b) => b.fixed === "left")), f = p(T(d).filter((b) => b.fixed !== "left" && b.fixed !== "right")), x = p(T(d).filter((b) => b.fixed === "right"));
|
|
1188
1182
|
return [
|
|
1189
1183
|
...h,
|
|
1190
1184
|
...f,
|
|
@@ -1194,15 +1188,15 @@ function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
|
|
|
1194
1188
|
function p(h) {
|
|
1195
1189
|
return h.sort((f, x) => Xt(f, x, "order", 0));
|
|
1196
1190
|
}
|
|
1197
|
-
function
|
|
1191
|
+
function F(h) {
|
|
1198
1192
|
return ee(h).map((f, x) => {
|
|
1199
|
-
if (f.dataIndex === "action" || x === h.length - 1 ? f.resizable = !1 : f.resizable = Re(f.resizable) ? f.resizable : !!(De(f.width) &&
|
|
1193
|
+
if (f.dataIndex === "action" || x === h.length - 1 ? f.resizable = !1 : f.resizable = Re(f.resizable) ? f.resizable : !!(De(f.width) && T(n)), !f.width || T(i))
|
|
1200
1194
|
return f;
|
|
1201
|
-
if (f.dataIndex === "action" &&
|
|
1202
|
-
if (
|
|
1195
|
+
if (f.dataIndex === "action" && T(o))
|
|
1196
|
+
if (T(e)?.x || !T(l))
|
|
1203
1197
|
f.width = f.width || 100, f.fixed = "right";
|
|
1204
1198
|
else {
|
|
1205
|
-
const b =
|
|
1199
|
+
const b = T(a).find((j) => j.dataIndex === f.dataIndex);
|
|
1206
1200
|
f.width = b?.width || "", f.fixed = b?.fixed;
|
|
1207
1201
|
}
|
|
1208
1202
|
return f;
|
|
@@ -1216,11 +1210,11 @@ function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
|
|
|
1216
1210
|
d.value = [];
|
|
1217
1211
|
return;
|
|
1218
1212
|
}
|
|
1219
|
-
|
|
1213
|
+
Le(F(h), re(d.value)) || (d.value = F(h));
|
|
1220
1214
|
}
|
|
1221
1215
|
return {
|
|
1222
1216
|
breakpoint: l,
|
|
1223
|
-
proColumns:
|
|
1217
|
+
proColumns: m,
|
|
1224
1218
|
setColumns: B,
|
|
1225
1219
|
resizeColumnWidth: r
|
|
1226
1220
|
};
|
|
@@ -1230,10 +1224,10 @@ function kl(e, a) {
|
|
|
1230
1224
|
function i() {
|
|
1231
1225
|
n.value && (clearTimeout(n.value), n.value = null);
|
|
1232
1226
|
}
|
|
1233
|
-
async function d(...
|
|
1234
|
-
return l.value === 0 || l.value === void 0 ? o.value(...
|
|
1235
|
-
|
|
1236
|
-
p(await o.value(...
|
|
1227
|
+
async function d(...m) {
|
|
1228
|
+
return l.value === 0 || l.value === void 0 ? o.value(...m) : (i(), new Promise(async (p) => {
|
|
1229
|
+
m[0]?.immediate ? p(await o.value(...m)) : n.value = setTimeout(async () => {
|
|
1230
|
+
p(await o.value(...m));
|
|
1237
1231
|
}, l.value);
|
|
1238
1232
|
}));
|
|
1239
1233
|
}
|
|
@@ -1254,9 +1248,9 @@ function Hl(e) {
|
|
|
1254
1248
|
autoRequest: i
|
|
1255
1249
|
};
|
|
1256
1250
|
}
|
|
1257
|
-
function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, dataSource: i, waitRequest: d, debounceTime:
|
|
1258
|
-
const le = I(""),
|
|
1259
|
-
(
|
|
1251
|
+
function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, dataSource: i, waitRequest: d, debounceTime: m }, { params: p, columns: F, setLoading: r, setColumns: B, removeRowKeys: h, syncSelectedRows: f, defaultFormSearch: x, setPagination: b, pageInfo: j, onRequestError: oe, onBeforeSearchSubmit: te, hasCustomRender: $e }, pe) {
|
|
1252
|
+
const le = I(""), A = I(!1), me = I(!1), Y = I([]), G = I(), U = I(null), ne = ($ = !1) => {
|
|
1253
|
+
(A.value || $) && r(!1), y(!1);
|
|
1260
1254
|
}, be = async ($ = {}) => {
|
|
1261
1255
|
const { pagination: N, filters: D = {}, sorter: k = {}, removeKeys: ue = [], isPolling: Z = !1, extra: ce } = $;
|
|
1262
1256
|
if (!n || !ze(n))
|
|
@@ -1265,7 +1259,7 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1265
1259
|
try {
|
|
1266
1260
|
ue.length && h(ue);
|
|
1267
1261
|
const H = Q(k) ? Object.keys(k).length ? [k] : [] : k;
|
|
1268
|
-
B(
|
|
1262
|
+
B(T(F).map((Ce) => {
|
|
1269
1263
|
const xe = H.find((ve) => (ve?.columnKey || ve?.field) === Ce.dataIndex);
|
|
1270
1264
|
return {
|
|
1271
1265
|
...Ce,
|
|
@@ -1273,10 +1267,10 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1273
1267
|
};
|
|
1274
1268
|
}));
|
|
1275
1269
|
let ye = {
|
|
1276
|
-
...re(
|
|
1277
|
-
current: Ut(re(
|
|
1278
|
-
...
|
|
1279
|
-
...
|
|
1270
|
+
...re(j),
|
|
1271
|
+
current: Ut(re(j), ue.length),
|
|
1272
|
+
...T(x),
|
|
1273
|
+
...T(p),
|
|
1280
1274
|
...$.params
|
|
1281
1275
|
};
|
|
1282
1276
|
te && ze(te) && (ye = await te({
|
|
@@ -1302,11 +1296,11 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1302
1296
|
return [];
|
|
1303
1297
|
de = typeof o == "function" ? await o?.(xe) : xe, f(de);
|
|
1304
1298
|
const ve = ie.total || de?.length || 0;
|
|
1305
|
-
ve !==
|
|
1299
|
+
ve !== j.total && b({
|
|
1306
1300
|
total: ve
|
|
1307
1301
|
});
|
|
1308
|
-
const he =
|
|
1309
|
-
return
|
|
1302
|
+
const he = T(Y).map((Me) => Ie(Me, "sortIndex"));
|
|
1303
|
+
return Le(de, he) ? T(Y) : (R(de), de);
|
|
1310
1304
|
} else
|
|
1311
1305
|
return [];
|
|
1312
1306
|
} catch (H) {
|
|
@@ -1334,7 +1328,7 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1334
1328
|
if (N.signal.aborted)
|
|
1335
1329
|
return;
|
|
1336
1330
|
const k = _t(l.value, D);
|
|
1337
|
-
return k && !
|
|
1331
|
+
return k && !A.value && (G.value = setTimeout(() => {
|
|
1338
1332
|
J.run({ ...$, isPolling: k });
|
|
1339
1333
|
}, Math.max(k, 2e3))), D;
|
|
1340
1334
|
} catch (D) {
|
|
@@ -1342,17 +1336,17 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1342
1336
|
return;
|
|
1343
1337
|
throw D;
|
|
1344
1338
|
}
|
|
1345
|
-
},
|
|
1339
|
+
}, m.value || 30), q = () => {
|
|
1346
1340
|
U.value?.abort(), J.cancel(), ne();
|
|
1347
1341
|
};
|
|
1348
|
-
|
|
1349
|
-
|
|
1342
|
+
jt(() => {
|
|
1343
|
+
A.value = !1;
|
|
1350
1344
|
}), ct(() => {
|
|
1351
|
-
|
|
1345
|
+
A.value = !1;
|
|
1352
1346
|
}), Nt(() => {
|
|
1353
|
-
q(),
|
|
1347
|
+
q(), A.value = !0, clearTimeout(G.value);
|
|
1354
1348
|
}), Yt(() => {
|
|
1355
|
-
q(),
|
|
1349
|
+
q(), A.value = !0, clearTimeout(G.value);
|
|
1356
1350
|
}), z(() => l.value, () => {
|
|
1357
1351
|
d.value || (l.value ? J.run({ isPolling: !0 }) : clearTimeout(G.value));
|
|
1358
1352
|
}, { immediate: !0 }), z(() => d.value, () => {
|
|
@@ -1362,17 +1356,17 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1362
1356
|
}, { deep: !0, immediate: !0 }), z(() => p.value, () => {
|
|
1363
1357
|
d.value || a.value && (b({ current: 1 }), se());
|
|
1364
1358
|
}, { deep: !0, immediate: !0 }), z(() => x.value, ($, N) => {
|
|
1365
|
-
d.value ||
|
|
1359
|
+
d.value || Le($, N) || (b({ current: 1 }), se());
|
|
1366
1360
|
}, { deep: !0, immediate: !0 });
|
|
1367
1361
|
function se() {
|
|
1368
1362
|
n ? l.value || (q(), J.run({ isPolling: !1 })) : R(i.value || []);
|
|
1369
1363
|
}
|
|
1370
1364
|
const t = C(() => {
|
|
1371
1365
|
if ($e.value)
|
|
1372
|
-
return
|
|
1373
|
-
const $ =
|
|
1374
|
-
return !
|
|
1375
|
-
}), u = C(() =>
|
|
1366
|
+
return T(Y);
|
|
1367
|
+
const $ = F.value.filter((N) => N.show || N.show === void 0);
|
|
1368
|
+
return !T(Y) || !$ || $.length === 0 ? [] : T(Y);
|
|
1369
|
+
}), u = C(() => T(Y).some(($) => K($.children) && $.children.length > 0));
|
|
1376
1370
|
function y($) {
|
|
1377
1371
|
me.value = $;
|
|
1378
1372
|
}
|
|
@@ -1380,10 +1374,10 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
|
|
|
1380
1374
|
q(), J.run({ pagination: $, filters: N, sorter: D, extra: k, isPolling: !1 });
|
|
1381
1375
|
}
|
|
1382
1376
|
function R($) {
|
|
1383
|
-
const N = Qt(ee($), re(
|
|
1377
|
+
const N = Qt(ee($), re(j));
|
|
1384
1378
|
if (Y.value = N, !n || !ze(n)) {
|
|
1385
1379
|
const D = N.length || 0;
|
|
1386
|
-
D !==
|
|
1380
|
+
D !== j.total && b({
|
|
1387
1381
|
total: D
|
|
1388
1382
|
});
|
|
1389
1383
|
}
|
|
@@ -1442,7 +1436,7 @@ function Vl({
|
|
|
1442
1436
|
}) {
|
|
1443
1437
|
const l = I({
|
|
1444
1438
|
...Ge
|
|
1445
|
-
}), n = Ue(
|
|
1439
|
+
}), n = Ue(Ee(Ge, ["current", "pageSize", "total"]));
|
|
1446
1440
|
z(() => e.value, () => {
|
|
1447
1441
|
if (e.value === !1) {
|
|
1448
1442
|
l.value = !1;
|
|
@@ -1450,20 +1444,20 @@ function Vl({
|
|
|
1450
1444
|
}
|
|
1451
1445
|
const i = ze(a) ? {
|
|
1452
1446
|
itemRender: ({
|
|
1453
|
-
page:
|
|
1447
|
+
page: m,
|
|
1454
1448
|
type: p,
|
|
1455
|
-
originalElement:
|
|
1449
|
+
originalElement: F
|
|
1456
1450
|
}) => a ? a({
|
|
1457
|
-
page:
|
|
1451
|
+
page: m,
|
|
1458
1452
|
type: p,
|
|
1459
|
-
originalElement:
|
|
1453
|
+
originalElement: F
|
|
1460
1454
|
}) : null
|
|
1461
1455
|
} : null, d = {
|
|
1462
1456
|
...Ge,
|
|
1463
1457
|
...e.value || {},
|
|
1464
1458
|
...i || {}
|
|
1465
1459
|
};
|
|
1466
|
-
e.value?.showTotal || (d.showTotal = (
|
|
1460
|
+
e.value?.showTotal || (d.showTotal = (m) => `共${m < d.pageSize ? 1 : Math.ceil(m / (d.pageSize || 10))}页 ${m}条记录`), l.value = d, Object.assign(n, Ee(d, ["current", "pageSize", "total"]));
|
|
1467
1461
|
}, {
|
|
1468
1462
|
deep: 1,
|
|
1469
1463
|
immediate: !0
|
|
@@ -1471,8 +1465,8 @@ function Vl({
|
|
|
1471
1465
|
function o(i) {
|
|
1472
1466
|
if (Q(l.value) && Q(i)) {
|
|
1473
1467
|
const d = {};
|
|
1474
|
-
Object.keys(i).forEach((
|
|
1475
|
-
Object.prototype.hasOwnProperty.call(i,
|
|
1468
|
+
Object.keys(i).forEach((m) => {
|
|
1469
|
+
Object.prototype.hasOwnProperty.call(i, m) && l.value[m] === i[m] || (d[m] = i[m]);
|
|
1476
1470
|
}), Object.keys(d).length > 0 && (Object.assign(l.value, d), Gl(d) && Object.assign(n, d));
|
|
1477
1471
|
}
|
|
1478
1472
|
}
|
|
@@ -1542,8 +1536,8 @@ function _l(e) {
|
|
|
1542
1536
|
function Ql({ searchMap: e, columns: a }) {
|
|
1543
1537
|
const l = I([]), n = I({});
|
|
1544
1538
|
function o(i) {
|
|
1545
|
-
i.forEach((
|
|
1546
|
-
l.value.some((p) => p.name ===
|
|
1539
|
+
i.forEach((m) => {
|
|
1540
|
+
l.value.some((p) => p.name === m.name) ? l.value = l.value.map((p) => p.name === m.name ? { ...p, ...m } : p) : l.value.push(m);
|
|
1547
1541
|
});
|
|
1548
1542
|
const d = _l(i);
|
|
1549
1543
|
n.value = { ...n.value, ...d };
|
|
@@ -1558,19 +1552,19 @@ function Ql({ searchMap: e, columns: a }) {
|
|
|
1558
1552
|
}), o(i);
|
|
1559
1553
|
}, { deep: !0, immediate: !0 }), { formCols: l, defaultFormSearch: n };
|
|
1560
1554
|
}
|
|
1561
|
-
function Ul({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: o, rowSelection: i, screens: d, innerWidth:
|
|
1562
|
-
const
|
|
1555
|
+
function Ul({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: o, rowSelection: i, screens: d, innerWidth: m, scrollBreakpoint: p }) {
|
|
1556
|
+
const F = C(() => p.value ? De(p.value) ? m.value > p.value : pt(p.value) ? d.value?.[p.value] : d.value?.xl : d.value?.xl), r = C(() => {
|
|
1563
1557
|
let h = 0;
|
|
1564
|
-
const f =
|
|
1558
|
+
const f = T(i) ? 60 : 0, x = 150, b = ee(T(a));
|
|
1565
1559
|
b.forEach((te) => {
|
|
1566
1560
|
h += Number.parseInt(String(te.width)) || 0;
|
|
1567
1561
|
});
|
|
1568
1562
|
const oe = b.filter((te) => !Reflect.has(te, "width")).length;
|
|
1569
1563
|
return oe !== 0 && (h += oe * x), f && (h += f), h;
|
|
1570
1564
|
});
|
|
1571
|
-
return { proScroll: C(() => o.value ? {} : e.value && ht(e.value).length ?
|
|
1565
|
+
return { proScroll: C(() => o.value ? {} : e.value && ht(e.value).length ? T(e) : n.value ? {
|
|
1572
1566
|
y: e.value?.y || (d.value?.xl ? 400 : 235)
|
|
1573
|
-
} : l.value ?
|
|
1567
|
+
} : l.value ? F.value ? {} : Re(F.value) ? { x: r.value } : {} : {}), breakpoint: F };
|
|
1574
1568
|
}
|
|
1575
1569
|
function Jl(e) {
|
|
1576
1570
|
const a = I(e.size.value || "middle");
|
|
@@ -1597,6 +1591,9 @@ const Xe = (e) => ({
|
|
|
1597
1591
|
const a = `${e.antCls}-table`;
|
|
1598
1592
|
return {
|
|
1599
1593
|
[e.componentCls]: {
|
|
1594
|
+
"&-header-after": {
|
|
1595
|
+
marginBlockEnd: e.margin
|
|
1596
|
+
},
|
|
1600
1597
|
"&-a": {
|
|
1601
1598
|
cursor: "pointer",
|
|
1602
1599
|
color: e.colorPrimary,
|
|
@@ -1847,7 +1844,7 @@ function na(e) {
|
|
|
1847
1844
|
const ia = {
|
|
1848
1845
|
reload: !0,
|
|
1849
1846
|
fullScreen: !0
|
|
1850
|
-
}, oa = dl.useToken, _e = /* @__PURE__ */
|
|
1847
|
+
}, oa = dl.useToken, _e = /* @__PURE__ */ we({
|
|
1851
1848
|
name: "GProTable",
|
|
1852
1849
|
inheritAttrs: !1,
|
|
1853
1850
|
props: ge,
|
|
@@ -1864,32 +1861,32 @@ const ia = {
|
|
|
1864
1861
|
isPor: !0
|
|
1865
1862
|
}), {
|
|
1866
1863
|
wrapSSR: d,
|
|
1867
|
-
hashId:
|
|
1864
|
+
hashId: m
|
|
1868
1865
|
} = Je("ProBaseTable", [Zl], i), {
|
|
1869
1866
|
token: p
|
|
1870
|
-
} = oa(),
|
|
1867
|
+
} = oa(), F = Gt(), r = ft(), {
|
|
1871
1868
|
width: B
|
|
1872
|
-
} = ol(), h = I(!1), f = dt(), x = I(), b = I(),
|
|
1873
|
-
zt(() =>
|
|
1869
|
+
} = ol(), h = I(!1), f = dt(), x = I(), b = I(), j = I(e.waitRequest);
|
|
1870
|
+
zt(() => j.value = e.waitRequest);
|
|
1874
1871
|
const {
|
|
1875
1872
|
toggle: oe,
|
|
1876
1873
|
isFullscreen: te
|
|
1877
1874
|
} = bt(x), $e = C(() => !r.value.xl), pe = C(() => (e.virtualScroll && pl(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), le = C(() => {
|
|
1878
1875
|
if (e.form === !1) return !1;
|
|
1879
|
-
const
|
|
1876
|
+
const v = {
|
|
1880
1877
|
actions: {
|
|
1881
1878
|
resetReload: !0
|
|
1882
1879
|
},
|
|
1883
1880
|
resetText: "重置",
|
|
1884
1881
|
searchText: "查询"
|
|
1885
1882
|
};
|
|
1886
|
-
return Q(e.form) ? Se(
|
|
1887
|
-
}),
|
|
1888
|
-
const
|
|
1889
|
-
const
|
|
1890
|
-
return
|
|
1883
|
+
return Q(e.form) ? Se(v, e.form) : v;
|
|
1884
|
+
}), A = C(() => le.value === !1 ? {} : le.value), me = C(() => A.value?.autoRequest ?? e.autoRequest), Y = C(() => A.value?.actions), G = C(() => {
|
|
1885
|
+
const v = e.columns.filter((w) => w.key || w.dataIndex).map((w) => {
|
|
1886
|
+
const S = w.key || w.dataIndex;
|
|
1887
|
+
return w.key = S, w.dataIndex = S, w.align = w.align || e.align, w.uuid = w.uuid || gt().uuid(15), w;
|
|
1891
1888
|
});
|
|
1892
|
-
return Zt(
|
|
1889
|
+
return Zt(v, {
|
|
1893
1890
|
align: e.align || "left",
|
|
1894
1891
|
showIndex: e.showIndex ?? !1
|
|
1895
1892
|
});
|
|
@@ -1956,7 +1953,7 @@ const ia = {
|
|
|
1956
1953
|
handleTableChange: Me
|
|
1957
1954
|
} = ql({
|
|
1958
1955
|
...Be,
|
|
1959
|
-
waitRequest:
|
|
1956
|
+
waitRequest: j
|
|
1960
1957
|
}, {
|
|
1961
1958
|
loading: U,
|
|
1962
1959
|
pageInfo: se,
|
|
@@ -1972,80 +1969,80 @@ const ia = {
|
|
|
1972
1969
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
1973
1970
|
hasCustomRender: C(() => qe(e.customRender || l?.customRender))
|
|
1974
1971
|
}, a), Rt = C(() => ({
|
|
1975
|
-
size:
|
|
1976
|
-
scroll:
|
|
1977
|
-
dataSource:
|
|
1978
|
-
pagination:
|
|
1972
|
+
size: T(be),
|
|
1973
|
+
scroll: T(u),
|
|
1974
|
+
dataSource: T(he),
|
|
1975
|
+
pagination: T(q),
|
|
1979
1976
|
virtualScroll: pe.value,
|
|
1980
|
-
columns:
|
|
1977
|
+
columns: T(g).filter((v) => v.show || v.show === void 0)
|
|
1981
1978
|
})), et = C(() => {
|
|
1982
|
-
const
|
|
1983
|
-
return !
|
|
1979
|
+
const v = Q(e.loading) ? Ie(e.loading, "spinning") : {};
|
|
1980
|
+
return !v.indicator && f?.indicator?.value && (v.indicator = f?.indicator?.value), {
|
|
1984
1981
|
spinning: e.showLoading ? qe(U.value) : !1,
|
|
1985
|
-
...
|
|
1982
|
+
...v
|
|
1986
1983
|
};
|
|
1987
1984
|
}), tt = C(() => {
|
|
1988
|
-
let
|
|
1989
|
-
const
|
|
1990
|
-
if (
|
|
1991
|
-
const
|
|
1992
|
-
!
|
|
1985
|
+
let v;
|
|
1986
|
+
const w = e.direction === "rtl" ? "bottomLeft" : "right", S = T(q)?.position;
|
|
1987
|
+
if (S !== null && Array.isArray(S)) {
|
|
1988
|
+
const P = S.find((X) => X.includes("top")), O = S.find((X) => X.includes("bottom")), E = S.every((X) => `${X}` == "none");
|
|
1989
|
+
!P && !O && !E && (v = w), P && (v = P.toLowerCase().replace("top", "")), O && (v = O.toLowerCase().replace("bottom", ""));
|
|
1993
1990
|
} else
|
|
1994
|
-
|
|
1995
|
-
return
|
|
1991
|
+
v = w;
|
|
1992
|
+
return v;
|
|
1996
1993
|
});
|
|
1997
1994
|
Ml(() => {
|
|
1998
1995
|
h.value && e.keepAliveReload ? ie() : h.value = !0;
|
|
1999
1996
|
});
|
|
2000
|
-
const $t = async (
|
|
1997
|
+
const $t = async (v, w) => {
|
|
2001
1998
|
if (me.value) {
|
|
2002
1999
|
ie({
|
|
2003
|
-
params:
|
|
2000
|
+
params: v
|
|
2004
2001
|
});
|
|
2005
2002
|
return;
|
|
2006
2003
|
}
|
|
2007
|
-
|
|
2008
|
-
params:
|
|
2009
|
-
})) : e.request && (a("submit",
|
|
2010
|
-
params:
|
|
2004
|
+
w === "reset" ? (a("reset", v), e.request && Y.value?.resetReload && ie({
|
|
2005
|
+
params: v
|
|
2006
|
+
})) : e.request && (a("submit", v), ie({
|
|
2007
|
+
params: v
|
|
2011
2008
|
}));
|
|
2012
|
-
}, We = (
|
|
2013
|
-
t(
|
|
2014
|
-
},
|
|
2015
|
-
a("expandedRowsChange",
|
|
2016
|
-
},
|
|
2017
|
-
a("expand",
|
|
2018
|
-
}, Dt = (
|
|
2019
|
-
let
|
|
2020
|
-
if (
|
|
2021
|
-
const
|
|
2009
|
+
}, We = (v, w, S, P) => {
|
|
2010
|
+
t(Ee(v, ["current", "pageSize"])), Me(v, w, S, P), a("change", v, w, S, P);
|
|
2011
|
+
}, Pt = (v) => {
|
|
2012
|
+
a("expandedRowsChange", v);
|
|
2013
|
+
}, Ft = (v, w) => {
|
|
2014
|
+
a("expand", v, w);
|
|
2015
|
+
}, Dt = (v, w) => c(v, w), It = (v, w, S) => {
|
|
2016
|
+
let P = v;
|
|
2017
|
+
if (w) {
|
|
2018
|
+
const O = K(v) ? typeof v?.[0]?.children == "string" ? v?.[0]?.children : "" : v ? v.toString() : "", E = S.tooltip === !1 ? {} : S.tooltip, X = S.tooltip === !1 ? 1 : De(E?.hiddenLine) && E?.hiddenLine > 0 ? E?.hiddenLine : 1, L = S.tooltip === !1 ? 0 : De(E?.width) ? E?.width : 0, Ae = S.tooltip !== !1 && pt(O) && L > 0 ? ll(O, {
|
|
2022
2019
|
cssObject: {
|
|
2023
2020
|
fontSize: "14px",
|
|
2024
2021
|
lineHeight: "22px",
|
|
2025
|
-
fontFamily:
|
|
2026
|
-
...
|
|
2022
|
+
fontFamily: F?.token?.value?.fontFamily || p?.value?.fontFamily,
|
|
2023
|
+
...E?.targetStyle || {}
|
|
2027
2024
|
}
|
|
2028
|
-
}) : 0,
|
|
2025
|
+
}) : 0, Oe = document.querySelector(`.${i} .ant-table-tbody`), je = s("div", {
|
|
2029
2026
|
class: `${i}-ellipsis-text`
|
|
2030
|
-
}, [
|
|
2031
|
-
title:
|
|
2032
|
-
getPopupContainer: (ke) =>
|
|
2033
|
-
}, Q(
|
|
2027
|
+
}, [v]), at = () => S.tooltip === !1 || Q(S.tooltip) && Ae < L && L > 0 ? je : s(Te, W({
|
|
2028
|
+
title: v,
|
|
2029
|
+
getPopupContainer: (ke) => Oe ?? ke?.parentNode?.parentNode
|
|
2030
|
+
}, Q(S.tooltip) ? S.tooltip : {}, {
|
|
2034
2031
|
destroyTooltipOnHide: !0
|
|
2035
|
-
}), na(
|
|
2036
|
-
default: () => [
|
|
2032
|
+
}), na(je) ? je : {
|
|
2033
|
+
default: () => [je]
|
|
2037
2034
|
});
|
|
2038
|
-
if (
|
|
2039
|
-
class: `${i}-ellipsis ${
|
|
2035
|
+
if (P = s("div", {
|
|
2036
|
+
class: `${i}-ellipsis ${E?.class ?? ""}`,
|
|
2040
2037
|
style: {
|
|
2041
2038
|
"-webkit-line-clamp": X
|
|
2042
2039
|
}
|
|
2043
|
-
}, [at()]),
|
|
2044
|
-
const ke = typeof
|
|
2045
|
-
|
|
2040
|
+
}, [at()]), S.copyable) {
|
|
2041
|
+
const ke = typeof S.copyText == "function" ? S.copyText?.(S) : S.copyText || O;
|
|
2042
|
+
P = s("div", {
|
|
2046
2043
|
class: `${i}-copyable`
|
|
2047
2044
|
}, [s("div", {
|
|
2048
|
-
class: `${i}-ellipsis ${
|
|
2045
|
+
class: `${i}-ellipsis ${E?.class ?? ""}`,
|
|
2049
2046
|
style: {
|
|
2050
2047
|
"-webkit-line-clamp": X
|
|
2051
2048
|
}
|
|
@@ -2057,35 +2054,35 @@ const ia = {
|
|
|
2057
2054
|
}, null)]);
|
|
2058
2055
|
}
|
|
2059
2056
|
}
|
|
2060
|
-
return
|
|
2057
|
+
return P;
|
|
2061
2058
|
};
|
|
2062
2059
|
function lt() {
|
|
2063
|
-
const
|
|
2060
|
+
const v = al({
|
|
2064
2061
|
slots: l,
|
|
2065
2062
|
props: e,
|
|
2066
2063
|
key: "emptyText"
|
|
2067
2064
|
});
|
|
2068
|
-
if (
|
|
2069
|
-
const
|
|
2065
|
+
if (v !== !1 && f?.emptyText?.value !== !1) {
|
|
2066
|
+
const S = e.emptyTextProps?.extraProps || {}, P = v || f?.emptyText?.value, O = _(P), E = O ? st(P, S) : mt(K(P) ? P : [P]);
|
|
2070
2067
|
return s("div", {
|
|
2071
|
-
class: ae(`${i}-empty-text`,
|
|
2068
|
+
class: ae(`${i}-empty-text`, m.value, e.emptyTextProps?.class),
|
|
2072
2069
|
style: e.emptyTextProps?.style
|
|
2073
|
-
}, [
|
|
2070
|
+
}, [O ? E : K(E) ? E.map((X) => Qe(X, S)) : s(hl, null, null)]);
|
|
2074
2071
|
}
|
|
2075
2072
|
return null;
|
|
2076
2073
|
}
|
|
2077
2074
|
const Bt = () => {
|
|
2078
|
-
const
|
|
2075
|
+
const v = it({
|
|
2079
2076
|
slots: l,
|
|
2080
2077
|
props: e,
|
|
2081
2078
|
key: "customRender"
|
|
2082
2079
|
});
|
|
2083
|
-
if (
|
|
2080
|
+
if (v) {
|
|
2084
2081
|
if (he.value?.length) {
|
|
2085
|
-
const
|
|
2086
|
-
return
|
|
2087
|
-
dataSource:
|
|
2088
|
-
currentData: la(
|
|
2082
|
+
const w = ee(T(he));
|
|
2083
|
+
return v?.({
|
|
2084
|
+
dataSource: w,
|
|
2085
|
+
currentData: la(w, q.value)
|
|
2089
2086
|
});
|
|
2090
2087
|
}
|
|
2091
2088
|
return lt();
|
|
@@ -2097,25 +2094,25 @@ const ia = {
|
|
|
2097
2094
|
columns: g,
|
|
2098
2095
|
cacheColumns: G,
|
|
2099
2096
|
isMobile: $e,
|
|
2100
|
-
formConfig:
|
|
2097
|
+
formConfig: A,
|
|
2101
2098
|
formAutoRequest: me,
|
|
2102
2099
|
formActions: Y,
|
|
2103
2100
|
action: {
|
|
2104
2101
|
setTableSize: J,
|
|
2105
|
-
reload: (
|
|
2102
|
+
reload: (v) => ie(v),
|
|
2106
2103
|
toggle: oe
|
|
2107
2104
|
},
|
|
2108
2105
|
setPagination: t
|
|
2109
2106
|
}), o({
|
|
2110
2107
|
formRef: () => ({
|
|
2111
2108
|
getFormSearch: () => ({
|
|
2112
|
-
...
|
|
2109
|
+
...T(N),
|
|
2113
2110
|
...b.value?.getFormSearch(),
|
|
2114
2111
|
...e.params
|
|
2115
2112
|
}),
|
|
2116
2113
|
getFormInnerState: () => b.value?.getFormSearch() || {},
|
|
2117
|
-
restFormState: (
|
|
2118
|
-
|
|
2114
|
+
restFormState: (v) => {
|
|
2115
|
+
j.value = !0, v && v?.(), b.value?.resetForm(!1), j.value = !1;
|
|
2119
2116
|
}
|
|
2120
2117
|
}),
|
|
2121
2118
|
actionRef: () => ({
|
|
@@ -2133,12 +2130,12 @@ const ia = {
|
|
|
2133
2130
|
selectAll: ce
|
|
2134
2131
|
},
|
|
2135
2132
|
reload: ie,
|
|
2136
|
-
getLoadingStatus: () =>
|
|
2137
|
-
reloadAndReset: async (
|
|
2138
|
-
|
|
2133
|
+
getLoadingStatus: () => T(U),
|
|
2134
|
+
reloadAndReset: async (v) => {
|
|
2135
|
+
j.value = !0, t({
|
|
2139
2136
|
current: 1,
|
|
2140
2137
|
pageSize: se?.pageSize || 10
|
|
2141
|
-
}),
|
|
2138
|
+
}), v && v?.callBack && (v.wait ? await v.callBack() : v.callBack()), b.value?.resetForm(!0), j.value = !1;
|
|
2142
2139
|
},
|
|
2143
2140
|
setPageInfo: We,
|
|
2144
2141
|
setTableDataList: Ce,
|
|
@@ -2147,87 +2144,88 @@ const ia = {
|
|
|
2147
2144
|
setLoading: ne
|
|
2148
2145
|
})
|
|
2149
2146
|
}), () => {
|
|
2150
|
-
const
|
|
2147
|
+
const v = qe(e.customRender || l.customRender), w = l.actions?.() || e.actionProps?.actions, S = el({
|
|
2151
2148
|
slots: l,
|
|
2152
2149
|
props: e,
|
|
2153
|
-
keys: ["headerTitle", "
|
|
2150
|
+
keys: ["headerTitle", "headerTitleTip", "headerAfter"],
|
|
2154
2151
|
render: !0
|
|
2155
2152
|
});
|
|
2156
2153
|
return d(s("div", {
|
|
2157
2154
|
ref: x,
|
|
2158
2155
|
class: ae([{
|
|
2159
|
-
[`${
|
|
2156
|
+
[`${m.value}`]: !0,
|
|
2160
2157
|
[`${i}`]: !0,
|
|
2161
2158
|
[`${n.class}`]: n.class,
|
|
2162
2159
|
[`${i}-beautify-scroll`]: Re(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
|
|
2163
|
-
[`${i}-no-scroll`]: !Object.keys(
|
|
2160
|
+
[`${i}-no-scroll`]: !Object.keys(T(u) || {}).length,
|
|
2164
2161
|
[`${i}-table-tree`]: ve.value,
|
|
2165
2162
|
[`${i}-full-screen`]: te.value
|
|
2166
2163
|
}]),
|
|
2167
2164
|
style: n.style
|
|
2168
2165
|
}, [s("div", {
|
|
2169
|
-
class: [`${i}-content`,
|
|
2170
|
-
}, [($.value.length > 0 || !!l.form) && e.form !== !1 && s(
|
|
2166
|
+
class: [`${i}-content`, m.value]
|
|
2167
|
+
}, [($.value.length > 0 || !!l.form) && e.form !== !1 && s(Al, {
|
|
2171
2168
|
ref: b,
|
|
2172
2169
|
modalScroll: e.modalScroll,
|
|
2173
2170
|
cardBordered: e.cardBordered,
|
|
2174
2171
|
formCols: $.value,
|
|
2175
2172
|
prefixCls: i,
|
|
2176
|
-
loading:
|
|
2173
|
+
loading: T(U),
|
|
2177
2174
|
onSearch: $t,
|
|
2178
2175
|
defaultFormSearch: N.value
|
|
2179
2176
|
}, {
|
|
2180
2177
|
default: l.form ? () => l.form?.() : null
|
|
2181
2178
|
}), s("div", {
|
|
2182
|
-
class: ae(
|
|
2183
|
-
}, [s(
|
|
2179
|
+
class: ae(m.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
|
|
2180
|
+
}, [s(Ll, {
|
|
2184
2181
|
options: e.options ? {
|
|
2185
2182
|
...ia,
|
|
2186
2183
|
...Q(e.options) ? e.options : {}
|
|
2187
2184
|
} : !1,
|
|
2188
2185
|
titleTipText: e.titleTipText,
|
|
2189
2186
|
actionsPlacement: e.actionProps?.placement,
|
|
2190
|
-
actionsRender:
|
|
2191
|
-
headerTitle:
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2187
|
+
actionsRender: w,
|
|
2188
|
+
headerTitle: S.headerTitle,
|
|
2189
|
+
headerTitleTip: S.headerTitleTip
|
|
2190
|
+
}, null), S.headerAfter && s("div", {
|
|
2191
|
+
class: `${i}-header-after ${m.value}`
|
|
2192
|
+
}, [S.headerAfter]), v ? s(Ct, et.value, {
|
|
2195
2193
|
default: () => [s("div", {
|
|
2196
|
-
class: `${i}-wrapper ${
|
|
2194
|
+
class: `${i}-wrapper ${m.value}`
|
|
2197
2195
|
}, [s("div", {
|
|
2198
|
-
class: ae(`${i}-list`,
|
|
2196
|
+
class: ae(`${i}-list`, m.value, e.tableProps?.class),
|
|
2199
2197
|
style: e.tableProps?.style
|
|
2200
2198
|
}, [Bt()]), e.pagination !== !1 && he.value?.length > 0 && s(fl, W({
|
|
2201
2199
|
class: {
|
|
2202
|
-
[`${i}-pagination ${
|
|
2203
|
-
[`${i}-pagination-${tt.value} ${
|
|
2200
|
+
[`${i}-pagination ${m.value}`]: !0,
|
|
2201
|
+
[`${i}-pagination-${tt.value} ${m.value}`]: !!tt.value
|
|
2204
2202
|
}
|
|
2205
|
-
}, re(
|
|
2206
|
-
onChange: (
|
|
2207
|
-
current:
|
|
2208
|
-
pageSize:
|
|
2203
|
+
}, re(T(q)), {
|
|
2204
|
+
onChange: (P, O) => We({
|
|
2205
|
+
current: P,
|
|
2206
|
+
pageSize: O
|
|
2209
2207
|
})
|
|
2210
2208
|
}), null)])]
|
|
2211
|
-
}) : s(ml, W(
|
|
2209
|
+
}) : s(ml, W(Ee(e, Object.keys(St)), Rt.value, {
|
|
2212
2210
|
style: e.tableProps?.style,
|
|
2213
2211
|
class: e.tableProps?.class,
|
|
2214
2212
|
loading: et.value,
|
|
2215
|
-
rowKey: (
|
|
2216
|
-
transformCellText: (
|
|
2217
|
-
e.transformCellText && typeof e.transformCellText && e.transformCellText?.(
|
|
2213
|
+
rowKey: (P) => P[e.rowKey],
|
|
2214
|
+
transformCellText: (P) => {
|
|
2215
|
+
e.transformCellText && typeof e.transformCellText && e.transformCellText?.(P);
|
|
2218
2216
|
const {
|
|
2219
|
-
column:
|
|
2220
|
-
} =
|
|
2221
|
-
if (!
|
|
2222
|
-
const
|
|
2223
|
-
let X = !0,
|
|
2224
|
-
if (K(
|
|
2225
|
-
if (
|
|
2226
|
-
|
|
2227
|
-
const
|
|
2228
|
-
X =
|
|
2229
|
-
} else
|
|
2230
|
-
return
|
|
2217
|
+
column: O
|
|
2218
|
+
} = P;
|
|
2219
|
+
if (!O) return P.text;
|
|
2220
|
+
const E = O?.key || O?.dataIndex;
|
|
2221
|
+
let X = !0, L = P.text;
|
|
2222
|
+
if (K(L))
|
|
2223
|
+
if (L.length === 0 || L.length === 1 && !_(L[0])) {
|
|
2224
|
+
L = L?.[0];
|
|
2225
|
+
const Ae = tl(L, O?.columnEmptyText || e?.columnEmptyText || "");
|
|
2226
|
+
X = Ae.success, L = ta(Ae.value, O?.valueType || e.columns?.find((Oe) => (Oe.key || Oe.dataIndex) === E)?.valueType, i, m.value);
|
|
2227
|
+
} else L[0]?.type === "template" && (L = L[0]?.children);
|
|
2228
|
+
return O?.ellipsis ? It(L, X, O) : L;
|
|
2231
2229
|
},
|
|
2232
2230
|
rowSelection: e.rowSelection ? {
|
|
2233
2231
|
...Ie(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
@@ -2237,9 +2235,9 @@ const ia = {
|
|
|
2237
2235
|
onChange: ue
|
|
2238
2236
|
} : void 0,
|
|
2239
2237
|
onChange: We,
|
|
2240
|
-
onExpandedRowsChange:
|
|
2241
|
-
onExpand:
|
|
2242
|
-
onResizeColumn: (
|
|
2238
|
+
onExpandedRowsChange: Pt,
|
|
2239
|
+
onExpand: Ft,
|
|
2240
|
+
onResizeColumn: (P, O) => Dt(P, O)
|
|
2243
2241
|
}), {
|
|
2244
2242
|
...l,
|
|
2245
2243
|
emptyText: () => lt()
|
|
@@ -2271,16 +2269,16 @@ function Ca(e, a) {
|
|
|
2271
2269
|
const o = C(() => e.value ? e.value.actionRef() : {}), i = C(() => e.value ? e.value.formRef() : {}), d = C(() => ({
|
|
2272
2270
|
...o.value.pageInfo || {},
|
|
2273
2271
|
...i.value.getFormSearch?.() || {}
|
|
2274
|
-
})),
|
|
2272
|
+
})), m = I(!!o.value.loading?.value);
|
|
2275
2273
|
z(() => o.value.loading?.value, (r) => {
|
|
2276
|
-
|
|
2277
|
-
}), z(
|
|
2274
|
+
m.value = !!r;
|
|
2275
|
+
}), z(m, (r) => {
|
|
2278
2276
|
o.value?.setLoading?.(!!r);
|
|
2279
2277
|
});
|
|
2280
2278
|
function p() {
|
|
2281
2279
|
nl(n, l());
|
|
2282
2280
|
}
|
|
2283
|
-
function
|
|
2281
|
+
function F(r, B) {
|
|
2284
2282
|
n.searchMap && (n.searchMap = ee(n.searchMap).map((h) => h.name === r ? Se(h, B) : h));
|
|
2285
2283
|
}
|
|
2286
2284
|
return {
|
|
@@ -2288,7 +2286,7 @@ function Ca(e, a) {
|
|
|
2288
2286
|
actionRef: o,
|
|
2289
2287
|
tableState: n,
|
|
2290
2288
|
requestSearch: d,
|
|
2291
|
-
loading:
|
|
2289
|
+
loading: m,
|
|
2292
2290
|
dataSource: C(() => o?.value?.dataSource?.value || []),
|
|
2293
2291
|
selectedKeys: C(() => o?.value?.selectedKeys?.value || []),
|
|
2294
2292
|
selectedItems: C(() => o?.value?.selectedItems?.value || []),
|
|
@@ -2297,10 +2295,10 @@ function Ca(e, a) {
|
|
|
2297
2295
|
reloadAndReset: (r) => o.value?.reloadAndReset?.(r),
|
|
2298
2296
|
setPageInfo: (r, B, h, f) => o.value?.setPageInfo?.(r, B, h, f),
|
|
2299
2297
|
setPagination: (r) => o.value?.setPagination?.(r),
|
|
2300
|
-
setLoading: (r) =>
|
|
2298
|
+
setLoading: (r) => m.value = r,
|
|
2301
2299
|
operateTableDataRow: (r) => o.value?.operateTableDataRow?.(r),
|
|
2302
2300
|
reload: (r) => o.value?.reload?.(r),
|
|
2303
|
-
updateSearchMap:
|
|
2301
|
+
updateSearchMap: F
|
|
2304
2302
|
};
|
|
2305
2303
|
}
|
|
2306
2304
|
export {
|