@gx-design-vue/pro-table 0.2.0-beta.115 → 0.2.0-beta.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pro-table.js CHANGED
@@ -1,6 +1,6 @@
1
- import { deepMerge as Tt, isObject as V, cloneDeep as te, isArray as X, isBoolean as le, classNames as re, isNumber as je, filterEmpty as $t, getPrefixCls as at, getRandomNumber as lt, genColumnKey as Rt, isDeepEqualReact as Le, compareArray as il, runFunction as ul, convertValueBoolean as Te, getSortIndex as sl, isFunction as ke, handleCurrentPage as rl, getSlot as Ft, arrayRepeat as cl, isString as Bt, handleShowIndex as dl, handleEmptyField as fl, getSlotVNode as we, getTextWidth as hl } from "@gx-design-vue/pro-utils";
2
- import { toReactive as ml, useDebounceFn as vl, useFullscreen as It, useWindowSize as gl } from "@vueuse/core";
3
- import { ref as I, isRef as Qe, watch as M, isReactive as pl, computed as S, toRaw as ve, defineComponent as ne, cloneVNode as Ve, reactive as be, watchEffect as Ee, createVNode as u, Fragment as Ae, isVNode as U, mergeProps as E, h as Pt, unref as b, createTextVNode as Oe, renderSlot as yl, onActivated as bl, nextTick as Cl, getCurrentInstance as xl, onUnmounted as Sl, onDeactivated as wl, onMounted as Tl, toRef as se } from "vue";
1
+ import { deepMerge as Tt, isObject as V, cloneDeep as Z, isArray as X, isBoolean as le, classNames as re, isNumber as je, filterEmpty as $t, getPrefixCls as at, getRandomNumber as lt, genColumnKey as Rt, isDeepEqualReact as Le, compareArray as il, runFunction as ul, convertValueBoolean as Te, getSortIndex as sl, isFunction as ke, handleCurrentPage as rl, getSlot as Ft, arrayRepeat as cl, isString as Bt, handleShowIndex as dl, handleEmptyField as fl, getSlotVNode as we, getTextWidth as ml } from "@gx-design-vue/pro-utils";
2
+ import { toReactive as hl, useDebounceFn as vl, useFullscreen as It, useWindowSize as gl } from "@vueuse/core";
3
+ import { ref as I, isRef as Qe, watch as E, isReactive as pl, computed as S, toRaw as ve, defineComponent as ne, cloneVNode as Ve, reactive as be, watchEffect as Ee, createVNode as u, Fragment as Ae, isVNode as U, mergeProps as M, h as Pt, unref as b, createTextVNode as Oe, renderSlot as yl, onActivated as bl, nextTick as Cl, getCurrentInstance as xl, onUnmounted as Sl, onDeactivated as wl, onMounted as Tl, toRef as se } from "vue";
4
4
  import { tableProps as $l } from "ant-design-vue/es/table/Table";
5
5
  import { omit as Ne, cloneDeep as kt, pick as bt } from "lodash-es";
6
6
  import "ant-design-vue/es/_util/props-util";
