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