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

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,119 +1,77 @@
1
- import { deepMerge as Pt, isObject as J, cloneDeep as ie, isArray as te, isBoolean as se, classNames as ge, isNumber as He, filterEmpty as jt, getPrefixCls as dt, getRandomNumber as ct, genColumnKey as Dt, isDeepEqualReact as Ue, compareArray as hl, runFunction as ml, convertValueBoolean as Pe, getSortIndex as vl, isFunction as ze, handleCurrentPage as gl, getSlot as Nt, arrayRepeat as yl, isString as Et, handleShowIndex as bl, handleEmptyField as Cl, getSlotVNode as ke, getTextWidth as pl } from "@gx-design-vue/pro-utils";
2
- import { toReactive as xl, useDebounceFn as Sl, useFullscreen as Mt, useWindowSize as wl } from "@vueuse/core";
3
- import { ref as k, isRef as at, watch as W, isReactive as Tl, computed as T, toRaw as $e, defineComponent as de, cloneVNode as et, reactive as Ie, watchEffect as qe, createVNode as r, Fragment as Ye, isVNode as le, mergeProps as L, h as At, unref as S, createTextVNode as Le, renderSlot as $l, onActivated as Rl, nextTick as Fl, getCurrentInstance as Bl, onUnmounted as Il, onDeactivated as Ol, onMounted as kl, toRef as ve } from "vue";
4
- import { tableProps as Pl } from "ant-design-vue/es/table/Table";
5
- import { omit as Ve, cloneDeep as Kt, pick as Ft } from "lodash-es";
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";
4
+ import { tableProps as $l } from "ant-design-vue/es/table/Table";
5
+ import { omit as Ne, cloneDeep as kt, pick as bt } from "lodash-es";
6
6
  import "ant-design-vue/es/_util/props-util";
