@gx-design-vue/pro-table 0.0.3 → 0.0.4-rc.1

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.
@@ -1,25 +1,25 @@
1
- import { ref as E, watchEffect as ae, computed as T, unref as c, reactive as le, watch as X, onUnmounted as Ze, onDeactivated as Tt, provide as Rt, inject as kt, defineComponent as we, createVNode as o, Fragment as Ie, mergeProps as ce, isVNode as de, nextTick as Ft, renderSlot as Dt, createTextVNode as he, cloneVNode as Ot, toRef as G, onMounted as Pt, toRaw as Oe } from "vue";
2
- import { cloneDeep as H, omit as _e } from "lodash-es";
3
- import { useFullscreen as et } from "@vueuse/core";
4
- import { Form as qe, Grid as $e, Space as te, Button as Ue, Input as Ge, TimePicker as Mt, DatePicker as tt, TreeSelect as Et, Spin as je, Select as Je, Tree as It, Tooltip as J, Popover as jt, Checkbox as Nt, Dropdown as zt, Menu as Se, Pagination as $t, Table as Bt, Typography as Yt } from "ant-design-vue";
5
- import { isBoolean as re, isFunction as xe, arrayRepeat as Kt, runFunction as Lt, handleCurrentPage as Vt, getSortIndex as Ht, handleFormDefaultValue as At, genColumnKey as nt, compareToMax as Wt, isNumber as lt, isString as _t, isArray as Qe, getRandomNumber as Ne, isObject as at, handleShowIndex as qt, hanndleField as Ut } from "@gx-design-vue/pro-utils";
6
- import { tryOnUnmounted as Gt, useMemo as pe } from "@gx-design-vue/pro-hooks";
1
+ import { ref as N, watchEffect as oe, computed as T, unref as f, reactive as ue, watch as G, onUnmounted as et, onDeactivated as Ft, onMounted as tt, provide as Dt, inject as Ot, defineComponent as we, createVNode as u, Fragment as Me, nextTick as Mt, mergeProps as _, renderSlot as Pt, createTextVNode as me, isVNode as ye, cloneVNode as Et, toRef as U, toRaw as ke } from "vue";
2
+ import { cloneDeep as H, omit as Ge } from "lodash-es";
3
+ import { useFullscreen as nt } from "@vueuse/core";
4
+ import { Form as Ue, Grid as je, Space as te, Button as Je, Input as Qe, TimePicker as Nt, DatePicker as lt, TreeSelect as It, Spin as Pe, Select as Xe, Tree as jt, Tooltip as J, Popover as zt, Checkbox as $t, Dropdown as Yt, Menu as Ce, Pagination as Bt, Table as Kt, Typography as Lt } from "ant-design-vue";
5
+ import { isBoolean as re, isFunction as xe, arrayRepeat as Vt, runFunction as Ht, handleCurrentPage as Wt, isObject as ze, getSortIndex as At, genColumnKey as at, compareToMax as _t, isNumber as ut, isString as qt, isArray as Ee, getRandomNumber as Ne, handleShowIndex as Gt, hanndleField as Ut } from "@gx-design-vue/pro-utils";
6
+ import { tryOnUnmounted as Jt, useMemo as Se } from "@gx-design-vue/pro-hooks";
7
7
  import V from "dayjs";
