@gx-design-vue/pro-table 0.0.3-rc.2 → 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 -1017
- 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,356 +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
|
-
|
|
817
|
+
l({
|
|
818
|
+
formState: D(),
|
|
819
|
+
resetFormParams: h
|
|
821
820
|
});
|
|
822
|
-
const
|
|
823
|
-
default: () => [
|
|
824
|
-
onClick: () =>
|
|
821
|
+
const z = () => (d.value || C.value) && o(ne, null, {
|
|
822
|
+
default: () => [C.value && o(Ge, {
|
|
823
|
+
onClick: () => E()
|
|
825
824
|
}, {
|
|
826
825
|
default: () => [e.search.resetText || "\u91CD\u7F6E"]
|
|
827
|
-
}),
|
|
826
|
+
}), d.value && o(Ge, {
|
|
828
827
|
loading: e.loading,
|
|
829
828
|
type: "primary",
|
|
830
829
|
onClick: () => x(!0)
|
|
831
830
|
}, {
|
|
832
831
|
default: () => [e.search.searchText || "\u67E5\u8BE2"]
|
|
833
832
|
})]
|
|
834
|
-
}),
|
|
835
|
-
formItemStyle:
|
|
836
|
-
advanced:
|
|
837
|
-
showAdvanced:
|
|
833
|
+
}), $ = ({
|
|
834
|
+
formItemStyle: n,
|
|
835
|
+
advanced: S,
|
|
836
|
+
showAdvanced: k = !0
|
|
838
837
|
}) => o("div", {
|
|
839
|
-
style:
|
|
838
|
+
style: n,
|
|
840
839
|
class: `${e.prefixCls}-form-collapse-button`
|
|
841
|
-
}, [o(
|
|
840
|
+
}, [o(ne, {
|
|
842
841
|
size: 16
|
|
843
842
|
}, {
|
|
844
|
-
default: () => [
|
|
843
|
+
default: () => [z(), k && o("span", {
|
|
845
844
|
class: `${e.prefixCls}-a`,
|
|
846
|
-
onClick: () =>
|
|
847
|
-
}, [
|
|
848
|
-
})]),
|
|
849
|
-
var
|
|
850
|
-
let
|
|
851
|
-
const
|
|
852
|
-
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) {
|
|
853
852
|
case "text":
|
|
854
|
-
|
|
853
|
+
k = o(O, {
|
|
855
854
|
style: {
|
|
856
855
|
width: "100%"
|
|
857
856
|
},
|
|
858
|
-
value:
|
|
859
|
-
placeholder:
|
|
860
|
-
allowClear:
|
|
861
|
-
onChange: (
|
|
862
|
-
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()
|
|
863
862
|
}, null);
|
|
864
863
|
break;
|
|
865
864
|
case "select":
|
|
866
|
-
|
|
865
|
+
k = o(Qe, {
|
|
867
866
|
style: {
|
|
868
867
|
width: "100%"
|
|
869
868
|
},
|
|
870
|
-
value:
|
|
869
|
+
value: n.loading ? void 0 : i[n.name],
|
|
871
870
|
optionFilterProp: "label",
|
|
872
|
-
placeholder:
|
|
873
|
-
showSearch:
|
|
874
|
-
allowClear:
|
|
875
|
-
getPopupContainer: (
|
|
876
|
-
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, {
|
|
877
876
|
size: "small"
|
|
878
877
|
}, null) : void 0,
|
|
879
|
-
onChange: (
|
|
880
|
-
}, kn(
|
|
881
|
-
key:
|
|
882
|
-
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
|
|
883
882
|
}, {
|
|
884
|
-
default: () => [
|
|
885
|
-
}))) ?
|
|
886
|
-
default: () => [
|
|
883
|
+
default: () => [p.text]
|
|
884
|
+
}))) ? S : {
|
|
885
|
+
default: () => [S]
|
|
887
886
|
});
|
|
888
887
|
break;
|
|
889
888
|
case "treeSelect":
|
|
890
|
-
|
|
889
|
+
k = o(jt, se({
|
|
891
890
|
style: {
|
|
892
891
|
width: "100%"
|
|
893
892
|
},
|
|
894
|
-
value:
|
|
895
|
-
placeholder:
|
|
896
|
-
allowClear:
|
|
897
|
-
treeData:
|
|
898
|
-
getPopupContainer: (
|
|
899
|
-
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, {
|
|
900
899
|
size: "small"
|
|
901
900
|
}, null) : void 0,
|
|
902
|
-
onChange: (
|
|
903
|
-
},
|
|
901
|
+
onChange: (p) => R(p, n)
|
|
902
|
+
}, n.field || {}), null);
|
|
904
903
|
break;
|
|
905
904
|
case "date":
|
|
906
|
-
|
|
905
|
+
k = o(tt, {
|
|
907
906
|
style: {
|
|
908
907
|
width: "100%"
|
|
909
908
|
},
|
|
910
|
-
value:
|
|
911
|
-
getPopupContainer: (
|
|
912
|
-
placeholder:
|
|
913
|
-
allowClear:
|
|
914
|
-
format:
|
|
915
|
-
showTime:
|
|
916
|
-
showToday:
|
|
917
|
-
renderExtraFooter:
|
|
918
|
-
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)
|
|
919
918
|
}, null);
|
|
920
919
|
break;
|
|
921
920
|
case "dateMonth":
|
|
922
|
-
|
|
921
|
+
k = o(Dn, {
|
|
923
922
|
style: {
|
|
924
923
|
width: "100%"
|
|
925
924
|
},
|
|
926
|
-
value:
|
|
927
|
-
getPopupContainer: (
|
|
928
|
-
placeholder:
|
|
929
|
-
renderExtraFooter:
|
|
930
|
-
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)
|
|
931
930
|
}, null);
|
|
932
931
|
break;
|
|
933
932
|
case "dateRange":
|
|
934
|
-
|
|
933
|
+
k = o(On, {
|
|
935
934
|
style: {
|
|
936
935
|
width: "100%"
|
|
937
936
|
},
|
|
938
|
-
value: (
|
|
939
|
-
getPopupContainer: (
|
|
940
|
-
placeholder:
|
|
941
|
-
format:
|
|
942
|
-
renderExtraFooter:
|
|
943
|
-
showTime:
|
|
944
|
-
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)
|
|
945
944
|
}, null);
|
|
946
945
|
break;
|
|
947
946
|
case "time":
|
|
948
|
-
|
|
947
|
+
k = o(Et, {
|
|
949
948
|
style: {
|
|
950
949
|
width: "100%"
|
|
951
950
|
},
|
|
952
|
-
value:
|
|
953
|
-
getPopupContainer: (
|
|
954
|
-
placeholder:
|
|
955
|
-
allowClear:
|
|
956
|
-
use12Hours:
|
|
957
|
-
format:
|
|
958
|
-
renderExtraFooter:
|
|
959
|
-
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)
|
|
960
959
|
}, null);
|
|
961
960
|
break;
|
|
962
961
|
}
|
|
963
|
-
return
|
|
964
|
-
},
|
|
965
|
-
formItemStyle:
|
|
966
|
-
item:
|
|
962
|
+
return k;
|
|
963
|
+
}, _ = ({
|
|
964
|
+
formItemStyle: n,
|
|
965
|
+
item: S
|
|
967
966
|
}) => o(Ue.Item, {
|
|
968
|
-
style:
|
|
967
|
+
style: n
|
|
969
968
|
}, {
|
|
970
|
-
default: () => [
|
|
969
|
+
default: () => [S.__v_isVNode ? S : H(S)]
|
|
971
970
|
}), q = () => {
|
|
972
|
-
var
|
|
973
|
-
const
|
|
974
|
-
return
|
|
975
|
-
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 = {
|
|
976
975
|
width: `${(100 - (m.value - 1) * 2) / m.value}%`
|
|
977
|
-
},
|
|
978
|
-
return
|
|
979
|
-
formItemStyle:
|
|
980
|
-
item:
|
|
981
|
-
}),
|
|
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 && $({
|
|
982
981
|
formItemStyle: {
|
|
983
982
|
flex: 1,
|
|
984
983
|
justifyContent: "flex-end"
|
|
985
984
|
},
|
|
986
|
-
advanced:
|
|
987
|
-
showAdvanced:
|
|
988
|
-
})]) : o(
|
|
989
|
-
formItemStyle:
|
|
990
|
-
item:
|
|
991
|
-
}),
|
|
992
|
-
formItemStyle:
|
|
993
|
-
item:
|
|
994
|
-
}),
|
|
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 && $({
|
|
995
994
|
formItemStyle: {
|
|
996
995
|
flex: 1,
|
|
997
996
|
justifyContent: "flex-end"
|
|
998
997
|
},
|
|
999
998
|
advanced: !1,
|
|
1000
|
-
showAdvanced:
|
|
999
|
+
showAdvanced: n.length >= m.value
|
|
1001
1000
|
})]);
|
|
1002
1001
|
});
|
|
1003
1002
|
};
|
|
1004
1003
|
return () => o("div", {
|
|
1005
1004
|
class: {
|
|
1006
|
-
[`${
|
|
1005
|
+
[`${r(e.prefixCls)}-search`]: !0,
|
|
1007
1006
|
[`${e.search.className}`]: e.search.className
|
|
1008
1007
|
}
|
|
1009
1008
|
}, [o(Ue, {
|
|
1010
|
-
class: `${
|
|
1009
|
+
class: `${r(e.prefixCls)}-form`,
|
|
1011
1010
|
layout: "horizontal"
|
|
1012
1011
|
}, {
|
|
1013
1012
|
default: () => [o("div", {
|
|
1014
|
-
class: `${
|
|
1013
|
+
class: `${r(e.prefixCls)}-form-container`
|
|
1015
1014
|
}, [q()])]
|
|
1016
1015
|
})]);
|
|
1017
1016
|
}
|
|
1018
1017
|
});
|
|
1019
|
-
|
|
1020
|
-
function Pn(e,
|
|
1021
|
-
for (var t =
|
|
1022
|
-
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];
|
|
1023
1022
|
delete t[u];
|
|
1024
1023
|
}
|
|
1025
1024
|
return t;
|
|
1026
1025
|
}
|
|
1027
|
-
const
|
|
1028
|
-
const
|
|
1029
|
-
return
|
|
1030
|
-
var
|
|
1031
|
-
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);
|
|
1032
1031
|
};
|
|
1033
1032
|
};
|
|
1034
|
-
const
|
|
1033
|
+
const Oe = ({
|
|
1035
1034
|
title: e,
|
|
1036
|
-
show:
|
|
1035
|
+
show: a,
|
|
1037
1036
|
treeKey: t,
|
|
1038
|
-
fixed:
|
|
1037
|
+
fixed: l
|
|
1039
1038
|
}, {
|
|
1040
1039
|
slots: u
|
|
1041
1040
|
}) => {
|
|
1042
1041
|
const {
|
|
1043
|
-
cacheColumns:
|
|
1044
|
-
settingsAction:
|
|
1042
|
+
cacheColumns: c,
|
|
1043
|
+
settingsAction: i
|
|
1045
1044
|
} = oe();
|
|
1046
|
-
return
|
|
1045
|
+
return a ? o(G, {
|
|
1047
1046
|
title: e
|
|
1048
1047
|
}, {
|
|
1049
1048
|
default: () => {
|
|
1050
|
-
var
|
|
1049
|
+
var h;
|
|
1051
1050
|
return [o("span", {
|
|
1052
|
-
onClick: (
|
|
1053
|
-
var m,
|
|
1054
|
-
|
|
1055
|
-
const
|
|
1056
|
-
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)
|
|
1057
1056
|
return;
|
|
1058
1057
|
const f = {
|
|
1059
|
-
...
|
|
1060
|
-
[
|
|
1061
|
-
...
|
|
1062
|
-
fixed:
|
|
1058
|
+
...i == null ? void 0 : i.columnsMap,
|
|
1059
|
+
[s]: {
|
|
1060
|
+
...d,
|
|
1061
|
+
fixed: l
|
|
1063
1062
|
}
|
|
1064
1063
|
};
|
|
1065
|
-
|
|
1064
|
+
i == null || i.setColumnsMap(f, "fixed");
|
|
1066
1065
|
}
|
|
1067
|
-
}, [(
|
|
1066
|
+
}, [(h = u.default) == null ? void 0 : h.call(u)])];
|
|
1068
1067
|
}
|
|
1069
1068
|
}) : null;
|
|
1070
1069
|
}, Mn = ({
|
|
1071
1070
|
treeKey: e,
|
|
1072
|
-
title:
|
|
1071
|
+
title: a,
|
|
1073
1072
|
className: t,
|
|
1074
|
-
fixed:
|
|
1073
|
+
fixed: l,
|
|
1075
1074
|
autoScroll: u
|
|
1076
1075
|
}) => {
|
|
1077
|
-
var
|
|
1076
|
+
var s;
|
|
1078
1077
|
const {
|
|
1079
|
-
cacheColumns:
|
|
1080
|
-
} = 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", {
|
|
1081
1080
|
class: `${t}-list-item-option`
|
|
1082
|
-
}, [o(
|
|
1081
|
+
}, [o(Oe, {
|
|
1083
1082
|
treeKey: e,
|
|
1084
1083
|
fixed: "left",
|
|
1085
1084
|
title: "\u56FA\u5B9A\u5728\u5217\u9996",
|
|
1086
|
-
show:
|
|
1085
|
+
show: l !== "left" && !h.value
|
|
1087
1086
|
}, {
|
|
1088
|
-
default: () => [o(
|
|
1089
|
-
}), o(
|
|
1087
|
+
default: () => [o(Zt, null, null)]
|
|
1088
|
+
}), o(Oe, {
|
|
1090
1089
|
treeKey: e,
|
|
1091
1090
|
fixed: void 0,
|
|
1092
1091
|
title: "\u4E0D\u56FA\u5B9A",
|
|
1093
|
-
show: !!
|
|
1092
|
+
show: !!l && !h.value
|
|
1094
1093
|
}, {
|
|
1095
|
-
default: () => [o(
|
|
1096
|
-
}), o(
|
|
1094
|
+
default: () => [o(en, null, null)]
|
|
1095
|
+
}), o(Oe, {
|
|
1097
1096
|
treeKey: e,
|
|
1098
1097
|
fixed: "right",
|
|
1099
1098
|
title: "\u56FA\u5B9A\u5728\u5217\u5C3E",
|
|
1100
|
-
show:
|
|
1099
|
+
show: l !== "right"
|
|
1101
1100
|
}, {
|
|
1102
|
-
default: () => [o(
|
|
1101
|
+
default: () => [o(tn, null, null)]
|
|
1103
1102
|
})]);
|
|
1104
1103
|
return o("span", {
|
|
1105
1104
|
class: `${t}-list-item`,
|
|
1106
1105
|
key: e
|
|
1107
1106
|
}, [o("div", {
|
|
1108
1107
|
class: `${t}-list-item-title`
|
|
1109
|
-
}, [
|
|
1110
|
-
},
|
|
1108
|
+
}, [a]), g]);
|
|
1109
|
+
}, Pe = Te({
|
|
1111
1110
|
props: {
|
|
1112
1111
|
list: Array,
|
|
1113
1112
|
keys: Array,
|
|
@@ -1121,206 +1120,206 @@ const Pe = ({
|
|
|
1121
1120
|
}
|
|
1122
1121
|
},
|
|
1123
1122
|
setup(e) {
|
|
1124
|
-
const
|
|
1125
|
-
cacheColumns:
|
|
1126
|
-
slots:
|
|
1127
|
-
settingsAction:
|
|
1128
|
-
} = oe(),
|
|
1129
|
-
key:
|
|
1130
|
-
children:
|
|
1131
|
-
uuid:
|
|
1132
|
-
...
|
|
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
|
|
1133
1132
|
}) => {
|
|
1134
|
-
var
|
|
1135
|
-
const
|
|
1133
|
+
var $;
|
|
1134
|
+
const x = (h == null ? void 0 : h.columnsMap[v || "null"]) || {
|
|
1136
1135
|
show: !0
|
|
1137
1136
|
};
|
|
1138
|
-
let
|
|
1139
|
-
|
|
1140
|
-
const
|
|
1141
|
-
key:
|
|
1142
|
-
...Pn(
|
|
1143
|
-
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,
|
|
1144
1143
|
selectable: !1,
|
|
1145
|
-
disabled:
|
|
1146
|
-
disableCheckbox: typeof
|
|
1144
|
+
disabled: x.disable === !0,
|
|
1145
|
+
disableCheckbox: typeof x.disable == "boolean" ? x.disable : ($ = x.disable) == null ? void 0 : $.checkbox,
|
|
1147
1146
|
isLeaf: !0
|
|
1148
1147
|
};
|
|
1149
|
-
return
|
|
1148
|
+
return T && (z.children = g(T, x)), z;
|
|
1150
1149
|
});
|
|
1151
|
-
|
|
1152
|
-
const m =
|
|
1153
|
-
|
|
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));
|
|
1154
1153
|
});
|
|
1155
|
-
const
|
|
1156
|
-
var
|
|
1157
|
-
const
|
|
1158
|
-
...
|
|
1159
|
-
},
|
|
1160
|
-
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)
|
|
1161
1160
|
return;
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
...
|
|
1166
|
-
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
|
|
1167
1166
|
};
|
|
1168
|
-
}),
|
|
1169
|
-
}),
|
|
1170
|
-
var
|
|
1171
|
-
const
|
|
1172
|
-
...(
|
|
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]) || {}
|
|
1173
1172
|
};
|
|
1174
|
-
|
|
1175
|
-
const
|
|
1176
|
-
...
|
|
1177
|
-
[
|
|
1173
|
+
R.show = m.checked;
|
|
1174
|
+
const D = {
|
|
1175
|
+
...h == null ? void 0 : h.columnsMap,
|
|
1176
|
+
[v]: R
|
|
1178
1177
|
};
|
|
1179
|
-
|
|
1180
|
-
}),
|
|
1181
|
-
const
|
|
1182
|
-
return m.title ||
|
|
1183
|
-
title:
|
|
1184
|
-
column:
|
|
1185
|
-
}, () => [
|
|
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]);
|
|
1186
1185
|
}, f = () => {
|
|
1187
|
-
var m,
|
|
1186
|
+
var m, b;
|
|
1188
1187
|
return o(It, {
|
|
1189
|
-
key:
|
|
1190
|
-
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,
|
|
1191
1190
|
checkable: e.checkable,
|
|
1192
1191
|
blockNode: !0,
|
|
1193
1192
|
showLine: !1,
|
|
1194
1193
|
checkedKeys: u.value,
|
|
1195
1194
|
height: 280,
|
|
1196
|
-
onDrop: (
|
|
1197
|
-
const
|
|
1198
|
-
dropPosition:
|
|
1199
|
-
dropToGap:
|
|
1200
|
-
} =
|
|
1201
|
-
|
|
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);
|
|
1202
1201
|
},
|
|
1203
|
-
onCheck: (
|
|
1204
|
-
treeData:
|
|
1202
|
+
onCheck: (v, T) => d(T),
|
|
1203
|
+
treeData: l.value
|
|
1205
1204
|
}, {
|
|
1206
|
-
title: (
|
|
1207
|
-
const
|
|
1208
|
-
...
|
|
1205
|
+
title: (v) => {
|
|
1206
|
+
const T = {
|
|
1207
|
+
...v,
|
|
1209
1208
|
children: void 0,
|
|
1210
|
-
title:
|
|
1211
|
-
autoScroll:
|
|
1209
|
+
title: C(v),
|
|
1210
|
+
autoScroll: h == null ? void 0 : h.autoScroll
|
|
1212
1211
|
};
|
|
1213
|
-
return o(Mn,
|
|
1212
|
+
return o(Mn, se({
|
|
1214
1213
|
className: e.className
|
|
1215
|
-
},
|
|
1216
|
-
treeKey:
|
|
1214
|
+
}, T, {
|
|
1215
|
+
treeKey: T.key
|
|
1217
1216
|
}), null);
|
|
1218
1217
|
}
|
|
1219
1218
|
});
|
|
1220
1219
|
};
|
|
1221
|
-
return () => t.value ? o(
|
|
1220
|
+
return () => t.value ? o(Ee, null, [e.showTitle && o("span", {
|
|
1222
1221
|
class: `${e.className}-list-title`
|
|
1223
1222
|
}, [e.title]), f()]) : null;
|
|
1224
1223
|
}
|
|
1225
1224
|
}), En = ({
|
|
1226
1225
|
localColumns: e,
|
|
1227
|
-
className:
|
|
1226
|
+
className: a,
|
|
1228
1227
|
draggable: t,
|
|
1229
|
-
checkable:
|
|
1228
|
+
checkable: l
|
|
1230
1229
|
}) => {
|
|
1231
|
-
const u = [],
|
|
1232
|
-
e.forEach((
|
|
1233
|
-
if (
|
|
1230
|
+
const u = [], c = [], i = [], h = [];
|
|
1231
|
+
e.forEach((d) => {
|
|
1232
|
+
if (d.hideInSetting)
|
|
1234
1233
|
return;
|
|
1235
1234
|
const {
|
|
1236
|
-
fixed:
|
|
1235
|
+
fixed: C,
|
|
1237
1236
|
show: f,
|
|
1238
1237
|
uuid: m
|
|
1239
|
-
} =
|
|
1240
|
-
if ((f || f === void 0) && m &&
|
|
1241
|
-
|
|
1238
|
+
} = d;
|
|
1239
|
+
if ((f || f === void 0) && m && h.push(m), C === "left") {
|
|
1240
|
+
c.push(d);
|
|
1242
1241
|
return;
|
|
1243
1242
|
}
|
|
1244
|
-
if (
|
|
1245
|
-
u.push(
|
|
1243
|
+
if (C === "right") {
|
|
1244
|
+
u.push(d);
|
|
1246
1245
|
return;
|
|
1247
1246
|
}
|
|
1248
|
-
|
|
1247
|
+
i.push(d);
|
|
1249
1248
|
});
|
|
1250
|
-
const
|
|
1249
|
+
const g = u && u.length > 0, s = c && c.length > 0;
|
|
1251
1250
|
return o("div", {
|
|
1252
1251
|
class: {
|
|
1253
|
-
[`${
|
|
1254
|
-
[`${
|
|
1252
|
+
[`${a}-list`]: !0,
|
|
1253
|
+
[`${a}-list-group`]: g || s
|
|
1255
1254
|
}
|
|
1256
|
-
}, [o(
|
|
1255
|
+
}, [o(Pe, {
|
|
1257
1256
|
title: "\u56FA\u5B9A\u5728\u5DE6\u4FA7",
|
|
1258
|
-
list:
|
|
1259
|
-
keys:
|
|
1257
|
+
list: c,
|
|
1258
|
+
keys: h,
|
|
1260
1259
|
draggable: t,
|
|
1261
|
-
checkable:
|
|
1262
|
-
className:
|
|
1263
|
-
}, null), o(
|
|
1264
|
-
list:
|
|
1265
|
-
keys:
|
|
1260
|
+
checkable: l,
|
|
1261
|
+
className: a
|
|
1262
|
+
}, null), o(Pe, {
|
|
1263
|
+
list: i,
|
|
1264
|
+
keys: h,
|
|
1266
1265
|
draggable: t,
|
|
1267
|
-
checkable:
|
|
1266
|
+
checkable: l,
|
|
1268
1267
|
title: "\u4E0D\u56FA\u5B9A",
|
|
1269
|
-
showTitle:
|
|
1270
|
-
className:
|
|
1271
|
-
}, null), o(
|
|
1268
|
+
showTitle: s || g,
|
|
1269
|
+
className: a
|
|
1270
|
+
}, null), o(Pe, {
|
|
1272
1271
|
title: "\u56FA\u5B9A\u5728\u53F3\u4FA7",
|
|
1273
1272
|
list: u,
|
|
1274
|
-
keys:
|
|
1273
|
+
keys: h,
|
|
1275
1274
|
draggable: t,
|
|
1276
|
-
checkable:
|
|
1277
|
-
className:
|
|
1275
|
+
checkable: l,
|
|
1276
|
+
className: a
|
|
1278
1277
|
}, null)]);
|
|
1279
|
-
},
|
|
1280
|
-
var
|
|
1278
|
+
}, jn = (e) => {
|
|
1279
|
+
var d, C;
|
|
1281
1280
|
const {
|
|
1282
|
-
checkedReset:
|
|
1283
|
-
} = e, t =
|
|
1281
|
+
checkedReset: a = !0
|
|
1282
|
+
} = e, t = Be({
|
|
1284
1283
|
suffixCls: "table-column-setting",
|
|
1285
1284
|
isPor: !0
|
|
1286
1285
|
}), {
|
|
1287
|
-
columns:
|
|
1286
|
+
columns: l,
|
|
1288
1287
|
settingsAction: u
|
|
1289
|
-
} = oe(),
|
|
1290
|
-
const m = {},
|
|
1291
|
-
|
|
1292
|
-
key:
|
|
1293
|
-
fixed:
|
|
1294
|
-
index:
|
|
1295
|
-
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
|
|
1296
1295
|
}) => {
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1296
|
+
const E = nt(T, D);
|
|
1297
|
+
E && (m[E] = {
|
|
1299
1298
|
show: f,
|
|
1300
|
-
fixed:
|
|
1301
|
-
}),
|
|
1299
|
+
fixed: R
|
|
1300
|
+
}), x && b(x);
|
|
1302
1301
|
});
|
|
1303
1302
|
};
|
|
1304
|
-
|
|
1305
|
-
}),
|
|
1306
|
-
f.target.checked ?
|
|
1307
|
-
}),
|
|
1303
|
+
b(l.value), u == null || u.setColumnsMap(m, "show");
|
|
1304
|
+
}), i = ge((f) => {
|
|
1305
|
+
f.target.checked ? c() : c(!1);
|
|
1306
|
+
}), h = ge(() => {
|
|
1308
1307
|
u == null || u.setColumnsMap(u == null ? void 0 : u.cacheColumnsMap, "fixed");
|
|
1309
|
-
}),
|
|
1310
|
-
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, {
|
|
1311
1310
|
arrowPointAtCenter: !0,
|
|
1312
1311
|
title: o("div", {
|
|
1313
1312
|
class: `${t}-title`
|
|
1314
1313
|
}, [o(Nt, {
|
|
1315
|
-
indeterminate:
|
|
1316
|
-
checked:
|
|
1317
|
-
onChange: (f) =>
|
|
1314
|
+
indeterminate: s.value,
|
|
1315
|
+
checked: r(g).length === 0 && r(g).length !== l.value.length,
|
|
1316
|
+
onChange: (f) => i(f)
|
|
1318
1317
|
}, {
|
|
1319
|
-
default: () => [
|
|
1320
|
-
}),
|
|
1321
|
-
onClick:
|
|
1318
|
+
default: () => [me("\u5217\u5C55\u793A")]
|
|
1319
|
+
}), a ? o("a", {
|
|
1320
|
+
onClick: h,
|
|
1322
1321
|
class: `${t}-action-rest-button`
|
|
1323
|
-
}, [
|
|
1322
|
+
}, [me("\u91CD\u7F6E")]) : null, e != null && e.extra ? o(ne, {
|
|
1324
1323
|
size: 12,
|
|
1325
1324
|
align: "center"
|
|
1326
1325
|
}, {
|
|
@@ -1330,44 +1329,44 @@ const Pe = ({
|
|
|
1330
1329
|
trigger: "click",
|
|
1331
1330
|
placement: "bottomRight",
|
|
1332
1331
|
content: o(En, {
|
|
1333
|
-
checkable: (
|
|
1334
|
-
draggable: (
|
|
1332
|
+
checkable: (d = e.checkable) != null ? d : !0,
|
|
1333
|
+
draggable: (C = e.draggable) != null ? C : !0,
|
|
1335
1334
|
className: t,
|
|
1336
|
-
localColumns:
|
|
1335
|
+
localColumns: l.value
|
|
1337
1336
|
}, null)
|
|
1338
1337
|
}, {
|
|
1339
|
-
default: () => [o(
|
|
1338
|
+
default: () => [o(G, {
|
|
1340
1339
|
title: "\u5217\u8BBE\u7F6E"
|
|
1341
1340
|
}, {
|
|
1342
1341
|
default: () => [o(ot, null, null)]
|
|
1343
1342
|
})]
|
|
1344
1343
|
});
|
|
1345
|
-
},
|
|
1344
|
+
}, rt = () => {
|
|
1346
1345
|
const {
|
|
1347
1346
|
isFullscreen: e
|
|
1348
1347
|
} = et();
|
|
1349
|
-
return e.value ? o(
|
|
1348
|
+
return e.value ? o(G, {
|
|
1350
1349
|
title: "\u9000\u51FA\u5168\u5C4F"
|
|
1351
1350
|
}, {
|
|
1352
|
-
default: () => [o(
|
|
1353
|
-
}) : o(
|
|
1351
|
+
default: () => [o(nn, null, null)]
|
|
1352
|
+
}) : o(G, {
|
|
1354
1353
|
title: "\u5168\u5C4F"
|
|
1355
1354
|
}, {
|
|
1356
|
-
default: () => [o(
|
|
1355
|
+
default: () => [o(ln, null, null)]
|
|
1357
1356
|
});
|
|
1358
|
-
},
|
|
1357
|
+
}, In = () => {
|
|
1359
1358
|
const {
|
|
1360
1359
|
action: e,
|
|
1361
|
-
tableSize:
|
|
1360
|
+
tableSize: a
|
|
1362
1361
|
} = oe();
|
|
1363
|
-
return o(
|
|
1362
|
+
return o($t, {
|
|
1364
1363
|
overlay: o(Se, {
|
|
1365
|
-
selectedKeys: [
|
|
1364
|
+
selectedKeys: [a.value],
|
|
1366
1365
|
onClick: ({
|
|
1367
1366
|
key: t
|
|
1368
1367
|
}) => {
|
|
1369
|
-
var
|
|
1370
|
-
(
|
|
1368
|
+
var l;
|
|
1369
|
+
(l = e.setTableSize) == null || l.call(e, t);
|
|
1371
1370
|
},
|
|
1372
1371
|
style: {
|
|
1373
1372
|
width: 80
|
|
@@ -1376,23 +1375,23 @@ const Pe = ({
|
|
|
1376
1375
|
default: () => [o(Se.Item, {
|
|
1377
1376
|
key: "large"
|
|
1378
1377
|
}, {
|
|
1379
|
-
default: () => [
|
|
1378
|
+
default: () => [me("\u9ED8\u8BA4")]
|
|
1380
1379
|
}), o(Se.Item, {
|
|
1381
1380
|
key: "middle"
|
|
1382
1381
|
}, {
|
|
1383
|
-
default: () => [
|
|
1382
|
+
default: () => [me("\u4E2D\u7B49")]
|
|
1384
1383
|
}), o(Se.Item, {
|
|
1385
1384
|
key: "small"
|
|
1386
1385
|
}, {
|
|
1387
|
-
default: () => [
|
|
1386
|
+
default: () => [me("\u7D27\u51D1")]
|
|
1388
1387
|
})]
|
|
1389
1388
|
}),
|
|
1390
1389
|
trigger: ["click"]
|
|
1391
1390
|
}, {
|
|
1392
|
-
default: () => [o(
|
|
1391
|
+
default: () => [o(G, {
|
|
1393
1392
|
title: "\u8868\u683C\u5BC6\u5EA6"
|
|
1394
1393
|
}, {
|
|
1395
|
-
default: () => [o(
|
|
1394
|
+
default: () => [o(an, null, null)]
|
|
1396
1395
|
})]
|
|
1397
1396
|
});
|
|
1398
1397
|
};
|
|
@@ -1400,120 +1399,120 @@ function Xe(e) {
|
|
|
1400
1399
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
|
|
1401
1400
|
}
|
|
1402
1401
|
const {
|
|
1403
|
-
useBreakpoint:
|
|
1404
|
-
} =
|
|
1405
|
-
function
|
|
1402
|
+
useBreakpoint: zn
|
|
1403
|
+
} = $e;
|
|
1404
|
+
function Nn(e) {
|
|
1406
1405
|
if (de(e))
|
|
1407
1406
|
return e;
|
|
1408
1407
|
if (e) {
|
|
1409
|
-
const
|
|
1408
|
+
const a = e, {
|
|
1410
1409
|
icon: t,
|
|
1411
|
-
tooltip:
|
|
1410
|
+
tooltip: l,
|
|
1412
1411
|
onClick: u,
|
|
1413
|
-
key:
|
|
1414
|
-
} =
|
|
1415
|
-
return t &&
|
|
1416
|
-
title:
|
|
1412
|
+
key: c
|
|
1413
|
+
} = a;
|
|
1414
|
+
return t && l ? o(G, {
|
|
1415
|
+
title: l
|
|
1417
1416
|
}, {
|
|
1418
1417
|
default: () => [o("span", {
|
|
1419
|
-
key:
|
|
1418
|
+
key: c,
|
|
1420
1419
|
onClick: () => {
|
|
1421
|
-
u && u(
|
|
1420
|
+
u && u(c);
|
|
1422
1421
|
}
|
|
1423
1422
|
}, [t])]
|
|
1424
1423
|
}) : t;
|
|
1425
1424
|
}
|
|
1426
1425
|
return null;
|
|
1427
1426
|
}
|
|
1428
|
-
const ct =
|
|
1427
|
+
const ct = Te({
|
|
1429
1428
|
props: {
|
|
1430
|
-
actions:
|
|
1429
|
+
actions: le.toolBarBtn,
|
|
1431
1430
|
settings: [Array],
|
|
1432
|
-
titleTip:
|
|
1431
|
+
titleTip: le.titleTip,
|
|
1433
1432
|
prefixCls: String,
|
|
1434
|
-
headerTitle:
|
|
1435
|
-
titleTipText:
|
|
1436
|
-
optionsExtra:
|
|
1433
|
+
headerTitle: le.headerTitle,
|
|
1434
|
+
titleTipText: le.titleTipText,
|
|
1435
|
+
optionsExtra: le.optionsExtra
|
|
1437
1436
|
},
|
|
1438
1437
|
setup(e) {
|
|
1439
|
-
const
|
|
1440
|
-
var
|
|
1441
|
-
return !!(e.titleTip || e.headerTitle || ((
|
|
1442
|
-
}),
|
|
1443
|
-
var
|
|
1444
|
-
return !!(((
|
|
1445
|
-
}), u =
|
|
1446
|
-
var
|
|
1447
|
-
let
|
|
1448
|
-
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, {
|
|
1449
1448
|
align: "center"
|
|
1450
|
-
}, Xe(
|
|
1449
|
+
}, Xe(s = e.actions.map((C, f) => de(C) ? Pt(C, {
|
|
1451
1450
|
key: f,
|
|
1452
|
-
...
|
|
1451
|
+
...C == null ? void 0 : C.props
|
|
1453
1452
|
}) : o("template", {
|
|
1454
1453
|
key: f
|
|
1455
|
-
}, [
|
|
1456
|
-
default: () => [
|
|
1454
|
+
}, [C]))) ? s : {
|
|
1455
|
+
default: () => [s]
|
|
1457
1456
|
}) : e.actions;
|
|
1458
|
-
}),
|
|
1457
|
+
}), i = xe(() => !t.value && l.value ? o("div", {
|
|
1459
1458
|
class: `${e.prefixCls}-left`
|
|
1460
|
-
}, null) : u.value ? o(
|
|
1459
|
+
}, null) : u.value ? o(ne, {
|
|
1461
1460
|
class: `${e.prefixCls}-left`
|
|
1462
1461
|
}, {
|
|
1463
1462
|
default: () => [o("div", {
|
|
1464
1463
|
class: `${e.prefixCls}-title`
|
|
1465
|
-
}, [e.headerTitle, e.titleTip && o(
|
|
1464
|
+
}, [e.headerTitle, e.titleTip && o(G, {
|
|
1466
1465
|
title: e.titleTipText
|
|
1467
1466
|
}, {
|
|
1468
|
-
default: () => [re(e.titleTip) && e.titleTip ? o(
|
|
1469
|
-
})]),
|
|
1467
|
+
default: () => [re(e.titleTip) && e.titleTip ? o(on, null, null) : e.titleTip]
|
|
1468
|
+
})]), c.value && o("div", {
|
|
1470
1469
|
class: `${e.prefixCls}-actions`
|
|
1471
|
-
}, [
|
|
1472
|
-
}) : o(
|
|
1470
|
+
}, [c.value])]
|
|
1471
|
+
}) : o(ne, {
|
|
1473
1472
|
class: `${e.prefixCls}-left`
|
|
1474
1473
|
}, {
|
|
1475
|
-
default: () => [
|
|
1474
|
+
default: () => [c.value && o("div", {
|
|
1476
1475
|
class: `${e.prefixCls}-actions`
|
|
1477
|
-
}, [
|
|
1478
|
-
})),
|
|
1479
|
-
let
|
|
1480
|
-
return
|
|
1476
|
+
}, [c.value])]
|
|
1477
|
+
})), h = xe(() => {
|
|
1478
|
+
let s;
|
|
1479
|
+
return l.value ? o(ne, {
|
|
1481
1480
|
size: 16,
|
|
1482
1481
|
class: `${e.prefixCls}-right`,
|
|
1483
|
-
align:
|
|
1484
|
-
direction:
|
|
1482
|
+
align: a.value.lg ? "center" : "end",
|
|
1483
|
+
direction: a.value.lg ? "horizontal" : "vertical"
|
|
1485
1484
|
}, {
|
|
1486
1485
|
default: () => {
|
|
1487
|
-
var
|
|
1488
|
-
return [e.optionsExtra, (
|
|
1486
|
+
var d;
|
|
1487
|
+
return [e.optionsExtra, (d = e.settings) != null && d.length ? o(ne, {
|
|
1489
1488
|
size: 12,
|
|
1490
1489
|
align: "center",
|
|
1491
1490
|
class: `${e.prefixCls}-setting-items`
|
|
1492
|
-
}, Xe(
|
|
1493
|
-
const m =
|
|
1491
|
+
}, Xe(s = e.settings.map((C, f) => {
|
|
1492
|
+
const m = Nn(C);
|
|
1494
1493
|
return o("div", {
|
|
1495
1494
|
key: f,
|
|
1496
1495
|
class: `${e.prefixCls}-setting-item`
|
|
1497
1496
|
}, [m]);
|
|
1498
|
-
})) ?
|
|
1499
|
-
default: () => [
|
|
1497
|
+
})) ? s : {
|
|
1498
|
+
default: () => [s]
|
|
1500
1499
|
}) : null];
|
|
1501
1500
|
}
|
|
1502
1501
|
}) : null;
|
|
1503
|
-
}),
|
|
1504
|
-
if (!
|
|
1502
|
+
}), g = xe(() => {
|
|
1503
|
+
if (!l.value && !t.value)
|
|
1505
1504
|
return null;
|
|
1506
|
-
const
|
|
1505
|
+
const s = {
|
|
1507
1506
|
[`${e.prefixCls}-container`]: !0,
|
|
1508
|
-
[`${e.prefixCls}-container-mobile`]: !
|
|
1507
|
+
[`${e.prefixCls}-container-mobile`]: !a.value.xl
|
|
1509
1508
|
};
|
|
1510
1509
|
return o("div", {
|
|
1511
|
-
class:
|
|
1512
|
-
}, [
|
|
1510
|
+
class: s
|
|
1511
|
+
}, [i.value, h.value]);
|
|
1513
1512
|
});
|
|
1514
1513
|
return () => o("div", {
|
|
1515
1514
|
class: `${e.prefixCls}`
|
|
1516
|
-
}, [
|
|
1515
|
+
}, [g.value]);
|
|
1517
1516
|
}
|
|
1518
1517
|
});
|
|
1519
1518
|
ct.inheritAttrs = !1;
|
|
@@ -1521,11 +1520,11 @@ function $n() {
|
|
|
1521
1520
|
return {
|
|
1522
1521
|
reload: {
|
|
1523
1522
|
text: "\u5237\u65B0",
|
|
1524
|
-
icon: o(
|
|
1523
|
+
icon: o(un, null, null)
|
|
1525
1524
|
},
|
|
1526
1525
|
density: {
|
|
1527
1526
|
text: "\u8868\u683C\u5BC6\u5EA6",
|
|
1528
|
-
icon: o(
|
|
1527
|
+
icon: o(In, null, null)
|
|
1529
1528
|
},
|
|
1530
1529
|
setting: {
|
|
1531
1530
|
text: "\u5217\u8BBE\u7F6E",
|
|
@@ -1533,77 +1532,76 @@ function $n() {
|
|
|
1533
1532
|
},
|
|
1534
1533
|
fullScreen: {
|
|
1535
1534
|
text: "\u5168\u5C4F",
|
|
1536
|
-
icon: o(
|
|
1535
|
+
icon: o(rt, null, null)
|
|
1537
1536
|
}
|
|
1538
1537
|
};
|
|
1539
1538
|
}
|
|
1540
|
-
function Bn(e,
|
|
1539
|
+
function Bn(e, a) {
|
|
1541
1540
|
return Object.keys(e).filter((t) => t).map((t) => {
|
|
1542
|
-
const
|
|
1543
|
-
if (!
|
|
1541
|
+
const l = e[t];
|
|
1542
|
+
if (!l)
|
|
1544
1543
|
return null;
|
|
1545
|
-
let u =
|
|
1544
|
+
let u = l === !0 ? a[t] : () => l == null ? void 0 : l();
|
|
1546
1545
|
if (typeof u != "function" && (u = () => {
|
|
1547
1546
|
}), t === "setting")
|
|
1548
|
-
return o(
|
|
1547
|
+
return o(jn, se(e[t], {
|
|
1549
1548
|
key: t
|
|
1550
1549
|
}), null);
|
|
1551
1550
|
if (t === "fullScreen")
|
|
1552
1551
|
return o("span", {
|
|
1553
1552
|
key: t,
|
|
1554
1553
|
onClick: u
|
|
1555
|
-
}, [o(
|
|
1556
|
-
const
|
|
1557
|
-
return
|
|
1554
|
+
}, [o(rt, null, null)]);
|
|
1555
|
+
const c = $n()[t];
|
|
1556
|
+
return c ? o("span", {
|
|
1558
1557
|
key: t,
|
|
1559
1558
|
onClick: u
|
|
1560
|
-
}, [o(
|
|
1561
|
-
title:
|
|
1559
|
+
}, [o(G, {
|
|
1560
|
+
title: c.text
|
|
1562
1561
|
}, {
|
|
1563
|
-
default: () => [
|
|
1562
|
+
default: () => [c.icon]
|
|
1564
1563
|
})]) : null;
|
|
1565
1564
|
}).filter((t) => t);
|
|
1566
1565
|
}
|
|
1567
1566
|
function Yn({
|
|
1568
1567
|
toolBarBtn: e,
|
|
1569
|
-
headerTitle:
|
|
1568
|
+
headerTitle: a,
|
|
1570
1569
|
titleTip: t,
|
|
1571
|
-
titleTipText:
|
|
1570
|
+
titleTipText: l,
|
|
1572
1571
|
options: u,
|
|
1573
|
-
optionsExtra:
|
|
1574
|
-
settingExtra:
|
|
1572
|
+
optionsExtra: c,
|
|
1573
|
+
settingExtra: i
|
|
1575
1574
|
}) {
|
|
1576
|
-
const
|
|
1575
|
+
const h = Be({
|
|
1577
1576
|
suffixCls: "table-list-toolbar",
|
|
1578
1577
|
isPor: !0
|
|
1579
1578
|
}), {
|
|
1580
|
-
action:
|
|
1581
|
-
} = oe(),
|
|
1582
|
-
const
|
|
1583
|
-
reload: () =>
|
|
1579
|
+
action: g
|
|
1580
|
+
} = oe(), s = w(() => {
|
|
1581
|
+
const C = {
|
|
1582
|
+
reload: () => g == null ? void 0 : g.reload(),
|
|
1584
1583
|
density: !0,
|
|
1585
1584
|
setting: !0,
|
|
1586
|
-
fullScreen: () =>
|
|
1585
|
+
fullScreen: () => g == null ? void 0 : g.toggle()
|
|
1587
1586
|
};
|
|
1588
1587
|
if (!Object.keys(u || {}).length)
|
|
1589
1588
|
return [];
|
|
1590
|
-
const
|
|
1591
|
-
...
|
|
1589
|
+
const f = {
|
|
1590
|
+
...C,
|
|
1592
1591
|
...u
|
|
1593
1592
|
};
|
|
1594
|
-
return
|
|
1595
|
-
...
|
|
1593
|
+
return f.setting !== !1 && i && (f.setting = {}, f.setting.extra = i), Bn(f, {
|
|
1594
|
+
...C
|
|
1596
1595
|
});
|
|
1597
1596
|
});
|
|
1598
1597
|
return o(ct, {
|
|
1599
|
-
|
|
1600
|
-
prefixCls: p,
|
|
1598
|
+
prefixCls: h,
|
|
1601
1599
|
actions: e || [],
|
|
1602
|
-
optionsExtra:
|
|
1603
|
-
headerTitle:
|
|
1604
|
-
settings:
|
|
1600
|
+
optionsExtra: c,
|
|
1601
|
+
headerTitle: a,
|
|
1602
|
+
settings: r(s),
|
|
1605
1603
|
titleTip: t,
|
|
1606
|
-
titleTipText:
|
|
1604
|
+
titleTipText: l
|
|
1607
1605
|
}, null);
|
|
1608
1606
|
}
|
|
1609
1607
|
const Kn = (e) => o(Yn, e, null), Ln = [
|
|
@@ -1619,299 +1617,290 @@ const Kn = (e) => o(Yn, e, null), Ln = [
|
|
|
1619
1617
|
function Vn(e) {
|
|
1620
1618
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
|
|
1621
1619
|
}
|
|
1622
|
-
function Hn(e,
|
|
1623
|
-
if (!
|
|
1620
|
+
function Hn(e, a, t) {
|
|
1621
|
+
if (!a)
|
|
1624
1622
|
return e;
|
|
1625
|
-
let
|
|
1626
|
-
if (at(
|
|
1627
|
-
const u =
|
|
1628
|
-
return o(u,
|
|
1629
|
-
class: [
|
|
1630
|
-
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
|
|
1631
1629
|
}), Vn(e) ? e : {
|
|
1632
1630
|
default: () => [e]
|
|
1633
1631
|
});
|
|
1634
1632
|
}
|
|
1635
|
-
switch (
|
|
1633
|
+
switch (a) {
|
|
1636
1634
|
case "link":
|
|
1637
|
-
|
|
1635
|
+
l = o("span", {
|
|
1638
1636
|
class: `${t}-a`
|
|
1639
1637
|
}, [e]);
|
|
1640
1638
|
break;
|
|
1641
1639
|
case "time":
|
|
1642
|
-
|
|
1640
|
+
l = L(e).format("HH:mm:ss");
|
|
1643
1641
|
break;
|
|
1644
1642
|
case "dateMonth":
|
|
1645
|
-
|
|
1643
|
+
l = `${L(e).month() + 1}\u6708`;
|
|
1646
1644
|
break;
|
|
1647
1645
|
case "dateTime":
|
|
1648
|
-
|
|
1646
|
+
l = L(e).format("YYYY-MM-DD HH:mm:ss");
|
|
1649
1647
|
break;
|
|
1650
1648
|
}
|
|
1651
|
-
return
|
|
1649
|
+
return l;
|
|
1652
1650
|
}
|
|
1653
1651
|
const {
|
|
1654
|
-
useBreakpoint:
|
|
1655
|
-
} =
|
|
1652
|
+
useBreakpoint: Wn
|
|
1653
|
+
} = $e, An = {
|
|
1656
1654
|
reload: !0,
|
|
1657
1655
|
density: !0,
|
|
1658
1656
|
setting: !0,
|
|
1659
1657
|
fullScreen: !0
|
|
1660
|
-
},
|
|
1658
|
+
}, Me = Te({
|
|
1661
1659
|
name: "ProTable",
|
|
1662
|
-
props:
|
|
1660
|
+
props: le,
|
|
1663
1661
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
|
|
1662
|
+
slots: ["customize", "search", "toolBarBtn", "headerTitle", "titleTip", "optionsExtra"],
|
|
1664
1663
|
setup(e, {
|
|
1665
|
-
emit:
|
|
1664
|
+
emit: a,
|
|
1666
1665
|
slots: t,
|
|
1667
|
-
attrs:
|
|
1666
|
+
attrs: l,
|
|
1667
|
+
expose: u
|
|
1668
1668
|
}) {
|
|
1669
|
-
const
|
|
1669
|
+
const c = Be({
|
|
1670
1670
|
suffixCls: "table",
|
|
1671
1671
|
isPor: !0
|
|
1672
|
-
}),
|
|
1673
|
-
toggle:
|
|
1674
|
-
isFullscreen:
|
|
1675
|
-
} = et(
|
|
1672
|
+
}), i = Wn(), h = j(window.innerWidth), g = j(), s = j(), {
|
|
1673
|
+
toggle: d,
|
|
1674
|
+
isFullscreen: C
|
|
1675
|
+
} = et(g), f = w(() => ({
|
|
1676
1676
|
...e
|
|
1677
|
-
})),
|
|
1678
|
-
var
|
|
1679
|
-
return e.virtualScroll &&
|
|
1680
|
-
}),
|
|
1681
|
-
const
|
|
1682
|
-
...
|
|
1683
|
-
key:
|
|
1684
|
-
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,
|
|
1685
1685
|
uuid: ze().uuid(15)
|
|
1686
1686
|
}));
|
|
1687
|
-
return
|
|
1687
|
+
return Ut(y, {
|
|
1688
1688
|
align: e.align,
|
|
1689
1689
|
showIndex: e.showIndex
|
|
1690
1690
|
});
|
|
1691
1691
|
}), {
|
|
1692
|
-
getLoading:
|
|
1693
|
-
setLoading:
|
|
1694
|
-
} =
|
|
1695
|
-
emit:
|
|
1696
|
-
loading:
|
|
1692
|
+
getLoading: v,
|
|
1693
|
+
setLoading: T
|
|
1694
|
+
} = cn({
|
|
1695
|
+
emit: a,
|
|
1696
|
+
loading: U(e, "loading")
|
|
1697
1697
|
}), {
|
|
1698
1698
|
sizeRef: R,
|
|
1699
|
-
setTableSize:
|
|
1699
|
+
setTableSize: D
|
|
1700
1700
|
} = dn({
|
|
1701
|
-
emit:
|
|
1702
|
-
size:
|
|
1701
|
+
emit: a,
|
|
1702
|
+
size: U(e, "size")
|
|
1703
1703
|
}), {
|
|
1704
1704
|
getPaginationInfo: x,
|
|
1705
|
-
setPagination:
|
|
1705
|
+
setPagination: E
|
|
1706
1706
|
} = fn({
|
|
1707
1707
|
slots: t,
|
|
1708
|
-
props:
|
|
1709
|
-
pagination:
|
|
1710
|
-
}),
|
|
1711
|
-
getScrollRef:
|
|
1712
|
-
breakpoint:
|
|
1708
|
+
props: f,
|
|
1709
|
+
pagination: U(e, "pagination")
|
|
1710
|
+
}), z = Sn(e), {
|
|
1711
|
+
getScrollRef: $,
|
|
1712
|
+
breakpoint: H
|
|
1713
1713
|
} = xn({
|
|
1714
|
-
...
|
|
1715
|
-
innerWidth:
|
|
1716
|
-
columns:
|
|
1717
|
-
screensRef:
|
|
1718
|
-
}),
|
|
1714
|
+
...z,
|
|
1715
|
+
innerWidth: h,
|
|
1716
|
+
columns: b,
|
|
1717
|
+
screensRef: i
|
|
1718
|
+
}), _ = Cn(e), {
|
|
1719
1719
|
getProColumns: q,
|
|
1720
|
-
cacheProColumns:
|
|
1721
|
-
setColumns:
|
|
1722
|
-
changeColumns:
|
|
1723
|
-
resizeColumnWidth:
|
|
1724
|
-
} =
|
|
1725
|
-
...
|
|
1726
|
-
breakpoint:
|
|
1727
|
-
scroll:
|
|
1728
|
-
columns:
|
|
1720
|
+
cacheProColumns: n,
|
|
1721
|
+
setColumns: S,
|
|
1722
|
+
changeColumns: k,
|
|
1723
|
+
resizeColumnWidth: O
|
|
1724
|
+
} = pn({
|
|
1725
|
+
..._,
|
|
1726
|
+
breakpoint: H,
|
|
1727
|
+
scroll: $,
|
|
1728
|
+
columns: b
|
|
1729
1729
|
}), {
|
|
1730
|
-
columnsMap:
|
|
1731
|
-
operationType:
|
|
1732
|
-
setColumnsMap:
|
|
1733
|
-
sortKeyColumns:
|
|
1734
|
-
cacheColumnsMap:
|
|
1735
|
-
setSortKeyColumns:
|
|
1730
|
+
columnsMap: I,
|
|
1731
|
+
operationType: p,
|
|
1732
|
+
setColumnsMap: P,
|
|
1733
|
+
sortKeyColumns: N,
|
|
1734
|
+
cacheColumnsMap: Y,
|
|
1735
|
+
setSortKeyColumns: K
|
|
1736
1736
|
} = bn({
|
|
1737
|
-
columns:
|
|
1738
|
-
columnsState:
|
|
1739
|
-
changeColumns:
|
|
1737
|
+
columns: n,
|
|
1738
|
+
columnsState: U(e, "columnsState"),
|
|
1739
|
+
changeColumns: k
|
|
1740
1740
|
}), {
|
|
1741
|
-
formDataRef:
|
|
1742
|
-
formParamsRef:
|
|
1741
|
+
formDataRef: ue,
|
|
1742
|
+
formParamsRef: ye,
|
|
1743
1743
|
defaultParamsRef: Re,
|
|
1744
|
-
setFormParams:
|
|
1744
|
+
setFormParams: fe
|
|
1745
1745
|
} = yn({
|
|
1746
|
-
search:
|
|
1747
|
-
searchMap:
|
|
1748
|
-
params:
|
|
1749
|
-
columns:
|
|
1746
|
+
search: U(e, "search"),
|
|
1747
|
+
searchMap: U(e, "searchMap"),
|
|
1748
|
+
params: U(e, "params"),
|
|
1749
|
+
columns: b
|
|
1750
1750
|
}), {
|
|
1751
|
-
selectedKey:
|
|
1752
|
-
changeRowKey:
|
|
1753
|
-
selectRowKey:
|
|
1754
|
-
selectAllRowKey:
|
|
1755
|
-
syncSelectedRows:
|
|
1756
|
-
removeRowKeys:
|
|
1757
|
-
} = hn(
|
|
1758
|
-
reload:
|
|
1759
|
-
reSetDataList:
|
|
1760
|
-
changeDataValue:
|
|
1761
|
-
isTreeDataRef:
|
|
1762
|
-
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,
|
|
1763
1763
|
handleTableChange: Le
|
|
1764
1764
|
} = gn({
|
|
1765
|
-
...
|
|
1765
|
+
...Z
|
|
1766
1766
|
}, {
|
|
1767
|
-
getLoading:
|
|
1767
|
+
getLoading: v,
|
|
1768
1768
|
getPaginationInfo: x,
|
|
1769
|
-
setPagination:
|
|
1770
|
-
removeRowKeys:
|
|
1771
|
-
syncSelectedRows:
|
|
1772
|
-
setLoading:
|
|
1773
|
-
setColumns:
|
|
1769
|
+
setPagination: E,
|
|
1770
|
+
removeRowKeys: he,
|
|
1771
|
+
syncSelectedRows: pe,
|
|
1772
|
+
setLoading: T,
|
|
1773
|
+
setColumns: S,
|
|
1774
1774
|
columns: q,
|
|
1775
|
-
formParamsRef:
|
|
1775
|
+
formParamsRef: ye,
|
|
1776
1776
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit
|
|
1777
|
-
},
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
...b
|
|
1783
|
-
};
|
|
1784
|
-
}
|
|
1785
|
-
return {};
|
|
1786
|
-
}), dt = () => {
|
|
1787
|
-
var b;
|
|
1788
|
-
(b = e.actionRef) == null || b.call(e, {
|
|
1789
|
-
pageParams: x.value,
|
|
1790
|
-
getLoadingStatus: C.value,
|
|
1791
|
-
reload: (w) => _(w),
|
|
1792
|
-
reloadAndRest: () => {
|
|
1793
|
-
De({
|
|
1794
|
-
current: 1,
|
|
1795
|
-
pageSize: 10
|
|
1796
|
-
}), _();
|
|
1797
|
-
},
|
|
1798
|
-
reSetDataList: ie,
|
|
1799
|
-
changePageInfo: (w, O, U) => De(w, O, U),
|
|
1800
|
-
changeDataValue: ({
|
|
1801
|
-
key: w,
|
|
1802
|
-
params: O
|
|
1803
|
-
}) => A({
|
|
1804
|
-
key: w,
|
|
1805
|
-
params: O
|
|
1806
|
-
}),
|
|
1807
|
-
loadingOperation: (w) => y(w)
|
|
1808
|
-
});
|
|
1809
|
-
}, ft = () => {
|
|
1810
|
-
var b, w;
|
|
1811
|
-
(w = e.formRef) == null || w.call(e, {
|
|
1812
|
-
formParams: ue.value,
|
|
1813
|
-
restForm: e.search.showSearch ? (b = p.value) == null ? void 0 : b.resetFormParams() : null
|
|
1814
|
-
});
|
|
1815
|
-
};
|
|
1816
|
-
ae(() => {
|
|
1817
|
-
e.actionRef && dt(), e.formRef && ft();
|
|
1818
|
-
}), Pt(() => {
|
|
1777
|
+
}, a), ft = w(() => e.options ? {
|
|
1778
|
+
...An,
|
|
1779
|
+
...V(at(e.options) ? e.options : {})
|
|
1780
|
+
} : {});
|
|
1781
|
+
Mt(() => {
|
|
1819
1782
|
window.addEventListener("resize", Ve);
|
|
1820
1783
|
}), Ze(() => {
|
|
1821
1784
|
window.removeEventListener("resize", Ve);
|
|
1822
1785
|
});
|
|
1823
1786
|
const Ve = () => {
|
|
1824
|
-
|
|
1825
|
-
}, He =
|
|
1826
|
-
const
|
|
1827
|
-
let
|
|
1828
|
-
...
|
|
1787
|
+
h.value = window.innerWidth;
|
|
1788
|
+
}, He = w(() => {
|
|
1789
|
+
const y = r(Ke);
|
|
1790
|
+
let F = {
|
|
1791
|
+
...l,
|
|
1829
1792
|
...e,
|
|
1830
|
-
virtualScroll:
|
|
1831
|
-
size:
|
|
1832
|
-
scroll:
|
|
1833
|
-
loading: !!
|
|
1834
|
-
columns:
|
|
1835
|
-
pagination:
|
|
1836
|
-
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
|
|
1837
1800
|
};
|
|
1838
|
-
return
|
|
1839
|
-
}), ht =
|
|
1840
|
-
var
|
|
1801
|
+
return F = qe(F, ["class", "onChange", "onExpand", "onExpandedRowsChange"]), F;
|
|
1802
|
+
}), ht = w(() => {
|
|
1803
|
+
var y;
|
|
1841
1804
|
return [{
|
|
1842
|
-
[`${
|
|
1843
|
-
[`${
|
|
1844
|
-
[`${
|
|
1845
|
-
[`${
|
|
1846
|
-
[`${
|
|
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
|
|
1847
1810
|
}];
|
|
1848
1811
|
});
|
|
1849
1812
|
Tn({
|
|
1850
1813
|
tableSize: R,
|
|
1851
1814
|
columns: q,
|
|
1852
|
-
cacheColumns:
|
|
1815
|
+
cacheColumns: b,
|
|
1853
1816
|
action: {
|
|
1854
|
-
setTableSize:
|
|
1855
|
-
reload: (
|
|
1856
|
-
toggle:
|
|
1817
|
+
setTableSize: D,
|
|
1818
|
+
reload: (y) => J(y),
|
|
1819
|
+
toggle: d
|
|
1857
1820
|
},
|
|
1858
1821
|
settingsAction: {
|
|
1859
|
-
autoScroll:
|
|
1860
|
-
columnsMap:
|
|
1861
|
-
operationType:
|
|
1862
|
-
setColumnsMap:
|
|
1863
|
-
sortKeyColumns:
|
|
1864
|
-
cacheColumnsMap:
|
|
1865
|
-
setSortKeyColumns:
|
|
1822
|
+
autoScroll: U(e, "autoScroll"),
|
|
1823
|
+
columnsMap: I,
|
|
1824
|
+
operationType: p,
|
|
1825
|
+
setColumnsMap: P,
|
|
1826
|
+
sortKeyColumns: N,
|
|
1827
|
+
cacheColumnsMap: Y,
|
|
1828
|
+
setSortKeyColumns: K
|
|
1866
1829
|
},
|
|
1867
|
-
setPagination:
|
|
1868
|
-
changeColumns:
|
|
1830
|
+
setPagination: E,
|
|
1831
|
+
changeColumns: k,
|
|
1869
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
|
+
})
|
|
1870
1860
|
});
|
|
1871
|
-
const vt = (
|
|
1872
|
-
const
|
|
1873
|
-
return Object.keys(
|
|
1874
|
-
},
|
|
1875
|
-
var
|
|
1876
|
-
let
|
|
1877
|
-
const
|
|
1878
|
-
if (
|
|
1879
|
-
const
|
|
1880
|
-
!
|
|
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", ""));
|
|
1881
1871
|
} else
|
|
1882
|
-
|
|
1883
|
-
return
|
|
1884
|
-
}),
|
|
1885
|
-
e.search.showSearch ? (
|
|
1886
|
-
...
|
|
1872
|
+
y = F;
|
|
1873
|
+
return y;
|
|
1874
|
+
}), Ae = async (y) => {
|
|
1875
|
+
e.search.showSearch ? (fe({
|
|
1876
|
+
...y,
|
|
1887
1877
|
...e.params || {}
|
|
1888
|
-
}),
|
|
1889
|
-
}, mt = (
|
|
1890
|
-
|
|
1891
|
-
},
|
|
1892
|
-
|
|
1893
|
-
current:
|
|
1894
|
-
pageSize:
|
|
1895
|
-
}), Le(
|
|
1896
|
-
}, gt = (
|
|
1897
|
-
var
|
|
1898
|
-
|
|
1899
|
-
current:
|
|
1900
|
-
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
|
|
1901
1891
|
}), Le({
|
|
1902
|
-
current:
|
|
1903
|
-
pageSize:
|
|
1904
|
-
total: x.value && ((
|
|
1892
|
+
current: y,
|
|
1893
|
+
pageSize: F,
|
|
1894
|
+
total: x.value && ((M = x.value) == null ? void 0 : M.total) || 0
|
|
1905
1895
|
}, !1, !1);
|
|
1906
|
-
}, yt = (
|
|
1907
|
-
|
|
1908
|
-
}, bt = (
|
|
1909
|
-
|
|
1910
|
-
}, Ct = (
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
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`,
|
|
1915
1904
|
style: {
|
|
1916
1905
|
margin: "0",
|
|
1917
1906
|
width: "100%",
|
|
@@ -1919,92 +1908,92 @@ const {
|
|
|
1919
1908
|
},
|
|
1920
1909
|
copyable: !0
|
|
1921
1910
|
}, {
|
|
1922
|
-
default: () => [o(
|
|
1923
|
-
title:
|
|
1924
|
-
placement:
|
|
1911
|
+
default: () => [o(G, {
|
|
1912
|
+
title: y,
|
|
1913
|
+
placement: ee
|
|
1925
1914
|
}, {
|
|
1926
1915
|
default: () => [o("div", {
|
|
1927
|
-
class: `${
|
|
1928
|
-
}, [
|
|
1916
|
+
class: `${c}-ellipsis`
|
|
1917
|
+
}, [y])]
|
|
1929
1918
|
})]
|
|
1930
|
-
}) :
|
|
1931
|
-
title:
|
|
1932
|
-
placement:
|
|
1919
|
+
}) : F && !M.copyable ? o(G, {
|
|
1920
|
+
title: y,
|
|
1921
|
+
placement: ee
|
|
1933
1922
|
}, {
|
|
1934
|
-
default: () => [
|
|
1935
|
-
class: `${
|
|
1936
|
-
}, [
|
|
1937
|
-
})
|
|
1938
|
-
},
|
|
1939
|
-
|
|
1940
|
-
|
|
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,
|
|
1941
1933
|
titleTipText: e.titleTipText,
|
|
1942
|
-
options:
|
|
1943
|
-
settingExtra:
|
|
1944
|
-
optionsExtra:
|
|
1945
|
-
toolBarBtn:
|
|
1934
|
+
options: r(ft),
|
|
1935
|
+
settingExtra: ve(t, e, "settingExtra"),
|
|
1936
|
+
optionsExtra: ve(t, e, "optionsExtra"),
|
|
1937
|
+
toolBarBtn: F
|
|
1946
1938
|
}, null);
|
|
1947
1939
|
return () => {
|
|
1948
|
-
var
|
|
1949
|
-
const
|
|
1940
|
+
var ee, ie;
|
|
1941
|
+
const y = ve(t, e, "headerTitle"), F = ve(t, e, "titleTip"), M = ve(t, e, "toolBarBtn");
|
|
1950
1942
|
return o("div", {
|
|
1951
|
-
ref: (
|
|
1943
|
+
ref: (B) => g.value = B,
|
|
1952
1944
|
class: ht.value
|
|
1953
1945
|
}, [o("div", {
|
|
1954
1946
|
class: "gx-pro-table-content"
|
|
1955
|
-
}, [(!!
|
|
1956
|
-
ref:
|
|
1947
|
+
}, [(!!ue.value.length || !!((ee = t.search) != null && ee.call(t))) && o(st, {
|
|
1948
|
+
ref: s,
|
|
1957
1949
|
search: e.search,
|
|
1958
1950
|
modal: e.modalScroll,
|
|
1959
|
-
searchMap:
|
|
1960
|
-
prefixCls:
|
|
1961
|
-
loading: !!
|
|
1951
|
+
searchMap: ue.value,
|
|
1952
|
+
prefixCls: c,
|
|
1953
|
+
loading: !!r(v),
|
|
1962
1954
|
onSearch: mt,
|
|
1963
1955
|
defaultParams: Re
|
|
1964
1956
|
}, {
|
|
1965
1957
|
default: t.search ? () => {
|
|
1966
|
-
var
|
|
1967
|
-
return (
|
|
1958
|
+
var B;
|
|
1959
|
+
return (B = t.search) == null ? void 0 : B.call(t);
|
|
1968
1960
|
} : null
|
|
1969
|
-
}), !
|
|
1970
|
-
spinning: !!
|
|
1961
|
+
}), !m.value && xt(y, M, F), ((ie = e.customize) != null ? ie : t.customize) ? o(je, {
|
|
1962
|
+
spinning: !!r(v)
|
|
1971
1963
|
}, {
|
|
1972
|
-
default: () => {
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
}), null)];
|
|
1982
|
-
}
|
|
1983
|
-
}) : 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, {
|
|
1984
1973
|
style: e.tableStyle || void 0,
|
|
1985
1974
|
class: e.tableClassName,
|
|
1986
|
-
rowKey: (
|
|
1975
|
+
rowKey: (B) => B[e.rowKey || "sortIndex"],
|
|
1987
1976
|
transformCellText: ({
|
|
1988
|
-
text:
|
|
1989
|
-
column:
|
|
1977
|
+
text: B,
|
|
1978
|
+
column: A
|
|
1990
1979
|
}) => {
|
|
1991
|
-
const
|
|
1992
|
-
if (de(
|
|
1993
|
-
return
|
|
1980
|
+
const te = Ie(B) ? B == null ? void 0 : B[0] : B;
|
|
1981
|
+
if (de(te))
|
|
1982
|
+
return B;
|
|
1994
1983
|
const {
|
|
1995
|
-
value:
|
|
1996
|
-
success:
|
|
1997
|
-
} =
|
|
1998
|
-
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;
|
|
1999
1988
|
},
|
|
2000
1989
|
rowSelection: e.rowSelection ? {
|
|
2001
1990
|
...qe(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2002
|
-
selectedRowKeys:
|
|
2003
|
-
onSelect:
|
|
2004
|
-
onSelectAll:
|
|
2005
|
-
onChange:
|
|
1991
|
+
selectedRowKeys: ke.value,
|
|
1992
|
+
onSelect: Ce,
|
|
1993
|
+
onSelectAll: X,
|
|
1994
|
+
onChange: be
|
|
2006
1995
|
} : void 0,
|
|
2007
|
-
onChange:
|
|
1996
|
+
onChange: Fe,
|
|
2008
1997
|
onExpandedRowsChange: yt,
|
|
2009
1998
|
onExpand: bt,
|
|
2010
1999
|
onResizeColumn: Ct
|
|
@@ -2014,9 +2003,9 @@ const {
|
|
|
2014
2003
|
};
|
|
2015
2004
|
}
|
|
2016
2005
|
});
|
|
2017
|
-
|
|
2006
|
+
Me.install = (e) => (e.component(Me.name, Me), e);
|
|
2018
2007
|
export {
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2008
|
+
Me as ProTable,
|
|
2009
|
+
Me as default,
|
|
2010
|
+
le as proTableProps
|
|
2022
2011
|
};
|