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