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