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