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