@gx-design-vue/pro-table 0.2.0-beta.139 → 0.2.0-beta.140

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,29 +1,31 @@
1
1
  /*!
2
2
  * Gx Design Pro
3
- * Version: 0.2.0-beta.138
3
+ * Version: 0.2.0-beta.139
4
4
  * Author: gx12358
5
5
  * Copyright (C) 2024 gx12358
6
6
  * License: MIT License
7
7
  * Description: Gx Design Pro Table
8
- * Date Created: 2025-12-12
8
+ * Date Created: 2025-12-14
9
9
  * Homepage:
10
10
  * Contact: gx12358@gmail.com
11
11
  */
12
- import { defineComponent as we, ref as I, watch as z, cloneVNode as Qe, reactive as Ue, toRaw as re, computed as C, createVNode as s, Fragment as Ye, isVNode as _, mergeProps as W, h as st, unref as T, onActivated as ct, nextTick as At, getCurrentInstance as Ot, onMounted as jt, onUnmounted as Nt, onDeactivated as Yt, watchEffect as zt, toRef as M, isRef as He } from "vue";
13
- import { UpOutlined as Lt, DownOutlined as Et, InfoCircleOutlined as Mt, FullscreenExitOutlined as Wt, FullscreenOutlined as kt, ReloadOutlined as Ht, CopyOutlined as qt } from "@ant-design/icons-vue";
14
- import { useProAppContext as dt } from "@gx-design-vue/pro-app";
15
- import { useBreakpoint as ft, useMemo as Fe, tryOnUnmounted as Kt } from "@gx-design-vue/pro-hooks";
16
- import { useContext as Vt, useProStyle as Je, unit as nt, useProConfigContext as Gt } from "@gx-design-vue/pro-provider";
17
- import { isArray as K, cloneDeep as ee, isBoolean as Re, classNames as ae, isNumber as De, filterEmpty as mt, getPrefixCls as vt, isObject as Q, keysOf as ht, isDeepEqualReact as Le, compareArray as Xt, runFunction as _t, getSortIndex as Qt, isFunction as ze, handleCurrentPage as Ut, getRandomNumber as gt, deepMerge as Se, arrayRepeat as Jt, isString as pt, handleShowIndex as Zt, getSlot as it, convertValueBoolean as qe, getSlotsProps as el, handleEmptyField as tl, getTextWidth as ll, getSlotVNode as al, useDeepMerge as nl } from "@gx-design-vue/pro-utils";
18
- import { useDebounceFn as il, useFullscreen as bt, useWindowSize as ol } from "@vueuse/core";
19
- import { Grid as ul, DatePicker as yt, Space as ot, Input as Ne, TimePicker as rl, TreeSelect as sl, Select as cl, InputNumber as Ke, Button as ut, Spin as Ct, Tooltip as Te, theme as dl, Pagination as fl, Table as ml, message as vl, Empty as hl } from "ant-design-vue";
20
- import { omit as Ie, cloneDeep as xt, pick as Ee } from "lodash-es";
21
- import { tableProps as gl } from "ant-design-vue/es/table/Table";
12
+ import { defineComponent as ge, ref as x, watch as q, cloneVNode as tt, reactive as lt, toRaw as ce, computed as T, createVNode as d, Fragment as we, isVNode as le, mergeProps as Q, h as bt, onBeforeUnmount as Gt, onMounted as at, nextTick as nt, watchEffect as pt, unref as F, onActivated as yt, getCurrentInstance as Qt, onUnmounted as Ct, onDeactivated as St, onUpdated as Ut, toRef as V, Teleport as Jt, isRef as _e } from "vue";
13
+ import { UpOutlined as Zt, DownOutlined as el, InfoCircleOutlined as tl, FullscreenExitOutlined as ll, FullscreenOutlined as al, ReloadOutlined as nl, CopyOutlined as ol } from "@ant-design/icons-vue";
14
+ import { useProAppContext as xt } from "@gx-design-vue/pro-app";
15
+ import { useBreakpoint as ot, useMemo as Ne, tryOnUnmounted as il, onMountedOrActivated as sl } from "@gx-design-vue/pro-hooks";
16
+ import { useProStyle as it, unit as pe, useProConfigContext as rl } from "@gx-design-vue/pro-provider";
17
+ import { isArray as J, cloneDeep as ae, isObject as ne, isBoolean as De, classNames as D, isNumber as Ce, filterEmpty as Tt, getPrefixCls as wt, keysOf as $t, isDeepEqualReact as qe, compareArray as ul, runFunction as cl, getSortIndex as dl, isFunction as Me, handleCurrentPage as fl, getRandomNumber as Rt, deepMerge as ye, forInObject as vl, arrayRepeat as ml, isString as Pt, handleShowIndex as hl, getSlot as ft, convertValueBoolean as Ge, getSlotsProps as gl, handleEmptyField as bl, getTextWidth as pl, getSlotVNode as yl, useDeepMerge as Cl } from "@gx-design-vue/pro-utils";
18
+ import { useDebounceFn as Sl, useEventListener as vt, isClient as xl, useElementBounding as Tl, useFullscreen as Ft, useElementSize as He, useScroll as wl, useResizeObserver as $l, useWindowSize as Rl } from "@vueuse/core";
19
+ import { DatePicker as It, Input as We, TimePicker as Pl, TreeSelect as Fl, Select as Il, InputNumber as Qe, Button as mt, Spin as At, Tooltip as $e, Empty as Bt, theme as Al, Pagination as Bl, Table as Nl, message as zl } from "ant-design-vue";
20
+ import { omit as ze, cloneDeep as Nt, pick as Dl } from "lodash-es";
21
+ import { tableProps as Ol } from "ant-design-vue/es/table/Table";
22
22
  import "ant-design-vue/es/_util/props-util";
