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