7
- import { warning as Je } from "ant-design-vue/es/vc-util/warning";
8
- import { UpOutlined as jl, DownOutlined as Dl, SettingOutlined as zt, VerticalAlignTopOutlined as Nl, VerticalAlignMiddleOutlined as El, VerticalAlignBottomOutlined as Ml, InfoCircleOutlined as Al, ColumnHeightOutlined as Kl, FullscreenExitOutlined as zl, FullscreenOutlined as Yl, ReloadOutlined as Ll, CopyOutlined as Wl } from "@ant-design/icons-vue";
9
- import { useProAppContext as Yt } from "@gx-design-vue/pro-app";
10
- import { useContext as Hl, getProSolidColor as Lt, useProStyle as tt, unit as Bt, useProConfigContext as Vl } from "@gx-design-vue/pro-provider";
11
- import { Grid as ft, DatePicker as Wt, Space as Re, Input as Qe, TimePicker as ql, TreeSelect as Gl, Select as _l, InputNumber as nt, Button as It, Spin as Ht, Popover as Ql, Checkbox as Xl, Tooltip as be, Tree as Ul, Dropdown as Jl, Menu as Xe, theme as Zl, Pagination as ea, Table as ta, message as la, Empty as aa } from "ant-design-vue";
12
- import U from "dayjs";
13
- import { useMemo as Ze, tryOnUnmounted as na } from "@gx-design-vue/pro-hooks";
14
- function gn(e, a) {
15
- var R, c, p;
7
+ import { warning as We } from "ant-design-vue/es/vc-util/warning";
8
+ import { UpOutlined as Rl, DownOutlined as Fl, SettingOutlined as At, VerticalAlignTopOutlined as Bl, VerticalAlignMiddleOutlined as Il, VerticalAlignBottomOutlined as Pl, InfoCircleOutlined as kl, ColumnHeightOutlined as Al, FullscreenExitOutlined as Ol, FullscreenOutlined as Dl, ReloadOutlined as jl, CopyOutlined as Nl } from "@ant-design/icons-vue";
9
+ import { useProAppContext as Ot } from "@gx-design-vue/pro-app";
10
+ import { useContext as El, getProSolidColor as Dt, useProStyle as qe, unit as Ct, useProConfigContext as Ml } from "@gx-design-vue/pro-provider";
11
+ import { Grid as nt, DatePicker as jt, Space as ge, Input as Ke, TimePicker as zl, TreeSelect as Kl, Select as Yl, InputNumber as Xe, Button as xt, Spin as Nt, Popover as Ll, Checkbox as Wl, Tooltip as de, Tree as Hl, Dropdown as Vl, Menu as Ye, theme as ql, Pagination as Gl, Table as _l, message as Ql, Empty as Xl } from "ant-design-vue";
12
+ import H from "dayjs";
13
+ import { useMemo as He, tryOnUnmounted as Ul } from "@gx-design-vue/pro-hooks";
14
+ function rn(e, a) {
16
15
  function l() {
17
- var i, n;
18
- if (a != null && a.state) {
19
- if (at(a.state) && J(a.state.value))
20
- return ie({
16
+ if (a?.state) {
17
+ if (Qe(a.state) && V(a.state.value))
18
+ return te({
21
19
  ...a.state.value,
22
- params: ((i = a.state.value) == null ? void 0 : i.params) || {}
20
+ params: a.state.value?.params || {}
23
21
  });
24
- if (J(a.state) && !at(a.state))
25
- return ie({
26
- ...$e(a.state),
27
- params: ((n = a.state) == null ? void 0 : n.params) || {}
22
+ if (V(a.state) && !Qe(a.state))
23
+ return te({
24
+ ...ve(a.state),
25
+ params: a.state?.params || {}
28
26
  });
29
27
  }
30
28
  return {};
31
29
  }
32
- const u = k({
30
+ const n = I({
33
31
  ...l(),
34
- request: a == null ? void 0 : a.request
32
+ request: a?.request
35
33
  });
36
- a != null && a.state && (at(a.state) ? W(() => a.state.value, () => {
37
- C();
38
- }, { deep: !0 }) : Tl(a.state) && W(() => a == null ? void 0 : a.state, () => {
39
- C();
34
+ a?.state && (Qe(a.state) ? M(() => a.state.value, () => {
35
+ g();
36
+ }, { deep: !0 }) : pl(a.state) && M(() => a?.state, () => {
37
+ g();
40
38
  }, { deep: !0 }));
41
- const s = T(() => {
42
- var i, n;
43
- return (n = (i = e == null ? void 0 : e.value) == null ? void 0 : i.actionRef) == null ? void 0 : n.call(i);
44
- }), o = T(() => {
45
- var i, n;
46
- return (n = (i = e == null ? void 0 : e.value) == null ? void 0 : i.formRef) == null ? void 0 : n.call(i);
47
- }), f = T(() => {
48
- var i, n, d;
49
- return {
50
- ...((i = s.value) == null ? void 0 : i.pageState) || {},
51
- ...((d = (n = o.value) == null ? void 0 : n.getFormState) == null ? void 0 : d.call(n)) || {}
52
- };
53
- }), h = k(!!((c = (R = s.value) == null ? void 0 : R.loading) != null && c.value));
54
- W(() => {
55
- var i, n;
56
- return (n = (i = s.value) == null ? void 0 : i.loading) == null ? void 0 : n.value;
57
- }, (i) => {
58
- h.value = !!i;
59
- }), W(h, (i) => {
60
- var n, d;
61
- (d = (n = s.value) == null ? void 0 : n.setLoading) == null || d.call(n, !!i);
39
+ const o = S(() => e?.value?.actionRef?.()), i = S(() => e?.value?.formRef?.()), d = S(() => ({
40
+ ...o.value?.pageState || {},
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) => {
46
+ o.value?.setLoading?.(!!p);
62
47
  });
63
- function C() {
64
- u.value = Pt(u.value, l(), {
48
+ function g() {
49
+ n.value = Tt(n.value, l(), {
65
50
  omitNil: !0,
66
51
  omitEmpty: !0
67
52
  });
68
53
  }
69
54
  return {
70
- formRef: o,
71
- actionRef: s,
72
- tableState: xl(u),
73
- requestSearch: f,
55
+ formRef: i,
56
+ actionRef: o,
57
+ tableState: ml(n),
58
+ requestSearch: d,
74
59
  loading: h,
75
- dataSource: T(() => {
76
- var i, n;
77
- return ((n = (i = s == null ? void 0 : s.value) == null ? void 0 : i.dataSource) == null ? void 0 : n.value) || [];
78
- }),
79
- selectedKeys: T(() => {
80
- var i, n;
81
- return ((n = (i = s == null ? void 0 : s.value) == null ? void 0 : i.selectedKeys) == null ? void 0 : n.value) || [];
82
- }),
83
- selectedItems: T(() => {
84
- var i, n;
85
- return ((n = (i = s == null ? void 0 : s.value) == null ? void 0 : i.selectedItems) == null ? void 0 : n.value) || [];
86
- }),
87
- rowsSelection: (p = s == null ? void 0 : s.value) == null ? void 0 : p.rowsSelection,
88
- mutate: (i) => {
89
- var n, d;
90
- return (d = (n = s.value) == null ? void 0 : n.reSetDataList) == null ? void 0 : d.call(n, i);
91
- },
92
- reloadAndReset: (i) => {
93
- var n, d;
94
- return (d = (n = s.value) == null ? void 0 : n.reloadAndReset) == null ? void 0 : d.call(n, i);
95
- },
96
- setPageAndReload: (i, n, d, b) => {
97
- var w, O;
98
- return (O = (w = s.value) == null ? void 0 : w.setPageAndReload) == null ? void 0 : O.call(w, i, n, d, b);
99
- },
100
- setPagination: (i) => {
101
- var n, d;
102
- return (d = (n = s.value) == null ? void 0 : n.setPagination) == null ? void 0 : d.call(n, i);
103
- },
104
- setLoading: (i) => h.value = i,
105
- setDataValue: (i) => {
106
- var n, d;
107
- return (d = (n = s.value) == null ? void 0 : n.setDataValue) == null ? void 0 : d.call(n, i);
108
- },
109
- reload: (i) => {
110
- var n, d;
111
- return (d = (n = s.value) == null ? void 0 : n.reload) == null ? void 0 : d.call(n, i);
112
- }
60
+ dataSource: S(() => o?.value?.dataSource?.value || []),
61
+ selectedKeys: S(() => o?.value?.selectedKeys?.value || []),
62
+ selectedItems: S(() => o?.value?.selectedItems?.value || []),
63
+ rowsSelection: o?.value?.rowsSelection,
64
+ mutate: (p) => o.value?.reSetDataList?.(p),
65
+ reloadAndReset: (p) => o.value?.reloadAndReset?.(p),
66
+ setPageAndReload: (p, r, C, c) => o.value?.setPageAndReload?.(p, r, C, c),
67
+ setPagination: (p) => o.value?.setPagination?.(p),
68
+ setLoading: (p) => h.value = p,
69
+ setDataValue: (p) => o.value?.setDataValue?.(p),
70
+ reload: (p) => o.value?.reload?.(p)
113
71
  };
114
72
  }
115
- const ua = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Vt = {
116
- ...Ve(Pl(), ua),
73
+ const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Et = {
74
+ ...Ne($l(), Jl),
117
75
  transformCellText: Function,
118
76
  /**
119
77
  * @Author gx12358
@@ -133,8 +91,8 @@ const ua = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
133
91
  type: Object,
134
92
  default: void 0
135
93
  }
136
- }, ye = {
137
- ...Vt,
94
+ }, ce = {
95
+ ...Et,
138
96
  rowSelection: {
139
97
  type: Object,
140
98
  default: void 0
@@ -151,7 +109,7 @@ const ua = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
151
109
  */
152
110
  request: {
153
111
  type: Function,
154
- default: null
112
+ default: void 0
155
113
  },
156
114
  // 是否启用虚拟滚动
157
115
  virtualScroll: Boolean,
@@ -352,7 +310,7 @@ const ua = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
352
310
  * @lastTime 2022/2/8
353
311
  * @description 是否列拖动
354
312
  */
355
- draggabled: Boolean,
313
+ draggable: Boolean,
356
314
  /**
357
315
  * @Author gx12358
358
316
  * @DateTime 2022/2/8
@@ -410,7 +368,7 @@ const ua = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
410
368
  onRequestError: Function,
411
369
  onBeforeSearchSubmit: Function,
412
370
  onColumnsStateChange: Function
413
- }, { provideContext: ia, useInjectContext: Ce } = Hl("pro-table"), sa = /* @__PURE__ */ de({
371
+ }, { provideContext: Zl, useInjectContext: fe } = El("pro-table"), ea = /* @__PURE__ */ ne({
414
372
  name: "RequestSelect",
415
373
  props: {
416
374
  fetch: Function,
@@ -431,54 +389,53 @@ const ua = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
431
389
  setup(e, {
432
390
  slots: a
433
391
  }) {
434
- const l = k([]), u = k(e.loading ?? !1), s = k("init"), o = Sl(e.fetch, e.debounceTime || 10);
435
- return W([() => e.fetch, () => e.manual], () => {
436
- if (s.value !== "init" && u.value) return;
437
- const f = e.manual ?? !1;
438
- e.fetch && !f && (u.value = !0, o().then((h) => {
439
- l.value = Kt(h), s.value = "success";
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], () => {
394
+ if (o.value !== "init" && n.value) return;
395
+ const d = e.manual ?? !1;
396
+ e.fetch && !d && (n.value = !0, i().then((h) => {
397
+ l.value = kt(h), o.value = "success";
440
398
  }).catch((h) => {
441
- console.error(h), s.value = "error";
399
+ console.error(h), o.value = "error";
442
400
  }).finally(() => {
443
- u.value = !1;
401
+ n.value = !1;
444
402
  }));
445
403
  }, {
446
404
  immediate: !0
447
405
  }), () => {
448
- var h, C;
449
- const f = (h = a.default) == null ? void 0 : h.call(a);
450
- return et(te(f) ? f[0] : f, {
406
+ const d = a.default?.();
407
+ return Ve(X(d) ? d[0] : d, {
451
408
  options: l.value,
452
- notFoundContent: (C = e.notFoundContent) == null ? void 0 : C.call(e, u.value)
409
+ notFoundContent: e.notFoundContent?.(n.value)
453
410
  });
454
411
  };
455
412
  }
456
413
  });
457
- function oa(e, a) {
458
- const l = Ie({});
459
- function u() {
460
- Object.keys(e).forEach((f) => {
461
- s(f, e[f]);
414
+ function ta(e, a) {
415
+ const l = be({});
416
+ function n() {
417
+ Object.keys(e).forEach((d) => {
418
+ o(d, e[d]);
462
419
  });
463
- const o = a.find((f) => f.valueType === "dateRange");
464
- o && s(o.name || "", e[o.rangeStartName || "start"] ? [
465
- e[o.rangeStartName || "start"],
466
- e[o.rangeEndName || "end"]
420
+ const i = a.find((d) => d.valueType === "dateRange");
421
+ i && o(i.name || "", e[i.rangeStartName || "start"] ? [
422
+ e[i.rangeStartName || "start"],
423
+ e[i.rangeEndName || "end"]
467
424
  ] : []);
468
425
  }
469
- qe(() => {
470
- u();
426
+ Ee(() => {
427
+ n();
471
428
  });
472
- function s(o, f) {
473
- l[o] = f;
429
+ function o(i, d) {
430
+ l[i] = d;
474
431
  }
475
432
  return {
476
433
  formState: l,
477
- resetFormState: u,
478
- changeFormState: s
434
+ resetFormState: n,
435
+ changeFormState: o
479
436
  };
480
437
  }
481
- const ra = (e) => ({
438
+ const la = (e) => ({
482
439
  [`${e.componentCls}-search`]: {
483
440
  position: "relative",
484
441
  display: "flex",
@@ -491,7 +448,7 @@ const ra = (e) => ({
491
448
  border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
492
449
  borderRadius: e.borderRadiusLG,
493
450
  marginBottom: e.marginLG,
494
- backgroundColor: Lt(e, e.colorBgContainer)
451
+ backgroundColor: Dt(e, e.colorBgContainer)
495
452
  },
496
453
  "&-collapse-buttons": {
497
454
  display: "flex",
@@ -564,7 +521,7 @@ const ra = (e) => ({
564
521
  justifyContent: "center",
565
522
  alignItems: "center"
566
523
  }
567
- }), ut = [
524
+ }), Ue = [
568
525
  { value: "xxl", span: 4 },
569
526
  { value: "xl", span: 3 },
570
527
  { value: "lg", span: 2 },
@@ -572,51 +529,51 @@ const ra = (e) => ({
572
529
  { value: "sm", span: 2 },
573
530
  { value: "xs", span: 1 }
574
531
  ];
575
- function Te(e, a) {
576
- return typeof a == "function" ? a(U(e)) : U(e).format(a);
532
+ function me(e, a) {
533
+ return typeof a == "function" ? a(H(e)) : H(e).format(a);
577
534
  }
578
- function Ke(e, a) {
535
+ function Pe(e, a) {
579
536
  return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
580
537
  }
581
- const Ot = (e, a, l = "string") => {
582
- if (te(e)) {
583
- const [u, s] = e;
584
- let o, f;
585
- if (Array.isArray(a) ? (o = a[0], f = a[1]) : typeof a == "object" && a.type === "mask" ? (o = a.format, f = a.format) : (o = a, f = a), l === "string") {
586
- const h = u ? Te(u, o) : "", C = s ? Te(s, f) : "";
587
- return [h, C];
538
+ const St = (e, a, l = "string") => {
539
+ if (X(e)) {
540
+ const [n, o] = e;
541
+ let i, d;
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];
588
545
  }
589
- return [U(u), U(s)];
546
+ return [H(n), H(o)];
590
547
  }
591
548
  };
592
- function ca(e) {
593
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !le(e);
549
+ function aa(e) {
550
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
594
551
  }
595
552
  const {
596
- useBreakpoint: da
597
- } = ft, {
598
- MonthPicker: fa,
599
- RangePicker: ha,
600
- YearPicker: ma,
601
- WeekPicker: va,
602
- QuarterPicker: ga
603
- } = Wt;
604
- function ya(e) {
605
- let a = e.reduce((l, u) => u.order !== void 0 ? Math.max(l, u.order) : l, 0);
553
+ useBreakpoint: na
554
+ } = nt, {
555
+ MonthPicker: oa,
556
+ RangePicker: ia,
557
+ YearPicker: ua,
558
+ WeekPicker: sa,
559
+ QuarterPicker: ra
560
+ } = jt;
561
+ function ca(e) {
562
+ let a = e.reduce((l, n) => n.order !== void 0 ? Math.max(l, n.order) : l, 0);
606
563
  return e.forEach((l) => {
607
564
  l.order === void 0 && (a += 1, l.order = a);
608
- }), e.sort((l, u) => l.order - u.order), e;
565
+ }), e.sort((l, n) => l.order - n.order), e;
609
566
  }
610
- const qt = /* @__PURE__ */ de({
567
+ const Mt = /* @__PURE__ */ ne({
611
568
  name: "ProTableForm",
612
569
  props: {
613
- modal: ye.modalScroll,
570
+ modal: ce.modalScroll,
614
571
  searchMap: {
615
572
  type: Array,
616
573
  default: () => []
617
574
  },
618
- loading: ye.loading,
619
- cardBordered: ye.cardBordered,
575
+ loading: ce.loading,
576
+ cardBordered: ce.cardBordered,
620
577
  prefixCls: String,
621
578
  defaultParams: Object,
622
579
  onSearch: Function
@@ -625,422 +582,383 @@ const qt = /* @__PURE__ */ de({
625
582
  slots: a,
626
583
  expose: l
627
584
  }) {
628
- var Z, he;
629
585
  const {
630
- wrapSSR: u,
631
- hashId: s
632
- } = tt("ProTableForm", [ra], e.prefixCls), o = Yt(), f = da(), {
586
+ wrapSSR: n,
587
+ hashId: o
588
+ } = qe("ProTableForm", [la], e.prefixCls), i = Ot(), d = na(), {
633
589
  manualSearch: h,
634
- searchConfig: C,
635
- searchActions: R
636
- } = Ce(), {
637
- formState: c,
638
- resetFormState: p,
639
- changeFormState: i
640
- } = oa(e.defaultParams || {}, e.searchMap || []), n = k(((Z = C.value) == null ? void 0 : Z.collapsed) ?? ((he = C.value) == null ? void 0 : he.defaultCollapsed)), d = T(() => {
641
- var t, g;
642
- return se((t = R.value) == null ? void 0 : t.reset) ? (g = R.value) == null ? void 0 : g.reset : h.value;
643
- }), b = T(() => {
644
- var t;
645
- return O((t = C.value) == null ? void 0 : t.span);
646
- }), w = T(() => {
647
- var t;
648
- return (t = C.value) == null ? void 0 : t.label;
590
+ searchConfig: g,
591
+ searchActions: p
592
+ } = fe(), {
593
+ formState: r,
594
+ resetFormState: C,
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;
649
599
  });
650
- W(() => {
651
- var t;
652
- return (t = C.value) == null ? void 0 : t.collapsed;
653
- }, (t) => {
654
- n.value = t;
655
- });
656
- function O(t) {
657
- let g = 4;
658
- for (let x = 0; x < ut.length; x += 1) {
659
- const y = ut[x].value;
660
- if (f.value[y]) {
661
- g = (t == null ? void 0 : t[y]) || (e.modal ? 3 : ut[x].span);
600
+ function P(t) {
601
+ let f = 4;
602
+ for (let R = 0; R < Ue.length; R += 1) {
603
+ const $ = Ue[R].value;
604
+ if (d.value[$]) {
605
+ f = t?.[$] || (e.modal ? 3 : Ue[R].span);
662
606
  break;
663
607
  }
664
608
  }
665
- return g;
609
+ return f;
666
610
  }
667
- const I = (t) => {
668
- n.value = t;
669
- }, E = (t, g, x) => (t + 1) % g === 0 ? {
670
- ...x,
611
+ const k = (t) => {
612
+ m.value = t;
613
+ }, j = (t, f, R) => (t + 1) % f === 0 ? {
614
+ ...R,
671
615
  marginRight: 0
672
616
  } : {
673
- ...x,
617
+ ...R,
674
618
  marginRight: "2%"
675
- }, _ = () => {
676
- const t = Kt(c), g = e.searchMap.find((B) => B.valueType === "text") || "", x = e.searchMap.find((B) => B.valueType === "dateRange") || "", y = e.searchMap.find((B) => B.valueType === "treeSelect");
677
- return g && (t[g.name] = c[g.name] || g.initialValue || ""), x && (t[x.rangeStartName || "start"] = t[x.name] ? t[x.name][0] : "", t[x.rangeEndName || "end"] = t[x.name] ? t[x.name][1] : "", delete t[x.name]), y && (y != null && y.name && te(c[y == null ? void 0 : y.name]) && (t[y.name] = c[y.name].length ? c[y.name].map((B) => B[y.valueKey === "text" ? "label" : "value"]).join() : ""), y != null && y.name && te(t[y == null ? void 0 : y.name]) && (t[y.name] = t[y.name].length ? t[y.name].map((B) => B[y.valueKey === "text" ? "label" : "value"]) : "")), t;
678
- }, H = (t = !1, g) => {
679
- var x;
680
- (!h.value || t) && ((x = e.onSearch) == null || x.call(e, _(), t ? g ? "reset" : "submit" : void 0));
681
- }, A = (t, g, x) => {
682
- var B, P;
683
- const y = c[g.name || ""];
684
- switch (g.valueType) {
619
+ }, L = () => {
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
+ 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
+ }, W = (t = !1, f) => {
623
+ (!h.value || t) && e.onSearch?.(L(), t ? f ? "reset" : "submit" : void 0);
624
+ }, O = (t, f, R) => {
625
+ const $ = r[f.name || ""];
626
+ switch (f.valueType) {
685
627
  case "text":
686
- i(g.name || "", t || "");
628
+ c(f.name || "", t || "");
687
629
  break;
688
630
  case "number":
689
- i(g.name || "", t || void 0);
631
+ c(f.name || "", t || void 0);
690
632
  break;
691
633
  case "numberRange":
692
- He(x == null ? void 0 : x.key) && (y[x.key] = t, i(g.name || "", y || []));
634
+ je(R?.key) && ($[R.key] = t, c(f.name || "", $ || []));
693
635
  break;
694
636
  case "select":
695
- i(g.name || "", t ?? void 0);
637
+ c(f.name || "", t ?? void 0);
696
638
  break;
697
639
  case "treeSelect":
698
- i(g.name || "", t ?? ((B = g.field) != null && B.treeCheckable || (P = g.field) != null && P.multiple ? [] : null));
640
+ c(f.name || "", t ?? (f.field?.treeCheckable || f.field?.multiple ? [] : null));
699
641
  break;
700
642
  case "date":
701
- i(g.name || "", t ? Te(t, Ke(g.valueFormat, g.showTime)) : null);
643
+ c(f.name || "", t ? me(t, Pe(f.valueFormat, f.showTime)) : null);
702
644
  break;
703
645
  case "dateWeek":
704
- i(g.name || "", t ? Te(t, "YYYY-wo") : null);
646
+ c(f.name || "", t ? me(t, "YYYY-wo") : null);
705
647
  break;
706
648
  case "dateMonth":
707
- i(g.name || "", t ? Te(t, "YYYY-MM") : null);
649
+ c(f.name || "", t ? me(t, "YYYY-MM") : null);
708
650
  break;
709
651
  case "dateQuarter":
710
- i(g.name || "", t ? Te(t, "YYYY-QQ") : null);
652
+ c(f.name || "", t ? me(t, "YYYY-QQ") : null);
711
653
  break;
712
654
  case "dateYear":
713
- i(g.name || "", t ? Te(t, "YYYY") : null);
655
+ c(f.name || "", t ? me(t, "YYYY") : null);
714
656
  break;
715
657
  case "dateRange":
716
- i(g.name || "", t && te(t) && t.length === 2 ? Ot(t, Ke(g.valueFormat, g.showTime)) : null);
658
+ c(f.name || "", t && X(t) && t.length === 2 ? St(t, Pe(f.valueFormat, f.showTime)) : null);
717
659
  break;
718
660
  case "time":
719
- i(g.name || "", t ? Te(t, g.valueFormat || "HH:mm:ss") : null);
661
+ c(f.name || "", t ? me(t, f.valueFormat || "HH:mm:ss") : null);
720
662
  break;
721
663
  }
722
- g.valueType === "treeSelect" || g.valueType, H();
723
- }, ae = (t = !0) => {
724
- p(), H(!0, t);
664
+ f.valueType === "treeSelect" || f.valueType, W();
665
+ }, N = (t = !0) => {
666
+ C(), W(!0, t);
725
667
  };
726
668
  l({
727
- getFormState: () => _(),
728
- resetForm: ae
669
+ getFormState: () => L(),
670
+ resetForm: N
729
671
  });
730
- const z = () => {
731
- var g;
732
- const t = (g = o == null ? void 0 : o.emptyText) == null ? void 0 : g.value;
672
+ const D = () => {
673
+ const t = i?.emptyText?.value;
733
674
  if (t) {
734
- const x = le(t), y = x ? At(t) : jt(t || []);
735
- return r("div", {
736
- class: ge(`${e.prefixCls}-search-empty-text`, s.value)
737
- }, [x ? y : te(y) ? y.map((B) => et(B)) : void 0]);
675
+ const f = U(t), R = f ? Pt(t) : $t(t || []);
676
+ return u("div", {
677
+ class: re(`${e.prefixCls}-search-empty-text`, o.value)
678
+ }, [f ? R : X(R) ? R.map(($) => Ve($)) : void 0]);
738
679
  }
739
- }, K = () => (h.value || d.value) && r(Re, null, {
740
- default: () => [d.value && r(It, {
741
- onClick: () => ae()
680
+ }, Z = () => (h.value || x.value) && u(ge, null, {
681
+ default: () => [x.value && u(xt, {
682
+ onClick: () => N()
742
683
  }, {
743
- default: () => {
744
- var t;
745
- return [((t = R.value) == null ? void 0 : t.resetText) || "重置"];
746
- }
747
- }), h.value && r(It, {
684
+ default: () => [p.value?.resetText || "重置"]
685
+ }), h.value && u(xt, {
748
686
  loading: e.loading,
749
687
  type: "primary",
750
- onClick: () => H(!0)
688
+ onClick: () => W(!0)
751
689
  }, {
752
- default: () => {
753
- var t;
754
- return [((t = R.value) == null ? void 0 : t.searchText) || "查询"];
755
- }
690
+ default: () => [p.value?.searchText || "查询"]
756
691
  })]
757
- }), ne = ({
692
+ }), oe = ({
758
693
  formItemStyle: t,
759
- collapsed: g,
760
- collapseRender: x = !0
761
- }) => r("div", {
694
+ collapsed: f,
695
+ collapseRender: R = !0
696
+ }) => u("div", {
762
697
  style: t,
763
- class: `${e.prefixCls}-search-collapse-buttons ${s.value}`
764
- }, [r(Re, {
698
+ class: `${e.prefixCls}-search-collapse-buttons ${o.value}`
699
+ }, [u(ge, {
765
700
  size: 16
766
701
  }, {
767
- default: () => {
768
- var y, B, P;
769
- return [K(), ((y = C.value) == null ? void 0 : y.collapseRender) !== !1 && x && r(Ye, null, [typeof ((B = C.value) == null ? void 0 : B.collapseRender) == "function" ? (P = C.value) == null ? void 0 : P.collapseRender(g) : r("span", {
770
- class: `${e.prefixCls}-a ${s.value}`,
771
- onClick: () => I(!g)
772
- }, [g ? "收起" : "展开", g ? r(jl, null, null) : r(Dl, null, null)])])];
773
- }
702
+ default: () => [Z(), g.value?.collapseRender !== !1 && R && u(Ae, null, [typeof g.value?.collapseRender == "function" ? g.value?.collapseRender(f) : u("span", {
703
+ class: `${e.prefixCls}-a ${o.value}`,
704
+ onClick: () => k(!f)
705
+ }, [f ? "收起" : "展开", f ? u(Rl, null, null) : u(Fl, null, null)])])]
774
706
  })]);
775
- function fe(t) {
776
- var g;
777
- return t === void 0 ? void 0 : t ? r(Ht, {
707
+ function ie(t) {
708
+ return t === void 0 ? void 0 : t ? u(Nt, {
778
709
  size: "small",
779
- indicator: (g = o == null ? void 0 : o.indicator) == null ? void 0 : g.value
780
- }, null) : z();
710
+ indicator: i?.indicator?.value
711
+ }, null) : D();
781
712
  }
782
- function oe(t, g) {
783
- return r(sa, L(t.request, {
713
+ function ae(t, f) {
714
+ return u(ea, E(t.request, {
784
715
  loading: t.loading,
785
- notFoundContent: fe
786
- }), ca(g) ? g : {
787
- default: () => [g]
716
+ notFoundContent: ie
717
+ }), aa(f) ? f : {
718
+ default: () => [f]
788
719
  });
789
720
  }
790
- const Fe = (t) => {
791
- var P;
792
- let g;
793
- const x = h.value ? Qe : Qe.Search, y = Ve(t.field || {}, "rules");
794
- let B = null;
721
+ const pe = (t) => {
722
+ let f;
723
+ const R = h.value ? Ke : Ke.Search, $ = Ne(t.field || {}, "rules");
724
+ let w = null;
795
725
  switch (t.valueType) {
796
726
  case "text":
797
- g = r(x, L({
727
+ f = u(R, E({
798
728
  style: {
799
729
  width: "100%"
800
730
  },
801
- value: c[t.name],
731
+ value: r[t.name],
802
732
  placeholder: t.placeholder || "请输入",
803
733
  allowClear: t.allowClear ?? !0,
804
- onChange: (v) => A(v.target.value, t),
805
- onSearch: (v) => H()
806
- }, y), null);
734
+ onChange: (s) => O(s.target.value, t),
735
+ onSearch: (s) => W()
736
+ }, $), null);
807
737
  break;
808
738
  case "number":
809
- g = r(nt, L({
739
+ f = u(Xe, E({
810
740
  style: {
811
741
  width: "100%"
812
742
  },
813
- value: c[t.name],
743
+ value: r[t.name],
814
744
  placeholder: t.placeholder || "请输入",
815
- onChange: (v) => A(v, t)
816
- }, y), null);
745
+ onChange: (s) => O(s, t)
746
+ }, $), null);
817
747
  break;
818
748
  case "numberRange":
819
- g = r(Qe.Group, {
749
+ f = u(Ke.Group, {
820
750
  compact: !0,
821
- class: ge(s.value, `${e.prefixCls}-search-input-compact`)
751
+ class: re(o.value, `${e.prefixCls}-search-input-compact`)
822
752
  }, {
823
- default: () => {
824
- var v, G, V, Q;
825
- return [r(nt, {
826
- value: (v = c[t.name]) == null ? void 0 : v[0],
827
- onChange: (ue) => A(ue, t, {
828
- key: 0
829
- }),
830
- placeholder: te(t.placeholder) && ((G = t.placeholder) == null ? void 0 : G[0]) || "请输入"
831
- }, null), r(Qe, {
832
- disabled: !0,
833
- placeholder: "~"
834
- }, null), r(nt, {
835
- value: (V = c[t.name]) == null ? void 0 : V[1],
836
- onChange: (ue) => A(ue, t, {
837
- key: 1
838
- }),
839
- placeholder: te(t.placeholder) && ((Q = t.placeholder) == null ? void 0 : Q[1]) || "请输入"
840
- }, null)];
841
- }
753
+ default: () => [u(Xe, {
754
+ value: r[t.name]?.[0],
755
+ onChange: (s) => O(s, t, {
756
+ key: 0
757
+ }),
758
+ placeholder: X(t.placeholder) && t.placeholder?.[0] || "请输入"
759
+ }, null), u(Ke, {
760
+ disabled: !0,
761
+ placeholder: "~"
762
+ }, null), u(Xe, {
763
+ value: r[t.name]?.[1],
764
+ onChange: (s) => O(s, t, {
765
+ key: 1
766
+ }),
767
+ placeholder: X(t.placeholder) && t.placeholder?.[1] || "请输入"
768
+ }, null)]
842
769
  });
843
770
  break;
844
771
  case "select":
845
- B = r(_l, L({
772
+ w = u(Yl, E({
846
773
  style: {
847
774
  width: "100%"
848
775
  },
849
- value: t.loading ? void 0 : c[t.name],
776
+ value: t.loading ? void 0 : r[t.name],
850
777
  optionFilterProp: "label",
851
778
  placeholder: t.placeholder || "请选择",
852
779
  showSearch: t.showSearch,
853
780
  allowClear: t.allowClear ?? !0,
854
- getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
855
- notFoundContent: fe(t.loading),
856
- onChange: (v) => A(v, t),
857
- options: t.loading ? [] : (t == null ? void 0 : t.valueEnum) || []
858
- }, y), null);
781
+ getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
782
+ notFoundContent: ie(t.loading),
783
+ onChange: (s) => O(s, t),
784
+ options: t.loading ? [] : t?.valueEnum || []
785
+ }, $), null);
859
786
  break;
860
787
  case "treeSelect":
861
- B = r(Gl, L({
788
+ w = u(Kl, E({
862
789
  style: {
863
790
  width: "100%"
864
791
  },
865
- value: c[t.name],
792
+ value: r[t.name],
866
793
  placeholder: t.placeholder || "请选择",
867
794
  allowClear: t.allowClear ?? !0,
868
795
  treeData: t.loading ? [] : t.valueEnum || [],
869
- getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
870
- notFoundContent: fe(t.loading),
871
- onChange: (v) => A(v, t)
872
- }, y), null);
796
+ getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
797
+ notFoundContent: ie(t.loading),
798
+ onChange: (s) => O(s, t)
799
+ }, $), null);
873
800
  break;
874
801
  case "date":
875
- g = r(Wt, L({
802
+ f = u(jt, E({
876
803
  style: {
877
804
  width: "100%"
878
805
  },
879
- value: c[t.name] ? U(c[t.name]) : void 0,
880
- getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
806
+ value: r[t.name] ? H(r[t.name]) : void 0,
807
+ getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
881
808
  placeholder: t.placeholder || "请选择",
882
809
  allowClear: t.allowClear ?? !0,
883
- format: Ke(t.valueFormat, t.showTime),
810
+ format: Pe(t.valueFormat, t.showTime),
884
811
  showTime: t.showTime,
885
812
  showToday: t.showToday || !0,
886
- onChange: (v) => A(v, t)
887
- }, y), null);
813
+ onChange: (s) => O(s, t)
814
+ }, $), null);
888
815
  break;
889
816
  case "dateWeek":
890
- g = r(va, L({
817
+ f = u(sa, E({
891
818
  style: {
892
819
  width: "100%"
893
820
  },
894
- value: c[t.name] ? U(c[t.name], t.valueFormat || "YYYY-wo") : void 0,
895
- getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
821
+ value: r[t.name] ? H(r[t.name], t.valueFormat || "YYYY-wo") : void 0,
822
+ getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
896
823
  allowClear: t.allowClear ?? !0,
897
824
  placeholder: t.placeholder || "请选择",
898
- onChange: (v) => A(v, t)
899
- }, y), null);
825
+ onChange: (s) => O(s, t)
826
+ }, $), null);
900
827
  break;
901
828
  case "dateMonth":
902
- g = r(fa, L({
829
+ f = u(oa, E({
903
830
  style: {
904
831
  width: "100%"
905
832
  },
906
- value: c[t.name] ? U(c[t.name], t.valueFormat || "YYYY-MM") : void 0,
907
- getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
833
+ value: r[t.name] ? H(r[t.name], t.valueFormat || "YYYY-MM") : void 0,
834
+ getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
908
835
  allowClear: t.allowClear ?? !0,
909
836
  placeholder: t.placeholder || "请选择",
910
- onChange: (v) => A(v, t)
911
- }, y), null);
837
+ onChange: (s) => O(s, t)
838
+ }, $), null);
912
839
  break;
913
840
  case "dateQuarter":
914
- g = r(ga, L({
841
+ f = u(ra, E({
915
842
  style: {
916
843
  width: "100%"
917
844
  },
918
- value: c[t.name] ? U(c[t.name], t.valueFormat || "YYYY-QQ") : void 0,
919
- getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
845
+ value: r[t.name] ? H(r[t.name], t.valueFormat || "YYYY-QQ") : void 0,
846
+ getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
920
847
  allowClear: t.allowClear ?? !0,
921
848
  placeholder: t.placeholder || "请选择",
922
- onChange: (v) => A(v, t)
923
- }, y), null);
849
+ onChange: (s) => O(s, t)
850
+ }, $), null);
924
851
  break;
925
852
  case "dateYear":
926
- g = r(ma, L({
853
+ f = u(ua, E({
927
854
  style: {
928
855
  width: "100%"
929
856
  },
930
- value: c[t.name] ? U(c[t.name], t.valueFormat || "YYYY") : void 0,
931
- getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
857
+ value: r[t.name] ? H(r[t.name], t.valueFormat || "YYYY") : void 0,
858
+ getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
932
859
  allowClear: t.allowClear ?? !0,
933
860
  placeholder: t.placeholder || "请选择",
934
- onChange: (v) => A(v, t)
935
- }, y), null);
861
+ onChange: (s) => O(s, t)
862
+ }, $), null);
936
863
  break;
937
864
  case "dateRange":
938
- g = r(ha, L({
865
+ f = u(ia, E({
939
866
  style: {
940
867
  width: "100%"
941
868
  },
942
- value: c[t.name] && te(c[t.name]) && ((P = c[t.name]) == null ? void 0 : P.length) === 2 ? Ot(c[t.name], Ke(t.valueFormat, t.showTime), "dayjs") : void 0,
943
- getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
869
+ value: r[t.name] && X(r[t.name]) && r[t.name]?.length === 2 ? St(r[t.name], Pe(t.valueFormat, t.showTime), "dayjs") : void 0,
870
+ getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
944
871
  placeholder: t.placeholder || ["开始日期", "结束日期"],
945
- format: Ke(t.valueFormat, t.showTime),
872
+ format: Pe(t.valueFormat, t.showTime),
946
873
  showTime: t.showTime,
947
- onChange: (v) => A(v, t)
948
- }, y), null);
874
+ onChange: (s) => O(s, t)
875
+ }, $), null);
949
876
  break;
950
877
  case "time":
951
- g = r(ql, L({
878
+ f = u(zl, E({
952
879
  style: {
953
880
  width: "100%"
954
881
  },
955
- value: c[t.name] ? U(c[t.name], t.valueFormat || "HH:mm:ss") : void 0,
956
- getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
882
+ value: r[t.name] ? H(r[t.name], t.valueFormat || "HH:mm:ss") : void 0,
883
+ getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
957
884
  placeholder: t.placeholder || "请选择",
958
885
  allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
959
886
  use12Hours: t.use12Hours,
960
887
  format: t.valueFormat || "HH:mm:ss",
961
- onChange: (v) => A(v, t)
962
- }, y), null);
888
+ onChange: (s) => O(s, t)
889
+ }, $), null);
963
890
  break;
964
891
  }
965
- return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (g = t.request ? oe(t, B) : B), g;
966
- }, pe = ({
892
+ return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (f = t.request ? ae(t, w) : w), f;
893
+ }, he = ({
967
894
  formItemStyle: t = {},
968
- item: g
895
+ item: f
969
896
  }) => {
970
- var P, v, G, V, Q, ue, xe, X;
971
- const x = le(g) ? (P = g.props) == null ? void 0 : P.label : g.label, y = (le(g) ? (v = g.props) == null ? void 0 : v.labelWidth : g.labelWidth) || ((G = w.value) == null ? void 0 : G.width), B = (le(g) ? (V = g.props) == null ? void 0 : V.labelAlign : g.labelAlign) || ((Q = w.value) == null ? void 0 : Q.align);
972
- return r("div", {
897
+ const R = U(f) ? f.props?.label : f.label, $ = (U(f) ? f.props?.labelWidth : f.labelWidth) || F.value?.width, w = (U(f) ? f.props?.labelAlign : f.labelAlign) || F.value?.align;
898
+ return u("div", {
973
899
  class: `${e.prefixCls}-search-item`,
974
900
  style: {
975
901
  ...t,
976
- gap: (ue = w.value) != null && ue.gap ? Bt((xe = w.value) == null ? void 0 : xe.gap) : void 0
902
+ gap: F.value?.gap ? Ct(F.value?.gap) : void 0
977
903
  }
978
- }, [x && r("div", {
979
- class: ge(`${e.prefixCls}-search-item-label`, ((X = w.value) == null ? void 0 : X.colon) === !1 && `${e.prefixCls}-search-item-label-no-colon`, B && `${e.prefixCls}-search-item-label-${B}`),
904
+ }, [R && u("div", {
905
+ class: re(`${e.prefixCls}-search-item-label`, F.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, w && `${e.prefixCls}-search-item-label-${w}`),
980
906
  style: {
981
- width: y ? Bt(y) : void 0
907
+ width: $ ? Ct($) : void 0
982
908
  }
983
- }, [x]), r("div", {
984
- class: ge(`${e.prefixCls}-search-item-children`)
985
- }, [le(g) ? g : Fe(g)])]);
986
- }, je = () => {
987
- var y, B;
988
- let t = ((y = a.default) == null ? void 0 : y.call(a)) || [];
989
- t.length === 1 && t[0].type === "template" && (t = ((B = t[0]) == null ? void 0 : B.children) || []);
990
- const g = ya([...e.searchMap, ...t.map((P) => {
991
- var v;
992
- return {
993
- ...P,
994
- order: ((v = P.props) == null ? void 0 : v.order) || void 0
995
- };
996
- })]), x = {
997
- width: `${(100 - (b.value - 1) * 2) / b.value}%`
909
+ }, [R]), u("div", {
910
+ class: re(`${e.prefixCls}-search-item-children`)
911
+ }, [U(f) ? f : pe(f)])]);
912
+ }, $e = () => {
913
+ let t = a.default?.() || [];
914
+ t.length === 1 && t[0].type === "template" && (t = t[0]?.children || []);
915
+ const f = ca([...e.searchMap, ...t.map(($) => ({
916
+ ...$,
917
+ order: $.props?.order || void 0
918
+ }))]), R = {
919
+ width: `${(100 - (v.value - 1) * 2) / v.value}%`
998
920
  };
999
- return g.map((P, v) => {
1000
- const G = E(v, b.value, x);
1001
- return g.length < b.value || n.value ? r(Ye, null, [pe({
1002
- formItemStyle: G,
1003
- item: P
1004
- }), v === g.length - 1 && ne({
921
+ return f.map(($, w) => {
922
+ const s = j(w, v.value, R);
923
+ return f.length < v.value || m.value ? u(Ae, null, [he({
924
+ formItemStyle: s,
925
+ item: $
926
+ }), w === f.length - 1 && oe({
1005
927
  formItemStyle: {
1006
928
  flex: 1,
1007
929
  justifyContent: "flex-end"
1008
930
  },
1009
- collapsed: n.value,
1010
- collapseRender: !!n.value
1011
- })]) : r(Ye, null, [v < b.value - 1 && pe({
1012
- formItemStyle: G,
1013
- item: P
1014
- }), v === b.value - 1 && (b.value - 1 === 0 || g.length === b.value) && pe({
1015
- formItemStyle: G,
1016
- item: P
1017
- }), v === b.value - 1 && g.length >= b.value && ne({
931
+ collapsed: m.value,
932
+ collapseRender: !!m.value
933
+ })]) : u(Ae, null, [w < v.value - 1 && he({
934
+ formItemStyle: s,
935
+ item: $
936
+ }), w === v.value - 1 && (v.value - 1 === 0 || f.length === v.value) && he({
937
+ formItemStyle: s,
938
+ item: $
939
+ }), w === v.value - 1 && f.length >= v.value && oe({
1018
940
  formItemStyle: {
1019
941
  flex: 1,
1020
942
  justifyContent: "flex-end"
1021
943
  },
1022
944
  collapsed: !1,
1023
- collapseRender: g.length !== b.value
945
+ collapseRender: f.length !== v.value
1024
946
  })]);
1025
947
  });
1026
948
  };
1027
949
  return () => {
1028
- var g;
1029
950
  const t = e.cardBordered && `${e.prefixCls}-search-border`;
1030
- return u(r("div", {
1031
- class: ge(s.value, `${e.prefixCls}-search`, t, s.value, (g = C.value) == null ? void 0 : g.className)
1032
- }, [je()]));
951
+ return n(u("div", {
952
+ class: re(o.value, `${e.prefixCls}-search`, t, o.value, g.value?.className)
953
+ }, [$e()]));
1033
954
  };
1034
955
  }
1035
956
  });
1036
- qt.inheritAttrs = !1;
1037
- const We = (e) => {
1038
- const a = k(null);
1039
- return a.value = e, (...l) => {
1040
- var u;
1041
- return (u = a.value) == null ? void 0 : u.call(a, ...l);
1042
- };
1043
- }, ba = (e) => ({
957
+ Mt.inheritAttrs = !1;
958
+ const De = (e) => {
959
+ const a = I(null);
960
+ return a.value = e, (...l) => a.value?.(...l);
961
+ }, da = (e) => ({
1044
962
  [`${e.componentCls}`]: {
1045
963
  width: "auto",
1046
964
  "&-title": {
@@ -1122,42 +1040,38 @@ const We = (e) => {
1122
1040
  }
1123
1041
  }
1124
1042
  }
1125
- }), it = ({
1043
+ }), Je = ({
1126
1044
  title: e,
1127
1045
  show: a,
1128
1046
  treeKey: l,
1129
- fixed: u
1047
+ fixed: n
1130
1048
  }, {
1131
- slots: s
1049
+ slots: o
1132
1050
  }) => {
1133
1051
  const {
1134
- cacheColumns: o,
1135
- settingsAction: f
1136
- } = Ce();
1137
- return a ? r(be, {
1052
+ cacheColumns: i,
1053
+ settingsAction: d
1054
+ } = fe();
1055
+ return a ? u(de, {
1138
1056
  title: e
1139
1057
  }, {
1140
- default: () => {
1141
- var h;
1142
- return [r("span", {
1143
- onClick: (C) => {
1144
- var n, d, b;
1145
- C.stopPropagation(), C.preventDefault();
1146
- const R = ((d = (n = S(o)) == null ? void 0 : n.find((w) => w.uuid === l)) == null ? void 0 : d.key) || "", c = (f == null ? void 0 : f.columnsMap[R]) || {};
1147
- if (typeof c.disable == "boolean" ? c.disable : (b = c.disable) == null ? void 0 : b.icon) return;
1148
- const i = {
1149
- ...f == null ? void 0 : f.columnsMap,
1150
- [R]: {
1151
- ...c,
1152
- fixed: u
1153
- }
1154
- };
1155
- f == null || f.setColumnsMap(i, "fixed");
1156
- }
1157
- }, [(h = s.default) == null ? void 0 : h.call(s)])];
1158
- }
1058
+ default: () => [u("span", {
1059
+ onClick: (h) => {
1060
+ h.stopPropagation(), h.preventDefault();
1061
+ const g = b(i)?.find((c) => c.uuid === l)?.key || "", p = d?.columnsMap[g] || {};
1062
+ if (typeof p.disable == "boolean" ? p.disable : p.disable?.icon) return;
1063
+ const C = {
1064
+ ...d?.columnsMap,
1065
+ [g]: {
1066
+ ...p,
1067
+ fixed: n
1068
+ }
1069
+ };
1070
+ d?.setColumnsMap(C, "fixed");
1071
+ }
1072
+ }, [o.default?.()])]
1159
1073
  }) : null;
1160
- }, Ca = /* @__PURE__ */ de({
1074
+ }, fa = /* @__PURE__ */ ne({
1161
1075
  props: {
1162
1076
  treeKey: String,
1163
1077
  hashId: String,
@@ -1169,44 +1083,41 @@ const We = (e) => {
1169
1083
  setup(e) {
1170
1084
  const {
1171
1085
  cacheColumns: a
1172
- } = Ce(), l = T(() => {
1173
- var s, o;
1174
- return ((o = (s = S(a)) == null ? void 0 : s.find((f) => f.uuid === e.treeKey)) == null ? void 0 : o.key) || "";
1175
- }), u = T(() => l.value === "action" && e.autoScroll);
1086
+ } = fe(), l = S(() => b(a)?.find((o) => o.uuid === e.treeKey)?.key || ""), n = S(() => l.value === "action" && e.autoScroll);
1176
1087
  return () => {
1177
- const s = r("span", {
1088
+ const o = u("span", {
1178
1089
  class: [`${e.className}-list-item-option`, e.hashId]
1179
- }, [r(it, {
1090
+ }, [u(Je, {
1180
1091
  treeKey: e.treeKey || "",
1181
1092
  fixed: "left",
1182
1093
  title: "固定在列首",
1183
- show: e.fixed !== "left" && !u.value
1094
+ show: e.fixed !== "left" && !n.value
1184
1095
  }, {
1185
- default: () => [r(Nl, null, null)]
1186
- }), r(it, {
1096
+ default: () => [u(Bl, null, null)]
1097
+ }), u(Je, {
1187
1098
  treeKey: e.treeKey || "",
1188
1099
  fixed: void 0,
1189
1100
  title: "不固定",
1190
- show: !!e.fixed && !u.value
1101
+ show: !!e.fixed && !n.value
1191
1102
  }, {
1192
- default: () => [r(El, null, null)]
1193
- }), r(it, {
1103
+ default: () => [u(Il, null, null)]
1104
+ }), u(Je, {
1194
1105
  treeKey: e.treeKey || "",
1195
1106
  fixed: "right",
1196
1107
  title: "固定在列尾",
1197
1108
  show: e.fixed !== "right"
1198
1109
  }, {
1199
- default: () => [r(Ml, null, null)]
1110
+ default: () => [u(Pl, null, null)]
1200
1111
  })]);
1201
- return r("span", {
1112
+ return u("span", {
1202
1113
  class: [`${e.className}-list-item`, e.hashId],
1203
1114
  key: e.treeKey
1204
- }, [r("div", {
1115
+ }, [u("div", {
1205
1116
  class: [`${e.className}-list-item-title`, e.hashId]
1206
- }, [e.title]), s]);
1117
+ }, [e.title]), o]);
1207
1118
  };
1208
1119
  }
1209
- }), st = /* @__PURE__ */ de({
1120
+ }), Ze = /* @__PURE__ */ ne({
1210
1121
  props: {
1211
1122
  list: Array,
1212
1123
  keys: Array,
@@ -1221,110 +1132,103 @@ const We = (e) => {
1221
1132
  }
1222
1133
  },
1223
1134
  setup(e) {
1224
- const a = k(ct().uuid(15)), l = T(() => e.list && e.list.length > 0), u = k([]), s = k([]), {
1225
- cacheColumns: o,
1226
- slots: f,
1135
+ const a = I(lt().uuid(15)), l = S(() => e.list && e.list.length > 0), n = I([]), o = I([]), {
1136
+ cacheColumns: i,
1137
+ slots: d,
1227
1138
  settingsAction: h
1228
- } = Ce(), C = (i, n) => i.map(({
1229
- key: d,
1230
- children: b,
1231
- uuid: w,
1232
- ...O
1139
+ } = fe(), g = (c, m) => c.map(({
1140
+ key: x,
1141
+ children: v,
1142
+ uuid: F,
1143
+ ...P
1233
1144
  }) => {
1234
- var H;
1235
- const I = (h == null ? void 0 : h.columnsMap[d || "null"]) || {
1145
+ const k = h?.columnsMap[x || "null"] || {
1236
1146
  show: !0
1237
1147
  };
1238
- let E = !1;
1239
- I.show !== !1 && (n == null ? void 0 : n.show) !== !1 && !b && (E = !0);
1240
- const _ = {
1241
- key: w || "",
1242
- ...Ve(O, ["dataIndex"]),
1243
- checked: E,
1148
+ let j = !1;
1149
+ k.show !== !1 && m?.show !== !1 && !v && (j = !0);
1150
+ const L = {
1151
+ key: F || "",
1152
+ ...Ne(P, ["dataIndex"]),
1153
+ checked: j,
1244
1154
  selectable: !1,
1245
- disabled: I.disable === !0,
1246
- disableCheckbox: typeof I.disable == "boolean" ? I.disable : (H = I.disable) == null ? void 0 : H.checkbox,
1155
+ disabled: k.disable === !0,
1156
+ disableCheckbox: typeof k.disable == "boolean" ? k.disable : k.disable?.checkbox,
1247
1157
  isLeaf: !0
1248
1158
  };
1249
- return b && (_.children = C(b, I)), _;
1159
+ return v && (L.children = g(v, k)), L;
1250
1160
  });
1251
- qe(() => {
1252
- const i = C(e.list || []);
1253
- u.value = i, s.value = i.filter((n) => n.checked).map((n) => n.key), (h == null ? void 0 : h.operationType.value) === "fixed" && (a.value = ct().uuid(15));
1161
+ Ee(() => {
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));
1254
1164
  });
1255
- const R = We((i, n, d) => {
1256
- var ae, z;
1257
- const b = ((ae = S(o).find((K) => K.uuid === i)) == null ? void 0 : ae.key) || "", w = ((z = S(o).find((K) => K.uuid === n)) == null ? void 0 : z.key) || "", O = {
1258
- ...h == null ? void 0 : h.columnsMap
1259
- }, I = [...h.sortKeyColumns.value], E = I.findIndex((K) => K === b), _ = I.findIndex((K) => K === w), H = d > E;
1260
- if (E < 0)
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;
1169
+ if (j < 0)
1261
1170
  return;
1262
- const A = I[E];
1263
- I.splice(E, 1), d === 0 ? I.unshift(A) : I.splice(H ? _ : _ + 1, 0, A), I.forEach((K, ne) => {
1264
- O[K] = {
1265
- ...O[K] || {},
1266
- order: ne
1171
+ const O = k[j];
1172
+ k.splice(j, 1), x === 0 ? k.unshift(O) : k.splice(W ? L : L + 1, 0, O), k.forEach((N, D) => {
1173
+ P[N] = {
1174
+ ...P[N] || {},
1175
+ order: D
1267
1176
  };
1268
- }), h == null || h.setColumnsMap(O, "drop"), h == null || h.setSortKeyColumns(I);
1269
- }), c = We((i) => {
1270
- var I;
1271
- const n = i.node.key, d = ((I = S(o).find((E) => E.uuid === n)) == null ? void 0 : I.key) || "", w = {
1272
- ...(h == null ? void 0 : h.columnsMap[d]) || {}
1177
+ }), h?.setColumnsMap(P, "drop"), h?.setSortKeyColumns(k);
1178
+ }), r = De((c) => {
1179
+ const m = c.node.key, x = b(i).find((k) => k.uuid === m)?.key || "", F = {
1180
+ ...h?.columnsMap[x] || {}
1273
1181
  };
1274
- w.show = i.checked;
1275
- const O = {
1276
- ...h == null ? void 0 : h.columnsMap,
1277
- [d]: w
1182
+ F.show = c.checked;
1183
+ const P = {
1184
+ ...h?.columnsMap,
1185
+ [x]: F
1278
1186
  };
1279
- h == null || h.setColumnsMap(O, "show");
1280
- }), p = (i) => {
1281
- const n = S(o).find((d) => d.uuid === i.key);
1282
- return i.title || $l(f, "headerCell", {
1283
- title: n.title,
1284
- column: n
1285
- }, () => [n.title]);
1286
- };
1287
- return () => {
1288
- var i, n;
1289
- return l.value ? r(Ye, null, [e.showTitle && r("span", {
1290
- class: [`${e.className}-list-title`, e.hashId]
1291
- }, [e.title]), r(Ul, {
1292
- key: a.value,
1293
- draggable: e.draggable && !!((i = u.value) != null && i.length) && ((n = u.value) == null ? void 0 : n.length) > 1,
1294
- checkable: e.checkable,
1295
- blockNode: !0,
1296
- showLine: !1,
1297
- checkedKeys: s.value,
1298
- height: 280,
1299
- onDrop: (d) => {
1300
- const b = d.node.key, w = d.dragNode.key, {
1301
- dropPosition: O,
1302
- dropToGap: I
1303
- } = d, E = O === -1 || !I ? O + 1 : O;
1304
- R(w, b, E);
1305
- },
1306
- onCheck: (d, b) => c(b),
1307
- treeData: u.value
1308
- }, {
1309
- title: (d) => {
1310
- var w;
1311
- const b = {
1312
- ...d,
1313
- children: void 0,
1314
- title: p(d),
1315
- autoScroll: (w = h == null ? void 0 : h.autoScroll) == null ? void 0 : w.value
1316
- };
1317
- return r(Ca, L({
1318
- hashId: e.hashId,
1319
- className: e.className
1320
- }, b, {
1321
- treeKey: b.key
1322
- }), null);
1323
- }
1324
- })]) : null;
1187
+ h?.setColumnsMap(P, "show");
1188
+ }), C = (c) => {
1189
+ const m = b(i).find((x) => x.uuid === c.key);
1190
+ return c.title || yl(d, "headerCell", {
1191
+ title: m.title,
1192
+ column: m
1193
+ }, () => [m.title]);
1325
1194
  };
1195
+ return () => l.value ? u(Ae, null, [e.showTitle && u("span", {
1196
+ class: [`${e.className}-list-title`, e.hashId]
1197
+ }, [e.title]), u(Hl, {
1198
+ key: a.value,
1199
+ draggable: e.draggable && !!n.value?.length && n.value?.length > 1,
1200
+ checkable: e.checkable,
1201
+ blockNode: !0,
1202
+ showLine: !1,
1203
+ checkedKeys: o.value,
1204
+ height: 280,
1205
+ onDrop: (c) => {
1206
+ const m = c.node.key, x = c.dragNode.key, {
1207
+ dropPosition: v,
1208
+ dropToGap: F
1209
+ } = c, P = v === -1 || !F ? v + 1 : v;
1210
+ p(x, m, P);
1211
+ },
1212
+ onCheck: (c, m) => r(m),
1213
+ treeData: n.value
1214
+ }, {
1215
+ title: (c) => {
1216
+ const m = {
1217
+ ...c,
1218
+ children: void 0,
1219
+ title: C(c),
1220
+ autoScroll: h?.autoScroll?.value
1221
+ };
1222
+ return u(fa, E({
1223
+ hashId: e.hashId,
1224
+ className: e.className
1225
+ }, m, {
1226
+ treeKey: m.key
1227
+ }), null);
1228
+ }
1229
+ })]) : null;
1326
1230
  }
1327
- }), pa = /* @__PURE__ */ de({
1231
+ }), ha = /* @__PURE__ */ ne({
1328
1232
  props: {
1329
1233
  hashId: String,
1330
1234
  className: String,
@@ -1334,64 +1238,64 @@ const We = (e) => {
1334
1238
  setup(e) {
1335
1239
  const {
1336
1240
  columns: a
1337
- } = Ce(), l = k([]), u = k([]), s = k([]), o = k([]);
1338
- W(() => a.value, (C) => {
1339
- l.value = [], u.value = [], s.value = [], C.forEach((R) => {
1340
- if (R.hideInSetting)
1241
+ } = fe(), l = I([]), n = I([]), o = I([]), i = I([]);
1242
+ M(() => a.value, (g) => {
1243
+ l.value = [], n.value = [], o.value = [], g.forEach((p) => {
1244
+ if (p.hideInSetting)
1341
1245
  return;
1342
1246
  const {
1343
- fixed: c,
1344
- show: p,
1345
- uuid: i
1346
- } = R;
1347
- if ((p || p === void 0) && i && o.value.push(i), c === "left") {
1348
- u.value.push(R);
1247
+ fixed: r,
1248
+ show: C,
1249
+ uuid: c
1250
+ } = p;
1251
+ if ((C || C === void 0) && c && i.value.push(c), r === "left") {
1252
+ n.value.push(p);
1349
1253
  return;
1350
1254
  }
1351
- if (c === "right") {
1352
- l.value.push(R);
1255
+ if (r === "right") {
1256
+ l.value.push(p);
1353
1257
  return;
1354
1258
  }
1355
- s.value.push(R);
1259
+ o.value.push(p);
1356
1260
  });
1357
1261
  }, {
1358
1262
  immediate: !0
1359
1263
  });
1360
- const f = T(() => l.value && l.value.length > 0), h = T(() => u.value && u.value.length > 0);
1361
- return () => r("div", {
1264
+ const d = S(() => l.value && l.value.length > 0), h = S(() => n.value && n.value.length > 0);
1265
+ return () => u("div", {
1362
1266
  class: {
1363
1267
  [`${e.hashId}`]: !0,
1364
1268
  [`${e.className}-list`]: !0,
1365
- [`${e.className}-list-group`]: f.value || h.value
1269
+ [`${e.className}-list-group`]: d.value || h.value
1366
1270
  }
1367
- }, [r(st, {
1271
+ }, [u(Ze, {
1368
1272
  title: "固定在左侧",
1369
- list: u.value,
1370
- keys: o.value,
1273
+ list: n.value,
1274
+ keys: i.value,
1371
1275
  hashId: e.hashId,
1372
1276
  draggable: e.draggable,
1373
1277
  checkable: e.checkable,
1374
1278
  className: e.className
1375
- }, null), r(st, {
1376
- list: s.value,
1377
- keys: o.value,
1279
+ }, null), u(Ze, {
1280
+ list: o.value,
1281
+ keys: i.value,
1378
1282
  hashId: e.hashId,
1379
1283
  draggable: e.draggable,
1380
1284
  checkable: e.checkable,
1381
1285
  title: "不固定",
1382
- showTitle: h.value || f.value,
1286
+ showTitle: h.value || d.value,
1383
1287
  className: e.className
1384
- }, null), r(st, {
1288
+ }, null), u(Ze, {
1385
1289
  title: "固定在右侧",
1386
1290
  list: l.value,
1387
- keys: o.value,
1291
+ keys: i.value,
1388
1292
  hashId: e.hashId,
1389
1293
  draggable: e.draggable,
1390
1294
  checkable: e.checkable,
1391
1295
  className: e.className
1392
1296
  }, null)]);
1393
1297
  }
1394
- }), xa = /* @__PURE__ */ de({
1298
+ }), ma = /* @__PURE__ */ ne({
1395
1299
  props: {
1396
1300
  draggable: {
1397
1301
  type: Boolean,
@@ -1405,76 +1309,76 @@ const We = (e) => {
1405
1309
  extra: [Function, Object, String, Boolean]
1406
1310
  },
1407
1311
  setup(e) {
1408
- const a = dt({
1312
+ const a = at({
1409
1313
  suffixCls: "table-column-setting",
1410
1314
  isPor: !0
1411
1315
  }), {
1412
1316
  wrapSSR: l,
1413
- hashId: u
1414
- } = tt("ColumnSetting", [ba], a), {
1415
- columns: s,
1416
- settingsAction: o
1417
- } = Ce(), f = We((p = !0) => {
1418
- const i = {}, n = (d) => {
1419
- d.forEach(({
1420
- key: b,
1421
- fixed: w,
1422
- index: O,
1423
- children: I
1317
+ hashId: n
1318
+ } = qe("ColumnSetting", [da], a), {
1319
+ columns: o,
1320
+ settingsAction: i
1321
+ } = fe(), d = De((C = !0) => {
1322
+ const c = {}, m = (x) => {
1323
+ x.forEach(({
1324
+ key: v,
1325
+ fixed: F,
1326
+ index: P,
1327
+ children: k
1424
1328
  }) => {
1425
- const E = Dt(b, O);
1426
- E && (i[E] = {
1427
- show: p,
1428
- fixed: w
1429
- }), I && n(I);
1329
+ const j = Rt(v, P);
1330
+ j && (c[j] = {
1331
+ show: C,
1332
+ fixed: F
1333
+ }), k && m(k);
1430
1334
  });
1431
1335
  };
1432
- n(s.value), o == null || o.setColumnsMap(i, "show");
1433
- }), h = We((p) => {
1434
- p.target.checked ? f() : f(!1);
1435
- }), C = We(() => {
1436
- o == null || o.setColumnsMap(o == null ? void 0 : o.cacheColumnsMap, "fixed");
1437
- }), R = T(() => (
1336
+ m(o.value), i?.setColumnsMap(c, "show");
1337
+ }), h = De((C) => {
1338
+ C.target.checked ? d() : d(!1);
1339
+ }), g = De(() => {
1340
+ i?.setColumnsMap(i?.cacheColumnsMap, "fixed");
1341
+ }), p = S(() => (
1438
1342
  // @ts-ignore
1439
- Object.values(o == null ? void 0 : o.columnsMap).filter((p) => !p || p.show === !1)
1440
- )), c = T(() => S(R).length > 0 && S(R).length !== s.value.length);
1441
- return () => l(r(Ql, {
1343
+ Object.values(i?.columnsMap).filter((C) => !C || C.show === !1)
1344
+ )), r = S(() => b(p).length > 0 && b(p).length !== o.value.length);
1345
+ return () => l(u(Ll, {
1442
1346
  arrowPointAtCenter: !0,
1443
- title: r("div", {
1444
- class: [`${a}-title`, u.value]
1445
- }, [r(Xl, {
1446
- indeterminate: c.value,
1447
- checked: S(R).length === 0 && S(R).length !== s.value.length,
1448
- onChange: (p) => h(p)
1347
+ title: u("div", {
1348
+ class: [`${a}-title`, n.value]
1349
+ }, [u(Wl, {
1350
+ indeterminate: r.value,
1351
+ checked: b(p).length === 0 && b(p).length !== o.value.length,
1352
+ onChange: (C) => h(C)
1449
1353
  }, {
1450
- default: () => [Le("列展示")]
1451
- }), e.checkedReset ? r("a", {
1452
- onClick: C,
1453
- class: [`${a}-action-rest-button`, u.value]
1454
- }, [Le("重置")]) : null, e != null && e.extra ? r(Re, {
1354
+ default: () => [Oe("列展示")]
1355
+ }), e.checkedReset ? u("a", {
1356
+ onClick: g,
1357
+ class: [`${a}-action-rest-button`, n.value]
1358
+ }, [Oe("重置")]) : null, e?.extra ? u(ge, {
1455
1359
  size: 12,
1456
1360
  align: "center"
1457
1361
  }, {
1458
1362
  default: () => [e.extra]
1459
1363
  }) : null]),
1460
- overlayClassName: `${a}-overlay ${u.value}`,
1364
+ overlayClassName: `${a}-overlay ${n.value}`,
1461
1365
  trigger: "click",
1462
1366
  placement: "bottomRight",
1463
- content: r(pa, {
1464
- hashId: u.value,
1367
+ content: u(ha, {
1368
+ hashId: n.value,
1465
1369
  checkable: e.checkable ?? !0,
1466
1370
  draggable: e.draggable ?? !0,
1467
1371
  className: a
1468
1372
  }, null)
1469
1373
  }, {
1470
- default: () => [r(be, {
1374
+ default: () => [u(de, {
1471
1375
  title: "列设置"
1472
1376
  }, {
1473
- default: () => [r(zt, null, null)]
1377
+ default: () => [u(At, null, null)]
1474
1378
  })]
1475
1379
  }));
1476
1380
  }
1477
- }), Sa = (e) => ({
1381
+ }), va = (e) => ({
1478
1382
  [`${e.componentCls}`]: {
1479
1383
  lineHeight: 1,
1480
1384
  "&-container": {
@@ -1516,236 +1420,225 @@ const We = (e) => {
1516
1420
  }
1517
1421
  }
1518
1422
  });
1519
- function kt(e) {
1520
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !le(e);
1423
+ function wt(e) {
1424
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
1521
1425
  }
1522
1426
  const {
1523
- useBreakpoint: wa
1524
- } = ft;
1525
- function Ta(e) {
1526
- if (le(e))
1427
+ useBreakpoint: ga
1428
+ } = nt;
1429
+ function pa(e) {
1430
+ if (U(e))
1527
1431
  return e;
1528
1432
  if (e) {
1529
1433
  const a = e, {
1530
1434
  icon: l,
1531
- tooltip: u,
1532
- onClick: s,
1533
- key: o
1435
+ tooltip: n,
1436
+ onClick: o,
1437
+ key: i
1534
1438
  } = a;
1535
- return l && u ? r(be, {
1536
- title: u
1439
+ return l && n ? u(de, {
1440
+ title: n
1537
1441
  }, {
1538
- default: () => [r("span", {
1539
- key: o,
1442
+ default: () => [u("span", {
1443
+ key: i,
1540
1444
  onClick: () => {
1541
- s && s(o);
1445
+ o && o(i);
1542
1446
  }
1543
1447
  }, [l])]
1544
1448
  }) : l;
1545
1449
  }
1546
1450
  return null;
1547
1451
  }
1548
- const Gt = /* @__PURE__ */ de({
1452
+ const zt = /* @__PURE__ */ ne({
1549
1453
  props: {
1550
- actions: ye.toolBarBtn,
1454
+ actions: ce.toolBarBtn,
1551
1455
  settings: [Array],
1552
- titleTip: ye.titleTip,
1456
+ titleTip: ce.titleTip,
1553
1457
  prefixCls: String,
1554
- headerTitle: ye.headerTitle,
1555
- titleTipText: ye.titleTipText,
1556
- optionsExtra: ye.optionsExtra
1458
+ headerTitle: ce.headerTitle,
1459
+ titleTipText: ce.titleTipText,
1460
+ optionsExtra: ce.optionsExtra
1557
1461
  },
1558
1462
  setup(e) {
1559
1463
  const {
1560
1464
  wrapSSR: a,
1561
1465
  hashId: l
1562
- } = tt("ListToolBar", [Sa], e.prefixCls), u = wa(), {
1563
- isMobile: s
1564
- } = Ce(), o = T(() => {
1565
- var i;
1566
- return !!(e.titleTip || e.headerTitle || (i = e.actions) != null && i.length);
1567
- }), f = T(() => {
1568
- var i;
1569
- return !!((i = e.settings) != null && i.length || e.optionsExtra);
1570
- }), h = T(() => !!(e.titleTip || e.headerTitle)), C = T(() => {
1571
- var n;
1572
- let i;
1573
- return Array.isArray(e.actions) ? ((n = e.actions) == null ? void 0 : n.length) < 1 ? null : r(Re, {
1466
+ } = qe("ListToolBar", [va], e.prefixCls), n = ga(), {
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(() => {
1469
+ let c;
1470
+ return Array.isArray(e.actions) ? e.actions?.length < 1 ? null : u(ge, {
1574
1471
  align: "center"
1575
- }, kt(i = e.actions.map((d, b) => le(d) ? et(d, {
1576
- key: b,
1577
- ...d == null ? void 0 : d.props
1578
- }) : r("template", {
1579
- key: b
1580
- }, [d]))) ? i : {
1581
- default: () => [i]
1472
+ }, wt(c = e.actions.map((m, x) => U(m) ? Ve(m, {
1473
+ key: x,
1474
+ ...m?.props
1475
+ }) : u("template", {
1476
+ key: x
1477
+ }, [m]))) ? c : {
1478
+ default: () => [c]
1582
1479
  }) : e.actions;
1583
- }), R = Ze(() => !o.value && f.value ? r("div", {
1480
+ }), p = He(() => !i.value && d.value ? u("div", {
1584
1481
  class: `${e.prefixCls}-left ${l.value}`
1585
- }, null) : h.value ? r(Re, {
1482
+ }, null) : h.value ? u(ge, {
1586
1483
  class: `${e.prefixCls}-left ${l.value}`
1587
1484
  }, {
1588
- default: () => [r("div", {
1485
+ default: () => [u("div", {
1589
1486
  class: `${e.prefixCls}-title ${l.value}`
1590
- }, [e.headerTitle, e.titleTip && r(be, {
1487
+ }, [e.headerTitle, e.titleTip && u(de, {
1591
1488
  title: e.titleTipText
1592
1489
  }, {
1593
- default: () => [se(e.titleTip) && e.titleTip ? r(Al, null, null) : e.titleTip]
1594
- })]), C.value && r("div", {
1490
+ default: () => [le(e.titleTip) && e.titleTip ? u(kl, null, null) : e.titleTip]
1491
+ })]), g.value && u("div", {
1595
1492
  class: `${e.prefixCls}-actions ${l.value}`
1596
- }, [C.value])]
1597
- }) : r(Re, {
1493
+ }, [g.value])]
1494
+ }) : u(ge, {
1598
1495
  class: `${e.prefixCls}-left ${l.value}`
1599
1496
  }, {
1600
- default: () => [C.value && r("div", {
1497
+ default: () => [g.value && u("div", {
1601
1498
  class: `${e.prefixCls}-actions`
1602
- }, [C.value])]
1603
- }), [() => o.value, () => f.value, () => h.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), c = Ze(() => {
1604
- let i;
1605
- return f.value ? r(Re, {
1499
+ }, [g.value])]
1500
+ }), [() => i.value, () => d.value, () => h.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), r = He(() => {
1501
+ let c;
1502
+ return d.value ? u(ge, {
1606
1503
  size: 16,
1607
1504
  class: `${e.prefixCls}-right ${l.value}`,
1608
- align: u.value.lg ? "center" : "end",
1609
- direction: u.value.lg ? "horizontal" : "vertical"
1505
+ align: n.value.lg ? "center" : "end",
1506
+ direction: n.value.lg ? "horizontal" : "vertical"
1610
1507
  }, {
1611
- default: () => {
1612
- var n;
1613
- return [e.optionsExtra, (n = e.settings) != null && n.length ? r(Re, {
1614
- size: 12,
1615
- align: "center",
1616
- class: `${e.prefixCls}-setting-items`
1617
- }, kt(i = e.settings.map((d, b) => {
1618
- const w = Ta(d);
1619
- return r("div", {
1620
- key: b,
1621
- class: `${e.prefixCls}-setting-item`
1622
- }, [w]);
1623
- })) ? i : {
1624
- default: () => [i]
1625
- }) : null];
1626
- }
1508
+ default: () => [e.optionsExtra, e.settings?.length ? u(ge, {
1509
+ size: 12,
1510
+ align: "center",
1511
+ class: `${e.prefixCls}-setting-items`
1512
+ }, wt(c = e.settings.map((m, x) => {
1513
+ const v = pa(m);
1514
+ return u("div", {
1515
+ key: x,
1516
+ class: `${e.prefixCls}-setting-item`
1517
+ }, [v]);
1518
+ })) ? c : {
1519
+ default: () => [c]
1520
+ }) : null]
1627
1521
  }) : null;
1628
- }, [() => u.value, () => f.value, () => e.prefixCls, () => h.value, () => C.value, () => e.settings]), p = Ze(() => {
1629
- if (!f.value && !o.value) return null;
1630
- const i = {
1522
+ }, [() => n.value, () => d.value, () => e.prefixCls, () => h.value, () => g.value, () => e.settings]), C = He(() => {
1523
+ if (!d.value && !i.value) return null;
1524
+ const c = {
1631
1525
  [`${l.value}`]: !0,
1632
1526
  [`${e.prefixCls}-container`]: !0,
1633
- [`${e.prefixCls}-container-mobile`]: s.value
1527
+ [`${e.prefixCls}-container-mobile`]: o.value
1634
1528
  };
1635
- return r("div", {
1636
- class: i
1637
- }, [R.value, c.value]);
1638
- }, [() => s.value, () => o.value, () => f.value, () => R.value, () => e.prefixCls, () => c.value]);
1639
- return () => a(r("div", {
1529
+ return u("div", {
1530
+ class: c
1531
+ }, [p.value, r.value]);
1532
+ }, [() => o.value, () => i.value, () => d.value, () => p.value, () => e.prefixCls, () => r.value]);
1533
+ return () => a(u("div", {
1640
1534
  class: `${e.prefixCls} ${l.value}`
1641
- }, [p.value]));
1535
+ }, [C.value]));
1642
1536
  }
1643
1537
  });
1644
- Gt.inheritAttrs = !1;
1645
- const $a = () => {
1538
+ zt.inheritAttrs = !1;
1539
+ const ya = () => {
1646
1540
  const {
1647
1541
  action: e,
1648
1542
  tableSize: a
1649
- } = Ce();
1650
- return r(Jl, {
1651
- overlay: r(Xe, {
1543
+ } = fe();
1544
+ return u(Vl, {
1545
+ overlay: u(Ye, {
1652
1546
  selectedKeys: [a.value],
1653
1547
  onClick: ({
1654
1548
  key: l
1655
1549
  }) => {
1656
- var u;
1657
- (u = e.setTableSize) == null || u.call(e, l);
1550
+ e.setTableSize?.(l);
1658
1551
  },
1659
1552
  style: {
1660
1553
  width: 80
1661
1554
  }
1662
1555
  }, {
1663
- default: () => [r(Xe.Item, {
1556
+ default: () => [u(Ye.Item, {
1664
1557
  key: "large"
1665
1558
  }, {
1666
- default: () => [Le("默认")]
1667
- }), r(Xe.Item, {
1559
+ default: () => [Oe("默认")]
1560
+ }), u(Ye.Item, {
1668
1561
  key: "middle"
1669
1562
  }, {
1670
- default: () => [Le("中等")]
1671
- }), r(Xe.Item, {
1563
+ default: () => [Oe("中等")]
1564
+ }), u(Ye.Item, {
1672
1565
  key: "small"
1673
1566
  }, {
1674
- default: () => [Le("紧凑")]
1567
+ default: () => [Oe("紧凑")]
1675
1568
  })]
1676
1569
  }),
1677
1570
  trigger: ["click"]
1678
1571
  }, {
1679
- default: () => [r(be, {
1572
+ default: () => [u(de, {
1680
1573
  title: "表格密度"
1681
1574
  }, {
1682
- default: () => [r(Kl, null, null)]
1575
+ default: () => [u(Al, null, null)]
1683
1576
  })]
1684
1577
  });
1685
- }, _t = /* @__PURE__ */ de({
1578
+ }, Kt = /* @__PURE__ */ ne({
1686
1579
  setup() {
1687
1580
  const {
1688
1581
  isFullscreen: e
1689
- } = Mt();
1690
- return () => e.value ? r(be, {
1582
+ } = It();
1583
+ return () => e.value ? u(de, {
1691
1584
  title: "退出全屏"
1692
1585
  }, {
1693
- default: () => [r(zl, null, null)]
1694
- }) : r(be, {
1586
+ default: () => [u(Ol, null, null)]
1587
+ }) : u(de, {
1695
1588
  title: "全屏"
1696
1589
  }, {
1697
- default: () => [r(Yl, null, null)]
1590
+ default: () => [u(Dl, null, null)]
1698
1591
  });
1699
1592
  }
1700
1593
  });
1701
- function Ra() {
1594
+ function ba() {
1702
1595
  return {
1703
1596
  reload: {
1704
1597
  text: "刷新",
1705
- icon: r(Ll, null, null)
1598
+ icon: u(jl, null, null)
1706
1599
  },
1707
1600
  density: {
1708
1601
  text: "表格密度",
1709
- icon: r($a, null, null)
1602
+ icon: u(ya, null, null)
1710
1603
  },
1711
1604
  setting: {
1712
1605
  text: "列设置",
1713
- icon: r(zt, null, null)
1606
+ icon: u(At, null, null)
1714
1607
  },
1715
1608
  fullScreen: {
1716
1609
  text: "全屏",
1717
- icon: r(_t, null, null)
1610
+ icon: u(Kt, null, null)
1718
1611
  }
1719
1612
  };
1720
1613
  }
1721
- function Fa(e, a) {
1614
+ function Ca(e, a) {
1722
1615
  return Object.keys(e).filter((l) => l).map((l) => {
1723
- const u = e[l];
1724
- if (!u)
1616
+ const n = e[l];
1617
+ if (!n)
1725
1618
  return null;
1726
- let s = u === !0 ? a[l] : () => u == null ? void 0 : u();
1727
- if (typeof s != "function" && (s = () => {
1619
+ let o = n === !0 ? a[l] : () => n?.();
1620
+ if (typeof o != "function" && (o = () => {
1728
1621
  }), l === "setting")
1729
- return r(xa, L(e[l], {
1622
+ return u(ma, E(e[l], {
1730
1623
  key: l
1731
1624
  }), null);
1732
1625
  if (l === "fullScreen")
1733
- return r("span", {
1626
+ return u("span", {
1734
1627
  key: l,
1735
- onClick: s
1736
- }, [r(_t, null, null)]);
1737
- const o = Ra()[l];
1738
- return o ? r("span", {
1628
+ onClick: o
1629
+ }, [u(Kt, null, null)]);
1630
+ const i = ba()[l];
1631
+ return i ? u("span", {
1739
1632
  key: l,
1740
- onClick: s
1741
- }, [r(be, {
1742
- title: o.text
1633
+ onClick: o
1634
+ }, [u(de, {
1635
+ title: i.text
1743
1636
  }, {
1744
- default: () => [o.icon]
1637
+ default: () => [i.icon]
1745
1638
  })]) : null;
1746
1639
  }).filter((l) => l);
1747
1640
  }
1748
- const Ba = {
1641
+ const xa = {
1749
1642
  options: [Boolean, Object, Array],
1750
1643
  titleTip: [Function, Boolean, Object, String],
1751
1644
  settingExtra: [Function, Boolean, Object, Array],
@@ -1753,355 +1646,342 @@ const Ba = {
1753
1646
  titleTipText: [String],
1754
1647
  toolBarBtn: [Function, Boolean, Object, Array],
1755
1648
  headerTitle: [Function, Boolean, Object, Array, String]
1756
- }, Ia = /* @__PURE__ */ de({
1757
- props: Ba,
1649
+ }, Sa = /* @__PURE__ */ ne({
1650
+ props: xa,
1758
1651
  inheritAttrs: !1,
1759
1652
  setup(e) {
1760
- const a = dt({
1653
+ const a = at({
1761
1654
  suffixCls: "table-list-toolbar",
1762
1655
  isPor: !0
1763
1656
  }), {
1764
1657
  action: l
1765
- } = Ce(), u = Ze(() => {
1766
- var f;
1767
- const s = {
1768
- reload: () => l == null ? void 0 : l.reload(),
1658
+ } = fe(), n = He(() => {
1659
+ const o = {
1660
+ reload: () => l?.reload(),
1769
1661
  density: !0,
1770
1662
  setting: !0,
1771
- fullScreen: () => l == null ? void 0 : l.toggle()
1663
+ fullScreen: () => l?.toggle()
1772
1664
  };
1773
- if (e.options === !1 || ((f = Object.keys(e.options)) == null ? void 0 : f.length) === 0) return [];
1774
- const o = {
1775
- ...s,
1665
+ if (e.options === !1 || Object.keys(e.options)?.length === 0) return [];
1666
+ const i = {
1667
+ ...o,
1776
1668
  ...e.options
1777
1669
  };
1778
- return o.setting !== !1 && e.settingExtra && (o.setting = {}, o.setting.extra = e.settingExtra), Fa(o, {
1779
- ...s
1670
+ return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), Ca(i, {
1671
+ ...o
1780
1672
  });
1781
1673
  }, [() => l, () => e.options]);
1782
1674
  return () => {
1783
- const s = e.toolBarBtn || [];
1784
- return r(Gt, {
1675
+ const o = e.toolBarBtn || [];
1676
+ return u(zt, {
1785
1677
  prefixCls: a,
1786
1678
  optionsExtra: e.optionsExtra,
1787
1679
  headerTitle: e.headerTitle,
1788
- actions: s,
1789
- settings: S(u),
1680
+ actions: o,
1681
+ settings: b(n),
1790
1682
  titleTip: e.titleTip,
1791
1683
  titleTipText: e.titleTipText
1792
1684
  }, null);
1793
1685
  };
1794
1686
  }
1795
1687
  });
1796
- function Oa(e) {
1797
- return Bl();
1688
+ function wa(e) {
1689
+ return xl();
1798
1690
  }
1799
- function ka(e, a = !0, l) {
1800
- Oa() ? Rl(e, l) : a ? e() : Fl(e);
1691
+ function Ta(e, a = !0, l) {
1692
+ wa() ? bl(e, l) : a ? e() : Cl(e);
1801
1693
  }
1802
- function Pa(e) {
1803
- const a = T(() => e.draggabled), l = T(() => e.neverScroll), u = T(() => e.autoScroll);
1694
+ function $a(e) {
1695
+ const a = S(() => e.draggable), l = S(() => e.neverScroll), n = S(() => e.autoScroll);
1804
1696
  return {
1805
- draggabled: a,
1697
+ draggable: a,
1806
1698
  neverScroll: l,
1807
- autoScroll: u
1699
+ autoScroll: n
1808
1700
  };
1809
1701
  }
1810
- function ja({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: s, neverScroll: o }) {
1811
- const f = k([]), h = k([]);
1812
- W([
1702
+ function Ra({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o, neverScroll: i }) {
1703
+ const d = I([]), h = I([]);
1704
+ M([
1813
1705
  () => e.value,
1814
1706
  () => a.value,
1815
1707
  () => l.value,
1816
- () => u.value,
1708
+ () => n.value,
1817
1709
  () => l.value,
1818
- () => s.value,
1819
- () => o.value
1710
+ () => o.value,
1711
+ () => i.value
1820
1712
  ], () => {
1821
- const d = c($e(a.value));
1822
- Ue(d, $e(f.value)) || (f.value = ie(d)), Ue(d, $e(h.value)) || (h.value = ie(d));
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));
1823
1715
  }, {
1824
1716
  deep: !0,
1825
1717
  immediate: !0
1826
1718
  });
1827
- const C = T(() => {
1828
- const d = R(S(f).filter((O) => O.fixed === "left")), b = R(S(f).filter((O) => O.fixed !== "left" && O.fixed !== "right")), w = R(S(f).filter((O) => O.fixed === "right"));
1719
+ const g = S(() => {
1720
+ const x = p(b(d).filter((P) => P.fixed === "left")), v = p(b(d).filter((P) => P.fixed !== "left" && P.fixed !== "right")), F = p(b(d).filter((P) => P.fixed === "right"));
1829
1721
  return [
1830
- ...d,
1831
- ...b,
1832
- ...w
1722
+ ...x,
1723
+ ...v,
1724
+ ...F
1833
1725
  ];
1834
1726
  });
1835
- function R(d) {
1836
- return d.sort((b, w) => hl(b, w, "order", 0));
1727
+ function p(x) {
1728
+ return x.sort((v, F) => il(v, F, "order", 0));
1837
1729
  }
1838
- function c(d) {
1839
- return ie(d).map((b, w) => {
1840
- var O;
1841
- if (b.dataIndex === "action" || w === d.length - 1 ? b.resizable = !1 : b.resizable = se(b.resizable) ? b.resizable : !!(He(b.width) && S(u)), !b.width || S(o))
1842
- return b;
1843
- if (b.dataIndex === "action" && S(s))
1844
- if ((O = S(e)) != null && O.x || !S(l))
1845
- b.width = b.width || 100, b.fixed = "right";
1730
+ function r(x) {
1731
+ return te(x).map((v, F) => {
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
+ return v;
1734
+ if (v.dataIndex === "action" && b(o))
1735
+ if (b(e)?.x || !b(l))
1736
+ v.width = v.width || 100, v.fixed = "right";
1846
1737
  else {
1847
- const I = S(a).find((E) => E.dataIndex === b.dataIndex);
1848
- b.width = (I == null ? void 0 : I.width) || "", b.fixed = I == null ? void 0 : I.fixed;
1738
+ const P = b(a).find((k) => k.dataIndex === v.dataIndex);
1739
+ v.width = P?.width || "", v.fixed = P?.fixed;
1849
1740
  }
1850
- return b;
1741
+ return v;
1851
1742
  });
1852
1743
  }
1853
- function p(d, b) {
1854
- f.value = f.value.map((w) => (w.uuid === b.uuid && (w.width = d), w));
1744
+ function C(x, v) {
1745
+ d.value = d.value.map((F) => (F.uuid === v.uuid && (F.width = x), F));
1855
1746
  }
1856
- function i(d) {
1857
- if (d.length <= 0) {
1858
- f.value = [];
1747
+ function c(x) {
1748
+ if (x.length <= 0) {
1749
+ d.value = [];
1859
1750
  return;
1860
1751
  }
1861
- Ue(c(d), $e(f.value)) || (f.value = c(d));
1752
+ Le(r(x), ve(d.value)) || (d.value = r(x));
1862
1753
  }
1863
- function n(d) {
1864
- i(ie($e(a.value)).map((b) => {
1865
- var O, I, E;
1866
- const w = b.key ? {
1867
- show: (O = d[b.key]) == null ? void 0 : O.show,
1868
- fixed: (I = d[b.key]) == null ? void 0 : I.fixed,
1869
- order: (E = d[b.key]) == null ? void 0 : E.order
1754
+ function m(x) {
1755
+ c(te(ve(a.value)).map((v) => {
1756
+ const F = v.key ? {
1757
+ show: x[v.key]?.show,
1758
+ fixed: x[v.key]?.fixed,
1759
+ order: x[v.key]?.order
1870
1760
  } : {};
1871
- return { ...b, ...w };
1761
+ return { ...v, ...F };
1872
1762
  }));
1873
1763
  }
1874
1764
  return {
1875
1765
  breakpoint: l,
1876
- proColumns: C,
1766
+ proColumns: g,
1877
1767
  cacheProColumns: h,
1878
- setColumns: i,
1879
- changeColumns: n,
1880
- resizeColumnWidth: p
1768
+ setColumns: c,
1769
+ changeColumns: m,
1770
+ resizeColumnWidth: C
1881
1771
  };
1882
1772
  }
1883
- function Da({ columns: e, columnsState: a, changeColumns: l }) {
1884
- const u = k(void 0), s = Ie({}), o = Ie({}), f = Ie({}), h = k([]);
1885
- W(() => e.value, () => {
1886
- var p;
1887
- (p = S(e)) == null || p.forEach(({ show: i, key: n, fixed: d }, b) => {
1888
- const w = Dt(n, b);
1889
- w && (f[w] = { show: i === void 0 ? !0 : i, fixed: d });
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) => {
1777
+ const v = Rt(c, x);
1778
+ v && (d[v] = { show: C === void 0 ? !0 : C, fixed: m });
1890
1779
  });
1891
- const c = S(e).map((i) => i.key);
1892
- R(c);
1893
- }, { deep: !0, immediate: !0 }), qe(() => {
1894
- var p;
1895
- const c = {
1896
- ...(p = S(a)) == null ? void 0 : p.value,
1897
- ...S(f)
1780
+ const r = b(e).map((C) => C.key);
1781
+ p(r);
1782
+ }, { deep: !0, immediate: !0 }), Ee(() => {
1783
+ const r = {
1784
+ ...b(a)?.value,
1785
+ ...b(d)
1898
1786
  };
1899
- Object.assign(s, c), Object.assign(o, c);
1787
+ Object.assign(o, r), Object.assign(i, r);
1900
1788
  });
1901
- function C(c, p) {
1902
- u.value = p, Object.assign(s, c), l == null || l(s, p === "fixed");
1789
+ function g(r, C) {
1790
+ n.value = C, Object.assign(o, r), l?.(o, C === "fixed");
1903
1791
  }
1904
- function R(c) {
1905
- h.value = c;
1792
+ function p(r) {
1793
+ h.value = r;
1906
1794
  }
1907
1795
  return {
1908
- columnsMap: s,
1909
- operationType: u,
1910
- setColumnsMap: C,
1796
+ columnsMap: o,
1797
+ operationType: n,
1798
+ setColumnsMap: g,
1911
1799
  sortKeyColumns: h,
1912
- cacheColumnsMap: o,
1913
- setSortKeyColumns: R
1800
+ cacheColumnsMap: i,
1801
+ setSortKeyColumns: p
1914
1802
  };
1915
1803
  }
1916
- function Na(e, a) {
1917
- const l = T(() => a), u = k(), s = k(e);
1918
- function o() {
1919
- u.value && clearTimeout(u.value);
1804
+ function Ba(e, a) {
1805
+ const l = S(() => a), n = I(), o = I(e);
1806
+ function i() {
1807
+ n.value && clearTimeout(n.value);
1920
1808
  }
1921
- async function f(...h) {
1922
- return l.value === 0 || l.value === void 0 ? s.value(...h) : (o(), new Promise(async (C) => {
1923
- var R;
1924
- (R = h[0]) != null && R.immediate ? C(await s.value(...h)) : u.value = setTimeout(async () => {
1925
- C(await s.value(...h));
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));
1926
1813
  }, l.value);
1927
1814
  }));
1928
1815
  }
1929
- return na(o), {
1930
- cancel: o,
1931
- run: f
1816
+ return Ul(i), {
1817
+ cancel: i,
1818
+ run: d
1932
1819
  };
1933
1820
  }
1934
- function Ea(e) {
1935
- const a = T(() => e.rowKey), l = T(() => e.polling), u = T(() => e.debounceTime), s = T(() => e.dataSource);
1821
+ function Ia(e) {
1822
+ const a = S(() => e.rowKey), l = S(() => e.polling), n = S(() => e.debounceTime), o = S(() => e.dataSource);
1936
1823
  return {
1937
1824
  rowKey: a,
1938
1825
  polling: l,
1939
1826
  request: e.request,
1940
1827
  postData: e.postData,
1941
- debounceTime: u,
1942
- dataSource: s
1828
+ debounceTime: n,
1829
+ dataSource: o
1943
1830
  };
1944
1831
  }
1945
- function Ma({ rowKey: e, polling: a, request: l, postData: u, dataSource: s, waitRequest: o, debounceTime: f }, { search: h, columns: C, loading: R, setLoading: c, setColumns: p, removeRowKeys: i, syncSelectedRows: n, formParamsRef: d, setPagination: b, paginationInfo: w, onBeforeSearchSubmit: O, hasCustomRender: I }, E) {
1946
- const _ = k(), H = k(!0), A = k(!1), ae = k(!1), z = k([]), K = k(), ne = T(() => {
1947
- var x;
1948
- return J(h.value) ? (x = h.value) == null ? void 0 : x.manualRequest : !1;
1949
- }), fe = async (x = {}) => {
1950
- var V;
1951
- const { pagination: y, filters: B = {}, sorter: P = {}, removeKeys: v = [], isPolling: G = !1 } = x;
1952
- if (!l || !ze(l) || S(o) && R.value || A.value)
1953
- return s.value || [];
1954
- if (A.value = !0, !G || S(o) || H.value ? c(!0) : Z(!0), S(o)) {
1955
- H.value = !1, A.value = !1;
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;
1835
+ if (!l || !ke(l) || b(i) && p.value || O.value)
1836
+ return o.value || [];
1837
+ if (O.value = !0, !Ce || b(i) || W.value ? r(!0) : t(!0), b(i)) {
1838
+ W.value = !1, O.value = !1;
1956
1839
  return;
1957
1840
  }
1958
- y && b(y);
1841
+ s && v(s);
1959
1842
  try {
1960
- let Q = {};
1961
- if (se(y) && !y || se(w))
1962
- Q = {};
1843
+ let Y = {};
1844
+ if (le(s) && !s || le(F))
1845
+ Y = {};
1963
1846
  else {
1964
- const { current: Y = 1, pageSize: Be = 10, total: ee } = S(w) || {};
1965
- Q.pageNum = gl({ current: Y, pageSize: Be, total: ee }, v.length), v.length && i(v), Q.pageSize = Be;
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;
1966
1849
  }
1967
- const ue = J(P) ? [P] : P;
1968
- ue.forEach((Y) => {
1969
- const Be = (Y == null ? void 0 : Y.columnKey) || (Y == null ? void 0 : Y.field);
1970
- Y && (Y != null && Y.order) ? p(S(C).map((ee) => (ee.dataIndex === Be ? ee.sortOrder = Y == null ? void 0 : Y.order : ee.sortOrder = null, ee))) : Y && p(S(C).map((ee) => (ee.dataIndex === Be && (ee.sortOrder = null), ee)));
1850
+ const Me = V(q) ? [q] : q;
1851
+ Me.forEach((G) => {
1852
+ const ye = G?.columnKey || G?.field;
1853
+ G && G?.order ? C(b(g).map((J) => (J.dataIndex === ye ? J.sortOrder = G?.order : J.sortOrder = null, J))) : G && C(b(g).map((J) => (J.dataIndex === ye && (J.sortOrder = null), J)));
1971
1854
  });
1972
- let xe = {
1973
- ...Q || {},
1974
- ...x.params,
1975
- ...d
1855
+ let Re = {
1856
+ ...Y || {},
1857
+ ...w.params,
1858
+ ...x
1976
1859
  };
1977
- O && ze(O) && (xe = await O(xe, P, B));
1978
- let X = [];
1979
- const Se = await (l == null ? void 0 : l(ie($e(xe)), ue, B));
1980
- if (A.value = !1, Se && (Se != null && Se.success)) {
1981
- X = Se.data || [], u && ze(u) && (X = await (u == null ? void 0 : u(X))), n(X);
1982
- const Y = Se.total || (X == null ? void 0 : X.length) || 0;
1983
- return Y !== ((V = S(w)) == null ? void 0 : V.total) && b({
1984
- total: Y || 0
1985
- }), t(X), X;
1860
+ P && ke(P) && (Re = await P(Re, q, z));
1861
+ let ue = [];
1862
+ const xe = await l?.(te(ve(Re)), Me, z);
1863
+ if (O.value = !1, xe && xe?.success) {
1864
+ ue = xe.data || [], n && ke(n) && (ue = await n?.(ue)), m(ue);
1865
+ const G = xe.total || ue?.length || 0;
1866
+ return G !== b(F)?.total && v({
1867
+ total: G || 0
1868
+ }), R(ue), ue;
1986
1869
  } else
1987
1870
  return [];
1988
- } catch (Q) {
1989
- z.value === void 0 && t([]), E("requestError", Q);
1871
+ } catch (Y) {
1872
+ D.value === void 0 && R([]), j("requestError", Y);
1990
1873
  } finally {
1991
- H.value = !1, c(!1);
1874
+ W.value = !1, r(!1);
1992
1875
  }
1993
1876
  return [];
1994
- }, oe = Na(async (x) => {
1995
- K.value && clearTimeout(K.value);
1996
- const y = await fe(x), B = ml(a.value, y);
1997
- return B && !_.value && (K.value = setTimeout(() => {
1998
- oe.run({ ...x, isPolling: B });
1999
- }, Math.max(B, 2e3))), y;
2000
- }, f.value || 10);
2001
- Il(() => {
2002
- _.value = !0, clearTimeout(K.value);
2003
- }), Ol(() => {
2004
- _.value = !0, clearTimeout(K.value);
2005
- }), W(() => a.value, () => {
2006
- a.value ? oe.run({ isPolling: !0 }) : clearTimeout(K.value);
2007
- }, { immediate: !0 }), W([() => o.value, () => s.value], () => {
2008
- Fe();
2009
- }, { deep: !0, immediate: !0 }), W([() => d], () => {
2010
- ne.value || Fe();
1877
+ }, ae = Ba(async (w) => {
1878
+ Z.value && clearTimeout(Z.value);
1879
+ const s = await ie(w), z = ul(a.value, s);
1880
+ return z && !L.value && (Z.value = setTimeout(() => {
1881
+ ae.run({ ...w, isPolling: z });
1882
+ }, Math.max(z, 2e3))), s;
1883
+ }, d.value || 10);
1884
+ Sl(() => {
1885
+ L.value = !0, clearTimeout(Z.value);
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], () => {
1891
+ pe();
1892
+ }, { deep: !0, immediate: !0 }), M([() => x], () => {
1893
+ oe.value || pe();
2011
1894
  }, {
2012
1895
  deep: !0,
2013
1896
  immediate: !0
2014
1897
  });
2015
- function Fe() {
2016
- Pe(l) ? (!H.value || !a.value) && oe.run({ isPolling: !1 }) : t(s.value || []);
1898
+ function pe() {
1899
+ Te(l) ? (!W.value || !a.value) && ae.run({ isPolling: !1 }) : R(o.value || []);
2017
1900
  }
2018
- const pe = T(() => {
2019
- if (I.value)
2020
- return S(z);
2021
- const x = C.value.filter((y) => y.show || y.show === void 0);
2022
- return !S(z) || !x || x.length === 0 ? [] : S(z);
2023
- }), je = T(() => S(z).some((x) => te(x.children) && x.children.length > 0));
2024
- function Z(x) {
2025
- ae.value = x;
1901
+ const he = S(() => {
1902
+ if (k.value)
1903
+ return b(D);
1904
+ const w = g.value.filter((s) => s.show || s.show === void 0);
1905
+ return !b(D) || !w || w.length === 0 ? [] : b(D);
1906
+ }), $e = S(() => b(D).some((w) => X(w.children) && w.children.length > 0));
1907
+ function t(w) {
1908
+ N.value = w;
2026
1909
  }
2027
- function he(x, y, B, P) {
2028
- oe.run({ pagination: x, filters: y, sorter: B, extra: P, isPolling: !1 }), E("change", x, y, B, P);
1910
+ function f(w, s, z, q) {
1911
+ ae.run({ pagination: w, filters: s, sorter: z, extra: q, isPolling: !1 }), j("change", w, s, z, q);
2029
1912
  }
2030
- function t(x) {
2031
- var B;
2032
- const y = vl(ie(x), S(w.value));
2033
- if (!Ue(y, z.value) && (z.value = y, !l || !ze(l))) {
2034
- const P = y.length || 0;
2035
- P !== ((B = S(w)) == null ? void 0 : B.total) && b({
2036
- total: P
1913
+ function R(w) {
1914
+ const s = sl(te(w), b(F.value));
1915
+ if (!Le(s, D.value) && (D.value = s, !l || !ke(l))) {
1916
+ const z = s.length || 0;
1917
+ z !== b(F)?.total && v({
1918
+ total: z
2037
1919
  });
2038
1920
  }
2039
1921
  }
2040
1922
  return {
2041
- dataSource: pe,
2042
- isTreeDataRef: je,
2043
- reSetDataList: t,
2044
- changeDataValue: ({ key: x, params: y, value: B, type: P = "update" }) => {
2045
- const v = x ?? e.value, G = (y == null ? void 0 : y[v]) ?? B;
2046
- switch (P) {
1923
+ dataSource: he,
1924
+ isTreeDataRef: $e,
1925
+ reSetDataList: R,
1926
+ changeDataValue: ({ key: w, params: s, value: z, type: q = "update" }) => {
1927
+ const ee = w ?? e.value, Ce = s?.[ee] ?? z;
1928
+ switch (q) {
2047
1929
  case "update":
2048
- v && G && y && (z.value = z.value.map((V) => G === V[v] ? Pt(V, y, {
1930
+ ee && Ce && s && (D.value = D.value.map((Y) => Ce === Y[ee] ? Tt(Y, s, {
2049
1931
  omitNil: !1,
2050
1932
  omitEmpty: !1
2051
- }) : V)), Je(!!y, "params is required");
1933
+ }) : Y)), We(!!s, "params is required");
2052
1934
  break;
2053
1935
  case "push":
2054
- y && z.value.push(y), Je(!!y, "params is required");
1936
+ s && D.value.push(s), We(!!s, "params is required");
2055
1937
  break;
2056
1938
  case "unshift":
2057
- y && z.value.unshift(y), Je(!!y, "params is required");
1939
+ s && D.value.unshift(s), We(!!s, "params is required");
2058
1940
  break;
2059
1941
  case "delete":
2060
- v && (z.value = z.value.filter((V) => B !== V[v]));
1942
+ ee && (D.value = D.value.filter((Y) => z !== Y[ee]));
2061
1943
  break;
2062
1944
  }
2063
1945
  },
2064
- handleTableChange: he,
2065
- reload: async (x) => {
2066
- Pe(l) ? await oe.run({ ...x, isPolling: !1 }) : E("reload");
1946
+ handleTableChange: f,
1947
+ reload: async (w) => {
1948
+ Te(l) ? await ae.run({ ...w, isPolling: !1 }) : j("reload");
2067
1949
  }
2068
1950
  };
2069
1951
  }
2070
- function Aa({ emit: e, loading: a }) {
2071
- var o;
2072
- const l = k(se(a.value) ? a.value : J(a.value) ? (o = a.value) == null ? void 0 : o.spinning : !1);
2073
- W(() => a.value, (f) => {
2074
- l.value = se(f) ? f : J(f) ? f == null ? void 0 : f.spinning : l.value;
1952
+ function ka({ emit: e, loading: a }) {
1953
+ const l = I(le(a.value) ? a.value : V(a.value) ? a.value?.spinning : !1);
1954
+ M(() => a.value, (i) => {
1955
+ l.value = le(i) ? i : V(i) ? i?.spinning : l.value;
2075
1956
  });
2076
- const u = T(() => l.value);
2077
- function s(f) {
2078
- l.value = f, e("loadingChange", !0);
1957
+ const n = S(() => l.value);
1958
+ function o(i) {
1959
+ l.value = i, e("loadingChange", !0);
2079
1960
  }
2080
- return { loadingComputed: u, loading: l, setLoading: s };
1961
+ return { loadingComputed: n, loading: l, setLoading: o };
2081
1962
  }
2082
- function Ka({
1963
+ function Aa({
2083
1964
  slots: e,
2084
1965
  props: a,
2085
1966
  pagination: l
2086
1967
  }) {
2087
- const u = Ie({}), s = k();
2088
- W(() => l.value, () => {
2089
- var R;
2090
- if (se(l.value) && !l.value) {
2091
- s.value = !1;
1968
+ const n = be({}), o = I();
1969
+ M(() => l.value, () => {
1970
+ if (le(l.value) && !l.value) {
1971
+ o.value = !1;
2092
1972
  return;
2093
1973
  }
2094
- const f = Nt(e, S(a), "pageItemRender"), h = ze(f) ? {
1974
+ const d = Ft(e, b(a), "pageItemRender"), h = ke(d) ? {
2095
1975
  itemRender: ({
2096
- page: c,
2097
- type: p,
2098
- originalElement: i
2099
- }) => f ? f({
2100
- page: c,
2101
- type: p,
2102
- originalElement: i
1976
+ page: p,
1977
+ type: r,
1978
+ originalElement: C
1979
+ }) => d ? d({
1980
+ page: p,
1981
+ type: r,
1982
+ originalElement: C
2103
1983
  }) : null
2104
- } : null, C = {
1984
+ } : null, g = {
2105
1985
  current: 1,
2106
1986
  pageSize: 10,
2107
1987
  size: "default",
@@ -2111,165 +1991,153 @@ function Ka({
2111
1991
  ...l.value || {},
2112
1992
  ...h || {}
2113
1993
  };
2114
- (R = l.value) != null && R.showTotal || (C.showTotal = (c) => `共${c < C.pageSize ? 1 : Math.ceil(c / (C.pageSize || 10))}页 ${c}条记录`), s.value = C, Object.assign(u, {
2115
- pageNum: C.current,
2116
- pageSize: C.pageSize
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
+ pageNum: g.current,
1996
+ pageSize: g.pageSize
2117
1997
  });
2118
1998
  }, {
2119
1999
  deep: 1,
2120
2000
  immediate: !0
2121
2001
  });
2122
- function o(f) {
2123
- if (J(s.value) && J(f)) {
2002
+ function i(d) {
2003
+ if (V(o.value) && V(d)) {
2124
2004
  const h = {};
2125
- Object.keys(f).forEach((C) => {
2126
- Object.prototype.hasOwnProperty.call(f, C) && s.value[C] === f[C] || (h[C] = f[C]);
2127
- }), Object.keys(h).length > 0 && (Object.assign(s.value, h), za(h) && Object.assign(u, h));
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));
2128
2008
  }
2129
2009
  }
2130
2010
  return {
2131
- paginationInfo: s,
2132
- requestPagination: u,
2133
- setPagination: o
2011
+ paginationInfo: o,
2012
+ requestPagination: n,
2013
+ setPagination: i
2134
2014
  };
2135
2015
  }
2136
- function za(e) {
2016
+ function Oa(e) {
2137
2017
  if (typeof e != "object" || e === null)
2138
2018
  return !1;
2139
2019
  const a = Object.keys(e);
2140
2020
  return a.length === 2 && a.includes("pageNum") && a.includes("pageSize");
2141
2021
  }
2142
- function Ya(e, a) {
2143
- const l = k([]), u = k([]);
2144
- W(() => {
2145
- var c;
2146
- return (c = a.value) == null ? void 0 : c.selectedRowKeys;
2147
- }, (c) => {
2148
- l.value = yl([...c || []]);
2022
+ function Da(e, a) {
2023
+ const l = I([]), n = I([]);
2024
+ M(() => a.value?.selectedRowKeys, (r) => {
2025
+ l.value = cl([...r || []]);
2149
2026
  }, {
2150
2027
  deep: !0,
2151
2028
  immediate: !0
2152
2029
  });
2153
- const s = (c, p) => {
2154
- var n;
2155
- const i = ((n = a.value) == null ? void 0 : n.type) || "checkbox";
2156
- e.value && (p ? c != null && c[e.value] && i === "checkbox" ? (l.value.push(c[e.value]), u.value.push(c)) : (l.value = [c[e.value]], u.value = [c]) : (l.value = l.value.filter((d) => d !== c[e.value]), u.value = u.value.filter((d) => d[e.value] !== c[e.value])));
2157
- }, o = () => {
2158
- var c, p;
2159
- a.value && ((p = (c = a.value) == null ? void 0 : c.onChange) == null || p.call(c, l.value, u.value));
2030
+ const o = (r, C) => {
2031
+ 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])));
2033
+ }, i = () => {
2034
+ a.value && a.value?.onChange?.(l.value, n.value);
2160
2035
  };
2161
2036
  return {
2162
2037
  selectedKeys: l,
2163
- selectedItems: u,
2164
- selectRowKey: s,
2165
- selectAllRowKey: (c, p, i) => {
2166
- e.value && (c ? p.map((n) => (l.value.every((d) => d !== (n == null ? void 0 : n[e.value])) && n != null && n[e.value] && (l.value.push(n[e.value]), u.value.push(n)), n)) : i.map((n) => (l.value.includes(n == null ? void 0 : n[e.value]) && (l.value = l.value.filter((d) => d !== n[e.value]), u.value = u.value.filter((d) => d[e.value] !== n[e.value])), n)));
2038
+ selectedItems: n,
2039
+ selectRowKey: o,
2040
+ 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)));
2167
2042
  },
2168
- removeRowKeys: (c) => {
2169
- l.value = l.value.filter((p) => !c.includes(p)), u.value = u.value.filter((p) => !c.includes(p == null ? void 0 : p[e.value || ""])), o();
2043
+ removeRowKeys: (r) => {
2044
+ l.value = l.value.filter((C) => !r.includes(C)), n.value = n.value.filter((C) => !r.includes(C?.[e.value || ""])), i();
2170
2045
  },
2171
- changeRowKey: o,
2172
- syncSelectedRows: (c) => {
2173
- if (e.value && l.value.length !== u.value.length) {
2174
- const p = u.value.map((n) => n[e.value]), i = l.value.filter((n) => !p.includes(n));
2175
- c.forEach((n) => {
2176
- i.includes(n[e.value]) && u.value.push(ie(n));
2046
+ changeRowKey: i,
2047
+ syncSelectedRows: (r) => {
2048
+ 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));
2177
2052
  });
2178
2053
  }
2179
2054
  },
2180
2055
  clearAllRowKeys: () => {
2181
- l.value = [], u.value = [], o();
2056
+ l.value = [], n.value = [], i();
2182
2057
  }
2183
2058
  };
2184
2059
  }
2185
- function La(e) {
2060
+ function ja(e) {
2186
2061
  const a = {};
2187
2062
  return e.forEach((l) => {
2188
- let u = l.initialValue;
2189
- const s = ["select", "number"], o = ["date", "time", "dateRange"], f = ["treeSelect", "numberRange"];
2190
- l.valueType ? !u && s.includes(l.valueType) ? u = void 0 : !u && o.includes(l.valueType) ? u = null : !u && f.includes(l.valueType) ? u = [] : u || (u = "") : u || (u = ""), l.name === "dateRange" ? (a[l.rangeStartName || "start"] = u ? u[0] : null, a[l.rangeEndName || "end"] = u ? u[1] : null) : l.name && (a[l.name] = u);
2063
+ let n = l.initialValue;
2064
+ const o = ["select", "number"], i = ["date", "time", "dateRange"], d = ["treeSelect", "numberRange"];
2065
+ 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);
2191
2066
  }), a;
2192
2067
  }
2193
- function Wa({ searchMap: e, params: a, columns: l, setPagination: u }) {
2194
- const s = Ie({}), o = Ie({}), f = k([]);
2195
- function h(c) {
2196
- c.forEach((p) => {
2197
- f.value.some((i) => i.name === p.name) ? f.value = f.value.map((i) => i.name === p.name ? {
2198
- ...i,
2199
- ...p
2200
- } : i) : f.value.push(p);
2068
+ function Na({ searchMap: e, params: a, columns: l, setPagination: n }) {
2069
+ const o = be({}), i = be({}), d = I([]);
2070
+ function h(r) {
2071
+ r.forEach((C) => {
2072
+ d.value.some((c) => c.name === C.name) ? d.value = d.value.map((c) => c.name === C.name ? {
2073
+ ...c,
2074
+ ...C
2075
+ } : c) : d.value.push(C);
2201
2076
  });
2202
2077
  }
2203
- const C = (c) => {
2204
- var i, n;
2205
- const p = [];
2206
- if ((c === "all" || c === "searchMap") && ((i = e.value) == null || i.forEach((d) => p.push(d)), h(p)), (c === "all" || c === "columns") && ((n = l.value) != null && n.length) && (l.value && l.value.forEach((d) => {
2207
- d.searchConfig && p.push(d.searchConfig);
2208
- }), h(p)), c === "all" || c === "searchMap" || c === "columns") {
2209
- u({ current: 1 });
2210
- const d = La(p);
2211
- Object.assign(o, { ...d });
2212
- for (const b in d)
2213
- s[b] || (s[b] = d[b]);
2078
+ const g = (r) => {
2079
+ 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) => {
2081
+ c.searchConfig && C.push(c.searchConfig);
2082
+ }), h(C)), r === "all" || r === "searchMap" || r === "columns") {
2083
+ n({ current: 1 });
2084
+ const c = ja(C);
2085
+ Object.assign(i, { ...c });
2086
+ for (const m in c)
2087
+ o[m] || (o[m] = c[m]);
2214
2088
  }
2215
- (c === "all" || c === "params") && (u({ current: 1 }), Object.assign(s, a.value));
2089
+ (r === "all" || r === "params") && (n({ current: 1 }), Object.assign(o, a.value));
2216
2090
  };
2217
- kl(() => {
2218
- C("all");
2219
- }), W(() => a.value, () => {
2220
- C("params");
2221
- }, { deep: !0 }), W(() => e.value, () => {
2222
- C("searchMap");
2223
- }, { deep: !0 }), W(() => l.value, () => {
2224
- C("columns");
2091
+ Tl(() => {
2092
+ g("all");
2093
+ }), M(() => a.value, () => {
2094
+ g("params");
2095
+ }, { deep: !0 }), M(() => e.value, () => {
2096
+ g("searchMap");
2097
+ }, { deep: !0 }), M(() => l.value, () => {
2098
+ g("columns");
2225
2099
  }, { deep: !0 });
2226
- function R(c) {
2227
- u({ current: 1 }), Object.assign(s, c);
2100
+ function p(r) {
2101
+ n({ current: 1 }), Object.assign(o, r);
2228
2102
  }
2229
- return { formDataRef: f, formParamsRef: s, defaultParamsRef: o, setFormParams: R };
2103
+ return { formDataRef: d, formParamsRef: o, defaultParamsRef: i, setFormParams: p };
2230
2104
  }
2231
- function Ha(e) {
2232
- const a = T(() => e.scroll), l = T(() => e.autoScroll), u = T(() => e.modalScroll), s = T(() => e.neverScroll), o = T(() => e.rowSelection), f = T(() => e.scrollBreakpoint);
2105
+ function Ea(e) {
2106
+ const a = S(() => e.scroll), l = S(() => e.autoScroll), n = S(() => e.modalScroll), o = S(() => e.neverScroll), i = S(() => e.rowSelection), d = S(() => e.scrollBreakpoint);
2233
2107
  return {
2234
2108
  scroll: a,
2235
- neverScroll: s,
2236
- rowSelection: o,
2109
+ neverScroll: o,
2110
+ rowSelection: i,
2237
2111
  autoScroll: l,
2238
- modalScroll: u,
2239
- scrollBreakpoint: f
2112
+ modalScroll: n,
2113
+ scrollBreakpoint: d
2240
2114
  };
2241
2115
  }
2242
- function Va({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll: s, rowSelection: o, screens: f, innerWidth: h, scrollBreakpoint: C }) {
2243
- const R = T(() => {
2244
- var i, n, d;
2245
- return S(C) ? He(S(C)) ? h.value > S(C) : Et(S(C)) ? (i = f.value) == null ? void 0 : i[S(C)] : (n = f.value) == null ? void 0 : n.xl : (d = f.value) == null ? void 0 : d.xl;
2246
- }), c = T(() => {
2247
- let i = 0;
2248
- const n = S(o) ? 60 : 0, d = 150, b = ie(S(a));
2249
- b.forEach((I) => {
2250
- i += Number.parseInt(String(I.width)) || 0;
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(() => {
2118
+ let c = 0;
2119
+ const m = b(i) ? 60 : 0, x = 150, v = te(b(a));
2120
+ v.forEach((k) => {
2121
+ c += Number.parseInt(String(k.width)) || 0;
2251
2122
  });
2252
- const O = b.filter((I) => !Reflect.has(I, "width")).length;
2253
- return O !== 0 && (i += O * d), n && (i += n), i;
2123
+ const P = v.filter((k) => !Reflect.has(k, "width")).length;
2124
+ return P !== 0 && (c += P * x), m && (c += m), c;
2254
2125
  });
2255
- return { proScroll: T(() => {
2256
- var i, n;
2257
- return S(s) ? {} : S(e) && Object.keys(S(e)).length ? S(e) : S(u) ? {
2258
- y: ((i = S(e)) == null ? void 0 : i.y) || ((n = f.value) != null && n.xl ? 400 : 235)
2259
- } : S(l) ? R.value ? {} : se(R.value) ? { x: S(c) } : {} : {};
2260
- }), breakpoint: R };
2126
+ return { proScroll: S(() => b(o) ? {} : b(e) && Object.keys(b(e)).length ? b(e) : b(n) ? {
2127
+ y: b(e)?.y || (d.value?.xl ? 400 : 235)
2128
+ } : b(l) ? p.value ? {} : le(p.value) ? { x: b(r) } : {} : {}), breakpoint: p };
2261
2129
  }
2262
- function qa({ size: e, emit: a }) {
2263
- const l = k("middle");
2264
- qe(() => {
2130
+ function za({ size: e, emit: a }) {
2131
+ const l = I("middle");
2132
+ Ee(() => {
2265
2133
  l.value = e.value;
2266
2134
  });
2267
- function u(s) {
2268
- l.value = s, a("sizeChange", s);
2135
+ function n(o) {
2136
+ l.value = o, a("sizeChange", o);
2269
2137
  }
2270
- return { sizeRef: l, setTableSize: u };
2138
+ return { sizeRef: l, setTableSize: n };
2271
2139
  }
2272
- const ot = {
2140
+ const et = {
2273
2141
  "&::-webkit-scrollbar": {
2274
2142
  width: 4,
2275
2143
  height: 4
@@ -2282,7 +2150,7 @@ const ot = {
2282
2150
  backgroundColor: "transparent",
2283
2151
  borderRadius: 2
2284
2152
  }
2285
- }, Ga = (e) => {
2153
+ }, Ka = (e) => {
2286
2154
  const a = `${e.antCls}-table`;
2287
2155
  return {
2288
2156
  [e.componentCls]: {
@@ -2377,7 +2245,7 @@ const ot = {
2377
2245
  paddingBlock: e.paddingMD,
2378
2246
  border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
2379
2247
  borderRadius: e.borderRadiusLG,
2380
- backgroundColor: Lt(e, e.colorBgContainer),
2248
+ backgroundColor: Dt(e, e.colorBgContainer),
2381
2249
  [`${e.antCls}-table-wrapper ${e.antCls}-table-pagination${e.antCls}-pagination`]: {
2382
2250
  marginBottom: 0
2383
2251
  }
@@ -2477,519 +2345,486 @@ const ot = {
2477
2345
  }
2478
2346
  },
2479
2347
  [`&${e.componentCls}-beautify-scroll`]: {
2480
- [`${e.antCls}-table-content`]: ot,
2481
- [`${e.antCls}-table-body`]: ot,
2348
+ [`${e.antCls}-table-content`]: et,
2349
+ [`${e.antCls}-table-body`]: et,
2482
2350
  [`${e.antCls}-table-empty`]: {
2483
- [`${e.antCls}-table-content`]: ot
2351
+ [`${e.antCls}-table-content`]: et
2484
2352
  }
2485
2353
  }
2486
2354
  }
2487
2355
  };
2488
2356
  };
2489
- function _a(e) {
2490
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !le(e);
2357
+ function Ya(e) {
2358
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
2491
2359
  }
2492
- function Qa(e, a, l, u) {
2360
+ function La(e, a, l, n) {
2493
2361
  if (!a) return e;
2494
- let s = e;
2495
- if (J(a)) {
2496
- const o = a.node === "a" ? "span" : a.node;
2497
- return r(o, L((a == null ? void 0 : a.attr) || {}, {
2362
+ let o = e;
2363
+ if (V(a)) {
2364
+ const i = a.node === "a" ? "span" : a.node;
2365
+ return u(i, E(a?.attr || {}, {
2498
2366
  class: [a.class, a.node === "a" ? `${l}-a` : ""],
2499
2367
  onClick: a.click
2500
- }), _a(e) ? e : {
2368
+ }), Ya(e) ? e : {
2501
2369
  default: () => [e]
2502
2370
  });
2503
2371
  }
2504
2372
  switch (a) {
2505
2373
  case "link":
2506
- s = r("span", {
2507
- class: [`${l}-a`, u]
2374
+ o = u("span", {
2375
+ class: [`${l}-a`, n]
2508
2376
  }, [e]);
2509
2377
  break;
2510
2378
  case "time":
2511
- s = U(e).format("HH:mm:ss");
2379
+ o = H(e).format("HH:mm:ss");
2512
2380
  break;
2513
2381
  case "dateMonth":
2514
- s = `${U(e).month() + 1}月`;
2382
+ o = `${H(e).month() + 1}月`;
2515
2383
  break;
2516
2384
  case "date":
2517
- s = U(e).format("YYYY-MM-DD");
2385
+ o = H(e).format("YYYY-MM-DD");
2518
2386
  break;
2519
2387
  case "dateTime":
2520
- s = U(e).format("YYYY-MM-DD HH:mm:ss");
2388
+ o = H(e).format("YYYY-MM-DD HH:mm:ss");
2521
2389
  break;
2522
2390
  }
2523
- return s;
2391
+ return o;
2524
2392
  }
2525
- function Xa(e, a) {
2526
- const l = a && a.current || 1, u = a && a.pageSize || 10;
2527
- return e.filter((s, o) => o < l * u && o >= u * (l - 1));
2393
+ function Wa(e, a) {
2394
+ const l = a && a.current || 1, n = a && a.pageSize || 10;
2395
+ return e.filter((o, i) => i < l * n && i >= n * (l - 1));
2528
2396
  }
2529
- function Ua(e) {
2397
+ function Ha(e) {
2530
2398
  const a = document.createElement("textarea");
2531
2399
  a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
2532
2400
  }
2533
- function Ja(e) {
2534
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !le(e);
2401
+ function Va(e) {
2402
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
2535
2403
  }
2536
2404
  const {
2537
- useBreakpoint: Za
2538
- } = ft, en = {
2405
+ useBreakpoint: qa
2406
+ } = nt, Ga = {
2539
2407
  reload: !0,
2540
2408
  density: !0,
2541
2409
  setting: !0,
2542
2410
  fullScreen: !0
2543
- }, tn = Zl.useToken, rt = /* @__PURE__ */ de({
2411
+ }, _a = ql.useToken, tt = /* @__PURE__ */ ne({
2544
2412
  name: "GProTable",
2545
2413
  inheritAttrs: !1,
2546
- props: ye,
2414
+ props: ce,
2547
2415
  emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "columnsStateChange", "loadingChange"],
2548
2416
  slots: Object,
2549
2417
  setup(e, {
2550
2418
  emit: a,
2551
2419
  slots: l,
2552
- attrs: u,
2553
- expose: s
2420
+ attrs: n,
2421
+ expose: o
2554
2422
  }) {
2555
- const o = dt({
2423
+ const i = at({
2556
2424
  suffixCls: "table",
2557
2425
  isPor: !0
2558
2426
  }), {
2559
- wrapSSR: f,
2427
+ wrapSSR: d,
2560
2428
  hashId: h
2561
- } = tt("ProBaseTable", [Ga], o), {
2562
- token: C
2563
- } = tn(), R = Vl(), c = Za(), {
2564
- width: p
2565
- } = wl(), i = k(!1), n = Yt(), d = k(), b = k(), w = k(e.waitRequest);
2566
- qe(() => w.value = e.waitRequest);
2429
+ } = qe("ProBaseTable", [Ka], i), {
2430
+ token: g
2431
+ } = _a(), p = Ml(), r = qa(), {
2432
+ width: C
2433
+ } = gl(), c = I(!1), m = Ot(), x = I(), v = I(), F = I(e.waitRequest);
2434
+ Ee(() => F.value = e.waitRequest);
2567
2435
  const {
2568
- toggle: O,
2569
- isFullscreen: I
2570
- } = Mt(d), E = T(() => ({
2436
+ toggle: P,
2437
+ isFullscreen: k
2438
+ } = It(x), j = S(() => ({
2571
2439
  ...e
2572
- })), _ = T(() => !c.value.xl), H = T(() => {
2573
- var m, $;
2574
- return e.virtualScroll && Je(!((m = e.scroll) != null && m.y), "参数scroll的Y值不能为空!"), !!(($ = e.scroll) != null && $.y && e.virtualScroll);
2575
- }), A = T(() => e.search === !1 ? !1 : J(e.search) ? e.search : {
2440
+ })), L = S(() => !r.value.xl), W = S(() => (e.virtualScroll && We(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), O = S(() => e.search === !1 ? !1 : V(e.search) ? e.search : {
2576
2441
  type: "auto",
2577
2442
  resetText: "重置",
2578
2443
  searchText: "查询"
2579
- }), ae = T(() => A.value === !1 ? {} : A.value), z = T(() => {
2580
- var m;
2581
- return ((m = ae.value) == null ? void 0 : m.manualRequest) ?? !1;
2582
- }), K = T(() => {
2583
- var m;
2584
- return (m = ae.value) == null ? void 0 : m.actions;
2585
- }), ne = T(() => {
2586
- const m = (e.columns || []).filter(($) => $.key || $.dataIndex).map(($) => {
2587
- const F = $.key || $.dataIndex;
2588
- return $.key = F, $.dataIndex = F, $.align = $.align || e.align, $.uuid = $.uuid || ct().uuid(15), $;
2444
+ }), N = S(() => O.value === !1 ? {} : O.value), D = S(() => N.value?.manualRequest ?? !1), Z = S(() => N.value?.actions), oe = S(() => {
2445
+ const y = (e.columns || []).filter((T) => T.key || T.dataIndex).map((T) => {
2446
+ const B = T.key || T.dataIndex;
2447
+ return T.key = B, T.dataIndex = B, T.align = T.align || e.align, T.uuid = T.uuid || lt().uuid(15), T;
2589
2448
  });
2590
- return bl(m, {
2449
+ return dl(y, {
2591
2450
  align: e.align ?? "left",
2592
2451
  showIndex: e.showIndex ?? !1
2593
2452
  });
2594
2453
  }), {
2595
- loadingComputed: fe,
2596
- loading: oe,
2597
- setLoading: Fe
2598
- } = Aa({
2454
+ loadingComputed: ie,
2455
+ loading: ae,
2456
+ setLoading: pe
2457
+ } = ka({
2599
2458
  emit: a,
2600
- loading: ve(e, "loading")
2459
+ loading: se(e, "loading")
2601
2460
  }), {
2602
- sizeRef: pe,
2603
- setTableSize: je
2604
- } = qa({
2461
+ sizeRef: he,
2462
+ setTableSize: $e
2463
+ } = za({
2605
2464
  emit: a,
2606
- size: ve(e, "size")
2465
+ size: se(e, "size")
2607
2466
  }), {
2608
- paginationInfo: Z,
2609
- requestPagination: he,
2610
- setPagination: t
2611
- } = Ka({
2467
+ paginationInfo: t,
2468
+ requestPagination: f,
2469
+ setPagination: R
2470
+ } = Aa({
2612
2471
  slots: l,
2613
- props: E,
2614
- pagination: ve(e, "pagination")
2615
- }), g = Ha(e), {
2616
- proScroll: x,
2617
- breakpoint: y
2618
- } = Va({
2619
- ...g,
2620
- innerWidth: p,
2621
- columns: ne,
2622
- screens: c
2623
- }), B = Pa(e), {
2624
- proColumns: P,
2625
- cacheProColumns: v,
2626
- setColumns: G,
2627
- changeColumns: V,
2628
- resizeColumnWidth: Q
2629
- } = ja({
2630
- ...B,
2631
- breakpoint: y,
2632
- scroll: x,
2633
- columns: ne
2472
+ props: j,
2473
+ pagination: se(e, "pagination")
2474
+ }), $ = Ea(e), {
2475
+ proScroll: w,
2476
+ breakpoint: s
2477
+ } = Ma({
2478
+ ...$,
2479
+ innerWidth: C,
2480
+ columns: oe,
2481
+ screens: r
2482
+ }), z = $a(e), {
2483
+ proColumns: q,
2484
+ cacheProColumns: ee,
2485
+ setColumns: Ce,
2486
+ changeColumns: Y,
2487
+ resizeColumnWidth: Me
2488
+ } = Ra({
2489
+ ...z,
2490
+ breakpoint: s,
2491
+ scroll: w,
2492
+ columns: oe
2634
2493
  }), {
2635
- columnsMap: ue,
2636
- operationType: xe,
2637
- setColumnsMap: X,
2638
- sortKeyColumns: Se,
2639
- cacheColumnsMap: Y,
2640
- setSortKeyColumns: Be
2641
- } = Da({
2642
- columns: v,
2643
- columnsState: ve(e, "columnsState"),
2644
- changeColumns: V
2494
+ columnsMap: Re,
2495
+ operationType: ue,
2496
+ setColumnsMap: xe,
2497
+ sortKeyColumns: G,
2498
+ cacheColumnsMap: ye,
2499
+ setSortKeyColumns: J
2500
+ } = Fa({
2501
+ columns: ee,
2502
+ columnsState: se(e, "columnsState"),
2503
+ changeColumns: Y
2645
2504
  }), {
2646
- formDataRef: ee,
2647
- formParamsRef: ht,
2648
- defaultParamsRef: Qt,
2649
- setFormParams: lt
2650
- } = Wa({
2651
- searchMap: ve(e, "searchMap"),
2652
- params: ve(e, "params"),
2653
- columns: ne,
2654
- setPagination: t
2505
+ formDataRef: ot,
2506
+ formParamsRef: it,
2507
+ defaultParamsRef: Yt,
2508
+ setFormParams: Ge
2509
+ } = Na({
2510
+ searchMap: se(e, "searchMap"),
2511
+ params: se(e, "params"),
2512
+ columns: oe,
2513
+ setPagination: R
2655
2514
  }), {
2656
- selectedKeys: mt,
2657
- selectedItems: Xt,
2658
- changeRowKey: Ut,
2659
- selectRowKey: vt,
2660
- selectAllRowKey: gt,
2661
- syncSelectedRows: yt,
2662
- removeRowKeys: bt,
2663
- clearAllRowKeys: Jt
2664
- } = Ya(ve(e, "rowKey"), ve(e, "rowSelection")), Zt = Ea(e), {
2665
- reload: De,
2666
- reSetDataList: el,
2667
- changeDataValue: tl,
2668
- isTreeDataRef: ll,
2669
- dataSource: Ne,
2670
- handleTableChange: Ct
2671
- } = Ma({
2672
- ...Zt,
2673
- waitRequest: w
2515
+ selectedKeys: ut,
2516
+ selectedItems: Lt,
2517
+ changeRowKey: Wt,
2518
+ selectRowKey: st,
2519
+ selectAllRowKey: rt,
2520
+ syncSelectedRows: ct,
2521
+ removeRowKeys: dt,
2522
+ clearAllRowKeys: Ht
2523
+ } = Da(se(e, "rowKey"), se(e, "rowSelection")), Vt = Ia(e), {
2524
+ reload: Fe,
2525
+ reSetDataList: qt,
2526
+ changeDataValue: Gt,
2527
+ isTreeDataRef: _t,
2528
+ dataSource: Be,
2529
+ handleTableChange: ft
2530
+ } = Pa({
2531
+ ...Vt,
2532
+ waitRequest: F
2674
2533
  }, {
2675
- loading: fe,
2676
- paginationInfo: Z,
2677
- setPagination: t,
2678
- removeRowKeys: bt,
2679
- syncSelectedRows: yt,
2680
- setLoading: Fe,
2681
- setColumns: G,
2682
- search: A,
2683
- columns: P,
2684
- formParamsRef: ht,
2534
+ loading: ie,
2535
+ paginationInfo: t,
2536
+ setPagination: R,
2537
+ removeRowKeys: dt,
2538
+ syncSelectedRows: ct,
2539
+ setLoading: pe,
2540
+ setColumns: Ce,
2541
+ search: O,
2542
+ columns: q,
2543
+ formParamsRef: it,
2685
2544
  onBeforeSearchSubmit: e.onBeforeSearchSubmit,
2686
- hasCustomRender: T(() => Pe(e.customRender || (l == null ? void 0 : l.customRender)))
2687
- }, a), Ee = T(() => e.options ? {
2688
- ...en,
2689
- ...J(e.options) ? e.options : {}
2690
- } : !1), al = T(() => ({
2691
- size: S(pe),
2692
- scroll: S(x),
2693
- dataSource: S(Ne),
2694
- pagination: S(Z),
2695
- virtualScroll: H.value,
2696
- columns: S(P).filter((m) => m.show || m.show === void 0)
2697
- })), pt = T(() => {
2698
- var $, F;
2699
- const m = J(e.loading) ? Ve(e.loading, "spinning") : {};
2700
- return !m.indicator && (($ = n == null ? void 0 : n.indicator) != null && $.value) && (m.indicator = (F = n == null ? void 0 : n.indicator) == null ? void 0 : F.value), {
2701
- spinning: e.showLoading ? Pe(oe.value) : !1,
2702
- ...m
2545
+ hasCustomRender: S(() => Te(e.customRender || l?.customRender))
2546
+ }, a), Ie = S(() => e.options ? {
2547
+ ...Ga,
2548
+ ...V(e.options) ? e.options : {}
2549
+ } : !1), Qt = S(() => ({
2550
+ size: b(he),
2551
+ scroll: b(w),
2552
+ dataSource: b(Be),
2553
+ pagination: b(t),
2554
+ virtualScroll: W.value,
2555
+ columns: b(q).filter((y) => y.show || y.show === void 0)
2556
+ })), ht = S(() => {
2557
+ const y = V(e.loading) ? Ne(e.loading, "spinning") : {};
2558
+ return !y.indicator && m?.indicator?.value && (y.indicator = m?.indicator?.value), {
2559
+ spinning: e.showLoading ? Te(ae.value) : !1,
2560
+ ...y
2703
2561
  };
2704
- }), xt = T(() => {
2705
- var D;
2706
- let m;
2707
- const $ = S(E).direction === "rtl" ? "bottomLeft" : "right", F = (D = S(Z)) == null ? void 0 : D.position;
2708
- if (F !== null && Array.isArray(F)) {
2709
- const j = F.find((M) => M.includes("top")), q = F.find((M) => M.includes("bottom")), re = F.every((M) => `${M}` == "none");
2710
- !j && !q && !re && (m = $), j && (m = j.toLowerCase().replace("top", "")), q && (m = q.toLowerCase().replace("bottom", ""));
2562
+ }), mt = S(() => {
2563
+ let y;
2564
+ const T = b(j).direction === "rtl" ? "bottomLeft" : "right", B = b(t)?.position;
2565
+ if (B !== null && Array.isArray(B)) {
2566
+ const K = B.find((Q) => Q.includes("top")), _ = B.find((Q) => Q.includes("bottom")), A = B.every((Q) => `${Q}` == "none");
2567
+ !K && !_ && !A && (y = T), K && (y = K.toLowerCase().replace("top", "")), _ && (y = _.toLowerCase().replace("bottom", ""));
2711
2568
  } else
2712
- m = $;
2713
- return m;
2569
+ y = T;
2570
+ return y;
2714
2571
  });
2715
- ka(() => {
2716
- i.value && e.keepAliveReload ? De() : i.value = !0;
2572
+ Ta(() => {
2573
+ c.value && e.keepAliveReload ? Fe() : c.value = !0;
2717
2574
  });
2718
- const St = async (m, $) => {
2719
- var F;
2720
- z.value ? (F = K.value) != null && F.reload && $ ? (lt(m), await De()) : lt(m) : (lt({
2575
+ const vt = async (y, T) => {
2576
+ D.value ? Z.value?.reload && T ? (Ge(y), await Fe()) : Ge(y) : (Ge({
2721
2577
  ...e.params || {},
2722
- ...m
2723
- }), await De());
2724
- }, nl = async (m, $) => {
2725
- $ === "reset" ? (a("reset", m), e.request && await St(m, $)) : e.request ? (a("submit", m), await St(m, $)) : a("submit", m);
2726
- }, wt = (m, $, F, D) => {
2727
- t(Ft(m, ["current", "pageSize"])), Ct(m, $, F, D);
2728
- }, ul = (m, $) => {
2729
- var F;
2730
- t({
2731
- current: m,
2732
- pageSize: $
2733
- }), Ct({
2734
- current: m,
2735
- pageSize: $,
2736
- total: Z.value && ((F = Z.value) == null ? void 0 : F.total) || 0
2578
+ ...y
2579
+ }), await Fe());
2580
+ }, Xt = async (y, T) => {
2581
+ T === "reset" ? (a("reset", y), e.request && await vt(y, T)) : e.request ? (a("submit", y), await vt(y, T)) : a("submit", y);
2582
+ }, gt = (y, T, B, K) => {
2583
+ R(bt(y, ["current", "pageSize"])), ft(y, T, B, K);
2584
+ }, Ut = (y, T) => {
2585
+ R({
2586
+ current: y,
2587
+ pageSize: T
2588
+ }), ft({
2589
+ current: y,
2590
+ pageSize: T,
2591
+ total: t.value && t.value?.total || 0
2737
2592
  }, {}, {});
2738
- }, il = (m) => {
2739
- a("expandedRowsChange", m);
2740
- }, sl = (m, $) => {
2741
- a("expand", m, $);
2742
- }, ol = (m, $) => Q(m, $), rl = (m, $, F) => {
2743
- var j, q, re, M, me, we;
2744
- let D = m;
2745
- if ($) {
2746
- const ce = te(m) ? typeof ((j = m == null ? void 0 : m[0]) == null ? void 0 : j.children) == "string" ? (q = m == null ? void 0 : m[0]) == null ? void 0 : q.children : "" : m ? m.toString() : "", N = F.tooltip === !1 ? {} : F.tooltip, Me = F.tooltip === !1 ? 1 : He(N == null ? void 0 : N.hiddenLine) && (N == null ? void 0 : N.hiddenLine) > 0 ? N == null ? void 0 : N.hiddenLine : 1, Oe = F.tooltip === !1 ? 0 : He(N == null ? void 0 : N.width) ? N == null ? void 0 : N.width : 0, Ge = F.tooltip !== !1 && Et(ce) && Oe > 0 ? pl(ce, {
2593
+ }, Jt = (y) => {
2594
+ a("expandedRowsChange", y);
2595
+ }, Zt = (y, T) => {
2596
+ a("expand", y, T);
2597
+ }, el = (y, T) => Me(y, T), tl = (y, T, B) => {
2598
+ let K = y;
2599
+ 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(_, {
2747
2601
  cssObject: {
2748
2602
  fontSize: "14px",
2749
2603
  lineHeight: "22px",
2750
- fontFamily: ((M = (re = R == null ? void 0 : R.token) == null ? void 0 : re.value) == null ? void 0 : M.fontFamily) || ((me = C == null ? void 0 : C.value) == null ? void 0 : me.fontFamily),
2751
- ...(N == null ? void 0 : N.targetStyle) || {}
2752
- }
2753
- }) : 0, fl = document.querySelector(`.${o} .ant-table-tbody`), _e = r("div", {
2754
- class: `${o}-ellipsis-text`
2755
- }, [m]), $t = () => F.tooltip === !1 || J(F.tooltip) && Ge < Oe && Oe > 0 ? _e : r(be, L({
2756
- title: m,
2757
- getPopupContainer: (Ae) => {
2758
- var Rt;
2759
- return fl ?? ((Rt = Ae == null ? void 0 : Ae.parentNode) == null ? void 0 : Rt.parentNode);
2604
+ fontFamily: p?.token?.value?.fontFamily || g?.value?.fontFamily,
2605
+ ...A?.targetStyle || {}
2760
2606
  }
2761
- }, J(F.tooltip) ? F.tooltip : {}, {
2607
+ }) : 0, ol = document.querySelector(`.${i} .ant-table-tbody`), ze = u("div", {
2608
+ class: `${i}-ellipsis-text`
2609
+ }, [y]), yt = () => B.tooltip === !1 || V(B.tooltip) && nl < Se && Se > 0 ? ze : u(de, E({
2610
+ title: y,
2611
+ getPopupContainer: (_e) => ol ?? _e?.parentNode?.parentNode
2612
+ }, V(B.tooltip) ? B.tooltip : {}, {
2762
2613
  destroyTooltipOnHide: !0
2763
- }), Ja(_e) ? _e : {
2764
- default: () => [_e]
2614
+ }), Va(ze) ? ze : {
2615
+ default: () => [ze]
2765
2616
  });
2766
- if (D = r("div", {
2767
- class: `${o}-ellipsis ${(N == null ? void 0 : N.class) ?? ""}`,
2617
+ if (K = u("div", {
2618
+ class: `${i}-ellipsis ${A?.class ?? ""}`,
2768
2619
  style: {
2769
- "-webkit-line-clamp": Me
2620
+ "-webkit-line-clamp": Q
2770
2621
  }
2771
- }, [$t()]), F.copyable) {
2772
- const Ae = typeof F.copyText == "function" ? (we = F.copyText) == null ? void 0 : we.call(F, F) : F.copyText || ce;
2773
- D = r("div", {
2774
- class: `${o}-copyable`
2775
- }, [r("div", {
2776
- class: `${o}-ellipsis ${(N == null ? void 0 : N.class) ?? ""}`,
2622
+ }, [yt()]), B.copyable) {
2623
+ const _e = typeof B.copyText == "function" ? B.copyText?.(B) : B.copyText || _;
2624
+ K = u("div", {
2625
+ class: `${i}-copyable`
2626
+ }, [u("div", {
2627
+ class: `${i}-ellipsis ${A?.class ?? ""}`,
2777
2628
  style: {
2778
- "-webkit-line-clamp": Me
2629
+ "-webkit-line-clamp": Q
2779
2630
  }
2780
- }, [$t()]), r(Wl, {
2781
- class: `${o}-copyable-icon`,
2631
+ }, [yt()]), u(Nl, {
2632
+ class: `${i}-copyable-icon`,
2782
2633
  onClick: () => {
2783
- Ua(Ae), la.success("复制成功");
2634
+ Ha(_e), Ql.success("复制成功");
2784
2635
  }
2785
2636
  }, null)]);
2786
2637
  }
2787
2638
  }
2788
- return D;
2639
+ return K;
2789
2640
  };
2790
- function Tt() {
2791
- var F, D, j, q, re;
2792
- const m = ke(l, e, "emptyText");
2793
- if (m !== !1 && ((F = n == null ? void 0 : n.emptyText) == null ? void 0 : F.value) !== !1) {
2794
- const M = ((D = e.emptyTextProps) == null ? void 0 : D.extraProps) || {}, me = m || ((j = n == null ? void 0 : n.emptyText) == null ? void 0 : j.value), we = le(me), ce = we ? At(me, M) : jt(me || []);
2795
- return r("div", {
2796
- class: ge(`${o}-empty-text`, h.value, (q = e.emptyTextProps) == null ? void 0 : q.class),
2797
- style: (re = e.emptyTextProps) == null ? void 0 : re.style
2798
- }, [we ? ce : te(ce) ? ce.map((N) => et(N, M)) : r(aa, null, null)]);
2641
+ function pt() {
2642
+ 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 || []);
2645
+ return u("div", {
2646
+ class: re(`${i}-empty-text`, h.value, e.emptyTextProps?.class),
2647
+ style: e.emptyTextProps?.style
2648
+ }, [_ ? A : X(A) ? A.map((Q) => Ve(Q, B)) : u(Xl, null, null)]);
2799
2649
  }
2800
2650
  return null;
2801
2651
  }
2802
- const cl = () => {
2803
- var $;
2804
- const m = Nt(l, e, "customRender");
2805
- if (m) {
2806
- if (($ = Ne.value) != null && $.length) {
2807
- const F = ie(S(Ne));
2808
- return m == null ? void 0 : m({
2809
- dataSource: F,
2810
- currentData: Xa(F, Z.value)
2652
+ const ll = () => {
2653
+ const y = Ft(l, e, "customRender");
2654
+ if (y) {
2655
+ if (Be.value?.length) {
2656
+ const T = te(b(Be));
2657
+ return y?.({
2658
+ dataSource: T,
2659
+ currentData: Wa(T, t.value)
2811
2660
  });
2812
2661
  }
2813
- return Tt();
2662
+ return pt();
2814
2663
  }
2815
- return r(Ye, null, null);
2816
- }, dl = (m) => {
2817
- var j, q;
2818
- const $ = ke(l, e, "headerTitle"), F = ke(l, e, "titleTip"), D = ke(l, e, "toolBarBtn");
2819
- return r(Ia, {
2820
- headerTitle: $,
2821
- titleTip: F,
2664
+ return u(Ae, null, null);
2665
+ }, al = (y) => {
2666
+ const T = we(l, e, "headerTitle"), B = we(l, e, "titleTip"), K = we(l, e, "toolBarBtn");
2667
+ return u(Sa, {
2668
+ headerTitle: T,
2669
+ titleTip: B,
2822
2670
  titleTipText: e.titleTipText,
2823
- options: se(Ee.value) ? Ee.value : {
2824
- ...Ee.value,
2825
- setting: m ? !1 : (j = Ee.value) == null ? void 0 : j.setting,
2826
- density: m ? !1 : (q = Ee.value) == null ? void 0 : q.density
2671
+ options: le(Ie.value) ? Ie.value : {
2672
+ ...Ie.value,
2673
+ setting: y ? !1 : Ie.value?.setting,
2674
+ density: y ? !1 : Ie.value?.density
2827
2675
  },
2828
- settingExtra: ke(l, e, "settingExtra"),
2829
- optionsExtra: ke(l, e, "optionsExtra"),
2830
- toolBarBtn: D
2676
+ settingExtra: we(l, e, "settingExtra"),
2677
+ optionsExtra: we(l, e, "optionsExtra"),
2678
+ toolBarBtn: K
2831
2679
  }, null);
2832
2680
  };
2833
- return ia({
2834
- tableSize: pe,
2835
- columns: P,
2836
- cacheColumns: ne,
2837
- isMobile: _,
2838
- searchConfig: ae,
2839
- manualSearch: z,
2840
- searchActions: K,
2681
+ return Zl({
2682
+ tableSize: he,
2683
+ columns: q,
2684
+ cacheColumns: oe,
2685
+ isMobile: L,
2686
+ searchConfig: N,
2687
+ manualSearch: D,
2688
+ searchActions: Z,
2841
2689
  action: {
2842
- setTableSize: je,
2843
- reload: (m) => De(m),
2844
- toggle: O
2690
+ setTableSize: $e,
2691
+ reload: (y) => Fe(y),
2692
+ toggle: P
2845
2693
  },
2846
2694
  settingsAction: {
2847
- autoScroll: ve(e, "autoScroll"),
2848
- columnsMap: ue,
2849
- operationType: xe,
2850
- setColumnsMap: X,
2851
- sortKeyColumns: Se,
2852
- cacheColumnsMap: Y,
2853
- setSortKeyColumns: Be
2695
+ autoScroll: se(e, "autoScroll"),
2696
+ columnsMap: Re,
2697
+ operationType: ue,
2698
+ setColumnsMap: xe,
2699
+ sortKeyColumns: G,
2700
+ cacheColumnsMap: ye,
2701
+ setSortKeyColumns: J
2854
2702
  },
2855
- setPagination: t,
2856
- changeColumns: V,
2703
+ setPagination: R,
2704
+ changeColumns: Y,
2857
2705
  slots: l
2858
- }), s({
2706
+ }), o({
2859
2707
  formRef: () => ({
2860
- getFormState: () => S(ht),
2861
- getFormInnerState: () => {
2862
- var m;
2863
- return ((m = b.value) == null ? void 0 : m.getFormState()) || {};
2864
- },
2865
- restFormState: (m) => {
2866
- var $;
2867
- w.value = !0, m && (m == null || m()), ($ = b.value) == null || $.resetForm(!1), w.value = !1;
2708
+ getFormState: () => b(it),
2709
+ getFormInnerState: () => v.value?.getFormState() || {},
2710
+ restFormState: (y) => {
2711
+ F.value = !0, y && y?.(), v.value?.resetForm(!1), F.value = !1;
2868
2712
  }
2869
2713
  }),
2870
2714
  actionRef: () => ({
2871
- loading: oe,
2872
- dataSource: Ne,
2873
- pageState: he,
2874
- pagination: Z.value,
2875
- selectedKeys: T(() => mt.value),
2876
- selectedItems: T(() => Xt.value),
2715
+ loading: ae,
2716
+ dataSource: Be,
2717
+ pageState: f,
2718
+ pagination: t.value,
2719
+ selectedKeys: S(() => ut.value),
2720
+ selectedItems: S(() => Lt.value),
2877
2721
  rowsSelection: {
2878
- clear: Jt,
2879
- select: vt,
2880
- remove: bt,
2881
- sync: yt,
2882
- selectAll: gt
2722
+ clear: Ht,
2723
+ select: st,
2724
+ remove: dt,
2725
+ sync: ct,
2726
+ selectAll: rt
2883
2727
  },
2884
- reload: De,
2885
- getLoadingStatus: () => S(fe),
2886
- reloadAndReset: async (m) => {
2887
- var $, F, D;
2888
- w.value = !0, t({
2728
+ reload: Fe,
2729
+ getLoadingStatus: () => b(ie),
2730
+ reloadAndReset: async (y) => {
2731
+ F.value = !0, R({
2889
2732
  current: 1,
2890
- pageSize: (he == null ? void 0 : he.pageSize) || 10
2891
- }), m != null && m.callBack && (m != null && m.wait ? await (($ = m == null ? void 0 : m.callBack) == null ? void 0 : $.call(m)) : (F = m == null ? void 0 : m.callBack) == null || F.call(m)), (D = b.value) == null || D.resetForm(!1), w.value = !1;
2733
+ pageSize: f?.pageSize || 10
2734
+ }), y?.callBack && (y?.wait ? await y?.callBack?.() : y?.callBack?.()), v.value?.resetForm(!1), F.value = !1;
2892
2735
  },
2893
- reSetDataList: el,
2894
- setPageAndReload: wt,
2895
- setPagination: t,
2896
- setDataValue: tl,
2897
- setLoading: Fe
2736
+ reSetDataList: qt,
2737
+ setPageAndReload: gt,
2738
+ setPagination: R,
2739
+ setDataValue: Gt,
2740
+ setLoading: pe
2898
2741
  })
2899
2742
  }), () => {
2900
- var $, F;
2901
- const m = Pe(e.customRender || l.customRender);
2902
- return f(r("div", {
2903
- ref: d,
2904
- class: ge([{
2743
+ const y = Te(e.customRender || l.customRender);
2744
+ return d(u("div", {
2745
+ ref: x,
2746
+ class: re([{
2905
2747
  [`${h.value}`]: !0,
2906
- [`${o}`]: !0,
2907
- [`${u.class}`]: u.class,
2908
- [`${o}-beautify-scroll`]: se(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
2909
- [`${o}-no-scroll`]: !Object.keys(S(x) || {}).length,
2910
- [`${o}-table-tree`]: ll.value,
2911
- [`${o}-full-screen`]: I.value
2748
+ [`${i}`]: !0,
2749
+ [`${n.class}`]: n.class,
2750
+ [`${i}-beautify-scroll`]: le(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
2751
+ [`${i}-no-scroll`]: !Object.keys(b(w) || {}).length,
2752
+ [`${i}-table-tree`]: _t.value,
2753
+ [`${i}-full-screen`]: k.value
2912
2754
  }]),
2913
- style: u.style
2914
- }, [r("div", {
2915
- class: [`${o}-content`, h.value]
2916
- }, [(ee.value.length > 0 || Pe(l.search)) && e.search !== !1 && r(qt, {
2917
- ref: b,
2755
+ style: n.style
2756
+ }, [u("div", {
2757
+ class: [`${i}-content`, h.value]
2758
+ }, [(ot.value.length > 0 || Te(l.search)) && e.search !== !1 && u(Mt, {
2759
+ ref: v,
2918
2760
  modal: e.modalScroll,
2919
2761
  cardBordered: e.cardBordered,
2920
- searchMap: ee.value,
2921
- prefixCls: o,
2922
- loading: !!S(fe),
2923
- onSearch: nl,
2924
- defaultParams: Qt
2762
+ searchMap: ot.value,
2763
+ prefixCls: i,
2764
+ loading: !!b(ie),
2765
+ onSearch: Xt,
2766
+ defaultParams: Yt
2925
2767
  }, {
2926
- default: l.search ? () => {
2927
- var D;
2928
- return (D = l.search) == null ? void 0 : D.call(l);
2929
- } : null
2930
- }), r("div", {
2931
- class: ge(h.value, `${o}-card`, e.cardBordered && `${o}-card-border`)
2932
- }, [dl(m), m ? r(Ht, pt.value, {
2933
- default: () => {
2934
- var D, j, q;
2935
- return [r("div", {
2936
- class: `${o}-wrapper ${h.value}`
2937
- }, [r("div", {
2938
- class: ge(`${o}-list`, h.value, (D = e.tableProps) == null ? void 0 : D.class),
2939
- style: (j = e.tableProps) == null ? void 0 : j.style
2940
- }, [cl()]), e.pagination !== !1 && ((q = Ne.value) == null ? void 0 : q.length) > 0 && r(ea, L({
2941
- class: {
2942
- [`${o}-pagination ${h.value}`]: !0,
2943
- [`${o}-pagination-${xt.value} ${h.value}`]: !!xt.value
2944
- }
2945
- }, $e(S(Z)), {
2946
- onChange: ul
2947
- }), null)])];
2948
- }
2949
- }) : r(ta, L(Ft(e, Object.keys(Vt)), al.value, {
2950
- style: ($ = e.tableProps) == null ? void 0 : $.style,
2951
- class: (F = e.tableProps) == null ? void 0 : F.class,
2952
- loading: pt.value,
2953
- rowKey: (D) => D[e.rowKey],
2954
- transformCellText: (D) => {
2955
- var me, we, ce, N, Me;
2956
- e.transformCellText && typeof e.transformCellText && ((me = e.transformCellText) == null || me.call(e, D));
2768
+ default: l.search ? () => l.search?.() : null
2769
+ }), u("div", {
2770
+ class: re(h.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
2771
+ }, [al(y), y ? u(Nt, ht.value, {
2772
+ default: () => [u("div", {
2773
+ class: `${i}-wrapper ${h.value}`
2774
+ }, [u("div", {
2775
+ class: re(`${i}-list`, h.value, e.tableProps?.class),
2776
+ style: e.tableProps?.style
2777
+ }, [ll()]), e.pagination !== !1 && Be.value?.length > 0 && u(Gl, E({
2778
+ class: {
2779
+ [`${i}-pagination ${h.value}`]: !0,
2780
+ [`${i}-pagination-${mt.value} ${h.value}`]: !!mt.value
2781
+ }
2782
+ }, ve(b(t)), {
2783
+ onChange: Ut
2784
+ }), null)])]
2785
+ }) : u(_l, E(bt(e, Object.keys(Et)), Qt.value, {
2786
+ style: e.tableProps?.style,
2787
+ class: e.tableProps?.class,
2788
+ loading: ht.value,
2789
+ rowKey: (T) => T[e.rowKey],
2790
+ transformCellText: (T) => {
2791
+ e.transformCellText && typeof e.transformCellText && e.transformCellText?.(T);
2957
2792
  const {
2958
- column: j
2959
- } = D;
2960
- if (!j) return D.text;
2961
- const q = (j == null ? void 0 : j.key) || (j == null ? void 0 : j.dataIndex);
2962
- let re = !0, M = D.text;
2963
- if (te(M))
2964
- if (M.length === 0 || M.length === 1 && !le(M[0])) {
2965
- M = M == null ? void 0 : M[0];
2966
- const Oe = Cl(M, (j == null ? void 0 : j.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || "");
2967
- re = Oe.success, M = Qa(Oe.value, (j == null ? void 0 : j.valueType) || ((ce = (we = e.columns) == null ? void 0 : we.find((Ge) => (Ge.key || Ge.dataIndex) === q)) == null ? void 0 : ce.valueType), o, h.value);
2968
- } else ((N = M[0]) == null ? void 0 : N.type) === "template" && (M = (Me = M[0]) == null ? void 0 : Me.children);
2969
- return j != null && j.ellipsis ? rl(M, re, j) : M;
2793
+ column: B
2794
+ } = T;
2795
+ if (!B) return T.text;
2796
+ const K = B?.key || B?.dataIndex;
2797
+ let _ = !0, A = T.text;
2798
+ if (X(A))
2799
+ if (A.length === 0 || A.length === 1 && !U(A[0])) {
2800
+ A = A?.[0];
2801
+ 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);
2803
+ } else A[0]?.type === "template" && (A = A[0]?.children);
2804
+ return B?.ellipsis ? tl(A, _, B) : A;
2970
2805
  },
2971
2806
  rowSelection: e.rowSelection ? {
2972
- ...Ve(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2973
- selectedRowKeys: mt.value || [],
2974
- onSelect: vt,
2975
- onSelectAll: gt,
2976
- onChange: Ut
2807
+ ...Ne(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2808
+ selectedRowKeys: ut.value || [],
2809
+ onSelect: st,
2810
+ onSelectAll: rt,
2811
+ onChange: Wt
2977
2812
  } : void 0,
2978
- onChange: wt,
2979
- onExpandedRowsChange: il,
2980
- onExpand: sl,
2981
- onResizeColumn: (D, j) => ol(D, j)
2813
+ onChange: gt,
2814
+ onExpandedRowsChange: Jt,
2815
+ onExpand: Zt,
2816
+ onResizeColumn: (T, B) => el(T, B)
2982
2817
  }), {
2983
2818
  ...l,
2984
- emptyText: () => Tt()
2819
+ emptyText: () => pt()
2985
2820
  })])])]));
2986
2821
  };
2987
2822
  }
2988
2823
  });
2989
- rt.install = (e) => (e.component(rt.name, rt), e);
2824
+ tt.install = (e) => (e.component(tt.name, tt), e);
2990
2825
  export {
2991
- rt as GProTable,
2992
- rt as default,
2993
- ye as proTableProps,
2994
- gn as useTable
2826
+ tt as GProTable,
2827
+ tt as default,
2828
+ ce as proTableProps,
2829
+ rn as useTable
2995
2830
  };