23
- import { warning as pl } from "ant-design-vue/es/vc-util/warning";
24
- import V from "dayjs";
25
- const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], St = {
26
- ...Ie(gl(), bl),
23
+ import { warning as El } from "ant-design-vue/es/vc-util/warning";
24
+ import Z from "dayjs";
25
+ import { useContext as zt } from "@gx-design-vue/context";
26
+ import { TinyColor as ht } from "@ctrl/tinycolor";
27
+ const Ll = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Dt = {
28
+ ...ze(Ol(), Ll),
27
29
  direction: {
28
30
  type: String,
29
31
  default: "ltr"
@@ -47,8 +49,32 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
47
49
  type: Object,
48
50
  default: void 0
49
51
  }
50
- }, { provideContext: yl, useInjectContext: Ze } = Vt("pro-table"), ge = {
51
- ...St,
52
+ }, { provideContext: jl, useInjectContext: st } = zt("pro-table"), he = {
53
+ ...Dt,
54
+ id: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ class: {
59
+ type: String,
60
+ default: ""
61
+ },
62
+ style: {
63
+ type: Object,
64
+ default: () => ({})
65
+ },
66
+ classNames: {
67
+ type: Object,
68
+ default: () => ({})
69
+ },
70
+ styles: {
71
+ type: Object,
72
+ default: () => ({})
73
+ },
74
+ fitPage: {
75
+ type: Boolean,
76
+ default: !1
77
+ },
52
78
  rowSelection: {
53
79
  type: Object,
54
80
  default: void 0
@@ -120,10 +146,6 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
120
146
  default: () => {
121
147
  }
122
148
  },
123
- useDefaultScrollStyle: {
124
- type: Boolean,
125
- default: () => !1
126
- },
127
149
  emptyText: {
128
150
  type: [Function, Object, Boolean, Array],
129
151
  default: () => {
@@ -133,12 +155,6 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
133
155
  type: Boolean,
134
156
  default: !0
135
157
  },
136
- tableProps: {
137
- type: Object,
138
- default: () => ({
139
- style: {}
140
- })
141
- },
142
158
  emptyTextProps: {
143
159
  type: Object,
144
160
  default: () => ({
@@ -151,40 +167,34 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
151
167
  placement: "right"
152
168
  })
153
169
  },
154
- // 表格标题下方的内容
155
- headerAfter: {
170
+ /** @name listToolAfter 表格工具栏下方的内容 */
171
+ listToolAfter: {
156
172
  type: [Object, Function, Boolean, String, Array],
157
173
  default: () => {
158
174
  }
159
175
  },
160
- // 表格标题
176
+ /** @name headerTitle 表格标题,可自定义 */
161
177
  headerTitle: {
162
178
  type: [Object, Function, Boolean, String, Array],
163
179
  default: () => {
164
180
  }
165
181
  },
166
- // 标题提示
182
+ /** @name headerTitleTip 标题提示的Icon,可自定义 */
167
183
  headerTitleTip: {
168
184
  type: [Object, Function, Boolean, String, Array],
169
185
  default: () => {
170
186
  }
171
187
  },
172
- // 标题提示字
188
+ /** @name titleTipText 标题提示词 */
173
189
  titleTipText: {
174
- type: String,
175
- default: "这是一个标题提示"
190
+ type: String
176
191
  },
177
- /**
178
- * @Author gx12358
179
- * @DateTime 2022/2/8
180
- * @lastTime 2022/2/8
181
- * @description table 工具栏,设为 false 时不显示
182
- */
192
+ /** @name options table 工具栏(reload:重新请求按钮;fullScreen:全屏按钮),设为 false 时不显示 */
183
193
  options: {
184
194
  type: [Object, Boolean],
185
195
  default: !1
186
196
  },
187
- // 针对 keepalive 缓存的页面 是否重新reload
197
+ /** @name keepAliveReload 针对 keepalive 缓存的页面,重新进入是否请求 */
188
198
  keepAliveReload: {
189
199
  type: Boolean,
190
200
  default: !1
@@ -303,7 +313,7 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
303
313
  onLoadingChange: Function,
304
314
  onRequestError: Function,
305
315
  onBeforeSearchSubmit: Function
306
- }, Cl = /* @__PURE__ */ we({
316
+ }, Hl = /* @__PURE__ */ ge({
307
317
  name: "RequestSelect",
308
318
  props: {
309
319
  fetch: Function,
@@ -322,53 +332,53 @@ const bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
322
332
  }
323
333
  },
324
334
  setup(e, {
325
- slots: a
335
+ slots: n
326
336
  }) {
327
- const l = I([]), n = I(e.loading ?? !1), o = I("init"), i = il(e.fetch, e.debounceTime || 10);
328
- return z([() => e.fetch, () => e.manual], () => {
329
- if (o.value !== "init" && n.value) return;
330
- const d = e.manual ?? !1;
331
- e.fetch && !d && (n.value = !0, i().then((m) => {
332
- l.value = xt(m), o.value = "success";
333
- }).catch((m) => {
334
- console.error(m), o.value = "error";
337
+ const l = x([]), a = x(e.loading ?? !1), o = x("init"), r = Sl(e.fetch, e.debounceTime || 10);
338
+ return q([() => e.fetch, () => e.manual], () => {
339
+ if (o.value !== "init" && a.value) return;
340
+ const u = e.manual ?? !1;
341
+ e.fetch && !u && (a.value = !0, r().then((b) => {
342
+ l.value = Nt(b), o.value = "success";
343
+ }).catch((b) => {
344
+ console.error(b), o.value = "error";
335
345
  }).finally(() => {
336
- n.value = !1;
346
+ a.value = !1;
337
347
  }));
338
348
  }, {
339
349
  immediate: !0
340
350
  }), () => {
341
- const d = a.default?.();
342
- return Qe(K(d) ? d[0] : d, {
351
+ const u = n.default?.();
352
+ return tt(J(u) ? u[0] : u, {
343
353
  options: l.value,
344
- notFoundContent: e.notFoundContent?.(n.value)
354
+ notFoundContent: e.notFoundContent?.(a.value)
345
355
  });
346
356
  };
347
357
  }
348
358
  });
349
- function xl(e, a) {
350
- const l = Ue({});
351
- function n() {
352
- Object.assign(l, ee(re(e)));
353
- const i = a.find((d) => d.valueType === "dateRange");
354
- i && o(i.name || "", e[i.rangeStartName || "start"] ? [
355
- e[i.rangeStartName || "start"],
356
- e[i.rangeEndName || "end"]
359
+ function Wl(e, n) {
360
+ const l = lt({});
361
+ function a() {
362
+ Object.assign(l, ae(ce(e)));
363
+ const r = n.find((u) => u.valueType === "dateRange");
364
+ r && o(r.name || "", e[r.rangeStartName || "start"] ? [
365
+ e[r.rangeStartName || "start"],
366
+ e[r.rangeEndName || "end"]
357
367
  ] : []);
358
368
  }
359
- z(() => e, () => {
360
- n();
369
+ q(() => e, () => {
370
+ a();
361
371
  }, { deep: !0, immediate: !0 });
362
- function o(i, d) {
363
- l[i] = d;
372
+ function o(r, u) {
373
+ l[r] = u;
364
374
  }
365
375
  return {
366
376
  formState: l,
367
- resetFormState: n,
377
+ resetFormState: a,
368
378
  changeFormState: o
369
379
  };
370
380
  }
371
- const Sl = (e) => ({
381
+ const Yl = (e) => ({
372
382
  [`${e.componentCls}-search`]: {
373
383
  position: "relative",
374
384
  display: "flex",
@@ -383,13 +393,34 @@ const Sl = (e) => ({
383
393
  marginBottom: e.marginLG,
384
394
  backgroundColor: e.colorBgContainer
385
395
  },
386
- "&-collapse-buttons": {
396
+ "&-control": {
387
397
  display: "flex",
388
398
  alignItems: "center",
389
399
  height: e.controlHeight,
390
400
  marginBottom: e.margin,
391
401
  fontSize: e.fontSize,
392
- lineHeight: e.lineHeight
402
+ lineHeight: e.lineHeight,
403
+ [`${e.componentCls}-search-control-content`]: {
404
+ display: "flex",
405
+ alignItems: "center",
406
+ gap: e.size
407
+ },
408
+ [`${e.componentCls}-search-control-text`]: {
409
+ cursor: "pointer",
410
+ color: e.colorLink,
411
+ transition: `color ${e.motionDurationSlow}`,
412
+ "&:hover": {
413
+ color: e.colorLinkHover
414
+ }
415
+ },
416
+ [`${e.componentCls}-search-buttons`]: {
417
+ display: "flex",
418
+ alignItems: "center",
419
+ gap: e.sizeXS
420
+ },
421
+ [`${e.componentCls}-a`]: {
422
+ flexShrink: 0
423
+ }
393
424
  },
394
425
  [`${e.componentCls}-search-item`]: {
395
426
  display: "flex",
@@ -454,7 +485,7 @@ const Sl = (e) => ({
454
485
  justifyContent: "center",
455
486
  alignItems: "center"
456
487
  }
457
- }), Ve = [
488
+ }), Ue = [
458
489
  { value: "xxl", span: 4 },
459
490
  { value: "xl", span: 3 },
460
491
  { value: "lg", span: 2 },
@@ -462,437 +493,632 @@ const Sl = (e) => ({
462
493
  { value: "sm", span: 2 },
463
494
  { value: "xs", span: 1 }
464
495
  ];
465
- function fe(e, a) {
466
- return typeof a == "function" ? a(V(e)) : V(e).format(a);
496
+ function me(e, n) {
497
+ return typeof n == "function" ? n(Z(e)) : Z(e).format(n);
467
498
  }
468
- function Pe(e, a) {
469
- return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
499
+ function Ae(e, n) {
500
+ return n ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
470
501
  }
471
- const rt = (e, a, l = "string") => {
472
- if (K(e)) {
473
- const [n, o] = e;
474
- let i, d;
475
- if (Array.isArray(a) ? (i = a[0], d = a[1]) : typeof a == "object" && a.type === "mask" ? (i = a.format, d = a.format) : (i = a, d = a), l === "string") {
476
- const m = n ? fe(n, i) : "", p = o ? fe(o, d) : "";
477
- return [m, p];
502
+ const gt = (e, n, l = "string") => {
503
+ if (J(e)) {
504
+ const [a, o] = e;
505
+ let r, u;
506
+ if (Array.isArray(n) ? (r = n[0], u = n[1]) : typeof n == "object" && n.type === "mask" ? (r = n.format, u = n.format) : (r = n, u = n), l === "string") {
507
+ const b = a ? me(a, r) : "", f = o ? me(o, u) : "";
508
+ return [b, f];
478
509
  }
479
- return [V(n), V(o)];
510
+ return [Z(a), Z(o)];
480
511
  }
481
512
  };
482
- function Tl(e) {
483
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !_(e);
513
+ function Ml(e) {
514
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !le(e);
484
515
  }
485
516
  const {
486
- useBreakpoint: wl
487
- } = ul, {
488
- MonthPicker: Rl,
489
- RangePicker: $l,
490
- YearPicker: Pl,
491
- WeekPicker: Fl,
492
- QuarterPicker: Dl
493
- } = yt;
494
- function Il(e) {
495
- let a = e.reduce((l, n) => n.order !== void 0 ? Math.max(l, n.order) : l, 0);
517
+ MonthPicker: ql,
518
+ RangePicker: Kl,
519
+ YearPicker: kl,
520
+ WeekPicker: Vl,
521
+ QuarterPicker: Xl
522
+ } = It;
523
+ function _l(e) {
524
+ let n = e.reduce((l, a) => a.order !== void 0 ? Math.max(l, a.order) : l, 0);
496
525
  return e.forEach((l) => {
497
- l.order === void 0 && (a += 1, l.order = a);
498
- }), e.sort((l, n) => l.order - n.order), e;
526
+ l.order === void 0 && (n += 1, l.order = n);
527
+ }), e.sort((l, a) => l.order - a.order), e;
499
528
  }
500
- const Bl = {
501
- modalScroll: ge.modalScroll,
529
+ const Gl = {
530
+ modalScroll: he.modalScroll,
502
531
  formCols: {
503
532
  type: Array,
504
533
  default: () => []
505
534
  },
506
- loading: ge.loading,
507
- cardBordered: ge.cardBordered,
535
+ loading: he.loading,
536
+ cardBordered: he.cardBordered,
508
537
  prefixCls: String,
509
538
  defaultFormSearch: {
510
539
  type: Object,
511
540
  default: () => ({})
512
541
  },
513
542
  onSearch: Function
514
- }, Al = /* @__PURE__ */ we({
543
+ }, Ql = /* @__PURE__ */ ge({
515
544
  name: "ProTableForm",
516
545
  inheritAttrs: !1,
517
- props: Bl,
546
+ props: Gl,
518
547
  setup(e, {
519
- slots: a,
548
+ slots: n,
520
549
  expose: l
521
550
  }) {
522
551
  const {
523
- wrapSSR: n,
552
+ wrapSSR: a,
524
553
  hashId: o
525
- } = Je("ProTableForm", [Sl], e.prefixCls), i = dt(), d = wl(), {
526
- formAutoRequest: m,
527
- formConfig: p,
528
- formActions: F
529
- } = Ze(), {
530
- formState: r,
531
- resetFormState: B,
554
+ } = it("ProTableForm", [Yl], e.prefixCls), r = xt(), u = ot(), {
555
+ formAutoRequest: b,
556
+ formConfig: f,
557
+ formActions: $,
558
+ screenWidth: v,
559
+ styles: C,
560
+ classNames: m
561
+ } = st(), {
562
+ formState: i,
563
+ resetFormState: w,
532
564
  changeFormState: h
533
- } = xl(e.defaultFormSearch, e.formCols), f = I(p.value?.collapsed ?? p.value?.defaultCollapsed), x = C(() => Re(F.value?.reset) ? F.value?.reset : !m.value), b = C(() => oe(p.value?.span)), j = C(() => p.value?.label);
534
- z(() => p.value?.collapsed, (t) => {
535
- f.value = t;
565
+ } = Wl(e.defaultFormSearch, e.formCols), O = x(pe(f.value?.gap || 16)), I = T(() => {
566
+ if (f.value?.breakpoint && ne(f.value.breakpoint) && Object.keys(f.value.breakpoint).length)
567
+ return f.value?.breakpoint;
568
+ }), B = x(f.value?.collapsed ?? f.value?.defaultCollapsed), N = T(() => De($.value?.reset) ? $.value?.reset : !b.value), L = T(() => I.value ? k(I.value, v.value) : H(f.value?.span, u.value)), K = T(() => f.value?.label);
569
+ q(() => f.value?.collapsed, (t) => {
570
+ B.value = t;
536
571
  });
537
- function oe(t) {
538
- let u = 4;
539
- for (let y = 0; y < Ve.length; y += 1) {
540
- const g = Ve[y].value;
541
- if (d.value[g]) {
542
- u = t?.[g] || (e.modalScroll ? 3 : Ve[y].span);
572
+ function k(t, s) {
573
+ let y = 4;
574
+ const g = Object.keys(t).map((S) => Number(S)).filter((S) => !Number.isNaN(S)).sort((S, c) => c - S);
575
+ for (let S = 0; S < g.length; S += 1) {
576
+ const c = g[S];
577
+ if (t[c] && s >= c) {
578
+ y = t[c];
579
+ break;
580
+ }
581
+ }
582
+ return y;
583
+ }
584
+ function H(t, s) {
585
+ let y = 4;
586
+ for (let g = 0; g < Ue.length; g += 1) {
587
+ const S = Ue[g].value;
588
+ if (s[S]) {
589
+ y = t?.[S] || (e.modalScroll ? 3 : Ue[g].span);
543
590
  break;
544
591
  }
545
592
  }
546
- return u;
593
+ return y;
547
594
  }
548
- const te = (t) => {
549
- f.value = t;
550
- }, $e = (t, u, y) => (t + 1) % u === 0 ? {
595
+ const A = (t) => {
596
+ B.value = t;
597
+ }, X = (t, s, y) => (t + 1) % s === 0 ? {
551
598
  ...y,
552
- marginRight: 0
599
+ marginRight: pe(0)
553
600
  } : {
554
601
  ...y,
555
- marginRight: "2%"
556
- }, pe = () => {
557
- const t = xt(r), u = e.formCols.find((R) => R.valueType === "text") || "", y = e.formCols.find((R) => R.valueType === "dateRange") || "", g = e.formCols.find((R) => R.valueType === "treeSelect");
558
- return u && (t[u.name] = r[u.name] || u.initialValue || ""), y && (t[y.rangeStartName || "start"] = t[y.name] ? t[y.name][0] : "", t[y.rangeEndName || "end"] = t[y.name] ? t[y.name][1] : "", delete t[y.name]), g && (g?.name && K(r[g?.name]) && (t[g.name] = r[g.name].length ? r[g.name].map((R) => R[g.valueKey === "text" ? "label" : "value"]).join() : ""), g?.name && K(t[g?.name]) && (t[g.name] = t[g.name].length ? t[g.name].map((R) => R[g.valueKey === "text" ? "label" : "value"]) : "")), t;
559
- }, le = (t = !1, u) => {
560
- (m.value || t) && e.onSearch?.(pe(), t ? u ? "reset" : "submit" : void 0);
561
- }, A = (t, u, y) => {
562
- const g = r[u.name || ""];
563
- switch (u.valueType) {
602
+ marginRight: O.value
603
+ }, E = () => {
604
+ const t = Nt(i), s = e.formCols.find((S) => S.valueType === "text") || "", y = e.formCols.find((S) => S.valueType === "dateRange") || "", g = e.formCols.find((S) => S.valueType === "treeSelect");
605
+ return s && (t[s.name] = i[s.name] || s.initialValue || ""), y && (t[y.rangeStartName || "start"] = t[y.name] ? t[y.name][0] : "", t[y.rangeEndName || "end"] = t[y.name] ? t[y.name][1] : "", delete t[y.name]), g && (g?.name && J(i[g?.name]) && (t[g.name] = i[g.name].length ? i[g.name].map((S) => S[g.valueKey === "text" ? "label" : "value"]).join() : ""), g?.name && J(t[g?.name]) && (t[g.name] = t[g.name].length ? t[g.name].map((S) => S[g.valueKey === "text" ? "label" : "value"]) : "")), t;
606
+ }, W = (t = !1, s) => {
607
+ (b.value || t) && e.onSearch?.(E(), t ? s ? "reset" : "submit" : void 0);
608
+ }, Y = (t, s, y) => {
609
+ const g = i[s.name || ""];
610
+ switch (s.valueType) {
564
611
  case "text":
565
- h(u.name || "", t || "");
612
+ h(s.name || "", t || "");
566
613
  break;
567
614
  case "number":
568
- h(u.name || "", t || void 0);
615
+ h(s.name || "", t || void 0);
569
616
  break;
570
617
  case "numberRange":
571
- De(y?.key) && g && (g[y.key] = t, h(u.name || "", g || []));
618
+ Ce(y?.key) && g && (g[y.key] = t, h(s.name || "", g || []));
572
619
  break;
573
620
  case "select":
574
- h(u.name || "", t ?? void 0);
621
+ h(s.name || "", t ?? void 0);
575
622
  break;
576
623
  case "treeSelect":
577
- h(u.name || "", t ?? (u.field?.treeCheckable || u.field?.multiple ? [] : null));
624
+ h(s.name || "", t ?? (s.field?.treeCheckable || s.field?.multiple ? [] : null));
578
625
  break;
579
626
  case "date":
580
- h(u.name || "", t ? fe(t, Pe(u.valueFormat, u.showTime)) : null);
627
+ h(s.name || "", t ? me(t, Ae(s.valueFormat, s.showTime)) : null);
581
628
  break;
582
629
  case "dateWeek":
583
- h(u.name || "", t ? fe(t, "YYYY-wo") : null);
630
+ h(s.name || "", t ? me(t, "YYYY-wo") : null);
584
631
  break;
585
632
  case "dateMonth":
586
- h(u.name || "", t ? fe(t, "YYYY-MM") : null);
633
+ h(s.name || "", t ? me(t, "YYYY-MM") : null);
587
634
  break;
588
635
  case "dateQuarter":
589
- h(u.name || "", t ? fe(t, "YYYY-QQ") : null);
636
+ h(s.name || "", t ? me(t, "YYYY-QQ") : null);
590
637
  break;
591
638
  case "dateYear":
592
- h(u.name || "", t ? fe(t, "YYYY") : null);
639
+ h(s.name || "", t ? me(t, "YYYY") : null);
593
640
  break;
594
641
  case "dateRange":
595
- h(u.name || "", t && K(t) && t.length === 2 ? rt(t, Pe(u.valueFormat, u.showTime)) : null);
642
+ h(s.name || "", t && J(t) && t.length === 2 ? gt(t, Ae(s.valueFormat, s.showTime)) : null);
596
643
  break;
597
644
  case "time":
598
- h(u.name || "", t ? fe(t, u.valueFormat || "HH:mm:ss") : null);
645
+ h(s.name || "", t ? me(t, s.valueFormat || "HH:mm:ss") : null);
599
646
  break;
600
647
  }
601
- u.valueType === "treeSelect" || u.valueType, le();
602
- }, me = (t = !0) => {
603
- B(), le(!0, t);
648
+ s.valueType === "treeSelect" || s.valueType, W();
649
+ }, M = (t = !0) => {
650
+ w(), W(!0, t);
604
651
  };
605
652
  l({
606
- getFormSearch: () => pe(),
607
- resetForm: me
653
+ getFormSearch: () => E(),
654
+ resetForm: M
608
655
  });
609
- const Y = () => {
610
- const t = i?.emptyText?.value;
656
+ const ee = () => {
657
+ const t = r?.emptyText?.value;
611
658
  if (t) {
612
- const u = _(t), y = u ? st(t) : mt(t || []);
613
- return s("div", {
614
- class: ae(`${e.prefixCls}-search-empty-text`, o.value)
615
- }, [u ? y : K(y) ? y.map((g) => Qe(g)) : void 0]);
659
+ const s = le(t), y = s ? bt(t) : Tt(t || []);
660
+ return d("div", {
661
+ class: D(`${e.prefixCls}-search-empty-text`, o.value)
662
+ }, [s ? y : J(y) ? y.map((g) => tt(g)) : void 0]);
616
663
  }
617
- }, G = () => (!m.value || x.value) && s(ot, null, {
618
- default: () => [x.value && s(ut, {
619
- onClick: () => me()
620
- }, {
621
- default: () => [F.value?.resetText || "重置"]
622
- }), !m.value && s(ut, {
623
- loading: e.loading,
624
- type: "primary",
625
- onClick: () => le(!0)
626
- }, {
627
- default: () => [F.value?.searchText || "查询"]
628
- })]
629
- }), U = ({
630
- formItemStyle: t,
631
- collapsed: u,
632
- collapseRender: y = !0
633
- }) => s("div", {
634
- style: t,
635
- class: `${e.prefixCls}-search-collapse-buttons ${o.value}`
636
- }, [s(ot, {
637
- size: 16
664
+ }, se = () => (!b.value || N.value) && d("div", {
665
+ class: D(`${e.prefixCls}-search-buttons ${o.value}`, m.value?.searchButtons),
666
+ style: C.value?.searchButtons
667
+ }, [N.value && d(mt, {
668
+ key: "reset",
669
+ onClick: () => M()
670
+ }, {
671
+ default: () => [$.value?.resetText || "重置"]
672
+ }), !b.value && d(mt, {
673
+ key: "submit",
674
+ loading: e.loading,
675
+ type: "primary",
676
+ onClick: () => W(!0)
638
677
  }, {
639
- default: () => [G(), p.value?.collapseRender !== !1 && y && s(Ye, null, [typeof p.value?.collapseRender == "function" ? p.value?.collapseRender(u) : s("span", {
640
- class: `${e.prefixCls}-a ${o.value}`,
641
- onClick: () => te(!u)
642
- }, [u ? "收起" : "展开", u ? s(Lt, null, null) : s(Et, null, null)])])]
643
- })]);
644
- function ne(t) {
645
- return t === void 0 ? void 0 : t ? s(Ct, {
678
+ default: () => [$.value?.searchText || "查询"]
679
+ })]), re = ({
680
+ formItemStyle: t = {},
681
+ collapsed: s,
682
+ collapseRender: y = !0
683
+ }) => d("div", {
684
+ style: {
685
+ ...t,
686
+ ...C.value?.searchControl
687
+ },
688
+ class: D(`${e.prefixCls}-search-control ${o.value}`, m.value?.searchControl)
689
+ }, [d("div", {
690
+ class: D(`${e.prefixCls}-search-control-content ${o.value}`, m.value?.searchContent)
691
+ }, [se(), f.value?.collapseRender !== !1 && y && d(we, null, [typeof f.value?.collapseRender == "function" ? f.value?.collapseRender(s) : d("span", {
692
+ class: D(`${e.prefixCls}-search-control-text ${o.value}`, m.value?.searchText),
693
+ style: C.value?.searchText,
694
+ onClick: () => A(!s)
695
+ }, [s ? "收起" : "展开", s ? d(Zt, null, null) : d(el, null, null)])])])]);
696
+ function be(t) {
697
+ return t === void 0 ? void 0 : t ? d(At, {
646
698
  size: "small",
647
- indicator: i?.indicator?.value
648
- }, null) : Y();
699
+ indicator: r?.indicator?.value
700
+ }, null) : ee();
649
701
  }
650
- function be(t, u) {
651
- return s(Cl, W(t.request, {
702
+ function de(t, s) {
703
+ return d(Hl, Q(t.request, {
652
704
  loading: t.loading,
653
- notFoundContent: ne
654
- }), Tl(u) ? u : {
655
- default: () => [u]
705
+ notFoundContent: be
706
+ }), Ml(s) ? s : {
707
+ default: () => [s]
656
708
  });
657
709
  }
658
- const J = (t) => {
659
- let u;
660
- const y = m.value ? Ne.Search : Ne, g = Ie(t.field || {}, "rules");
661
- let R = null;
710
+ const Re = (t) => {
711
+ let s;
712
+ const y = b.value ? We.Search : We, g = ze(t.field || {}, "rules");
713
+ let S = null;
662
714
  switch (t.valueType) {
663
715
  case "text":
664
- u = s(y, W({
716
+ s = d(y, Q({
665
717
  style: {
666
718
  width: "100%"
667
719
  },
668
- value: r[t.name],
720
+ value: i[t.name],
669
721
  placeholder: t.placeholder || "请输入",
670
722
  allowClear: t.allowClear ?? !0,
671
- onChange: (c) => A(c.target.value, t),
672
- onSearch: (c) => le()
723
+ onChange: (c) => Y(c.target.value, t),
724
+ onSearch: (c) => W()
673
725
  }, g), null);
674
726
  break;
675
727
  case "number":
676
- u = s(Ke, W({
728
+ s = d(Qe, Q({
677
729
  style: {
678
730
  width: "100%"
679
731
  },
680
- value: r[t.name],
732
+ value: i[t.name],
681
733
  placeholder: t.placeholder || "请输入",
682
- onChange: (c) => A(c, t)
734
+ onChange: (c) => Y(c, t)
683
735
  }, g), null);
684
736
  break;
685
737
  case "numberRange":
686
- u = s(Ne.Group, {
738
+ s = d(We.Group, {
687
739
  compact: !0,
688
- class: ae(o.value, `${e.prefixCls}-search-input-compact`)
740
+ class: D(o.value, `${e.prefixCls}-search-input-compact`)
689
741
  }, {
690
- default: () => [s(Ke, {
691
- value: r[t.name]?.[0],
692
- onChange: (c) => A(c, t, {
742
+ default: () => [d(Qe, {
743
+ value: i[t.name]?.[0],
744
+ onChange: (c) => Y(c, t, {
693
745
  key: 0
694
746
  }),
695
- placeholder: K(t.placeholder) && t.placeholder?.[0] || "请输入"
696
- }, null), s(Ne, {
747
+ placeholder: J(t.placeholder) && t.placeholder?.[0] || "请输入"
748
+ }, null), d(We, {
697
749
  disabled: !0,
698
750
  placeholder: "~"
699
- }, null), s(Ke, {
700
- value: r[t.name]?.[1],
701
- onChange: (c) => A(c, t, {
751
+ }, null), d(Qe, {
752
+ value: i[t.name]?.[1],
753
+ onChange: (c) => Y(c, t, {
702
754
  key: 1
703
755
  }),
704
- placeholder: K(t.placeholder) && t.placeholder?.[1] || "请输入"
756
+ placeholder: J(t.placeholder) && t.placeholder?.[1] || "请输入"
705
757
  }, null)]
706
758
  });
707
759
  break;
708
760
  case "select":
709
- R = s(cl, W({
761
+ S = d(Il, Q({
710
762
  style: {
711
763
  width: "100%"
712
764
  },
713
- value: t.loading ? void 0 : r[t.name],
765
+ value: t.loading ? void 0 : i[t.name],
714
766
  optionFilterProp: "label",
715
767
  placeholder: t.placeholder || "请选择",
716
768
  showSearch: t.showSearch,
717
769
  allowClear: t.allowClear ?? !0,
718
770
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
719
- notFoundContent: ne(t.loading),
720
- onChange: (c) => A(c, t),
771
+ notFoundContent: be(t.loading),
772
+ onChange: (c) => Y(c, t),
721
773
  options: t.loading ? [] : t?.valueEnum || []
722
774
  }, g), null);
723
775
  break;
724
776
  case "treeSelect":
725
- R = s(sl, W({
777
+ S = d(Fl, Q({
726
778
  style: {
727
779
  width: "100%"
728
780
  },
729
- value: r[t.name],
781
+ value: i[t.name],
730
782
  placeholder: t.placeholder || "请选择",
731
783
  allowClear: t.allowClear ?? !0,
732
784
  treeData: t.loading ? [] : t.valueEnum || [],
733
785
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
734
- notFoundContent: ne(t.loading),
735
- onChange: (c) => A(c, t)
786
+ notFoundContent: be(t.loading),
787
+ onChange: (c) => Y(c, t)
736
788
  }, g), null);
737
789
  break;
738
790
  case "date":
739
- u = s(yt, W({
791
+ s = d(It, Q({
740
792
  style: {
741
793
  width: "100%"
742
794
  },
743
- value: r[t.name] ? V(r[t.name]) : void 0,
795
+ value: i[t.name] ? Z(i[t.name]) : void 0,
744
796
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
745
797
  placeholder: t.placeholder || "请选择",
746
798
  allowClear: t.allowClear ?? !0,
747
- format: Pe(t.valueFormat, t.showTime),
799
+ format: Ae(t.valueFormat, t.showTime),
748
800
  showTime: t.showTime,
749
801
  showToday: t.showToday || !0,
750
- onChange: (c) => A(c, t)
802
+ onChange: (c) => Y(c, t)
751
803
  }, g), null);
752
804
  break;
753
805
  case "dateWeek":
754
- u = s(Fl, W({
806
+ s = d(Vl, Q({
755
807
  style: {
756
808
  width: "100%"
757
809
  },
758
- value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY-wo") : void 0,
810
+ value: i[t.name] ? Z(i[t.name], t.valueFormat || "YYYY-wo") : void 0,
759
811
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
760
812
  allowClear: t.allowClear ?? !0,
761
813
  placeholder: t.placeholder || "请选择",
762
- onChange: (c) => A(c, t)
814
+ onChange: (c) => Y(c, t)
763
815
  }, g), null);
764
816
  break;
765
817
  case "dateMonth":
766
- u = s(Rl, W({
818
+ s = d(ql, Q({
767
819
  style: {
768
820
  width: "100%"
769
821
  },
770
- value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY-MM") : void 0,
822
+ value: i[t.name] ? Z(i[t.name], t.valueFormat || "YYYY-MM") : void 0,
771
823
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
772
824
  allowClear: t.allowClear ?? !0,
773
825
  placeholder: t.placeholder || "请选择",
774
- onChange: (c) => A(c, t)
826
+ onChange: (c) => Y(c, t)
775
827
  }, g), null);
776
828
  break;
777
829
  case "dateQuarter":
778
- u = s(Dl, W({
830
+ s = d(Xl, Q({
779
831
  style: {
780
832
  width: "100%"
781
833
  },
782
- value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY-QQ") : void 0,
834
+ value: i[t.name] ? Z(i[t.name], t.valueFormat || "YYYY-QQ") : void 0,
783
835
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
784
836
  allowClear: t.allowClear ?? !0,
785
837
  placeholder: t.placeholder || "请选择",
786
- onChange: (c) => A(c, t)
838
+ onChange: (c) => Y(c, t)
787
839
  }, g), null);
788
840
  break;
789
841
  case "dateYear":
790
- u = s(Pl, W({
842
+ s = d(kl, Q({
791
843
  style: {
792
844
  width: "100%"
793
845
  },
794
- value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY") : void 0,
846
+ value: i[t.name] ? Z(i[t.name], t.valueFormat || "YYYY") : void 0,
795
847
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
796
848
  allowClear: t.allowClear ?? !0,
797
849
  placeholder: t.placeholder || "请选择",
798
- onChange: (c) => A(c, t)
850
+ onChange: (c) => Y(c, t)
799
851
  }, g), null);
800
852
  break;
801
853
  case "dateRange":
802
- u = s($l, W({
854
+ s = d(Kl, Q({
803
855
  style: {
804
856
  width: "100%"
805
857
  },
806
- value: r[t.name] && K(r[t.name]) && r[t.name]?.length === 2 ? rt(r[t.name], Pe(t.valueFormat, t.showTime), "dayjs") : void 0,
858
+ value: i[t.name] && J(i[t.name]) && i[t.name]?.length === 2 ? gt(i[t.name], Ae(t.valueFormat, t.showTime), "dayjs") : void 0,
807
859
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
808
860
  placeholder: t.placeholder || ["开始日期", "结束日期"],
809
- format: Pe(t.valueFormat, t.showTime),
861
+ format: Ae(t.valueFormat, t.showTime),
810
862
  showTime: t.showTime,
811
- onChange: (c) => A(c, t)
863
+ onChange: (c) => Y(c, t)
812
864
  }, g), null);
813
865
  break;
814
866
  case "time":
815
- u = s(rl, W({
867
+ s = d(Pl, Q({
816
868
  style: {
817
869
  width: "100%"
818
870
  },
819
- value: r[t.name] ? V(r[t.name], t.valueFormat || "HH:mm:ss") : void 0,
871
+ value: i[t.name] ? Z(i[t.name], t.valueFormat || "HH:mm:ss") : void 0,
820
872
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
821
873
  placeholder: t.placeholder || "请选择",
822
874
  allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
823
875
  use12Hours: t.use12Hours,
824
876
  format: t.valueFormat || "HH:mm:ss",
825
- onChange: (c) => A(c, t)
877
+ onChange: (c) => Y(c, t)
826
878
  }, g), null);
827
879
  break;
828
880
  }
829
- return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (u = t.request ? be(t, R) : R), u;
830
- }, q = ({
881
+ return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (s = t.request ? de(t, S) : S), s;
882
+ }, oe = ({
831
883
  formItemStyle: t = {},
832
- item: u
884
+ item: s
833
885
  }) => {
834
- const y = _(u) ? u.props?.label : u.label, g = (_(u) ? u.props?.labelWidth : u.labelWidth) || j.value?.width, R = (_(u) ? u.props?.labelAlign : u.labelAlign) || j.value?.align;
835
- return s("div", {
836
- class: `${e.prefixCls}-search-item`,
886
+ const y = le(s) ? s.props?.label : s.label, g = (le(s) ? s.props?.labelWidth : s.labelWidth) || K.value?.width, S = (le(s) ? s.props?.labelAlign : s.labelAlign) || K.value?.align;
887
+ return d("div", {
888
+ class: D(`${e.prefixCls}-search-item`, o.value, m.value?.searchItem),
837
889
  style: {
838
890
  ...t,
839
- gap: j.value?.gap ? nt(j.value?.gap) : void 0
891
+ gap: K.value?.gap ? pe(K.value?.gap) : void 0,
892
+ ...C.value?.searchItem || {}
840
893
  }
841
- }, [y && s("div", {
842
- class: ae(`${e.prefixCls}-search-item-label`, j.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, R && `${e.prefixCls}-search-item-label-${R}`),
894
+ }, [y && d("div", {
895
+ class: D(`${e.prefixCls}-search-item-label`, K.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, S && `${e.prefixCls}-search-item-label-${S}`),
843
896
  style: {
844
- width: g ? nt(g) : void 0
897
+ width: g ? pe(g) : void 0
845
898
  }
846
- }, [y]), s("div", {
847
- class: ae(`${e.prefixCls}-search-item-children`)
848
- }, [_(u) ? u : J(u)])]);
849
- }, se = () => {
850
- let t = a.default?.() || [];
899
+ }, [y]), d("div", {
900
+ class: D(`${e.prefixCls}-search-item-children`)
901
+ }, [le(s) ? s : Re(s)])]);
902
+ }, Pe = () => {
903
+ let t = n.default?.() || [];
851
904
  t.length === 1 && t[0].type === "template" && (t = t[0]?.children || []);
852
- const u = Il([...e.formCols, ...t.map((g) => ({
905
+ const s = _l([...e.formCols, ...t.map((g) => ({
853
906
  ...g,
854
907
  order: g.props?.order || void 0
855
908
  }))]), y = {
856
- width: `${(100 - (b.value - 1) * 2) / b.value}%`
909
+ width: `calc((100% - (${L.value - 1} * ${O.value})) / ${L.value})`
857
910
  };
858
- return u.map((g, R) => {
859
- const c = $e(R, b.value, y);
860
- return u.length < b.value || f.value ? s(Ye, null, [q({
911
+ return s.map((g, S) => {
912
+ const c = X(S, L.value, y);
913
+ return s.length < L.value || B.value ? d(we, null, [oe({
861
914
  formItemStyle: c,
862
915
  item: g
863
- }), R === u.length - 1 && U({
916
+ }), S === s.length - 1 && re({
864
917
  formItemStyle: {
865
918
  flex: 1,
866
919
  justifyContent: "flex-end"
867
920
  },
868
- collapsed: f.value,
869
- collapseRender: !!f.value
870
- })]) : s(Ye, null, [R < b.value - 1 && q({
921
+ collapsed: B.value,
922
+ collapseRender: !!B.value
923
+ })]) : d(we, null, [S < L.value - 1 && oe({
871
924
  formItemStyle: c,
872
925
  item: g
873
- }), R === b.value - 1 && (b.value - 1 === 0 || u.length === b.value) && q({
926
+ }), S === L.value - 1 && (L.value - 1 === 0 || s.length === L.value) && oe({
874
927
  formItemStyle: c,
875
928
  item: g
876
- }), R === b.value - 1 && u.length >= b.value && U({
929
+ }), S === L.value - 1 && s.length >= L.value && re({
877
930
  formItemStyle: {
878
931
  flex: 1,
879
932
  justifyContent: "flex-end"
880
933
  },
881
934
  collapsed: !1,
882
- collapseRender: u.length !== b.value
935
+ collapseRender: s.length !== L.value
883
936
  })]);
884
937
  });
885
938
  };
886
939
  return () => {
887
940
  const t = e.cardBordered && `${e.prefixCls}-search-border`;
888
- return n(s("div", {
889
- class: ae(o.value, `${e.prefixCls}-search`, t, o.value, p.value?.className)
890
- }, [se()]));
941
+ return a(d("div", {
942
+ class: D(m.value?.search, o.value, `${e.prefixCls}-search`, t, o.value, f.value?.className),
943
+ style: C.value?.search
944
+ }, [Pe()]));
945
+ };
946
+ }
947
+ }), { useInjectContext: Ot, provideContext: Ul } = zt("scrollbar"), Te = 4, Jl = {
948
+ vertical: {
949
+ offset: "offsetHeight",
950
+ scroll: "scrollTop",
951
+ scrollSize: "scrollHeight",
952
+ size: "height",
953
+ key: "vertical",
954
+ axis: "Y",
955
+ client: "clientY",
956
+ direction: "top"
957
+ },
958
+ horizontal: {
959
+ offset: "offsetWidth",
960
+ scroll: "scrollLeft",
961
+ scrollSize: "scrollWidth",
962
+ size: "width",
963
+ key: "horizontal",
964
+ axis: "X",
965
+ client: "clientX",
966
+ direction: "left"
967
+ }
968
+ }, Zl = ({ move: e, size: n, bar: l }) => ({
969
+ [l.size]: n,
970
+ transform: `translate${l.axis}(${e}%)`
971
+ }), ea = {
972
+ vertical: Boolean,
973
+ size: String,
974
+ move: Number,
975
+ ratio: {
976
+ type: Number,
977
+ required: !0
978
+ },
979
+ always: Boolean,
980
+ barStyle: {
981
+ type: [Object],
982
+ default: () => ({})
983
+ }
984
+ }, et = /* @__PURE__ */ ge({
985
+ props: ea,
986
+ setup(e) {
987
+ const {
988
+ tableHeaderHeight: n,
989
+ hashId: l,
990
+ wrapElement: a,
991
+ scrollbarElement: o,
992
+ className: r
993
+ } = Ot(), u = x(), b = x(), f = x({}), $ = x(!1);
994
+ let v = !1, C = !1, m = 0, i = 0, w = xl ? document.onselectstart : null;
995
+ const h = T(() => Jl[e.vertical ? "vertical" : "horizontal"]), O = T(() => Zl({
996
+ size: e.size,
997
+ move: e.move,
998
+ bar: h.value
999
+ })), I = T(() => (
1000
+ // offsetRatioX = original width of thumb / current width of thumb / ratioX
1001
+ // offsetRatioY = original height of thumb / current height of thumb / ratioY
1002
+ // instance height = wrap height - GAP
1003
+ u.value[h.value.offset] ** 2 / a.value[h.value.scrollSize] / e.ratio / b.value[h.value.offset]
1004
+ )), B = (E) => {
1005
+ if (E.stopPropagation(), E.ctrlKey || [1, 2].includes(E.button)) return;
1006
+ window.getSelection()?.removeAllRanges(), L(E);
1007
+ const W = E.currentTarget;
1008
+ W && (f.value[h.value.axis] = W[h.value.offset] - (E[h.value.client] - W.getBoundingClientRect()[h.value.direction]));
1009
+ }, N = (E) => {
1010
+ if (!b.value || !u.value || !a.value) return;
1011
+ const W = Math.abs(E.target.getBoundingClientRect()[h.value.direction] - E[h.value.client]), Y = b.value[h.value.offset] / 2, M = (W - Y) * 100 * I.value / u.value[h.value.offset];
1012
+ a.value[h.value.scroll] = M * a.value[h.value.scrollSize] / 100;
1013
+ };
1014
+ function L(E) {
1015
+ a.value && (E.stopImmediatePropagation(), v = !0, m = a.value.scrollHeight, i = a.value.scrollWidth, document.addEventListener("mousemove", K), document.addEventListener("mouseup", k), w = document.onselectstart, document.onselectstart = () => !1);
1016
+ }
1017
+ function K(E) {
1018
+ if (!a.value || !u.value || !b.value || v === !1) return;
1019
+ const W = f.value[h.value.axis];
1020
+ if (!W) return;
1021
+ const Y = (u.value.getBoundingClientRect()[h.value.direction] - E[h.value.client]) * -1, M = b.value[h.value.offset] - W, ee = (Y - M) * 100 * I.value / u.value[h.value.offset];
1022
+ h.value.scroll === "scrollLeft" ? a.value[h.value.scroll] = ee * i / 100 : a.value[h.value.scroll] = ee * m / 100;
1023
+ }
1024
+ function k() {
1025
+ v = !1, f.value[h.value.axis] = 0, document.removeEventListener("mousemove", K), document.removeEventListener("mouseup", k), X(), C && ($.value = !1);
1026
+ }
1027
+ const H = () => {
1028
+ C = !1, $.value = !!e.size;
1029
+ }, A = () => {
1030
+ C = !0, $.value = v;
1031
+ };
1032
+ Gt(() => {
1033
+ X(), document.removeEventListener("mouseup", k);
1034
+ });
1035
+ function X() {
1036
+ document.onselectstart !== w && (document.onselectstart = w);
1037
+ }
1038
+ return vt(o, "mousemove", H), vt(o, "mouseleave", A), () => {
1039
+ const E = h.value.key === "vertical" ? {
1040
+ height: `calc(100% - ${pe(n.value + 1)})`,
1041
+ top: pe(n.value + 1)
1042
+ } : {};
1043
+ return d("div", {
1044
+ ref: u,
1045
+ style: {
1046
+ ...e.barStyle,
1047
+ ...E
1048
+ },
1049
+ class: [`${r}-bar`, "is-" + h.value.key, l.value],
1050
+ onMousedown: N
1051
+ }, [d("div", {
1052
+ ref: b,
1053
+ class: `${r}-thumb ${l.value}`,
1054
+ style: O.value,
1055
+ onMousedown: B
1056
+ }, null)]);
1057
+ };
1058
+ }
1059
+ });
1060
+ et.inheritAttrs = !1;
1061
+ const ta = {
1062
+ always: {
1063
+ type: Boolean,
1064
+ default: !0
1065
+ },
1066
+ minSize: {
1067
+ type: Number,
1068
+ default: 20
1069
+ },
1070
+ /**
1071
+ * @description style of bar
1072
+ */
1073
+ barStyle: {
1074
+ type: [Object],
1075
+ default: () => ({})
1076
+ }
1077
+ }, la = /* @__PURE__ */ ge({
1078
+ inheritAttrs: !1,
1079
+ props: ta,
1080
+ setup(e, {
1081
+ expose: n
1082
+ }) {
1083
+ const l = Ot(), a = x(0), o = x(0), r = x(""), u = x(""), b = x(1), f = x(1), $ = (C) => {
1084
+ if (C) {
1085
+ const m = C.offsetHeight - Te, i = C.offsetWidth - Te;
1086
+ o.value = C.scrollTop * 100 / m * b.value, a.value = C.scrollLeft * 100 / i * f.value;
1087
+ }
1088
+ }, v = () => {
1089
+ const C = l?.wrapElement;
1090
+ if (!C?.value) return;
1091
+ const m = C.value.offsetHeight - Te, i = C.value.offsetWidth - Te, w = m ** 2 / C.value.scrollHeight, h = i ** 2 / C.value.scrollWidth, O = Math.max(w, e.minSize), I = Math.max(h, e.minSize);
1092
+ b.value = w / (m - w) / (O / (m - O)), f.value = h / (i - h) / (I / (i - I)), u.value = O + Te < m ? `${O}px` : "", r.value = I + Te < i ? `${I}px` : "";
891
1093
  };
1094
+ return at(() => {
1095
+ nt(() => {
1096
+ v();
1097
+ });
1098
+ }), n({
1099
+ update: v,
1100
+ handleScroll: $
1101
+ }), () => d(we, null, [d(et, {
1102
+ move: a.value,
1103
+ barStyle: e.barStyle.x,
1104
+ ratio: f.value,
1105
+ size: r.value,
1106
+ always: e.always
1107
+ }, null), d(et, {
1108
+ move: o.value,
1109
+ barStyle: e.barStyle.y,
1110
+ ratio: b.value,
1111
+ size: u.value,
1112
+ vertical: !0,
1113
+ always: e.always
1114
+ }, null)]);
892
1115
  }
893
- }), Ol = (e) => ({
1116
+ }), aa = (e) => ({
894
1117
  [`${e.componentCls}`]: {
895
1118
  lineHeight: 1,
1119
+ "&-with-after": {
1120
+ paddingBottom: e.margin
1121
+ },
896
1122
  "&-container": {
897
1123
  display: "flex",
898
1124
  alignItems: "center",
@@ -938,7 +1164,7 @@ const Bl = {
938
1164
  display: "flex",
939
1165
  flexWrap: "wrap",
940
1166
  justifyContent: "flex-end",
941
- gap: e.marginXS,
1167
+ gap: e.marginSM,
942
1168
  [`${e.componentCls}-actions`]: {
943
1169
  display: "flex",
944
1170
  alignItems: "center",
@@ -947,7 +1173,7 @@ const Bl = {
947
1173
  },
948
1174
  "&-setting-items": {
949
1175
  display: "flex",
950
- gap: e.marginXS,
1176
+ gap: e.marginSM,
951
1177
  lineHeight: "32px",
952
1178
  alignItems: "center"
953
1179
  },
@@ -962,467 +1188,480 @@ const Bl = {
962
1188
  }
963
1189
  }
964
1190
  });
965
- function jl(e) {
966
- if (_(e))
1191
+ function na(e) {
1192
+ if (le(e))
967
1193
  return e;
968
1194
  if (e) {
969
- const a = e, {
1195
+ const n = e, {
970
1196
  icon: l,
971
- tooltip: n,
1197
+ tooltip: a,
972
1198
  onClick: o,
973
- key: i
974
- } = a;
975
- return l && n ? s(Te, {
976
- title: n,
977
- key: i
1199
+ key: r
1200
+ } = n;
1201
+ return l && a ? d($e, {
1202
+ title: a,
1203
+ key: r
978
1204
  }, {
979
- default: () => [s("span", {
980
- key: i,
1205
+ default: () => [d("span", {
1206
+ key: r,
981
1207
  onClick: () => {
982
- o && o(i);
1208
+ o && o(r);
983
1209
  }
984
1210
  }, [l])]
985
1211
  }) : l;
986
1212
  }
987
1213
  return null;
988
1214
  }
989
- const Tt = /* @__PURE__ */ we({
1215
+ const Et = /* @__PURE__ */ ge({
990
1216
  props: {
991
1217
  actions: [Array],
992
1218
  settings: [Array],
993
1219
  prefixCls: String,
994
- headerTitle: ge.headerTitle,
995
- headerTitleTip: ge.headerTitleTip,
996
- titleTipText: ge.titleTipText,
1220
+ headerTitle: he.headerTitle,
1221
+ listToolAfter: he.listToolAfter,
1222
+ headerTitleTip: he.headerTitleTip,
1223
+ titleTipText: he.titleTipText,
997
1224
  actionsPlacement: String
998
1225
  },
999
1226
  setup(e) {
1000
1227
  const {
1001
- wrapSSR: a,
1228
+ wrapSSR: n,
1002
1229
  hashId: l
1003
- } = Je("ListToolBar", [Ol], e.prefixCls), n = ft(), {
1004
- isMobile: o
1005
- } = Ze(), i = C(() => !!(e.headerTitleTip || e.headerTitle)), d = Fe(() => {
1230
+ } = it("ListToolBar", [aa], e.prefixCls), a = x(), {
1231
+ height: o
1232
+ } = Tl(a), r = ot(), {
1233
+ isMobile: u,
1234
+ tableListToolsHeight: b,
1235
+ classNames: f,
1236
+ styles: $
1237
+ } = st();
1238
+ pt(() => {
1239
+ b.value = o.value || 0;
1240
+ });
1241
+ const v = T(() => !!(e.headerTitleTip || e.headerTitle)), C = Ne(() => {
1006
1242
  if (!Array.isArray(e.actions) || e.actions?.length < 1)
1007
1243
  return {
1008
1244
  left: null,
1009
1245
  right: null
1010
1246
  };
1011
- const h = e.actions.filter((x) => _(x)).filter((x) => (x?.props?.placement || e.actionsPlacement) === "left"), f = e.actions.filter((x) => _(x)).filter((x) => (x?.props?.placement || e.actionsPlacement) === "right");
1247
+ const I = e.actions.filter((N) => le(N)).filter((N) => (N?.props?.placement || e.actionsPlacement) === "left"), B = e.actions.filter((N) => le(N)).filter((N) => (N?.props?.placement || e.actionsPlacement) === "right");
1012
1248
  return {
1013
- left: h.length ? s("div", {
1249
+ left: I.length ? d("div", {
1014
1250
  class: `${e.prefixCls}-actions ${l.value}`
1015
- }, [h]) : null,
1016
- right: f.length ? s("div", {
1251
+ }, [I]) : null,
1252
+ right: B.length ? d("div", {
1017
1253
  class: `${e.prefixCls}-actions ${l.value}`
1018
- }, [f]) : null
1254
+ }, [B]) : null
1019
1255
  };
1020
- }, [() => e.actions, () => e.actionsPlacement]), m = C(() => !!(e.headerTitleTip || e.headerTitle || d.value.left)), p = C(() => !!(e.settings?.length || d.value.right)), F = Fe(() => {
1021
- if (!m.value && p.value)
1022
- return s("div", {
1256
+ }, [() => e.actions, () => e.actionsPlacement]), m = T(() => !!(e.headerTitleTip || e.headerTitle || C.value.left)), i = T(() => !!(e.settings?.length || C.value.right)), w = Ne(() => {
1257
+ if (!m.value && i.value)
1258
+ return d("div", {
1023
1259
  class: `${e.prefixCls}-left ${l.value}`
1024
1260
  }, null);
1025
- const h = d.value.left;
1026
- return i.value ? s("div", {
1027
- class: `${e.prefixCls}-left ${l.value}`
1028
- }, [s("div", {
1261
+ const I = C.value.left, B = D(`${e.prefixCls}-left ${l.value}`, f.value?.toolbarLeft), N = $.value?.toolbarLeft;
1262
+ return v.value ? d("div", {
1263
+ class: B,
1264
+ style: N
1265
+ }, [d("div", {
1029
1266
  class: `${e.prefixCls}-title ${l.value}`
1030
- }, [e.headerTitle, e.headerTitleTip && s(Te, {
1267
+ }, [e.headerTitle, e.headerTitleTip && d($e, {
1031
1268
  title: e.titleTipText
1032
1269
  }, {
1033
- default: () => [Re(e.headerTitleTip) && e.headerTitleTip ? s(Mt, null, null) : e.headerTitleTip]
1034
- })]), h]) : s("div", {
1035
- class: `${e.prefixCls}-left ${l.value}`
1036
- }, [h]);
1037
- }, [() => m.value, () => p.value, () => i.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.headerTitleTip]), r = Fe(() => {
1038
- if (!p.value) return null;
1039
- const h = d.value.right;
1040
- return s("div", {
1041
- class: `${e.prefixCls}-right ${l.value}`,
1270
+ default: () => [De(e.headerTitleTip) && e.headerTitleTip ? d(tl, null, null) : e.headerTitleTip]
1271
+ })]), I]) : d("div", {
1272
+ class: B,
1273
+ style: N
1274
+ }, [I]);
1275
+ }, [() => m.value, () => i.value, () => v.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.headerTitleTip]), h = Ne(() => {
1276
+ if (!i.value) return null;
1277
+ const I = C.value.right;
1278
+ return d("div", {
1279
+ class: D(`${e.prefixCls}-right ${l.value}`, f.value?.toolbarRight),
1042
1280
  style: {
1043
- alignItems: n.value.lg ? "center" : "flex-end",
1044
- flexDirection: n.value.lg ? "row" : "column"
1281
+ alignItems: r.value.lg ? "center" : "flex-end",
1282
+ flexDirection: r.value.lg ? "row" : "column",
1283
+ ...$.value?.toolbarRight || {}
1045
1284
  }
1046
- }, [h, e.settings?.length ? s("div", {
1047
- class: ae(`${e.prefixCls}-setting-items`, l.value)
1048
- }, [e.settings.map((f, x) => {
1049
- const b = jl(f);
1050
- return s("div", {
1051
- key: x,
1052
- class: ae(`${e.prefixCls}-setting-item`, l.value)
1053
- }, [b]);
1285
+ }, [I, e.settings?.length ? d("div", {
1286
+ class: D(`${e.prefixCls}-setting-items`, l.value)
1287
+ }, [e.settings.map((B, N) => {
1288
+ const L = na(B);
1289
+ return d("div", {
1290
+ key: N,
1291
+ class: D(`${e.prefixCls}-setting-item`, l.value)
1292
+ }, [L]);
1054
1293
  })]) : null]);
1055
- }, [() => n.value, () => p.value, () => e.prefixCls, () => i.value, () => d.value, () => e.settings]), B = Fe(() => {
1056
- if (!p.value && !m.value) return null;
1057
- const h = {
1294
+ }, [() => r.value, () => i.value, () => e.prefixCls, () => v.value, () => C.value, () => e.settings]), O = Ne(() => {
1295
+ if (!i.value && !m.value) return null;
1296
+ const I = {
1058
1297
  [`${l.value}`]: !0,
1059
1298
  [`${e.prefixCls}-container`]: !0,
1060
- [`${e.prefixCls}-container-mobile`]: o.value
1299
+ [`${e.prefixCls}-container-mobile`]: u.value
1061
1300
  };
1062
- return s("div", {
1063
- class: h
1064
- }, [F.value, r.value]);
1065
- }, [() => o.value, () => m.value, () => p.value, () => F.value, () => e.prefixCls, () => r.value]);
1066
- return () => a(s("div", {
1067
- class: `${e.prefixCls} ${l.value}`
1068
- }, [B.value]));
1301
+ return d("div", {
1302
+ class: I
1303
+ }, [w.value, h.value]);
1304
+ }, [() => u.value, () => m.value, () => i.value, () => w.value, () => e.prefixCls, () => h.value]);
1305
+ return () => n(d("div", {
1306
+ ref: a,
1307
+ class: D(`${e.prefixCls} ${l.value}`, e.listToolAfter && `${e.prefixCls}-with-after`, f.value?.toolbar),
1308
+ style: $.value?.toolbar
1309
+ }, [O.value, e.listToolAfter && d("div", {
1310
+ class: D(`${e.prefixCls}-after ${l.value}`, f.value?.toolbarAfter),
1311
+ style: $.value?.toolbarAfter
1312
+ }, [e.listToolAfter])]));
1069
1313
  }
1070
1314
  });
1071
- Tt.inheritAttrs = !1;
1072
- const wt = /* @__PURE__ */ we({
1315
+ Et.inheritAttrs = !1;
1316
+ const Lt = /* @__PURE__ */ ge({
1073
1317
  setup() {
1074
1318
  const {
1075
1319
  isFullscreen: e
1076
- } = bt();
1077
- return () => e.value ? s(Te, {
1320
+ } = Ft();
1321
+ return () => e.value ? d($e, {
1078
1322
  title: "退出全屏"
1079
1323
  }, {
1080
- default: () => [s(Wt, null, null)]
1081
- }) : s(Te, {
1324
+ default: () => [d(ll, null, null)]
1325
+ }) : d($e, {
1082
1326
  title: "全屏"
1083
1327
  }, {
1084
- default: () => [s(kt, null, null)]
1328
+ default: () => [d(al, null, null)]
1085
1329
  });
1086
1330
  }
1087
1331
  });
1088
- function Nl() {
1332
+ function oa() {
1089
1333
  return {
1090
1334
  reload: {
1091
1335
  text: "刷新",
1092
- icon: s(Ht, null, null)
1336
+ icon: d(nl, null, null)
1093
1337
  },
1094
1338
  fullScreen: {
1095
1339
  text: "全屏",
1096
- icon: s(wt, null, null)
1340
+ icon: d(Lt, null, null)
1097
1341
  }
1098
1342
  };
1099
1343
  }
1100
- function Yl(e, a) {
1101
- return ht(e).filter((l) => l).map((l) => {
1102
- const n = e[l];
1103
- if (!n)
1344
+ function ia(e, n) {
1345
+ return $t(e).filter((l) => l).map((l) => {
1346
+ const a = e[l];
1347
+ if (!a)
1104
1348
  return null;
1105
- let o = n === !0 ? a[l] : () => n?.();
1349
+ let o = a === !0 ? n[l] : () => a?.();
1106
1350
  if (typeof o != "function" && (o = () => {
1107
1351
  }), l === "fullScreen")
1108
- return s("span", {
1352
+ return d("span", {
1109
1353
  key: l,
1110
1354
  onClick: o
1111
- }, [s(wt, null, null)]);
1112
- const i = Nl()[l];
1113
- return i ? s("span", {
1355
+ }, [d(Lt, null, null)]);
1356
+ const r = oa()[l];
1357
+ return r ? d("span", {
1114
1358
  key: l,
1115
1359
  onClick: o
1116
- }, [s(Te, {
1117
- title: i.text
1360
+ }, [d($e, {
1361
+ title: r.text
1118
1362
  }, {
1119
- default: () => [i.icon]
1363
+ default: () => [r.icon]
1120
1364
  })]) : null;
1121
1365
  }).filter((l) => l);
1122
1366
  }
1123
- const zl = {
1367
+ const sa = {
1124
1368
  options: [Boolean, Object, Array],
1125
1369
  actionsPlacement: [String],
1370
+ headerTitle: [Function, Boolean, Object, Array, String],
1371
+ listToolAfter: [Function, Boolean, Object, Array, String],
1126
1372
  headerTitleTip: [Function, Boolean, Object, String],
1127
1373
  titleTipText: [String],
1128
- actionsRender: [Array],
1129
- headerTitle: [Function, Boolean, Object, Array, String]
1130
- }, Ll = /* @__PURE__ */ we({
1131
- props: zl,
1374
+ actionsRender: [Array]
1375
+ }, ra = /* @__PURE__ */ ge({
1376
+ props: sa,
1132
1377
  inheritAttrs: !1,
1133
1378
  setup(e) {
1134
- const a = vt({
1379
+ const n = wt({
1135
1380
  suffixCls: "table-list-toolbar",
1136
1381
  isPor: !0
1137
1382
  }), {
1138
1383
  action: l
1139
- } = Ze(), n = Fe(() => e.options === !1 ? [] : Yl({
1384
+ } = st(), a = Ne(() => e.options === !1 ? [] : ia({
1140
1385
  reload: () => l?.reload(),
1141
1386
  fullScreen: () => l?.toggle()
1142
- }, Q(e.options) ? e.options : {}), [() => e.options]);
1387
+ }, ne(e.options) ? e.options : {}), [() => e.options]);
1143
1388
  return () => {
1144
1389
  const o = e.actionsRender || [];
1145
- return s(Tt, {
1146
- prefixCls: a,
1390
+ return d(Et, {
1391
+ prefixCls: n,
1147
1392
  actions: o,
1148
1393
  actionsPlacement: e.actionsPlacement,
1149
- settings: T(n),
1394
+ settings: F(a),
1150
1395
  headerTitle: e.headerTitle,
1396
+ listToolAfter: e.listToolAfter,
1151
1397
  headerTitleTip: e.headerTitleTip,
1152
1398
  titleTipText: e.titleTipText
1153
1399
  }, null);
1154
1400
  };
1155
1401
  }
1156
1402
  });
1157
- function El(e) {
1158
- return Ot();
1403
+ function ua(e) {
1404
+ return Qt();
1159
1405
  }
1160
- function Ml(e, a = !0, l) {
1161
- El() ? ct(e, l) : a ? e() : At(e);
1406
+ function ca(e, n = !0, l) {
1407
+ ua() ? yt(e, l) : n ? e() : nt(e);
1162
1408
  }
1163
- function Wl({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o, neverScroll: i }) {
1164
- const d = I([]);
1165
- z([
1409
+ function da({ scroll: e, columns: n, breakpoint: l, draggable: a, autoScroll: o, neverScroll: r }) {
1410
+ const u = x([]);
1411
+ q([
1166
1412
  () => e.value,
1167
- () => a.value,
1168
- () => l.value,
1169
1413
  () => n.value,
1170
1414
  () => l.value,
1415
+ () => a.value,
1416
+ () => l.value,
1171
1417
  () => o.value,
1172
- () => i.value
1418
+ () => r.value
1173
1419
  ], () => {
1174
- const h = F(re(a.value));
1175
- Le(h, re(d.value)) || (d.value = ee(h));
1420
+ const m = $(ce(n.value));
1421
+ qe(m, ce(u.value)) || (u.value = ae(m));
1176
1422
  }, {
1177
1423
  deep: !0,
1178
1424
  immediate: !0
1179
1425
  });
1180
- const m = C(() => {
1181
- const h = p(T(d).filter((b) => b.fixed === "left")), f = p(T(d).filter((b) => b.fixed !== "left" && b.fixed !== "right")), x = p(T(d).filter((b) => b.fixed === "right"));
1182
- return [
1183
- ...h,
1184
- ...f,
1185
- ...x
1186
- ];
1187
- });
1188
- function p(h) {
1189
- return h.sort((f, x) => Xt(f, x, "order", 0));
1426
+ const b = T(() => f(F(u)));
1427
+ function f(m) {
1428
+ return m.sort((i, w) => ul(i, w, "order", 0));
1190
1429
  }
1191
- function F(h) {
1192
- return ee(h).map((f, x) => {
1193
- if (f.dataIndex === "action" || x === h.length - 1 ? f.resizable = !1 : f.resizable = Re(f.resizable) ? f.resizable : !!(De(f.width) && T(n)), !f.width || T(i))
1194
- return f;
1195
- if (f.dataIndex === "action" && T(o))
1196
- if (T(e)?.x || !T(l))
1197
- f.width = f.width || 100, f.fixed = "right";
1430
+ function $(m) {
1431
+ return ae(m).map((i, w) => {
1432
+ if (i.dataIndex === "action" || w === m.length - 1 ? i.resizable = !1 : i.resizable = De(i.resizable) ? i.resizable : !!(Ce(i.width) && F(a)), !i.width || F(r))
1433
+ return i;
1434
+ if (i.dataIndex === "action" && F(o))
1435
+ if (F(e)?.x || !F(l))
1436
+ i.width = i.width || 100, i.fixed = "right";
1198
1437
  else {
1199
- const b = T(a).find((j) => j.dataIndex === f.dataIndex);
1200
- f.width = b?.width || "", f.fixed = b?.fixed;
1438
+ const h = F(n).find((O) => O.dataIndex === i.dataIndex);
1439
+ i.width = h?.width || "", i.fixed = h?.fixed;
1201
1440
  }
1202
- return f;
1441
+ return i;
1203
1442
  });
1204
1443
  }
1205
- function r(h, f) {
1206
- d.value = d.value.map((x) => (x.uuid === f.uuid && (x.width = h), x));
1444
+ function v(m, i) {
1445
+ u.value = u.value.map((w) => (w.uuid === i.uuid && (w.width = m), w));
1207
1446
  }
1208
- function B(h) {
1209
- if (h.length <= 0) {
1210
- d.value = [];
1447
+ function C(m) {
1448
+ if (m.length <= 0) {
1449
+ u.value = [];
1211
1450
  return;
1212
1451
  }
1213
- Le(F(h), re(d.value)) || (d.value = F(h));
1452
+ qe($(m), ce(u.value)) || (u.value = $(m));
1214
1453
  }
1215
1454
  return {
1216
1455
  breakpoint: l,
1217
- proColumns: m,
1218
- setColumns: B,
1219
- resizeColumnWidth: r
1456
+ proColumns: b,
1457
+ setColumns: C,
1458
+ resizeColumnWidth: v
1220
1459
  };
1221
1460
  }
1222
- function kl(e, a) {
1223
- const l = C(() => a), n = I(), o = I(e);
1224
- function i() {
1225
- n.value && (clearTimeout(n.value), n.value = null);
1461
+ function fa(e, n) {
1462
+ const l = T(() => n), a = x(), o = x(e);
1463
+ function r() {
1464
+ a.value && (clearTimeout(a.value), a.value = null);
1226
1465
  }
1227
- async function d(...m) {
1228
- return l.value === 0 || l.value === void 0 ? o.value(...m) : (i(), new Promise(async (p) => {
1229
- m[0]?.immediate ? p(await o.value(...m)) : n.value = setTimeout(async () => {
1230
- p(await o.value(...m));
1466
+ async function u(...b) {
1467
+ return l.value === 0 || l.value === void 0 ? o.value(...b) : (r(), new Promise(async (f) => {
1468
+ b[0]?.immediate ? f(await o.value(...b)) : a.value = setTimeout(async () => {
1469
+ f(await o.value(...b));
1231
1470
  }, l.value);
1232
1471
  }));
1233
1472
  }
1234
- return Kt(i), {
1235
- cancel: i,
1236
- run: d
1473
+ return il(r), {
1474
+ cancel: r,
1475
+ run: u
1237
1476
  };
1238
1477
  }
1239
- function Hl(e) {
1240
- const a = C(() => e.rowKey), l = C(() => e.polling), n = C(() => e.debounceTime), o = C(() => e.dataSource), i = C(() => e.autoRequest);
1478
+ function va(e) {
1479
+ const n = T(() => e.rowKey), l = T(() => e.polling), a = T(() => e.debounceTime), o = T(() => e.dataSource), r = T(() => e.autoRequest);
1241
1480
  return {
1242
- rowKey: a,
1481
+ rowKey: n,
1243
1482
  polling: l,
1244
1483
  request: e.request,
1245
1484
  postData: e.postData,
1246
- debounceTime: n,
1485
+ debounceTime: a,
1247
1486
  dataSource: o,
1248
- autoRequest: i
1487
+ autoRequest: r
1249
1488
  };
1250
1489
  }
1251
- function ql({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, dataSource: i, waitRequest: d, debounceTime: m }, { params: p, columns: F, setLoading: r, setColumns: B, removeRowKeys: h, syncSelectedRows: f, defaultFormSearch: x, setPagination: b, pageInfo: j, onRequestError: oe, onBeforeSearchSubmit: te, hasCustomRender: $e }, pe) {
1252
- const le = I(""), A = I(!1), me = I(!1), Y = I([]), G = I(), U = I(null), ne = ($ = !1) => {
1253
- (A.value || $) && r(!1), y(!1);
1254
- }, be = async ($ = {}) => {
1255
- const { pagination: N, filters: D = {}, sorter: k = {}, removeKeys: ue = [], isPolling: Z = !1, extra: ce } = $;
1256
- if (!n || !ze(n))
1257
- return i.value || [];
1258
- Z ? y(!0) : r(!0), N && b(N);
1490
+ function ma({ rowKey: e, autoRequest: n, polling: l, request: a, postData: o, dataSource: r, waitRequest: u, debounceTime: b }, { params: f, columns: $, setLoading: v, setColumns: C, removeRowKeys: m, syncSelectedRows: i, defaultFormSearch: w, setPagination: h, pageInfo: O, onRequestError: I, onBeforeSearchSubmit: B, hasCustomRender: N }, L) {
1491
+ const K = x(""), k = x(!1), H = x(!1), A = x([]), X = x(), E = x(null), W = (t = !1) => {
1492
+ (k.value || t) && v(!1), de(!1);
1493
+ }, Y = async (t = {}) => {
1494
+ const { pagination: s = {}, filters: y = {}, sorter: g = {}, removeKeys: S = [], isPolling: c = !1, extra: fe } = t;
1495
+ if (!a || !Me(a))
1496
+ return r.value || [];
1497
+ c ? de(!0) : v(!0), s && h(s);
1259
1498
  try {
1260
- ue.length && h(ue);
1261
- const H = Q(k) ? Object.keys(k).length ? [k] : [] : k;
1262
- B(T(F).map((Ce) => {
1263
- const xe = H.find((ve) => (ve?.columnKey || ve?.field) === Ce.dataIndex);
1499
+ S.length && m(S);
1500
+ const U = ne(g) ? Object.keys(g).length ? [g] : [] : g;
1501
+ C(F($).map((Se) => {
1502
+ const xe = U.find((ie) => (ie?.columnKey || ie?.field) === Se.dataIndex);
1264
1503
  return {
1265
- ...Ce,
1504
+ ...Se,
1266
1505
  sortOrder: xe?.order
1267
1506
  };
1268
1507
  }));
1269
- let ye = {
1270
- ...re(j),
1271
- current: Ut(re(j), ue.length),
1272
- ...T(x),
1273
- ...T(p),
1274
- ...$.params
1508
+ let Fe = {
1509
+ ...ce(O),
1510
+ current: fl(ce(O), S.length),
1511
+ ...F(w),
1512
+ ...F(f),
1513
+ ...t.params
1275
1514
  };
1276
- te && ze(te) && (ye = await te({
1277
- params: ye,
1278
- sorter: H,
1279
- filter: D,
1280
- extra: ce
1515
+ B && Me(B) && (Fe = await B({
1516
+ params: Fe,
1517
+ sorter: U,
1518
+ filter: y,
1519
+ extra: fe
1281
1520
  }));
1282
- let de = [];
1283
- const Be = `table_request_${gt().uuid(10)}`;
1284
- le.value = Be;
1285
- const ie = await n?.({
1286
- params: ee(re(ye)),
1287
- sorter: H,
1288
- filter: D,
1289
- extra: ce
1521
+ let ve = [];
1522
+ const ue = `table_request_${Rt().uuid(10)}`;
1523
+ K.value = ue;
1524
+ const Ie = await a?.({
1525
+ params: ae(ce(Fe)),
1526
+ sorter: U,
1527
+ filter: y,
1528
+ extra: fe
1290
1529
  });
1291
- if (le.value !== Be)
1530
+ if (K.value !== ue)
1292
1531
  return [];
1293
- if (ie) {
1294
- const { success: Ce = !0, data: xe = [] } = ie;
1295
- if (!Ce)
1532
+ if (Ie) {
1533
+ const { success: Se = !0, data: xe = [] } = Ie;
1534
+ if (!Se)
1296
1535
  return [];
1297
- de = typeof o == "function" ? await o?.(xe) : xe, f(de);
1298
- const ve = ie.total || de?.length || 0;
1299
- ve !== j.total && b({
1300
- total: ve
1536
+ ve = typeof o == "function" ? await o?.(xe) : xe, i(ve);
1537
+ const ie = Ie.total || ve?.length || 0;
1538
+ ie !== O.total && h({
1539
+ total: ie
1301
1540
  });
1302
- const he = T(Y).map((Me) => Ie(Me, "sortIndex"));
1303
- return Le(de, he) ? T(Y) : (R(de), de);
1541
+ const Ke = F(A).map((ke) => ze(ke, "sortIndex"));
1542
+ return qe(ve, Ke) ? F(A) : (oe(ve), ve);
1304
1543
  } else
1305
1544
  return [];
1306
- } catch (H) {
1307
- if (oe === void 0)
1308
- throw new Error(H);
1309
- Y.value === void 0 && R([]), oe(H);
1545
+ } catch (U) {
1546
+ if (I === void 0)
1547
+ throw new Error(U);
1548
+ A.value === void 0 && oe([]), I(U);
1310
1549
  } finally {
1311
- ne(!0);
1550
+ W(!0);
1312
1551
  }
1313
1552
  return [];
1314
- }, J = kl(async ($ = {}) => {
1315
- if (G.value && clearTimeout(G.value), !n)
1553
+ }, M = fa(async (t = {}) => {
1554
+ if (X.value && clearTimeout(X.value), !a)
1316
1555
  return;
1317
- const N = new AbortController();
1318
- U.value = N;
1556
+ const s = new AbortController();
1557
+ E.value = s;
1319
1558
  try {
1320
- const D = await Promise.race([
1321
- be($),
1322
- new Promise((ue, Z) => {
1323
- U.value?.signal?.addEventListener?.("abort", () => {
1324
- Z("aborted"), J.cancel(), ne();
1559
+ const y = await Promise.race([
1560
+ Y(t),
1561
+ new Promise((S, c) => {
1562
+ E.value?.signal?.addEventListener?.("abort", () => {
1563
+ c("aborted"), M.cancel(), W();
1325
1564
  });
1326
1565
  })
1327
1566
  ]);
1328
- if (N.signal.aborted)
1567
+ if (s.signal.aborted)
1329
1568
  return;
1330
- const k = _t(l.value, D);
1331
- return k && !A.value && (G.value = setTimeout(() => {
1332
- J.run({ ...$, isPolling: k });
1333
- }, Math.max(k, 2e3))), D;
1334
- } catch (D) {
1335
- if (D === "aborted")
1569
+ const g = cl(l.value, y);
1570
+ return g && !k.value && (X.value = setTimeout(() => {
1571
+ M.run({ ...t, isPolling: g });
1572
+ }, Math.max(g, 2e3))), y;
1573
+ } catch (y) {
1574
+ if (y === "aborted")
1336
1575
  return;
1337
- throw D;
1576
+ throw y;
1338
1577
  }
1339
- }, m.value || 30), q = () => {
1340
- U.value?.abort(), J.cancel(), ne();
1578
+ }, b.value || 30), ee = () => {
1579
+ E.value?.abort(), M.cancel(), W();
1341
1580
  };
1342
- jt(() => {
1343
- A.value = !1;
1344
- }), ct(() => {
1345
- A.value = !1;
1346
- }), Nt(() => {
1347
- q(), A.value = !0, clearTimeout(G.value);
1348
- }), Yt(() => {
1349
- q(), A.value = !0, clearTimeout(G.value);
1350
- }), z(() => l.value, () => {
1351
- d.value || (l.value ? J.run({ isPolling: !0 }) : clearTimeout(G.value));
1352
- }, { immediate: !0 }), z(() => d.value, () => {
1353
- d.value ? r(!0) : J.run({ isPolling: !1 });
1354
- }, { immediate: !0 }), z(() => i.value, () => {
1355
- i.value && R(i.value || []);
1356
- }, { deep: !0, immediate: !0 }), z(() => p.value, () => {
1357
- d.value || a.value && (b({ current: 1 }), se());
1358
- }, { deep: !0, immediate: !0 }), z(() => x.value, ($, N) => {
1359
- d.value || Le($, N) || (b({ current: 1 }), se());
1581
+ at(() => {
1582
+ k.value = !1;
1583
+ }), yt(() => {
1584
+ k.value = !1;
1585
+ }), Ct(() => {
1586
+ ee(), k.value = !0, clearTimeout(X.value);
1587
+ }), St(() => {
1588
+ ee(), k.value = !0, clearTimeout(X.value);
1589
+ }), q(() => l.value, () => {
1590
+ u.value || (l.value ? M.run({ isPolling: !0 }) : clearTimeout(X.value));
1591
+ }, { immediate: !0 }), q(() => u.value, () => {
1592
+ u.value ? v(!0) : M.run({ isPolling: !1 });
1593
+ }, { immediate: !0 }), q(() => r.value, () => {
1594
+ r.value && oe(r.value || []);
1595
+ }, { deep: !0, immediate: !0 }), q(() => f.value, () => {
1596
+ u.value || n.value && (h({ current: 1 }), se());
1597
+ }, { deep: !0, immediate: !0 }), q(() => w.value, (t, s) => {
1598
+ u.value || qe(t, s) || (h({ current: 1 }), se());
1360
1599
  }, { deep: !0, immediate: !0 });
1361
1600
  function se() {
1362
- n ? l.value || (q(), J.run({ isPolling: !1 })) : R(i.value || []);
1601
+ a ? l.value || (ee(), M.run({ isPolling: !1 })) : oe(r.value || []);
1363
1602
  }
1364
- const t = C(() => {
1365
- if ($e.value)
1366
- return T(Y);
1367
- const $ = F.value.filter((N) => N.show || N.show === void 0);
1368
- return !T(Y) || !$ || $.length === 0 ? [] : T(Y);
1369
- }), u = C(() => T(Y).some(($) => K($.children) && $.children.length > 0));
1370
- function y($) {
1371
- me.value = $;
1603
+ const re = T(() => {
1604
+ if (N.value)
1605
+ return F(A);
1606
+ const t = $.value.filter((s) => s.show || s.show === void 0);
1607
+ return !F(A) || !t || t.length === 0 ? [] : F(A);
1608
+ }), be = T(() => F(A).some((t) => J(t.children) && t.children.length > 0));
1609
+ function de(t) {
1610
+ H.value = t;
1372
1611
  }
1373
- function g($, N = {}, D = {}, k) {
1374
- q(), J.run({ pagination: $, filters: N, sorter: D, extra: k, isPolling: !1 });
1612
+ function Re(t, s = {}, y = {}, g) {
1613
+ ee(), M.run({ pagination: t, filters: s, sorter: y, extra: g, isPolling: !1 });
1375
1614
  }
1376
- function R($) {
1377
- const N = Qt(ee($), re(j));
1378
- if (Y.value = N, !n || !ze(n)) {
1379
- const D = N.length || 0;
1380
- D !== j.total && b({
1381
- total: D
1615
+ function oe(t) {
1616
+ const s = dl(ae(t), ce(O));
1617
+ if (A.value = s, !a || !Me(a)) {
1618
+ const y = s.length || 0;
1619
+ y !== O.total && h({
1620
+ total: y
1382
1621
  });
1383
1622
  }
1384
1623
  }
1385
1624
  return {
1386
- dataSource: t,
1387
- isTreeDataRef: u,
1388
- setTableDataList: R,
1389
- operateTableDataRow: ($) => {
1390
- const { key: N, row: D, value: k, type: ue = "update" } = $, Z = N ?? e.value, ce = D?.[Z] ?? k;
1391
- switch (!D && ue !== "delete" && console.warn("row is required"), ue) {
1625
+ dataSource: re,
1626
+ isTreeDataRef: be,
1627
+ setTableDataList: oe,
1628
+ operateTableDataRow: (t) => {
1629
+ const { key: s, row: y, value: g, type: S = "update" } = t, c = s ?? e.value, fe = y?.[c] ?? g;
1630
+ switch (!y && S !== "delete" && console.warn("row is required"), S) {
1392
1631
  case "update":
1393
- Z && ce && D && (Y.value = Y.value.map((H) => ce === H[Z] ? Se(H, D) : H));
1632
+ c && fe && y && (A.value = A.value.map((U) => fe === U[c] ? ye(U, y) : U));
1394
1633
  break;
1395
1634
  case "push":
1396
- D && Y.value.push(D);
1635
+ y && A.value.push(y);
1397
1636
  break;
1398
1637
  case "unshift":
1399
- D && Y.value.unshift(D);
1638
+ y && A.value.unshift(y);
1400
1639
  break;
1401
1640
  case "delete":
1402
- Z && (Y.value = Y.value.filter((H) => k !== H[Z]));
1641
+ c && (A.value = A.value.filter((U) => g !== U[c]));
1403
1642
  break;
1404
1643
  }
1405
1644
  },
1406
- handleTableChange: g,
1407
- run: async ($) => {
1408
- d.value || (n ? await J.run({ ...$, isPolling: !1 }) : pe("reload"));
1645
+ handleTableChange: Re,
1646
+ run: async (t) => {
1647
+ u.value || (a ? await M.run({ ...t, isPolling: !1 }) : L("reload"));
1409
1648
  }
1410
1649
  };
1411
1650
  }
1412
- function Kl(e) {
1413
- const a = I(l(e.loading.value));
1414
- z(() => e.loading.value, (o) => {
1415
- a.value = l(o, a.value);
1651
+ function ha(e) {
1652
+ const n = x(l(e.loading.value));
1653
+ q(() => e.loading.value, (o) => {
1654
+ n.value = l(o, n.value);
1416
1655
  });
1417
- function l(o, i = !1) {
1418
- return Re(o) ? o : Q(o) ? o?.spinning ?? i : i;
1656
+ function l(o, r = !1) {
1657
+ return De(o) ? o : ne(o) ? o?.spinning ?? r : r;
1419
1658
  }
1420
- function n(o) {
1421
- a.value = o;
1659
+ function a(o) {
1660
+ n.value = o;
1422
1661
  }
1423
- return [a, n];
1662
+ return [n, a];
1424
1663
  }
1425
- const Ge = {
1664
+ const Ye = {
1426
1665
  current: 1,
1427
1666
  pageSize: 10,
1428
1667
  size: "default",
@@ -1430,879 +1669,1067 @@ const Ge = {
1430
1669
  showSizeChanger: !0,
1431
1670
  pageSizeOptions: ["10", "20", "50", "100"]
1432
1671
  };
1433
- function Vl({
1672
+ function ga({
1434
1673
  pagination: e,
1435
- pageItemRender: a
1674
+ pageItemRender: n
1436
1675
  }) {
1437
- const l = I({
1438
- ...Ge
1439
- }), n = Ue(Ee(Ge, ["current", "pageSize", "total"]));
1440
- z(() => e.value, () => {
1676
+ const l = x({
1677
+ ...Ye
1678
+ }), a = lt({
1679
+ current: Ye.current,
1680
+ pageSize: Ye.pageSize,
1681
+ total: 0
1682
+ });
1683
+ q(() => e.value, () => {
1441
1684
  if (e.value === !1) {
1442
1685
  l.value = !1;
1443
1686
  return;
1444
1687
  }
1445
- const i = ze(a) ? {
1688
+ const r = Me(n) ? {
1446
1689
  itemRender: ({
1447
- page: m,
1448
- type: p,
1449
- originalElement: F
1450
- }) => a ? a({
1451
- page: m,
1452
- type: p,
1453
- originalElement: F
1690
+ page: b,
1691
+ type: f,
1692
+ originalElement: $
1693
+ }) => n ? n({
1694
+ page: b,
1695
+ type: f,
1696
+ originalElement: $
1454
1697
  }) : null
1455
- } : null, d = {
1456
- ...Ge,
1698
+ } : null, u = {
1699
+ ...Ye,
1457
1700
  ...e.value || {},
1458
- ...i || {}
1701
+ ...r || {}
1459
1702
  };
1460
- e.value?.showTotal || (d.showTotal = (m) => `共${m < d.pageSize ? 1 : Math.ceil(m / (d.pageSize || 10))}页 ${m}条记录`), l.value = d, Object.assign(n, Ee(d, ["current", "pageSize", "total"]));
1703
+ e.value?.showTotal || (u.showTotal = (b) => `共${b < u.pageSize ? 1 : Math.ceil(b / (u.pageSize || 10))}页 ${b}条记录`), l.value = ae(u), vl(a, (b) => {
1704
+ Ce(u[b]) && (a[b] = u[b]);
1705
+ });
1461
1706
  }, {
1462
1707
  deep: 1,
1463
1708
  immediate: !0
1464
1709
  });
1465
- function o(i) {
1466
- if (Q(l.value) && Q(i)) {
1467
- const d = {};
1468
- Object.keys(i).forEach((m) => {
1469
- Object.prototype.hasOwnProperty.call(i, m) && l.value[m] === i[m] || (d[m] = i[m]);
1470
- }), Object.keys(d).length > 0 && (Object.assign(l.value, d), Gl(d) && Object.assign(n, d));
1471
- }
1710
+ function o(r) {
1711
+ l.value = ye(F(l), r);
1712
+ for (const u in a)
1713
+ r[u] && Ce(r[u]) && (a[u] = r[u]);
1472
1714
  }
1473
1715
  return {
1474
1716
  paginationInfo: l,
1475
- requestPagination: n,
1717
+ requestPagination: a,
1476
1718
  setPagination: o
1477
1719
  };
1478
1720
  }
1479
- function Gl(e) {
1480
- if (typeof e != "object" || e === null)
1481
- return !1;
1482
- const a = Object.keys(e);
1483
- return a.length === 2 && a.includes("pageNum") && a.includes("pageSize");
1484
- }
1485
- function Xl(e, a) {
1486
- const l = I([]), n = I([]);
1487
- z(() => a.value?.selectedRows, (r) => {
1488
- n.value = ee(r || []);
1721
+ function ba(e, n) {
1722
+ const l = x([]), a = x([]);
1723
+ q(() => n.value?.selectedRows, (v) => {
1724
+ a.value = ae(v || []);
1489
1725
  }, {
1490
1726
  deep: !0,
1491
1727
  immediate: !0
1492
- }), z(() => a.value?.selectedRowKeys, (r) => {
1493
- l.value = Jt([...r || []]);
1728
+ }), q(() => n.value?.selectedRowKeys, (v) => {
1729
+ l.value = ml([...v || []]);
1494
1730
  }, {
1495
1731
  deep: !0,
1496
1732
  immediate: !0
1497
1733
  });
1498
- const o = (r, B) => {
1499
- const h = a.value?.type || "checkbox";
1500
- e.value && (B ? r?.[e.value] && h === "checkbox" ? (l.value.push(r[e.value]), n.value.push(r)) : (l.value = [r[e.value]], n.value = [r]) : (l.value = l.value.filter((f) => f !== r[e.value]), n.value = n.value.filter((f) => f[e.value] !== r[e.value])));
1501
- }, i = () => {
1502
- a.value && a.value?.onChange?.(l.value, n.value);
1734
+ const o = (v, C) => {
1735
+ const m = n.value?.type || "checkbox";
1736
+ e.value && (C ? v?.[e.value] && m === "checkbox" ? (l.value.push(v[e.value]), a.value.push(v)) : (l.value = [v[e.value]], a.value = [v]) : (l.value = l.value.filter((i) => i !== v[e.value]), a.value = a.value.filter((i) => i[e.value] !== v[e.value])));
1737
+ }, r = () => {
1738
+ n.value && n.value?.onChange?.(l.value, a.value);
1503
1739
  };
1504
1740
  return {
1505
1741
  selectedKeys: l,
1506
- selectedItems: n,
1742
+ selectedItems: a,
1507
1743
  selectRowKey: o,
1508
- selectAllRowKey: (r, B, h) => {
1509
- e.value && (r ? B.map((f) => (l.value.every((x) => x !== f?.[e.value]) && f?.[e.value] && (l.value.push(f[e.value]), n.value.push(f)), f)) : h.map((f) => (l.value.includes(f?.[e.value]) && (l.value = l.value.filter((x) => x !== f[e.value]), n.value = n.value.filter((x) => x[e.value] !== f[e.value])), f)));
1744
+ selectAllRowKey: (v, C, m) => {
1745
+ e.value && (v ? C.map((i) => (l.value.every((w) => w !== i?.[e.value]) && i?.[e.value] && (l.value.push(i[e.value]), a.value.push(i)), i)) : m.map((i) => (l.value.includes(i?.[e.value]) && (l.value = l.value.filter((w) => w !== i[e.value]), a.value = a.value.filter((w) => w[e.value] !== i[e.value])), i)));
1510
1746
  },
1511
- removeRowKeys: (r) => {
1512
- l.value = l.value.filter((B) => !r.includes(B)), n.value = n.value.filter((B) => !r.includes(B?.[e.value || ""])), i();
1747
+ removeRowKeys: (v) => {
1748
+ l.value = l.value.filter((C) => !v.includes(C)), a.value = a.value.filter((C) => !v.includes(C?.[e.value || ""])), r();
1513
1749
  },
1514
- changeRowKey: i,
1515
- syncSelectedRows: (r) => {
1516
- if (e.value && l.value.length !== n.value.length) {
1517
- const B = n.value.map((f) => f[e.value]), h = l.value.filter((f) => !B.includes(f));
1518
- r.forEach((f) => {
1519
- h.includes(f[e.value]) && n.value.push(ee(f));
1750
+ changeRowKey: r,
1751
+ syncSelectedRows: (v) => {
1752
+ if (e.value && l.value.length !== a.value.length) {
1753
+ const C = a.value.map((i) => i[e.value]), m = l.value.filter((i) => !C.includes(i));
1754
+ v.forEach((i) => {
1755
+ m.includes(i[e.value]) && a.value.push(ae(i));
1520
1756
  });
1521
1757
  }
1522
1758
  },
1523
1759
  clearAllRowKeys: () => {
1524
- l.value = [], n.value = [], i();
1760
+ l.value = [], a.value = [], r();
1525
1761
  }
1526
1762
  };
1527
1763
  }
1528
- function _l(e) {
1529
- const a = {};
1764
+ function pa(e) {
1765
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !le(e);
1766
+ }
1767
+ function ya(e, n, l, a) {
1768
+ if (!n) return e;
1769
+ let o = e;
1770
+ if (ne(n)) {
1771
+ const r = n.node === "a" ? "span" : n.node;
1772
+ return d(r, Q(n?.attr || {}, {
1773
+ class: n.class,
1774
+ onClick: n.click
1775
+ }), pa(e) ? e : {
1776
+ default: () => [e]
1777
+ });
1778
+ }
1779
+ switch (n) {
1780
+ case "link":
1781
+ o = d("span", {
1782
+ class: [`${l}-a`, a]
1783
+ }, [e]);
1784
+ break;
1785
+ case "time":
1786
+ o = Z(e).format("HH:mm:ss");
1787
+ break;
1788
+ case "dateMonth":
1789
+ o = `${Z(e).month() + 1}月`;
1790
+ break;
1791
+ case "date":
1792
+ o = Z(e).format("YYYY-MM-DD");
1793
+ break;
1794
+ case "dateTime":
1795
+ o = Z(e).format("YYYY-MM-DD HH:mm:ss");
1796
+ break;
1797
+ }
1798
+ return o;
1799
+ }
1800
+ function Ca(e, n) {
1801
+ const l = n && n.current || 1, a = n && n.pageSize || 10;
1802
+ return e.filter((o, r) => r < l * a && r >= a * (l - 1));
1803
+ }
1804
+ function Sa(e) {
1805
+ const n = document.createElement("textarea");
1806
+ n.style.position = "absolute", n.style.opacity = "0", n.value = e, document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n);
1807
+ }
1808
+ function Be(e, n) {
1809
+ let l = null, a = null;
1810
+ function o() {
1811
+ l && l.disconnect(), a && a.disconnect();
1812
+ }
1813
+ function r(f) {
1814
+ f && (l = new ResizeObserver(() => {
1815
+ n(f);
1816
+ }), l.observe(f), n(f));
1817
+ }
1818
+ function u() {
1819
+ return typeof e == "string" ? document.querySelector(e) : e();
1820
+ }
1821
+ const b = u();
1822
+ return b ? (r(b), o) : (a = new MutationObserver(() => {
1823
+ const f = u();
1824
+ f && (a.disconnect(), r(f));
1825
+ }), a.observe(document.body, {
1826
+ childList: !0,
1827
+ subtree: !0
1828
+ }), o);
1829
+ }
1830
+ function xa({ fitPage: e, hashId: n, scroll: l, baseClassName: a }) {
1831
+ const o = x(), r = x(), u = x(), b = x(), f = x(), $ = x(), v = x(0);
1832
+ let C, m, i, w;
1833
+ sl(() => {
1834
+ C = Be(() => r.value?.querySelector(".ant-pagination"), (H) => {
1835
+ H && (u.value = H);
1836
+ }), i = Be(() => r.value?.querySelector(".ant-table-header"), (H) => {
1837
+ H && (b.value = H);
1838
+ }), w = Be(() => r.value?.querySelector(".ant-table-body>table"), (H) => {
1839
+ H && ($.value = H);
1840
+ });
1841
+ }), q(() => l.value, (H) => {
1842
+ m && m(), H.y ? m = Be(() => r.value?.querySelector(".ant-table-body"), (A) => {
1843
+ A && (f.value = A);
1844
+ }) : H.x && (m = Be(() => r.value?.querySelector(".ant-table-content"), (A) => {
1845
+ A && (f.value = A);
1846
+ }));
1847
+ }, { immediate: !0 });
1848
+ const { height: h } = He(r), { height: O } = He(b), { height: I } = He($), { height: B } = He(u), N = T(() => !r.value || !e.value ? 0 : h.value - O.value - v.value - B.value), L = T(() => N.value && e.value ? I.value <= N.value : !1);
1849
+ q([
1850
+ () => f.value,
1851
+ () => N.value
1852
+ ], () => {
1853
+ f.value && e.value && f.value.setAttribute("style", `height: ${N.value}px;`);
1854
+ }), wl(f, {
1855
+ onScroll: () => {
1856
+ f.value && o.value?.handleScroll(f.value);
1857
+ }
1858
+ });
1859
+ const K = () => {
1860
+ o.value?.update();
1861
+ };
1862
+ $l(f, K), at(() => {
1863
+ nt(() => {
1864
+ K();
1865
+ });
1866
+ }), Ut(() => K());
1867
+ function k() {
1868
+ C && C(), m && m(), i && i(), w && w();
1869
+ }
1870
+ return Ct(() => {
1871
+ k();
1872
+ }), St(() => {
1873
+ k && k();
1874
+ }), Ul({
1875
+ className: `${a}-scroll`,
1876
+ hashId: n,
1877
+ tableHeaderHeight: O,
1878
+ scrollbarElement: r,
1879
+ wrapElement: f
1880
+ }), {
1881
+ barRef: o,
1882
+ tableCardEl: r,
1883
+ tableScrollEl: f,
1884
+ tableOverHidden: L,
1885
+ tableScrollYHeight: N,
1886
+ tableListToolsHeight: v
1887
+ };
1888
+ }
1889
+ function Ta(e) {
1890
+ const n = {};
1530
1891
  return e.forEach((l) => {
1531
- let n = l.initialValue;
1532
- const o = ["select", "number"], i = ["date", "time", "dateRange"], d = ["treeSelect", "numberRange"];
1533
- l.valueType ? !n && o.includes(l.valueType) ? n = void 0 : !n && i.includes(l.valueType) ? n = null : !n && d.includes(l.valueType) ? n = [] : n || (n = "") : n || (n = ""), l.name === "dateRange" ? (a[l.rangeStartName || "start"] = n ? n[0] : null, a[l.rangeEndName || "end"] = n ? n[1] : null) : l.name && (a[l.name] = n);
1534
- }), a;
1892
+ let a = l.initialValue;
1893
+ const o = ["select", "number"], r = ["date", "time", "dateRange"], u = ["treeSelect", "numberRange"];
1894
+ l.valueType ? !a && o.includes(l.valueType) ? a = void 0 : !a && r.includes(l.valueType) ? a = null : !a && u.includes(l.valueType) ? a = [] : a || (a = "") : a || (a = ""), l.name === "dateRange" ? (n[l.rangeStartName || "start"] = a ? a[0] : null, n[l.rangeEndName || "end"] = a ? a[1] : null) : l.name && (n[l.name] = a);
1895
+ }), n;
1535
1896
  }
1536
- function Ql({ searchMap: e, columns: a }) {
1537
- const l = I([]), n = I({});
1538
- function o(i) {
1539
- i.forEach((m) => {
1540
- l.value.some((p) => p.name === m.name) ? l.value = l.value.map((p) => p.name === m.name ? { ...p, ...m } : p) : l.value.push(m);
1897
+ function wa({ searchMap: e, columns: n }) {
1898
+ const l = x([]), a = x({});
1899
+ function o(r) {
1900
+ r.forEach((b) => {
1901
+ l.value.some((f) => f.name === b.name) ? l.value = l.value.map((f) => f.name === b.name ? { ...f, ...b } : f) : l.value.push(b);
1541
1902
  });
1542
- const d = _l(i);
1543
- n.value = { ...n.value, ...d };
1903
+ const u = Ta(r);
1904
+ a.value = { ...a.value, ...u };
1544
1905
  }
1545
- return z(() => e.value, () => {
1546
- const i = [];
1547
- e.value?.forEach((d) => i.push(d)), o(i);
1548
- }, { deep: !0, immediate: !0 }), z(() => a.value, () => {
1549
- const i = [];
1550
- a.value && a.value?.length && a.value.forEach((d) => {
1551
- d.searchConfig && i.push(d.searchConfig);
1552
- }), o(i);
1553
- }, { deep: !0, immediate: !0 }), { formCols: l, defaultFormSearch: n };
1906
+ return q(() => e.value, () => {
1907
+ const r = [];
1908
+ e.value?.forEach((u) => r.push(u)), o(r);
1909
+ }, { deep: !0, immediate: !0 }), q(() => n.value, () => {
1910
+ const r = [];
1911
+ n.value && n.value?.length && n.value.forEach((u) => {
1912
+ u.searchConfig && r.push(u.searchConfig);
1913
+ }), o(r);
1914
+ }, { deep: !0, immediate: !0 }), { formCols: l, defaultFormSearch: a };
1554
1915
  }
1555
- function Ul({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: o, rowSelection: i, screens: d, innerWidth: m, scrollBreakpoint: p }) {
1556
- const F = C(() => p.value ? De(p.value) ? m.value > p.value : pt(p.value) ? d.value?.[p.value] : d.value?.xl : d.value?.xl), r = C(() => {
1557
- let h = 0;
1558
- const f = T(i) ? 60 : 0, x = 150, b = ee(T(a));
1559
- b.forEach((te) => {
1560
- h += Number.parseInt(String(te.width)) || 0;
1916
+ function $a({ scroll: e, columns: n, autoScroll: l, modalScroll: a, neverScroll: o, rowSelection: r, screens: u, innerWidth: b, scrollBreakpoint: f }) {
1917
+ const $ = T(() => f.value ? Ce(f.value) ? b.value > f.value : Pt(f.value) ? u.value?.[f.value] : u.value?.xl : u.value?.xl), v = T(() => {
1918
+ let m = 0;
1919
+ const i = F(r) ? 60 : 0, w = 150, h = ae(F(n));
1920
+ h.forEach((B) => {
1921
+ m += Number.parseInt(String(B.width)) || 0;
1561
1922
  });
1562
- const oe = b.filter((te) => !Reflect.has(te, "width")).length;
1563
- return oe !== 0 && (h += oe * x), f && (h += f), h;
1923
+ const I = h.filter((B) => !Reflect.has(B, "width")).length;
1924
+ return I !== 0 && (m += I * w), i && (m += i), m;
1564
1925
  });
1565
- return { proScroll: C(() => o.value ? {} : e.value && ht(e.value).length ? T(e) : n.value ? {
1566
- y: e.value?.y || (d.value?.xl ? 400 : 235)
1567
- } : l.value ? F.value ? {} : Re(F.value) ? { x: r.value } : {} : {}), breakpoint: F };
1926
+ return { proScroll: T(() => o.value ? {} : e.value && $t(e.value).length ? F(e) : a.value ? {
1927
+ y: e.value?.y || (u.value?.xl ? 400 : 235)
1928
+ } : l.value ? $.value ? {} : De($.value) ? { x: v.value } : {} : {}), breakpoint: $ };
1568
1929
  }
1569
- function Jl(e) {
1570
- const a = I(e.size.value || "middle");
1571
- z(() => e.size.value, (n) => a.value = n);
1572
- function l(n) {
1573
- a.value = n || a.value;
1930
+ function Ra(e) {
1931
+ const n = x(e.size.value || "middle");
1932
+ q(() => e.size.value, (a) => n.value = a);
1933
+ function l(a) {
1934
+ n.value = a || n.value;
1574
1935
  }
1575
- return [a, l];
1936
+ return [n, l];
1576
1937
  }
1577
- const Xe = (e) => ({
1938
+ const Pa = (e) => ({
1939
+ [e.componentCls]: {
1940
+ [`${e.componentCls}-list`]: {
1941
+ clear: "both",
1942
+ maxWidth: "100%",
1943
+ [`${e.componentCls}-pagination${e.antCls}-pagination`]: {
1944
+ marginTop: e.margin
1945
+ },
1946
+ [`${e.componentCls}-pagination`]: {
1947
+ display: "flex",
1948
+ flexWrap: "wrap",
1949
+ rowGap: e.paddingXS,
1950
+ "> *": {
1951
+ flex: "none"
1952
+ },
1953
+ "&-left": {
1954
+ justifyContent: "flex-start"
1955
+ },
1956
+ "&-center": {
1957
+ justifyContent: "center"
1958
+ },
1959
+ "&-right": {
1960
+ justifyContent: "flex-end"
1961
+ }
1962
+ }
1963
+ }
1964
+ }
1965
+ }), Je = () => ({
1966
+ scrollbarWidth: "none",
1578
1967
  "&::-webkit-scrollbar": {
1579
- width: 4,
1580
- height: 4
1581
- },
1582
- "&::-webkit-scrollbar-thumb": {
1583
- backgroundColor: "rgba(144,147,153,0.3)",
1584
- borderRadius: e.borderRadiusSM
1585
- },
1586
- "&::-webkit-scrollbar-track": {
1587
- backgroundColor: "rgba(144,147,153,0.3)",
1588
- borderRadius: e.borderRadiusSM
1968
+ width: 0,
1969
+ height: 0
1589
1970
  }
1590
- }), Zl = (e) => {
1591
- const a = `${e.antCls}-table`;
1971
+ }), Fa = (e) => {
1972
+ const n = new ht(e.colorText).setAlpha(0.2).toRgbString(), l = new ht(e.colorText).setAlpha(0.4).toRgbString();
1592
1973
  return {
1593
1974
  [e.componentCls]: {
1594
- "&-header-after": {
1595
- marginBlockEnd: e.margin
1596
- },
1597
- "&-a": {
1598
- cursor: "pointer",
1599
- color: e.colorPrimary,
1600
- "&:hover": {
1601
- color: e.colorPrimaryHover
1602
- }
1975
+ [`${e.antCls}-table-container`]: {
1976
+ position: "relative"
1603
1977
  },
1604
- [`${a}`]: {
1605
- [`${a}-cell-ellipsis`]: {
1606
- overflow: "unset",
1607
- whiteSpace: "unset"
1978
+ [`${e.componentCls}-scroll`]: {
1979
+ "&-bar": {
1980
+ position: "absolute",
1981
+ right: 2,
1982
+ bottom: 2,
1983
+ zIndex: 9999,
1984
+ borderRadius: e.borderRadius - 2,
1985
+ "&.is-vertical": {
1986
+ top: 2,
1987
+ width: 6,
1988
+ "& > div": {
1989
+ width: "100%"
1990
+ }
1991
+ },
1992
+ "&.is-horizontal": {
1993
+ left: 2,
1994
+ height: 6,
1995
+ "& > div": {
1996
+ height: "100%"
1997
+ }
1998
+ }
1999
+ },
2000
+ "&-thumb": {
2001
+ position: "relative",
2002
+ display: "block",
2003
+ width: 0,
2004
+ height: 0,
2005
+ cursor: "pointer",
2006
+ opacity: 1,
2007
+ backgroundColor: n,
2008
+ borderRadius: "inherit",
2009
+ transition: ".3s background-color",
2010
+ "&:hover": {
2011
+ opacity: 1,
2012
+ backgroundColor: l
2013
+ }
1608
2014
  }
1609
2015
  },
1610
- "&-empty-text": {
1611
- display: "flex",
1612
- flexDirection: "column",
1613
- alignItems: "center",
1614
- justifyContent: "center"
1615
- },
1616
- "&-table-tree": {
1617
- [`${e.antCls}-table-row-cell-ellipsis`]: {
2016
+ [`${e.antCls}-table-content`]: Je(),
2017
+ [`${e.antCls}-table-body`]: Je(),
2018
+ [`${e.antCls}-table-empty`]: {
2019
+ [`${e.antCls}-table-content`]: Je()
2020
+ }
2021
+ }
2022
+ };
2023
+ }, Ia = (e) => {
2024
+ const n = `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`;
2025
+ return {
2026
+ [e.componentCls]: {
2027
+ [`&${e.componentCls}-full-page`]: {
2028
+ flex: 1,
2029
+ height: "100%",
2030
+ overflow: "hidden",
2031
+ [`${e.componentCls}-content`]: {
2032
+ display: "flex",
2033
+ flexDirection: "column",
2034
+ height: "100%",
1618
2035
  overflow: "hidden",
1619
- textOverflow: "ellipsis",
1620
- whiteSpace: "nowrap",
1621
- [`${e.antCls}-table-column-title`]: {
2036
+ [`${e.componentCls}-card`]: {
2037
+ position: "relative",
2038
+ flex: 1,
1622
2039
  overflow: "hidden",
1623
- textOverflow: "ellipsis",
1624
- whiteSpace: "nowrap"
2040
+ [`${e.componentCls}-overflow-hidden`]: {
2041
+ [`${e.antCls}-table${e.antCls}-table-bordered>${e.antCls}-table-container`]: {
2042
+ borderBlockEnd: n,
2043
+ [`${e.antCls}-table-body`]: {
2044
+ borderInlineEnd: n
2045
+ },
2046
+ [`${e.antCls}-table-row`]: {
2047
+ [`${e.antCls}-table-cell`]: {
2048
+ "&:last-child": {
2049
+ borderRightWidth: 0
2050
+ }
2051
+ }
2052
+ }
2053
+ }
2054
+ },
2055
+ [`${e.componentCls}-list`]: {
2056
+ overflow: "auto"
2057
+ }
1625
2058
  }
1626
2059
  }
2060
+ }
2061
+ }
2062
+ };
2063
+ }, Aa = (e) => ({
2064
+ [e.componentCls]: {
2065
+ [`${e.componentCls}-card`]: {
2066
+ [`${e.antCls}-table-pagination${e.antCls}-pagination`]: {
2067
+ margin: 0,
2068
+ marginTop: e.margin
2069
+ }
2070
+ },
2071
+ [`${e.antCls}-table`]: {
2072
+ [`${e.antCls}-table-cell-ellipsis`]: {
2073
+ overflow: "unset",
2074
+ whiteSpace: "unset"
2075
+ }
2076
+ },
2077
+ "&-empty-text": {
2078
+ display: "flex",
2079
+ flexDirection: "column",
2080
+ alignItems: "center",
2081
+ justifyContent: "center",
2082
+ marginBlock: e.marginXL
2083
+ },
2084
+ "&-table-tree": {
2085
+ [`${e.antCls}-table-row-cell-ellipsis`]: {
2086
+ overflow: "hidden",
2087
+ textOverflow: "ellipsis",
2088
+ whiteSpace: "nowrap",
2089
+ [`${e.antCls}-table-column-title`]: {
2090
+ overflow: "hidden",
2091
+ textOverflow: "ellipsis",
2092
+ whiteSpace: "nowrap"
2093
+ }
2094
+ }
2095
+ },
2096
+ "&-full-screen": {
2097
+ [`${e.componentCls}-content`]: {
2098
+ height: "100% !important",
2099
+ padding: 24,
2100
+ backgroundColor: e.colorWhite,
2101
+ boxShadow: "0 4px 8px #0003, 0 6px 20px #00000030 !important"
2102
+ }
2103
+ },
2104
+ "&-no-scroll": {
2105
+ [`${e.antCls}-table`]: {
2106
+ table: {
2107
+ width: "100% !important",
2108
+ minWidth: "unset"
2109
+ }
1627
2110
  },
1628
- "&-full-screen": {
1629
- [`${e.componentCls}-content`]: {
1630
- height: "100% !important",
1631
- padding: 24,
1632
- backgroundColor: e.colorWhite,
1633
- boxShadow: "0 4px 8px #0003, 0 6px 20px #00000030 !important"
2111
+ [`${e.antCls}-table-ping-right:not(${e.antCls}-table-has-fix-right)`]: {
2112
+ [`${e.antCls}-table-container::after`]: {
2113
+ boxShadow: "none"
1634
2114
  }
1635
2115
  },
1636
- "&-no-scroll": {
1637
- [`${e.antCls}-table`]: {
1638
- table: {
1639
- width: "100% !important",
1640
- minWidth: "unset"
1641
- }
1642
- },
1643
- [`${e.antCls}-table-ping-right:not(${e.antCls}-table-has-fix-right)`]: {
1644
- [`${e.antCls}-table-container::after`]: {
1645
- boxShadow: "none"
1646
- }
1647
- },
1648
- [`${e.antCls}-table-bordered ${e.antCls}-table-fixed-left ${e.antCls}-table-thead > tr > th`]: {
1649
- "&:last-child": {
1650
- borderRight: 0
1651
- }
1652
- },
1653
- [`${e.antCls}-table-bordered ${e.antCls}-table-fixed-left ${e.antCls}-table-tbody > tr > td`]: {
1654
- "&:last-child": {
1655
- borderRight: 0
1656
- }
2116
+ [`${e.antCls}-table-bordered ${e.antCls}-table-fixed-left ${e.antCls}-table-thead > tr > th`]: {
2117
+ "&:last-child": {
2118
+ borderRight: 0
2119
+ }
2120
+ },
2121
+ [`${e.antCls}-table-bordered ${e.antCls}-table-fixed-left ${e.antCls}-table-tbody > tr > td`]: {
2122
+ "&:last-child": {
2123
+ borderRight: 0
1657
2124
  }
2125
+ }
2126
+ },
2127
+ "&-card-border": {
2128
+ paddingInline: e.paddingMD,
2129
+ paddingBlock: e.paddingMD,
2130
+ border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
2131
+ borderRadius: e.borderRadiusLG,
2132
+ backgroundColor: e.colorBgContainer,
2133
+ [`${e.antCls}-table-wrapper ${e.antCls}-table-pagination${e.antCls}-pagination`]: {
2134
+ marginBottom: 0
2135
+ }
2136
+ },
2137
+ [`${e.componentCls}-copyable`]: {
2138
+ display: "flex",
2139
+ alignItems: "center",
2140
+ [`${e.componentCls}-copyable-icon`]: {
2141
+ marginLeft: 8,
2142
+ color: e.colorPrimary,
2143
+ cursor: "pointer"
2144
+ }
2145
+ },
2146
+ [`${e.componentCls}-ellipsis`]: {
2147
+ overflow: "hidden",
2148
+ textOverflow: "ellipsis",
2149
+ display: "-webkit-box",
2150
+ "-webkit-box-orient": "vertical",
2151
+ "word-break": "break-word"
2152
+ },
2153
+ [`${e.componentCls}-action-size`]: {
2154
+ display: "inline-block"
2155
+ },
2156
+ [`${e.componentCls}-action-columns`]: {
2157
+ display: "inline-block",
2158
+ [`${e.antCls}-popover-inner-content`]: {
2159
+ padding: "8px 0 8px 16px"
2160
+ },
2161
+ [`${e.antCls}-tree ${e.antCls}-tree-switcher-noop`]: {
2162
+ display: "none"
1658
2163
  },
1659
- "&-wrapper": {
1660
- clear: "both",
1661
- maxWidth: "100%",
1662
- [`${e.componentCls}-pagination${e.antCls}-pagination`]: {
1663
- margin: `${e.margin}px 0`
2164
+ [`${e.antCls}-tree > ${e.antCls}-tree-treenode`]: {
2165
+ width: "100%",
2166
+ alignItems: "center",
2167
+ "&:first-child": {
2168
+ paddingTop: 0
1664
2169
  },
1665
- [`${e.componentCls}-pagination`]: {
1666
- display: "flex",
1667
- flexWrap: "wrap",
1668
- rowGap: e.paddingXS,
1669
- "> *": {
1670
- flex: "none"
1671
- },
1672
- "&-left": {
1673
- justifyContent: "flex-start"
1674
- },
1675
- "&-center": {
1676
- justifyContent: "center"
1677
- },
1678
- "&-right": {
1679
- justifyContent: "flex-end"
2170
+ "&:last-child": {
2171
+ paddingBottom: 4
2172
+ },
2173
+ "&:hover": {
2174
+ backgroundColor: "#e6f7ff",
2175
+ [`${e.componentCls}-action-columns-list-item-actions`]: {
2176
+ display: "block"
1680
2177
  }
1681
2178
  }
1682
2179
  },
1683
- "&-card-border": {
1684
- paddingInline: e.paddingMD,
1685
- paddingBlock: e.paddingMD,
1686
- border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
1687
- borderRadius: e.borderRadiusLG,
1688
- backgroundColor: e.colorBgContainer,
1689
- [`${e.antCls}-table-wrapper ${e.antCls}-table-pagination${e.antCls}-pagination`]: {
1690
- marginBottom: 0
2180
+ [`${e.antCls}-tree ${e.antCls}-tree-node-content-wrapper`]: {
2181
+ flex: "1",
2182
+ "&:hover": {
2183
+ backgroundColor: "transparent"
1691
2184
  }
1692
2185
  },
1693
- [`${e.componentCls}-copyable`]: {
2186
+ "&-popover-title": {
1694
2187
  display: "flex",
1695
2188
  alignItems: "center",
1696
- [`${e.componentCls}-copyable-icon`]: {
1697
- marginLeft: 8,
1698
- color: e.colorPrimary,
1699
- cursor: "pointer"
2189
+ justifyContent: "space-between",
2190
+ "&-check": {
2191
+ marginRight: 8
2192
+ },
2193
+ [`${e.antCls}-btn-sm`]: {
2194
+ padding: 0
1700
2195
  }
1701
2196
  },
1702
- [`${e.componentCls}-ellipsis`]: {
1703
- overflow: "hidden",
1704
- textOverflow: "ellipsis",
1705
- display: "-webkit-box",
1706
- "-webkit-box-orient": "vertical",
1707
- "word-break": "break-word"
1708
- },
1709
- [`${e.componentCls}-action-size`]: {
1710
- display: "inline-block"
2197
+ "&-list-group": {
2198
+ marginTop: 6,
2199
+ marginBottom: 6,
2200
+ fontSize: 12,
2201
+ color: "rgba(0, 0, 0, 0.45)"
1711
2202
  },
1712
- [`${e.componentCls}-action-columns`]: {
1713
- display: "inline-block",
1714
- [`${e.antCls}-popover-inner-content`]: {
1715
- padding: "8px 0 8px 16px"
1716
- },
1717
- [`${e.antCls}-tree ${e.antCls}-tree-switcher-noop`]: {
1718
- display: "none"
1719
- },
1720
- [`${e.antCls}-tree > ${e.antCls}-tree-treenode`]: {
1721
- width: "100%",
1722
- alignItems: "center",
1723
- "&:first-child": {
1724
- paddingTop: 0
1725
- },
1726
- "&:last-child": {
1727
- paddingBottom: 4
2203
+ "$-list-item": {
2204
+ display: "flex",
2205
+ alignItems: "center",
2206
+ justifyContent: "space-between",
2207
+ "&-actions": {
2208
+ display: "block",
2209
+ float: "right",
2210
+ cursor: "pointer",
2211
+ "> span + span": {
2212
+ marginLeft: 8
1728
2213
  },
1729
- "&:hover": {
1730
- backgroundColor: "#e6f7ff",
1731
- [`${e.componentCls}-action-columns-list-item-actions`]: {
1732
- display: "block"
2214
+ "&-disabled": {
2215
+ action: {
2216
+ color: "rgba(0, 0, 0, 0.25)"
1733
2217
  }
1734
- }
1735
- },
1736
- [`${e.antCls}-tree ${e.antCls}-tree-node-content-wrapper`]: {
1737
- flex: "1",
1738
- "&:hover": {
1739
- backgroundColor: "transparent"
1740
- }
1741
- },
1742
- "&-popover-title": {
1743
- display: "flex",
1744
- alignItems: "center",
1745
- justifyContent: "space-between",
1746
- "&-check": {
1747
- marginRight: 8
1748
2218
  },
1749
- [`${e.antCls}-btn-sm`]: {
1750
- padding: 0
1751
- }
1752
- },
1753
- "&-list-group": {
1754
- marginTop: 6,
1755
- marginBottom: 6,
1756
- fontSize: 12,
1757
- color: "rgba(0, 0, 0, 0.45)"
1758
- },
1759
- "$-list-item": {
1760
- display: "flex",
1761
- alignItems: "center",
1762
- justifyContent: "space-between",
1763
- "&-actions": {
1764
- display: "block",
1765
- float: "right",
1766
- cursor: "pointer",
1767
- "> span + span": {
1768
- marginLeft: 8
1769
- },
1770
- "&-disabled": {
1771
- action: {
1772
- color: "rgba(0, 0, 0, 0.25)"
1773
- }
1774
- },
1775
- anticon: {
1776
- color: e.colorPrimary
1777
- }
2219
+ anticon: {
2220
+ color: e.colorPrimary
1778
2221
  }
1779
2222
  }
1780
- },
1781
- // ant-class
1782
- [`${e.antCls}-tooltip-inner`]: {
1783
- a: {
1784
- color: e.colorWhite
1785
- }
1786
- },
1787
- [`&${e.componentCls}-beautify-scroll`]: {
1788
- [`${e.antCls}-table-content`]: Xe(e),
1789
- [`${e.antCls}-table-body`]: Xe(e),
1790
- [`${e.antCls}-table-empty`]: {
1791
- [`${e.antCls}-table-content`]: Xe(e)
1792
- }
2223
+ }
2224
+ },
2225
+ [`${e.antCls}-tooltip-inner`]: {
2226
+ a: {
2227
+ color: e.colorWhite
1793
2228
  }
1794
2229
  }
1795
- };
1796
- };
1797
- function ea(e) {
1798
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !_(e);
1799
- }
1800
- function ta(e, a, l, n) {
1801
- if (!a) return e;
1802
- let o = e;
1803
- if (Q(a)) {
1804
- const i = a.node === "a" ? "span" : a.node;
1805
- return s(i, W(a?.attr || {}, {
1806
- class: [a.class, a.node === "a" ? `${l}-a` : ""],
1807
- onClick: a.click
1808
- }), ea(e) ? e : {
1809
- default: () => [e]
1810
- });
1811
- }
1812
- switch (a) {
1813
- case "link":
1814
- o = s("span", {
1815
- class: [`${l}-a`, n]
1816
- }, [e]);
1817
- break;
1818
- case "time":
1819
- o = V(e).format("HH:mm:ss");
1820
- break;
1821
- case "dateMonth":
1822
- o = `${V(e).month() + 1}月`;
1823
- break;
1824
- case "date":
1825
- o = V(e).format("YYYY-MM-DD");
1826
- break;
1827
- case "dateTime":
1828
- o = V(e).format("YYYY-MM-DD HH:mm:ss");
1829
- break;
1830
2230
  }
1831
- return o;
1832
- }
1833
- function la(e, a) {
1834
- const l = a && a.current || 1, n = a && a.pageSize || 10;
1835
- return e.filter((o, i) => i < l * n && i >= n * (l - 1));
1836
- }
1837
- function aa(e) {
1838
- const a = document.createElement("textarea");
1839
- a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
1840
- }
1841
- function na(e) {
1842
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !_(e);
2231
+ });
2232
+ function Ba(e) {
2233
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !le(e);
1843
2234
  }
1844
- const ia = {
2235
+ const Na = Bt.PRESENTED_IMAGE_SIMPLE, za = {
1845
2236
  reload: !0,
1846
2237
  fullScreen: !0
1847
- }, oa = dl.useToken, _e = /* @__PURE__ */ we({
2238
+ }, Da = Al.useToken, Ze = /* @__PURE__ */ ge({
1848
2239
  name: "GProTable",
1849
2240
  inheritAttrs: !1,
1850
- props: ge,
2241
+ props: he,
1851
2242
  emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "columnsStateChange", "loadingChange"],
1852
2243
  slots: Object,
1853
2244
  setup(e, {
1854
- emit: a,
2245
+ emit: n,
1855
2246
  slots: l,
1856
- attrs: n,
1857
- expose: o
2247
+ expose: a
1858
2248
  }) {
1859
- const i = vt({
2249
+ const o = wt({
1860
2250
  suffixCls: "table",
1861
2251
  isPor: !0
1862
2252
  }), {
1863
- wrapSSR: d,
1864
- hashId: m
1865
- } = Je("ProBaseTable", [Zl], i), {
1866
- token: p
1867
- } = oa(), F = Gt(), r = ft(), {
1868
- width: B
1869
- } = ol(), h = I(!1), f = dt(), x = I(), b = I(), j = I(e.waitRequest);
1870
- zt(() => j.value = e.waitRequest);
2253
+ wrapSSR: r,
2254
+ hashId: u
2255
+ } = it("ProBaseTable", [Aa, Fa, Ia, Pa], o), {
2256
+ token: b
2257
+ } = Da(), f = rl(), $ = ot(), {
2258
+ width: v
2259
+ } = Rl(), C = x(!1), m = xt(), i = x(), w = x(), h = x(e.waitRequest);
2260
+ pt(() => h.value = e.waitRequest);
1871
2261
  const {
1872
- toggle: oe,
1873
- isFullscreen: te
1874
- } = bt(x), $e = C(() => !r.value.xl), pe = C(() => (e.virtualScroll && pl(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), le = C(() => {
2262
+ toggle: O,
2263
+ isFullscreen: I
2264
+ } = Ft(i), B = T(() => !$.value.xl), N = T(() => (e.virtualScroll && El(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), L = T(() => {
1875
2265
  if (e.form === !1) return !1;
1876
- const v = {
2266
+ const p = {
1877
2267
  actions: {
1878
2268
  resetReload: !0
1879
2269
  },
1880
2270
  resetText: "重置",
1881
2271
  searchText: "查询"
1882
2272
  };
1883
- return Q(e.form) ? Se(v, e.form) : v;
1884
- }), A = C(() => le.value === !1 ? {} : le.value), me = C(() => A.value?.autoRequest ?? e.autoRequest), Y = C(() => A.value?.actions), G = C(() => {
1885
- const v = e.columns.filter((w) => w.key || w.dataIndex).map((w) => {
1886
- const S = w.key || w.dataIndex;
1887
- return w.key = S, w.dataIndex = S, w.align = w.align || e.align, w.uuid = w.uuid || gt().uuid(15), w;
2273
+ return ne(e.form) ? ye(p, e.form) : p;
2274
+ }), K = T(() => L.value === !1 ? {} : L.value), k = T(() => K.value?.autoRequest ?? e.autoRequest), H = T(() => K.value?.actions), A = T(() => {
2275
+ const p = e.columns.filter((R) => R.key || R.dataIndex).map((R) => {
2276
+ const P = R.key || R.dataIndex;
2277
+ return R.key = P, R.dataIndex = P, R.align = R.align || e.align, R.uuid = R.uuid || Rt().uuid(15), R;
1888
2278
  });
1889
- return Zt(v, {
2279
+ return hl(p, {
1890
2280
  align: e.align || "left",
1891
2281
  showIndex: e.showIndex ?? !1
1892
2282
  });
1893
- }), [U, ne] = Kl({
1894
- loading: M(e, "loading")
1895
- }), [be, J] = Jl({
1896
- size: M(e, "size")
2283
+ }), [X, E] = ha({
2284
+ loading: V(e, "loading")
2285
+ }), [W, Y] = Ra({
2286
+ size: V(e, "size")
1897
2287
  }), {
1898
- paginationInfo: q,
1899
- requestPagination: se,
1900
- setPagination: t
1901
- } = Vl({
1902
- pagination: M(e, "pagination"),
1903
- pageItemRender: it({
2288
+ paginationInfo: M,
2289
+ requestPagination: ee,
2290
+ setPagination: se
2291
+ } = ga({
2292
+ pagination: V(e, "pagination"),
2293
+ pageItemRender: ft({
1904
2294
  slots: l,
1905
2295
  props: e,
1906
2296
  key: "pageItemRender"
1907
2297
  })
1908
2298
  }), {
1909
- proScroll: u,
1910
- breakpoint: y
1911
- } = Ul({
1912
- scroll: M(e, "scroll"),
1913
- autoScroll: M(e, "autoScroll"),
1914
- modalScroll: M(e, "modalScroll"),
1915
- neverScroll: M(e, "neverScroll"),
1916
- rowSelection: M(e, "rowSelection"),
1917
- scrollBreakpoint: M(e, "scrollBreakpoint"),
1918
- innerWidth: B,
1919
- columns: G,
1920
- screens: r
2299
+ proScroll: re,
2300
+ breakpoint: be
2301
+ } = $a({
2302
+ scroll: V(e, "scroll"),
2303
+ autoScroll: V(e, "autoScroll"),
2304
+ modalScroll: V(e, "modalScroll"),
2305
+ neverScroll: V(e, "neverScroll"),
2306
+ rowSelection: V(e, "rowSelection"),
2307
+ scrollBreakpoint: V(e, "scrollBreakpoint"),
2308
+ innerWidth: v,
2309
+ columns: A,
2310
+ screens: $
1921
2311
  }), {
1922
- proColumns: g,
1923
- setColumns: R,
1924
- resizeColumnWidth: c
1925
- } = Wl({
1926
- draggable: M(e, "draggable"),
1927
- neverScroll: M(e, "neverScroll"),
1928
- autoScroll: M(e, "autoScroll"),
1929
- breakpoint: y,
1930
- scroll: u,
1931
- columns: G
2312
+ proColumns: de,
2313
+ setColumns: Re,
2314
+ resizeColumnWidth: oe
2315
+ } = da({
2316
+ draggable: V(e, "draggable"),
2317
+ neverScroll: V(e, "neverScroll"),
2318
+ autoScroll: V(e, "autoScroll"),
2319
+ breakpoint: be,
2320
+ scroll: re,
2321
+ columns: A
1932
2322
  }), {
1933
- formCols: $,
1934
- defaultFormSearch: N
1935
- } = Ql({
1936
- searchMap: M(e, "searchMap"),
1937
- columns: G
2323
+ formCols: Pe,
2324
+ defaultFormSearch: t
2325
+ } = wa({
2326
+ searchMap: V(e, "searchMap"),
2327
+ columns: A
1938
2328
  }), {
1939
- selectedKeys: D,
1940
- selectedItems: k,
1941
- changeRowKey: ue,
1942
- selectRowKey: Z,
1943
- selectAllRowKey: ce,
1944
- syncSelectedRows: H,
1945
- removeRowKeys: ye,
1946
- clearAllRowKeys: de
1947
- } = Xl(M(e, "rowKey"), M(e, "rowSelection")), Be = Hl(e), {
1948
- run: ie,
1949
- setTableDataList: Ce,
1950
- operateTableDataRow: xe,
1951
- isTreeDataRef: ve,
1952
- dataSource: he,
1953
- handleTableChange: Me
1954
- } = ql({
1955
- ...Be,
1956
- waitRequest: j
2329
+ selectedKeys: s,
2330
+ selectedItems: y,
2331
+ changeRowKey: g,
2332
+ selectRowKey: S,
2333
+ selectAllRowKey: c,
2334
+ syncSelectedRows: fe,
2335
+ removeRowKeys: U,
2336
+ clearAllRowKeys: Fe
2337
+ } = ba(V(e, "rowKey"), V(e, "rowSelection")), ve = va(e), {
2338
+ run: ue,
2339
+ setTableDataList: Ie,
2340
+ operateTableDataRow: Se,
2341
+ isTreeDataRef: xe,
2342
+ dataSource: ie,
2343
+ handleTableChange: Ke
2344
+ } = ma({
2345
+ ...ve,
2346
+ waitRequest: h
1957
2347
  }, {
1958
- loading: U,
1959
- pageInfo: se,
1960
- setPagination: t,
1961
- removeRowKeys: ye,
1962
- syncSelectedRows: H,
1963
- setLoading: ne,
1964
- setColumns: R,
1965
- columns: g,
1966
- defaultFormSearch: N,
1967
- params: M(e, "params"),
2348
+ loading: X,
2349
+ pageInfo: ee,
2350
+ setPagination: se,
2351
+ removeRowKeys: U,
2352
+ syncSelectedRows: fe,
2353
+ setLoading: E,
2354
+ setColumns: Re,
2355
+ columns: de,
2356
+ defaultFormSearch: t,
2357
+ params: V(e, "params"),
1968
2358
  onRequestError: e.onRequestError,
1969
2359
  onBeforeSearchSubmit: e.onBeforeSearchSubmit,
1970
- hasCustomRender: C(() => qe(e.customRender || l?.customRender))
1971
- }, a), Rt = C(() => ({
1972
- size: T(be),
1973
- scroll: T(u),
1974
- dataSource: T(he),
1975
- pagination: T(q),
1976
- virtualScroll: pe.value,
1977
- columns: T(g).filter((v) => v.show || v.show === void 0)
1978
- })), et = C(() => {
1979
- const v = Q(e.loading) ? Ie(e.loading, "spinning") : {};
1980
- return !v.indicator && f?.indicator?.value && (v.indicator = f?.indicator?.value), {
1981
- spinning: e.showLoading ? qe(U.value) : !1,
1982
- ...v
2360
+ hasCustomRender: T(() => Ge(e.customRender || l?.customRender))
2361
+ }, n), {
2362
+ tableCardEl: ke,
2363
+ tableScrollYHeight: Oe,
2364
+ tableListToolsHeight: jt,
2365
+ tableScrollEl: rt,
2366
+ tableOverHidden: Ht,
2367
+ barRef: Wt
2368
+ } = xa({
2369
+ hashId: u,
2370
+ scroll: re,
2371
+ baseClassName: o,
2372
+ fitPage: V(e, "fitPage")
2373
+ }), Yt = T(() => {
2374
+ const p = Oe.value && e.fitPage ? {
2375
+ y: Oe.value
2376
+ } : {};
2377
+ return {
2378
+ size: F(W),
2379
+ scroll: {
2380
+ ...F(re),
2381
+ ...p
2382
+ },
2383
+ dataSource: F(ie),
2384
+ pagination: F(M),
2385
+ virtualScroll: N.value,
2386
+ columns: F(de).filter((R) => R.show || R.show === void 0)
1983
2387
  };
1984
- }), tt = C(() => {
1985
- let v;
1986
- const w = e.direction === "rtl" ? "bottomLeft" : "right", S = T(q)?.position;
1987
- if (S !== null && Array.isArray(S)) {
1988
- const P = S.find((X) => X.includes("top")), O = S.find((X) => X.includes("bottom")), E = S.every((X) => `${X}` == "none");
1989
- !P && !O && !E && (v = w), P && (v = P.toLowerCase().replace("top", "")), O && (v = O.toLowerCase().replace("bottom", ""));
2388
+ }), ut = T(() => {
2389
+ const p = ne(e.loading) ? ze(e.loading, "spinning") : {};
2390
+ return !p.indicator && m?.indicator?.value && (p.indicator = m?.indicator?.value), {
2391
+ spinning: e.showLoading ? Ge(X.value) : !1,
2392
+ ...p
2393
+ };
2394
+ }), Mt = T(() => {
2395
+ let p;
2396
+ const R = e.direction === "rtl" ? "bottomLeft" : "right", P = F(M)?.position;
2397
+ if (P !== null && Array.isArray(P)) {
2398
+ const z = P.find((te) => te.includes("top")), j = P.find((te) => te.includes("bottom")), _ = P.every((te) => `${te}` == "none");
2399
+ !z && !j && !_ && (p = R), z && (p = z.toLowerCase().replace("top", "")), j && (p = j.toLowerCase().replace("bottom", ""));
1990
2400
  } else
1991
- v = w;
1992
- return v;
2401
+ p = R;
2402
+ return p;
1993
2403
  });
1994
- Ml(() => {
1995
- h.value && e.keepAliveReload ? ie() : h.value = !0;
2404
+ ca(() => {
2405
+ C.value ? e.keepAliveReload && ue({
2406
+ params: e.params
2407
+ }) : C.value = !0;
1996
2408
  });
1997
- const $t = async (v, w) => {
1998
- if (me.value) {
1999
- ie({
2000
- params: v
2409
+ const qt = async (p, R) => {
2410
+ if (k.value) {
2411
+ ue({
2412
+ params: p
2001
2413
  });
2002
2414
  return;
2003
2415
  }
2004
- w === "reset" ? (a("reset", v), e.request && Y.value?.resetReload && ie({
2005
- params: v
2006
- })) : e.request && (a("submit", v), ie({
2007
- params: v
2416
+ R === "reset" ? (n("reset", p), e.request && H.value?.resetReload && ue({
2417
+ params: p
2418
+ })) : e.request && (n("submit", p), ue({
2419
+ params: p
2008
2420
  }));
2009
- }, We = (v, w, S, P) => {
2010
- t(Ee(v, ["current", "pageSize"])), Me(v, w, S, P), a("change", v, w, S, P);
2011
- }, Pt = (v) => {
2012
- a("expandedRowsChange", v);
2013
- }, Ft = (v, w) => {
2014
- a("expand", v, w);
2015
- }, Dt = (v, w) => c(v, w), It = (v, w, S) => {
2016
- let P = v;
2017
- if (w) {
2018
- const O = K(v) ? typeof v?.[0]?.children == "string" ? v?.[0]?.children : "" : v ? v.toString() : "", E = S.tooltip === !1 ? {} : S.tooltip, X = S.tooltip === !1 ? 1 : De(E?.hiddenLine) && E?.hiddenLine > 0 ? E?.hiddenLine : 1, L = S.tooltip === !1 ? 0 : De(E?.width) ? E?.width : 0, Ae = S.tooltip !== !1 && pt(O) && L > 0 ? ll(O, {
2421
+ }, Ve = (p, R, P, z) => {
2422
+ Ke(p, R, P, z), n("change", p, R, P, z);
2423
+ }, Kt = (p) => {
2424
+ n("expandedRowsChange", p);
2425
+ }, kt = (p, R) => {
2426
+ n("expand", p, R);
2427
+ }, Vt = (p, R) => oe(p, R), Xt = (p, R, P) => {
2428
+ let z = p;
2429
+ if (R) {
2430
+ const j = J(p) ? typeof p?.[0]?.children == "string" ? p?.[0]?.children : "" : p ? p.toString() : "", _ = P.tooltip === !1 ? {} : P.tooltip, te = P.tooltip === !1 ? 1 : Ce(_?.hiddenLine) && _?.hiddenLine > 0 ? _?.hiddenLine : 1, G = P.tooltip === !1 ? 0 : Ce(_?.width) ? _?.width : 0, Ee = P.tooltip !== !1 && Pt(j) && G > 0 ? pl(j, {
2019
2431
  cssObject: {
2020
2432
  fontSize: "14px",
2021
2433
  lineHeight: "22px",
2022
- fontFamily: F?.token?.value?.fontFamily || p?.value?.fontFamily,
2023
- ...E?.targetStyle || {}
2434
+ fontFamily: f?.token?.value?.fontFamily || b?.value?.fontFamily,
2435
+ ..._?.targetStyle || {}
2024
2436
  }
2025
- }) : 0, Oe = document.querySelector(`.${i} .ant-table-tbody`), je = s("div", {
2026
- class: `${i}-ellipsis-text`
2027
- }, [v]), at = () => S.tooltip === !1 || Q(S.tooltip) && Ae < L && L > 0 ? je : s(Te, W({
2028
- title: v,
2029
- getPopupContainer: (ke) => Oe ?? ke?.parentNode?.parentNode
2030
- }, Q(S.tooltip) ? S.tooltip : {}, {
2437
+ }) : 0, Le = document.querySelector(`.${o} .ant-table-tbody`), je = d("div", {
2438
+ class: `${o}-ellipsis-text`
2439
+ }, [p]), dt = () => P.tooltip === !1 || ne(P.tooltip) && Ee < G && G > 0 ? je : d($e, Q({
2440
+ title: p,
2441
+ getPopupContainer: (Xe) => Le ?? Xe?.parentNode?.parentNode
2442
+ }, ne(P.tooltip) ? P.tooltip : {}, {
2031
2443
  destroyTooltipOnHide: !0
2032
- }), na(je) ? je : {
2444
+ }), Ba(je) ? je : {
2033
2445
  default: () => [je]
2034
2446
  });
2035
- if (P = s("div", {
2036
- class: `${i}-ellipsis ${E?.class ?? ""}`,
2447
+ if (z = d("div", {
2448
+ class: D(`${o}-ellipsis`, _?.class),
2037
2449
  style: {
2038
- "-webkit-line-clamp": X
2450
+ "-webkit-line-clamp": te
2039
2451
  }
2040
- }, [at()]), S.copyable) {
2041
- const ke = typeof S.copyText == "function" ? S.copyText?.(S) : S.copyText || O;
2042
- P = s("div", {
2043
- class: `${i}-copyable`
2044
- }, [s("div", {
2045
- class: `${i}-ellipsis ${E?.class ?? ""}`,
2452
+ }, [dt()]), P.copyable) {
2453
+ const Xe = typeof P.copyText == "function" ? P.copyText?.(P) : P.copyText || j;
2454
+ z = d("div", {
2455
+ class: `${o}-copyable`
2456
+ }, [d("div", {
2457
+ class: D(`${o}-ellipsis`, _?.class),
2046
2458
  style: {
2047
- "-webkit-line-clamp": X
2459
+ "-webkit-line-clamp": te
2048
2460
  }
2049
- }, [at()]), s(qt, {
2050
- class: `${i}-copyable-icon`,
2461
+ }, [dt()]), d(ol, {
2462
+ class: `${o}-copyable-icon`,
2051
2463
  onClick: () => {
2052
- aa(ke), vl.success("复制成功");
2464
+ Sa(Xe), zl.success("复制成功");
2053
2465
  }
2054
2466
  }, null)]);
2055
2467
  }
2056
2468
  }
2057
- return P;
2469
+ return z;
2058
2470
  };
2059
- function lt() {
2060
- const v = al({
2471
+ function ct() {
2472
+ const p = yl({
2061
2473
  slots: l,
2062
2474
  props: e,
2063
2475
  key: "emptyText"
2064
2476
  });
2065
- if (v !== !1 && f?.emptyText?.value !== !1) {
2066
- const S = e.emptyTextProps?.extraProps || {}, P = v || f?.emptyText?.value, O = _(P), E = O ? st(P, S) : mt(K(P) ? P : [P]);
2067
- return s("div", {
2068
- class: ae(`${i}-empty-text`, m.value, e.emptyTextProps?.class),
2477
+ if (p !== !1 && m?.emptyText?.value !== !1) {
2478
+ const P = e.emptyTextProps?.extraProps || {}, z = p || m?.emptyText?.value, j = le(z), _ = j ? bt(z, P) : Tt(J(z) ? z : [z]);
2479
+ return d("div", {
2480
+ class: D(`${o}-empty-text`, u.value, e.emptyTextProps?.class),
2069
2481
  style: e.emptyTextProps?.style
2070
- }, [O ? E : K(E) ? E.map((X) => Qe(X, S)) : s(hl, null, null)]);
2482
+ }, [j ? _ : J(_) && _.length ? _.map((te) => tt(te, P)) : d(Bt, {
2483
+ image: Na
2484
+ }, null)]);
2071
2485
  }
2072
2486
  return null;
2073
2487
  }
2074
- const Bt = () => {
2075
- const v = it({
2488
+ const _t = () => {
2489
+ const p = ft({
2076
2490
  slots: l,
2077
2491
  props: e,
2078
2492
  key: "customRender"
2079
2493
  });
2080
- if (v) {
2081
- if (he.value?.length) {
2082
- const w = ee(T(he));
2083
- return v?.({
2084
- dataSource: w,
2085
- currentData: la(w, q.value)
2494
+ if (p) {
2495
+ if (ie.value?.length) {
2496
+ const R = ae(F(ie));
2497
+ return p?.({
2498
+ dataSource: R,
2499
+ currentData: Ca(R, M.value)
2086
2500
  });
2087
2501
  }
2088
- return lt();
2502
+ return ct();
2089
2503
  }
2090
- return s(Ye, null, null);
2504
+ return d(we, null, null);
2091
2505
  };
2092
- return yl({
2093
- tableSize: be,
2094
- columns: g,
2095
- cacheColumns: G,
2096
- isMobile: $e,
2097
- formConfig: A,
2098
- formAutoRequest: me,
2099
- formActions: Y,
2506
+ return jl({
2507
+ tableSize: W,
2508
+ columns: de,
2509
+ cacheColumns: A,
2510
+ isMobile: B,
2511
+ formConfig: K,
2512
+ formAutoRequest: k,
2513
+ formActions: H,
2514
+ screenWidth: v,
2515
+ tableListToolsHeight: jt,
2516
+ styles: V(e, "styles"),
2517
+ classNames: V(e, "classNames"),
2100
2518
  action: {
2101
- setTableSize: J,
2102
- reload: (v) => ie(v),
2103
- toggle: oe
2519
+ setTableSize: Y,
2520
+ reload: (p) => ue(p),
2521
+ toggle: O
2104
2522
  },
2105
- setPagination: t
2106
- }), o({
2523
+ setPagination: se
2524
+ }), a({
2107
2525
  formRef: () => ({
2108
2526
  getFormSearch: () => ({
2109
- ...T(N),
2110
- ...b.value?.getFormSearch(),
2527
+ ...F(t),
2528
+ ...w.value?.getFormSearch(),
2111
2529
  ...e.params
2112
2530
  }),
2113
- getFormInnerState: () => b.value?.getFormSearch() || {},
2114
- restFormState: (v) => {
2115
- j.value = !0, v && v?.(), b.value?.resetForm(!1), j.value = !1;
2531
+ getFormInnerState: () => w.value?.getFormSearch() || {},
2532
+ restFormState: (p) => {
2533
+ h.value = !0, p && p?.(), w.value?.resetForm(!1), h.value = !1;
2116
2534
  }
2117
2535
  }),
2118
2536
  actionRef: () => ({
2119
- loading: U,
2120
- dataSource: he,
2121
- pageInfo: se,
2122
- pagination: q.value,
2123
- selectedKeys: C(() => D.value),
2124
- selectedItems: C(() => k.value),
2537
+ loading: X,
2538
+ dataSource: ie,
2539
+ pageInfo: ee,
2540
+ pagination: M.value,
2541
+ selectedKeys: T(() => s.value),
2542
+ selectedItems: T(() => y.value),
2125
2543
  rowsSelection: {
2126
- clear: de,
2127
- select: Z,
2128
- remove: ye,
2129
- sync: H,
2130
- selectAll: ce
2544
+ clear: Fe,
2545
+ select: S,
2546
+ remove: U,
2547
+ sync: fe,
2548
+ selectAll: c
2131
2549
  },
2132
- reload: ie,
2133
- getLoadingStatus: () => T(U),
2134
- reloadAndReset: async (v) => {
2135
- j.value = !0, t({
2550
+ reload: ue,
2551
+ getLoadingStatus: () => F(X),
2552
+ reloadAndReset: async (p) => {
2553
+ h.value = !0, se({
2136
2554
  current: 1,
2137
- pageSize: se?.pageSize || 10
2138
- }), v && v?.callBack && (v.wait ? await v.callBack() : v.callBack()), b.value?.resetForm(!0), j.value = !1;
2555
+ pageSize: ee?.pageSize || 10
2556
+ }), p && p?.callBack && (p.wait ? await p.callBack() : p.callBack()), w.value?.resetForm(!0), h.value = !1;
2139
2557
  },
2140
- setPageInfo: We,
2141
- setTableDataList: Ce,
2142
- setPagination: t,
2143
- operateTableDataRow: xe,
2144
- setLoading: ne
2558
+ setPageInfo: Ve,
2559
+ setTableDataList: Ie,
2560
+ setPagination: se,
2561
+ operateTableDataRow: Se,
2562
+ setLoading: E
2145
2563
  })
2146
2564
  }), () => {
2147
- const v = qe(e.customRender || l.customRender), w = l.actions?.() || e.actionProps?.actions, S = el({
2565
+ const p = Ge(e.customRender || l.customRender), R = l.actions?.() || e.actionProps?.actions, P = gl({
2148
2566
  slots: l,
2149
2567
  props: e,
2150
- keys: ["headerTitle", "headerTitleTip", "headerAfter"],
2568
+ keys: ["headerTitle", "headerTitleTip", "listToolAfter"],
2151
2569
  render: !0
2152
2570
  });
2153
- return d(s("div", {
2154
- ref: x,
2155
- class: ae([{
2156
- [`${m.value}`]: !0,
2157
- [`${i}`]: !0,
2158
- [`${n.class}`]: n.class,
2159
- [`${i}-beautify-scroll`]: Re(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
2160
- [`${i}-no-scroll`]: !Object.keys(T(u) || {}).length,
2161
- [`${i}-table-tree`]: ve.value,
2162
- [`${i}-full-screen`]: te.value
2571
+ return r(d("div", {
2572
+ ref: i,
2573
+ class: D(o, u.value, e.class, e.classNames?.root, [{
2574
+ [`${o}-no-scroll`]: !Object.keys(F(re) || {}).length,
2575
+ [`${o}-table-tree`]: xe.value,
2576
+ [`${o}-full-page`]: e.fitPage,
2577
+ [`${o}-full-screen`]: I.value
2163
2578
  }]),
2164
- style: n.style
2165
- }, [s("div", {
2166
- class: [`${i}-content`, m.value]
2167
- }, [($.value.length > 0 || !!l.form) && e.form !== !1 && s(Al, {
2168
- ref: b,
2579
+ style: {
2580
+ ...e.style,
2581
+ ...e.styles?.root || {}
2582
+ }
2583
+ }, [d("div", {
2584
+ class: D(`${o}-content`, u.value, e.classNames?.content),
2585
+ style: e.styles?.content
2586
+ }, [(Pe.value.length > 0 || !!l.form) && e.form !== !1 && d(Ql, {
2587
+ ref: w,
2169
2588
  modalScroll: e.modalScroll,
2170
2589
  cardBordered: e.cardBordered,
2171
- formCols: $.value,
2172
- prefixCls: i,
2173
- loading: T(U),
2174
- onSearch: $t,
2175
- defaultFormSearch: N.value
2590
+ formCols: Pe.value,
2591
+ prefixCls: o,
2592
+ loading: F(X),
2593
+ onSearch: qt,
2594
+ defaultFormSearch: t.value
2176
2595
  }, {
2177
2596
  default: l.form ? () => l.form?.() : null
2178
- }), s("div", {
2179
- class: ae(m.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
2180
- }, [s(Ll, {
2597
+ }), d("div", {
2598
+ ref: ke,
2599
+ class: D(e.classNames?.card, u.value, `${o}-card`, e.cardBordered && `${o}-card-border`),
2600
+ style: e.styles?.card
2601
+ }, [d(ra, {
2181
2602
  options: e.options ? {
2182
- ...ia,
2183
- ...Q(e.options) ? e.options : {}
2603
+ ...za,
2604
+ ...ne(e.options) ? e.options : {}
2184
2605
  } : !1,
2185
2606
  titleTipText: e.titleTipText,
2186
2607
  actionsPlacement: e.actionProps?.placement,
2187
- actionsRender: w,
2188
- headerTitle: S.headerTitle,
2189
- headerTitleTip: S.headerTitleTip
2190
- }, null), S.headerAfter && s("div", {
2191
- class: `${i}-header-after ${m.value}`
2192
- }, [S.headerAfter]), v ? s(Ct, et.value, {
2193
- default: () => [s("div", {
2194
- class: `${i}-wrapper ${m.value}`
2195
- }, [s("div", {
2196
- class: ae(`${i}-list`, m.value, e.tableProps?.class),
2197
- style: e.tableProps?.style
2198
- }, [Bt()]), e.pagination !== !1 && he.value?.length > 0 && s(fl, W({
2199
- class: {
2200
- [`${i}-pagination ${m.value}`]: !0,
2201
- [`${i}-pagination-${tt.value} ${m.value}`]: !!tt.value
2608
+ actionsRender: R,
2609
+ headerTitle: P.headerTitle,
2610
+ listToolAfter: P.listToolAfter,
2611
+ headerTitleTip: P.headerTitleTip
2612
+ }, null), p ? d(At, ut.value, {
2613
+ default: () => [d("div", {
2614
+ class: D(`${o}-list ${u.value}`, e.classNames?.list),
2615
+ style: e.styles?.list
2616
+ }, [d("div", {
2617
+ class: D(`${o}-list-content`, u.value, e.classNames?.listContent),
2618
+ style: {
2619
+ ...e.styles?.listContent || {},
2620
+ height: Oe.value ? pe(Oe.value) : e.styles?.listContent?.height
2202
2621
  }
2203
- }, re(T(q)), {
2204
- onChange: (P, O) => We({
2205
- current: P,
2206
- pageSize: O
2622
+ }, [_t()]), e.pagination !== !1 && ie.value?.length > 0 && d(Bl, Q(ce(F(M)), {
2623
+ class: D(u.value, `${o}-pagination`, `${o}-pagination-${Mt.value}`, e.classNames?.pagination),
2624
+ style: e.styles?.pagination,
2625
+ onChange: (z, j) => Ve({
2626
+ current: z,
2627
+ pageSize: j
2207
2628
  })
2208
2629
  }), null)])]
2209
- }) : s(ml, W(Ee(e, Object.keys(St)), Rt.value, {
2210
- style: e.tableProps?.style,
2211
- class: e.tableProps?.class,
2212
- loading: et.value,
2213
- rowKey: (P) => P[e.rowKey],
2214
- transformCellText: (P) => {
2215
- e.transformCellText && typeof e.transformCellText && e.transformCellText?.(P);
2630
+ }) : d(we, null, [d(Nl, Q(Dl(e, Object.keys(Dt)), Yt.value, {
2631
+ style: e.styles?.table,
2632
+ class: D(e.classNames?.table, u.value, Ht.value && `${o}-overflow-hidden`),
2633
+ loading: ut.value,
2634
+ rowKey: (z) => z[e.rowKey],
2635
+ transformCellText: (z) => {
2636
+ e.transformCellText && typeof e.transformCellText && e.transformCellText?.(z);
2216
2637
  const {
2217
- column: O
2218
- } = P;
2219
- if (!O) return P.text;
2220
- const E = O?.key || O?.dataIndex;
2221
- let X = !0, L = P.text;
2222
- if (K(L))
2223
- if (L.length === 0 || L.length === 1 && !_(L[0])) {
2224
- L = L?.[0];
2225
- const Ae = tl(L, O?.columnEmptyText || e?.columnEmptyText || "");
2226
- X = Ae.success, L = ta(Ae.value, O?.valueType || e.columns?.find((Oe) => (Oe.key || Oe.dataIndex) === E)?.valueType, i, m.value);
2227
- } else L[0]?.type === "template" && (L = L[0]?.children);
2228
- return O?.ellipsis ? It(L, X, O) : L;
2638
+ column: j
2639
+ } = z;
2640
+ if (!j) return z.text;
2641
+ const _ = j?.key || j?.dataIndex;
2642
+ let te = !0, G = z.text;
2643
+ if (J(G))
2644
+ if (G.length === 0 || G.length === 1 && !le(G[0])) {
2645
+ G = G?.[0];
2646
+ const Ee = bl(G, j?.columnEmptyText || e?.columnEmptyText || "");
2647
+ te = Ee.success, G = ya(Ee.value, j?.valueType || e.columns?.find((Le) => (Le.key || Le.dataIndex) === _)?.valueType, o, u.value);
2648
+ } else G[0]?.type === "template" && (G = G[0]?.children);
2649
+ return j?.ellipsis ? Xt(G, te, j) : G;
2229
2650
  },
2230
2651
  rowSelection: e.rowSelection ? {
2231
- ...Ie(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2232
- selectedRowKeys: D.value || [],
2233
- onSelect: Z,
2234
- onSelectAll: ce,
2235
- onChange: ue
2652
+ ...ze(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2653
+ selectedRowKeys: s.value || [],
2654
+ onSelect: S,
2655
+ onSelectAll: c,
2656
+ onChange: g
2236
2657
  } : void 0,
2237
- onChange: We,
2238
- onExpandedRowsChange: Pt,
2239
- onExpand: Ft,
2240
- onResizeColumn: (P, O) => Dt(P, O)
2658
+ onChange: Ve,
2659
+ onExpandedRowsChange: Kt,
2660
+ onExpand: kt,
2661
+ onResizeColumn: (z, j) => Vt(z, j)
2241
2662
  }), {
2242
2663
  ...l,
2243
- emptyText: () => lt()
2244
- })])])]));
2664
+ emptyText: () => ct()
2665
+ }), rt.value && !p && d(Jt, {
2666
+ to: rt.value
2667
+ }, {
2668
+ default: () => [d(la, {
2669
+ ref: Wt
2670
+ }, null)]
2671
+ })])])])]));
2245
2672
  };
2246
2673
  }
2247
2674
  });
2248
- _e.install = (e) => (e.component(_e.name, _e), e);
2249
- function Ca(e, a) {
2675
+ Ze.install = (e) => (e.component(Ze.name, Ze), e);
2676
+ function Qa(e, n) {
2250
2677
  function l() {
2251
- const r = {
2678
+ const v = {
2252
2679
  params: {},
2253
2680
  searchMap: []
2254
2681
  };
2255
- if (a?.state) {
2256
- if (He(a.state) && Q(a.state.value))
2257
- return Se(r, ee(a.state.value));
2258
- if (Q(a.state) && !He(a.state))
2259
- return Se(r, ee(a.state));
2682
+ if (n?.state) {
2683
+ if (_e(n.state) && ne(n.state.value))
2684
+ return ye(v, ae(n.state.value));
2685
+ if (ne(n.state) && !_e(n.state))
2686
+ return ye(v, ae(n.state));
2260
2687
  }
2261
- return r;
2688
+ return v;
2262
2689
  }
2263
- const n = Ue(Se(l(), {
2264
- request: a?.request
2690
+ const a = lt(ye(l(), {
2691
+ request: n?.request
2265
2692
  }));
2266
- a?.state && z(() => a.state && He(a.state) ? a.state.value : a.state, () => {
2267
- p();
2693
+ n?.state && q(() => n.state && _e(n.state) ? n.state.value : n.state, () => {
2694
+ f();
2268
2695
  }, { deep: !0 });
2269
- const o = C(() => e.value ? e.value.actionRef() : {}), i = C(() => e.value ? e.value.formRef() : {}), d = C(() => ({
2696
+ const o = T(() => e.value ? e.value.actionRef() : {}), r = T(() => e.value ? e.value.formRef() : {}), u = T(() => ({
2270
2697
  ...o.value.pageInfo || {},
2271
- ...i.value.getFormSearch?.() || {}
2272
- })), m = I(!!o.value.loading?.value);
2273
- z(() => o.value.loading?.value, (r) => {
2274
- m.value = !!r;
2275
- }), z(m, (r) => {
2276
- o.value?.setLoading?.(!!r);
2698
+ ...r.value.getFormSearch?.() || {}
2699
+ })), b = x(!!o.value.loading?.value);
2700
+ q(() => o.value.loading?.value, (v) => {
2701
+ b.value = !!v;
2702
+ }), q(b, (v) => {
2703
+ o.value?.setLoading?.(!!v);
2277
2704
  });
2278
- function p() {
2279
- nl(n, l());
2705
+ function f() {
2706
+ Cl(a, l());
2280
2707
  }
2281
- function F(r, B) {
2282
- n.searchMap && (n.searchMap = ee(n.searchMap).map((h) => h.name === r ? Se(h, B) : h));
2708
+ function $(v, C) {
2709
+ a.searchMap && (a.searchMap = ae(a.searchMap).map((m) => m.name === v ? ye(m, C) : m));
2283
2710
  }
2284
2711
  return {
2285
- formRef: i,
2712
+ formRef: r,
2286
2713
  actionRef: o,
2287
- tableState: n,
2288
- requestSearch: d,
2289
- loading: m,
2290
- dataSource: C(() => o?.value?.dataSource?.value || []),
2291
- selectedKeys: C(() => o?.value?.selectedKeys?.value || []),
2292
- selectedItems: C(() => o?.value?.selectedItems?.value || []),
2714
+ tableState: a,
2715
+ requestSearch: u,
2716
+ loading: b,
2717
+ dataSource: T(() => o?.value?.dataSource?.value || []),
2718
+ selectedKeys: T(() => o?.value?.selectedKeys?.value || []),
2719
+ selectedItems: T(() => o?.value?.selectedItems?.value || []),
2293
2720
  rowsSelection: o?.value?.rowsSelection,
2294
- setTableDataList: (r) => o.value?.setTableDataList?.(r),
2295
- reloadAndReset: (r) => o.value?.reloadAndReset?.(r),
2296
- setPageInfo: (r, B, h, f) => o.value?.setPageInfo?.(r, B, h, f),
2297
- setPagination: (r) => o.value?.setPagination?.(r),
2298
- setLoading: (r) => m.value = r,
2299
- operateTableDataRow: (r) => o.value?.operateTableDataRow?.(r),
2300
- reload: (r) => o.value?.reload?.(r),
2301
- updateSearchMap: F
2721
+ setTableDataList: (v) => o.value?.setTableDataList?.(v),
2722
+ reloadAndReset: (v) => o.value?.reloadAndReset?.(v),
2723
+ setPageInfo: (v, C, m, i) => o.value?.setPageInfo?.(v, C, m, i),
2724
+ setPagination: (v) => o.value?.setPagination?.(v),
2725
+ setLoading: (v) => b.value = v,
2726
+ operateTableDataRow: (v) => o.value?.operateTableDataRow?.(v),
2727
+ reload: (v) => o.value?.reload?.(v),
2728
+ updateSearchMap: $
2302
2729
  };
2303
2730
  }
2304
2731
  export {
2305
- _e as GProTable,
2306
- ge as proTableProps,
2307
- Ca as useTable
2732
+ Ze as GProTable,
2733
+ he as proTableProps,
2734
+ Qa as useTable
2308
2735
  };