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