@gx-design-vue/pro-table 0.2.0-beta.137 → 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 +417 -426
- 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 +2 -2
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
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
|
|
18
|
-
import { useDebounceFn as
|
|
19
|
-
import { Grid as ul, DatePicker as yt, Space as
|
|
20
|
-
import { omit as Ie, cloneDeep as xt, pick 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
|
+
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 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,
|
|
@@ -329,14 +324,14 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
329
324
|
setup(e, {
|
|
330
325
|
slots: a
|
|
331
326
|
}) {
|
|
332
|
-
const l = I([]), n = I(e.loading ?? !1),
|
|
327
|
+
const l = I([]), n = I(e.loading ?? !1), o = I("init"), i = il(e.fetch, e.debounceTime || 10);
|
|
333
328
|
return z([() => e.fetch, () => e.manual], () => {
|
|
334
|
-
if (
|
|
329
|
+
if (o.value !== "init" && n.value) return;
|
|
335
330
|
const d = e.manual ?? !1;
|
|
336
|
-
e.fetch && !d && (n.value = !0,
|
|
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
|
}));
|
|
@@ -355,22 +350,22 @@ function xl(e, a) {
|
|
|
355
350
|
const l = Ue({});
|
|
356
351
|
function n() {
|
|
357
352
|
Object.assign(l, ee(re(e)));
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
e[
|
|
361
|
-
e[
|
|
353
|
+
const i = a.find((d) => d.valueType === "dateRange");
|
|
354
|
+
i && o(i.name || "", e[i.rangeStartName || "start"] ? [
|
|
355
|
+
e[i.rangeStartName || "start"],
|
|
356
|
+
e[i.rangeEndName || "end"]
|
|
362
357
|
] : []);
|
|
363
358
|
}
|
|
364
359
|
z(() => e, () => {
|
|
365
360
|
n();
|
|
366
361
|
}, { deep: !0, immediate: !0 });
|
|
367
|
-
function i
|
|
368
|
-
l[
|
|
362
|
+
function o(i, d) {
|
|
363
|
+
l[i] = d;
|
|
369
364
|
}
|
|
370
365
|
return {
|
|
371
366
|
formState: l,
|
|
372
367
|
resetFormState: n,
|
|
373
|
-
changeFormState:
|
|
368
|
+
changeFormState: o
|
|
374
369
|
};
|
|
375
370
|
}
|
|
376
371
|
const Sl = (e) => ({
|
|
@@ -475,20 +470,20 @@ function Pe(e, a) {
|
|
|
475
470
|
}
|
|
476
471
|
const rt = (e, a, l = "string") => {
|
|
477
472
|
if (K(e)) {
|
|
478
|
-
const [n,
|
|
479
|
-
let
|
|
480
|
-
if (Array.isArray(a) ? (
|
|
481
|
-
const
|
|
482
|
-
return [
|
|
473
|
+
const [n, o] = e;
|
|
474
|
+
let i, d;
|
|
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") {
|
|
476
|
+
const m = n ? fe(n, i) : "", p = o ? fe(o, d) : "";
|
|
477
|
+
return [m, p];
|
|
483
478
|
}
|
|
484
|
-
return [V(n), V(
|
|
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,
|
|
@@ -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,
|
|
@@ -526,20 +521,20 @@ const Bl = {
|
|
|
526
521
|
}) {
|
|
527
522
|
const {
|
|
528
523
|
wrapSSR: n,
|
|
529
|
-
hashId:
|
|
530
|
-
} = Je("ProTableForm", [Sl], e.prefixCls),
|
|
531
|
-
formAutoRequest:
|
|
524
|
+
hashId: o
|
|
525
|
+
} = Je("ProTableForm", [Sl], e.prefixCls), i = dt(), d = wl(), {
|
|
526
|
+
formAutoRequest: m,
|
|
532
527
|
formConfig: p,
|
|
533
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(F.value?.reset) ? F.value?.reset : !
|
|
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
|
});
|
|
542
|
-
function
|
|
537
|
+
function oe(t) {
|
|
543
538
|
let u = 4;
|
|
544
539
|
for (let y = 0; y < Ve.length; y += 1) {
|
|
545
540
|
const g = Ve[y].value;
|
|
@@ -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":
|
|
@@ -612,19 +607,19 @@ const Bl = {
|
|
|
612
607
|
resetForm: me
|
|
613
608
|
});
|
|
614
609
|
const Y = () => {
|
|
615
|
-
const t =
|
|
610
|
+
const t = i?.emptyText?.value;
|
|
616
611
|
if (t) {
|
|
617
612
|
const u = _(t), y = u ? st(t) : mt(t || []);
|
|
618
613
|
return s("div", {
|
|
619
|
-
class: ae(`${e.prefixCls}-search-empty-text`,
|
|
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
621
|
default: () => [F.value?.resetText || "重置"]
|
|
627
|
-
}), !
|
|
622
|
+
}), !m.value && s(ut, {
|
|
628
623
|
loading: e.loading,
|
|
629
624
|
type: "primary",
|
|
630
625
|
onClick: () => le(!0)
|
|
@@ -637,32 +632,32 @@ const Bl = {
|
|
|
637
632
|
collapseRender: y = !0
|
|
638
633
|
}) => s("div", {
|
|
639
634
|
style: t,
|
|
640
|
-
class: `${e.prefixCls}-search-collapse-buttons ${
|
|
641
|
-
}, [s(
|
|
635
|
+
class: `${e.prefixCls}-search-collapse-buttons ${o.value}`
|
|
636
|
+
}, [s(ot, {
|
|
642
637
|
size: 16
|
|
643
638
|
}, {
|
|
644
639
|
default: () => [G(), p.value?.collapseRender !== !1 && y && s(Ye, null, [typeof p.value?.collapseRender == "function" ? p.value?.collapseRender(u) : s("span", {
|
|
645
|
-
class: `${e.prefixCls}-a ${
|
|
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, {
|
|
651
646
|
size: "small",
|
|
652
|
-
indicator:
|
|
647
|
+
indicator: i?.indicator?.value
|
|
653
648
|
}, null) : Y();
|
|
654
649
|
}
|
|
655
650
|
function be(t, u) {
|
|
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,17 +679,17 @@ 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":
|
|
691
686
|
u = s(Ne.Group, {
|
|
692
687
|
compact: !0,
|
|
693
|
-
class: ae(
|
|
688
|
+
class: ae(o.value, `${e.prefixCls}-search-input-compact`)
|
|
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":
|
|
@@ -752,7 +747,7 @@ const Bl = {
|
|
|
752
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":
|
|
@@ -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,7 +783,7 @@ 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":
|
|
@@ -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":
|
|
@@ -813,7 +808,7 @@ const Bl = {
|
|
|
813
808
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
814
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
|
}
|
|
@@ -891,11 +886,11 @@ const Bl = {
|
|
|
891
886
|
return () => {
|
|
892
887
|
const t = e.cardBordered && `${e.prefixCls}-search-border`;
|
|
893
888
|
return n(s("div", {
|
|
894
|
-
class: ae(
|
|
889
|
+
class: ae(o.value, `${e.prefixCls}-search`, t, o.value, p.value?.className)
|
|
895
890
|
}, [se()]));
|
|
896
891
|
};
|
|
897
892
|
}
|
|
898
|
-
}),
|
|
893
|
+
}), Ol = (e) => ({
|
|
899
894
|
[`${e.componentCls}`]: {
|
|
900
895
|
lineHeight: 1,
|
|
901
896
|
"&-container": {
|
|
@@ -967,37 +962,37 @@ 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) {
|
|
974
969
|
const a = e, {
|
|
975
970
|
icon: l,
|
|
976
971
|
tooltip: n,
|
|
977
|
-
onClick:
|
|
978
|
-
key:
|
|
972
|
+
onClick: o,
|
|
973
|
+
key: i
|
|
979
974
|
} = a;
|
|
980
|
-
return l && n ? s(
|
|
975
|
+
return l && n ? s(Te, {
|
|
981
976
|
title: n,
|
|
982
|
-
key:
|
|
977
|
+
key: i
|
|
983
978
|
}, {
|
|
984
979
|
default: () => [s("span", {
|
|
985
|
-
key:
|
|
980
|
+
key: i,
|
|
986
981
|
onClick: () => {
|
|
987
|
-
|
|
982
|
+
o && o(i);
|
|
988
983
|
}
|
|
989
984
|
}, [l])]
|
|
990
985
|
}) : l;
|
|
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", [
|
|
1009
|
-
isMobile:
|
|
1010
|
-
} = Ze(),
|
|
1003
|
+
} = Je("ListToolBar", [Ol], e.prefixCls), n = ft(), {
|
|
1004
|
+
isMobile: o
|
|
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,24 +1017,24 @@ 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);
|
|
1030
1025
|
const h = d.value.left;
|
|
1031
|
-
return
|
|
1026
|
+
return i.value ? s("div", {
|
|
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,42 +1046,42 @@ 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, () =>
|
|
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,
|
|
1065
|
-
[`${e.prefixCls}-container-mobile`]:
|
|
1060
|
+
[`${e.prefixCls}-container-mobile`]: o.value
|
|
1066
1061
|
};
|
|
1067
1062
|
return s("div", {
|
|
1068
1063
|
class: h
|
|
1069
1064
|
}, [F.value, r.value]);
|
|
1070
|
-
}, [() =>
|
|
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
|
-
default: () => [s(
|
|
1084
|
+
default: () => [s(kt, null, null)]
|
|
1090
1085
|
});
|
|
1091
1086
|
}
|
|
1092
1087
|
});
|
|
@@ -1094,11 +1089,11 @@ function Nl() {
|
|
|
1094
1089
|
return {
|
|
1095
1090
|
reload: {
|
|
1096
1091
|
text: "刷新",
|
|
1097
|
-
icon: s(
|
|
1092
|
+
icon: s(Ht, null, null)
|
|
1098
1093
|
},
|
|
1099
1094
|
fullScreen: {
|
|
1100
1095
|
text: "全屏",
|
|
1101
|
-
icon: s(
|
|
1096
|
+
icon: s(wt, null, null)
|
|
1102
1097
|
}
|
|
1103
1098
|
};
|
|
1104
1099
|
}
|
|
@@ -1107,33 +1102,32 @@ function Yl(e, a) {
|
|
|
1107
1102
|
const n = e[l];
|
|
1108
1103
|
if (!n)
|
|
1109
1104
|
return null;
|
|
1110
|
-
let
|
|
1111
|
-
if (typeof
|
|
1105
|
+
let o = n === !0 ? a[l] : () => n?.();
|
|
1106
|
+
if (typeof o != "function" && (o = () => {
|
|
1112
1107
|
}), l === "fullScreen")
|
|
1113
1108
|
return s("span", {
|
|
1114
1109
|
key: l,
|
|
1115
|
-
onClick:
|
|
1116
|
-
}, [s(
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1110
|
+
onClick: o
|
|
1111
|
+
}, [s(wt, null, null)]);
|
|
1112
|
+
const i = Nl()[l];
|
|
1113
|
+
return i ? s("span", {
|
|
1119
1114
|
key: l,
|
|
1120
|
-
onClick:
|
|
1121
|
-
}, [s(
|
|
1122
|
-
title:
|
|
1115
|
+
onClick: o
|
|
1116
|
+
}, [s(Te, {
|
|
1117
|
+
title: i.text
|
|
1123
1118
|
}, {
|
|
1124
|
-
default: () => [
|
|
1119
|
+
default: () => [i.icon]
|
|
1125
1120
|
})]) : null;
|
|
1126
1121
|
}).filter((l) => l);
|
|
1127
1122
|
}
|
|
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) {
|
|
@@ -1147,26 +1141,26 @@ const zl = {
|
|
|
1147
1141
|
fullScreen: () => l?.toggle()
|
|
1148
1142
|
}, Q(e.options) ? e.options : {}), [() => e.options]);
|
|
1149
1143
|
return () => {
|
|
1150
|
-
const
|
|
1151
|
-
return s(
|
|
1144
|
+
const o = e.actionsRender || [];
|
|
1145
|
+
return s(Tt, {
|
|
1152
1146
|
prefixCls: a,
|
|
1153
|
-
|
|
1154
|
-
actions: i,
|
|
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
|
-
function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll:
|
|
1163
|
+
function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o, neverScroll: i }) {
|
|
1170
1164
|
const d = I([]);
|
|
1171
1165
|
z([
|
|
1172
1166
|
() => e.value,
|
|
@@ -1174,17 +1168,17 @@ function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: i,
|
|
|
1174
1168
|
() => l.value,
|
|
1175
1169
|
() => n.value,
|
|
1176
1170
|
() => l.value,
|
|
1177
|
-
() =>
|
|
1178
|
-
() =>
|
|
1171
|
+
() => o.value,
|
|
1172
|
+
() => i.value
|
|
1179
1173
|
], () => {
|
|
1180
1174
|
const h = F(re(a.value));
|
|
1181
|
-
|
|
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,
|
|
@@ -1196,13 +1190,13 @@ function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: i,
|
|
|
1196
1190
|
}
|
|
1197
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,108 +1210,108 @@ function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: i,
|
|
|
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
|
};
|
|
1227
1221
|
}
|
|
1228
|
-
function
|
|
1229
|
-
const l = C(() => a), n = I(),
|
|
1230
|
-
function
|
|
1222
|
+
function kl(e, a) {
|
|
1223
|
+
const l = C(() => a), n = I(), o = I(e);
|
|
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 ?
|
|
1235
|
-
|
|
1236
|
-
p(await
|
|
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
|
}
|
|
1240
|
-
return Kt(
|
|
1241
|
-
cancel:
|
|
1234
|
+
return Kt(i), {
|
|
1235
|
+
cancel: i,
|
|
1242
1236
|
run: d
|
|
1243
1237
|
};
|
|
1244
1238
|
}
|
|
1245
|
-
function
|
|
1246
|
-
const a = C(() => e.rowKey), l = C(() => e.polling), n = C(() => e.debounceTime),
|
|
1239
|
+
function Hl(e) {
|
|
1240
|
+
const a = C(() => e.rowKey), l = C(() => e.polling), n = C(() => e.debounceTime), o = C(() => e.dataSource), i = C(() => e.autoRequest);
|
|
1247
1241
|
return {
|
|
1248
1242
|
rowKey: a,
|
|
1249
1243
|
polling: l,
|
|
1250
1244
|
request: e.request,
|
|
1251
1245
|
postData: e.postData,
|
|
1252
1246
|
debounceTime: n,
|
|
1253
|
-
dataSource:
|
|
1254
|
-
autoRequest:
|
|
1247
|
+
dataSource: o,
|
|
1248
|
+
autoRequest: i
|
|
1255
1249
|
};
|
|
1256
1250
|
}
|
|
1257
|
-
function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData:
|
|
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
|
-
const { pagination: N, filters: D = {}, sorter:
|
|
1255
|
+
const { pagination: N, filters: D = {}, sorter: k = {}, removeKeys: ue = [], isPolling: Z = !1, extra: ce } = $;
|
|
1262
1256
|
if (!n || !ze(n))
|
|
1263
|
-
return
|
|
1257
|
+
return i.value || [];
|
|
1264
1258
|
Z ? y(!0) : r(!0), N && b(N);
|
|
1265
1259
|
try {
|
|
1266
1260
|
ue.length && h(ue);
|
|
1267
|
-
const
|
|
1268
|
-
B(
|
|
1269
|
-
const xe =
|
|
1261
|
+
const H = Q(k) ? Object.keys(k).length ? [k] : [] : k;
|
|
1262
|
+
B(T(F).map((Ce) => {
|
|
1263
|
+
const xe = H.find((ve) => (ve?.columnKey || ve?.field) === Ce.dataIndex);
|
|
1270
1264
|
return {
|
|
1271
1265
|
...Ce,
|
|
1272
1266
|
sortOrder: xe?.order
|
|
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({
|
|
1283
1277
|
params: ye,
|
|
1284
|
-
sorter:
|
|
1278
|
+
sorter: H,
|
|
1285
1279
|
filter: D,
|
|
1286
1280
|
extra: ce
|
|
1287
1281
|
}));
|
|
1288
1282
|
let de = [];
|
|
1289
1283
|
const Be = `table_request_${gt().uuid(10)}`;
|
|
1290
1284
|
le.value = Be;
|
|
1291
|
-
const
|
|
1285
|
+
const ie = await n?.({
|
|
1292
1286
|
params: ee(re(ye)),
|
|
1293
|
-
sorter:
|
|
1287
|
+
sorter: H,
|
|
1294
1288
|
filter: D,
|
|
1295
1289
|
extra: ce
|
|
1296
1290
|
});
|
|
1297
1291
|
if (le.value !== Be)
|
|
1298
1292
|
return [];
|
|
1299
|
-
if (
|
|
1300
|
-
const { success: Ce = !0, data: xe = [] } =
|
|
1293
|
+
if (ie) {
|
|
1294
|
+
const { success: Ce = !0, data: xe = [] } = ie;
|
|
1301
1295
|
if (!Ce)
|
|
1302
1296
|
return [];
|
|
1303
|
-
de = typeof
|
|
1304
|
-
const ve =
|
|
1305
|
-
ve !==
|
|
1297
|
+
de = typeof o == "function" ? await o?.(xe) : xe, f(de);
|
|
1298
|
+
const ve = ie.total || de?.length || 0;
|
|
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
|
-
} catch (
|
|
1313
|
-
if (
|
|
1314
|
-
throw new Error(
|
|
1315
|
-
Y.value === void 0 && R([]),
|
|
1306
|
+
} catch (H) {
|
|
1307
|
+
if (oe === void 0)
|
|
1308
|
+
throw new Error(H);
|
|
1309
|
+
Y.value === void 0 && R([]), oe(H);
|
|
1316
1310
|
} finally {
|
|
1317
1311
|
ne(!0);
|
|
1318
1312
|
}
|
|
1319
1313
|
return [];
|
|
1320
|
-
}, J =
|
|
1314
|
+
}, J = kl(async ($ = {}) => {
|
|
1321
1315
|
if (G.value && clearTimeout(G.value), !n)
|
|
1322
1316
|
return;
|
|
1323
1317
|
const N = new AbortController();
|
|
@@ -1333,57 +1327,57 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: i, da
|
|
|
1333
1327
|
]);
|
|
1334
1328
|
if (N.signal.aborted)
|
|
1335
1329
|
return;
|
|
1336
|
-
const
|
|
1337
|
-
return
|
|
1338
|
-
J.run({ ...$, isPolling:
|
|
1339
|
-
}, Math.max(
|
|
1330
|
+
const k = _t(l.value, D);
|
|
1331
|
+
return k && !A.value && (G.value = setTimeout(() => {
|
|
1332
|
+
J.run({ ...$, isPolling: k });
|
|
1333
|
+
}, Math.max(k, 2e3))), D;
|
|
1340
1334
|
} catch (D) {
|
|
1341
1335
|
if (D === "aborted")
|
|
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, () => {
|
|
1359
1353
|
d.value ? r(!0) : J.run({ isPolling: !1 });
|
|
1360
|
-
}, { immediate: !0 }), z(() =>
|
|
1361
|
-
|
|
1354
|
+
}, { immediate: !0 }), z(() => i.value, () => {
|
|
1355
|
+
i.value && R(i.value || []);
|
|
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
|
-
n ? l.value || (q(), J.run({ isPolling: !1 })) : R(
|
|
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
|
|
1366
|
+
return T(Y);
|
|
1373
1367
|
const $ = F.value.filter((N) => N.show || N.show === void 0);
|
|
1374
|
-
return !
|
|
1375
|
-
}), u = C(() =>
|
|
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
|
}
|
|
1379
|
-
function g($, N = {}, D = {},
|
|
1380
|
-
q(), J.run({ pagination: $, filters: N, sorter: D, extra:
|
|
1373
|
+
function g($, N = {}, D = {}, k) {
|
|
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
|
}
|
|
@@ -1393,10 +1387,10 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: i, da
|
|
|
1393
1387
|
isTreeDataRef: u,
|
|
1394
1388
|
setTableDataList: R,
|
|
1395
1389
|
operateTableDataRow: ($) => {
|
|
1396
|
-
const { key: N, row: D, value:
|
|
1390
|
+
const { key: N, row: D, value: k, type: ue = "update" } = $, Z = N ?? e.value, ce = D?.[Z] ?? k;
|
|
1397
1391
|
switch (!D && ue !== "delete" && console.warn("row is required"), ue) {
|
|
1398
1392
|
case "update":
|
|
1399
|
-
Z && ce && D && (Y.value = Y.value.map((
|
|
1393
|
+
Z && ce && D && (Y.value = Y.value.map((H) => ce === H[Z] ? Se(H, D) : H));
|
|
1400
1394
|
break;
|
|
1401
1395
|
case "push":
|
|
1402
1396
|
D && Y.value.push(D);
|
|
@@ -1405,7 +1399,7 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: i, da
|
|
|
1405
1399
|
D && Y.value.unshift(D);
|
|
1406
1400
|
break;
|
|
1407
1401
|
case "delete":
|
|
1408
|
-
Z && (Y.value = Y.value.filter((
|
|
1402
|
+
Z && (Y.value = Y.value.filter((H) => k !== H[Z]));
|
|
1409
1403
|
break;
|
|
1410
1404
|
}
|
|
1411
1405
|
},
|
|
@@ -1417,14 +1411,14 @@ function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: i, da
|
|
|
1417
1411
|
}
|
|
1418
1412
|
function Kl(e) {
|
|
1419
1413
|
const a = I(l(e.loading.value));
|
|
1420
|
-
z(() => e.loading.value, (
|
|
1421
|
-
a.value = l(
|
|
1414
|
+
z(() => e.loading.value, (o) => {
|
|
1415
|
+
a.value = l(o, a.value);
|
|
1422
1416
|
});
|
|
1423
|
-
function l(
|
|
1424
|
-
return Re(
|
|
1417
|
+
function l(o, i = !1) {
|
|
1418
|
+
return Re(o) ? o : Q(o) ? o?.spinning ?? i : i;
|
|
1425
1419
|
}
|
|
1426
|
-
function n(
|
|
1427
|
-
a.value =
|
|
1420
|
+
function n(o) {
|
|
1421
|
+
a.value = o;
|
|
1428
1422
|
}
|
|
1429
1423
|
return [a, n];
|
|
1430
1424
|
}
|
|
@@ -1442,44 +1436,44 @@ 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;
|
|
1449
1443
|
return;
|
|
1450
1444
|
}
|
|
1451
|
-
const
|
|
1445
|
+
const i = ze(a) ? {
|
|
1452
1446
|
itemRender: ({
|
|
1453
|
-
page:
|
|
1447
|
+
page: m,
|
|
1454
1448
|
type: p,
|
|
1455
1449
|
originalElement: F
|
|
1456
1450
|
}) => a ? a({
|
|
1457
|
-
page:
|
|
1451
|
+
page: m,
|
|
1458
1452
|
type: p,
|
|
1459
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
|
|
1470
1464
|
});
|
|
1471
|
-
function i
|
|
1472
|
-
if (Q(l.value) && Q(
|
|
1465
|
+
function o(i) {
|
|
1466
|
+
if (Q(l.value) && Q(i)) {
|
|
1473
1467
|
const d = {};
|
|
1474
|
-
Object.keys(
|
|
1475
|
-
Object.prototype.hasOwnProperty.call(
|
|
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
|
}
|
|
1479
1473
|
return {
|
|
1480
1474
|
paginationInfo: l,
|
|
1481
1475
|
requestPagination: n,
|
|
1482
|
-
setPagination:
|
|
1476
|
+
setPagination: o
|
|
1483
1477
|
};
|
|
1484
1478
|
}
|
|
1485
1479
|
function Gl(e) {
|
|
@@ -1501,23 +1495,23 @@ function Xl(e, a) {
|
|
|
1501
1495
|
deep: !0,
|
|
1502
1496
|
immediate: !0
|
|
1503
1497
|
});
|
|
1504
|
-
const
|
|
1498
|
+
const o = (r, B) => {
|
|
1505
1499
|
const h = a.value?.type || "checkbox";
|
|
1506
1500
|
e.value && (B ? r?.[e.value] && h === "checkbox" ? (l.value.push(r[e.value]), n.value.push(r)) : (l.value = [r[e.value]], n.value = [r]) : (l.value = l.value.filter((f) => f !== r[e.value]), n.value = n.value.filter((f) => f[e.value] !== r[e.value])));
|
|
1507
|
-
},
|
|
1501
|
+
}, i = () => {
|
|
1508
1502
|
a.value && a.value?.onChange?.(l.value, n.value);
|
|
1509
1503
|
};
|
|
1510
1504
|
return {
|
|
1511
1505
|
selectedKeys: l,
|
|
1512
1506
|
selectedItems: n,
|
|
1513
|
-
selectRowKey:
|
|
1507
|
+
selectRowKey: o,
|
|
1514
1508
|
selectAllRowKey: (r, B, h) => {
|
|
1515
1509
|
e.value && (r ? B.map((f) => (l.value.every((x) => x !== f?.[e.value]) && f?.[e.value] && (l.value.push(f[e.value]), n.value.push(f)), f)) : h.map((f) => (l.value.includes(f?.[e.value]) && (l.value = l.value.filter((x) => x !== f[e.value]), n.value = n.value.filter((x) => x[e.value] !== f[e.value])), f)));
|
|
1516
1510
|
},
|
|
1517
1511
|
removeRowKeys: (r) => {
|
|
1518
|
-
l.value = l.value.filter((B) => !r.includes(B)), n.value = n.value.filter((B) => !r.includes(B?.[e.value || ""])),
|
|
1512
|
+
l.value = l.value.filter((B) => !r.includes(B)), n.value = n.value.filter((B) => !r.includes(B?.[e.value || ""])), i();
|
|
1519
1513
|
},
|
|
1520
|
-
changeRowKey:
|
|
1514
|
+
changeRowKey: i,
|
|
1521
1515
|
syncSelectedRows: (r) => {
|
|
1522
1516
|
if (e.value && l.value.length !== n.value.length) {
|
|
1523
1517
|
const B = n.value.map((f) => f[e.value]), h = l.value.filter((f) => !B.includes(f));
|
|
@@ -1527,7 +1521,7 @@ function Xl(e, a) {
|
|
|
1527
1521
|
}
|
|
1528
1522
|
},
|
|
1529
1523
|
clearAllRowKeys: () => {
|
|
1530
|
-
l.value = [], n.value = [],
|
|
1524
|
+
l.value = [], n.value = [], i();
|
|
1531
1525
|
}
|
|
1532
1526
|
};
|
|
1533
1527
|
}
|
|
@@ -1535,40 +1529,40 @@ function _l(e) {
|
|
|
1535
1529
|
const a = {};
|
|
1536
1530
|
return e.forEach((l) => {
|
|
1537
1531
|
let n = l.initialValue;
|
|
1538
|
-
const
|
|
1539
|
-
l.valueType ? !n &&
|
|
1532
|
+
const o = ["select", "number"], i = ["date", "time", "dateRange"], d = ["treeSelect", "numberRange"];
|
|
1533
|
+
l.valueType ? !n && o.includes(l.valueType) ? n = void 0 : !n && i.includes(l.valueType) ? n = null : !n && d.includes(l.valueType) ? n = [] : n || (n = "") : n || (n = ""), l.name === "dateRange" ? (a[l.rangeStartName || "start"] = n ? n[0] : null, a[l.rangeEndName || "end"] = n ? n[1] : null) : l.name && (a[l.name] = n);
|
|
1540
1534
|
}), a;
|
|
1541
1535
|
}
|
|
1542
1536
|
function Ql({ searchMap: e, columns: a }) {
|
|
1543
1537
|
const l = I([]), n = I({});
|
|
1544
|
-
function i
|
|
1545
|
-
|
|
1546
|
-
l.value.some((p) => p.name ===
|
|
1538
|
+
function o(i) {
|
|
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
|
-
const d = _l(
|
|
1542
|
+
const d = _l(i);
|
|
1549
1543
|
n.value = { ...n.value, ...d };
|
|
1550
1544
|
}
|
|
1551
1545
|
return z(() => e.value, () => {
|
|
1552
|
-
const
|
|
1553
|
-
e.value?.forEach((d) =>
|
|
1546
|
+
const i = [];
|
|
1547
|
+
e.value?.forEach((d) => i.push(d)), o(i);
|
|
1554
1548
|
}, { deep: !0, immediate: !0 }), z(() => a.value, () => {
|
|
1555
|
-
const
|
|
1549
|
+
const i = [];
|
|
1556
1550
|
a.value && a.value?.length && a.value.forEach((d) => {
|
|
1557
|
-
d.searchConfig &&
|
|
1558
|
-
}), i
|
|
1551
|
+
d.searchConfig && i.push(d.searchConfig);
|
|
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:
|
|
1562
|
-
const F = C(() => p.value ? De(p.value) ?
|
|
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
|
-
const
|
|
1569
|
-
return
|
|
1562
|
+
const oe = b.filter((te) => !Reflect.has(te, "width")).length;
|
|
1563
|
+
return oe !== 0 && (h += oe * x), f && (h += f), h;
|
|
1570
1564
|
});
|
|
1571
|
-
return { proScroll: C(() =>
|
|
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
1567
|
} : l.value ? F.value ? {} : Re(F.value) ? { x: r.value } : {} : {}), breakpoint: F };
|
|
1574
1568
|
}
|
|
@@ -1597,12 +1591,8 @@ const Xe = (e) => ({
|
|
|
1597
1591
|
const a = `${e.antCls}-table`;
|
|
1598
1592
|
return {
|
|
1599
1593
|
[e.componentCls]: {
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
color: e.colorText,
|
|
1603
|
-
"&:hover": {
|
|
1604
|
-
color: e.colorPrimaryHover
|
|
1605
|
-
}
|
|
1594
|
+
"&-header-after": {
|
|
1595
|
+
marginBlockEnd: e.margin
|
|
1606
1596
|
},
|
|
1607
1597
|
"&-a": {
|
|
1608
1598
|
cursor: "pointer",
|
|
@@ -1809,10 +1799,10 @@ function ea(e) {
|
|
|
1809
1799
|
}
|
|
1810
1800
|
function ta(e, a, l, n) {
|
|
1811
1801
|
if (!a) return e;
|
|
1812
|
-
let
|
|
1802
|
+
let o = e;
|
|
1813
1803
|
if (Q(a)) {
|
|
1814
|
-
const
|
|
1815
|
-
return s(
|
|
1804
|
+
const i = a.node === "a" ? "span" : a.node;
|
|
1805
|
+
return s(i, W(a?.attr || {}, {
|
|
1816
1806
|
class: [a.class, a.node === "a" ? `${l}-a` : ""],
|
|
1817
1807
|
onClick: a.click
|
|
1818
1808
|
}), ea(e) ? e : {
|
|
@@ -1821,28 +1811,28 @@ function ta(e, a, l, n) {
|
|
|
1821
1811
|
}
|
|
1822
1812
|
switch (a) {
|
|
1823
1813
|
case "link":
|
|
1824
|
-
|
|
1814
|
+
o = s("span", {
|
|
1825
1815
|
class: [`${l}-a`, n]
|
|
1826
1816
|
}, [e]);
|
|
1827
1817
|
break;
|
|
1828
1818
|
case "time":
|
|
1829
|
-
|
|
1819
|
+
o = V(e).format("HH:mm:ss");
|
|
1830
1820
|
break;
|
|
1831
1821
|
case "dateMonth":
|
|
1832
|
-
|
|
1822
|
+
o = `${V(e).month() + 1}月`;
|
|
1833
1823
|
break;
|
|
1834
1824
|
case "date":
|
|
1835
|
-
|
|
1825
|
+
o = V(e).format("YYYY-MM-DD");
|
|
1836
1826
|
break;
|
|
1837
1827
|
case "dateTime":
|
|
1838
|
-
|
|
1828
|
+
o = V(e).format("YYYY-MM-DD HH:mm:ss");
|
|
1839
1829
|
break;
|
|
1840
1830
|
}
|
|
1841
|
-
return
|
|
1831
|
+
return o;
|
|
1842
1832
|
}
|
|
1843
1833
|
function la(e, a) {
|
|
1844
1834
|
const l = a && a.current || 1, n = a && a.pageSize || 10;
|
|
1845
|
-
return e.filter((
|
|
1835
|
+
return e.filter((o, i) => i < l * n && i >= n * (l - 1));
|
|
1846
1836
|
}
|
|
1847
1837
|
function aa(e) {
|
|
1848
1838
|
const a = document.createElement("textarea");
|
|
@@ -1851,10 +1841,10 @@ function aa(e) {
|
|
|
1851
1841
|
function na(e) {
|
|
1852
1842
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !_(e);
|
|
1853
1843
|
}
|
|
1854
|
-
const
|
|
1844
|
+
const ia = {
|
|
1855
1845
|
reload: !0,
|
|
1856
1846
|
fullScreen: !0
|
|
1857
|
-
},
|
|
1847
|
+
}, oa = dl.useToken, _e = /* @__PURE__ */ we({
|
|
1858
1848
|
name: "GProTable",
|
|
1859
1849
|
inheritAttrs: !1,
|
|
1860
1850
|
props: ge,
|
|
@@ -1864,39 +1854,39 @@ const oa = {
|
|
|
1864
1854
|
emit: a,
|
|
1865
1855
|
slots: l,
|
|
1866
1856
|
attrs: n,
|
|
1867
|
-
expose:
|
|
1857
|
+
expose: o
|
|
1868
1858
|
}) {
|
|
1869
|
-
const
|
|
1859
|
+
const i = vt({
|
|
1870
1860
|
suffixCls: "table",
|
|
1871
1861
|
isPor: !0
|
|
1872
1862
|
}), {
|
|
1873
1863
|
wrapSSR: d,
|
|
1874
|
-
hashId:
|
|
1875
|
-
} = Je("ProBaseTable", [Zl],
|
|
1864
|
+
hashId: m
|
|
1865
|
+
} = Je("ProBaseTable", [Zl], i), {
|
|
1876
1866
|
token: p
|
|
1877
|
-
} =
|
|
1867
|
+
} = oa(), F = Gt(), r = ft(), {
|
|
1878
1868
|
width: B
|
|
1879
|
-
} =
|
|
1880
|
-
zt(() =>
|
|
1869
|
+
} = ol(), h = I(!1), f = dt(), x = I(), b = I(), j = I(e.waitRequest);
|
|
1870
|
+
zt(() => j.value = e.waitRequest);
|
|
1881
1871
|
const {
|
|
1882
|
-
toggle:
|
|
1872
|
+
toggle: oe,
|
|
1883
1873
|
isFullscreen: te
|
|
1884
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(() => {
|
|
1885
1875
|
if (e.form === !1) return !1;
|
|
1886
|
-
const
|
|
1876
|
+
const v = {
|
|
1887
1877
|
actions: {
|
|
1888
1878
|
resetReload: !0
|
|
1889
1879
|
},
|
|
1890
1880
|
resetText: "重置",
|
|
1891
1881
|
searchText: "查询"
|
|
1892
1882
|
};
|
|
1893
|
-
return Q(e.form) ? Se(
|
|
1894
|
-
}),
|
|
1895
|
-
const
|
|
1896
|
-
const
|
|
1897
|
-
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;
|
|
1898
1888
|
});
|
|
1899
|
-
return Zt(
|
|
1889
|
+
return Zt(v, {
|
|
1900
1890
|
align: e.align || "left",
|
|
1901
1891
|
showIndex: e.showIndex ?? !1
|
|
1902
1892
|
});
|
|
@@ -1910,7 +1900,7 @@ const oa = {
|
|
|
1910
1900
|
setPagination: t
|
|
1911
1901
|
} = Vl({
|
|
1912
1902
|
pagination: M(e, "pagination"),
|
|
1913
|
-
pageItemRender:
|
|
1903
|
+
pageItemRender: it({
|
|
1914
1904
|
slots: l,
|
|
1915
1905
|
props: e,
|
|
1916
1906
|
key: "pageItemRender"
|
|
@@ -1947,15 +1937,15 @@ const oa = {
|
|
|
1947
1937
|
columns: G
|
|
1948
1938
|
}), {
|
|
1949
1939
|
selectedKeys: D,
|
|
1950
|
-
selectedItems:
|
|
1940
|
+
selectedItems: k,
|
|
1951
1941
|
changeRowKey: ue,
|
|
1952
1942
|
selectRowKey: Z,
|
|
1953
1943
|
selectAllRowKey: ce,
|
|
1954
|
-
syncSelectedRows:
|
|
1944
|
+
syncSelectedRows: H,
|
|
1955
1945
|
removeRowKeys: ye,
|
|
1956
1946
|
clearAllRowKeys: de
|
|
1957
|
-
} = Xl(M(e, "rowKey"), M(e, "rowSelection")), Be =
|
|
1958
|
-
run:
|
|
1947
|
+
} = Xl(M(e, "rowKey"), M(e, "rowSelection")), Be = Hl(e), {
|
|
1948
|
+
run: ie,
|
|
1959
1949
|
setTableDataList: Ce,
|
|
1960
1950
|
operateTableDataRow: xe,
|
|
1961
1951
|
isTreeDataRef: ve,
|
|
@@ -1963,13 +1953,13 @@ const oa = {
|
|
|
1963
1953
|
handleTableChange: Me
|
|
1964
1954
|
} = ql({
|
|
1965
1955
|
...Be,
|
|
1966
|
-
waitRequest:
|
|
1956
|
+
waitRequest: j
|
|
1967
1957
|
}, {
|
|
1968
1958
|
loading: U,
|
|
1969
1959
|
pageInfo: se,
|
|
1970
1960
|
setPagination: t,
|
|
1971
1961
|
removeRowKeys: ye,
|
|
1972
|
-
syncSelectedRows:
|
|
1962
|
+
syncSelectedRows: H,
|
|
1973
1963
|
setLoading: ne,
|
|
1974
1964
|
setColumns: R,
|
|
1975
1965
|
columns: g,
|
|
@@ -1979,87 +1969,87 @@ const oa = {
|
|
|
1979
1969
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
1980
1970
|
hasCustomRender: C(() => qe(e.customRender || l?.customRender))
|
|
1981
1971
|
}, a), Rt = C(() => ({
|
|
1982
|
-
size:
|
|
1983
|
-
scroll:
|
|
1984
|
-
dataSource:
|
|
1985
|
-
pagination:
|
|
1972
|
+
size: T(be),
|
|
1973
|
+
scroll: T(u),
|
|
1974
|
+
dataSource: T(he),
|
|
1975
|
+
pagination: T(q),
|
|
1986
1976
|
virtualScroll: pe.value,
|
|
1987
|
-
columns:
|
|
1977
|
+
columns: T(g).filter((v) => v.show || v.show === void 0)
|
|
1988
1978
|
})), et = C(() => {
|
|
1989
|
-
const
|
|
1990
|
-
return !
|
|
1979
|
+
const v = Q(e.loading) ? Ie(e.loading, "spinning") : {};
|
|
1980
|
+
return !v.indicator && f?.indicator?.value && (v.indicator = f?.indicator?.value), {
|
|
1991
1981
|
spinning: e.showLoading ? qe(U.value) : !1,
|
|
1992
|
-
...
|
|
1982
|
+
...v
|
|
1993
1983
|
};
|
|
1994
1984
|
}), tt = C(() => {
|
|
1995
|
-
let
|
|
1996
|
-
const
|
|
1997
|
-
if (
|
|
1998
|
-
const P =
|
|
1999
|
-
!P && !
|
|
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", ""));
|
|
2000
1990
|
} else
|
|
2001
|
-
|
|
2002
|
-
return
|
|
1991
|
+
v = w;
|
|
1992
|
+
return v;
|
|
2003
1993
|
});
|
|
2004
1994
|
Ml(() => {
|
|
2005
|
-
h.value && e.keepAliveReload ?
|
|
1995
|
+
h.value && e.keepAliveReload ? ie() : h.value = !0;
|
|
2006
1996
|
});
|
|
2007
|
-
const $t = async (
|
|
1997
|
+
const $t = async (v, w) => {
|
|
2008
1998
|
if (me.value) {
|
|
2009
|
-
|
|
2010
|
-
params:
|
|
1999
|
+
ie({
|
|
2000
|
+
params: v
|
|
2011
2001
|
});
|
|
2012
2002
|
return;
|
|
2013
2003
|
}
|
|
2014
|
-
|
|
2015
|
-
params:
|
|
2016
|
-
})) : e.request && (a("submit",
|
|
2017
|
-
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
|
|
2018
2008
|
}));
|
|
2019
|
-
}, We = (
|
|
2020
|
-
t(
|
|
2021
|
-
}, Pt = (
|
|
2022
|
-
a("expandedRowsChange",
|
|
2023
|
-
}, Ft = (
|
|
2024
|
-
a("expand",
|
|
2025
|
-
}, Dt = (
|
|
2026
|
-
let P =
|
|
2027
|
-
if (
|
|
2028
|
-
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, {
|
|
2029
2019
|
cssObject: {
|
|
2030
2020
|
fontSize: "14px",
|
|
2031
2021
|
lineHeight: "22px",
|
|
2032
2022
|
fontFamily: F?.token?.value?.fontFamily || p?.value?.fontFamily,
|
|
2033
|
-
...
|
|
2023
|
+
...E?.targetStyle || {}
|
|
2034
2024
|
}
|
|
2035
|
-
}) : 0,
|
|
2036
|
-
class: `${
|
|
2037
|
-
}, [
|
|
2038
|
-
title:
|
|
2039
|
-
getPopupContainer: (
|
|
2040
|
-
}, Q(
|
|
2025
|
+
}) : 0, Oe = document.querySelector(`.${i} .ant-table-tbody`), je = s("div", {
|
|
2026
|
+
class: `${i}-ellipsis-text`
|
|
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 : {}, {
|
|
2041
2031
|
destroyTooltipOnHide: !0
|
|
2042
|
-
}), na(
|
|
2043
|
-
default: () => [
|
|
2032
|
+
}), na(je) ? je : {
|
|
2033
|
+
default: () => [je]
|
|
2044
2034
|
});
|
|
2045
2035
|
if (P = s("div", {
|
|
2046
|
-
class: `${
|
|
2036
|
+
class: `${i}-ellipsis ${E?.class ?? ""}`,
|
|
2047
2037
|
style: {
|
|
2048
2038
|
"-webkit-line-clamp": X
|
|
2049
2039
|
}
|
|
2050
|
-
}, [at()]),
|
|
2051
|
-
const
|
|
2040
|
+
}, [at()]), S.copyable) {
|
|
2041
|
+
const ke = typeof S.copyText == "function" ? S.copyText?.(S) : S.copyText || O;
|
|
2052
2042
|
P = s("div", {
|
|
2053
|
-
class: `${
|
|
2043
|
+
class: `${i}-copyable`
|
|
2054
2044
|
}, [s("div", {
|
|
2055
|
-
class: `${
|
|
2045
|
+
class: `${i}-ellipsis ${E?.class ?? ""}`,
|
|
2056
2046
|
style: {
|
|
2057
2047
|
"-webkit-line-clamp": X
|
|
2058
2048
|
}
|
|
2059
2049
|
}, [at()]), s(qt, {
|
|
2060
|
-
class: `${
|
|
2050
|
+
class: `${i}-copyable-icon`,
|
|
2061
2051
|
onClick: () => {
|
|
2062
|
-
aa(
|
|
2052
|
+
aa(ke), vl.success("复制成功");
|
|
2063
2053
|
}
|
|
2064
2054
|
}, null)]);
|
|
2065
2055
|
}
|
|
@@ -2067,32 +2057,32 @@ const oa = {
|
|
|
2067
2057
|
return P;
|
|
2068
2058
|
};
|
|
2069
2059
|
function lt() {
|
|
2070
|
-
const
|
|
2060
|
+
const v = al({
|
|
2071
2061
|
slots: l,
|
|
2072
2062
|
props: e,
|
|
2073
2063
|
key: "emptyText"
|
|
2074
2064
|
});
|
|
2075
|
-
if (
|
|
2076
|
-
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]);
|
|
2077
2067
|
return s("div", {
|
|
2078
|
-
class: ae(`${
|
|
2068
|
+
class: ae(`${i}-empty-text`, m.value, e.emptyTextProps?.class),
|
|
2079
2069
|
style: e.emptyTextProps?.style
|
|
2080
|
-
}, [
|
|
2070
|
+
}, [O ? E : K(E) ? E.map((X) => Qe(X, S)) : s(hl, null, null)]);
|
|
2081
2071
|
}
|
|
2082
2072
|
return null;
|
|
2083
2073
|
}
|
|
2084
2074
|
const Bt = () => {
|
|
2085
|
-
const
|
|
2075
|
+
const v = it({
|
|
2086
2076
|
slots: l,
|
|
2087
2077
|
props: e,
|
|
2088
2078
|
key: "customRender"
|
|
2089
2079
|
});
|
|
2090
|
-
if (
|
|
2080
|
+
if (v) {
|
|
2091
2081
|
if (he.value?.length) {
|
|
2092
|
-
const
|
|
2093
|
-
return
|
|
2094
|
-
dataSource:
|
|
2095
|
-
currentData: la(
|
|
2082
|
+
const w = ee(T(he));
|
|
2083
|
+
return v?.({
|
|
2084
|
+
dataSource: w,
|
|
2085
|
+
currentData: la(w, q.value)
|
|
2096
2086
|
});
|
|
2097
2087
|
}
|
|
2098
2088
|
return lt();
|
|
@@ -2104,25 +2094,25 @@ const oa = {
|
|
|
2104
2094
|
columns: g,
|
|
2105
2095
|
cacheColumns: G,
|
|
2106
2096
|
isMobile: $e,
|
|
2107
|
-
formConfig:
|
|
2097
|
+
formConfig: A,
|
|
2108
2098
|
formAutoRequest: me,
|
|
2109
2099
|
formActions: Y,
|
|
2110
2100
|
action: {
|
|
2111
2101
|
setTableSize: J,
|
|
2112
|
-
reload: (
|
|
2113
|
-
toggle:
|
|
2102
|
+
reload: (v) => ie(v),
|
|
2103
|
+
toggle: oe
|
|
2114
2104
|
},
|
|
2115
2105
|
setPagination: t
|
|
2116
|
-
}),
|
|
2106
|
+
}), o({
|
|
2117
2107
|
formRef: () => ({
|
|
2118
2108
|
getFormSearch: () => ({
|
|
2119
|
-
...
|
|
2109
|
+
...T(N),
|
|
2120
2110
|
...b.value?.getFormSearch(),
|
|
2121
2111
|
...e.params
|
|
2122
2112
|
}),
|
|
2123
2113
|
getFormInnerState: () => b.value?.getFormSearch() || {},
|
|
2124
|
-
restFormState: (
|
|
2125
|
-
|
|
2114
|
+
restFormState: (v) => {
|
|
2115
|
+
j.value = !0, v && v?.(), b.value?.resetForm(!1), j.value = !1;
|
|
2126
2116
|
}
|
|
2127
2117
|
}),
|
|
2128
2118
|
actionRef: () => ({
|
|
@@ -2131,21 +2121,21 @@ const oa = {
|
|
|
2131
2121
|
pageInfo: se,
|
|
2132
2122
|
pagination: q.value,
|
|
2133
2123
|
selectedKeys: C(() => D.value),
|
|
2134
|
-
selectedItems: C(() =>
|
|
2124
|
+
selectedItems: C(() => k.value),
|
|
2135
2125
|
rowsSelection: {
|
|
2136
2126
|
clear: de,
|
|
2137
2127
|
select: Z,
|
|
2138
2128
|
remove: ye,
|
|
2139
|
-
sync:
|
|
2129
|
+
sync: H,
|
|
2140
2130
|
selectAll: ce
|
|
2141
2131
|
},
|
|
2142
|
-
reload:
|
|
2143
|
-
getLoadingStatus: () =>
|
|
2144
|
-
reloadAndReset: async (
|
|
2145
|
-
|
|
2132
|
+
reload: ie,
|
|
2133
|
+
getLoadingStatus: () => T(U),
|
|
2134
|
+
reloadAndReset: async (v) => {
|
|
2135
|
+
j.value = !0, t({
|
|
2146
2136
|
current: 1,
|
|
2147
2137
|
pageSize: se?.pageSize || 10
|
|
2148
|
-
}),
|
|
2138
|
+
}), v && v?.callBack && (v.wait ? await v.callBack() : v.callBack()), b.value?.resetForm(!0), j.value = !1;
|
|
2149
2139
|
},
|
|
2150
2140
|
setPageInfo: We,
|
|
2151
2141
|
setTableDataList: Ce,
|
|
@@ -2154,68 +2144,69 @@ const oa = {
|
|
|
2154
2144
|
setLoading: ne
|
|
2155
2145
|
})
|
|
2156
2146
|
}), () => {
|
|
2157
|
-
const
|
|
2147
|
+
const v = qe(e.customRender || l.customRender), w = l.actions?.() || e.actionProps?.actions, S = el({
|
|
2158
2148
|
slots: l,
|
|
2159
2149
|
props: e,
|
|
2160
|
-
keys: ["headerTitle", "
|
|
2150
|
+
keys: ["headerTitle", "headerTitleTip", "headerAfter"],
|
|
2161
2151
|
render: !0
|
|
2162
2152
|
});
|
|
2163
2153
|
return d(s("div", {
|
|
2164
2154
|
ref: x,
|
|
2165
2155
|
class: ae([{
|
|
2166
|
-
[`${
|
|
2167
|
-
[`${
|
|
2156
|
+
[`${m.value}`]: !0,
|
|
2157
|
+
[`${i}`]: !0,
|
|
2168
2158
|
[`${n.class}`]: n.class,
|
|
2169
|
-
[`${
|
|
2170
|
-
[`${
|
|
2171
|
-
[`${
|
|
2172
|
-
[`${
|
|
2159
|
+
[`${i}-beautify-scroll`]: Re(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
|
|
2160
|
+
[`${i}-no-scroll`]: !Object.keys(T(u) || {}).length,
|
|
2161
|
+
[`${i}-table-tree`]: ve.value,
|
|
2162
|
+
[`${i}-full-screen`]: te.value
|
|
2173
2163
|
}]),
|
|
2174
2164
|
style: n.style
|
|
2175
2165
|
}, [s("div", {
|
|
2176
|
-
class: [`${
|
|
2177
|
-
}, [($.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, {
|
|
2178
2168
|
ref: b,
|
|
2179
2169
|
modalScroll: e.modalScroll,
|
|
2180
2170
|
cardBordered: e.cardBordered,
|
|
2181
2171
|
formCols: $.value,
|
|
2182
|
-
prefixCls:
|
|
2183
|
-
loading:
|
|
2172
|
+
prefixCls: i,
|
|
2173
|
+
loading: T(U),
|
|
2184
2174
|
onSearch: $t,
|
|
2185
2175
|
defaultFormSearch: N.value
|
|
2186
2176
|
}, {
|
|
2187
2177
|
default: l.form ? () => l.form?.() : null
|
|
2188
2178
|
}), s("div", {
|
|
2189
|
-
class: ae(
|
|
2190
|
-
}, [s(
|
|
2179
|
+
class: ae(m.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
|
|
2180
|
+
}, [s(Ll, {
|
|
2191
2181
|
options: e.options ? {
|
|
2192
|
-
...
|
|
2182
|
+
...ia,
|
|
2193
2183
|
...Q(e.options) ? e.options : {}
|
|
2194
2184
|
} : !1,
|
|
2195
2185
|
titleTipText: e.titleTipText,
|
|
2196
2186
|
actionsPlacement: e.actionProps?.placement,
|
|
2197
|
-
actionsRender:
|
|
2198
|
-
headerTitle:
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
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, {
|
|
2202
2193
|
default: () => [s("div", {
|
|
2203
|
-
class: `${
|
|
2194
|
+
class: `${i}-wrapper ${m.value}`
|
|
2204
2195
|
}, [s("div", {
|
|
2205
|
-
class: ae(`${
|
|
2196
|
+
class: ae(`${i}-list`, m.value, e.tableProps?.class),
|
|
2206
2197
|
style: e.tableProps?.style
|
|
2207
2198
|
}, [Bt()]), e.pagination !== !1 && he.value?.length > 0 && s(fl, W({
|
|
2208
2199
|
class: {
|
|
2209
|
-
[`${
|
|
2210
|
-
[`${
|
|
2200
|
+
[`${i}-pagination ${m.value}`]: !0,
|
|
2201
|
+
[`${i}-pagination-${tt.value} ${m.value}`]: !!tt.value
|
|
2211
2202
|
}
|
|
2212
|
-
}, re(
|
|
2213
|
-
onChange: (P,
|
|
2203
|
+
}, re(T(q)), {
|
|
2204
|
+
onChange: (P, O) => We({
|
|
2214
2205
|
current: P,
|
|
2215
|
-
pageSize:
|
|
2206
|
+
pageSize: O
|
|
2216
2207
|
})
|
|
2217
2208
|
}), null)])]
|
|
2218
|
-
}) : s(ml, W(
|
|
2209
|
+
}) : s(ml, W(Ee(e, Object.keys(St)), Rt.value, {
|
|
2219
2210
|
style: e.tableProps?.style,
|
|
2220
2211
|
class: e.tableProps?.class,
|
|
2221
2212
|
loading: et.value,
|
|
@@ -2223,18 +2214,18 @@ const oa = {
|
|
|
2223
2214
|
transformCellText: (P) => {
|
|
2224
2215
|
e.transformCellText && typeof e.transformCellText && e.transformCellText?.(P);
|
|
2225
2216
|
const {
|
|
2226
|
-
column:
|
|
2217
|
+
column: O
|
|
2227
2218
|
} = P;
|
|
2228
|
-
if (!
|
|
2229
|
-
const
|
|
2230
|
-
let X = !0,
|
|
2231
|
-
if (K(
|
|
2232
|
-
if (
|
|
2233
|
-
|
|
2234
|
-
const
|
|
2235
|
-
X =
|
|
2236
|
-
} else
|
|
2237
|
-
return
|
|
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;
|
|
2238
2229
|
},
|
|
2239
2230
|
rowSelection: e.rowSelection ? {
|
|
2240
2231
|
...Ie(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
@@ -2246,7 +2237,7 @@ const oa = {
|
|
|
2246
2237
|
onChange: We,
|
|
2247
2238
|
onExpandedRowsChange: Pt,
|
|
2248
2239
|
onExpand: Ft,
|
|
2249
|
-
onResizeColumn: (P,
|
|
2240
|
+
onResizeColumn: (P, O) => Dt(P, O)
|
|
2250
2241
|
}), {
|
|
2251
2242
|
...l,
|
|
2252
2243
|
emptyText: () => lt()
|
|
@@ -2262,9 +2253,9 @@ function Ca(e, a) {
|
|
|
2262
2253
|
searchMap: []
|
|
2263
2254
|
};
|
|
2264
2255
|
if (a?.state) {
|
|
2265
|
-
if (
|
|
2256
|
+
if (He(a.state) && Q(a.state.value))
|
|
2266
2257
|
return Se(r, ee(a.state.value));
|
|
2267
|
-
if (Q(a.state) && !
|
|
2258
|
+
if (Q(a.state) && !He(a.state))
|
|
2268
2259
|
return Se(r, ee(a.state));
|
|
2269
2260
|
}
|
|
2270
2261
|
return r;
|
|
@@ -2272,17 +2263,17 @@ function Ca(e, a) {
|
|
|
2272
2263
|
const n = Ue(Se(l(), {
|
|
2273
2264
|
request: a?.request
|
|
2274
2265
|
}));
|
|
2275
|
-
a?.state && z(() => a.state &&
|
|
2266
|
+
a?.state && z(() => a.state && He(a.state) ? a.state.value : a.state, () => {
|
|
2276
2267
|
p();
|
|
2277
2268
|
}, { deep: !0 });
|
|
2278
|
-
const
|
|
2279
|
-
...
|
|
2280
|
-
...
|
|
2281
|
-
})),
|
|
2282
|
-
z(() =>
|
|
2283
|
-
|
|
2284
|
-
}), z(
|
|
2285
|
-
|
|
2269
|
+
const o = C(() => e.value ? e.value.actionRef() : {}), i = C(() => e.value ? e.value.formRef() : {}), d = C(() => ({
|
|
2270
|
+
...o.value.pageInfo || {},
|
|
2271
|
+
...i.value.getFormSearch?.() || {}
|
|
2272
|
+
})), m = I(!!o.value.loading?.value);
|
|
2273
|
+
z(() => o.value.loading?.value, (r) => {
|
|
2274
|
+
m.value = !!r;
|
|
2275
|
+
}), z(m, (r) => {
|
|
2276
|
+
o.value?.setLoading?.(!!r);
|
|
2286
2277
|
});
|
|
2287
2278
|
function p() {
|
|
2288
2279
|
nl(n, l());
|
|
@@ -2291,22 +2282,22 @@ function Ca(e, a) {
|
|
|
2291
2282
|
n.searchMap && (n.searchMap = ee(n.searchMap).map((h) => h.name === r ? Se(h, B) : h));
|
|
2292
2283
|
}
|
|
2293
2284
|
return {
|
|
2294
|
-
formRef:
|
|
2295
|
-
actionRef:
|
|
2285
|
+
formRef: i,
|
|
2286
|
+
actionRef: o,
|
|
2296
2287
|
tableState: n,
|
|
2297
2288
|
requestSearch: d,
|
|
2298
|
-
loading:
|
|
2299
|
-
dataSource: C(() =>
|
|
2300
|
-
selectedKeys: C(() =>
|
|
2301
|
-
selectedItems: C(() =>
|
|
2302
|
-
rowsSelection:
|
|
2303
|
-
setTableDataList: (r) =>
|
|
2304
|
-
reloadAndReset: (r) =>
|
|
2305
|
-
setPageInfo: (r, B, h, f) =>
|
|
2306
|
-
setPagination: (r) =>
|
|
2307
|
-
setLoading: (r) =>
|
|
2308
|
-
operateTableDataRow: (r) =>
|
|
2309
|
-
reload: (r) =>
|
|
2289
|
+
loading: m,
|
|
2290
|
+
dataSource: C(() => o?.value?.dataSource?.value || []),
|
|
2291
|
+
selectedKeys: C(() => o?.value?.selectedKeys?.value || []),
|
|
2292
|
+
selectedItems: C(() => o?.value?.selectedItems?.value || []),
|
|
2293
|
+
rowsSelection: o?.value?.rowsSelection,
|
|
2294
|
+
setTableDataList: (r) => o.value?.setTableDataList?.(r),
|
|
2295
|
+
reloadAndReset: (r) => o.value?.reloadAndReset?.(r),
|
|
2296
|
+
setPageInfo: (r, B, h, f) => o.value?.setPageInfo?.(r, B, h, f),
|
|
2297
|
+
setPagination: (r) => o.value?.setPagination?.(r),
|
|
2298
|
+
setLoading: (r) => m.value = r,
|
|
2299
|
+
operateTableDataRow: (r) => o.value?.operateTableDataRow?.(r),
|
|
2300
|
+
reload: (r) => o.value?.reload?.(r),
|
|
2310
2301
|
updateSearchMap: F
|
|
2311
2302
|
};
|
|
2312
2303
|
}
|