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