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