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