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