@gx-design-vue/pro-table 0.2.0-beta.91 → 0.2.0-beta.93

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