8
- import { UpOutlined as Jt, DownOutlined as Qt, VerticalAlignTopOutlined as Xt, VerticalAlignMiddleOutlined as Zt, VerticalAlignBottomOutlined as en, SettingOutlined as ot, FullscreenExitOutlined as tn, FullscreenOutlined as nn, ColumnHeightOutlined as ln, InfoCircleOutlined as an, ReloadOutlined as on } from "@ant-design/icons-vue";
9
- function ze() {
10
- return ze = Object.assign ? Object.assign.bind() : function(e) {
11
- for (var l = 1; l < arguments.length; l++) {
12
- var t = arguments[l];
13
- for (var n in t)
14
- Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
8
+ import { UpOutlined as Qt, DownOutlined as Xt, VerticalAlignTopOutlined as Zt, VerticalAlignMiddleOutlined as en, VerticalAlignBottomOutlined as tn, SettingOutlined as ot, FullscreenExitOutlined as nn, FullscreenOutlined as ln, ColumnHeightOutlined as an, InfoCircleOutlined as un, ReloadOutlined as on } from "@ant-design/icons-vue";
9
+ function Ie() {
10
+ return Ie = Object.assign ? Object.assign.bind() : function(e) {
11
+ for (var a = 1; a < arguments.length; a++) {
12
+ var t = arguments[a];
13
+ for (var l in t)
14
+ Object.prototype.hasOwnProperty.call(t, l) && (e[l] = t[l]);
15
15
  }
16
16
  return e;
17
- }, ze.apply(this, arguments);
17
+ }, Ie.apply(this, arguments);
18
18
  }
19
- function un(e, l) {
20
- process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(l));
19
+ function sn(e, a) {
20
+ process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(a));
21
21
  }
22
- const sn = {
22
+ const rn = {
23
23
  prefixCls: { type: String, default: void 0 },
24
24
  columns: { type: Array, default: void 0 },
25
25
  rowKey: { type: [String, Function], default: void 0 },
@@ -128,19 +128,19 @@ const sn = {
128
128
  transformCellText: {
129
129
  type: Function
130
130
  }
131
- }, Be = ({ suffixCls: e, customizePrefixCls: l, isPor: t, className: n }) => {
132
- const u = n || (t ? "gx-pro" : "gx");
133
- return l || (e ? `${u}-${e}` : u);
131
+ }, $e = ({ suffixCls: e, customizePrefixCls: a, isPor: t, className: l }) => {
132
+ const o = l || (t ? "gx-pro" : "gx");
133
+ return a || (e ? `${o}-${e}` : o);
134
134
  };
135
- function cn(e, l, t = "default") {
136
- return l[t] === !1 ? !1 : l[t] || e[t];
135
+ function it(e, a, t = "default") {
136
+ return a[t] === !1 ? !1 : a[t] || e[t];
137
137
  }
138
- function se(e, l, t = "default") {
139
- var n;
140
- return l[t] === !1 ? !1 : l[t] || ((n = e[t]) == null ? void 0 : n.call(e));
138
+ function ve(e, a, t = "default") {
139
+ var l;
140
+ return a[t] === !1 ? !1 : a[t] || ((l = e[t]) == null ? void 0 : l.call(e));
141
141
  }
142
142
  const ne = {
143
- ...sn,
143
+ ...rn,
144
144
  rowSelection: {
145
145
  type: Object,
146
146
  default: void 0
@@ -163,7 +163,7 @@ const ne = {
163
163
  polling: Number,
164
164
  debounceTime: {
165
165
  type: Number,
166
- default: 20
166
+ default: 10
167
167
  },
168
168
  search: {
169
169
  type: Object,
@@ -176,29 +176,23 @@ const ne = {
176
176
  type: Array,
177
177
  default: () => []
178
178
  },
179
- customize: {
180
- type: [Object, Function],
181
- default: () => {
182
- }
183
- },
184
- actionRef: Function,
185
- formRef: Function,
179
+ customize: [Function, Object],
186
180
  tableClassName: String,
187
181
  tableStyle: {
188
182
  type: Object
189
183
  },
190
184
  toolBarBtn: {
191
- type: [Object, Array, Function],
185
+ type: [Object, Function],
192
186
  default: () => {
193
187
  }
194
188
  },
195
189
  headerTitle: {
196
- type: [String, Object, Array, Function],
190
+ type: [Object, Function],
197
191
  default: () => {
198
192
  }
199
193
  },
200
194
  titleTip: {
201
- type: [Boolean, String, Object, Array, Function],
195
+ type: [Object, Function],
202
196
  default: () => {
203
197
  }
204
198
  },
@@ -219,7 +213,7 @@ const ne = {
219
213
  }
220
214
  },
221
215
  settingExtra: {
222
- type: [String, Function],
216
+ type: [Object, Function],
223
217
  default: () => {
224
218
  }
225
219
  },
@@ -260,61 +254,61 @@ const ne = {
260
254
  onReload: Function,
261
255
  onSubmit: Function,
262
256
  onSizeChange: Function,
263
- onLadingChange: Function,
257
+ onLoadingChange: Function,
264
258
  onRequestError: Function,
265
259
  onBeforeSearchSubmit: Function,
266
260
  onColumnsStateChange: Function
267
261
  };
268
- function rn({ emit: e, loading: l }) {
269
- const t = E(l.value);
270
- ae(() => {
271
- t.value = l.value;
262
+ function cn({ emit: e, loading: a }) {
263
+ const t = N(a.value);
264
+ oe(() => {
265
+ t.value = a.value;
272
266
  });
273
- const n = T(() => c(t) || !1);
274
- function u(v) {
275
- t.value = v, e("loadingChange", !0);
267
+ const l = T(() => f(t) || !1);
268
+ function o(i) {
269
+ t.value = i, e("loadingChange", !0);
276
270
  }
277
- return { getLoading: n, setLoading: u };
271
+ return { getLoading: l, setLoading: o };
278
272
  }
279
- function dn({ size: e, emit: l }) {
280
- const t = E("middle");
281
- ae(() => {
273
+ function dn({ size: e, emit: a }) {
274
+ const t = N("middle");
275
+ oe(() => {
282
276
  t.value = e.value;
283
277
  });
284
- function n(u) {
285
- t.value = u, l("sizeChange", !0);
278
+ function l(o) {
279
+ t.value = o, a("sizeChange", !0);
286
280
  }
287
- return { sizeRef: t, setTableSize: n };
281
+ return { sizeRef: t, setTableSize: l };
288
282
  }
289
283
  function fn({
290
284
  slots: e,
291
- props: l,
285
+ props: a,
292
286
  pagination: t
293
287
  }) {
294
- const n = le({});
295
- ae(() => {
296
- var s;
288
+ const l = ue({});
289
+ oe(() => {
290
+ var h;
297
291
  if (t.value || t.value === void 0)
298
- Object.assign(n, {
299
- ...(s = t.value) != null ? s : {}
292
+ Object.assign(l, {
293
+ ...(h = t.value) != null ? h : {}
300
294
  });
301
295
  else
302
- for (const d in n)
303
- delete n[d];
296
+ for (const d in l)
297
+ delete l[d];
304
298
  });
305
- const u = T(() => {
306
- var i;
299
+ const o = T(() => {
300
+ var r;
307
301
  if (re(t.value) && !t.value)
308
302
  return !1;
309
- const s = cn(e, c(l), "pageItemRender"), d = xe(s) ? {
303
+ const h = it(e, f(a), "pageItemRender"), d = xe(h) ? {
310
304
  itemRender: ({
311
- page: r,
312
- type: S,
313
- originalElement: f
314
- }) => s ? s({
315
- page: r,
316
- type: S,
317
- originalElement: f
305
+ page: s,
306
+ type: C,
307
+ originalElement: c
308
+ }) => h ? h({
309
+ page: s,
310
+ type: C,
311
+ originalElement: c
318
312
  }) : null
319
313
  } : null, p = {
320
314
  current: 1,
@@ -324,398 +318,416 @@ function fn({
324
318
  showSizeChanger: !0,
325
319
  pageSizeOptions: ["10", "20", "50", "100"],
326
320
  ...t.value || {},
327
- ...c(n),
321
+ ...f(l),
328
322
  ...d || {}
329
323
  };
330
- return (i = t.value) != null && i.showTotal || (p.showTotal = (r) => `\u5171${r < p.pageSize ? 1 : Math.ceil(r / p.pageSize)}\u9875 ${r}\u6761\u8BB0\u5F55`), p;
324
+ return (r = t.value) != null && r.showTotal || (p.showTotal = (s) => `\u5171${s < p.pageSize ? 1 : Math.ceil(s / p.pageSize)}\u9875 ${s}\u6761\u8BB0\u5F55`), p;
331
325
  });
332
- function v(s) {
333
- const d = c(u);
334
- Object.assign(n, {
326
+ function i(h) {
327
+ const d = f(o);
328
+ Object.assign(l, {
335
329
  ...d || {},
336
- ...s
330
+ ...h
337
331
  });
338
332
  }
339
333
  return {
340
- getPaginationInfo: u,
341
- setPagination: v
334
+ getPaginationInfo: o,
335
+ setPagination: i
342
336
  };
343
337
  }
344
- function hn(e, l) {
345
- const t = E([]), n = E([]);
346
- X(() => {
347
- var i;
348
- return (i = l.value) == null ? void 0 : i.selectedRowKeys;
349
- }, (i) => {
350
- t.value = Kt([...i || []]);
338
+ function hn(e, a) {
339
+ const t = N([]), l = N([]);
340
+ G(() => {
341
+ var r;
342
+ return (r = a.value) == null ? void 0 : r.selectedRowKeys;
343
+ }, (r) => {
344
+ t.value = Vt([...r || []]);
351
345
  }, {
352
346
  deep: !0,
353
347
  immediate: !0
354
- }), X(() => {
355
- var i;
356
- return (i = l.value) == null ? void 0 : i.defaultSelectRows;
357
- }, (i) => {
358
- i && e.value && i.forEach((r) => {
359
- n.value.every((S) => S[e.value] !== (r == null ? void 0 : r[e.value])) && n.value.push(H(r));
348
+ }), G(() => {
349
+ var r;
350
+ return (r = a.value) == null ? void 0 : r.defaultSelectRows;
351
+ }, (r) => {
352
+ r && e.value && r.forEach((s) => {
353
+ l.value.every((C) => C[e.value] !== (s == null ? void 0 : s[e.value])) && l.value.push(H(s));
360
354
  });
361
355
  }, {
362
356
  deep: !0,
363
357
  immediate: !0
364
358
  });
365
- const u = (i, r) => {
366
- e.value && (r ? i != null && i[e.value] && (t.value.push(i[e.value]), n.value.push(i)) : (t.value = t.value.filter((S) => S !== i[e.value]), n.value = n.value.filter((S) => S[e.value] !== i[e.value])));
367
- }, v = () => {
368
- l.value && l.value.onChange(t.value, n.value);
359
+ const o = (r, s) => {
360
+ e.value && (s ? r != null && r[e.value] && (t.value.push(r[e.value]), l.value.push(r)) : (t.value = t.value.filter((C) => C !== r[e.value]), l.value = l.value.filter((C) => C[e.value] !== r[e.value])));
361
+ }, i = () => {
362
+ a.value && a.value.onChange(t.value, l.value);
369
363
  };
370
364
  return {
371
365
  selectedKey: t,
372
- selectRowKey: u,
373
- selectAllRowKey: (i, r, S) => {
374
- e.value && (i ? r.map((f) => (t.value.every((m) => m !== (f == null ? void 0 : f[e.value])) && f != null && f[e.value] && (t.value.push(f[e.value]), n.value.push(f)), f)) : S.map((f) => (t.value.some((m) => m === (f == null ? void 0 : f[e.value])) && (t.value = t.value.filter((m) => m !== f[e.value]), n.value = n.value.filter((m) => m[e.value] !== f[e.value])), f)));
366
+ selectRowKey: o,
367
+ selectAllRowKey: (r, s, C) => {
368
+ e.value && (r ? s.map((c) => (t.value.every((y) => y !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (t.value.push(c[e.value]), l.value.push(c)), c)) : C.map((c) => (t.value.some((y) => y === (c == null ? void 0 : c[e.value])) && (t.value = t.value.filter((y) => y !== c[e.value]), l.value = l.value.filter((y) => y[e.value] !== c[e.value])), c)));
375
369
  },
376
- removeRowKeys: (i) => {
377
- t.value = t.value.filter((r) => !i.includes(r)), n.value = n.value.filter((r) => !i.includes(r == null ? void 0 : r[e.value || ""])), v();
370
+ removeRowKeys: (r) => {
371
+ t.value = t.value.filter((s) => !r.includes(s)), l.value = l.value.filter((s) => !r.includes(s == null ? void 0 : s[e.value || ""])), i();
378
372
  },
379
- changeRowKey: v,
380
- syncSelectedRows: (i) => {
381
- if (e.value && t.value.length !== n.value.length) {
382
- const r = n.value.map((f) => f[e.value]), S = t.value.filter((f) => !r.includes(f));
383
- i.forEach((f) => {
384
- S.includes(f[e.value]) && n.value.push(H(f));
373
+ changeRowKey: i,
374
+ syncSelectedRows: (r) => {
375
+ if (e.value && t.value.length !== l.value.length) {
376
+ const s = l.value.map((c) => c[e.value]), C = t.value.filter((c) => !s.includes(c));
377
+ r.forEach((c) => {
378
+ C.includes(c[e.value]) && l.value.push(H(c));
385
379
  });
386
380
  }
387
381
  }
388
382
  };
389
383
  }
390
- function vn(e, l) {
391
- const t = l || 0, n = E(), u = E(e);
392
- u.value = e;
393
- function v() {
394
- n.value && clearTimeout(n.value);
384
+ function vn(e, a) {
385
+ const t = a || 0, l = N(), o = N(e);
386
+ o.value = e;
387
+ function i() {
388
+ l.value && clearTimeout(l.value);
395
389
  }
396
- async function s(...d) {
390
+ async function h(...d) {
397
391
  var p;
398
- v(), n.value = (p = d[0]) != null && p.immediate ? await u.value(...d) : setTimeout(async () => {
399
- await u.value(...d);
392
+ i(), l.value = (p = d[0]) != null && p.immediate ? await o.value(...d) : setTimeout(async () => {
393
+ await o.value(...d);
400
394
  }, t);
401
395
  }
402
- return Gt(v), {
403
- cancel: v,
404
- run: s
396
+ return Jt(i), {
397
+ cancel: i,
398
+ run: h
405
399
  };
406
400
  }
407
401
  function mn(e) {
408
- const l = T(() => e.polling), t = T(() => e.request), n = T(() => e.postData), u = T(() => e.debounceTime), v = T(() => e.waitRequest), s = T(() => e.dataSource);
402
+ const a = T(() => e.polling), t = T(() => e.request), l = T(() => e.postData), o = T(() => e.debounceTime), i = T(() => e.dataSource);
409
403
  return {
410
- polling: l,
404
+ polling: a,
411
405
  request: t,
412
- postData: n,
413
- debounceTime: u,
414
- waitRequest: v,
415
- dataSource: s
406
+ postData: l,
407
+ debounceTime: o,
408
+ dataSource: i
416
409
  };
417
410
  }
418
- function gn({ polling: e, request: l, postData: t, dataSource: n, waitRequest: u, debounceTime: v }, { columns: s, getLoading: d, setLoading: p, setColumns: i, removeRowKeys: r, syncSelectedRows: S, formParamsRef: f, setPagination: m, getPaginationInfo: C, onBeforeSearchSubmit: y }, R) {
419
- const F = E(), x = E(!0), k = E(!1), I = E(!1), N = E([]), B = E(), L = vn(async (P) => {
420
- B.value && clearTimeout(B.value);
421
- const z = await j(P), Y = Lt(e.value, z);
422
- Y && !F.value && (B.value = setTimeout(() => {
423
- L.run({ ...P, isPolling: Y });
424
- }, Math.max(Y, 2e3)));
425
- }, v.value || 20);
426
- Ze(() => {
427
- F.value = !0, clearTimeout(B.value);
428
- }), Tt(() => {
429
- F.value = !0, clearTimeout(B.value);
430
- }), X(() => e.value, () => {
431
- e.value ? L.run({ isPolling: !0 }) : clearTimeout(B.value);
432
- }, { immediate: !0 }), X(() => [u.value, n.value, f], () => {
433
- l.value ? (!x.value || !e.value) && L.run({ isPolling: !1 }) : g(n.value || []);
411
+ function gn({ polling: e, request: a, postData: t, dataSource: l, waitRequest: o, debounceTime: i }, { columns: h, getLoading: d, setLoading: p, setColumns: r, removeRowKeys: s, syncSelectedRows: C, formParamsRef: c, setPagination: y, getPaginationInfo: S, onBeforeSearchSubmit: g }, x) {
412
+ const F = N(), w = N(!0), R = N(!1), M = N(!1), I = N([]), Y = N(), B = vn(async (P) => {
413
+ Y.value && clearTimeout(Y.value);
414
+ const j = await b(P), K = Ht(e.value, j);
415
+ K && !F.value && (Y.value = setTimeout(() => {
416
+ B.run({ ...P, isPolling: K });
417
+ }, Math.max(K, 2e3)));
418
+ }, i.value || 20);
419
+ et(() => {
420
+ F.value = !0, clearTimeout(Y.value);
421
+ }), Ft(() => {
422
+ F.value = !0, clearTimeout(Y.value);
423
+ }), G(() => e.value, () => {
424
+ e.value ? B.run({ isPolling: !0 }) : clearTimeout(Y.value);
425
+ }, { immediate: !0 }), G(() => [o.value, l.value, c], () => {
426
+ a.value ? (!w.value || !e.value) && B.run({ isPolling: !1 }) : L(l.value || []);
434
427
  }, {
435
428
  deep: !0,
436
429
  immediate: !0
437
430
  });
438
- const _ = T(() => {
439
- const P = c(s).filter((z) => z.show || z.show === void 0);
440
- return !c(N) || c(N).length === 0 || !P || P.length === 0 ? [] : c(N);
441
- }), a = T(() => c(N).some((P) => P.children && P.children.length > 0));
442
- function h(P) {
443
- I.value = P;
431
+ const X = T(() => {
432
+ const P = f(h).filter((j) => j.show || j.show === void 0);
433
+ return !f(I) || !P || P.length === 0 ? [] : f(I);
434
+ }), n = T(() => f(I).some((P) => P.children && P.children.length > 0));
435
+ function v(P) {
436
+ M.value = P;
444
437
  }
445
- function D(P, z, Y) {
446
- L.run({ pagination: P, filters: z, sorter: Y, isPolling: !1 }), R("change", P, z, Y);
438
+ function D(P, j, K) {
439
+ B.run({ pagination: P, filters: j, sorter: K, isPolling: !1 }), x("change", P, j, K);
447
440
  }
448
- const M = (P, z) => {
449
- g(P), m(z);
450
- }, j = async (P = {}) => {
451
- var ye, be;
452
- const { pagination: z, filters: Y, sorter: K, removeKeys: ue = [], isPolling: Re = !1 } = P;
453
- if (!c(l) || !xe(c(l)) || c(u) && d.value || k.value)
454
- return n.value || [];
455
- if (k.value = !0, !Re || c(u) || x.value ? p(!0) : h(!0), c(u)) {
456
- x.value = !1, k.value = !1;
441
+ const O = (P, j) => {
442
+ L(P), y(j);
443
+ }, b = async (P = {}) => {
444
+ var fe, pe;
445
+ const { pagination: j, filters: K = {}, sorter: le = {}, removeKeys: de = [], isPolling: be = !1 } = P;
446
+ if (!f(a) || !xe(f(a)) || f(o) && d.value || R.value)
447
+ return l.value || [];
448
+ if (R.value = !0, !be || f(o) || w.value ? p(!0) : v(!0), f(o)) {
449
+ w.value = !1, R.value = !1;
457
450
  return;
458
451
  }
459
- const { current: me = 1, pageSize: ge = 10, total: ke } = c(C) || {};
452
+ j && y(j);
460
453
  try {
461
- let Z = {};
462
- if (re(z) && !z || re(C))
463
- Z = {};
454
+ let Q = {};
455
+ if (re(j) && !j || re(S))
456
+ Q = {};
464
457
  else {
465
- const A = z || {
466
- current: me,
467
- pageSize: ge,
468
- total: ke
469
- };
470
- Z.pageNum = Vt(A, ue.length), ue.length && r(ue), Z.pageSize = ge;
458
+ const { current: z = 1, pageSize: ae = 10, total: W } = f(S) || {};
459
+ Q.pageNum = Wt({ current: z, pageSize: ae, total: W }, de.length), de.length && s(de), Q.pageSize = ae;
471
460
  }
472
- const Ce = (K == null ? void 0 : K.columnKey) || (K == null ? void 0 : K.field);
473
- K && K.order ? i(c(s).map((A) => (A.dataIndex === Ce ? A.sortOrder = K.order : A.sortOrder = null, A))) : K && i(c(s).map((A) => (A.dataIndex === Ce && (A.sortOrder = null), A)));
474
- let fe = {
475
- ...Z || {},
461
+ (ze(le) ? [le] : le).forEach((z) => {
462
+ const ae = (z == null ? void 0 : z.columnKey) || (z == null ? void 0 : z.field);
463
+ z && (z == null ? void 0 : z.order) ? r(f(h).map((W) => (W.dataIndex === ae ? W.sortOrder = z == null ? void 0 : z.order : W.sortOrder = null, W))) : z && r(f(h).map((W) => (W.dataIndex === ae && (W.sortOrder = null), W)));
464
+ });
465
+ let he = {
466
+ ...Q || {},
476
467
  ...P.params,
477
- ...f
468
+ ...c
478
469
  };
479
- y && xe(y) && (fe = await y(fe, K, Y));
480
- let W = [];
481
- const ie = await ((ye = c(l)) == null ? void 0 : ye(fe, K, Y));
482
- return k.value = !1, ie && ie.success ? (W = ie.data || [], c(t) && xe(c(t)) && (W = await ((be = c(t)) == null ? void 0 : be(W))), S(W), M(W || [], {
483
- total: ie.total || 0
484
- }), W) : [];
485
- } catch (Z) {
486
- N.value === void 0 && g([]), R("requestError", Z);
470
+ g && xe(g) && (he = await g(he, le, K));
471
+ let q = [];
472
+ const ie = await ((fe = f(a)) == null ? void 0 : fe(he, le, K));
473
+ return R.value = !1, ie && ie.success ? (q = ie.data || [], f(t) && xe(f(t)) && (q = await ((pe = f(t)) == null ? void 0 : pe(q))), C(q), O(q || [], {
474
+ total: ie.total || (q == null ? void 0 : q.length) || 0
475
+ }), q) : [];
476
+ } catch (Q) {
477
+ I.value === void 0 && L([]), x("requestError", Q);
487
478
  } finally {
488
- x.value = !1, p(!1);
479
+ w.value = !1, p(!1);
489
480
  }
490
481
  return [];
491
482
  };
492
- function g(P) {
493
- N.value = Ht(H(P), c(C.value));
483
+ function L(P) {
484
+ I.value = At(H(P), f(S.value));
494
485
  }
495
- function Te({ key: P, params: z }) {
496
- N.value = N.value.map((Y) => P && z[P] === Y[P] ? { ...Y, ...z } : Y);
486
+ function Te({ key: P, params: j }) {
487
+ I.value = I.value.map((K) => P && j[P] === K[P] ? { ...K, ...j } : K);
497
488
  }
498
489
  return {
499
- getDataSourceRef: _,
500
- isTreeDataRef: a,
501
- reSetDataList: g,
490
+ getDataSourceRef: X,
491
+ isTreeDataRef: n,
492
+ reSetDataList: L,
502
493
  changeDataValue: Te,
503
494
  handleTableChange: D,
504
495
  reload: async (P) => {
505
- c(l) ? await L.run({ ...P, isPolling: !1 }) : R("reload");
496
+ f(a) ? await B.run({ ...P, isPolling: !1 }) : x("reload");
506
497
  }
507
498
  };
508
499
  }
509
- function yn({ search: e, searchMap: l, params: t, columns: n }) {
510
- const u = le({}), v = le({}), s = E([]), d = T(() => !!e.value.showSearch);
511
- X(d.value ? [() => l.value, () => n.value] : [() => l.value, () => n.value, () => t.value], () => {
512
- const i = H(l.value);
513
- n.value && n.value.map((S) => (S.searchConfig && i.push(S.searchConfig), S)), s.value = H(i);
514
- const r = At(i);
515
- Object.assign(v, { ...r }), Object.assign(u, {
516
- ...t.value || {},
517
- ...r
518
- });
500
+ function yn(e) {
501
+ const a = {};
502
+ return e.forEach((t) => {
503
+ let l = t.initialValue;
504
+ const o = ["select"], i = ["date", "time", "dateRange"];
505
+ !l && o.includes(t.valueType) ? l = void 0 : !l && i.includes(t.valueType) ? l = null : l || (l = ""), t.name === "dateRange" ? (a[t.rangeStartName || "start"] = l ? l[0] : null, a[t.rangeEndName || "end"] = l ? l[1] : null) : t.name && (a[t.name] = l);
506
+ }), a;
507
+ }
508
+ function bn({ search: e, searchMap: a, params: t, columns: l }) {
509
+ const o = ue({}), i = ue({}), h = N([]), d = T(() => !!e.value.showSearch);
510
+ tt(() => {
511
+ p("all");
512
+ }), G(() => t.value, () => {
513
+ p("params");
519
514
  }, {
520
- deep: !0,
521
- immediate: !0
515
+ deep: !0
516
+ }), G(() => a.value, () => {
517
+ p("searchMap");
518
+ }, {
519
+ deep: !0
520
+ }), G(() => l.value, () => {
521
+ p("columns");
522
+ }, {
523
+ deep: !0
522
524
  });
523
- function p(i) {
524
- Object.assign(u, i);
525
+ const p = (s) => {
526
+ var c;
527
+ const C = [];
528
+ if ((s === "all" || s === "searchMap") && (a.value.forEach((y) => C.push(y)), h.value = H(C)), (s === "all" || s === "columns") && ((c = l.value) == null ? void 0 : c.length) && (l.value && l.value.forEach((y) => {
529
+ y.searchConfig && C.push(y.searchConfig);
530
+ }), h.value = H(C)), s === "all" || s === "searchMap" || s === "columns") {
531
+ const y = yn(C);
532
+ Object.assign(i, { ...y });
533
+ for (const S in y)
534
+ o[S] || (o[S] = y[S]);
535
+ }
536
+ (s === "all" || s === "params" && !d.value) && Object.assign(o, t.value);
537
+ };
538
+ function r(s) {
539
+ Object.assign(o, s);
525
540
  }
526
- return { formDataRef: s, formParamsRef: u, defaultParamsRef: v, setFormParams: p };
541
+ return { formDataRef: h, formParamsRef: o, defaultParamsRef: i, setFormParams: r };
527
542
  }
528
- function bn({ columns: e, columnsState: l, changeColumns: t }) {
529
- const n = E(void 0), u = le({}), v = le({}), s = le({}), d = E([]);
530
- X(() => e.value, () => {
531
- var r;
532
- (r = c(e)) == null || r.forEach(({ show: S, key: f, fixed: m }, C) => {
533
- const y = nt(f, C);
534
- y && (s[y] = { show: S === void 0 ? !0 : S, fixed: m });
543
+ function pn({ columns: e, columnsState: a, changeColumns: t }) {
544
+ const l = N(void 0), o = ue({}), i = ue({}), h = ue({}), d = N([]);
545
+ G(() => e.value, () => {
546
+ var s;
547
+ (s = f(e)) == null || s.forEach(({ show: C, key: c, fixed: y }, S) => {
548
+ const g = at(c, S);
549
+ g && (h[g] = { show: C === void 0 ? !0 : C, fixed: y });
535
550
  });
536
551
  }, {
537
552
  deep: !0,
538
553
  immediate: !0
539
- }), X(() => e.value, () => {
540
- const r = c(e).map((S) => S.key);
541
- i(r);
554
+ }), G(() => e.value, () => {
555
+ const s = f(e).map((C) => C.key);
556
+ r(s);
542
557
  }, {
543
558
  deep: !0,
544
559
  immediate: !0
545
- }), ae(() => {
546
- var S;
547
- const r = {
548
- ...(S = c(l)) == null ? void 0 : S.value,
549
- ...c(s)
560
+ }), oe(() => {
561
+ var C;
562
+ const s = {
563
+ ...(C = f(a)) == null ? void 0 : C.value,
564
+ ...f(h)
550
565
  };
551
- Object.assign(u, r), Object.assign(v, r);
566
+ Object.assign(o, s), Object.assign(i, s);
552
567
  });
553
- function p(r, S) {
554
- n.value = S, Object.assign(u, r), t == null || t(u, S === "fixed");
568
+ function p(s, C) {
569
+ l.value = C, Object.assign(o, s), t == null || t(o, C === "fixed");
555
570
  }
556
- function i(r) {
557
- d.value = r;
571
+ function r(s) {
572
+ d.value = s;
558
573
  }
559
574
  return {
560
- columnsMap: u,
561
- operationType: n,
575
+ columnsMap: o,
576
+ operationType: l,
562
577
  setColumnsMap: p,
563
578
  sortKeyColumns: d,
564
- cacheColumnsMap: v,
565
- setSortKeyColumns: i
579
+ cacheColumnsMap: i,
580
+ setSortKeyColumns: r
566
581
  };
567
582
  }
568
583
  function Cn(e) {
569
- const l = T(() => e.draggabled), t = T(() => e.neverScroll), n = T(() => e.autoScroll);
584
+ const a = T(() => e.draggabled), t = T(() => e.neverScroll), l = T(() => e.autoScroll);
570
585
  return {
571
- draggabled: l,
586
+ draggabled: a,
572
587
  neverScroll: t,
573
- autoScroll: n
588
+ autoScroll: l
574
589
  };
575
590
  }
576
- function Sn({ scroll: e, columns: l, breakpoint: t, draggabled: n, autoScroll: u, neverScroll: v }) {
577
- const s = E([]), d = E([]);
578
- X([
591
+ function Sn({ scroll: e, columns: a, breakpoint: t, draggabled: l, autoScroll: o, neverScroll: i }) {
592
+ const h = N([]), d = N([]);
593
+ G([
579
594
  () => e.value,
580
- () => l.value,
595
+ () => a.value,
581
596
  () => t.value,
582
- () => n.value,
583
- () => u.value,
584
- () => v.value
597
+ () => l.value,
598
+ () => o.value,
599
+ () => i.value
585
600
  ], () => {
586
- s.value = H(r(c(l))), d.value = H(r(c(l)));
601
+ h.value = H(s(f(a))), d.value = H(s(f(a)));
587
602
  }, {
588
603
  deep: !0,
589
604
  immediate: !0
590
605
  });
591
606
  const p = T(() => {
592
- const C = i(c(s).filter((F) => F.fixed === "left")), y = i(c(s).filter((F) => F.fixed !== "left" && F.fixed !== "right")), R = i(c(s).filter((F) => F.fixed === "right"));
607
+ const S = r(f(h).filter((F) => F.fixed === "left")), g = r(f(h).filter((F) => F.fixed !== "left" && F.fixed !== "right")), x = r(f(h).filter((F) => F.fixed === "right"));
593
608
  return [
594
- ...C,
595
- ...y,
596
- ...R
609
+ ...S,
610
+ ...g,
611
+ ...x
597
612
  ];
598
613
  });
599
- function i(C) {
600
- return C.sort((y, R) => Wt(y, R, "order"));
614
+ function r(S) {
615
+ return S.sort((g, x) => _t(g, x, "order"));
601
616
  }
602
- function r(C) {
603
- return H(C).map((y, R) => {
617
+ function s(S) {
618
+ return H(S).map((g, x) => {
604
619
  var F;
605
- if (y.dataIndex === "action" || R === C.length - 1 ? y.resizable = !1 : y.resizable = re(y.resizable) ? y.resizable : !!(lt(y.width) && c(n)), !y.width || c(v))
606
- return y;
607
- if (y.dataIndex === "action" && c(u))
608
- if (((F = c(e)) == null ? void 0 : F.x) || !c(t))
609
- y.width = y.width || 100, y.fixed = "right";
620
+ if (g.dataIndex === "action" || x === S.length - 1 ? g.resizable = !1 : g.resizable = re(g.resizable) ? g.resizable : !!(ut(g.width) && f(l)), !g.width || f(i))
621
+ return g;
622
+ if (g.dataIndex === "action" && f(o))
623
+ if (((F = f(e)) == null ? void 0 : F.x) || !f(t))
624
+ g.width = g.width || 100, g.fixed = "right";
610
625
  else {
611
- const x = c(l).find((k) => k.dataIndex === y.dataIndex);
612
- y.width = (x == null ? void 0 : x.width) || "", y.fixed = x == null ? void 0 : x.fixed;
626
+ const w = f(a).find((R) => R.dataIndex === g.dataIndex);
627
+ g.width = (w == null ? void 0 : w.width) || "", g.fixed = w == null ? void 0 : w.fixed;
613
628
  }
614
- return y;
629
+ return g;
615
630
  });
616
631
  }
617
- function S(C, y) {
618
- s.value = s.value.map((R) => (R.uuid === y.uuid && (R.width = C), R));
632
+ function C(S, g) {
633
+ h.value = h.value.map((x) => (x.uuid === g.uuid && (x.width = S), x));
619
634
  }
620
- function f(C) {
621
- if (C.length <= 0) {
622
- s.value = [];
635
+ function c(S) {
636
+ if (S.length <= 0) {
637
+ h.value = [];
623
638
  return;
624
639
  }
625
- s.value = r(H(C));
640
+ h.value = s(H(S));
626
641
  }
627
- function m(C) {
628
- let y = H(l.value);
629
- y = y.map((R) => {
630
- var x, k, I;
631
- const F = R.key ? {
632
- show: (x = C[R.key]) == null ? void 0 : x.show,
633
- fixed: (k = C[R.key]) == null ? void 0 : k.fixed,
634
- order: (I = C[R.key]) == null ? void 0 : I.order
642
+ function y(S) {
643
+ let g = H(a.value);
644
+ g = g.map((x) => {
645
+ var w, R, M;
646
+ const F = x.key ? {
647
+ show: (w = S[x.key]) == null ? void 0 : w.show,
648
+ fixed: (R = S[x.key]) == null ? void 0 : R.fixed,
649
+ order: (M = S[x.key]) == null ? void 0 : M.order
635
650
  } : {};
636
651
  return {
637
- ...R,
652
+ ...x,
638
653
  ...F
639
654
  };
640
- }), f(y);
655
+ }), c(g);
641
656
  }
642
657
  return {
643
658
  breakpoint: t,
644
659
  getProColumns: p,
645
660
  cacheProColumns: d,
646
- setColumns: f,
647
- changeColumns: m,
648
- resizeColumnWidth: S
661
+ setColumns: c,
662
+ changeColumns: y,
663
+ resizeColumnWidth: C
649
664
  };
650
665
  }
651
- function pn(e) {
652
- const l = T(() => e.scroll), t = T(() => e.autoScroll), n = T(() => e.modalScroll), u = T(() => e.neverScroll), v = T(() => e.rowSelection), s = T(() => e.scrollBreakpoint);
666
+ function xn(e) {
667
+ const a = T(() => e.scroll), t = T(() => e.autoScroll), l = T(() => e.modalScroll), o = T(() => e.neverScroll), i = T(() => e.rowSelection), h = T(() => e.scrollBreakpoint);
653
668
  return {
654
- scroll: l,
655
- neverScroll: u,
656
- rowSelection: v,
669
+ scroll: a,
670
+ neverScroll: o,
671
+ rowSelection: i,
657
672
  autoScroll: t,
658
- modalScroll: n,
659
- scrollBreakpoint: s
673
+ modalScroll: l,
674
+ scrollBreakpoint: h
660
675
  };
661
676
  }
662
- function xn({ scroll: e, columns: l, autoScroll: t, modalScroll: n, neverScroll: u, rowSelection: v, screensRef: s, innerWidth: d, scrollBreakpoint: p }) {
663
- const i = T(() => {
664
- var f, m, C;
665
- return c(p) ? lt(c(p)) ? d.value > c(p) : _t(c(p)) ? (f = s.value) == null ? void 0 : f[c(p)] : (m = s.value) == null ? void 0 : m.xl : (C = s.value) == null ? void 0 : C.xl;
666
- }), r = T(() => {
667
- let f = 0;
668
- const m = c(v) ? 60 : 0, C = 150, y = H(c(l));
669
- y.forEach((x) => {
670
- f += Number.parseInt(x.width) || 0;
677
+ function wn({ scroll: e, columns: a, autoScroll: t, modalScroll: l, neverScroll: o, rowSelection: i, screensRef: h, innerWidth: d, scrollBreakpoint: p }) {
678
+ const r = T(() => {
679
+ var c, y, S;
680
+ return f(p) ? ut(f(p)) ? d.value > f(p) : qt(f(p)) ? (c = h.value) == null ? void 0 : c[f(p)] : (y = h.value) == null ? void 0 : y.xl : (S = h.value) == null ? void 0 : S.xl;
681
+ }), s = T(() => {
682
+ let c = 0;
683
+ const y = f(i) ? 60 : 0, S = 150, g = H(f(a));
684
+ g.forEach((w) => {
685
+ c += Number.parseInt(w.width) || 0;
671
686
  });
672
- const F = y.filter((x) => !Reflect.has(x, "width")).length;
673
- return F !== 0 && (f += F * C), m && (f += m), f;
687
+ const F = g.filter((w) => !Reflect.has(w, "width")).length;
688
+ return F !== 0 && (c += F * S), y && (c += y), c;
674
689
  });
675
690
  return { getScrollRef: T(() => {
676
- var m;
677
- const { xl: f } = s.value;
678
- return c(u) ? {} : c(e) && Object.keys(c(e)).length ? c(e) : c(n) ? {
679
- y: ((m = c(e)) == null ? void 0 : m.y) || (f ? 400 : 235)
680
- } : c(t) ? i.value ? {} : re(i.value) ? { x: c(r) } : {} : {};
681
- }), breakpoint: i };
691
+ var y;
692
+ const { xl: c } = h.value;
693
+ return f(o) ? {} : f(e) && Object.keys(f(e)).length ? f(e) : f(l) ? {
694
+ y: ((y = f(e)) == null ? void 0 : y.y) || (c ? 400 : 235)
695
+ } : f(t) ? r.value ? {} : re(r.value) ? { x: f(s) } : {} : {};
696
+ }), breakpoint: r };
682
697
  }
683
- const ut = Symbol("table-context"), wn = (e = Symbol(), l) => kt(e, l || {}), Tn = (e) => {
684
- Rt(ut, e);
685
- }, oe = () => wn(ut, []);
686
- function Rn(e, l) {
687
- const t = le({});
688
- ae(() => {
689
- n();
698
+ const st = Symbol("table-context"), Tn = (e = Symbol(), a) => Ot(e, a || {}), Rn = (e) => {
699
+ Dt(st, e);
700
+ }, ce = () => Tn(st, []);
701
+ function kn(e, a) {
702
+ const t = ue({});
703
+ oe(() => {
704
+ l();
690
705
  });
691
- function n() {
692
- Object.keys(e).map((s) => {
693
- u(s, e[s]);
706
+ function l() {
707
+ Object.keys(e).map((h) => {
708
+ o(h, e[h]);
694
709
  });
695
- const v = l.find((s) => s.valueType === "dateRange");
696
- v && u(v.name || "", e[v.rangeStartName || "start"] ? [
697
- e[v.rangeStartName || "start"],
698
- e[v.rangeEndName || "end"]
710
+ const i = a.find((h) => h.valueType === "dateRange");
711
+ i && o(i.name || "", e[i.rangeStartName || "start"] ? [
712
+ e[i.rangeStartName || "start"],
713
+ e[i.rangeEndName || "end"]
699
714
  ] : []);
700
715
  }
701
- function u(v, s) {
702
- t[v] = s;
716
+ function o(i, h) {
717
+ t[i] = h;
703
718
  }
704
719
  return {
705
720
  formState: t,
706
- resetFormState: n,
707
- changeFormState: u
721
+ resetFormState: l,
722
+ changeFormState: o
708
723
  };
709
724
  }
710
- function kn(e) {
711
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
712
- }
713
725
  const {
714
726
  useBreakpoint: Fn
715
- } = $e, {
727
+ } = je, {
716
728
  MonthPicker: Dn,
717
729
  RangePicker: On
718
- } = tt, it = we({
730
+ } = lt, rt = we({
719
731
  name: "ProTableForm",
720
732
  props: {
721
733
  search: ne.search,
@@ -730,17 +742,15 @@ const {
730
742
  },
731
743
  emits: ["search"],
732
744
  setup(e, {
733
- emit: l,
745
+ emit: a,
734
746
  slots: t,
735
- expose: n
747
+ expose: l
736
748
  }) {
737
- const u = Fn(), {
738
- setPagination: v
739
- } = oe(), {
740
- formState: s,
741
- resetFormState: d,
742
- changeFormState: p
743
- } = Rn(e.defaultParams || {}, e.searchMap || []), i = E(!1), r = T(() => !!e.search.showSearch), S = T(() => e.search.showReset === void 0 ? r.value : e.search.showReset), f = [{
749
+ const o = Fn(), {
750
+ formState: i,
751
+ resetFormState: h,
752
+ changeFormState: d
753
+ } = kn(e.defaultParams || {}, e.searchMap || []), p = N(!1), r = T(() => !!e.search.showSearch), s = T(() => e.search.showReset === void 0 ? r.value : e.search.showReset), C = [{
744
754
  value: "xxl",
745
755
  span: 4
746
756
  }, {
@@ -758,356 +768,356 @@ const {
758
768
  }, {
759
769
  value: "xs",
760
770
  span: 1
761
- }], m = T(() => C(e.search.span));
762
- X(() => e.search.defaultCollapsed, (a) => {
763
- i.value = i.value || !!a;
771
+ }], c = T(() => y(e.search.span));
772
+ G(() => e.search.defaultCollapsed, (n) => {
773
+ p.value = p.value || !!n;
764
774
  });
765
- const C = (a) => {
766
- let h = 4;
767
- for (let D = 0; D < f.length; D += 1) {
768
- const M = f[D].value;
769
- if (u.value[M]) {
770
- h = (a == null ? void 0 : a[M]) || (e.modal ? 3 : f[D].span);
775
+ const y = (n) => {
776
+ let v = 4;
777
+ for (let D = 0; D < C.length; D += 1) {
778
+ const O = C[D].value;
779
+ if (o.value[O]) {
780
+ v = (n == null ? void 0 : n[O]) || (e.modal ? 3 : C[D].span);
771
781
  break;
772
782
  }
773
783
  }
774
- return h;
775
- }, y = (a) => {
776
- i.value = a;
777
- }, R = (a, h, D) => (a + 1) % h === 0 ? {
784
+ return v;
785
+ }, S = (n) => {
786
+ p.value = n;
787
+ }, g = (n, v, D) => (n + 1) % v === 0 ? {
778
788
  ...D,
779
789
  marginRight: 0
780
790
  } : {
781
791
  ...D,
782
792
  marginRight: "2%"
783
- }, F = (a, h) => {
784
- var D, M;
785
- switch (h.valueType) {
793
+ }, x = (n, v) => {
794
+ var D, O;
795
+ switch (v.valueType) {
786
796
  case "text":
787
- p(h.name, a || h.initialValue || "");
797
+ d(v.name || "", n || v.initialValue || "");
788
798
  break;
789
799
  case "select":
790
- p(h.name, a || a === 0 ? a : h.initialValue || void 0);
800
+ d(v.name || "", n || n === 0 ? n : v.initialValue || void 0);
791
801
  break;
792
802
  case "treeSelect":
793
- p(h.name, a || a === 0 ? a : h.initialValue || (((D = h.fidle) == null ? void 0 : D.treeCheckable) || ((M = h.field) == null ? void 0 : M.multiple) ? [] : null));
803
+ d(v.name || "", n || n === 0 ? n : v.initialValue || (((D = v.field) == null ? void 0 : D.treeCheckable) || ((O = v.field) == null ? void 0 : O.multiple) ? [] : null));
794
804
  break;
795
805
  case "date":
796
- p(h.name, a ? V(a).format(h.format || "YYYY-MM-DD") : h.initialValue || null);
806
+ d(v.name || "", n ? V(n).format(v.valueFormat || "YYYY-MM-DD") : v.initialValue || null);
797
807
  break;
798
808
  case "dateMonth":
799
- p(h.name, a ? V(a).format("YYYY-MM") : h.initialValue || null);
809
+ d(v.name || "", n ? V(n).format("YYYY-MM") : v.initialValue || null);
800
810
  break;
801
811
  case "dateRange":
802
- p(h.name, a && a.length > 0 ? [V(a[0]).format(h.format || "YYYY-MM-DD"), V(a[1]).format(h.format || "YYYY-MM-DD")] : h.initialValue || null);
812
+ d(v.name || "", n && n.length > 0 ? [V(n[0]).format(v.valueFormat || "YYYY-MM-DD"), V(n[1]).format(v.valueFormat || "YYYY-MM-DD")] : v.initialValue || null);
803
813
  break;
804
814
  case "time":
805
- p(h.name, a ? V(a).format(h.format || "HH:mm:ss") : h.initialValue || null);
815
+ d(v.name || "", n ? V(n).format(v.valueFormat || "HH:mm:ss") : v.initialValue || null);
806
816
  break;
807
817
  }
808
- e.search.showSearch || h.valueType === "text" || (h.valueType === "treeSelect" || h.valueType, x());
809
- }, x = (a) => {
810
- Ft(() => {
811
- const h = H(s), D = e.searchMap.find((g) => g.valueType === "text") || "", M = e.searchMap.find((g) => g.valueType === "dateRange") || "", j = e.searchMap.find((g) => g.valueType === "treeSelect") || "";
812
- D && (h[D.name] = s[D.name] || D.initialValue || ""), M && (h[M.rangeStartName || "start"] = h[M.name] ? h[M.name][0] : "", h[M.rangeEndName || "end"] = h[M.name] ? h[M.name][1] : "", delete h[M.name]), j && (Qe(s[j.name]) && (h[j.name] = s[j.name].length ? s[j.name].map((g) => g[j.valueKey === "text" ? "label" : "value"]).join() : ""), j && Qe(h[j.name]) && (h[j.name] = h[j.name].length ? h[j.name].map((g) => g[j.valueKey === "text" ? "label" : "value"]) : "")), (!r.value || a) && l("search", h);
818
+ e.search.showSearch || v.valueType === "text" || (v.valueType === "treeSelect" || v.valueType, w());
819
+ }, F = () => {
820
+ const n = H(i), v = e.searchMap.find((b) => b.valueType === "text") || "", D = e.searchMap.find((b) => b.valueType === "dateRange") || "", O = e.searchMap.find((b) => b.valueType === "treeSelect") || "";
821
+ return v && (n[v.name] = i[v.name] || v.initialValue || ""), D && (n[D.rangeStartName || "start"] = n[D.name] ? n[D.name][0] : "", n[D.rangeEndName || "end"] = n[D.name] ? n[D.name][1] : "", delete n[D.name]), O && (Ee(i[O.name]) && (n[O.name] = i[O.name].length ? i[O.name].map((b) => b[O.valueKey === "text" ? "label" : "value"]).join() : ""), O && Ee(n[O.name]) && (n[O.name] = n[O.name].length ? n[O.name].map((b) => b[O.valueKey === "text" ? "label" : "value"]) : "")), n;
822
+ }, w = (n = !1, v) => {
823
+ Mt(() => {
824
+ (!r.value || n) && a("search", F(), !!v);
813
825
  });
814
- }, k = () => {
815
- d(), v({
816
- current: 1
817
- }), x(!0);
826
+ }, R = (n = !0) => {
827
+ h(), w(!0, n);
818
828
  };
819
- n({
820
- resetFormParams: d
829
+ l({
830
+ getFormState: () => F(),
831
+ resetForm: R
821
832
  });
822
- const I = () => (r.value || S.value) && o(te, null, {
823
- default: () => [S.value && o(Ue, {
824
- onClick: () => k()
833
+ const M = () => (r.value || s.value) && u(te, null, {
834
+ default: () => [s.value && u(Je, {
835
+ onClick: () => R()
825
836
  }, {
826
837
  default: () => [e.search.resetText || "\u91CD\u7F6E"]
827
- }), r.value && o(Ue, {
838
+ }), r.value && u(Je, {
828
839
  loading: e.loading,
829
840
  type: "primary",
830
- onClick: () => x(!0)
841
+ onClick: () => w(!0)
831
842
  }, {
832
843
  default: () => [e.search.searchText || "\u67E5\u8BE2"]
833
844
  })]
834
- }), N = ({
835
- formItemStyle: a,
836
- advanced: h,
845
+ }), I = ({
846
+ formItemStyle: n,
847
+ advanced: v,
837
848
  showAdvanced: D = !0
838
- }) => o("div", {
839
- style: a,
849
+ }) => u("div", {
850
+ style: n,
840
851
  class: `${e.prefixCls}-form-collapse-button`
841
- }, [o(te, {
852
+ }, [u(te, {
842
853
  size: 16
843
854
  }, {
844
- default: () => [I(), D && o("span", {
855
+ default: () => [M(), D && u("span", {
845
856
  class: `${e.prefixCls}-a`,
846
- onClick: () => y(!h)
847
- }, [h ? "\u6536\u8D77" : "\u5C55\u5F00", e.search.collapseRender ? e.search.collapseRender() : h ? o(Jt, null, null) : o(Qt, null, null)])]
848
- })]), B = (a) => {
849
- var j;
850
- let h, D;
851
- const M = r.value ? Ge : Ge.Search;
852
- switch (a.valueType) {
857
+ onClick: () => S(!v)
858
+ }, [v ? "\u6536\u8D77" : "\u5C55\u5F00", e.search.collapseRender ? e.search.collapseRender() : v ? u(Qt, null, null) : u(Xt, null, null)])]
859
+ })]), Y = (n) => {
860
+ var O;
861
+ let v;
862
+ const D = r.value ? Qe : Qe.Search;
863
+ switch (n.valueType) {
853
864
  case "text":
854
- D = o(M, {
865
+ v = u(D, _({
855
866
  style: {
856
867
  width: "100%"
857
868
  },
858
- value: s[a.name],
859
- placeholder: a.placeholder || "\u8BF7\u8F93\u5165",
860
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
861
- onChange: (g) => F(g.target.value, a),
862
- onSearch: (g) => x()
863
- }, null);
869
+ value: i[n.name],
870
+ placeholder: n.placeholder || "\u8BF7\u8F93\u5165",
871
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
872
+ onChange: (b) => x(b.target.value, n),
873
+ onSearch: (b) => w()
874
+ }, n.field || {}), null);
864
875
  break;
865
876
  case "select":
866
- D = o(Je, {
877
+ v = u(Xe, _({
867
878
  style: {
868
879
  width: "100%"
869
880
  },
870
- value: a.loading ? void 0 : s[a.name],
881
+ value: n.loading ? void 0 : i[n.name],
871
882
  optionFilterProp: "label",
872
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
873
- showSearch: a.showSearch,
874
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
875
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
876
- notFoundContent: a.loading === void 0 ? void 0 : a.loading ? o(je, {
883
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
884
+ showSearch: n.showSearch,
885
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
886
+ getPopupContainer: (b) => b && b.parentNode ? b.parentNode : b,
887
+ notFoundContent: n.loading === void 0 ? void 0 : n.loading ? u(Pe, {
877
888
  size: "small"
878
889
  }, null) : void 0,
879
- onChange: (g) => F(g, a)
880
- }, kn(h = a.valueEnum.map((g) => o(Je.Option, {
881
- key: g.value,
882
- value: g.value
883
- }, {
884
- default: () => [g.text]
885
- }))) ? h : {
886
- default: () => [h]
890
+ onChange: (b) => x(b, n)
891
+ }, n.field || {}), {
892
+ default: () => {
893
+ var b;
894
+ return [((b = n.valueEnum) == null ? void 0 : b.length) || n.valueEnum.map((L) => u(Xe.Option, {
895
+ key: L.value,
896
+ value: L.value
897
+ }, {
898
+ default: () => [L.text]
899
+ }))];
900
+ }
887
901
  });
888
902
  break;
889
903
  case "treeSelect":
890
- D = o(Et, ce({
904
+ v = u(It, _({
891
905
  style: {
892
906
  width: "100%"
893
907
  },
894
- value: s[a.name],
895
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
896
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
897
- treeData: a.valueEnum,
898
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
899
- notFoundContent: a.loading === void 0 ? void 0 : a.loading ? o(je, {
908
+ value: i[n.name],
909
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
910
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
911
+ treeData: n.valueEnum,
912
+ getPopupContainer: (b) => b && b.parentNode ? b.parentNode : b,
913
+ notFoundContent: n.loading === void 0 ? void 0 : n.loading ? u(Pe, {
900
914
  size: "small"
901
915
  }, null) : void 0,
902
- onChange: (g) => F(g, a)
903
- }, a.field || {}), null);
916
+ onChange: (b) => x(b, n)
917
+ }, n.field || {}), null);
904
918
  break;
905
919
  case "date":
906
- D = o(tt, {
920
+ v = u(lt, _({
907
921
  style: {
908
922
  width: "100%"
909
923
  },
910
- value: s[a.name] ? V(s[a.name], a.format || "YYYY-MM-DD") : void 0,
911
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
912
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
913
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
914
- format: a.format || "YYYY-MM-DD",
915
- showTime: a.showTime,
916
- showToday: a.showToday || !0,
917
- renderExtraFooter: a.renderExtraFooter || null,
918
- onChange: (g) => F(g, a)
919
- }, null);
924
+ value: i[n.name] ? V(i[n.name], n.valueFormat || "YYYY-MM-DD") : void 0,
925
+ getPopupContainer: (b) => b && b.parentNode ? b.parentNode : b,
926
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
927
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
928
+ format: n.valueFormat || "YYYY-MM-DD",
929
+ showTime: n.showTime,
930
+ showToday: n.showToday || !0,
931
+ onChange: (b) => x(b, n)
932
+ }, n.field || {}), null);
920
933
  break;
921
934
  case "dateMonth":
922
- D = o(Dn, {
935
+ v = u(Dn, _({
923
936
  style: {
924
937
  width: "100%"
925
938
  },
926
- value: s[a.name] ? V(s[a.name], a.format || "YYYY-MM") : void 0,
927
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
928
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
929
- renderExtraFooter: a.renderExtraFooter || null,
930
- onChange: (g) => F(g, a)
931
- }, null);
939
+ value: i[n.name] ? V(i[n.name], n.valueFormat || "YYYY-MM") : void 0,
940
+ getPopupContainer: (b) => b && b.parentNode ? b.parentNode : b,
941
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
942
+ onChange: (b) => x(b, n)
943
+ }, n.field || {}), null);
932
944
  break;
933
945
  case "dateRange":
934
- D = o(On, {
946
+ v = u(On, _({
935
947
  style: {
936
948
  width: "100%"
937
949
  },
938
- value: (j = s[a.name]) != null && j.length ? [V(s[a.name][0], a.format || "YYYY-MM-DD HH:mm:ss"), V(s[a.name][1], a.format || "YYYY-MM-DD HH:mm:ss")] : void 0,
939
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
940
- placeholder: a.placeholder || ["\u5F00\u59CB\u65E5\u671F", "\u7ED3\u675F\u65E5\u671F"],
941
- format: a.format || "YYYY-MM-DD HH:mm:ss",
942
- renderExtraFooter: a.renderExtraFooter || null,
943
- showTime: a.showTime,
944
- onChange: (g) => F(g, a)
945
- }, null);
950
+ value: (O = i[n.name]) != null && O.length ? [V(i[n.name][0], n.valueFormat || "YYYY-MM-DD HH:mm:ss"), V(i[n.name][1], n.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
951
+ getPopupContainer: (b) => b && b.parentNode ? b.parentNode : b,
952
+ placeholder: n.placeholder || ["\u5F00\u59CB\u65E5\u671F", "\u7ED3\u675F\u65E5\u671F"],
953
+ format: n.valueFormat || "YYYY-MM-DD HH:mm:ss",
954
+ showTime: n.showTime,
955
+ onChange: (b) => x(b, n)
956
+ }, n.field || {}), null);
946
957
  break;
947
958
  case "time":
948
- D = o(Mt, {
959
+ v = u(Nt, _({
949
960
  style: {
950
961
  width: "100%"
951
962
  },
952
- value: s[a.name] ? V(s[a.name], a.format || "HH:mm:ss") : void 0,
953
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
954
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
955
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
956
- use12Hours: a.use12Hours,
957
- format: a.format || "HH:mm:ss",
958
- renderExtraFooter: a.renderExtraFooter || null,
959
- onChange: (g) => F(g, a)
960
- }, null);
963
+ value: i[n.name] ? V(i[n.name], n.valueFormat || "HH:mm:ss") : void 0,
964
+ getPopupContainer: (b) => b && b.parentNode ? b.parentNode : b,
965
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
966
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
967
+ use12Hours: n.use12Hours,
968
+ format: n.valueFormat || "HH:mm:ss",
969
+ onChange: (b) => x(b, n)
970
+ }, n.field || {}), null);
961
971
  break;
962
972
  }
963
- return D;
964
- }, L = ({
965
- formItemStyle: a,
966
- item: h
967
- }) => o(qe.Item, {
968
- style: a
973
+ return v;
974
+ }, B = ({
975
+ formItemStyle: n,
976
+ item: v
977
+ }) => u(Ue.Item, {
978
+ style: n
969
979
  }, {
970
- default: () => [h.__v_isVNode ? h : B(h)]
971
- }), _ = () => {
972
- var h;
973
- const a = [...e.searchMap, ...((h = t.default) == null ? void 0 : h.call(t)) || []];
974
- return a.map((D, M) => {
975
- const j = {
976
- width: `${(100 - (m.value - 1) * 2) / m.value}%`
977
- }, g = R(M, m.value, j);
978
- return a.length < m.value || i.value ? o(Ie, null, [L({
979
- formItemStyle: g,
980
+ default: () => [v.__v_isVNode ? v : Y(v)]
981
+ }), X = () => {
982
+ var v;
983
+ const n = [...e.searchMap, ...((v = t.default) == null ? void 0 : v.call(t)) || []];
984
+ return n.map((D, O) => {
985
+ const b = {
986
+ width: `${(100 - (c.value - 1) * 2) / c.value}%`
987
+ }, L = g(O, c.value, b);
988
+ return n.length < c.value || p.value ? u(Me, null, [B({
989
+ formItemStyle: L,
980
990
  item: D
981
- }), M === a.length - 1 && N({
991
+ }), O === n.length - 1 && I({
982
992
  formItemStyle: {
983
993
  flex: 1,
984
994
  justifyContent: "flex-end"
985
995
  },
986
- advanced: i.value,
987
- showAdvanced: i.value
988
- })]) : o(Ie, null, [M < m.value - 1 && L({
989
- formItemStyle: g,
996
+ advanced: p.value,
997
+ showAdvanced: p.value
998
+ })]) : u(Me, null, [O < c.value - 1 && B({
999
+ formItemStyle: L,
990
1000
  item: D
991
- }), M === m.value - 1 && m.value - 1 === 0 && L({
992
- formItemStyle: g,
1001
+ }), O === c.value - 1 && c.value - 1 === 0 && B({
1002
+ formItemStyle: L,
993
1003
  item: D
994
- }), M === m.value - 1 && N({
1004
+ }), O === c.value - 1 && I({
995
1005
  formItemStyle: {
996
1006
  flex: 1,
997
1007
  justifyContent: "flex-end"
998
1008
  },
999
1009
  advanced: !1,
1000
- showAdvanced: a.length >= m.value
1010
+ showAdvanced: n.length >= c.value
1001
1011
  })]);
1002
1012
  });
1003
1013
  };
1004
- return () => o("div", {
1014
+ return () => u("div", {
1005
1015
  class: {
1006
- [`${c(e.prefixCls)}-search`]: !0,
1016
+ [`${f(e.prefixCls)}-search`]: !0,
1007
1017
  [`${e.search.className}`]: e.search.className
1008
1018
  }
1009
- }, [o(qe, {
1010
- class: `${c(e.prefixCls)}-form`,
1019
+ }, [u(Ue, {
1020
+ class: `${f(e.prefixCls)}-form`,
1011
1021
  layout: "horizontal"
1012
1022
  }, {
1013
- default: () => [o("div", {
1014
- class: `${c(e.prefixCls)}-form-container`
1015
- }, [_()])]
1023
+ default: () => [u("div", {
1024
+ class: `${f(e.prefixCls)}-form-container`
1025
+ }, [X()])]
1016
1026
  })]);
1017
1027
  }
1018
1028
  });
1019
- it.inheritAttrs = !1;
1020
- function Pn(e, l) {
1021
- for (var t = ze({}, e), n = 0; n < l.length; n += 1) {
1022
- var u = l[n];
1023
- delete t[u];
1029
+ rt.inheritAttrs = !1;
1030
+ function Mn(e, a) {
1031
+ for (var t = Ie({}, e), l = 0; l < a.length; l += 1) {
1032
+ var o = a[l];
1033
+ delete t[o];
1024
1034
  }
1025
1035
  return t;
1026
1036
  }
1027
- const ve = (e) => {
1028
- const l = E(null);
1029
- return l.value = e, (...t) => {
1030
- var n;
1031
- return (n = l.value) == null ? void 0 : n.call(l, ...t);
1037
+ const ge = (e) => {
1038
+ const a = N(null);
1039
+ return a.value = e, (...t) => {
1040
+ var l;
1041
+ return (l = a.value) == null ? void 0 : l.call(a, ...t);
1032
1042
  };
1033
1043
  };
1034
- const Pe = ({
1044
+ const Fe = ({
1035
1045
  title: e,
1036
- show: l,
1046
+ show: a,
1037
1047
  treeKey: t,
1038
- fixed: n
1048
+ fixed: l
1039
1049
  }, {
1040
- slots: u
1050
+ slots: o
1041
1051
  }) => {
1042
1052
  const {
1043
- cacheColumns: v,
1044
- settingsAction: s
1045
- } = oe();
1046
- return l ? o(J, {
1053
+ cacheColumns: i,
1054
+ settingsAction: h
1055
+ } = ce();
1056
+ return a ? u(J, {
1047
1057
  title: e
1048
1058
  }, {
1049
1059
  default: () => {
1050
1060
  var d;
1051
- return [o("span", {
1061
+ return [u("span", {
1052
1062
  onClick: (p) => {
1053
- var m, C;
1063
+ var y, S;
1054
1064
  p.stopPropagation(), p.preventDefault();
1055
- const i = ((m = c(v).find((y) => y.uuid === t)) == null ? void 0 : m.key) || "", r = (s == null ? void 0 : s.columnsMap[i]) || {};
1056
- if (typeof r.disable == "boolean" ? r.disable : (C = r.disable) == null ? void 0 : C.icon)
1065
+ const r = ((y = f(i).find((g) => g.uuid === t)) == null ? void 0 : y.key) || "", s = (h == null ? void 0 : h.columnsMap[r]) || {};
1066
+ if (typeof s.disable == "boolean" ? s.disable : (S = s.disable) == null ? void 0 : S.icon)
1057
1067
  return;
1058
- const f = {
1059
- ...s == null ? void 0 : s.columnsMap,
1060
- [i]: {
1061
- ...r,
1062
- fixed: n
1068
+ const c = {
1069
+ ...h == null ? void 0 : h.columnsMap,
1070
+ [r]: {
1071
+ ...s,
1072
+ fixed: l
1063
1073
  }
1064
1074
  };
1065
- s == null || s.setColumnsMap(f, "fixed");
1075
+ h == null || h.setColumnsMap(c, "fixed");
1066
1076
  }
1067
- }, [(d = u.default) == null ? void 0 : d.call(u)])];
1077
+ }, [(d = o.default) == null ? void 0 : d.call(o)])];
1068
1078
  }
1069
1079
  }) : null;
1070
- }, Mn = ({
1080
+ }, Pn = ({
1071
1081
  treeKey: e,
1072
- title: l,
1082
+ title: a,
1073
1083
  className: t,
1074
- fixed: n,
1075
- autoScroll: u
1084
+ fixed: l,
1085
+ autoScroll: o
1076
1086
  }) => {
1077
- var i;
1087
+ var r;
1078
1088
  const {
1079
- cacheColumns: v
1080
- } = oe(), s = ((i = c(v).find((r) => r.uuid === e)) == null ? void 0 : i.key) || "", d = T(() => s === "action" && (u == null ? void 0 : u.value)), p = o("span", {
1089
+ cacheColumns: i
1090
+ } = ce(), h = ((r = f(i).find((s) => s.uuid === e)) == null ? void 0 : r.key) || "", d = T(() => h === "action" && (o == null ? void 0 : o.value)), p = u("span", {
1081
1091
  class: `${t}-list-item-option`
1082
- }, [o(Pe, {
1092
+ }, [u(Fe, {
1083
1093
  treeKey: e,
1084
1094
  fixed: "left",
1085
1095
  title: "\u56FA\u5B9A\u5728\u5217\u9996",
1086
- show: n !== "left" && !d.value
1096
+ show: l !== "left" && !d.value
1087
1097
  }, {
1088
- default: () => [o(Xt, null, null)]
1089
- }), o(Pe, {
1098
+ default: () => [u(Zt, null, null)]
1099
+ }), u(Fe, {
1090
1100
  treeKey: e,
1091
1101
  fixed: void 0,
1092
1102
  title: "\u4E0D\u56FA\u5B9A",
1093
- show: !!n && !d.value
1103
+ show: !!l && !d.value
1094
1104
  }, {
1095
- default: () => [o(Zt, null, null)]
1096
- }), o(Pe, {
1105
+ default: () => [u(en, null, null)]
1106
+ }), u(Fe, {
1097
1107
  treeKey: e,
1098
1108
  fixed: "right",
1099
1109
  title: "\u56FA\u5B9A\u5728\u5217\u5C3E",
1100
- show: n !== "right"
1110
+ show: l !== "right"
1101
1111
  }, {
1102
- default: () => [o(en, null, null)]
1112
+ default: () => [u(tn, null, null)]
1103
1113
  })]);
1104
- return o("span", {
1114
+ return u("span", {
1105
1115
  class: `${t}-list-item`,
1106
1116
  key: e
1107
- }, [o("div", {
1117
+ }, [u("div", {
1108
1118
  class: `${t}-list-item-title`
1109
- }, [l]), p]);
1110
- }, Me = we({
1119
+ }, [a]), p]);
1120
+ }, De = we({
1111
1121
  props: {
1112
1122
  list: Array,
1113
1123
  keys: Array,
@@ -1121,206 +1131,206 @@ const Pe = ({
1121
1131
  }
1122
1132
  },
1123
1133
  setup(e) {
1124
- const l = E(Ne().uuid(15)), t = T(() => e.list && e.list.length > 0), n = E([]), u = E([]), {
1125
- cacheColumns: v,
1126
- slots: s,
1134
+ const a = N(Ne().uuid(15)), t = T(() => e.list && e.list.length > 0), l = N([]), o = N([]), {
1135
+ cacheColumns: i,
1136
+ slots: h,
1127
1137
  settingsAction: d
1128
- } = oe(), p = (m, C) => m.map(({
1129
- key: y,
1130
- children: R,
1138
+ } = ce(), p = (y, S) => y.map(({
1139
+ key: g,
1140
+ children: x,
1131
1141
  uuid: F,
1132
- ...x
1142
+ ...w
1133
1143
  }) => {
1134
- var B;
1135
- const k = (d == null ? void 0 : d.columnsMap[y || "null"]) || {
1144
+ var Y;
1145
+ const R = (d == null ? void 0 : d.columnsMap[g || "null"]) || {
1136
1146
  show: !0
1137
1147
  };
1138
- let I = !1;
1139
- k.show !== !1 && (C == null ? void 0 : C.show) !== !1 && !R && (I = !0);
1140
- const N = {
1148
+ let M = !1;
1149
+ R.show !== !1 && (S == null ? void 0 : S.show) !== !1 && !x && (M = !0);
1150
+ const I = {
1141
1151
  key: F || "",
1142
- ...Pn(x, ["dataIndex"]),
1143
- checked: I,
1152
+ ...Mn(w, ["dataIndex"]),
1153
+ checked: M,
1144
1154
  selectable: !1,
1145
- disabled: k.disable === !0,
1146
- disableCheckbox: typeof k.disable == "boolean" ? k.disable : (B = k.disable) == null ? void 0 : B.checkbox,
1155
+ disabled: R.disable === !0,
1156
+ disableCheckbox: typeof R.disable == "boolean" ? R.disable : (Y = R.disable) == null ? void 0 : Y.checkbox,
1147
1157
  isLeaf: !0
1148
1158
  };
1149
- return R && (N.children = p(R, k)), N;
1159
+ return x && (I.children = p(x, R)), I;
1150
1160
  });
1151
- ae(() => {
1152
- const m = p(e.list || []);
1153
- n.value = m, u.value = m.filter((C) => C.checked).map((C) => C.key), (d == null ? void 0 : d.operationType.value) === "fixed" && (l.value = Ne().uuid(15));
1161
+ oe(() => {
1162
+ const y = p(e.list || []);
1163
+ l.value = y, o.value = y.filter((S) => S.checked).map((S) => S.key), (d == null ? void 0 : d.operationType.value) === "fixed" && (a.value = Ne().uuid(15));
1154
1164
  });
1155
- const i = ve((m, C, y) => {
1156
- var _, a;
1157
- const R = ((_ = c(v).find((h) => h.uuid === m)) == null ? void 0 : _.key) || "", F = ((a = c(v).find((h) => h.uuid === C)) == null ? void 0 : a.key) || "", x = {
1165
+ const r = ge((y, S, g) => {
1166
+ var X, n;
1167
+ const x = ((X = f(i).find((v) => v.uuid === y)) == null ? void 0 : X.key) || "", F = ((n = f(i).find((v) => v.uuid === S)) == null ? void 0 : n.key) || "", w = {
1158
1168
  ...d == null ? void 0 : d.columnsMap
1159
- }, k = [...d.sortKeyColumns.value], I = k.findIndex((h) => h === R), N = k.findIndex((h) => h === F), B = y > I;
1160
- if (I < 0)
1169
+ }, R = [...d.sortKeyColumns.value], M = R.findIndex((v) => v === x), I = R.findIndex((v) => v === F), Y = g > M;
1170
+ if (M < 0)
1161
1171
  return;
1162
- const L = k[I];
1163
- k.splice(I, 1), y === 0 ? k.unshift(L) : k.splice(B ? N : N + 1, 0, L), k.forEach((h, D) => {
1164
- x[h] = {
1165
- ...x[h] || {},
1172
+ const B = R[M];
1173
+ R.splice(M, 1), g === 0 ? R.unshift(B) : R.splice(Y ? I : I + 1, 0, B), R.forEach((v, D) => {
1174
+ w[v] = {
1175
+ ...w[v] || {},
1166
1176
  order: D
1167
1177
  };
1168
- }), d == null || d.setColumnsMap(x, "drop"), d == null || d.setSortKeyColumns(k);
1169
- }), r = ve((m) => {
1170
- var k;
1171
- const C = m.node.key, y = ((k = c(v).find((I) => I.uuid === C)) == null ? void 0 : k.key) || "", F = {
1172
- ...(d == null ? void 0 : d.columnsMap[y]) || {}
1178
+ }), d == null || d.setColumnsMap(w, "drop"), d == null || d.setSortKeyColumns(R);
1179
+ }), s = ge((y) => {
1180
+ var R;
1181
+ const S = y.node.key, g = ((R = f(i).find((M) => M.uuid === S)) == null ? void 0 : R.key) || "", F = {
1182
+ ...(d == null ? void 0 : d.columnsMap[g]) || {}
1173
1183
  };
1174
- F.show = m.checked;
1175
- const x = {
1184
+ F.show = y.checked;
1185
+ const w = {
1176
1186
  ...d == null ? void 0 : d.columnsMap,
1177
- [y]: F
1187
+ [g]: F
1178
1188
  };
1179
- d == null || d.setColumnsMap(x, "show");
1180
- }), S = (m) => {
1181
- const C = c(v).find((y) => y.uuid === m.key);
1182
- return m.title || Dt(s, "headerCell", {
1183
- title: C.title,
1184
- column: C
1185
- }, () => [C.title]);
1186
- }, f = () => {
1187
- var m, C;
1188
- return o(It, {
1189
- key: l.value,
1190
- draggable: e.draggable && !!((m = n.value) != null && m.length) && ((C = n.value) == null ? void 0 : C.length) > 1,
1189
+ d == null || d.setColumnsMap(w, "show");
1190
+ }), C = (y) => {
1191
+ const S = f(i).find((g) => g.uuid === y.key);
1192
+ return y.title || Pt(h, "headerCell", {
1193
+ title: S.title,
1194
+ column: S
1195
+ }, () => [S.title]);
1196
+ }, c = () => {
1197
+ var y, S;
1198
+ return u(jt, {
1199
+ key: a.value,
1200
+ draggable: e.draggable && !!((y = l.value) != null && y.length) && ((S = l.value) == null ? void 0 : S.length) > 1,
1191
1201
  checkable: e.checkable,
1192
1202
  blockNode: !0,
1193
1203
  showLine: !1,
1194
- checkedKeys: u.value,
1204
+ checkedKeys: o.value,
1195
1205
  height: 280,
1196
- onDrop: (y) => {
1197
- const R = y.node.key, F = y.dragNode.key, {
1198
- dropPosition: x,
1199
- dropToGap: k
1200
- } = y, I = x === -1 || !k ? x + 1 : x;
1201
- i(F, R, I);
1206
+ onDrop: (g) => {
1207
+ const x = g.node.key, F = g.dragNode.key, {
1208
+ dropPosition: w,
1209
+ dropToGap: R
1210
+ } = g, M = w === -1 || !R ? w + 1 : w;
1211
+ r(F, x, M);
1202
1212
  },
1203
- onCheck: (y, R) => r(R),
1204
- treeData: n.value
1213
+ onCheck: (g, x) => s(x),
1214
+ treeData: l.value
1205
1215
  }, {
1206
- title: (y) => {
1207
- const R = {
1208
- ...y,
1216
+ title: (g) => {
1217
+ const x = {
1218
+ ...g,
1209
1219
  children: void 0,
1210
- title: S(y),
1220
+ title: C(g),
1211
1221
  autoScroll: d == null ? void 0 : d.autoScroll
1212
1222
  };
1213
- return o(Mn, ce({
1223
+ return u(Pn, _({
1214
1224
  className: e.className
1215
- }, R, {
1216
- treeKey: R.key
1225
+ }, x, {
1226
+ treeKey: x.key
1217
1227
  }), null);
1218
1228
  }
1219
1229
  });
1220
1230
  };
1221
- return () => t.value ? o(Ie, null, [e.showTitle && o("span", {
1231
+ return () => t.value ? u(Me, null, [e.showTitle && u("span", {
1222
1232
  class: `${e.className}-list-title`
1223
- }, [e.title]), f()]) : null;
1233
+ }, [e.title]), c()]) : null;
1224
1234
  }
1225
1235
  }), En = ({
1226
1236
  localColumns: e,
1227
- className: l,
1237
+ className: a,
1228
1238
  draggable: t,
1229
- checkable: n
1239
+ checkable: l
1230
1240
  }) => {
1231
- const u = [], v = [], s = [], d = [];
1232
- e.forEach((r) => {
1233
- if (r.hideInSetting)
1241
+ const o = [], i = [], h = [], d = [];
1242
+ e.forEach((s) => {
1243
+ if (s.hideInSetting)
1234
1244
  return;
1235
1245
  const {
1236
- fixed: S,
1237
- show: f,
1238
- uuid: m
1239
- } = r;
1240
- if ((f || f === void 0) && m && d.push(m), S === "left") {
1241
- v.push(r);
1246
+ fixed: C,
1247
+ show: c,
1248
+ uuid: y
1249
+ } = s;
1250
+ if ((c || c === void 0) && y && d.push(y), C === "left") {
1251
+ i.push(s);
1242
1252
  return;
1243
1253
  }
1244
- if (S === "right") {
1245
- u.push(r);
1254
+ if (C === "right") {
1255
+ o.push(s);
1246
1256
  return;
1247
1257
  }
1248
- s.push(r);
1258
+ h.push(s);
1249
1259
  });
1250
- const p = u && u.length > 0, i = v && v.length > 0;
1251
- return o("div", {
1260
+ const p = o && o.length > 0, r = i && i.length > 0;
1261
+ return u("div", {
1252
1262
  class: {
1253
- [`${l}-list`]: !0,
1254
- [`${l}-list-group`]: p || i
1263
+ [`${a}-list`]: !0,
1264
+ [`${a}-list-group`]: p || r
1255
1265
  }
1256
- }, [o(Me, {
1266
+ }, [u(De, {
1257
1267
  title: "\u56FA\u5B9A\u5728\u5DE6\u4FA7",
1258
- list: v,
1268
+ list: i,
1259
1269
  keys: d,
1260
1270
  draggable: t,
1261
- checkable: n,
1262
- className: l
1263
- }, null), o(Me, {
1264
- list: s,
1271
+ checkable: l,
1272
+ className: a
1273
+ }, null), u(De, {
1274
+ list: h,
1265
1275
  keys: d,
1266
1276
  draggable: t,
1267
- checkable: n,
1277
+ checkable: l,
1268
1278
  title: "\u4E0D\u56FA\u5B9A",
1269
- showTitle: i || p,
1270
- className: l
1271
- }, null), o(Me, {
1279
+ showTitle: r || p,
1280
+ className: a
1281
+ }, null), u(De, {
1272
1282
  title: "\u56FA\u5B9A\u5728\u53F3\u4FA7",
1273
- list: u,
1283
+ list: o,
1274
1284
  keys: d,
1275
1285
  draggable: t,
1276
- checkable: n,
1277
- className: l
1286
+ checkable: l,
1287
+ className: a
1278
1288
  }, null)]);
1279
- }, In = (e) => {
1280
- var r, S;
1289
+ }, Nn = (e) => {
1290
+ var s, C;
1281
1291
  const {
1282
- checkedReset: l = !0
1283
- } = e, t = Be({
1292
+ checkedReset: a = !0
1293
+ } = e, t = $e({
1284
1294
  suffixCls: "table-column-setting",
1285
1295
  isPor: !0
1286
1296
  }), {
1287
- columns: n,
1288
- settingsAction: u
1289
- } = oe(), v = ve((f = !0) => {
1290
- const m = {}, C = (y) => {
1291
- y.forEach(({
1292
- key: R,
1297
+ columns: l,
1298
+ settingsAction: o
1299
+ } = ce(), i = ge((c = !0) => {
1300
+ const y = {}, S = (g) => {
1301
+ g.forEach(({
1302
+ key: x,
1293
1303
  fixed: F,
1294
- index: x,
1295
- children: k
1304
+ index: w,
1305
+ children: R
1296
1306
  }) => {
1297
- const I = nt(R, x);
1298
- I && (m[I] = {
1299
- show: f,
1307
+ const M = at(x, w);
1308
+ M && (y[M] = {
1309
+ show: c,
1300
1310
  fixed: F
1301
- }), k && C(k);
1311
+ }), R && S(R);
1302
1312
  });
1303
1313
  };
1304
- C(n.value), u == null || u.setColumnsMap(m, "show");
1305
- }), s = ve((f) => {
1306
- f.target.checked ? v() : v(!1);
1307
- }), d = ve(() => {
1308
- u == null || u.setColumnsMap(u == null ? void 0 : u.cacheColumnsMap, "fixed");
1309
- }), p = T(() => Object.values(u == null ? void 0 : u.columnsMap).filter((f) => !f || f.show === !1)), i = T(() => c(p).length > 0 && c(p).length !== n.value.length);
1310
- return o(jt, {
1314
+ S(l.value), o == null || o.setColumnsMap(y, "show");
1315
+ }), h = ge((c) => {
1316
+ c.target.checked ? i() : i(!1);
1317
+ }), d = ge(() => {
1318
+ o == null || o.setColumnsMap(o == null ? void 0 : o.cacheColumnsMap, "fixed");
1319
+ }), p = T(() => Object.values(o == null ? void 0 : o.columnsMap).filter((c) => !c || c.show === !1)), r = T(() => f(p).length > 0 && f(p).length !== l.value.length);
1320
+ return u(zt, {
1311
1321
  arrowPointAtCenter: !0,
1312
- title: o("div", {
1322
+ title: u("div", {
1313
1323
  class: `${t}-title`
1314
- }, [o(Nt, {
1315
- indeterminate: i.value,
1316
- checked: c(p).length === 0 && c(p).length !== n.value.length,
1317
- onChange: (f) => s(f)
1324
+ }, [u($t, {
1325
+ indeterminate: r.value,
1326
+ checked: f(p).length === 0 && f(p).length !== l.value.length,
1327
+ onChange: (c) => h(c)
1318
1328
  }, {
1319
- default: () => [he("\u5217\u5C55\u793A")]
1320
- }), l ? o("a", {
1329
+ default: () => [me("\u5217\u5C55\u793A")]
1330
+ }), a ? u("a", {
1321
1331
  onClick: d,
1322
1332
  class: `${t}-action-rest-button`
1323
- }, [he("\u91CD\u7F6E")]) : null, e != null && e.extra ? o(te, {
1333
+ }, [me("\u91CD\u7F6E")]) : null, e != null && e.extra ? u(te, {
1324
1334
  size: 12,
1325
1335
  align: "center"
1326
1336
  }, {
@@ -1329,103 +1339,103 @@ const Pe = ({
1329
1339
  overlayClassName: `${t}-overlay`,
1330
1340
  trigger: "click",
1331
1341
  placement: "bottomRight",
1332
- content: o(En, {
1333
- checkable: (r = e.checkable) != null ? r : !0,
1334
- draggable: (S = e.draggable) != null ? S : !0,
1342
+ content: u(En, {
1343
+ checkable: (s = e.checkable) != null ? s : !0,
1344
+ draggable: (C = e.draggable) != null ? C : !0,
1335
1345
  className: t,
1336
- localColumns: n.value
1346
+ localColumns: l.value
1337
1347
  }, null)
1338
1348
  }, {
1339
- default: () => [o(J, {
1349
+ default: () => [u(J, {
1340
1350
  title: "\u5217\u8BBE\u7F6E"
1341
1351
  }, {
1342
- default: () => [o(ot, null, null)]
1352
+ default: () => [u(ot, null, null)]
1343
1353
  })]
1344
1354
  });
1345
- }, st = () => {
1355
+ }, ct = () => {
1346
1356
  const {
1347
1357
  isFullscreen: e
1348
- } = et();
1349
- return e.value ? o(J, {
1358
+ } = nt();
1359
+ return e.value ? u(J, {
1350
1360
  title: "\u9000\u51FA\u5168\u5C4F"
1351
1361
  }, {
1352
- default: () => [o(tn, null, null)]
1353
- }) : o(J, {
1362
+ default: () => [u(nn, null, null)]
1363
+ }) : u(J, {
1354
1364
  title: "\u5168\u5C4F"
1355
1365
  }, {
1356
- default: () => [o(nn, null, null)]
1366
+ default: () => [u(ln, null, null)]
1357
1367
  });
1358
- }, jn = () => {
1368
+ }, In = () => {
1359
1369
  const {
1360
1370
  action: e,
1361
- tableSize: l
1362
- } = oe();
1363
- return o(zt, {
1364
- overlay: o(Se, {
1365
- selectedKeys: [l.value],
1371
+ tableSize: a
1372
+ } = ce();
1373
+ return u(Yt, {
1374
+ overlay: u(Ce, {
1375
+ selectedKeys: [a.value],
1366
1376
  onClick: ({
1367
1377
  key: t
1368
1378
  }) => {
1369
- var n;
1370
- (n = e.setTableSize) == null || n.call(e, t);
1379
+ var l;
1380
+ (l = e.setTableSize) == null || l.call(e, t);
1371
1381
  },
1372
1382
  style: {
1373
1383
  width: 80
1374
1384
  }
1375
1385
  }, {
1376
- default: () => [o(Se.Item, {
1386
+ default: () => [u(Ce.Item, {
1377
1387
  key: "large"
1378
1388
  }, {
1379
- default: () => [he("\u9ED8\u8BA4")]
1380
- }), o(Se.Item, {
1389
+ default: () => [me("\u9ED8\u8BA4")]
1390
+ }), u(Ce.Item, {
1381
1391
  key: "middle"
1382
1392
  }, {
1383
- default: () => [he("\u4E2D\u7B49")]
1384
- }), o(Se.Item, {
1393
+ default: () => [me("\u4E2D\u7B49")]
1394
+ }), u(Ce.Item, {
1385
1395
  key: "small"
1386
1396
  }, {
1387
- default: () => [he("\u7D27\u51D1")]
1397
+ default: () => [me("\u7D27\u51D1")]
1388
1398
  })]
1389
1399
  }),
1390
1400
  trigger: ["click"]
1391
1401
  }, {
1392
- default: () => [o(J, {
1402
+ default: () => [u(J, {
1393
1403
  title: "\u8868\u683C\u5BC6\u5EA6"
1394
1404
  }, {
1395
- default: () => [o(ln, null, null)]
1405
+ default: () => [u(an, null, null)]
1396
1406
  })]
1397
1407
  });
1398
1408
  };
1399
- function Xe(e) {
1400
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
1409
+ function Ze(e) {
1410
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ye(e);
1401
1411
  }
1402
1412
  const {
1403
- useBreakpoint: Nn
1404
- } = $e;
1413
+ useBreakpoint: jn
1414
+ } = je;
1405
1415
  function zn(e) {
1406
- if (de(e))
1416
+ if (ye(e))
1407
1417
  return e;
1408
1418
  if (e) {
1409
- const l = e, {
1419
+ const a = e, {
1410
1420
  icon: t,
1411
- tooltip: n,
1412
- onClick: u,
1413
- key: v
1414
- } = l;
1415
- return t && n ? o(J, {
1416
- title: n
1421
+ tooltip: l,
1422
+ onClick: o,
1423
+ key: i
1424
+ } = a;
1425
+ return t && l ? u(J, {
1426
+ title: l
1417
1427
  }, {
1418
- default: () => [o("span", {
1419
- key: v,
1428
+ default: () => [u("span", {
1429
+ key: i,
1420
1430
  onClick: () => {
1421
- u && u(v);
1431
+ o && o(i);
1422
1432
  }
1423
1433
  }, [t])]
1424
1434
  }) : t;
1425
1435
  }
1426
1436
  return null;
1427
1437
  }
1428
- const ct = we({
1438
+ const dt = we({
1429
1439
  props: {
1430
1440
  actions: ne.toolBarBtn,
1431
1441
  settings: [Array],
@@ -1436,177 +1446,176 @@ const ct = we({
1436
1446
  optionsExtra: ne.optionsExtra
1437
1447
  },
1438
1448
  setup(e) {
1439
- const l = Nn(), t = T(() => {
1440
- var i;
1441
- return !!(e.titleTip || e.headerTitle || ((i = e.actions) == null ? void 0 : i.length));
1442
- }), n = T(() => {
1443
- var i;
1444
- return !!(((i = e.settings) == null ? void 0 : i.length) || e.optionsExtra);
1445
- }), u = T(() => !!(e.titleTip || e.headerTitle)), v = pe(() => {
1449
+ const a = jn(), t = T(() => {
1446
1450
  var r;
1447
- let i;
1448
- return Array.isArray(e.actions) ? ((r = e.actions) == null ? void 0 : r.length) < 1 ? null : o(te, {
1451
+ return !!(e.titleTip || e.headerTitle || ((r = e.actions) == null ? void 0 : r.length));
1452
+ }), l = T(() => {
1453
+ var r;
1454
+ return !!(((r = e.settings) == null ? void 0 : r.length) || e.optionsExtra);
1455
+ }), o = T(() => !!(e.titleTip || e.headerTitle)), i = Se(() => {
1456
+ var s;
1457
+ let r;
1458
+ return Array.isArray(e.actions) ? ((s = e.actions) == null ? void 0 : s.length) < 1 ? null : u(te, {
1449
1459
  align: "center"
1450
- }, Xe(i = e.actions.map((S, f) => de(S) ? Ot(S, {
1451
- key: f,
1452
- ...S == null ? void 0 : S.props
1453
- }) : o("template", {
1454
- key: f
1455
- }, [S]))) ? i : {
1456
- default: () => [i]
1460
+ }, Ze(r = e.actions.map((C, c) => ye(C) ? Et(C, {
1461
+ key: c,
1462
+ ...C == null ? void 0 : C.props
1463
+ }) : u("template", {
1464
+ key: c
1465
+ }, [C]))) ? r : {
1466
+ default: () => [r]
1457
1467
  }) : e.actions;
1458
- }), s = pe(() => !t.value && n.value ? o("div", {
1468
+ }), h = Se(() => !t.value && l.value ? u("div", {
1459
1469
  class: `${e.prefixCls}-left`
1460
- }, null) : u.value ? o(te, {
1470
+ }, null) : o.value ? u(te, {
1461
1471
  class: `${e.prefixCls}-left`
1462
1472
  }, {
1463
- default: () => [o("div", {
1473
+ default: () => [u("div", {
1464
1474
  class: `${e.prefixCls}-title`
1465
- }, [e.headerTitle, e.titleTip && o(J, {
1475
+ }, [e.headerTitle, e.titleTip && u(J, {
1466
1476
  title: e.titleTipText
1467
1477
  }, {
1468
- default: () => [re(e.titleTip) && e.titleTip ? o(an, null, null) : e.titleTip]
1469
- })]), v.value && o("div", {
1478
+ default: () => [re(e.titleTip) && e.titleTip ? u(un, null, null) : e.titleTip]
1479
+ })]), i.value && u("div", {
1470
1480
  class: `${e.prefixCls}-actions`
1471
- }, [v.value])]
1472
- }) : o(te, {
1481
+ }, [i.value])]
1482
+ }) : u(te, {
1473
1483
  class: `${e.prefixCls}-left`
1474
1484
  }, {
1475
- default: () => [v.value && o("div", {
1485
+ default: () => [i.value && u("div", {
1476
1486
  class: `${e.prefixCls}-actions`
1477
- }, [v.value])]
1478
- })), d = pe(() => {
1479
- let i;
1480
- return n.value ? o(te, {
1487
+ }, [i.value])]
1488
+ })), d = Se(() => {
1489
+ let r;
1490
+ return l.value ? u(te, {
1481
1491
  size: 16,
1482
1492
  class: `${e.prefixCls}-right`,
1483
- align: l.value.lg ? "center" : "end",
1484
- direction: l.value.lg ? "horizontal" : "vertical"
1493
+ align: a.value.lg ? "center" : "end",
1494
+ direction: a.value.lg ? "horizontal" : "vertical"
1485
1495
  }, {
1486
1496
  default: () => {
1487
- var r;
1488
- return [e.optionsExtra, (r = e.settings) != null && r.length ? o(te, {
1497
+ var s;
1498
+ return [e.optionsExtra, (s = e.settings) != null && s.length ? u(te, {
1489
1499
  size: 12,
1490
1500
  align: "center",
1491
1501
  class: `${e.prefixCls}-setting-items`
1492
- }, Xe(i = e.settings.map((S, f) => {
1493
- const m = zn(S);
1494
- return o("div", {
1495
- key: f,
1502
+ }, Ze(r = e.settings.map((C, c) => {
1503
+ const y = zn(C);
1504
+ return u("div", {
1505
+ key: c,
1496
1506
  class: `${e.prefixCls}-setting-item`
1497
- }, [m]);
1498
- })) ? i : {
1499
- default: () => [i]
1507
+ }, [y]);
1508
+ })) ? r : {
1509
+ default: () => [r]
1500
1510
  }) : null];
1501
1511
  }
1502
1512
  }) : null;
1503
- }), p = pe(() => {
1504
- if (!n.value && !t.value)
1513
+ }), p = Se(() => {
1514
+ if (!l.value && !t.value)
1505
1515
  return null;
1506
- const i = {
1516
+ const r = {
1507
1517
  [`${e.prefixCls}-container`]: !0,
1508
- [`${e.prefixCls}-container-mobile`]: !l.value.xl
1518
+ [`${e.prefixCls}-container-mobile`]: !a.value.xl
1509
1519
  };
1510
- return o("div", {
1511
- class: i
1512
- }, [s.value, d.value]);
1520
+ return u("div", {
1521
+ class: r
1522
+ }, [h.value, d.value]);
1513
1523
  });
1514
- return () => o("div", {
1524
+ return () => u("div", {
1515
1525
  class: `${e.prefixCls}`
1516
1526
  }, [p.value]);
1517
1527
  }
1518
1528
  });
1519
- ct.inheritAttrs = !1;
1529
+ dt.inheritAttrs = !1;
1520
1530
  function $n() {
1521
1531
  return {
1522
1532
  reload: {
1523
1533
  text: "\u5237\u65B0",
1524
- icon: o(on, null, null)
1534
+ icon: u(on, null, null)
1525
1535
  },
1526
1536
  density: {
1527
1537
  text: "\u8868\u683C\u5BC6\u5EA6",
1528
- icon: o(jn, null, null)
1538
+ icon: u(In, null, null)
1529
1539
  },
1530
1540
  setting: {
1531
1541
  text: "\u5217\u8BBE\u7F6E",
1532
- icon: o(ot, null, null)
1542
+ icon: u(ot, null, null)
1533
1543
  },
1534
1544
  fullScreen: {
1535
1545
  text: "\u5168\u5C4F",
1536
- icon: o(st, null, null)
1546
+ icon: u(ct, null, null)
1537
1547
  }
1538
1548
  };
1539
1549
  }
1540
- function Bn(e, l) {
1550
+ function Yn(e, a) {
1541
1551
  return Object.keys(e).filter((t) => t).map((t) => {
1542
- const n = e[t];
1543
- if (!n)
1552
+ const l = e[t];
1553
+ if (!l)
1544
1554
  return null;
1545
- let u = n === !0 ? l[t] : () => n == null ? void 0 : n();
1546
- if (typeof u != "function" && (u = () => {
1555
+ let o = l === !0 ? a[t] : () => l == null ? void 0 : l();
1556
+ if (typeof o != "function" && (o = () => {
1547
1557
  }), t === "setting")
1548
- return o(In, ce(e[t], {
1558
+ return u(Nn, _(e[t], {
1549
1559
  key: t
1550
1560
  }), null);
1551
1561
  if (t === "fullScreen")
1552
- return o("span", {
1562
+ return u("span", {
1553
1563
  key: t,
1554
- onClick: u
1555
- }, [o(st, null, null)]);
1556
- const v = $n()[t];
1557
- return v ? o("span", {
1564
+ onClick: o
1565
+ }, [u(ct, null, null)]);
1566
+ const i = $n()[t];
1567
+ return i ? u("span", {
1558
1568
  key: t,
1559
- onClick: u
1560
- }, [o(J, {
1561
- title: v.text
1569
+ onClick: o
1570
+ }, [u(J, {
1571
+ title: i.text
1562
1572
  }, {
1563
- default: () => [v.icon]
1573
+ default: () => [i.icon]
1564
1574
  })]) : null;
1565
1575
  }).filter((t) => t);
1566
1576
  }
1567
- function Yn({
1577
+ function Bn({
1568
1578
  toolBarBtn: e,
1569
- headerTitle: l,
1579
+ headerTitle: a,
1570
1580
  titleTip: t,
1571
- titleTipText: n,
1572
- options: u,
1573
- optionsExtra: v,
1574
- settingExtra: s
1581
+ titleTipText: l,
1582
+ options: o,
1583
+ optionsExtra: i,
1584
+ settingExtra: h
1575
1585
  }) {
1576
- const d = E(), p = Be({
1586
+ const d = $e({
1577
1587
  suffixCls: "table-list-toolbar",
1578
1588
  isPor: !0
1579
1589
  }), {
1580
- action: i
1581
- } = oe(), r = T(() => {
1582
- const f = {
1583
- reload: () => i == null ? void 0 : i.reload(),
1590
+ action: p
1591
+ } = ce(), r = T(() => {
1592
+ const C = {
1593
+ reload: () => p == null ? void 0 : p.reload(),
1584
1594
  density: !0,
1585
1595
  setting: !0,
1586
- fullScreen: () => i == null ? void 0 : i.toggle()
1596
+ fullScreen: () => p == null ? void 0 : p.toggle()
1587
1597
  };
1588
- if (!Object.keys(u || {}).length)
1598
+ if (!Object.keys(o || {}).length)
1589
1599
  return [];
1590
- const m = {
1591
- ...f,
1592
- ...u
1600
+ const c = {
1601
+ ...C,
1602
+ ...o
1593
1603
  };
1594
- return m.setting !== !1 && s && (m.setting = {}, m.setting.extra = s), Bn(m, {
1595
- ...f
1604
+ return c.setting !== !1 && h && (c.setting = {}, c.setting.extra = h), Yn(c, {
1605
+ ...C
1596
1606
  });
1597
1607
  });
1598
- return o(ct, {
1599
- ref: () => d.value,
1600
- prefixCls: p,
1608
+ return u(dt, {
1609
+ prefixCls: d,
1601
1610
  actions: e || [],
1602
- optionsExtra: v,
1603
- headerTitle: l,
1604
- settings: c(r),
1611
+ optionsExtra: i,
1612
+ headerTitle: a,
1613
+ settings: f(r),
1605
1614
  titleTip: t,
1606
- titleTipText: n
1615
+ titleTipText: l
1607
1616
  }, null);
1608
1617
  }
1609
- const Kn = (e) => o(Yn, e, null), Ln = [
1618
+ const Kn = (e) => u(Bn, e, null), Ln = [
1610
1619
  "search",
1611
1620
  "headerTitle",
1612
1621
  "toolBarBtn",
@@ -1617,299 +1626,295 @@ const Kn = (e) => o(Yn, e, null), Ln = [
1617
1626
  "customize"
1618
1627
  ];
1619
1628
  function Vn(e) {
1620
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
1629
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ye(e);
1621
1630
  }
1622
- function Hn(e, l, t) {
1623
- let n = e;
1624
- if (at(l)) {
1625
- const u = l.node === "a" ? "span" : l.node;
1626
- return o(u, ce(l.attr, {
1627
- class: [l.class, l.node === "a" ? `${t}-a` : ""],
1628
- onClick: l.click
1631
+ function Hn(e, a, t) {
1632
+ if (!a)
1633
+ return e;
1634
+ let l = e;
1635
+ if (ze(a)) {
1636
+ const o = a.node === "a" ? "span" : a.node;
1637
+ return u(o, _(a.attr, {
1638
+ class: [a.class, a.node === "a" ? `${t}-a` : ""],
1639
+ onClick: a.click
1629
1640
  }), Vn(e) ? e : {
1630
1641
  default: () => [e]
1631
1642
  });
1632
1643
  }
1633
- switch (l) {
1644
+ switch (a) {
1634
1645
  case "link":
1635
- n = o("span", {
1646
+ l = u("span", {
1636
1647
  class: `${t}-a`
1637
1648
  }, [e]);
1638
1649
  break;
1639
1650
  case "time":
1640
- n = V(e).format("HH:mm:ss");
1651
+ l = V(e).format("HH:mm:ss");
1641
1652
  break;
1642
1653
  case "dateMonth":
1643
- n = `${V(e).month() + 1}\u6708`;
1654
+ l = `${V(e).month() + 1}\u6708`;
1644
1655
  break;
1645
1656
  case "dateTime":
1646
- n = V(e).format("YYYY-MM-DD HH:mm:ss");
1657
+ l = V(e).format("YYYY-MM-DD HH:mm:ss");
1647
1658
  break;
1648
1659
  }
1649
- return n;
1660
+ return l;
1650
1661
  }
1651
1662
  const {
1652
- useBreakpoint: An
1653
- } = $e, Wn = {
1663
+ useBreakpoint: Wn
1664
+ } = je, An = {
1654
1665
  reload: !0,
1655
1666
  density: !0,
1656
1667
  setting: !0,
1657
1668
  fullScreen: !0
1658
- }, Ee = we({
1659
- name: "ProTable",
1669
+ }, Oe = we({
1670
+ name: "GProTable",
1660
1671
  props: ne,
1661
1672
  emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
1673
+ slots: ["customize", "search", "toolBarBtn", "headerTitle", "titleTip", "optionsExtra"],
1662
1674
  setup(e, {
1663
- emit: l,
1675
+ emit: a,
1664
1676
  slots: t,
1665
- attrs: n
1677
+ attrs: l,
1678
+ expose: o
1666
1679
  }) {
1667
- const u = Be({
1680
+ const i = $e({
1668
1681
  suffixCls: "table",
1669
1682
  isPor: !0
1670
- }), v = An(), s = E(window.innerWidth), d = E(), p = E(), {
1671
- toggle: i,
1672
- isFullscreen: r
1673
- } = et(d), S = T(() => ({
1683
+ }), h = Wn(), d = N(window.innerWidth), p = N(), r = N(), s = N(e.waitRequest);
1684
+ oe(() => s.value = e.waitRequest);
1685
+ const {
1686
+ toggle: C,
1687
+ isFullscreen: c
1688
+ } = nt(p), y = T(() => ({
1674
1689
  ...e
1675
- })), f = T(() => {
1676
- var b, w;
1677
- return e.virtualScroll && un(!((b = e.scroll) != null && b.y), "\u53C2\u6570scroll\u7684Y\u503C\u4E0D\u80FD\u4E3A\u7A7A\uFF01"), !!(((w = e.scroll) == null ? void 0 : w.y) && e.virtualScroll);
1678
- }), m = T(() => {
1679
- const b = (e.columns || []).map((w) => ({
1680
- ...w,
1681
- key: w.key || w.dataIndex,
1682
- align: w.align || e.align,
1690
+ })), S = T(() => {
1691
+ var m, k;
1692
+ return e.virtualScroll && sn(!((m = e.scroll) != null && m.y), "\u53C2\u6570scroll\u7684Y\u503C\u4E0D\u80FD\u4E3A\u7A7A\uFF01"), !!(((k = e.scroll) == null ? void 0 : k.y) && e.virtualScroll);
1693
+ }), g = T(() => {
1694
+ const m = (e.columns || []).map((k) => ({
1695
+ ...k,
1696
+ key: k.key || k.dataIndex,
1697
+ align: k.align || e.align,
1683
1698
  uuid: Ne().uuid(15)
1684
1699
  }));
1685
- return qt(b, {
1700
+ return Gt(m, {
1686
1701
  align: e.align,
1687
1702
  showIndex: e.showIndex
1688
1703
  });
1689
1704
  }), {
1690
- getLoading: C,
1691
- setLoading: y
1692
- } = rn({
1693
- emit: l,
1694
- loading: G(e, "loading")
1705
+ getLoading: x,
1706
+ setLoading: F
1707
+ } = cn({
1708
+ emit: a,
1709
+ loading: U(e, "loading")
1695
1710
  }), {
1696
- sizeRef: R,
1697
- setTableSize: F
1711
+ sizeRef: w,
1712
+ setTableSize: R
1698
1713
  } = dn({
1699
- emit: l,
1700
- size: G(e, "size")
1714
+ emit: a,
1715
+ size: U(e, "size")
1701
1716
  }), {
1702
- getPaginationInfo: x,
1703
- setPagination: k
1717
+ getPaginationInfo: M,
1718
+ setPagination: I
1704
1719
  } = fn({
1705
1720
  slots: t,
1706
- props: S,
1707
- pagination: G(e, "pagination")
1708
- }), I = pn(e), {
1709
- getScrollRef: N,
1710
- breakpoint: B
1711
- } = xn({
1712
- ...I,
1713
- innerWidth: s,
1714
- columns: m,
1715
- screensRef: v
1716
- }), L = Cn(e), {
1717
- getProColumns: _,
1718
- cacheProColumns: a,
1719
- setColumns: h,
1720
- changeColumns: D,
1721
- resizeColumnWidth: M
1721
+ props: y,
1722
+ pagination: U(e, "pagination")
1723
+ }), Y = xn(e), {
1724
+ getScrollRef: B,
1725
+ breakpoint: X
1726
+ } = wn({
1727
+ ...Y,
1728
+ innerWidth: d,
1729
+ columns: g,
1730
+ screensRef: h
1731
+ }), n = Cn(e), {
1732
+ getProColumns: v,
1733
+ cacheProColumns: D,
1734
+ setColumns: O,
1735
+ changeColumns: b,
1736
+ resizeColumnWidth: L
1722
1737
  } = Sn({
1723
- ...L,
1724
- breakpoint: B,
1725
- scroll: N,
1726
- columns: m
1738
+ ...n,
1739
+ breakpoint: X,
1740
+ scroll: B,
1741
+ columns: g
1727
1742
  }), {
1728
- columnsMap: j,
1729
- operationType: g,
1730
- setColumnsMap: Te,
1731
- sortKeyColumns: P,
1732
- cacheColumnsMap: z,
1733
- setSortKeyColumns: Y
1734
- } = bn({
1735
- columns: a,
1736
- columnsState: G(e, "columnsState"),
1737
- changeColumns: D
1743
+ columnsMap: Te,
1744
+ operationType: P,
1745
+ setColumnsMap: j,
1746
+ sortKeyColumns: K,
1747
+ cacheColumnsMap: le,
1748
+ setSortKeyColumns: de
1749
+ } = pn({
1750
+ columns: D,
1751
+ columnsState: U(e, "columnsState"),
1752
+ changeColumns: b
1738
1753
  }), {
1739
- formDataRef: K,
1740
- formParamsRef: ue,
1741
- defaultParamsRef: Re,
1742
- setFormParams: me
1743
- } = yn({
1744
- search: G(e, "search"),
1745
- searchMap: G(e, "searchMap"),
1746
- params: G(e, "params"),
1747
- columns: m
1754
+ formDataRef: be,
1755
+ formParamsRef: fe,
1756
+ defaultParamsRef: pe,
1757
+ setFormParams: Q
1758
+ } = bn({
1759
+ search: U(e, "search"),
1760
+ searchMap: U(e, "searchMap"),
1761
+ params: U(e, "params"),
1762
+ columns: g
1748
1763
  }), {
1749
- selectedKey: ge,
1750
- changeRowKey: ke,
1751
- selectRowKey: ye,
1752
- selectAllRowKey: be,
1753
- syncSelectedRows: Z,
1754
- removeRowKeys: Ce
1755
- } = hn(G(e, "rowKey"), G(e, "rowSelection")), fe = mn(e), {
1756
- reload: W,
1757
- reSetDataList: ie,
1758
- changeDataValue: A,
1759
- isTreeDataRef: Ye,
1760
- getDataSourceRef: Fe,
1761
- handleTableChange: Ke
1764
+ selectedKey: Ye,
1765
+ changeRowKey: he,
1766
+ selectRowKey: q,
1767
+ selectAllRowKey: ie,
1768
+ syncSelectedRows: z,
1769
+ removeRowKeys: ae
1770
+ } = hn(U(e, "rowKey"), U(e, "rowSelection")), W = mn(e), {
1771
+ reload: Re,
1772
+ reSetDataList: ft,
1773
+ changeDataValue: ht,
1774
+ isTreeDataRef: Be,
1775
+ getDataSourceRef: Ke,
1776
+ handleTableChange: Le
1762
1777
  } = gn({
1763
- ...fe
1778
+ ...W,
1779
+ waitRequest: s
1764
1780
  }, {
1765
- getLoading: C,
1766
- getPaginationInfo: x,
1767
- setPagination: k,
1768
- removeRowKeys: Ce,
1769
- syncSelectedRows: Z,
1770
- setLoading: y,
1771
- setColumns: h,
1772
- columns: _,
1773
- formParamsRef: ue,
1781
+ getLoading: x,
1782
+ getPaginationInfo: M,
1783
+ setPagination: I,
1784
+ removeRowKeys: ae,
1785
+ syncSelectedRows: z,
1786
+ setLoading: F,
1787
+ setColumns: O,
1788
+ columns: v,
1789
+ formParamsRef: fe,
1774
1790
  onBeforeSearchSubmit: e.onBeforeSearchSubmit
1775
- }, l), rt = T(() => {
1776
- if (e.options) {
1777
- const b = H(at(e.options) ? e.options : {});
1778
- return {
1779
- ...Wn,
1780
- ...b
1781
- };
1782
- }
1783
- return {};
1784
- }), dt = () => {
1785
- var b;
1786
- (b = e.actionRef) == null || b.call(e, {
1787
- pageParams: x.value,
1788
- getLoadingStatus: C.value,
1789
- reload: (w) => W(w),
1790
- reloadAndRest: () => {
1791
- De({
1792
- current: 1,
1793
- pageSize: 10
1794
- }), W();
1795
- },
1796
- reSetDataList: ie,
1797
- changePageInfo: (w, O, q) => De(w, O, q),
1798
- changeDataValue: ({
1799
- key: w,
1800
- params: O
1801
- }) => A({
1802
- key: w,
1803
- params: O
1804
- }),
1805
- loadingOperation: (w) => y(w)
1806
- });
1807
- }, ft = () => {
1808
- var b, w;
1809
- (w = e.formRef) == null || w.call(e, {
1810
- formParams: ue.value,
1811
- restForm: e.search.showSearch ? (b = p.value) == null ? void 0 : b.resetFormParams() : null
1812
- });
1813
- };
1814
- ae(() => {
1815
- e.actionRef && dt(), e.formRef && ft();
1816
- }), Pt(() => {
1817
- window.addEventListener("resize", Le);
1818
- }), Ze(() => {
1819
- window.removeEventListener("resize", Le);
1791
+ }, a), vt = T(() => e.options ? {
1792
+ ...An,
1793
+ ...H(ze(e.options) ? e.options : {})
1794
+ } : {});
1795
+ tt(() => {
1796
+ window.addEventListener("resize", Ve);
1797
+ }), et(() => {
1798
+ window.removeEventListener("resize", Ve);
1820
1799
  });
1821
- const Le = () => {
1822
- s.value = window.innerWidth;
1823
- }, Ve = T(() => {
1824
- const b = c(Fe);
1825
- let w = {
1826
- ...n,
1800
+ const Ve = () => {
1801
+ d.value = window.innerWidth;
1802
+ }, He = T(() => {
1803
+ const m = f(Ke);
1804
+ let k = {
1805
+ ...l,
1827
1806
  ...e,
1828
- virtualScroll: f.value,
1829
- size: c(R),
1830
- scroll: c(N),
1831
- loading: !!c(C),
1832
- columns: Oe(c(_).filter((O) => O.show || O.show === void 0)),
1833
- pagination: Oe(c(x)),
1834
- dataSource: b
1807
+ virtualScroll: S.value,
1808
+ size: f(w),
1809
+ scroll: f(B),
1810
+ loading: !!f(x),
1811
+ columns: ke(f(v).filter((E) => E.show || E.show === void 0)),
1812
+ pagination: ke(f(M)),
1813
+ dataSource: m
1835
1814
  };
1836
- return w = _e(w, ["class", "onChange", "onExpand", "onExpandedRowsChange"]), w;
1837
- }), ht = T(() => {
1838
- var b;
1815
+ return k = Ge(k, ["class", "onChange", "onExpand", "onExpandedRowsChange"]), k;
1816
+ }), mt = T(() => {
1817
+ var m;
1839
1818
  return [{
1840
- [`${u}`]: !0,
1841
- [`${n.class}`]: n.class,
1842
- [`${u}-no-scroll`]: !Object.keys(((b = Ve.value) == null ? void 0 : b.scroll) || {}).length,
1843
- [`${u}-table-tree`]: Ye.value,
1844
- [`${u}-full-screen`]: r.value
1819
+ [`${i}`]: !0,
1820
+ [`${l.class}`]: l.class,
1821
+ [`${i}-no-scroll`]: !Object.keys(((m = He.value) == null ? void 0 : m.scroll) || {}).length,
1822
+ [`${i}-table-tree`]: Be.value,
1823
+ [`${i}-full-screen`]: c.value
1845
1824
  }];
1846
1825
  });
1847
- Tn({
1848
- tableSize: R,
1849
- columns: _,
1850
- cacheColumns: m,
1826
+ Rn({
1827
+ tableSize: w,
1828
+ columns: v,
1829
+ cacheColumns: g,
1851
1830
  action: {
1852
- setTableSize: F,
1853
- reload: (b) => W(b),
1854
- toggle: i
1831
+ setTableSize: R,
1832
+ reload: (m) => Re(m),
1833
+ toggle: C
1855
1834
  },
1856
1835
  settingsAction: {
1857
- autoScroll: G(e, "autoScroll"),
1858
- columnsMap: j,
1859
- operationType: g,
1860
- setColumnsMap: Te,
1861
- sortKeyColumns: P,
1862
- cacheColumnsMap: z,
1863
- setSortKeyColumns: Y
1836
+ autoScroll: U(e, "autoScroll"),
1837
+ columnsMap: Te,
1838
+ operationType: P,
1839
+ setColumnsMap: j,
1840
+ sortKeyColumns: K,
1841
+ cacheColumnsMap: le,
1842
+ setSortKeyColumns: de
1864
1843
  },
1865
- setPagination: k,
1866
- changeColumns: D,
1844
+ setPagination: I,
1845
+ changeColumns: b,
1867
1846
  slots: t
1847
+ }), o({
1848
+ formRef: () => ({
1849
+ formParams: fe,
1850
+ getFormState: () => {
1851
+ var m;
1852
+ return ((m = r.value) == null ? void 0 : m.getFormState()) || {};
1853
+ },
1854
+ restForm: (m) => {
1855
+ var k;
1856
+ s.value = !0, m && (m == null || m()), (k = r.value) == null || k.resetForm(!1), s.value = !1;
1857
+ }
1858
+ }),
1859
+ actionRef: () => ({
1860
+ pageParams: M.value,
1861
+ getLoadingStatus: x.value,
1862
+ reload: Re,
1863
+ reloadAndRest: async (m) => {
1864
+ s.value = !0, I({
1865
+ current: 1,
1866
+ pageSize: 10
1867
+ }), m && (m == null || m()), s.value = !1;
1868
+ },
1869
+ reSetDataList: ft,
1870
+ changePageInfo: _e,
1871
+ changeDataValue: ht,
1872
+ loadingOperation: F
1873
+ })
1868
1874
  });
1869
- const vt = (b) => {
1870
- const w = {};
1871
- return Object.keys(b).map((O) => (Ln.includes(O) || (w[O] = b[O]), O)), w;
1872
- }, He = T(() => {
1873
- var q;
1874
- let b;
1875
- const w = c(S).direction === "rtl" ? "bottomLeft" : "right", O = (q = c(x)) == null ? void 0 : q.position;
1876
- if (O !== null && Array.isArray(O)) {
1877
- const Q = O.find((ee) => ee.indexOf("top") !== -1), $ = O.find((ee) => ee.indexOf("bottom") !== -1), U = O.every((ee) => `${ee}` == "none");
1878
- !Q && !$ && !U && (b = w), Q && (b = Q.toLowerCase().replace("top", "")), $ && (b = $.toLowerCase().replace("bottom", ""));
1875
+ const gt = (m) => {
1876
+ const k = {};
1877
+ return Object.keys(m).map((E) => (Ln.includes(E) || (k[E] = m[E]), E)), k;
1878
+ }, We = T(() => {
1879
+ var Z;
1880
+ let m;
1881
+ const k = f(y).direction === "rtl" ? "bottomLeft" : "right", E = (Z = f(M)) == null ? void 0 : Z.position;
1882
+ if (E !== null && Array.isArray(E)) {
1883
+ const se = E.find((ee) => ee.indexOf("top") !== -1), $ = E.find((ee) => ee.indexOf("bottom") !== -1), A = E.every((ee) => `${ee}` == "none");
1884
+ !se && !$ && !A && (m = k), se && (m = se.toLowerCase().replace("top", "")), $ && (m = $.toLowerCase().replace("bottom", ""));
1879
1885
  } else
1880
- b = w;
1881
- return b;
1882
- }), Ae = (b) => {
1883
- e.search.showSearch ? (me({
1884
- ...b,
1886
+ m = k;
1887
+ return m;
1888
+ }), Ae = async (m) => {
1889
+ e.search.showSearch ? (Q({
1890
+ ...m,
1885
1891
  ...e.params || {}
1886
- }), W()) : me(b);
1887
- }, mt = (b, w) => {
1888
- w ? (l("reset", b), e.request && Ae(b)) : e.request ? (l("submit", b), Ae(b)) : l("submit", b);
1889
- }, De = (b, w, O) => {
1890
- k({
1891
- current: b.current,
1892
- pageSize: b.pageSize
1893
- }), Ke(b, w, O);
1894
- }, gt = (b, w) => {
1895
- var O;
1896
- k({
1897
- current: b,
1898
- pageSize: w
1899
- }), Ke({
1900
- current: b,
1901
- pageSize: w,
1902
- total: x.value && ((O = x.value) == null ? void 0 : O.total) || 0
1903
- }, !1, !1);
1904
- }, yt = (b) => {
1905
- l("expandedRowsChange", b);
1906
- }, bt = (b, w) => {
1907
- l("expand", b, w);
1908
- }, Ct = (b, w) => M(b, w), St = (b, w, O) => {
1909
- let q = b;
1910
- const Q = O.align === "center" ? "top" : O.align === "left" || !O.align ? "topLeft" : "topRight";
1911
- return w && O.copyable ? q = o(Yt.Paragraph, {
1912
- class: `${u}-copyable`,
1892
+ }), await Re()) : Q(m);
1893
+ }, yt = async (m, k) => {
1894
+ k ? (a("reset", m), e.request && await Ae(m)) : e.request ? (a("submit", m), await Ae(m)) : a("submit", m);
1895
+ }, _e = (m, k = {}, E = {}) => {
1896
+ I({
1897
+ current: m.current,
1898
+ pageSize: m.pageSize
1899
+ }), Le(m, k, E);
1900
+ }, bt = (m, k) => {
1901
+ var E;
1902
+ I({
1903
+ current: m,
1904
+ pageSize: k
1905
+ }), Le({
1906
+ current: m,
1907
+ pageSize: k,
1908
+ total: M.value && ((E = M.value) == null ? void 0 : E.total) || 0
1909
+ }, {}, {});
1910
+ }, pt = (m) => {
1911
+ a("expandedRowsChange", m);
1912
+ }, Ct = (m, k) => {
1913
+ a("expand", m, k);
1914
+ }, St = (m, k) => L(m, k), xt = (m, k, E) => {
1915
+ const Z = E.align === "center" ? "top" : E.align === "left" || !E.align ? "topLeft" : "topRight";
1916
+ return k && E.copyable ? u(Lt.Paragraph, {
1917
+ class: `${i}-copyable`,
1913
1918
  style: {
1914
1919
  margin: "0",
1915
1920
  width: "100%",
@@ -1917,104 +1922,104 @@ const {
1917
1922
  },
1918
1923
  copyable: !0
1919
1924
  }, {
1920
- default: () => [o(J, {
1921
- title: b,
1922
- placement: Q
1925
+ default: () => [u(J, {
1926
+ title: m,
1927
+ placement: Z
1923
1928
  }, {
1924
- default: () => [o("div", {
1925
- class: `${u}-ellipsis`
1926
- }, [b])]
1929
+ default: () => [u("div", {
1930
+ class: `${i}-ellipsis`
1931
+ }, [m])]
1927
1932
  })]
1928
- }) : w && !O.copyable && (q = o(J, {
1929
- title: b,
1930
- placement: Q
1933
+ }) : k && !E.copyable ? u(J, {
1934
+ title: m,
1935
+ placement: Z
1931
1936
  }, {
1932
- default: () => [Ye.value ? b : o("div", {
1933
- class: `${u}-ellipsis`
1934
- }, [b])]
1935
- })), q;
1936
- }, pt = (b, w, O) => o(Kn, {
1937
- headerTitle: b,
1938
- titleTip: O,
1937
+ default: () => [Be.value ? m : u("div", {
1938
+ class: `${i}-ellipsis`
1939
+ }, [m])]
1940
+ }) : m;
1941
+ }, wt = () => {
1942
+ const m = it(t, e, "customize");
1943
+ return m ? m(Ke.value) : null;
1944
+ }, Tt = (m, k, E) => u(Kn, {
1945
+ headerTitle: m,
1946
+ titleTip: E,
1939
1947
  titleTipText: e.titleTipText,
1940
- options: c(rt),
1941
- settingExtra: se(t, e, "settingExtra"),
1942
- optionsExtra: se(t, e, "optionsExtra"),
1943
- toolBarBtn: w
1948
+ options: f(vt),
1949
+ settingExtra: ve(t, e, "settingExtra"),
1950
+ optionsExtra: ve(t, e, "optionsExtra"),
1951
+ toolBarBtn: k
1944
1952
  }, null);
1945
1953
  return () => {
1946
- var Q;
1947
- const b = se(t, e, "headerTitle"), w = se(t, e, "titleTip"), O = se(t, e, "toolBarBtn"), q = se(t, e, "customize");
1948
- return o("div", {
1949
- ref: ($) => d.value = $,
1950
- class: ht.value
1951
- }, [o("div", {
1954
+ var Z, se;
1955
+ const m = ve(t, e, "headerTitle"), k = ve(t, e, "titleTip"), E = ve(t, e, "toolBarBtn");
1956
+ return u("div", {
1957
+ ref: ($) => p.value = $,
1958
+ class: mt.value
1959
+ }, [u("div", {
1952
1960
  class: "gx-pro-table-content"
1953
- }, [(!!K.value.length || !!((Q = t.search) != null && Q.call(t))) && o(it, {
1954
- ref: p,
1961
+ }, [(!!be.value.length || !!((Z = t.search) != null && Z.call(t))) && u(rt, {
1962
+ ref: r,
1955
1963
  search: e.search,
1956
1964
  modal: e.modalScroll,
1957
- searchMap: K.value,
1958
- prefixCls: u,
1959
- loading: !!c(C),
1960
- onSearch: mt,
1961
- defaultParams: Re
1965
+ searchMap: be.value,
1966
+ prefixCls: i,
1967
+ loading: !!f(x),
1968
+ onSearch: yt,
1969
+ defaultParams: pe
1962
1970
  }, {
1963
1971
  default: t.search ? () => {
1964
1972
  var $;
1965
1973
  return ($ = t.search) == null ? void 0 : $.call(t);
1966
1974
  } : null
1967
- }), !f.value && pt(b, O, w), q ? o(je, {
1968
- spinning: !!c(C)
1975
+ }), !S.value && Tt(m, E, k), ((se = e.customize) != null ? se : t.customize) ? u(Pe, {
1976
+ spinning: !!f(x)
1969
1977
  }, {
1970
- default: () => {
1971
- var $;
1972
- return [e.customize ? e.customize(c(Fe)) : ($ = t.customize) == null ? void 0 : $.call(t, c(Fe)), o($t, ce({
1973
- class: {
1974
- ["ant-table-pagination"]: !0,
1975
- [`ant-table-pagination-${He.value}`]: He.value
1976
- }
1977
- }, Oe(c(x)), {
1978
- onChange: gt
1979
- }), null)];
1980
- }
1981
- }) : o(Bt, ce(Ve.value, {
1978
+ default: () => [wt(), u(Bt, _({
1979
+ class: {
1980
+ ["ant-table-pagination"]: !0,
1981
+ [`ant-table-pagination-${We.value}`]: We.value
1982
+ }
1983
+ }, ke(f(M)), {
1984
+ onChange: bt
1985
+ }), null)]
1986
+ }) : u(Kt, _(He.value, {
1982
1987
  style: e.tableStyle || void 0,
1983
1988
  class: e.tableClassName,
1984
1989
  rowKey: ($) => $[e.rowKey || "sortIndex"],
1985
1990
  transformCellText: ({
1986
1991
  text: $,
1987
- column: U
1992
+ column: A
1988
1993
  }) => {
1989
- const ee = $ == null ? void 0 : $[0];
1990
- if (de(ee))
1994
+ const ee = Ee($) ? $ == null ? void 0 : $[0] : $;
1995
+ if (ye(ee))
1991
1996
  return $;
1992
1997
  const {
1993
- value: xt,
1994
- success: wt
1995
- } = Ut(ee, (U == null ? void 0 : U.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText)), We = Hn(xt, U.valueType, u);
1996
- return U != null && U.ellipsis ? St(We, wt, U) : We;
1998
+ value: Rt,
1999
+ success: kt
2000
+ } = Ut(ee, (A == null ? void 0 : A.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText)), qe = Hn(Rt, A == null ? void 0 : A.valueType, i);
2001
+ return A != null && A.ellipsis ? xt(qe, kt, A) : qe;
1997
2002
  },
1998
2003
  rowSelection: e.rowSelection ? {
1999
- ..._e(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2000
- selectedRowKeys: ge.value,
2001
- onSelect: ye,
2002
- onSelectAll: be,
2003
- onChange: ke
2004
+ ...Ge(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2005
+ selectedRowKeys: Ye.value,
2006
+ onSelect: q,
2007
+ onSelectAll: ie,
2008
+ onChange: he
2004
2009
  } : void 0,
2005
- onChange: De,
2006
- onExpandedRowsChange: yt,
2007
- onExpand: bt,
2008
- onResizeColumn: Ct
2010
+ onChange: _e,
2011
+ onExpandedRowsChange: pt,
2012
+ onExpand: Ct,
2013
+ onResizeColumn: St
2009
2014
  }), {
2010
- ...vt(t)
2015
+ ...gt(t)
2011
2016
  })])]);
2012
2017
  };
2013
2018
  }
2014
2019
  });
2015
- Ee.install = (e) => (e.component(Ee.name, Ee), e);
2020
+ Oe.install = (e) => (e.component(Oe.name, Oe), e);
2016
2021
  export {
2017
- Ee as ProTable,
2018
- Ee as default,
2022
+ Oe as GProTable,
2023
+ Oe as default,
2019
2024
  ne as proTableProps
2020
2025
  };