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