@@ -15,12 +15,12 @@ function rn(e, a) {
15
15
  function l() {
16
16
  if (a?.state) {
17
17
  if (Qe(a.state) && V(a.state.value))
18
- return te({
18
+ return Z({
19
19
  ...a.state.value,
20
20
  params: a.state.value?.params || {}
21
21
  });
22
22
  if (V(a.state) && !Qe(a.state))
23
- return te({
23
+ return Z({
24
24
  ...ve(a.state),
25
25
  params: a.state?.params || {}
26
26
  });
@@ -31,18 +31,18 @@ function rn(e, a) {
31
31
  ...l(),
32
32
  request: a?.request
33
33
  });
34
- a?.state && (Qe(a.state) ? M(() => a.state.value, () => {
34
+ a?.state && (Qe(a.state) ? E(() => a.state.value, () => {
35
35
  g();
36
- }, { deep: !0 }) : pl(a.state) && M(() => a?.state, () => {
36
+ }, { deep: !0 }) : pl(a.state) && E(() => a?.state, () => {
37
37
  g();
38
38
  }, { deep: !0 }));
39
39
  const o = S(() => e?.value?.actionRef?.()), i = S(() => e?.value?.formRef?.()), d = S(() => ({
40
40
  ...o.value?.pageState || {},
41
41
  ...i.value?.getFormState?.() || {}
42
- })), h = I(!!o.value?.loading?.value);
43
- M(() => o.value?.loading?.value, (p) => {
44
- h.value = !!p;
45
- }), M(h, (p) => {
42
+ })), m = I(!!o.value?.loading?.value);
43
+ E(() => o.value?.loading?.value, (p) => {
44
+ m.value = !!p;
45
+ }), E(m, (p) => {
46
46
  o.value?.setLoading?.(!!p);
47
47
  });
48
48
  function g() {
@@ -54,9 +54,9 @@ function rn(e, a) {
54
54
  return {
55
55
  formRef: i,
56
56
  actionRef: o,
57
- tableState: ml(n),
57
+ tableState: hl(n),
58
58
  requestSearch: d,
59
- loading: h,
59
+ loading: m,
60
60
  dataSource: S(() => o?.value?.dataSource?.value || []),
61
61
  selectedKeys: S(() => o?.value?.selectedKeys?.value || []),
62
62
  selectedItems: S(() => o?.value?.selectedItems?.value || []),
@@ -65,7 +65,7 @@ function rn(e, a) {
65
65
  reloadAndReset: (p) => o.value?.reloadAndReset?.(p),
66
66
  setPageAndReload: (p, r, C, c) => o.value?.setPageAndReload?.(p, r, C, c),
67
67
  setPagination: (p) => o.value?.setPagination?.(p),
68
- setLoading: (p) => h.value = p,
68
+ setLoading: (p) => m.value = p,
69
69
  setDataValue: (p) => o.value?.setDataValue?.(p),
70
70
  reload: (p) => o.value?.reload?.(p)
71
71
  };
@@ -390,13 +390,13 @@ const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
390
390
  slots: a
391
391
  }) {
392
392
  const l = I([]), n = I(e.loading ?? !1), o = I("init"), i = vl(e.fetch, e.debounceTime || 10);
393
- return M([() => e.fetch, () => e.manual], () => {
393
+ return E([() => e.fetch, () => e.manual], () => {
394
394
  if (o.value !== "init" && n.value) return;
395
395
  const d = e.manual ?? !1;
396
- e.fetch && !d && (n.value = !0, i().then((h) => {
397
- l.value = kt(h), o.value = "success";
398
- }).catch((h) => {
399
- console.error(h), o.value = "error";
396
+ e.fetch && !d && (n.value = !0, i().then((m) => {
397
+ l.value = kt(m), o.value = "success";
398
+ }).catch((m) => {
399
+ console.error(m), o.value = "error";
400
400
  }).finally(() => {
401
401
  n.value = !1;
402
402
  }));
@@ -529,7 +529,7 @@ const la = (e) => ({
529
529
  { value: "sm", span: 2 },
530
530
  { value: "xs", span: 1 }
531
531
  ];
532
- function me(e, a) {
532
+ function he(e, a) {
533
533
  return typeof a == "function" ? a(H(e)) : H(e).format(a);
534
534
  }
535
535
  function Pe(e, a) {
@@ -540,8 +540,8 @@ const St = (e, a, l = "string") => {
540
540
  const [n, o] = e;
541
541
  let i, d;
542
542
  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") {
543
- const h = n ? me(n, i) : "", g = o ? me(o, d) : "";
544
- return [h, g];
543
+ const m = n ? he(n, i) : "", g = o ? he(o, d) : "";
544
+ return [m, g];
545
545
  }
546
546
  return [H(n), H(o)];
547
547
  }
@@ -586,16 +586,16 @@ const Mt = /* @__PURE__ */ ne({
586
586
  wrapSSR: n,
587
587
  hashId: o
588
588
  } = qe("ProTableForm", [la], e.prefixCls), i = Ot(), d = na(), {
589
- manualSearch: h,
589
+ manualSearch: m,
590
590
  searchConfig: g,
591
591
  searchActions: p
592
592
  } = fe(), {
593
593
  formState: r,
594
594
  resetFormState: C,
595
595
  changeFormState: c
596
- } = ta(e.defaultParams || {}, e.searchMap || []), m = I(g.value?.collapsed ?? g.value?.defaultCollapsed), x = S(() => le(p.value?.reset) ? p.value?.reset : h.value), v = S(() => P(g.value?.span)), F = S(() => g.value?.label);
597
- M(() => g.value?.collapsed, (t) => {
598
- m.value = t;
596
+ } = ta(e.defaultParams || {}, e.searchMap || []), h = I(g.value?.collapsed ?? g.value?.defaultCollapsed), x = S(() => le(p.value?.reset) ? p.value?.reset : m.value), v = S(() => P(g.value?.span)), F = S(() => g.value?.label);
597
+ E(() => g.value?.collapsed, (t) => {
598
+ h.value = t;
599
599
  });
600
600
  function P(t) {
601
601
  let f = 4;
@@ -609,7 +609,7 @@ const Mt = /* @__PURE__ */ ne({
609
609
  return f;
610
610
  }
611
611
  const k = (t) => {
612
- m.value = t;
612
+ h.value = t;
613
613
  }, j = (t, f, R) => (t + 1) % f === 0 ? {
614
614
  ...R,
615
615
  marginRight: 0
@@ -620,7 +620,7 @@ const Mt = /* @__PURE__ */ ne({
620
620
  const t = kt(r), f = e.searchMap.find((w) => w.valueType === "text") || "", R = e.searchMap.find((w) => w.valueType === "dateRange") || "", $ = e.searchMap.find((w) => w.valueType === "treeSelect");
621
621
  return f && (t[f.name] = r[f.name] || f.initialValue || ""), R && (t[R.rangeStartName || "start"] = t[R.name] ? t[R.name][0] : "", t[R.rangeEndName || "end"] = t[R.name] ? t[R.name][1] : "", delete t[R.name]), $ && ($?.name && X(r[$?.name]) && (t[$.name] = r[$.name].length ? r[$.name].map((w) => w[$.valueKey === "text" ? "label" : "value"]).join() : ""), $?.name && X(t[$?.name]) && (t[$.name] = t[$.name].length ? t[$.name].map((w) => w[$.valueKey === "text" ? "label" : "value"]) : "")), t;
622
622
  }, W = (t = !1, f) => {
623
- (!h.value || t) && e.onSearch?.(L(), t ? f ? "reset" : "submit" : void 0);
623
+ (!m.value || t) && e.onSearch?.(L(), t ? f ? "reset" : "submit" : void 0);
624
624
  }, O = (t, f, R) => {
625
625
  const $ = r[f.name || ""];
626
626
  switch (f.valueType) {
@@ -640,25 +640,25 @@ const Mt = /* @__PURE__ */ ne({
640
640
  c(f.name || "", t ?? (f.field?.treeCheckable || f.field?.multiple ? [] : null));
641
641
  break;
642
642
  case "date":
643
- c(f.name || "", t ? me(t, Pe(f.valueFormat, f.showTime)) : null);
643
+ c(f.name || "", t ? he(t, Pe(f.valueFormat, f.showTime)) : null);
644
644
  break;
645
645
  case "dateWeek":
646
- c(f.name || "", t ? me(t, "YYYY-wo") : null);
646
+ c(f.name || "", t ? he(t, "YYYY-wo") : null);
647
647
  break;
648
648
  case "dateMonth":
649
- c(f.name || "", t ? me(t, "YYYY-MM") : null);
649
+ c(f.name || "", t ? he(t, "YYYY-MM") : null);
650
650
  break;
651
651
  case "dateQuarter":
652
- c(f.name || "", t ? me(t, "YYYY-QQ") : null);
652
+ c(f.name || "", t ? he(t, "YYYY-QQ") : null);
653
653
  break;
654
654
  case "dateYear":
655
- c(f.name || "", t ? me(t, "YYYY") : null);
655
+ c(f.name || "", t ? he(t, "YYYY") : null);
656
656
  break;
657
657
  case "dateRange":
658
658
  c(f.name || "", t && X(t) && t.length === 2 ? St(t, Pe(f.valueFormat, f.showTime)) : null);
659
659
  break;
660
660
  case "time":
661
- c(f.name || "", t ? me(t, f.valueFormat || "HH:mm:ss") : null);
661
+ c(f.name || "", t ? he(t, f.valueFormat || "HH:mm:ss") : null);
662
662
  break;
663
663
  }
664
664
  f.valueType === "treeSelect" || f.valueType, W();
@@ -677,12 +677,12 @@ const Mt = /* @__PURE__ */ ne({
677
677
  class: re(`${e.prefixCls}-search-empty-text`, o.value)
678
678
  }, [f ? R : X(R) ? R.map(($) => Ve($)) : void 0]);
679
679
  }
680
- }, Z = () => (h.value || x.value) && u(ge, null, {
680
+ }, ee = () => (m.value || x.value) && u(ge, null, {
681
681
  default: () => [x.value && u(xt, {
682
682
  onClick: () => N()
683
683
  }, {
684
684
  default: () => [p.value?.resetText || "重置"]
685
- }), h.value && u(xt, {
685
+ }), m.value && u(xt, {
686
686
  loading: e.loading,
687
687
  type: "primary",
688
688
  onClick: () => W(!0)
@@ -699,7 +699,7 @@ const Mt = /* @__PURE__ */ ne({
699
699
  }, [u(ge, {
700
700
  size: 16
701
701
  }, {
702
- default: () => [Z(), g.value?.collapseRender !== !1 && R && u(Ae, null, [typeof g.value?.collapseRender == "function" ? g.value?.collapseRender(f) : u("span", {
702
+ default: () => [ee(), g.value?.collapseRender !== !1 && R && u(Ae, null, [typeof g.value?.collapseRender == "function" ? g.value?.collapseRender(f) : u("span", {
703
703
  class: `${e.prefixCls}-a ${o.value}`,
704
704
  onClick: () => k(!f)
705
705
  }, [f ? "收起" : "展开", f ? u(Rl, null, null) : u(Fl, null, null)])])]
@@ -711,7 +711,7 @@ const Mt = /* @__PURE__ */ ne({
711
711
  }, null) : D();
712
712
  }
713
713
  function ae(t, f) {
714
- return u(ea, E(t.request, {
714
+ return u(ea, M(t.request, {
715
715
  loading: t.loading,
716
716
  notFoundContent: ie
717
717
  }), aa(f) ? f : {
@@ -720,11 +720,11 @@ const Mt = /* @__PURE__ */ ne({
720
720
  }
721
721
  const pe = (t) => {
722
722
  let f;
723
- const R = h.value ? Ke : Ke.Search, $ = Ne(t.field || {}, "rules");
723
+ const R = m.value ? Ke : Ke.Search, $ = Ne(t.field || {}, "rules");
724
724
  let w = null;
725
725
  switch (t.valueType) {
726
726
  case "text":
727
- f = u(R, E({
727
+ f = u(R, M({
728
728
  style: {
729
729
  width: "100%"
730
730
  },
@@ -736,7 +736,7 @@ const Mt = /* @__PURE__ */ ne({
736
736
  }, $), null);
737
737
  break;
738
738
  case "number":
739
- f = u(Xe, E({
739
+ f = u(Xe, M({
740
740
  style: {
741
741
  width: "100%"
742
742
  },
@@ -769,7 +769,7 @@ const Mt = /* @__PURE__ */ ne({
769
769
  });
770
770
  break;
771
771
  case "select":
772
- w = u(Yl, E({
772
+ w = u(Yl, M({
773
773
  style: {
774
774
  width: "100%"
775
775
  },
@@ -785,7 +785,7 @@ const Mt = /* @__PURE__ */ ne({
785
785
  }, $), null);
786
786
  break;
787
787
  case "treeSelect":
788
- w = u(Kl, E({
788
+ w = u(Kl, M({
789
789
  style: {
790
790
  width: "100%"
791
791
  },
@@ -799,7 +799,7 @@ const Mt = /* @__PURE__ */ ne({
799
799
  }, $), null);
800
800
  break;
801
801
  case "date":
802
- f = u(jt, E({
802
+ f = u(jt, M({
803
803
  style: {
804
804
  width: "100%"
805
805
  },
@@ -814,7 +814,7 @@ const Mt = /* @__PURE__ */ ne({
814
814
  }, $), null);
815
815
  break;
816
816
  case "dateWeek":
817
- f = u(sa, E({
817
+ f = u(sa, M({
818
818
  style: {
819
819
  width: "100%"
820
820
  },
@@ -826,7 +826,7 @@ const Mt = /* @__PURE__ */ ne({
826
826
  }, $), null);
827
827
  break;
828
828
  case "dateMonth":
829
- f = u(oa, E({
829
+ f = u(oa, M({
830
830
  style: {
831
831
  width: "100%"
832
832
  },
@@ -838,7 +838,7 @@ const Mt = /* @__PURE__ */ ne({
838
838
  }, $), null);
839
839
  break;
840
840
  case "dateQuarter":
841
- f = u(ra, E({
841
+ f = u(ra, M({
842
842
  style: {
843
843
  width: "100%"
844
844
  },
@@ -850,7 +850,7 @@ const Mt = /* @__PURE__ */ ne({
850
850
  }, $), null);
851
851
  break;
852
852
  case "dateYear":
853
- f = u(ua, E({
853
+ f = u(ua, M({
854
854
  style: {
855
855
  width: "100%"
856
856
  },
@@ -862,7 +862,7 @@ const Mt = /* @__PURE__ */ ne({
862
862
  }, $), null);
863
863
  break;
864
864
  case "dateRange":
865
- f = u(ia, E({
865
+ f = u(ia, M({
866
866
  style: {
867
867
  width: "100%"
868
868
  },
@@ -875,7 +875,7 @@ const Mt = /* @__PURE__ */ ne({
875
875
  }, $), null);
876
876
  break;
877
877
  case "time":
878
- f = u(zl, E({
878
+ f = u(zl, M({
879
879
  style: {
880
880
  width: "100%"
881
881
  },
@@ -890,7 +890,7 @@ const Mt = /* @__PURE__ */ ne({
890
890
  break;
891
891
  }
892
892
  return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (f = t.request ? ae(t, w) : w), f;
893
- }, he = ({
893
+ }, me = ({
894
894
  formItemStyle: t = {},
895
895
  item: f
896
896
  }) => {
@@ -920,7 +920,7 @@ const Mt = /* @__PURE__ */ ne({
920
920
  };
921
921
  return f.map(($, w) => {
922
922
  const s = j(w, v.value, R);
923
- return f.length < v.value || m.value ? u(Ae, null, [he({
923
+ return f.length < v.value || h.value ? u(Ae, null, [me({
924
924
  formItemStyle: s,
925
925
  item: $
926
926
  }), w === f.length - 1 && oe({
@@ -928,12 +928,12 @@ const Mt = /* @__PURE__ */ ne({
928
928
  flex: 1,
929
929
  justifyContent: "flex-end"
930
930
  },
931
- collapsed: m.value,
932
- collapseRender: !!m.value
933
- })]) : u(Ae, null, [w < v.value - 1 && he({
931
+ collapsed: h.value,
932
+ collapseRender: !!h.value
933
+ })]) : u(Ae, null, [w < v.value - 1 && me({
934
934
  formItemStyle: s,
935
935
  item: $
936
- }), w === v.value - 1 && (v.value - 1 === 0 || f.length === v.value) && he({
936
+ }), w === v.value - 1 && (v.value - 1 === 0 || f.length === v.value) && me({
937
937
  formItemStyle: s,
938
938
  item: $
939
939
  }), w === v.value - 1 && f.length >= v.value && oe({
@@ -1056,8 +1056,8 @@ const De = (e) => {
1056
1056
  title: e
1057
1057
  }, {
1058
1058
  default: () => [u("span", {
1059
- onClick: (h) => {
1060
- h.stopPropagation(), h.preventDefault();
1059
+ onClick: (m) => {
1060
+ m.stopPropagation(), m.preventDefault();
1061
1061
  const g = b(i)?.find((c) => c.uuid === l)?.key || "", p = d?.columnsMap[g] || {};
1062
1062
  if (typeof p.disable == "boolean" ? p.disable : p.disable?.icon) return;
1063
1063
  const C = {
@@ -1135,18 +1135,18 @@ const De = (e) => {
1135
1135
  const a = I(lt().uuid(15)), l = S(() => e.list && e.list.length > 0), n = I([]), o = I([]), {
1136
1136
  cacheColumns: i,
1137
1137
  slots: d,
1138
- settingsAction: h
1139
- } = fe(), g = (c, m) => c.map(({
1138
+ settingsAction: m
1139
+ } = fe(), g = (c, h) => c.map(({
1140
1140
  key: x,
1141
1141
  children: v,
1142
1142
  uuid: F,
1143
1143
  ...P
1144
1144
  }) => {
1145
- const k = h?.columnsMap[x || "null"] || {
1145
+ const k = m?.columnsMap[x || "null"] || {
1146
1146
  show: !0
1147
1147
  };
1148
1148
  let j = !1;
1149
- k.show !== !1 && m?.show !== !1 && !v && (j = !0);
1149
+ k.show !== !1 && h?.show !== !1 && !v && (j = !0);
1150
1150
  const L = {
1151
1151
  key: F || "",
1152
1152
  ...Ne(P, ["dataIndex"]),
@@ -1160,12 +1160,12 @@ const De = (e) => {
1160
1160
  });
1161
1161
  Ee(() => {
1162
1162
  const c = g(e.list || []);
1163
- n.value = c, o.value = c.filter((m) => m.checked).map((m) => m.key), h?.operationType.value === "fixed" && (a.value = lt().uuid(15));
1163
+ n.value = c, o.value = c.filter((h) => h.checked).map((h) => h.key), m?.operationType.value === "fixed" && (a.value = lt().uuid(15));
1164
1164
  });
1165
- const p = De((c, m, x) => {
1166
- const v = b(i).find((N) => N.uuid === c)?.key || "", F = b(i).find((N) => N.uuid === m)?.key || "", P = {
1167
- ...h?.columnsMap
1168
- }, k = [...h.sortKeyColumns.value], j = k.findIndex((N) => N === v), L = k.findIndex((N) => N === F), W = x > j;
1165
+ const p = De((c, h, x) => {
1166
+ const v = b(i).find((N) => N.uuid === c)?.key || "", F = b(i).find((N) => N.uuid === h)?.key || "", P = {
1167
+ ...m?.columnsMap
1168
+ }, k = [...m.sortKeyColumns.value], j = k.findIndex((N) => N === v), L = k.findIndex((N) => N === F), W = x > j;
1169
1169
  if (j < 0)
1170
1170
  return;
1171
1171
  const O = k[j];
@@ -1174,23 +1174,23 @@ const De = (e) => {
1174
1174
  ...P[N] || {},
1175
1175
  order: D
1176
1176
  };
1177
- }), h?.setColumnsMap(P, "drop"), h?.setSortKeyColumns(k);
1177
+ }), m?.setColumnsMap(P, "drop"), m?.setSortKeyColumns(k);
1178
1178
  }), r = De((c) => {
1179
- const m = c.node.key, x = b(i).find((k) => k.uuid === m)?.key || "", F = {
1180
- ...h?.columnsMap[x] || {}
1179
+ const h = c.node.key, x = b(i).find((k) => k.uuid === h)?.key || "", F = {
1180
+ ...m?.columnsMap[x] || {}
1181
1181
  };
1182
1182
  F.show = c.checked;
1183
1183
  const P = {
1184
- ...h?.columnsMap,
1184
+ ...m?.columnsMap,
1185
1185
  [x]: F
1186
1186
  };
1187
- h?.setColumnsMap(P, "show");
1187
+ m?.setColumnsMap(P, "show");
1188
1188
  }), C = (c) => {
1189
- const m = b(i).find((x) => x.uuid === c.key);
1189
+ const h = b(i).find((x) => x.uuid === c.key);
1190
1190
  return c.title || yl(d, "headerCell", {
1191
- title: m.title,
1192
- column: m
1193
- }, () => [m.title]);
1191
+ title: h.title,
1192
+ column: h
1193
+ }, () => [h.title]);
1194
1194
  };
1195
1195
  return () => l.value ? u(Ae, null, [e.showTitle && u("span", {
1196
1196
  class: [`${e.className}-list-title`, e.hashId]
@@ -1203,32 +1203,32 @@ const De = (e) => {
1203
1203
  checkedKeys: o.value,
1204
1204
  height: 280,
1205
1205
  onDrop: (c) => {
1206
- const m = c.node.key, x = c.dragNode.key, {
1206
+ const h = c.node.key, x = c.dragNode.key, {
1207
1207
  dropPosition: v,
1208
1208
  dropToGap: F
1209
1209
  } = c, P = v === -1 || !F ? v + 1 : v;
1210
- p(x, m, P);
1210
+ p(x, h, P);
1211
1211
  },
1212
- onCheck: (c, m) => r(m),
1212
+ onCheck: (c, h) => r(h),
1213
1213
  treeData: n.value
1214
1214
  }, {
1215
1215
  title: (c) => {
1216
- const m = {
1216
+ const h = {
1217
1217
  ...c,
1218
1218
  children: void 0,
1219
1219
  title: C(c),
1220
- autoScroll: h?.autoScroll?.value
1220
+ autoScroll: m?.autoScroll?.value
1221
1221
  };
1222
- return u(fa, E({
1222
+ return u(fa, M({
1223
1223
  hashId: e.hashId,
1224
1224
  className: e.className
1225
- }, m, {
1226
- treeKey: m.key
1225
+ }, h, {
1226
+ treeKey: h.key
1227
1227
  }), null);
1228
1228
  }
1229
1229
  })]) : null;
1230
1230
  }
1231
- }), ha = /* @__PURE__ */ ne({
1231
+ }), ma = /* @__PURE__ */ ne({
1232
1232
  props: {
1233
1233
  hashId: String,
1234
1234
  className: String,
@@ -1239,7 +1239,7 @@ const De = (e) => {
1239
1239
  const {
1240
1240
  columns: a
1241
1241
  } = fe(), l = I([]), n = I([]), o = I([]), i = I([]);
1242
- M(() => a.value, (g) => {
1242
+ E(() => a.value, (g) => {
1243
1243
  l.value = [], n.value = [], o.value = [], g.forEach((p) => {
1244
1244
  if (p.hideInSetting)
1245
1245
  return;
@@ -1261,12 +1261,12 @@ const De = (e) => {
1261
1261
  }, {
1262
1262
  immediate: !0
1263
1263
  });
1264
- const d = S(() => l.value && l.value.length > 0), h = S(() => n.value && n.value.length > 0);
1264
+ const d = S(() => l.value && l.value.length > 0), m = S(() => n.value && n.value.length > 0);
1265
1265
  return () => u("div", {
1266
1266
  class: {
1267
1267
  [`${e.hashId}`]: !0,
1268
1268
  [`${e.className}-list`]: !0,
1269
- [`${e.className}-list-group`]: d.value || h.value
1269
+ [`${e.className}-list-group`]: d.value || m.value
1270
1270
  }
1271
1271
  }, [u(Ze, {
1272
1272
  title: "固定在左侧",
@@ -1283,7 +1283,7 @@ const De = (e) => {
1283
1283
  draggable: e.draggable,
1284
1284
  checkable: e.checkable,
1285
1285
  title: "不固定",
1286
- showTitle: h.value || d.value,
1286
+ showTitle: m.value || d.value,
1287
1287
  className: e.className
1288
1288
  }, null), u(Ze, {
1289
1289
  title: "固定在右侧",
@@ -1295,7 +1295,7 @@ const De = (e) => {
1295
1295
  className: e.className
1296
1296
  }, null)]);
1297
1297
  }
1298
- }), ma = /* @__PURE__ */ ne({
1298
+ }), ha = /* @__PURE__ */ ne({
1299
1299
  props: {
1300
1300
  draggable: {
1301
1301
  type: Boolean,
@@ -1319,7 +1319,7 @@ const De = (e) => {
1319
1319
  columns: o,
1320
1320
  settingsAction: i
1321
1321
  } = fe(), d = De((C = !0) => {
1322
- const c = {}, m = (x) => {
1322
+ const c = {}, h = (x) => {
1323
1323
  x.forEach(({
1324
1324
  key: v,
1325
1325
  fixed: F,
@@ -1330,11 +1330,11 @@ const De = (e) => {
1330
1330
  j && (c[j] = {
1331
1331
  show: C,
1332
1332
  fixed: F
1333
- }), k && m(k);
1333
+ }), k && h(k);
1334
1334
  });
1335
1335
  };
1336
- m(o.value), i?.setColumnsMap(c, "show");
1337
- }), h = De((C) => {
1336
+ h(o.value), i?.setColumnsMap(c, "show");
1337
+ }), m = De((C) => {
1338
1338
  C.target.checked ? d() : d(!1);
1339
1339
  }), g = De(() => {
1340
1340
  i?.setColumnsMap(i?.cacheColumnsMap, "fixed");
@@ -1349,7 +1349,7 @@ const De = (e) => {
1349
1349
  }, [u(Wl, {
1350
1350
  indeterminate: r.value,
1351
1351
  checked: b(p).length === 0 && b(p).length !== o.value.length,
1352
- onChange: (C) => h(C)
1352
+ onChange: (C) => m(C)
1353
1353
  }, {
1354
1354
  default: () => [Oe("列展示")]
1355
1355
  }), e.checkedReset ? u("a", {
@@ -1364,7 +1364,7 @@ const De = (e) => {
1364
1364
  overlayClassName: `${a}-overlay ${n.value}`,
1365
1365
  trigger: "click",
1366
1366
  placement: "bottomRight",
1367
- content: u(ha, {
1367
+ content: u(ma, {
1368
1368
  hashId: n.value,
1369
1369
  checkable: e.checkable ?? !0,
1370
1370
  draggable: e.draggable ?? !0,
@@ -1465,21 +1465,21 @@ const zt = /* @__PURE__ */ ne({
1465
1465
  hashId: l
1466
1466
  } = qe("ListToolBar", [va], e.prefixCls), n = ga(), {
1467
1467
  isMobile: o
1468
- } = fe(), i = S(() => !!(e.titleTip || e.headerTitle || e.actions?.length)), d = S(() => !!(e.settings?.length || e.optionsExtra)), h = S(() => !!(e.titleTip || e.headerTitle)), g = S(() => {
1468
+ } = fe(), i = S(() => !!(e.titleTip || e.headerTitle || e.actions?.length)), d = S(() => !!(e.settings?.length || e.optionsExtra)), m = S(() => !!(e.titleTip || e.headerTitle)), g = S(() => {
1469
1469
  let c;
1470
1470
  return Array.isArray(e.actions) ? e.actions?.length < 1 ? null : u(ge, {
1471
1471
  align: "center"
1472
- }, wt(c = e.actions.map((m, x) => U(m) ? Ve(m, {
1472
+ }, wt(c = e.actions.map((h, x) => U(h) ? Ve(h, {
1473
1473
  key: x,
1474
- ...m?.props
1474
+ ...h?.props
1475
1475
  }) : u("template", {
1476
1476
  key: x
1477
- }, [m]))) ? c : {
1477
+ }, [h]))) ? c : {
1478
1478
  default: () => [c]
1479
1479
  }) : e.actions;
1480
1480
  }), p = He(() => !i.value && d.value ? u("div", {
1481
1481
  class: `${e.prefixCls}-left ${l.value}`
1482
- }, null) : h.value ? u(ge, {
1482
+ }, null) : m.value ? u(ge, {
1483
1483
  class: `${e.prefixCls}-left ${l.value}`
1484
1484
  }, {
1485
1485
  default: () => [u("div", {
@@ -1497,7 +1497,7 @@ const zt = /* @__PURE__ */ ne({
1497
1497
  default: () => [g.value && u("div", {
1498
1498
  class: `${e.prefixCls}-actions`
1499
1499
  }, [g.value])]
1500
- }), [() => i.value, () => d.value, () => h.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), r = He(() => {
1500
+ }), [() => i.value, () => d.value, () => m.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), r = He(() => {
1501
1501
  let c;
1502
1502
  return d.value ? u(ge, {
1503
1503
  size: 16,
@@ -1509,8 +1509,8 @@ const zt = /* @__PURE__ */ ne({
1509
1509
  size: 12,
1510
1510
  align: "center",
1511
1511
  class: `${e.prefixCls}-setting-items`
1512
- }, wt(c = e.settings.map((m, x) => {
1513
- const v = pa(m);
1512
+ }, wt(c = e.settings.map((h, x) => {
1513
+ const v = pa(h);
1514
1514
  return u("div", {
1515
1515
  key: x,
1516
1516
  class: `${e.prefixCls}-setting-item`
@@ -1519,7 +1519,7 @@ const zt = /* @__PURE__ */ ne({
1519
1519
  default: () => [c]
1520
1520
  }) : null]
1521
1521
  }) : null;
1522
- }, [() => n.value, () => d.value, () => e.prefixCls, () => h.value, () => g.value, () => e.settings]), C = He(() => {
1522
+ }, [() => n.value, () => d.value, () => e.prefixCls, () => m.value, () => g.value, () => e.settings]), C = He(() => {
1523
1523
  if (!d.value && !i.value) return null;
1524
1524
  const c = {
1525
1525
  [`${l.value}`]: !0,
@@ -1619,7 +1619,7 @@ function Ca(e, a) {
1619
1619
  let o = n === !0 ? a[l] : () => n?.();
1620
1620
  if (typeof o != "function" && (o = () => {
1621
1621
  }), l === "setting")
1622
- return u(ma, E(e[l], {
1622
+ return u(ha, M(e[l], {
1623
1623
  key: l
1624
1624
  }), null);
1625
1625
  if (l === "fullScreen")
@@ -1700,8 +1700,8 @@ function $a(e) {
1700
1700
  };
1701
1701
  }
1702
1702
  function Ra({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o, neverScroll: i }) {
1703
- const d = I([]), h = I([]);
1704
- M([
1703
+ const d = I([]), m = I([]);
1704
+ E([
1705
1705
  () => e.value,
1706
1706
  () => a.value,
1707
1707
  () => l.value,
@@ -1711,7 +1711,7 @@ function Ra({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
1711
1711
  () => i.value
1712
1712
  ], () => {
1713
1713
  const x = r(ve(a.value));
1714
- Le(x, ve(d.value)) || (d.value = te(x)), Le(x, ve(h.value)) || (h.value = te(x));
1714
+ Le(x, ve(d.value)) || (d.value = Z(x)), Le(x, ve(m.value)) || (m.value = Z(x));
1715
1715
  }, {
1716
1716
  deep: !0,
1717
1717
  immediate: !0
@@ -1728,7 +1728,7 @@ function Ra({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
1728
1728
  return x.sort((v, F) => il(v, F, "order", 0));
1729
1729
  }
1730
1730
  function r(x) {
1731
- return te(x).map((v, F) => {
1731
+ return Z(x).map((v, F) => {
1732
1732
  if (v.dataIndex === "action" || F === x.length - 1 ? v.resizable = !1 : v.resizable = le(v.resizable) ? v.resizable : !!(je(v.width) && b(n)), !v.width || b(i))
1733
1733
  return v;
1734
1734
  if (v.dataIndex === "action" && b(o))
@@ -1751,8 +1751,8 @@ function Ra({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
1751
1751
  }
1752
1752
  Le(r(x), ve(d.value)) || (d.value = r(x));
1753
1753
  }
1754
- function m(x) {
1755
- c(te(ve(a.value)).map((v) => {
1754
+ function h(x) {
1755
+ c(Z(ve(a.value)).map((v) => {
1756
1756
  const F = v.key ? {
1757
1757
  show: x[v.key]?.show,
1758
1758
  fixed: x[v.key]?.fixed,
@@ -1764,18 +1764,18 @@ function Ra({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o,
1764
1764
  return {
1765
1765
  breakpoint: l,
1766
1766
  proColumns: g,
1767
- cacheProColumns: h,
1767
+ cacheProColumns: m,
1768
1768
  setColumns: c,
1769
- changeColumns: m,
1769
+ changeColumns: h,
1770
1770
  resizeColumnWidth: C
1771
1771
  };
1772
1772
  }
1773
1773
  function Fa({ columns: e, columnsState: a, changeColumns: l }) {
1774
- const n = I(void 0), o = be({}), i = be({}), d = be({}), h = I([]);
1775
- M(() => e.value, () => {
1776
- b(e)?.forEach(({ show: C, key: c, fixed: m }, x) => {
1774
+ const n = I(void 0), o = be({}), i = be({}), d = be({}), m = I([]);
1775
+ E(() => e.value, () => {
1776
+ b(e)?.forEach(({ show: C, key: c, fixed: h }, x) => {
1777
1777
  const v = Rt(c, x);
1778
- v && (d[v] = { show: C === void 0 ? !0 : C, fixed: m });
1778
+ v && (d[v] = { show: C === void 0 ? !0 : C, fixed: h });
1779
1779
  });
1780
1780
  const r = b(e).map((C) => C.key);
1781
1781
  p(r);
@@ -1790,13 +1790,13 @@ function Fa({ columns: e, columnsState: a, changeColumns: l }) {
1790
1790
  n.value = C, Object.assign(o, r), l?.(o, C === "fixed");
1791
1791
  }
1792
1792
  function p(r) {
1793
- h.value = r;
1793
+ m.value = r;
1794
1794
  }
1795
1795
  return {
1796
1796
  columnsMap: o,
1797
1797
  operationType: n,
1798
1798
  setColumnsMap: g,
1799
- sortKeyColumns: h,
1799
+ sortKeyColumns: m,
1800
1800
  cacheColumnsMap: i,
1801
1801
  setSortKeyColumns: p
1802
1802
  };
@@ -1806,10 +1806,10 @@ function Ba(e, a) {
1806
1806
  function i() {
1807
1807
  n.value && clearTimeout(n.value);
1808
1808
  }
1809
- async function d(...h) {
1810
- return l.value === 0 || l.value === void 0 ? o.value(...h) : (i(), new Promise(async (g) => {
1811
- h[0]?.immediate ? g(await o.value(...h)) : n.value = setTimeout(async () => {
1812
- g(await o.value(...h));
1809
+ async function d(...m) {
1810
+ return l.value === 0 || l.value === void 0 ? o.value(...m) : (i(), new Promise(async (g) => {
1811
+ m[0]?.immediate ? g(await o.value(...m)) : n.value = setTimeout(async () => {
1812
+ g(await o.value(...m));
1813
1813
  }, l.value);
1814
1814
  }));
1815
1815
  }
@@ -1829,9 +1829,9 @@ function Ia(e) {
1829
1829
  dataSource: o
1830
1830
  };
1831
1831
  }
1832
- function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, waitRequest: i, debounceTime: d }, { search: h, columns: g, loading: p, setLoading: r, setColumns: C, removeRowKeys: c, syncSelectedRows: m, formParamsRef: x, setPagination: v, paginationInfo: F, onBeforeSearchSubmit: P, hasCustomRender: k }, j) {
1833
- const L = I(), W = I(!0), O = I(!1), N = I(!1), D = I([]), Z = I(), oe = S(() => V(h.value) ? h.value?.manualRequest : !1), ie = async (w = {}) => {
1834
- const { pagination: s, filters: z = {}, sorter: q = {}, removeKeys: ee = [], isPolling: Ce = !1 } = w;
1832
+ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, waitRequest: i, debounceTime: d }, { search: m, columns: g, loading: p, setLoading: r, setColumns: C, removeRowKeys: c, syncSelectedRows: h, formParamsRef: x, setPagination: v, paginationInfo: F, onBeforeSearchSubmit: P, hasCustomRender: k }, j) {
1833
+ const L = I(), W = I(!0), O = I(!1), N = I(!1), D = I([]), ee = I(), oe = S(() => V(m.value) ? m.value?.manualRequest : !1), ie = async (w = {}) => {
1834
+ const { pagination: s, filters: z = {}, sorter: q = {}, removeKeys: te = [], isPolling: Ce = !1 } = w;
1835
1835
  if (!l || !ke(l) || b(i) && p.value || O.value)
1836
1836
  return o.value || [];
1837
1837
  if (O.value = !0, !Ce || b(i) || W.value ? r(!0) : t(!0), b(i)) {
@@ -1845,7 +1845,7 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
1845
1845
  Y = {};
1846
1846
  else {
1847
1847
  const { current: G = 1, pageSize: ye = 10, total: J } = b(F) || {};
1848
- Y.pageNum = rl({ current: G, pageSize: ye, total: J }, ee.length), ee.length && c(ee), Y.pageSize = ye;
1848
+ Y.pageNum = rl({ current: G, pageSize: ye, total: J }, te.length), te.length && c(te), Y.pageSize = ye;
1849
1849
  }
1850
1850
  const Me = V(q) ? [q] : q;
1851
1851
  Me.forEach((G) => {
@@ -1859,9 +1859,9 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
1859
1859
  };
1860
1860
  P && ke(P) && (Re = await P(Re, q, z));
1861
1861
  let ue = [];
1862
- const xe = await l?.(te(ve(Re)), Me, z);
1862
+ const xe = await l?.(Z(ve(Re)), Me, z);
1863
1863
  if (O.value = !1, xe && xe?.success) {
1864
- ue = xe.data || [], n && ke(n) && (ue = await n?.(ue)), m(ue);
1864
+ ue = xe.data || [], n && ke(n) && (ue = await n?.(ue)), h(ue);
1865
1865
  const G = xe.total || ue?.length || 0;
1866
1866
  return G !== b(F)?.total && v({
1867
1867
  total: G || 0
@@ -1875,21 +1875,21 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
1875
1875
  }
1876
1876
  return [];
1877
1877
  }, ae = Ba(async (w) => {
1878
- Z.value && clearTimeout(Z.value);
1878
+ ee.value && clearTimeout(ee.value);
1879
1879
  const s = await ie(w), z = ul(a.value, s);
1880
- return z && !L.value && (Z.value = setTimeout(() => {
1880
+ return z && !L.value && (ee.value = setTimeout(() => {
1881
1881
  ae.run({ ...w, isPolling: z });
1882
1882
  }, Math.max(z, 2e3))), s;
1883
1883
  }, d.value || 10);
1884
1884
  Sl(() => {
1885
- L.value = !0, clearTimeout(Z.value);
1885
+ L.value = !0, clearTimeout(ee.value);
1886
1886
  }), wl(() => {
1887
- L.value = !0, clearTimeout(Z.value);
1888
- }), M(() => a.value, () => {
1889
- a.value ? ae.run({ isPolling: !0 }) : clearTimeout(Z.value);
1890
- }, { immediate: !0 }), M([() => i.value, () => o.value], () => {
1887
+ L.value = !0, clearTimeout(ee.value);
1888
+ }), E(() => a.value, () => {
1889
+ a.value ? ae.run({ isPolling: !0 }) : clearTimeout(ee.value);
1890
+ }, { immediate: !0 }), E([() => i.value, () => o.value], () => {
1891
1891
  pe();
1892
- }, { deep: !0, immediate: !0 }), M([() => x], () => {
1892
+ }, { deep: !0, immediate: !0 }), E([() => x], () => {
1893
1893
  oe.value || pe();
1894
1894
  }, {
1895
1895
  deep: !0,
@@ -1898,7 +1898,7 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
1898
1898
  function pe() {
1899
1899
  Te(l) ? (!W.value || !a.value) && ae.run({ isPolling: !1 }) : R(o.value || []);
1900
1900
  }
1901
- const he = S(() => {
1901
+ const me = S(() => {
1902
1902
  if (k.value)
1903
1903
  return b(D);
1904
1904
  const w = g.value.filter((s) => s.show || s.show === void 0);
@@ -1911,7 +1911,7 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
1911
1911
  ae.run({ pagination: w, filters: s, sorter: z, extra: q, isPolling: !1 }), j("change", w, s, z, q);
1912
1912
  }
1913
1913
  function R(w) {
1914
- const s = sl(te(w), b(F.value));
1914
+ const s = sl(Z(w), b(F.value));
1915
1915
  if (!Le(s, D.value) && (D.value = s, !l || !ke(l))) {
1916
1916
  const z = s.length || 0;
1917
1917
  z !== b(F)?.total && v({
@@ -1920,14 +1920,14 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
1920
1920
  }
1921
1921
  }
1922
1922
  return {
1923
- dataSource: he,
1923
+ dataSource: me,
1924
1924
  isTreeDataRef: $e,
1925
1925
  reSetDataList: R,
1926
1926
  changeDataValue: ({ key: w, params: s, value: z, type: q = "update" }) => {
1927
- const ee = w ?? e.value, Ce = s?.[ee] ?? z;
1927
+ const te = w ?? e.value, Ce = s?.[te] ?? z;
1928
1928
  switch (q) {
1929
1929
  case "update":
1930
- ee && Ce && s && (D.value = D.value.map((Y) => Ce === Y[ee] ? Tt(Y, s, {
1930
+ te && Ce && s && (D.value = D.value.map((Y) => Ce === Y[te] ? Tt(Y, s, {
1931
1931
  omitNil: !1,
1932
1932
  omitEmpty: !1
1933
1933
  }) : Y)), We(!!s, "params is required");
@@ -1939,7 +1939,7 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
1939
1939
  s && D.value.unshift(s), We(!!s, "params is required");
1940
1940
  break;
1941
1941
  case "delete":
1942
- ee && (D.value = D.value.filter((Y) => z !== Y[ee]));
1942
+ te && (D.value = D.value.filter((Y) => z !== Y[te]));
1943
1943
  break;
1944
1944
  }
1945
1945
  },
@@ -1951,7 +1951,7 @@ function Pa({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
1951
1951
  }
1952
1952
  function ka({ emit: e, loading: a }) {
1953
1953
  const l = I(le(a.value) ? a.value : V(a.value) ? a.value?.spinning : !1);
1954
- M(() => a.value, (i) => {
1954
+ E(() => a.value, (i) => {
1955
1955
  l.value = le(i) ? i : V(i) ? i?.spinning : l.value;
1956
1956
  });
1957
1957
  const n = S(() => l.value);
@@ -1966,12 +1966,12 @@ function Aa({
1966
1966
  pagination: l
1967
1967
  }) {
1968
1968
  const n = be({}), o = I();
1969
- M(() => l.value, () => {
1969
+ E(() => l.value, () => {
1970
1970
  if (le(l.value) && !l.value) {
1971
1971
  o.value = !1;
1972
1972
  return;
1973
1973
  }
1974
- const d = Ft(e, b(a), "pageItemRender"), h = ke(d) ? {
1974
+ const d = Ft(e, b(a), "pageItemRender"), m = ke(d) ? {
1975
1975
  itemRender: ({
1976
1976
  page: p,
1977
1977
  type: r,
@@ -1989,7 +1989,7 @@ function Aa({
1989
1989
  showSizeChanger: !0,
1990
1990
  pageSizeOptions: ["10", "20", "50", "100"],
1991
1991
  ...l.value || {},
1992
- ...h || {}
1992
+ ...m || {}
1993
1993
  };
1994
1994
  l.value?.showTotal || (g.showTotal = (p) => `共${p < g.pageSize ? 1 : Math.ceil(p / (g.pageSize || 10))}页 ${p}条记录`), o.value = g, Object.assign(n, {
1995
1995
  pageNum: g.current,
@@ -2001,10 +2001,10 @@ function Aa({
2001
2001
  });
2002
2002
  function i(d) {
2003
2003
  if (V(o.value) && V(d)) {
2004
- const h = {};
2004
+ const m = {};
2005
2005
  Object.keys(d).forEach((g) => {
2006
- Object.prototype.hasOwnProperty.call(d, g) && o.value[g] === d[g] || (h[g] = d[g]);
2007
- }), Object.keys(h).length > 0 && (Object.assign(o.value, h), Oa(h) && Object.assign(n, h));
2006
+ Object.prototype.hasOwnProperty.call(d, g) && o.value[g] === d[g] || (m[g] = d[g]);
2007
+ }), Object.keys(m).length > 0 && (Object.assign(o.value, m), Oa(m) && Object.assign(n, m));
2008
2008
  }
2009
2009
  }
2010
2010
  return {
@@ -2021,7 +2021,12 @@ function Oa(e) {
2021
2021
  }
2022
2022
  function Da(e, a) {
2023
2023
  const l = I([]), n = I([]);
2024
- M(() => a.value?.selectedRowKeys, (r) => {
2024
+ E(() => a.value?.selectedRows, (r) => {
2025
+ n.value = Z(r || []);
2026
+ }, {
2027
+ deep: !0,
2028
+ immediate: !0
2029
+ }), E(() => a.value?.selectedRowKeys, (r) => {
2025
2030
  l.value = cl([...r || []]);
2026
2031
  }, {
2027
2032
  deep: !0,
@@ -2029,7 +2034,7 @@ function Da(e, a) {
2029
2034
  });
2030
2035
  const o = (r, C) => {
2031
2036
  const c = a.value?.type || "checkbox";
2032
- e.value && (C ? r?.[e.value] && c === "checkbox" ? (l.value.push(r[e.value]), n.value.push(r)) : (l.value = [r[e.value]], n.value = [r]) : (l.value = l.value.filter((m) => m !== r[e.value]), n.value = n.value.filter((m) => m[e.value] !== r[e.value])));
2037
+ e.value && (C ? r?.[e.value] && c === "checkbox" ? (l.value.push(r[e.value]), n.value.push(r)) : (l.value = [r[e.value]], n.value = [r]) : (l.value = l.value.filter((h) => h !== r[e.value]), n.value = n.value.filter((h) => h[e.value] !== r[e.value])));
2033
2038
  }, i = () => {
2034
2039
  a.value && a.value?.onChange?.(l.value, n.value);
2035
2040
  };
@@ -2038,7 +2043,7 @@ function Da(e, a) {
2038
2043
  selectedItems: n,
2039
2044
  selectRowKey: o,
2040
2045
  selectAllRowKey: (r, C, c) => {
2041
- e.value && (r ? C.map((m) => (l.value.every((x) => x !== m?.[e.value]) && m?.[e.value] && (l.value.push(m[e.value]), n.value.push(m)), m)) : c.map((m) => (l.value.includes(m?.[e.value]) && (l.value = l.value.filter((x) => x !== m[e.value]), n.value = n.value.filter((x) => x[e.value] !== m[e.value])), m)));
2046
+ e.value && (r ? C.map((h) => (l.value.every((x) => x !== h?.[e.value]) && h?.[e.value] && (l.value.push(h[e.value]), n.value.push(h)), h)) : c.map((h) => (l.value.includes(h?.[e.value]) && (l.value = l.value.filter((x) => x !== h[e.value]), n.value = n.value.filter((x) => x[e.value] !== h[e.value])), h)));
2042
2047
  },
2043
2048
  removeRowKeys: (r) => {
2044
2049
  l.value = l.value.filter((C) => !r.includes(C)), n.value = n.value.filter((C) => !r.includes(C?.[e.value || ""])), i();
@@ -2046,9 +2051,9 @@ function Da(e, a) {
2046
2051
  changeRowKey: i,
2047
2052
  syncSelectedRows: (r) => {
2048
2053
  if (e.value && l.value.length !== n.value.length) {
2049
- const C = n.value.map((m) => m[e.value]), c = l.value.filter((m) => !C.includes(m));
2050
- r.forEach((m) => {
2051
- c.includes(m[e.value]) && n.value.push(te(m));
2054
+ const C = n.value.map((h) => h[e.value]), c = l.value.filter((h) => !C.includes(h));
2055
+ r.forEach((h) => {
2056
+ c.includes(h[e.value]) && n.value.push(Z(h));
2052
2057
  });
2053
2058
  }
2054
2059
  },
@@ -2067,7 +2072,7 @@ function ja(e) {
2067
2072
  }
2068
2073
  function Na({ searchMap: e, params: a, columns: l, setPagination: n }) {
2069
2074
  const o = be({}), i = be({}), d = I([]);
2070
- function h(r) {
2075
+ function m(r) {
2071
2076
  r.forEach((C) => {
2072
2077
  d.value.some((c) => c.name === C.name) ? d.value = d.value.map((c) => c.name === C.name ? {
2073
2078
  ...c,
@@ -2077,24 +2082,24 @@ function Na({ searchMap: e, params: a, columns: l, setPagination: n }) {
2077
2082
  }
2078
2083
  const g = (r) => {
2079
2084
  const C = [];
2080
- if ((r === "all" || r === "searchMap") && (e.value?.forEach((c) => C.push(c)), h(C)), (r === "all" || r === "columns") && l.value?.length && (l.value && l.value.forEach((c) => {
2085
+ if ((r === "all" || r === "searchMap") && (e.value?.forEach((c) => C.push(c)), m(C)), (r === "all" || r === "columns") && l.value?.length && (l.value && l.value.forEach((c) => {
2081
2086
  c.searchConfig && C.push(c.searchConfig);
2082
- }), h(C)), r === "all" || r === "searchMap" || r === "columns") {
2087
+ }), m(C)), r === "all" || r === "searchMap" || r === "columns") {
2083
2088
  n({ current: 1 });
2084
2089
  const c = ja(C);
2085
2090
  Object.assign(i, { ...c });
2086
- for (const m in c)
2087
- o[m] || (o[m] = c[m]);
2091
+ for (const h in c)
2092
+ o[h] || (o[h] = c[h]);
2088
2093
  }
2089
2094
  (r === "all" || r === "params") && (n({ current: 1 }), Object.assign(o, a.value));
2090
2095
  };
2091
2096
  Tl(() => {
2092
2097
  g("all");
2093
- }), M(() => a.value, () => {
2098
+ }), E(() => a.value, () => {
2094
2099
  g("params");
2095
- }, { deep: !0 }), M(() => e.value, () => {
2100
+ }, { deep: !0 }), E(() => e.value, () => {
2096
2101
  g("searchMap");
2097
- }, { deep: !0 }), M(() => l.value, () => {
2102
+ }, { deep: !0 }), E(() => l.value, () => {
2098
2103
  g("columns");
2099
2104
  }, { deep: !0 });
2100
2105
  function p(r) {
@@ -2113,15 +2118,15 @@ function Ea(e) {
2113
2118
  scrollBreakpoint: d
2114
2119
  };
2115
2120
  }
2116
- function Ma({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: o, rowSelection: i, screens: d, innerWidth: h, scrollBreakpoint: g }) {
2117
- const p = S(() => b(g) ? je(b(g)) ? h.value > b(g) : Bt(b(g)) ? d.value?.[b(g)] : d.value?.xl : d.value?.xl), r = S(() => {
2121
+ function Ma({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: o, rowSelection: i, screens: d, innerWidth: m, scrollBreakpoint: g }) {
2122
+ const p = S(() => b(g) ? je(b(g)) ? m.value > b(g) : Bt(b(g)) ? d.value?.[b(g)] : d.value?.xl : d.value?.xl), r = S(() => {
2118
2123
  let c = 0;
2119
- const m = b(i) ? 60 : 0, x = 150, v = te(b(a));
2124
+ const h = b(i) ? 60 : 0, x = 150, v = Z(b(a));
2120
2125
  v.forEach((k) => {
2121
2126
  c += Number.parseInt(String(k.width)) || 0;
2122
2127
  });
2123
2128
  const P = v.filter((k) => !Reflect.has(k, "width")).length;
2124
- return P !== 0 && (c += P * x), m && (c += m), c;
2129
+ return P !== 0 && (c += P * x), h && (c += h), c;
2125
2130
  });
2126
2131
  return { proScroll: S(() => b(o) ? {} : b(e) && Object.keys(b(e)).length ? b(e) : b(n) ? {
2127
2132
  y: b(e)?.y || (d.value?.xl ? 400 : 235)
@@ -2362,7 +2367,7 @@ function La(e, a, l, n) {
2362
2367
  let o = e;
2363
2368
  if (V(a)) {
2364
2369
  const i = a.node === "a" ? "span" : a.node;
2365
- return u(i, E(a?.attr || {}, {
2370
+ return u(i, M(a?.attr || {}, {
2366
2371
  class: [a.class, a.node === "a" ? `${l}-a` : ""],
2367
2372
  onClick: a.click
2368
2373
  }), Ya(e) ? e : {
@@ -2425,12 +2430,12 @@ const {
2425
2430
  isPor: !0
2426
2431
  }), {
2427
2432
  wrapSSR: d,
2428
- hashId: h
2433
+ hashId: m
2429
2434
  } = qe("ProBaseTable", [Ka], i), {
2430
2435
  token: g
2431
2436
  } = _a(), p = Ml(), r = qa(), {
2432
2437
  width: C
2433
- } = gl(), c = I(!1), m = Ot(), x = I(), v = I(), F = I(e.waitRequest);
2438
+ } = gl(), c = I(!1), h = Ot(), x = I(), v = I(), F = I(e.waitRequest);
2434
2439
  Ee(() => F.value = e.waitRequest);
2435
2440
  const {
2436
2441
  toggle: P,
@@ -2441,7 +2446,7 @@ const {
2441
2446
  type: "auto",
2442
2447
  resetText: "重置",
2443
2448
  searchText: "查询"
2444
- }), N = S(() => O.value === !1 ? {} : O.value), D = S(() => N.value?.manualRequest ?? !1), Z = S(() => N.value?.actions), oe = S(() => {
2449
+ }), N = S(() => O.value === !1 ? {} : O.value), D = S(() => N.value?.manualRequest ?? !1), ee = S(() => N.value?.actions), oe = S(() => {
2445
2450
  const y = (e.columns || []).filter((T) => T.key || T.dataIndex).map((T) => {
2446
2451
  const B = T.key || T.dataIndex;
2447
2452
  return T.key = B, T.dataIndex = B, T.align = T.align || e.align, T.uuid = T.uuid || lt().uuid(15), T;
@@ -2458,7 +2463,7 @@ const {
2458
2463
  emit: a,
2459
2464
  loading: se(e, "loading")
2460
2465
  }), {
2461
- sizeRef: he,
2466
+ sizeRef: me,
2462
2467
  setTableSize: $e
2463
2468
  } = za({
2464
2469
  emit: a,
@@ -2481,7 +2486,7 @@ const {
2481
2486
  screens: r
2482
2487
  }), z = $a(e), {
2483
2488
  proColumns: q,
2484
- cacheProColumns: ee,
2489
+ cacheProColumns: te,
2485
2490
  setColumns: Ce,
2486
2491
  changeColumns: Y,
2487
2492
  resizeColumnWidth: Me
@@ -2498,7 +2503,7 @@ const {
2498
2503
  cacheColumnsMap: ye,
2499
2504
  setSortKeyColumns: J
2500
2505
  } = Fa({
2501
- columns: ee,
2506
+ columns: te,
2502
2507
  columnsState: se(e, "columnsState"),
2503
2508
  changeColumns: Y
2504
2509
  }), {
@@ -2547,19 +2552,19 @@ const {
2547
2552
  ...Ga,
2548
2553
  ...V(e.options) ? e.options : {}
2549
2554
  } : !1), Qt = S(() => ({
2550
- size: b(he),
2555
+ size: b(me),
2551
2556
  scroll: b(w),
2552
2557
  dataSource: b(Be),
2553
2558
  pagination: b(t),
2554
2559
  virtualScroll: W.value,
2555
2560
  columns: b(q).filter((y) => y.show || y.show === void 0)
2556
- })), ht = S(() => {
2561
+ })), mt = S(() => {
2557
2562
  const y = V(e.loading) ? Ne(e.loading, "spinning") : {};
2558
- return !y.indicator && m?.indicator?.value && (y.indicator = m?.indicator?.value), {
2563
+ return !y.indicator && h?.indicator?.value && (y.indicator = h?.indicator?.value), {
2559
2564
  spinning: e.showLoading ? Te(ae.value) : !1,
2560
2565
  ...y
2561
2566
  };
2562
- }), mt = S(() => {
2567
+ }), ht = S(() => {
2563
2568
  let y;
2564
2569
  const T = b(j).direction === "rtl" ? "bottomLeft" : "right", B = b(t)?.position;
2565
2570
  if (B !== null && Array.isArray(B)) {
@@ -2573,7 +2578,7 @@ const {
2573
2578
  c.value && e.keepAliveReload ? Fe() : c.value = !0;
2574
2579
  });
2575
2580
  const vt = async (y, T) => {
2576
- D.value ? Z.value?.reload && T ? (Ge(y), await Fe()) : Ge(y) : (Ge({
2581
+ D.value ? ee.value?.reload && T ? (Ge(y), await Fe()) : Ge(y) : (Ge({
2577
2582
  ...e.params || {},
2578
2583
  ...y
2579
2584
  }), await Fe());
@@ -2597,7 +2602,7 @@ const {
2597
2602
  }, el = (y, T) => Me(y, T), tl = (y, T, B) => {
2598
2603
  let K = y;
2599
2604
  if (T) {
2600
- const _ = X(y) ? typeof y?.[0]?.children == "string" ? y?.[0]?.children : "" : y ? y.toString() : "", A = B.tooltip === !1 ? {} : B.tooltip, Q = B.tooltip === !1 ? 1 : je(A?.hiddenLine) && A?.hiddenLine > 0 ? A?.hiddenLine : 1, Se = B.tooltip === !1 ? 0 : je(A?.width) ? A?.width : 0, nl = B.tooltip !== !1 && Bt(_) && Se > 0 ? hl(_, {
2605
+ const _ = X(y) ? typeof y?.[0]?.children == "string" ? y?.[0]?.children : "" : y ? y.toString() : "", A = B.tooltip === !1 ? {} : B.tooltip, Q = B.tooltip === !1 ? 1 : je(A?.hiddenLine) && A?.hiddenLine > 0 ? A?.hiddenLine : 1, Se = B.tooltip === !1 ? 0 : je(A?.width) ? A?.width : 0, nl = B.tooltip !== !1 && Bt(_) && Se > 0 ? ml(_, {
2601
2606
  cssObject: {
2602
2607
  fontSize: "14px",
2603
2608
  lineHeight: "22px",
@@ -2606,7 +2611,7 @@ const {
2606
2611
  }
2607
2612
  }) : 0, ol = document.querySelector(`.${i} .ant-table-tbody`), ze = u("div", {
2608
2613
  class: `${i}-ellipsis-text`
2609
- }, [y]), yt = () => B.tooltip === !1 || V(B.tooltip) && nl < Se && Se > 0 ? ze : u(de, E({
2614
+ }, [y]), yt = () => B.tooltip === !1 || V(B.tooltip) && nl < Se && Se > 0 ? ze : u(de, M({
2610
2615
  title: y,
2611
2616
  getPopupContainer: (_e) => ol ?? _e?.parentNode?.parentNode
2612
2617
  }, V(B.tooltip) ? B.tooltip : {}, {
@@ -2640,10 +2645,10 @@ const {
2640
2645
  };
2641
2646
  function pt() {
2642
2647
  const y = we(l, e, "emptyText");
2643
- if (y !== !1 && m?.emptyText?.value !== !1) {
2644
- const B = e.emptyTextProps?.extraProps || {}, K = y || m?.emptyText?.value, _ = U(K), A = _ ? Pt(K, B) : $t(K || []);
2648
+ if (y !== !1 && h?.emptyText?.value !== !1) {
2649
+ const B = e.emptyTextProps?.extraProps || {}, K = y || h?.emptyText?.value, _ = U(K), A = _ ? Pt(K, B) : $t(K || []);
2645
2650
  return u("div", {
2646
- class: re(`${i}-empty-text`, h.value, e.emptyTextProps?.class),
2651
+ class: re(`${i}-empty-text`, m.value, e.emptyTextProps?.class),
2647
2652
  style: e.emptyTextProps?.style
2648
2653
  }, [_ ? A : X(A) ? A.map((Q) => Ve(Q, B)) : u(Xl, null, null)]);
2649
2654
  }
@@ -2653,7 +2658,7 @@ const {
2653
2658
  const y = Ft(l, e, "customRender");
2654
2659
  if (y) {
2655
2660
  if (Be.value?.length) {
2656
- const T = te(b(Be));
2661
+ const T = Z(b(Be));
2657
2662
  return y?.({
2658
2663
  dataSource: T,
2659
2664
  currentData: Wa(T, t.value)
@@ -2679,13 +2684,13 @@ const {
2679
2684
  }, null);
2680
2685
  };
2681
2686
  return Zl({
2682
- tableSize: he,
2687
+ tableSize: me,
2683
2688
  columns: q,
2684
2689
  cacheColumns: oe,
2685
2690
  isMobile: L,
2686
2691
  searchConfig: N,
2687
2692
  manualSearch: D,
2688
- searchActions: Z,
2693
+ searchActions: ee,
2689
2694
  action: {
2690
2695
  setTableSize: $e,
2691
2696
  reload: (y) => Fe(y),
@@ -2744,7 +2749,7 @@ const {
2744
2749
  return d(u("div", {
2745
2750
  ref: x,
2746
2751
  class: re([{
2747
- [`${h.value}`]: !0,
2752
+ [`${m.value}`]: !0,
2748
2753
  [`${i}`]: !0,
2749
2754
  [`${n.class}`]: n.class,
2750
2755
  [`${i}-beautify-scroll`]: le(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
@@ -2754,7 +2759,7 @@ const {
2754
2759
  }]),
2755
2760
  style: n.style
2756
2761
  }, [u("div", {
2757
- class: [`${i}-content`, h.value]
2762
+ class: [`${i}-content`, m.value]
2758
2763
  }, [(ot.value.length > 0 || Te(l.search)) && e.search !== !1 && u(Mt, {
2759
2764
  ref: v,
2760
2765
  modal: e.modalScroll,
@@ -2767,25 +2772,25 @@ const {
2767
2772
  }, {
2768
2773
  default: l.search ? () => l.search?.() : null
2769
2774
  }), u("div", {
2770
- class: re(h.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
2771
- }, [al(y), y ? u(Nt, ht.value, {
2775
+ class: re(m.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
2776
+ }, [al(y), y ? u(Nt, mt.value, {
2772
2777
  default: () => [u("div", {
2773
- class: `${i}-wrapper ${h.value}`
2778
+ class: `${i}-wrapper ${m.value}`
2774
2779
  }, [u("div", {
2775
- class: re(`${i}-list`, h.value, e.tableProps?.class),
2780
+ class: re(`${i}-list`, m.value, e.tableProps?.class),
2776
2781
  style: e.tableProps?.style
2777
- }, [ll()]), e.pagination !== !1 && Be.value?.length > 0 && u(Gl, E({
2782
+ }, [ll()]), e.pagination !== !1 && Be.value?.length > 0 && u(Gl, M({
2778
2783
  class: {
2779
- [`${i}-pagination ${h.value}`]: !0,
2780
- [`${i}-pagination-${mt.value} ${h.value}`]: !!mt.value
2784
+ [`${i}-pagination ${m.value}`]: !0,
2785
+ [`${i}-pagination-${ht.value} ${m.value}`]: !!ht.value
2781
2786
  }
2782
2787
  }, ve(b(t)), {
2783
2788
  onChange: Ut
2784
2789
  }), null)])]
2785
- }) : u(_l, E(bt(e, Object.keys(Et)), Qt.value, {
2790
+ }) : u(_l, M(bt(e, Object.keys(Et)), Qt.value, {
2786
2791
  style: e.tableProps?.style,
2787
2792
  class: e.tableProps?.class,
2788
- loading: ht.value,
2793
+ loading: mt.value,
2789
2794
  rowKey: (T) => T[e.rowKey],
2790
2795
  transformCellText: (T) => {
2791
2796
  e.transformCellText && typeof e.transformCellText && e.transformCellText?.(T);
@@ -2799,7 +2804,7 @@ const {
2799
2804
  if (A.length === 0 || A.length === 1 && !U(A[0])) {
2800
2805
  A = A?.[0];
2801
2806
  const Q = fl(A, B?.columnEmptyText || e?.columnEmptyText || "");
2802
- _ = Q.success, A = La(Q.value, B?.valueType || e.columns?.find((Se) => (Se.key || Se.dataIndex) === K)?.valueType, i, h.value);
2807
+ _ = Q.success, A = La(Q.value, B?.valueType || e.columns?.find((Se) => (Se.key || Se.dataIndex) === K)?.valueType, i, m.value);
2803
2808
  } else A[0]?.type === "template" && (A = A[0]?.children);
2804
2809
  return B?.ellipsis ? tl(A, _, B) : A;
2805
2810
  },