@gx-design-vue/pro-table 0.2.0-beta.75 → 0.2.0-beta.77
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 +29 -423
- package/dist/_utils/ant-design-vue/table/props.d.ts +17 -168
- package/dist/hooks/useColums.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +5 -5
- package/dist/hooks/useRowSelection.d.ts +1 -1
- package/dist/hooks/useTable.d.ts +16 -12
- package/dist/hooks/useTableForm.d.ts +4 -4
- package/dist/hooks/useTableScroll.d.ts +1 -1
- package/dist/pro-table.js +1042 -1207
- package/dist/pro-table.umd.cjs +1 -1
- package/dist/props.d.ts +7 -167
- package/dist/types/ColumnTypings.d.ts +5 -5
- package/dist/types/SlotsTypings.d.ts +6 -5
- package/dist/types/TableTypings.d.ts +22 -17
- package/dist/typing.d.ts +1 -1
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,269 +1,120 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { isObject as X, isBoolean as ae, getSlot as ht, isFunction as $e, arrayRepeat as Lt, runFunction as Vt, convertValueBoolean as ye, isArray as be, getSortIndex as Ht, isDeepEqualReact as De, handleCurrentPage as Wt, genColumnKey as mt, compareArray as _t, isNumber as vt, isString as Gt, filterEmpty as gt, classNames as je, getPrefixCls as Ge, getRandomNumber as We, handleShowIndex as qt, hanndleEmptyField as Ut, getSlotVNode as ge } from "@gx-design-vue/pro-utils";
|
|
2
|
+
import { reactive as oe, isReactive as Xt, watch as H, computed as p, ref as k, toRaw as fe, createVNode as r, mergeProps as q, isVNode as me, watchEffect as Pe, unref as S, onUnmounted as Jt, onDeactivated as Qt, onMounted as Zt, defineComponent as ne, Fragment as Ne, nextTick as el, h as yt, cloneVNode as qe, createTextVNode as Fe, renderSlot as tl, toRef as Z } from "vue";
|
|
3
|
+
import "ant-design-vue/es/_util/props-util";
|
|
4
|
+
import { warning as ll } from "ant-design-vue/es/vc-util/warning";
|
|
5
|
+
import { omit as Ee, cloneDeep as le, pick as ot } from "lodash-es";
|
|
6
|
+
import { tableProps as al } from "ant-design-vue/es/table/Table";
|
|
7
|
+
import { useFullscreen as bt, useWindowSize as nl } from "@vueuse/core";
|
|
8
|
+
import { Form as rt, Grid as Ue, Space as se, Button as ct, Input as dt, TimePicker as ul, DatePicker as Ct, TreeSelect as il, Spin as _e, Select as sl, Popover as ol, Checkbox as rl, Tooltip as ee, Tree as cl, Dropdown as dl, Menu as ke, Pagination as fl, Table as hl, Typography as ml, Empty as vl } from "ant-design-vue";
|
|
9
|
+
import { useProAppContext as xt } from "@gx-design-vue/pro-app";
|
|
10
|
+
import { useContext as gl, useProStyle as ze } from "@gx-design-vue/pro-provider";
|
|
8
11
|
import G from "dayjs";
|
|
9
|
-
import { tryOnUnmounted as
|
|
10
|
-
import { UpOutlined as
|
|
11
|
-
function
|
|
12
|
-
var C,
|
|
12
|
+
import { tryOnUnmounted as yl, useMemo as Me } from "@gx-design-vue/pro-hooks";
|
|
13
|
+
import { UpOutlined as bl, DownOutlined as Cl, SettingOutlined as St, VerticalAlignTopOutlined as xl, VerticalAlignMiddleOutlined as Sl, VerticalAlignBottomOutlined as wl, FullscreenExitOutlined as pl, FullscreenOutlined as Tl, ColumnHeightOutlined as $l, InfoCircleOutlined as Fl, ReloadOutlined as Rl } from "@ant-design/icons-vue";
|
|
14
|
+
function Ra(e, n) {
|
|
15
|
+
var C, T, m;
|
|
13
16
|
function l() {
|
|
14
|
-
return
|
|
17
|
+
return n != null && n.state && X(n == null ? void 0 : n.state) ? fe(n == null ? void 0 : n.state) : {};
|
|
15
18
|
}
|
|
16
|
-
const
|
|
19
|
+
const u = oe({
|
|
17
20
|
// @ts-ignore
|
|
18
|
-
request: async (...
|
|
19
|
-
var
|
|
20
|
-
return
|
|
21
|
+
request: async (...s) => {
|
|
22
|
+
var a;
|
|
23
|
+
return n != null && n.request ? await ((a = n == null ? void 0 : n.request) == null ? void 0 : a.call(n, ...s)) : void 0;
|
|
21
24
|
}
|
|
22
25
|
});
|
|
23
|
-
|
|
24
|
-
Object.assign(
|
|
25
|
-
}, { deep: !0, immediate: !0 }) : Object.assign(
|
|
26
|
-
const
|
|
27
|
-
var
|
|
28
|
-
return (
|
|
29
|
-
}),
|
|
30
|
-
var
|
|
31
|
-
return (
|
|
32
|
-
}), d =
|
|
33
|
-
var
|
|
26
|
+
n != null && n.state && (Xt(n.state) ? H(() => n == null ? void 0 : n.state, () => {
|
|
27
|
+
Object.assign(u, l());
|
|
28
|
+
}, { deep: !0, immediate: !0 }) : Object.assign(u, l()));
|
|
29
|
+
const o = p(() => {
|
|
30
|
+
var s, a;
|
|
31
|
+
return (a = (s = e == null ? void 0 : e.value) == null ? void 0 : s.actionRef) == null ? void 0 : a.call(s);
|
|
32
|
+
}), i = p(() => {
|
|
33
|
+
var s, a;
|
|
34
|
+
return (a = (s = e == null ? void 0 : e.value) == null ? void 0 : s.formRef) == null ? void 0 : a.call(s);
|
|
35
|
+
}), d = p(() => {
|
|
36
|
+
var s, a, c;
|
|
34
37
|
return {
|
|
35
|
-
...((
|
|
36
|
-
...((
|
|
38
|
+
...((s = o.value) == null ? void 0 : s.pageState) || {},
|
|
39
|
+
...((c = (a = i.value) == null ? void 0 : a.getFormState) == null ? void 0 : c.call(a)) || {}
|
|
37
40
|
};
|
|
38
|
-
}), f = k(!!((
|
|
41
|
+
}), f = k(!!((T = (C = o.value) == null ? void 0 : C.loading) != null && T.value));
|
|
39
42
|
return H(() => {
|
|
40
|
-
var
|
|
41
|
-
return (
|
|
42
|
-
}, (
|
|
43
|
-
f.value = !!
|
|
44
|
-
}), H(f, (
|
|
45
|
-
var
|
|
46
|
-
(
|
|
43
|
+
var s, a;
|
|
44
|
+
return (a = (s = o.value) == null ? void 0 : s.loading) == null ? void 0 : a.value;
|
|
45
|
+
}, (s) => {
|
|
46
|
+
f.value = !!s;
|
|
47
|
+
}), H(f, (s) => {
|
|
48
|
+
var a, c;
|
|
49
|
+
(c = (a = o.value) == null ? void 0 : a.setLoading) == null || c.call(a, !!s);
|
|
47
50
|
}), {
|
|
48
|
-
formRef:
|
|
49
|
-
actionRef:
|
|
50
|
-
tableState:
|
|
51
|
+
formRef: i,
|
|
52
|
+
actionRef: o,
|
|
53
|
+
tableState: u,
|
|
51
54
|
requestParams: d,
|
|
52
55
|
loading: f,
|
|
53
|
-
dataSource:
|
|
54
|
-
var
|
|
55
|
-
return ((
|
|
56
|
+
dataSource: p(() => {
|
|
57
|
+
var s, a;
|
|
58
|
+
return ((a = (s = o == null ? void 0 : o.value) == null ? void 0 : s.dataSource) == null ? void 0 : a.value) || [];
|
|
56
59
|
}),
|
|
57
|
-
|
|
58
|
-
var
|
|
59
|
-
return (
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
return (
|
|
60
|
+
selectedKey: p(() => {
|
|
61
|
+
var s, a;
|
|
62
|
+
return ((a = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedKey) == null ? void 0 : a.value) || [];
|
|
63
|
+
}),
|
|
64
|
+
selectedItem: p(() => {
|
|
65
|
+
var s, a;
|
|
66
|
+
return ((a = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedItem) == null ? void 0 : a.value) || [];
|
|
67
|
+
}),
|
|
68
|
+
rowsSelection: (m = o == null ? void 0 : o.value) == null ? void 0 : m.rowsSelection,
|
|
69
|
+
mutate: (s) => {
|
|
70
|
+
var a, c;
|
|
71
|
+
return (c = (a = o.value) == null ? void 0 : a.reSetDataList) == null ? void 0 : c.call(a, s);
|
|
64
72
|
},
|
|
65
|
-
reloadAndReset: (
|
|
66
|
-
var
|
|
67
|
-
return (
|
|
73
|
+
reloadAndReset: (s) => {
|
|
74
|
+
var a, c;
|
|
75
|
+
return (c = (a = o.value) == null ? void 0 : a.reloadAndReset) == null ? void 0 : c.call(a, s);
|
|
68
76
|
},
|
|
69
|
-
setPageAndReload: (
|
|
70
|
-
var
|
|
71
|
-
return (
|
|
77
|
+
setPageAndReload: (s, a, c, g) => {
|
|
78
|
+
var h, x;
|
|
79
|
+
return (x = (h = o.value) == null ? void 0 : h.setPageAndReload) == null ? void 0 : x.call(h, s, a, c, g);
|
|
72
80
|
},
|
|
73
|
-
setPagination: (
|
|
74
|
-
var
|
|
75
|
-
return (
|
|
81
|
+
setPagination: (s) => {
|
|
82
|
+
var a, c;
|
|
83
|
+
return (c = (a = o.value) == null ? void 0 : a.setPagination) == null ? void 0 : c.call(a, s);
|
|
76
84
|
},
|
|
77
|
-
setLoading: (
|
|
78
|
-
setData: (
|
|
79
|
-
var
|
|
80
|
-
return (
|
|
85
|
+
setLoading: (s) => f.value = s,
|
|
86
|
+
setData: (s) => {
|
|
87
|
+
var a, c;
|
|
88
|
+
return (c = (a = o.value) == null ? void 0 : a.setData) == null ? void 0 : c.call(a, s);
|
|
81
89
|
},
|
|
82
|
-
reload: (
|
|
83
|
-
var
|
|
84
|
-
return (
|
|
90
|
+
reload: (s) => {
|
|
91
|
+
var a, c;
|
|
92
|
+
return (c = (a = o.value) == null ? void 0 : a.reload) == null ? void 0 : c.call(a, s);
|
|
85
93
|
}
|
|
86
94
|
};
|
|
87
95
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
type: Array,
|
|
98
|
-
default: () => []
|
|
99
|
-
},
|
|
100
|
-
tableLayout: {
|
|
101
|
-
type: String,
|
|
102
|
-
default: void 0
|
|
103
|
-
},
|
|
104
|
-
rowClassName: {
|
|
105
|
-
type: [String, Function],
|
|
106
|
-
default: void 0
|
|
107
|
-
},
|
|
108
|
-
title: {
|
|
109
|
-
type: Function,
|
|
110
|
-
default: void 0
|
|
111
|
-
},
|
|
112
|
-
footer: {
|
|
113
|
-
type: Function,
|
|
114
|
-
default: void 0
|
|
115
|
-
},
|
|
116
|
-
id: {
|
|
117
|
-
type: String,
|
|
118
|
-
default: void 0
|
|
119
|
-
},
|
|
120
|
-
showHeader: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
default: void 0
|
|
123
|
-
},
|
|
124
|
-
components: {
|
|
125
|
-
type: Object,
|
|
126
|
-
default: void 0
|
|
127
|
-
},
|
|
128
|
-
customRow: {
|
|
129
|
-
type: Function,
|
|
130
|
-
default: void 0
|
|
131
|
-
},
|
|
132
|
-
customHeaderRow: {
|
|
133
|
-
type: Function,
|
|
134
|
-
default: void 0
|
|
135
|
-
},
|
|
136
|
-
direction: {
|
|
137
|
-
type: String,
|
|
138
|
-
default: void 0
|
|
139
|
-
},
|
|
140
|
-
expandFixed: {
|
|
141
|
-
type: [Boolean, String],
|
|
142
|
-
default: void 0
|
|
143
|
-
},
|
|
144
|
-
expandColumnWidth: {
|
|
145
|
-
type: Number,
|
|
146
|
-
default: void 0
|
|
147
|
-
},
|
|
148
|
-
expandedRowKeys: {
|
|
149
|
-
type: Array,
|
|
150
|
-
default: void 0
|
|
151
|
-
},
|
|
152
|
-
defaultExpandedRowKeys: {
|
|
153
|
-
type: Array,
|
|
154
|
-
default: void 0
|
|
155
|
-
},
|
|
156
|
-
expandedRowRender: {
|
|
157
|
-
type: Function,
|
|
158
|
-
default: void 0
|
|
159
|
-
},
|
|
160
|
-
expandRowByClick: {
|
|
161
|
-
type: Boolean,
|
|
162
|
-
default: void 0
|
|
163
|
-
},
|
|
164
|
-
expandIcon: {
|
|
165
|
-
type: Function,
|
|
166
|
-
default: void 0
|
|
167
|
-
},
|
|
168
|
-
onExpand: {
|
|
169
|
-
type: Function,
|
|
170
|
-
default: void 0
|
|
171
|
-
},
|
|
172
|
-
onExpandedRowsChange: {
|
|
173
|
-
type: Function,
|
|
174
|
-
default: void 0
|
|
175
|
-
},
|
|
176
|
-
"onUpdate:expandedRowKeys": {
|
|
177
|
-
type: Function,
|
|
178
|
-
default: void 0
|
|
179
|
-
},
|
|
180
|
-
defaultExpandAllRows: {
|
|
181
|
-
type: Boolean,
|
|
182
|
-
default: void 0
|
|
183
|
-
},
|
|
184
|
-
indentSize: {
|
|
185
|
-
type: Number,
|
|
186
|
-
default: void 0
|
|
187
|
-
},
|
|
188
|
-
/** @deprecated Please use `EXPAND_COLUMN` in `columns` directly */
|
|
189
|
-
expandIconColumnIndex: {
|
|
190
|
-
type: Number,
|
|
191
|
-
default: void 0
|
|
192
|
-
},
|
|
193
|
-
showExpandColumn: {
|
|
96
|
+
const Pl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], wt = {
|
|
97
|
+
...Ee(al(), Pl),
|
|
98
|
+
/**
|
|
99
|
+
* @Author gx12358
|
|
100
|
+
* @DateTime 2022/2/8
|
|
101
|
+
* @lastTime 2022/2/8
|
|
102
|
+
* @description 是否展示外边框和列边框
|
|
103
|
+
*/
|
|
104
|
+
bordered: {
|
|
194
105
|
type: Boolean,
|
|
195
|
-
default:
|
|
196
|
-
},
|
|
197
|
-
expandedRowClassName: {
|
|
198
|
-
type: Function,
|
|
199
|
-
default: void 0
|
|
200
|
-
},
|
|
201
|
-
childrenColumnName: {
|
|
202
|
-
type: String,
|
|
203
|
-
default: void 0
|
|
204
|
-
},
|
|
205
|
-
rowExpandable: {
|
|
206
|
-
type: Function,
|
|
207
|
-
default: void 0
|
|
208
|
-
},
|
|
209
|
-
sticky: {
|
|
210
|
-
type: [Boolean, Object],
|
|
211
|
-
default: void 0
|
|
212
|
-
},
|
|
213
|
-
dropdownPrefixCls: {
|
|
214
|
-
type: String,
|
|
215
|
-
default: void 0
|
|
216
|
-
},
|
|
217
|
-
dataSource: {
|
|
218
|
-
type: Array,
|
|
219
|
-
default: void 0
|
|
106
|
+
default: !0
|
|
220
107
|
},
|
|
221
108
|
loading: {
|
|
222
109
|
type: [Boolean, Object],
|
|
223
110
|
default: void 0
|
|
224
111
|
},
|
|
225
|
-
size: {
|
|
226
|
-
type: String,
|
|
227
|
-
default: void 0
|
|
228
|
-
},
|
|
229
|
-
locale: {
|
|
230
|
-
type: Object,
|
|
231
|
-
default: void 0
|
|
232
|
-
},
|
|
233
|
-
onChange: {
|
|
234
|
-
type: Function,
|
|
235
|
-
default: void 0
|
|
236
|
-
},
|
|
237
|
-
onResizeColumn: {
|
|
238
|
-
type: Function,
|
|
239
|
-
default: void 0
|
|
240
|
-
},
|
|
241
|
-
rowSelection: {
|
|
242
|
-
type: Object,
|
|
243
|
-
default: void 0
|
|
244
|
-
},
|
|
245
|
-
getPopupContainer: {
|
|
246
|
-
type: Function,
|
|
247
|
-
default: void 0
|
|
248
|
-
},
|
|
249
112
|
scroll: {
|
|
250
113
|
type: Object,
|
|
251
114
|
default: void 0
|
|
252
|
-
},
|
|
253
|
-
sortDirections: {
|
|
254
|
-
type: Array,
|
|
255
|
-
default: void 0
|
|
256
|
-
},
|
|
257
|
-
showSorterTooltip: {
|
|
258
|
-
type: [Boolean, Object],
|
|
259
|
-
default: !0
|
|
260
|
-
},
|
|
261
|
-
transformCellText: {
|
|
262
|
-
type: Function,
|
|
263
|
-
default: void 0
|
|
264
115
|
}
|
|
265
|
-
}
|
|
266
|
-
|
|
116
|
+
}, he = {
|
|
117
|
+
...wt,
|
|
267
118
|
rowSelection: {
|
|
268
119
|
type: Object,
|
|
269
120
|
default: void 0
|
|
@@ -286,8 +137,6 @@ const $l = () => ({
|
|
|
286
137
|
virtualScroll: Boolean,
|
|
287
138
|
// 用于 request 查询的额外参数,一旦变化会触发重新加载
|
|
288
139
|
params: Object,
|
|
289
|
-
// 对通过 request 获取的数据进行处理
|
|
290
|
-
postData: Function,
|
|
291
140
|
// 等待请求时间设置
|
|
292
141
|
waitRequest: {
|
|
293
142
|
type: Boolean,
|
|
@@ -333,12 +182,6 @@ const $l = () => ({
|
|
|
333
182
|
default: () => {
|
|
334
183
|
}
|
|
335
184
|
},
|
|
336
|
-
/**
|
|
337
|
-
* @Author gx12358
|
|
338
|
-
* @DateTime 2022/2/8
|
|
339
|
-
* @lastTime 2022/2/8
|
|
340
|
-
* @description 添加表格class
|
|
341
|
-
*/
|
|
342
185
|
showLoading: {
|
|
343
186
|
type: Boolean,
|
|
344
187
|
default: !0
|
|
@@ -436,7 +279,7 @@ const $l = () => ({
|
|
|
436
279
|
* @description 翻页item设置
|
|
437
280
|
*/
|
|
438
281
|
pageItemRender: {
|
|
439
|
-
type: [Function, Object],
|
|
282
|
+
type: [Function, Object, Array],
|
|
440
283
|
default: () => {
|
|
441
284
|
}
|
|
442
285
|
},
|
|
@@ -460,16 +303,6 @@ const $l = () => ({
|
|
|
460
303
|
type: String,
|
|
461
304
|
default: "left"
|
|
462
305
|
},
|
|
463
|
-
/**
|
|
464
|
-
* @Author gx12358
|
|
465
|
-
* @DateTime 2022/2/8
|
|
466
|
-
* @lastTime 2022/2/8
|
|
467
|
-
* @description 是否展示外边框和列边框
|
|
468
|
-
*/
|
|
469
|
-
bordered: {
|
|
470
|
-
type: Boolean,
|
|
471
|
-
default: !0
|
|
472
|
-
},
|
|
473
306
|
/**
|
|
474
307
|
* @Author gx12358
|
|
475
308
|
* @DateTime 2022/2/8
|
|
@@ -524,6 +357,8 @@ const $l = () => ({
|
|
|
524
357
|
* @lastTime 2022/2/8
|
|
525
358
|
* @description Pro-Table 的方法
|
|
526
359
|
*/
|
|
360
|
+
// 对通过 request 获取的数据进行处理
|
|
361
|
+
postData: Function,
|
|
527
362
|
onReset: Function,
|
|
528
363
|
onReload: Function,
|
|
529
364
|
onSubmit: Function,
|
|
@@ -533,86 +368,86 @@ const $l = () => ({
|
|
|
533
368
|
onBeforeSearchSubmit: Function,
|
|
534
369
|
onColumnsStateChange: Function
|
|
535
370
|
};
|
|
536
|
-
function
|
|
537
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
371
|
+
function Bl(e) {
|
|
372
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !me(e);
|
|
538
373
|
}
|
|
539
|
-
function
|
|
540
|
-
if (!
|
|
541
|
-
let
|
|
542
|
-
if (
|
|
543
|
-
const
|
|
544
|
-
return
|
|
545
|
-
class: [
|
|
546
|
-
onClick:
|
|
547
|
-
}),
|
|
374
|
+
function Il(e, n, l, u) {
|
|
375
|
+
if (!n) return e;
|
|
376
|
+
let o = e;
|
|
377
|
+
if (X(n)) {
|
|
378
|
+
const i = n.node === "a" ? "span" : n.node;
|
|
379
|
+
return r(i, q((n == null ? void 0 : n.attr) || {}, {
|
|
380
|
+
class: [n.class, n.node === "a" ? `${l}-a` : ""],
|
|
381
|
+
onClick: n.click
|
|
382
|
+
}), Bl(e) ? e : {
|
|
548
383
|
default: () => [e]
|
|
549
384
|
});
|
|
550
385
|
}
|
|
551
|
-
switch (
|
|
386
|
+
switch (n) {
|
|
552
387
|
case "link":
|
|
553
|
-
|
|
554
|
-
class: [`${l}-a`,
|
|
388
|
+
o = r("span", {
|
|
389
|
+
class: [`${l}-a`, u]
|
|
555
390
|
}, [e]);
|
|
556
391
|
break;
|
|
557
392
|
case "time":
|
|
558
|
-
|
|
393
|
+
o = G(e).format("HH:mm:ss");
|
|
559
394
|
break;
|
|
560
395
|
case "dateMonth":
|
|
561
|
-
|
|
396
|
+
o = `${G(e).month() + 1}月`;
|
|
562
397
|
break;
|
|
563
398
|
case "dateTime":
|
|
564
|
-
|
|
399
|
+
o = G(e).format("YYYY-MM-DD HH:mm:ss");
|
|
565
400
|
break;
|
|
566
401
|
}
|
|
567
|
-
return
|
|
402
|
+
return o;
|
|
568
403
|
}
|
|
569
|
-
function
|
|
570
|
-
const l =
|
|
571
|
-
return e.filter((
|
|
404
|
+
function Ol(e, n) {
|
|
405
|
+
const l = n && n.current || 1, u = n && n.pageSize || 10;
|
|
406
|
+
return e.filter((o, i) => i < l * u && i >= u * (l - 1));
|
|
572
407
|
}
|
|
573
|
-
function
|
|
574
|
-
var
|
|
575
|
-
const l = k(ae(
|
|
576
|
-
H(() =>
|
|
577
|
-
l.value = ae(d) ? d :
|
|
408
|
+
function kl({ emit: e, loading: n }) {
|
|
409
|
+
var i;
|
|
410
|
+
const l = k(ae(n.value) ? n.value : X(n.value) ? (i = n.value) == null ? void 0 : i.spinning : !1);
|
|
411
|
+
H(() => n.value, (d) => {
|
|
412
|
+
l.value = ae(d) ? d : X(d) ? d == null ? void 0 : d.spinning : l.value;
|
|
578
413
|
});
|
|
579
|
-
const
|
|
580
|
-
function
|
|
414
|
+
const u = p(() => l.value);
|
|
415
|
+
function o(d) {
|
|
581
416
|
l.value = d, e("loadingChange", !0);
|
|
582
417
|
}
|
|
583
|
-
return { loadingComputed:
|
|
418
|
+
return { loadingComputed: u, loading: l, setLoading: o };
|
|
584
419
|
}
|
|
585
|
-
function
|
|
420
|
+
function Dl({ size: e, emit: n }) {
|
|
586
421
|
const l = k("middle");
|
|
587
|
-
|
|
422
|
+
Pe(() => {
|
|
588
423
|
l.value = e.value;
|
|
589
424
|
});
|
|
590
|
-
function
|
|
591
|
-
l.value =
|
|
425
|
+
function u(o) {
|
|
426
|
+
l.value = o, n("sizeChange", o);
|
|
592
427
|
}
|
|
593
|
-
return { sizeRef: l, setTableSize:
|
|
428
|
+
return { sizeRef: l, setTableSize: u };
|
|
594
429
|
}
|
|
595
|
-
function
|
|
430
|
+
function jl({
|
|
596
431
|
slots: e,
|
|
597
|
-
props:
|
|
432
|
+
props: n,
|
|
598
433
|
pagination: l
|
|
599
434
|
}) {
|
|
600
|
-
const
|
|
435
|
+
const u = oe({}), o = k();
|
|
601
436
|
H(() => l.value, () => {
|
|
602
|
-
var
|
|
437
|
+
var T;
|
|
603
438
|
if (ae(l.value) && !l.value) {
|
|
604
|
-
|
|
439
|
+
o.value = !1;
|
|
605
440
|
return;
|
|
606
441
|
}
|
|
607
|
-
const d =
|
|
442
|
+
const d = ht(e, S(n), "pageItemRender"), f = $e(d) ? {
|
|
608
443
|
itemRender: ({
|
|
609
|
-
page:
|
|
610
|
-
type:
|
|
611
|
-
originalElement:
|
|
444
|
+
page: m,
|
|
445
|
+
type: s,
|
|
446
|
+
originalElement: a
|
|
612
447
|
}) => d ? d({
|
|
613
|
-
page:
|
|
614
|
-
type:
|
|
615
|
-
originalElement:
|
|
448
|
+
page: m,
|
|
449
|
+
type: s,
|
|
450
|
+
originalElement: a
|
|
616
451
|
}) : null
|
|
617
452
|
} : null, C = {
|
|
618
453
|
current: 1,
|
|
@@ -624,7 +459,7 @@ function Ol({
|
|
|
624
459
|
...l.value || {},
|
|
625
460
|
...f || {}
|
|
626
461
|
};
|
|
627
|
-
(
|
|
462
|
+
(T = l.value) != null && T.showTotal || (C.showTotal = (m) => `共${m < C.pageSize ? 1 : Math.ceil(m / (C.pageSize || 10))}页 ${m}条记录`), o.value = C, Object.assign(u, {
|
|
628
463
|
pageNum: C.current,
|
|
629
464
|
pageSize: C.pageSize
|
|
630
465
|
});
|
|
@@ -632,432 +467,430 @@ function Ol({
|
|
|
632
467
|
deep: 1,
|
|
633
468
|
immediate: !0
|
|
634
469
|
});
|
|
635
|
-
function
|
|
636
|
-
if (
|
|
470
|
+
function i(d) {
|
|
471
|
+
if (X(o.value) && X(d)) {
|
|
637
472
|
const f = {};
|
|
638
473
|
Object.keys(d).forEach((C) => {
|
|
639
|
-
Object.prototype.hasOwnProperty.call(d, C) &&
|
|
640
|
-
}), Object.keys(f).length > 0 && (Object.assign(
|
|
474
|
+
Object.prototype.hasOwnProperty.call(d, C) && o.value[C] === d[C] || (f[C] = d[C]);
|
|
475
|
+
}), Object.keys(f).length > 0 && (Object.assign(o.value, f), Ml(f) && Object.assign(u, f));
|
|
641
476
|
}
|
|
642
477
|
}
|
|
643
478
|
return {
|
|
644
|
-
paginationInfo:
|
|
645
|
-
requestPagination:
|
|
646
|
-
setPagination:
|
|
479
|
+
paginationInfo: o,
|
|
480
|
+
requestPagination: u,
|
|
481
|
+
setPagination: i
|
|
647
482
|
};
|
|
648
483
|
}
|
|
649
|
-
function
|
|
484
|
+
function Ml(e) {
|
|
650
485
|
if (typeof e != "object" || e === null)
|
|
651
486
|
return !1;
|
|
652
|
-
const
|
|
653
|
-
return
|
|
487
|
+
const n = Object.keys(e);
|
|
488
|
+
return n.length === 2 && n.includes("pageNum") && n.includes("pageSize");
|
|
654
489
|
}
|
|
655
|
-
function
|
|
656
|
-
const l = k([]),
|
|
490
|
+
function Nl(e, n) {
|
|
491
|
+
const l = k([]), u = k([]);
|
|
657
492
|
H(() => {
|
|
658
|
-
var
|
|
659
|
-
return (
|
|
660
|
-
}, (
|
|
661
|
-
l.value =
|
|
493
|
+
var m;
|
|
494
|
+
return (m = n.value) == null ? void 0 : m.selectedRowKeys;
|
|
495
|
+
}, (m) => {
|
|
496
|
+
l.value = Lt([...m || []]);
|
|
662
497
|
}, {
|
|
663
498
|
deep: !0,
|
|
664
499
|
immediate: !0
|
|
665
500
|
});
|
|
666
|
-
const
|
|
667
|
-
e.value && (
|
|
668
|
-
},
|
|
669
|
-
var
|
|
670
|
-
|
|
501
|
+
const o = (m, s) => {
|
|
502
|
+
e.value && (s ? m != null && m[e.value] && (l.value.push(m[e.value]), u.value.push(m)) : (l.value = l.value.filter((a) => a !== m[e.value]), u.value = u.value.filter((a) => a[e.value] !== m[e.value])));
|
|
503
|
+
}, i = () => {
|
|
504
|
+
var m, s;
|
|
505
|
+
n.value && ((s = (m = n.value) == null ? void 0 : m.onChange) == null || s.call(m, l.value, u.value));
|
|
671
506
|
};
|
|
672
507
|
return {
|
|
673
508
|
selectedKey: l,
|
|
674
|
-
selectedItem:
|
|
675
|
-
selectRowKey:
|
|
676
|
-
selectAllRowKey: (
|
|
677
|
-
e.value && (
|
|
509
|
+
selectedItem: u,
|
|
510
|
+
selectRowKey: o,
|
|
511
|
+
selectAllRowKey: (m, s, a) => {
|
|
512
|
+
e.value && (m ? s.map((c) => (l.value.every((g) => g !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (l.value.push(c[e.value]), u.value.push(c)), c)) : a.map((c) => (l.value.includes(c == null ? void 0 : c[e.value]) && (l.value = l.value.filter((g) => g !== c[e.value]), u.value = u.value.filter((g) => g[e.value] !== c[e.value])), c)));
|
|
678
513
|
},
|
|
679
|
-
removeRowKeys: (
|
|
680
|
-
l.value = l.value.filter((
|
|
514
|
+
removeRowKeys: (m) => {
|
|
515
|
+
l.value = l.value.filter((s) => !m.includes(s)), u.value = u.value.filter((s) => !m.includes(s == null ? void 0 : s[e.value || ""])), i();
|
|
681
516
|
},
|
|
682
|
-
changeRowKey:
|
|
683
|
-
syncSelectedRows: (
|
|
684
|
-
if (e.value && l.value.length !==
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
517
|
+
changeRowKey: i,
|
|
518
|
+
syncSelectedRows: (m) => {
|
|
519
|
+
if (e.value && l.value.length !== u.value.length) {
|
|
520
|
+
const s = u.value.map((c) => c[e.value]), a = l.value.filter((c) => !s.includes(c));
|
|
521
|
+
m.forEach((c) => {
|
|
522
|
+
a.includes(c[e.value]) && u.value.push(le(c));
|
|
688
523
|
});
|
|
689
524
|
}
|
|
690
525
|
},
|
|
691
526
|
clearAllRowKeys: () => {
|
|
692
|
-
l.value = [],
|
|
527
|
+
l.value = [], u.value = [], i();
|
|
693
528
|
}
|
|
694
529
|
};
|
|
695
530
|
}
|
|
696
|
-
function
|
|
697
|
-
const l =
|
|
698
|
-
function
|
|
699
|
-
|
|
531
|
+
function El(e, n) {
|
|
532
|
+
const l = p(() => n || 0), u = k(), o = k(e);
|
|
533
|
+
function i() {
|
|
534
|
+
u.value && clearTimeout(u.value);
|
|
700
535
|
}
|
|
701
536
|
async function d(...f) {
|
|
702
|
-
return l.value === 0 || l.value === void 0 ?
|
|
703
|
-
var
|
|
704
|
-
(
|
|
705
|
-
C(await
|
|
537
|
+
return l.value === 0 || l.value === void 0 ? o.value(...f) : (i(), new Promise(async (C) => {
|
|
538
|
+
var T;
|
|
539
|
+
(T = f[0]) != null && T.immediate ? C(await o.value(...f)) : u.value = setTimeout(async () => {
|
|
540
|
+
C(await o.value(...f));
|
|
706
541
|
}, l.value);
|
|
707
542
|
}));
|
|
708
543
|
}
|
|
709
|
-
return
|
|
710
|
-
cancel:
|
|
544
|
+
return yl(i), {
|
|
545
|
+
cancel: i,
|
|
711
546
|
run: d
|
|
712
547
|
};
|
|
713
548
|
}
|
|
714
|
-
function
|
|
715
|
-
const
|
|
549
|
+
function zl(e) {
|
|
550
|
+
const n = p(() => e.polling), l = p(() => e.debounceTime), u = p(() => e.dataSource);
|
|
716
551
|
return {
|
|
717
|
-
polling:
|
|
552
|
+
polling: n,
|
|
718
553
|
request: e.request,
|
|
719
554
|
postData: e.postData,
|
|
720
555
|
debounceTime: l,
|
|
721
|
-
dataSource:
|
|
556
|
+
dataSource: u
|
|
722
557
|
};
|
|
723
558
|
}
|
|
724
|
-
function
|
|
725
|
-
const R = k(), O = k(!0),
|
|
726
|
-
var
|
|
727
|
-
const { pagination:
|
|
728
|
-
if (!
|
|
729
|
-
return
|
|
730
|
-
if (
|
|
731
|
-
O.value = !1,
|
|
559
|
+
function Kl({ polling: e, request: n, postData: l, dataSource: u, waitRequest: o, debounceTime: i }, { columns: d, loading: f, setLoading: C, setColumns: T, removeRowKeys: m, syncSelectedRows: s, formParamsRef: a, setPagination: c, paginationInfo: g, onBeforeSearchSubmit: h, hasCustomRender: x }, P) {
|
|
560
|
+
const R = k(), O = k(!0), Y = k(!1), L = k(!1), N = k([]), V = k(), ue = async (y = {}) => {
|
|
561
|
+
var Be;
|
|
562
|
+
const { pagination: $, filters: M = {}, sorter: E = {}, removeKeys: w = [], isPolling: Ke = !1 } = y;
|
|
563
|
+
if (!n || !$e(n) || S(o) && f.value || Y.value)
|
|
564
|
+
return u.value || [];
|
|
565
|
+
if (Y.value = !0, !Ke || S(o) || O.value ? C(!0) : Ce(!0), S(o)) {
|
|
566
|
+
O.value = !1, Y.value = !1;
|
|
732
567
|
return;
|
|
733
568
|
}
|
|
734
|
-
|
|
569
|
+
$ && c($);
|
|
735
570
|
try {
|
|
736
571
|
let ie = {};
|
|
737
|
-
if (ae(
|
|
572
|
+
if (ae($) && !$ || ae(g))
|
|
738
573
|
ie = {};
|
|
739
574
|
else {
|
|
740
|
-
const { current:
|
|
741
|
-
ie.pageNum =
|
|
575
|
+
const { current: z = 1, pageSize: ce = 10, total: _ } = S(g) || {};
|
|
576
|
+
ie.pageNum = Wt({ current: z, pageSize: ce, total: _ }, w.length), w.length && m(w), ie.pageSize = ce;
|
|
742
577
|
}
|
|
743
|
-
const Ie =
|
|
744
|
-
Ie.forEach((
|
|
745
|
-
const ce = (
|
|
746
|
-
|
|
578
|
+
const Ie = X(E) ? [E] : E;
|
|
579
|
+
Ie.forEach((z) => {
|
|
580
|
+
const ce = (z == null ? void 0 : z.columnKey) || (z == null ? void 0 : z.field);
|
|
581
|
+
z && (z != null && z.order) ? T(S(d).map((_) => (_.dataIndex === ce ? _.sortOrder = z == null ? void 0 : z.order : _.sortOrder = null, _))) : z && T(S(d).map((_) => (_.dataIndex === ce && (_.sortOrder = null), _)));
|
|
747
582
|
});
|
|
748
|
-
let
|
|
583
|
+
let xe = {
|
|
749
584
|
...ie || {},
|
|
750
585
|
...y.params,
|
|
751
|
-
...
|
|
586
|
+
...a
|
|
752
587
|
};
|
|
753
|
-
|
|
588
|
+
h && $e(h) && (xe = await h(xe, E, M));
|
|
754
589
|
let U = [];
|
|
755
|
-
const
|
|
756
|
-
if (
|
|
757
|
-
U =
|
|
758
|
-
const
|
|
759
|
-
return
|
|
760
|
-
total:
|
|
590
|
+
const te = await (n == null ? void 0 : n(xe, Ie, M));
|
|
591
|
+
if (Y.value = !1, te && (te != null && te.success)) {
|
|
592
|
+
U = te.data || [], l && $e(l) && (U = await (l == null ? void 0 : l(U))), s(U);
|
|
593
|
+
const z = te.total || (U == null ? void 0 : U.length) || 0;
|
|
594
|
+
return z !== ((Be = S(g)) == null ? void 0 : Be.total) && c({
|
|
595
|
+
total: z || 0
|
|
761
596
|
}), b(U), U;
|
|
762
597
|
} else
|
|
763
598
|
return [];
|
|
764
599
|
} catch (ie) {
|
|
765
|
-
N.value === void 0 && b([]),
|
|
600
|
+
N.value === void 0 && b([]), P("requestError", ie);
|
|
766
601
|
} finally {
|
|
767
602
|
O.value = !1, C(!1);
|
|
768
603
|
}
|
|
769
604
|
return [];
|
|
770
|
-
}, D =
|
|
605
|
+
}, D = El(async (y) => {
|
|
771
606
|
V.value && clearTimeout(V.value);
|
|
772
|
-
const
|
|
607
|
+
const $ = await ue(y), M = Vt(e.value, $);
|
|
773
608
|
return M && !R.value && (V.value = setTimeout(() => {
|
|
774
609
|
D.run({ ...y, isPolling: M });
|
|
775
|
-
}, Math.max(M, 2e3))),
|
|
776
|
-
},
|
|
777
|
-
|
|
610
|
+
}, Math.max(M, 2e3))), $;
|
|
611
|
+
}, i.value || 10);
|
|
612
|
+
Jt(() => {
|
|
778
613
|
R.value = !0, clearTimeout(V.value);
|
|
779
|
-
}),
|
|
614
|
+
}), Qt(() => {
|
|
780
615
|
R.value = !0, clearTimeout(V.value);
|
|
781
616
|
}), H(() => e.value, () => {
|
|
782
617
|
e.value ? D.run({ isPolling: !0 }) : clearTimeout(V.value);
|
|
783
|
-
}, { immediate: !0 }), H([() =>
|
|
784
|
-
|
|
618
|
+
}, { immediate: !0 }), H([() => o.value, () => u.value, () => a], () => {
|
|
619
|
+
ye(n) ? (!O.value || !e.value) && D.run({ isPolling: !1 }) : b(u.value || []);
|
|
785
620
|
}, {
|
|
786
621
|
deep: !0,
|
|
787
622
|
immediate: !0
|
|
788
623
|
});
|
|
789
|
-
const
|
|
624
|
+
const J = p(() => {
|
|
790
625
|
if (x.value)
|
|
791
626
|
return S(N);
|
|
792
|
-
const y = d.value.filter((
|
|
627
|
+
const y = d.value.filter(($) => $.show || $.show === void 0);
|
|
793
628
|
return !S(N) || !y || y.length === 0 ? [] : S(N);
|
|
794
|
-
}), W =
|
|
795
|
-
function
|
|
629
|
+
}), W = p(() => S(N).some((y) => be(y.children) && y.children.length > 0));
|
|
630
|
+
function Ce(y) {
|
|
796
631
|
L.value = y;
|
|
797
632
|
}
|
|
798
|
-
function t(y,
|
|
799
|
-
D.run({ pagination: y, filters:
|
|
633
|
+
function t(y, $, M, E) {
|
|
634
|
+
D.run({ pagination: y, filters: $, sorter: M, extra: E, isPolling: !1 }), P("change", y, $, M, E);
|
|
800
635
|
}
|
|
801
636
|
function b(y) {
|
|
802
637
|
var M;
|
|
803
|
-
const
|
|
804
|
-
if (!
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
total:
|
|
638
|
+
const $ = Ht(le(y), S(g.value));
|
|
639
|
+
if (!De($, N.value) && (N.value = $, !n || !$e(n))) {
|
|
640
|
+
const E = $.length || 0;
|
|
641
|
+
E !== ((M = S(g)) == null ? void 0 : M.total) && c({
|
|
642
|
+
total: E
|
|
808
643
|
});
|
|
809
644
|
}
|
|
810
645
|
}
|
|
811
|
-
function
|
|
646
|
+
function B({ key: y, record: $, type: M = "update" }) {
|
|
812
647
|
switch (M) {
|
|
813
648
|
case "update":
|
|
814
|
-
N.value = N.value.map((
|
|
649
|
+
N.value = N.value.map((E) => y && $[y] === E[y] ? { ...E, ...$ } : E);
|
|
815
650
|
break;
|
|
816
651
|
case "push":
|
|
817
|
-
N.value.push(
|
|
652
|
+
N.value.push($);
|
|
818
653
|
break;
|
|
819
654
|
case "unshift":
|
|
820
|
-
N.value.unshift(
|
|
655
|
+
N.value.unshift($);
|
|
821
656
|
break;
|
|
822
657
|
case "delete":
|
|
823
|
-
N.value = N.value.filter((
|
|
658
|
+
N.value = N.value.filter((E) => y ? y && $[y] !== E[y] : !0);
|
|
824
659
|
break;
|
|
825
660
|
}
|
|
826
661
|
}
|
|
827
662
|
return {
|
|
828
|
-
dataSource:
|
|
663
|
+
dataSource: J,
|
|
829
664
|
isTreeDataRef: W,
|
|
830
665
|
reSetDataList: b,
|
|
831
|
-
changeDataValue:
|
|
666
|
+
changeDataValue: B,
|
|
832
667
|
handleTableChange: t,
|
|
833
668
|
reload: async (y) => {
|
|
834
|
-
|
|
669
|
+
ye(n) ? await D.run({ ...y, isPolling: !1 }) : P("reload");
|
|
835
670
|
}
|
|
836
671
|
};
|
|
837
672
|
}
|
|
838
|
-
function
|
|
839
|
-
const
|
|
673
|
+
function Al(e) {
|
|
674
|
+
const n = {};
|
|
840
675
|
return e.forEach((l) => {
|
|
841
|
-
let
|
|
842
|
-
const
|
|
843
|
-
!
|
|
844
|
-
}),
|
|
676
|
+
let u = l.initialValue;
|
|
677
|
+
const o = ["select"], i = ["date", "time", "dateRange"];
|
|
678
|
+
!u && o.includes(l.valueType) ? u = void 0 : !u && i.includes(l.valueType) ? u = null : u || (u = ""), l.name === "dateRange" ? (n[l.rangeStartName || "start"] = u ? u[0] : null, n[l.rangeEndName || "end"] = u ? u[1] : null) : l.name && (n[l.name] = u);
|
|
679
|
+
}), n;
|
|
845
680
|
}
|
|
846
|
-
function
|
|
847
|
-
const
|
|
848
|
-
var
|
|
849
|
-
return
|
|
850
|
-
}),
|
|
851
|
-
var
|
|
852
|
-
const
|
|
853
|
-
if ((
|
|
854
|
-
f.value.some((x) => x.name ===
|
|
681
|
+
function Yl({ search: e, searchMap: n, params: l, columns: u, setPagination: o }) {
|
|
682
|
+
const i = oe({}), d = oe({}), f = k([]), C = p(() => {
|
|
683
|
+
var s;
|
|
684
|
+
return X(e.value) ? !!((s = e.value) != null && s.showSearch) : !!e.value;
|
|
685
|
+
}), T = (s) => {
|
|
686
|
+
var c, g;
|
|
687
|
+
const a = [];
|
|
688
|
+
if ((s === "all" || s === "searchMap") && ((c = n.value) == null || c.forEach((h) => a.push(h)), a.forEach((h) => {
|
|
689
|
+
f.value.some((x) => x.name === h.name) ? f.value = f.value.map((x) => x.name === h.name ? {
|
|
855
690
|
...x,
|
|
856
|
-
...
|
|
857
|
-
} : x) : f.value.push(
|
|
858
|
-
})), (
|
|
859
|
-
|
|
860
|
-
}),
|
|
861
|
-
f.value.some((x) => x.name ===
|
|
691
|
+
...h
|
|
692
|
+
} : x) : f.value.push(h);
|
|
693
|
+
})), (s === "all" || s === "columns") && ((g = u.value) != null && g.length) && (u.value && u.value.forEach((h) => {
|
|
694
|
+
h.searchConfig && a.push(h.searchConfig);
|
|
695
|
+
}), a.forEach((h) => {
|
|
696
|
+
f.value.some((x) => x.name === h.name) ? f.value = f.value.map((x) => x.name === h.name ? {
|
|
862
697
|
...x,
|
|
863
|
-
...
|
|
864
|
-
} : x) : f.value.push(
|
|
865
|
-
})),
|
|
866
|
-
|
|
867
|
-
const
|
|
868
|
-
Object.assign(d, { ...
|
|
869
|
-
for (const x in
|
|
870
|
-
|
|
698
|
+
...h
|
|
699
|
+
} : x) : f.value.push(h);
|
|
700
|
+
})), s === "all" || s === "searchMap" || s === "columns") {
|
|
701
|
+
o({ current: 1 });
|
|
702
|
+
const h = Al(a);
|
|
703
|
+
Object.assign(d, { ...h });
|
|
704
|
+
for (const x in h)
|
|
705
|
+
i[x] || (i[x] = h[x]);
|
|
871
706
|
}
|
|
872
|
-
(
|
|
707
|
+
(s === "all" || s === "params") && !C.value && (o({ current: 1 }), Object.assign(i, l.value));
|
|
873
708
|
};
|
|
874
|
-
|
|
875
|
-
|
|
709
|
+
Zt(() => {
|
|
710
|
+
T("all");
|
|
876
711
|
}), H(() => l.value, () => {
|
|
877
|
-
|
|
878
|
-
}, { deep: !0 }), H(() =>
|
|
879
|
-
|
|
880
|
-
}, { deep: !0 }), H(() =>
|
|
881
|
-
|
|
712
|
+
T("params");
|
|
713
|
+
}, { deep: !0 }), H(() => n.value, () => {
|
|
714
|
+
T("searchMap");
|
|
715
|
+
}, { deep: !0 }), H(() => u.value, () => {
|
|
716
|
+
T("columns");
|
|
882
717
|
}, { deep: !0 });
|
|
883
|
-
function
|
|
884
|
-
|
|
718
|
+
function m(s) {
|
|
719
|
+
o({ current: 1 }), Object.assign(i, s);
|
|
885
720
|
}
|
|
886
|
-
return { formDataRef: f, formParamsRef:
|
|
721
|
+
return { formDataRef: f, formParamsRef: i, defaultParamsRef: d, setFormParams: m };
|
|
887
722
|
}
|
|
888
|
-
function
|
|
889
|
-
const
|
|
723
|
+
function Ll({ columns: e, columnsState: n, changeColumns: l }) {
|
|
724
|
+
const u = k(void 0), o = oe({}), i = oe({}), d = oe({}), f = k([]);
|
|
890
725
|
H(() => e.value, () => {
|
|
891
|
-
var
|
|
892
|
-
(
|
|
893
|
-
const x =
|
|
894
|
-
x && (d[x] = { show:
|
|
726
|
+
var s;
|
|
727
|
+
(s = S(e)) == null || s.forEach(({ show: a, key: c, fixed: g }, h) => {
|
|
728
|
+
const x = mt(c, h);
|
|
729
|
+
x && (d[x] = { show: a === void 0 ? !0 : a, fixed: g });
|
|
895
730
|
});
|
|
896
|
-
const
|
|
897
|
-
|
|
898
|
-
}, { deep: !0, immediate: !0 }),
|
|
899
|
-
var
|
|
900
|
-
const
|
|
901
|
-
...(
|
|
731
|
+
const m = S(e).map((a) => a.key);
|
|
732
|
+
T(m);
|
|
733
|
+
}, { deep: !0, immediate: !0 }), Pe(() => {
|
|
734
|
+
var s;
|
|
735
|
+
const m = {
|
|
736
|
+
...(s = S(n)) == null ? void 0 : s.value,
|
|
902
737
|
...S(d)
|
|
903
738
|
};
|
|
904
|
-
Object.assign(
|
|
739
|
+
Object.assign(o, m), Object.assign(i, m);
|
|
905
740
|
});
|
|
906
|
-
function C(
|
|
907
|
-
|
|
741
|
+
function C(m, s) {
|
|
742
|
+
u.value = s, Object.assign(o, m), l == null || l(o, s === "fixed");
|
|
908
743
|
}
|
|
909
|
-
function
|
|
910
|
-
f.value =
|
|
744
|
+
function T(m) {
|
|
745
|
+
f.value = m;
|
|
911
746
|
}
|
|
912
747
|
return {
|
|
913
|
-
columnsMap:
|
|
914
|
-
operationType:
|
|
748
|
+
columnsMap: o,
|
|
749
|
+
operationType: u,
|
|
915
750
|
setColumnsMap: C,
|
|
916
751
|
sortKeyColumns: f,
|
|
917
|
-
cacheColumnsMap:
|
|
918
|
-
setSortKeyColumns:
|
|
752
|
+
cacheColumnsMap: i,
|
|
753
|
+
setSortKeyColumns: T
|
|
919
754
|
};
|
|
920
755
|
}
|
|
921
|
-
function
|
|
922
|
-
const
|
|
756
|
+
function Vl(e) {
|
|
757
|
+
const n = p(() => e.draggabled), l = p(() => e.neverScroll), u = p(() => e.autoScroll);
|
|
923
758
|
return {
|
|
924
|
-
draggabled:
|
|
759
|
+
draggabled: n,
|
|
925
760
|
neverScroll: l,
|
|
926
|
-
autoScroll:
|
|
761
|
+
autoScroll: u
|
|
927
762
|
};
|
|
928
763
|
}
|
|
929
|
-
function
|
|
764
|
+
function Hl({ scroll: e, columns: n, breakpoint: l, draggabled: u, autoScroll: o, neverScroll: i }) {
|
|
930
765
|
const d = k([]), f = k([]);
|
|
931
766
|
H([
|
|
932
|
-
() => a.value,
|
|
933
767
|
() => e.value,
|
|
768
|
+
() => n.value,
|
|
934
769
|
() => l.value,
|
|
935
|
-
() =>
|
|
936
|
-
() =>
|
|
937
|
-
() => o.value
|
|
770
|
+
() => u.value,
|
|
771
|
+
() => l.value,
|
|
772
|
+
() => o.value,
|
|
773
|
+
() => i.value
|
|
938
774
|
], () => {
|
|
939
|
-
|
|
775
|
+
const g = m(fe(n.value));
|
|
776
|
+
De(g, fe(d.value)) || (d.value = le(g)), De(g, fe(f.value)) || (f.value = le(g));
|
|
940
777
|
}, {
|
|
941
778
|
deep: !0,
|
|
942
779
|
immediate: !0
|
|
943
780
|
});
|
|
944
|
-
const C =
|
|
945
|
-
const g =
|
|
781
|
+
const C = p(() => {
|
|
782
|
+
const g = T(S(d).filter((P) => P.fixed === "left")), h = T(S(d).filter((P) => P.fixed !== "left" && P.fixed !== "right")), x = T(S(d).filter((P) => P.fixed === "right"));
|
|
946
783
|
return [
|
|
947
784
|
...g,
|
|
948
|
-
...
|
|
785
|
+
...h,
|
|
949
786
|
...x
|
|
950
787
|
];
|
|
951
788
|
});
|
|
952
|
-
function
|
|
953
|
-
return g.sort((
|
|
789
|
+
function T(g) {
|
|
790
|
+
return g.sort((h, x) => _t(h, x, "order", 0));
|
|
954
791
|
}
|
|
955
|
-
function
|
|
956
|
-
return
|
|
957
|
-
var
|
|
958
|
-
if (
|
|
959
|
-
return
|
|
960
|
-
if (
|
|
961
|
-
if ((
|
|
962
|
-
|
|
792
|
+
function m(g) {
|
|
793
|
+
return le(g).map((h, x) => {
|
|
794
|
+
var P;
|
|
795
|
+
if (h.dataIndex === "action" || x === g.length - 1 ? h.resizable = !1 : h.resizable = ae(h.resizable) ? h.resizable : !!(vt(h.width) && S(u)), !h.width || S(i))
|
|
796
|
+
return h;
|
|
797
|
+
if (h.dataIndex === "action" && S(o))
|
|
798
|
+
if ((P = S(e)) != null && P.x || !S(l))
|
|
799
|
+
h.width = h.width || 100, h.fixed = "right";
|
|
963
800
|
else {
|
|
964
|
-
const R = S(
|
|
965
|
-
|
|
801
|
+
const R = S(n).find((O) => O.dataIndex === h.dataIndex);
|
|
802
|
+
h.width = (R == null ? void 0 : R.width) || "", h.fixed = R == null ? void 0 : R.fixed;
|
|
966
803
|
}
|
|
967
|
-
return
|
|
804
|
+
return h;
|
|
968
805
|
});
|
|
969
806
|
}
|
|
970
|
-
function
|
|
971
|
-
d.value = d.value.map((x) => (x.uuid ===
|
|
807
|
+
function s(g, h) {
|
|
808
|
+
d.value = d.value.map((x) => (x.uuid === h.uuid && (x.width = g), x));
|
|
972
809
|
}
|
|
973
|
-
function
|
|
810
|
+
function a(g) {
|
|
974
811
|
if (g.length <= 0) {
|
|
975
812
|
d.value = [];
|
|
976
813
|
return;
|
|
977
814
|
}
|
|
978
|
-
|
|
815
|
+
De(m(g), fe(d.value)) || (d.value = m(g));
|
|
979
816
|
}
|
|
980
|
-
function
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
order: (E = g[x.key]) == null ? void 0 : E.order
|
|
817
|
+
function c(g) {
|
|
818
|
+
a(le(fe(n.value)).map((h) => {
|
|
819
|
+
var P, R, O;
|
|
820
|
+
const x = h.key ? {
|
|
821
|
+
show: (P = g[h.key]) == null ? void 0 : P.show,
|
|
822
|
+
fixed: (R = g[h.key]) == null ? void 0 : R.fixed,
|
|
823
|
+
order: (O = g[h.key]) == null ? void 0 : O.order
|
|
988
824
|
} : {};
|
|
989
|
-
return {
|
|
990
|
-
|
|
991
|
-
...F
|
|
992
|
-
};
|
|
993
|
-
}), s(v);
|
|
825
|
+
return { ...h, ...x };
|
|
826
|
+
}));
|
|
994
827
|
}
|
|
995
828
|
return {
|
|
996
829
|
breakpoint: l,
|
|
997
|
-
|
|
830
|
+
proColumns: C,
|
|
998
831
|
cacheProColumns: f,
|
|
999
|
-
setColumns:
|
|
1000
|
-
changeColumns:
|
|
1001
|
-
resizeColumnWidth:
|
|
832
|
+
setColumns: a,
|
|
833
|
+
changeColumns: c,
|
|
834
|
+
resizeColumnWidth: s
|
|
1002
835
|
};
|
|
1003
836
|
}
|
|
1004
|
-
function
|
|
1005
|
-
const
|
|
837
|
+
function Wl(e) {
|
|
838
|
+
const n = p(() => e.scroll), l = p(() => e.autoScroll), u = p(() => e.modalScroll), o = p(() => e.neverScroll), i = p(() => e.rowSelection), d = p(() => e.scrollBreakpoint);
|
|
1006
839
|
return {
|
|
1007
|
-
scroll:
|
|
1008
|
-
neverScroll:
|
|
1009
|
-
rowSelection:
|
|
840
|
+
scroll: n,
|
|
841
|
+
neverScroll: o,
|
|
842
|
+
rowSelection: i,
|
|
1010
843
|
autoScroll: l,
|
|
1011
|
-
modalScroll:
|
|
844
|
+
modalScroll: u,
|
|
1012
845
|
scrollBreakpoint: d
|
|
1013
846
|
};
|
|
1014
847
|
}
|
|
1015
|
-
function
|
|
1016
|
-
const
|
|
1017
|
-
var
|
|
1018
|
-
return S(C) ?
|
|
1019
|
-
}),
|
|
1020
|
-
let
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1023
|
-
|
|
848
|
+
function _l({ scroll: e, columns: n, autoScroll: l, modalScroll: u, neverScroll: o, rowSelection: i, screens: d, innerWidth: f, scrollBreakpoint: C }) {
|
|
849
|
+
const T = p(() => {
|
|
850
|
+
var a, c, g;
|
|
851
|
+
return S(C) ? vt(S(C)) ? f.value > S(C) : Gt(S(C)) ? (a = d.value) == null ? void 0 : a[S(C)] : (c = d.value) == null ? void 0 : c.xl : (g = d.value) == null ? void 0 : g.xl;
|
|
852
|
+
}), m = p(() => {
|
|
853
|
+
let a = 0;
|
|
854
|
+
const c = S(i) ? 60 : 0, g = 150, h = le(S(n));
|
|
855
|
+
h.forEach((R) => {
|
|
856
|
+
a += Number.parseInt(String(R.width)) || 0;
|
|
1024
857
|
});
|
|
1025
|
-
const
|
|
1026
|
-
return
|
|
858
|
+
const P = h.filter((R) => !Reflect.has(R, "width")).length;
|
|
859
|
+
return P !== 0 && (a += P * g), c && (a += c), a;
|
|
1027
860
|
});
|
|
1028
|
-
return {
|
|
1029
|
-
var
|
|
1030
|
-
return S(
|
|
1031
|
-
y: ((
|
|
1032
|
-
} : S(l) ?
|
|
1033
|
-
}), breakpoint:
|
|
861
|
+
return { proScroll: p(() => {
|
|
862
|
+
var a, c;
|
|
863
|
+
return S(o) ? {} : S(e) && Object.keys(S(e)).length ? S(e) : S(u) ? {
|
|
864
|
+
y: ((a = S(e)) == null ? void 0 : a.y) || ((c = d.value) != null && c.xl ? 400 : 235)
|
|
865
|
+
} : S(l) ? T.value ? {} : ae(T.value) ? { x: S(m) } : {} : {};
|
|
866
|
+
}), breakpoint: T };
|
|
1034
867
|
}
|
|
1035
|
-
const { provideContext:
|
|
1036
|
-
function
|
|
1037
|
-
const l =
|
|
1038
|
-
function
|
|
868
|
+
const { provideContext: Gl, useInjectContext: re } = gl("pro-table");
|
|
869
|
+
function ql(e, n) {
|
|
870
|
+
const l = oe({});
|
|
871
|
+
function u() {
|
|
1039
872
|
Object.keys(e).forEach((d) => {
|
|
1040
|
-
|
|
873
|
+
o(d, e[d]);
|
|
1041
874
|
});
|
|
1042
|
-
const
|
|
1043
|
-
|
|
1044
|
-
e[
|
|
1045
|
-
e[
|
|
875
|
+
const i = n.find((d) => d.valueType === "dateRange");
|
|
876
|
+
i && o(i.name || "", e[i.rangeStartName || "start"] ? [
|
|
877
|
+
e[i.rangeStartName || "start"],
|
|
878
|
+
e[i.rangeEndName || "end"]
|
|
1046
879
|
] : []);
|
|
1047
880
|
}
|
|
1048
|
-
|
|
1049
|
-
|
|
881
|
+
Pe(() => {
|
|
882
|
+
u();
|
|
1050
883
|
});
|
|
1051
|
-
function
|
|
1052
|
-
l[
|
|
884
|
+
function o(i, d) {
|
|
885
|
+
l[i] = d;
|
|
1053
886
|
}
|
|
1054
887
|
return {
|
|
1055
888
|
formState: l,
|
|
1056
|
-
resetFormState:
|
|
1057
|
-
changeFormState:
|
|
889
|
+
resetFormState: u,
|
|
890
|
+
changeFormState: o
|
|
1058
891
|
};
|
|
1059
892
|
}
|
|
1060
|
-
const
|
|
893
|
+
const Ul = (e) => ({
|
|
1061
894
|
[`${e.componentCls}-form`]: {
|
|
1062
895
|
"&-collapse-button": {
|
|
1063
896
|
display: "flex",
|
|
@@ -1091,11 +924,11 @@ const _l = (e) => ({
|
|
|
1091
924
|
alignItems: "center"
|
|
1092
925
|
}
|
|
1093
926
|
}), {
|
|
1094
|
-
useBreakpoint:
|
|
1095
|
-
} =
|
|
1096
|
-
MonthPicker:
|
|
1097
|
-
RangePicker:
|
|
1098
|
-
} =
|
|
927
|
+
useBreakpoint: Xl
|
|
928
|
+
} = Ue, {
|
|
929
|
+
MonthPicker: Jl,
|
|
930
|
+
RangePicker: Ql
|
|
931
|
+
} = Ct, pt = /* @__PURE__ */ ne({
|
|
1099
932
|
name: "ProTableForm",
|
|
1100
933
|
props: {
|
|
1101
934
|
search: {
|
|
@@ -1105,7 +938,7 @@ const _l = (e) => ({
|
|
|
1105
938
|
searchText: "查询"
|
|
1106
939
|
})
|
|
1107
940
|
},
|
|
1108
|
-
modal:
|
|
941
|
+
modal: he.modalScroll,
|
|
1109
942
|
searchMap: {
|
|
1110
943
|
type: Array,
|
|
1111
944
|
default: () => []
|
|
@@ -1116,23 +949,23 @@ const _l = (e) => ({
|
|
|
1116
949
|
},
|
|
1117
950
|
emits: ["search"],
|
|
1118
951
|
setup(e, {
|
|
1119
|
-
emit:
|
|
952
|
+
emit: n,
|
|
1120
953
|
slots: l,
|
|
1121
|
-
expose:
|
|
954
|
+
expose: u
|
|
1122
955
|
}) {
|
|
1123
956
|
const {
|
|
1124
|
-
wrapSSR:
|
|
1125
|
-
hashId:
|
|
1126
|
-
} =
|
|
957
|
+
wrapSSR: o,
|
|
958
|
+
hashId: i
|
|
959
|
+
} = ze("ProTableForm", [Ul], e.prefixCls), d = xt(), f = Xl(), {
|
|
1127
960
|
formState: C,
|
|
1128
|
-
resetFormState:
|
|
1129
|
-
changeFormState:
|
|
1130
|
-
} =
|
|
961
|
+
resetFormState: T,
|
|
962
|
+
changeFormState: m
|
|
963
|
+
} = ql(e.defaultParams || {}, e.searchMap || []), s = k(!1), a = p(() => {
|
|
1131
964
|
var t;
|
|
1132
965
|
return !!((t = e.search) != null && t.showSearch);
|
|
1133
|
-
}),
|
|
966
|
+
}), c = p(() => {
|
|
1134
967
|
var t, b;
|
|
1135
|
-
return ((t = e.search) == null ? void 0 : t.showReset) === void 0 ?
|
|
968
|
+
return ((t = e.search) == null ? void 0 : t.showReset) === void 0 ? a.value : (b = e.search) == null ? void 0 : b.showReset;
|
|
1136
969
|
}), g = [{
|
|
1137
970
|
value: "xxl",
|
|
1138
971
|
span: 4
|
|
@@ -1151,71 +984,71 @@ const _l = (e) => ({
|
|
|
1151
984
|
}, {
|
|
1152
985
|
value: "xs",
|
|
1153
986
|
span: 1
|
|
1154
|
-
}],
|
|
987
|
+
}], h = (t) => {
|
|
1155
988
|
let b = 4;
|
|
1156
|
-
for (let
|
|
1157
|
-
const y = g[
|
|
989
|
+
for (let B = 0; B < g.length; B += 1) {
|
|
990
|
+
const y = g[B].value;
|
|
1158
991
|
if (f.value[y]) {
|
|
1159
|
-
b = (t == null ? void 0 : t[y]) || (e.modal ? 3 : g[
|
|
992
|
+
b = (t == null ? void 0 : t[y]) || (e.modal ? 3 : g[B].span);
|
|
1160
993
|
break;
|
|
1161
994
|
}
|
|
1162
995
|
}
|
|
1163
996
|
return b;
|
|
1164
|
-
}, x =
|
|
997
|
+
}, x = p(() => {
|
|
1165
998
|
var t;
|
|
1166
|
-
return
|
|
999
|
+
return h((t = e.search) == null ? void 0 : t.span);
|
|
1167
1000
|
});
|
|
1168
1001
|
H(() => {
|
|
1169
1002
|
var t;
|
|
1170
1003
|
return (t = e.search) == null ? void 0 : t.defaultCollapsed;
|
|
1171
1004
|
}, (t) => {
|
|
1172
|
-
|
|
1005
|
+
s.value = s.value || !!t;
|
|
1173
1006
|
});
|
|
1174
|
-
const
|
|
1175
|
-
|
|
1176
|
-
}, R = (t, b,
|
|
1177
|
-
...
|
|
1007
|
+
const P = (t) => {
|
|
1008
|
+
s.value = t;
|
|
1009
|
+
}, R = (t, b, B) => (t + 1) % b === 0 ? {
|
|
1010
|
+
...B,
|
|
1178
1011
|
marginRight: 0
|
|
1179
1012
|
} : {
|
|
1180
|
-
...
|
|
1013
|
+
...B,
|
|
1181
1014
|
marginRight: "2%"
|
|
1182
1015
|
}, O = () => {
|
|
1183
|
-
const t =
|
|
1184
|
-
return b && (t[b.name] = C[b.name] || b.initialValue || ""),
|
|
1185
|
-
},
|
|
1186
|
-
|
|
1187
|
-
(!
|
|
1016
|
+
const t = le(C), b = e.searchMap.find(($) => $.valueType === "text") || "", B = e.searchMap.find(($) => $.valueType === "dateRange") || "", y = e.searchMap.find(($) => $.valueType === "treeSelect");
|
|
1017
|
+
return b && (t[b.name] = C[b.name] || b.initialValue || ""), B && (t[B.rangeStartName || "start"] = t[B.name] ? t[B.name][0] : "", t[B.rangeEndName || "end"] = t[B.name] ? t[B.name][1] : "", delete t[B.name]), y && (y != null && y.name && be(C[y == null ? void 0 : y.name]) && (t[y.name] = C[y.name].length ? C[y.name].map(($) => $[y.valueKey === "text" ? "label" : "value"]).join() : ""), y != null && y.name && be(t[y == null ? void 0 : y.name]) && (t[y.name] = t[y.name].length ? t[y.name].map(($) => $[y.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
1018
|
+
}, Y = (t = !1, b) => {
|
|
1019
|
+
el(() => {
|
|
1020
|
+
(!a.value || t) && n("search", O(), !!b);
|
|
1188
1021
|
});
|
|
1189
1022
|
}, L = (t, b) => {
|
|
1190
|
-
var
|
|
1023
|
+
var B, y, $;
|
|
1191
1024
|
switch (b.valueType) {
|
|
1192
1025
|
case "text":
|
|
1193
|
-
|
|
1026
|
+
m(b.name || "", t || b.initialValue || "");
|
|
1194
1027
|
break;
|
|
1195
1028
|
case "select":
|
|
1196
|
-
|
|
1029
|
+
m(b.name || "", t || t === 0 ? t : b.initialValue || void 0);
|
|
1197
1030
|
break;
|
|
1198
1031
|
case "treeSelect":
|
|
1199
|
-
|
|
1032
|
+
m(b.name || "", t || t === 0 ? t : b.initialValue || ((B = b.field) != null && B.treeCheckable || (y = b.field) != null && y.multiple ? [] : null));
|
|
1200
1033
|
break;
|
|
1201
1034
|
case "date":
|
|
1202
|
-
|
|
1035
|
+
m(b.name || "", t ? G(t).format(b.valueFormat || "YYYY-MM-DD") : b.initialValue || null);
|
|
1203
1036
|
break;
|
|
1204
1037
|
case "dateMonth":
|
|
1205
|
-
|
|
1038
|
+
m(b.name || "", t ? G(t).format("YYYY-MM") : b.initialValue || null);
|
|
1206
1039
|
break;
|
|
1207
1040
|
case "dateRange":
|
|
1208
|
-
|
|
1041
|
+
m(b.name || "", t && t.length > 0 ? [G(t[0]).format(b.valueFormat || "YYYY-MM-DD"), G(t[1]).format(b.valueFormat || "YYYY-MM-DD")] : b.initialValue || null);
|
|
1209
1042
|
break;
|
|
1210
1043
|
case "time":
|
|
1211
|
-
|
|
1044
|
+
m(b.name || "", t ? G(t).format(b.valueFormat || "HH:mm:ss") : b.initialValue || null);
|
|
1212
1045
|
break;
|
|
1213
1046
|
}
|
|
1214
|
-
(
|
|
1047
|
+
($ = e.search) != null && $.showSearch || b.valueType === "text" || (b.valueType === "treeSelect" || b.valueType, Y());
|
|
1215
1048
|
}, N = (t = !0) => {
|
|
1216
|
-
|
|
1049
|
+
T(), Y(!0, t);
|
|
1217
1050
|
};
|
|
1218
|
-
|
|
1051
|
+
u({
|
|
1219
1052
|
getFormState: () => O(),
|
|
1220
1053
|
resetForm: N
|
|
1221
1054
|
});
|
|
@@ -1223,23 +1056,23 @@ const _l = (e) => ({
|
|
|
1223
1056
|
var b;
|
|
1224
1057
|
const t = (b = d == null ? void 0 : d.emptyText) == null ? void 0 : b.value;
|
|
1225
1058
|
if (t) {
|
|
1226
|
-
const
|
|
1227
|
-
return
|
|
1228
|
-
class: je(`${e.prefixCls}-search-empty-text`,
|
|
1229
|
-
}, [
|
|
1059
|
+
const B = me(t), y = B ? yt(t) : gt(t || []);
|
|
1060
|
+
return r("div", {
|
|
1061
|
+
class: je(`${e.prefixCls}-search-empty-text`, i.value)
|
|
1062
|
+
}, [B ? y : be(y) ? y.map(($) => qe($)) : void 0]);
|
|
1230
1063
|
}
|
|
1231
|
-
}, ue = () => (
|
|
1232
|
-
default: () => [
|
|
1064
|
+
}, ue = () => (a.value || c.value) && r(se, null, {
|
|
1065
|
+
default: () => [c.value && r(ct, {
|
|
1233
1066
|
onClick: () => N()
|
|
1234
1067
|
}, {
|
|
1235
1068
|
default: () => {
|
|
1236
1069
|
var t;
|
|
1237
1070
|
return [((t = e.search) == null ? void 0 : t.resetText) || "重置"];
|
|
1238
1071
|
}
|
|
1239
|
-
}),
|
|
1072
|
+
}), a.value && r(ct, {
|
|
1240
1073
|
loading: e.loading,
|
|
1241
1074
|
type: "primary",
|
|
1242
|
-
onClick: () =>
|
|
1075
|
+
onClick: () => Y(!0)
|
|
1243
1076
|
}, {
|
|
1244
1077
|
default: () => {
|
|
1245
1078
|
var t;
|
|
@@ -1249,39 +1082,39 @@ const _l = (e) => ({
|
|
|
1249
1082
|
}), D = ({
|
|
1250
1083
|
formItemStyle: t,
|
|
1251
1084
|
advanced: b,
|
|
1252
|
-
showAdvanced:
|
|
1253
|
-
}) =>
|
|
1085
|
+
showAdvanced: B = !0
|
|
1086
|
+
}) => r("div", {
|
|
1254
1087
|
style: t,
|
|
1255
|
-
class: `${e.prefixCls}-form-collapse-button ${
|
|
1256
|
-
}, [
|
|
1088
|
+
class: `${e.prefixCls}-form-collapse-button ${i.value}`
|
|
1089
|
+
}, [r(se, {
|
|
1257
1090
|
size: 16
|
|
1258
1091
|
}, {
|
|
1259
1092
|
default: () => {
|
|
1260
|
-
var y,
|
|
1261
|
-
return [ue(),
|
|
1262
|
-
class: `${e.prefixCls}-a ${
|
|
1263
|
-
onClick: () =>
|
|
1264
|
-
}, [b ? "收起" : "展开", (y = e.search) != null && y.collapseRender ? (
|
|
1093
|
+
var y, $;
|
|
1094
|
+
return [ue(), B && r("span", {
|
|
1095
|
+
class: `${e.prefixCls}-a ${i.value}`,
|
|
1096
|
+
onClick: () => P(!b)
|
|
1097
|
+
}, [b ? "收起" : "展开", (y = e.search) != null && y.collapseRender ? ($ = e.search) == null ? void 0 : $.collapseRender() : b ? r(bl, null, null) : r(Cl, null, null)])];
|
|
1265
1098
|
}
|
|
1266
|
-
})]),
|
|
1267
|
-
var y,
|
|
1099
|
+
})]), J = (t) => {
|
|
1100
|
+
var y, $, M, E;
|
|
1268
1101
|
let b;
|
|
1269
|
-
const
|
|
1102
|
+
const B = a.value ? dt : dt.Search;
|
|
1270
1103
|
switch (t.valueType) {
|
|
1271
1104
|
case "text":
|
|
1272
|
-
b =
|
|
1105
|
+
b = r(B, q({
|
|
1273
1106
|
style: {
|
|
1274
1107
|
width: "100%"
|
|
1275
1108
|
},
|
|
1276
1109
|
value: C[t.name],
|
|
1277
1110
|
placeholder: t.placeholder || "请输入",
|
|
1278
1111
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1279
|
-
onChange: (
|
|
1280
|
-
onSearch: (
|
|
1112
|
+
onChange: (w) => L(w.target.value, t),
|
|
1113
|
+
onSearch: (w) => Y()
|
|
1281
1114
|
}, t.field || {}), null);
|
|
1282
1115
|
break;
|
|
1283
1116
|
case "select":
|
|
1284
|
-
b =
|
|
1117
|
+
b = r(sl, q({
|
|
1285
1118
|
style: {
|
|
1286
1119
|
width: "100%"
|
|
1287
1120
|
},
|
|
@@ -1290,20 +1123,20 @@ const _l = (e) => ({
|
|
|
1290
1123
|
placeholder: t.placeholder || "请选择",
|
|
1291
1124
|
showSearch: t.showSearch,
|
|
1292
1125
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1293
|
-
getPopupContainer: (
|
|
1294
|
-
notFoundContent: t.loading === void 0 ? void 0 : t.loading ?
|
|
1126
|
+
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1127
|
+
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? r(_e, {
|
|
1295
1128
|
size: "small",
|
|
1296
1129
|
indicator: (y = d == null ? void 0 : d.indicator) == null ? void 0 : y.value
|
|
1297
1130
|
}, null) : V(),
|
|
1298
|
-
onChange: (
|
|
1299
|
-
options: (
|
|
1300
|
-
label:
|
|
1301
|
-
value:
|
|
1131
|
+
onChange: (w) => L(w, t),
|
|
1132
|
+
options: ($ = t == null ? void 0 : t.valueEnum) == null ? void 0 : $.map((w) => ({
|
|
1133
|
+
label: w.text,
|
|
1134
|
+
value: w.value
|
|
1302
1135
|
}))
|
|
1303
1136
|
}, t.field || {}), null);
|
|
1304
1137
|
break;
|
|
1305
1138
|
case "treeSelect":
|
|
1306
|
-
b =
|
|
1139
|
+
b = r(il, q({
|
|
1307
1140
|
style: {
|
|
1308
1141
|
width: "100%"
|
|
1309
1142
|
},
|
|
@@ -1311,65 +1144,65 @@ const _l = (e) => ({
|
|
|
1311
1144
|
placeholder: t.placeholder || "请选择",
|
|
1312
1145
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1313
1146
|
treeData: t.valueEnum,
|
|
1314
|
-
getPopupContainer: (
|
|
1315
|
-
notFoundContent: t.loading === void 0 ? void 0 : t.loading ?
|
|
1147
|
+
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1148
|
+
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? r(_e, {
|
|
1316
1149
|
size: "small",
|
|
1317
1150
|
indicator: (M = d == null ? void 0 : d.indicator) == null ? void 0 : M.value
|
|
1318
1151
|
}, null) : V(),
|
|
1319
|
-
onChange: (
|
|
1152
|
+
onChange: (w) => L(w, t)
|
|
1320
1153
|
}, t.field || {}), null);
|
|
1321
1154
|
break;
|
|
1322
1155
|
case "date":
|
|
1323
|
-
b =
|
|
1156
|
+
b = r(Ct, q({
|
|
1324
1157
|
style: {
|
|
1325
1158
|
width: "100%"
|
|
1326
1159
|
},
|
|
1327
1160
|
value: C[t.name] ? G(C[t.name], t.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1328
|
-
getPopupContainer: (
|
|
1161
|
+
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1329
1162
|
placeholder: t.placeholder || "请选择",
|
|
1330
1163
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1331
1164
|
format: t.valueFormat || "YYYY-MM-DD",
|
|
1332
1165
|
showTime: t.showTime,
|
|
1333
1166
|
showToday: t.showToday || !0,
|
|
1334
|
-
onChange: (
|
|
1167
|
+
onChange: (w) => L(w, t)
|
|
1335
1168
|
}, t.field || {}), null);
|
|
1336
1169
|
break;
|
|
1337
1170
|
case "dateMonth":
|
|
1338
|
-
b =
|
|
1171
|
+
b = r(Jl, q({
|
|
1339
1172
|
style: {
|
|
1340
1173
|
width: "100%"
|
|
1341
1174
|
},
|
|
1342
1175
|
value: C[t.name] ? G(C[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
1343
|
-
getPopupContainer: (
|
|
1176
|
+
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1344
1177
|
placeholder: t.placeholder || "请选择",
|
|
1345
|
-
onChange: (
|
|
1178
|
+
onChange: (w) => L(w, t)
|
|
1346
1179
|
}, t.field || {}), null);
|
|
1347
1180
|
break;
|
|
1348
1181
|
case "dateRange":
|
|
1349
|
-
b =
|
|
1182
|
+
b = r(Ql, q({
|
|
1350
1183
|
style: {
|
|
1351
1184
|
width: "100%"
|
|
1352
1185
|
},
|
|
1353
|
-
value: (
|
|
1354
|
-
getPopupContainer: (
|
|
1186
|
+
value: (E = C[t.name]) != null && E.length ? [G(C[t.name][0], t.valueFormat || "YYYY-MM-DD HH:mm:ss"), G(C[t.name][1], t.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1187
|
+
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1355
1188
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
1356
1189
|
format: t.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
1357
1190
|
showTime: t.showTime,
|
|
1358
|
-
onChange: (
|
|
1191
|
+
onChange: (w) => L(w, t)
|
|
1359
1192
|
}, t.field || {}), null);
|
|
1360
1193
|
break;
|
|
1361
1194
|
case "time":
|
|
1362
|
-
b =
|
|
1195
|
+
b = r(ul, q({
|
|
1363
1196
|
style: {
|
|
1364
1197
|
width: "100%"
|
|
1365
1198
|
},
|
|
1366
1199
|
value: C[t.name] ? G(C[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
1367
|
-
getPopupContainer: (
|
|
1200
|
+
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1368
1201
|
placeholder: t.placeholder || "请选择",
|
|
1369
1202
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1370
1203
|
use12Hours: t.use12Hours,
|
|
1371
1204
|
format: t.valueFormat || "HH:mm:ss",
|
|
1372
|
-
onChange: (
|
|
1205
|
+
onChange: (w) => L(w, t)
|
|
1373
1206
|
}, t.field || {}), null);
|
|
1374
1207
|
break;
|
|
1375
1208
|
}
|
|
@@ -1377,34 +1210,34 @@ const _l = (e) => ({
|
|
|
1377
1210
|
}, W = ({
|
|
1378
1211
|
formItemStyle: t,
|
|
1379
1212
|
item: b
|
|
1380
|
-
}) =>
|
|
1213
|
+
}) => r("div", {
|
|
1381
1214
|
class: `${e.prefixCls}-form-item`,
|
|
1382
1215
|
style: t
|
|
1383
|
-
}, [
|
|
1384
|
-
default: () => [b.__v_isVNode ? b :
|
|
1385
|
-
})]),
|
|
1216
|
+
}, [r(rt.Item, null, {
|
|
1217
|
+
default: () => [b.__v_isVNode ? b : J(b)]
|
|
1218
|
+
})]), Ce = () => {
|
|
1386
1219
|
var b;
|
|
1387
1220
|
const t = [...e.searchMap, ...((b = l.default) == null ? void 0 : b.call(l)) || []];
|
|
1388
|
-
return t.map((
|
|
1389
|
-
const
|
|
1221
|
+
return t.map((B, y) => {
|
|
1222
|
+
const $ = {
|
|
1390
1223
|
width: `${(100 - (x.value - 1) * 2) / x.value}%`
|
|
1391
|
-
}, M = R(y, x.value,
|
|
1392
|
-
return t.length < x.value ||
|
|
1224
|
+
}, M = R(y, x.value, $);
|
|
1225
|
+
return t.length < x.value || s.value ? r(Ne, null, [W({
|
|
1393
1226
|
formItemStyle: M,
|
|
1394
|
-
item:
|
|
1227
|
+
item: B
|
|
1395
1228
|
}), y === t.length - 1 && D({
|
|
1396
1229
|
formItemStyle: {
|
|
1397
1230
|
flex: 1,
|
|
1398
1231
|
justifyContent: "flex-end"
|
|
1399
1232
|
},
|
|
1400
|
-
advanced:
|
|
1401
|
-
showAdvanced:
|
|
1402
|
-
})]) :
|
|
1233
|
+
advanced: s.value,
|
|
1234
|
+
showAdvanced: s.value
|
|
1235
|
+
})]) : r(Ne, null, [y < x.value - 1 && W({
|
|
1403
1236
|
formItemStyle: M,
|
|
1404
|
-
item:
|
|
1237
|
+
item: B
|
|
1405
1238
|
}), y === x.value - 1 && (x.value - 1 === 0 || t.length === x.value) && W({
|
|
1406
1239
|
formItemStyle: M,
|
|
1407
|
-
item:
|
|
1240
|
+
item: B
|
|
1408
1241
|
}), y === x.value - 1 && t.length !== x.value && D({
|
|
1409
1242
|
formItemStyle: {
|
|
1410
1243
|
flex: 1,
|
|
@@ -1417,31 +1250,31 @@ const _l = (e) => ({
|
|
|
1417
1250
|
};
|
|
1418
1251
|
return () => {
|
|
1419
1252
|
var t, b;
|
|
1420
|
-
return r(
|
|
1253
|
+
return o(r("div", {
|
|
1421
1254
|
class: {
|
|
1422
|
-
[`${
|
|
1255
|
+
[`${i.value}`]: !0,
|
|
1423
1256
|
[`${S(e.prefixCls)}-search`]: !0,
|
|
1424
1257
|
[`${(t = e.search) == null ? void 0 : t.className}`]: (b = e.search) == null ? void 0 : b.className
|
|
1425
1258
|
}
|
|
1426
|
-
}, [
|
|
1427
|
-
class: `${S(e.prefixCls)}-form ${
|
|
1259
|
+
}, [r(rt, {
|
|
1260
|
+
class: `${S(e.prefixCls)}-form ${i.value}`,
|
|
1428
1261
|
layout: "horizontal"
|
|
1429
1262
|
}, {
|
|
1430
|
-
default: () => [
|
|
1431
|
-
class: `${S(e.prefixCls)}-form-container ${
|
|
1432
|
-
}, [
|
|
1263
|
+
default: () => [r("div", {
|
|
1264
|
+
class: `${S(e.prefixCls)}-form-container ${i.value}`
|
|
1265
|
+
}, [Ce()])]
|
|
1433
1266
|
})]));
|
|
1434
1267
|
};
|
|
1435
1268
|
}
|
|
1436
1269
|
});
|
|
1437
|
-
|
|
1438
|
-
const
|
|
1439
|
-
const
|
|
1440
|
-
return
|
|
1441
|
-
var
|
|
1442
|
-
return (
|
|
1270
|
+
pt.inheritAttrs = !1;
|
|
1271
|
+
const Re = (e) => {
|
|
1272
|
+
const n = k(null);
|
|
1273
|
+
return n.value = e, (...l) => {
|
|
1274
|
+
var u;
|
|
1275
|
+
return (u = n.value) == null ? void 0 : u.call(n, ...l);
|
|
1443
1276
|
};
|
|
1444
|
-
},
|
|
1277
|
+
}, Zl = (e) => ({
|
|
1445
1278
|
[`${e.componentCls}`]: {
|
|
1446
1279
|
width: "auto",
|
|
1447
1280
|
"&-title": {
|
|
@@ -1523,42 +1356,42 @@ const Fe = (e) => {
|
|
|
1523
1356
|
}
|
|
1524
1357
|
}
|
|
1525
1358
|
}
|
|
1526
|
-
}),
|
|
1359
|
+
}), Ye = ({
|
|
1527
1360
|
title: e,
|
|
1528
|
-
show:
|
|
1361
|
+
show: n,
|
|
1529
1362
|
treeKey: l,
|
|
1530
|
-
fixed:
|
|
1363
|
+
fixed: u
|
|
1531
1364
|
}, {
|
|
1532
|
-
slots:
|
|
1365
|
+
slots: o
|
|
1533
1366
|
}) => {
|
|
1534
1367
|
const {
|
|
1535
|
-
cacheColumns:
|
|
1368
|
+
cacheColumns: i,
|
|
1536
1369
|
settingsAction: d
|
|
1537
1370
|
} = re();
|
|
1538
|
-
return
|
|
1371
|
+
return n ? r(ee, {
|
|
1539
1372
|
title: e
|
|
1540
1373
|
}, {
|
|
1541
1374
|
default: () => {
|
|
1542
1375
|
var f;
|
|
1543
|
-
return [
|
|
1376
|
+
return [r("span", {
|
|
1544
1377
|
onClick: (C) => {
|
|
1545
|
-
var
|
|
1378
|
+
var c, g, h;
|
|
1546
1379
|
C.stopPropagation(), C.preventDefault();
|
|
1547
|
-
const
|
|
1548
|
-
if (typeof
|
|
1549
|
-
const
|
|
1380
|
+
const T = ((g = (c = S(i)) == null ? void 0 : c.find((x) => x.uuid === l)) == null ? void 0 : g.key) || "", m = (d == null ? void 0 : d.columnsMap[T]) || {};
|
|
1381
|
+
if (typeof m.disable == "boolean" ? m.disable : (h = m.disable) == null ? void 0 : h.icon) return;
|
|
1382
|
+
const a = {
|
|
1550
1383
|
...d == null ? void 0 : d.columnsMap,
|
|
1551
|
-
[
|
|
1552
|
-
...
|
|
1553
|
-
fixed:
|
|
1384
|
+
[T]: {
|
|
1385
|
+
...m,
|
|
1386
|
+
fixed: u
|
|
1554
1387
|
}
|
|
1555
1388
|
};
|
|
1556
|
-
d == null || d.setColumnsMap(
|
|
1389
|
+
d == null || d.setColumnsMap(a, "fixed");
|
|
1557
1390
|
}
|
|
1558
|
-
}, [(f =
|
|
1391
|
+
}, [(f = o.default) == null ? void 0 : f.call(o)])];
|
|
1559
1392
|
}
|
|
1560
1393
|
}) : null;
|
|
1561
|
-
},
|
|
1394
|
+
}, ea = /* @__PURE__ */ ne({
|
|
1562
1395
|
props: {
|
|
1563
1396
|
treeKey: String,
|
|
1564
1397
|
hashId: String,
|
|
@@ -1569,45 +1402,45 @@ const Fe = (e) => {
|
|
|
1569
1402
|
},
|
|
1570
1403
|
setup(e) {
|
|
1571
1404
|
const {
|
|
1572
|
-
cacheColumns:
|
|
1573
|
-
} = re(), l =
|
|
1574
|
-
var
|
|
1575
|
-
return ((
|
|
1576
|
-
}),
|
|
1405
|
+
cacheColumns: n
|
|
1406
|
+
} = re(), l = p(() => {
|
|
1407
|
+
var o, i;
|
|
1408
|
+
return ((i = (o = S(n)) == null ? void 0 : o.find((d) => d.uuid === e.treeKey)) == null ? void 0 : i.key) || "";
|
|
1409
|
+
}), u = p(() => l.value === "action" && e.autoScroll);
|
|
1577
1410
|
return () => {
|
|
1578
|
-
const
|
|
1411
|
+
const o = r("span", {
|
|
1579
1412
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
1580
|
-
}, [
|
|
1413
|
+
}, [r(Ye, {
|
|
1581
1414
|
treeKey: e.treeKey || "",
|
|
1582
1415
|
fixed: "left",
|
|
1583
1416
|
title: "固定在列首",
|
|
1584
|
-
show: e.fixed !== "left" && !
|
|
1417
|
+
show: e.fixed !== "left" && !u.value
|
|
1585
1418
|
}, {
|
|
1586
|
-
default: () => [
|
|
1587
|
-
}),
|
|
1419
|
+
default: () => [r(xl, null, null)]
|
|
1420
|
+
}), r(Ye, {
|
|
1588
1421
|
treeKey: e.treeKey || "",
|
|
1589
1422
|
fixed: void 0,
|
|
1590
1423
|
title: "不固定",
|
|
1591
|
-
show: !!e.fixed && !
|
|
1424
|
+
show: !!e.fixed && !u.value
|
|
1592
1425
|
}, {
|
|
1593
|
-
default: () => [
|
|
1594
|
-
}),
|
|
1426
|
+
default: () => [r(Sl, null, null)]
|
|
1427
|
+
}), r(Ye, {
|
|
1595
1428
|
treeKey: e.treeKey || "",
|
|
1596
1429
|
fixed: "right",
|
|
1597
1430
|
title: "固定在列尾",
|
|
1598
1431
|
show: e.fixed !== "right"
|
|
1599
1432
|
}, {
|
|
1600
|
-
default: () => [
|
|
1433
|
+
default: () => [r(wl, null, null)]
|
|
1601
1434
|
})]);
|
|
1602
|
-
return
|
|
1435
|
+
return r("span", {
|
|
1603
1436
|
class: [`${e.className}-list-item`, e.hashId],
|
|
1604
1437
|
key: e.treeKey
|
|
1605
|
-
}, [
|
|
1438
|
+
}, [r("div", {
|
|
1606
1439
|
class: [`${e.className}-list-item-title`, e.hashId]
|
|
1607
|
-
}, [e.title]),
|
|
1440
|
+
}, [e.title]), o]);
|
|
1608
1441
|
};
|
|
1609
1442
|
}
|
|
1610
|
-
}),
|
|
1443
|
+
}), Le = /* @__PURE__ */ ne({
|
|
1611
1444
|
props: {
|
|
1612
1445
|
list: Array,
|
|
1613
1446
|
keys: Array,
|
|
@@ -1622,110 +1455,110 @@ const Fe = (e) => {
|
|
|
1622
1455
|
}
|
|
1623
1456
|
},
|
|
1624
1457
|
setup(e) {
|
|
1625
|
-
const
|
|
1626
|
-
cacheColumns:
|
|
1458
|
+
const n = k(We().uuid(15)), l = p(() => e.list && e.list.length > 0), u = k([]), o = k([]), {
|
|
1459
|
+
cacheColumns: i,
|
|
1627
1460
|
slots: d,
|
|
1628
1461
|
settingsAction: f
|
|
1629
|
-
} = re(), C = (
|
|
1462
|
+
} = re(), C = (a, c) => a.map(({
|
|
1630
1463
|
key: g,
|
|
1631
|
-
children:
|
|
1464
|
+
children: h,
|
|
1632
1465
|
uuid: x,
|
|
1633
|
-
...
|
|
1466
|
+
...P
|
|
1634
1467
|
}) => {
|
|
1635
1468
|
var L;
|
|
1636
1469
|
const R = (f == null ? void 0 : f.columnsMap[g || "null"]) || {
|
|
1637
1470
|
show: !0
|
|
1638
1471
|
};
|
|
1639
1472
|
let O = !1;
|
|
1640
|
-
R.show !== !1 && (
|
|
1641
|
-
const
|
|
1473
|
+
R.show !== !1 && (c == null ? void 0 : c.show) !== !1 && !h && (O = !0);
|
|
1474
|
+
const Y = {
|
|
1642
1475
|
key: x || "",
|
|
1643
|
-
...
|
|
1476
|
+
...Ee(P, ["dataIndex"]),
|
|
1644
1477
|
checked: O,
|
|
1645
1478
|
selectable: !1,
|
|
1646
1479
|
disabled: R.disable === !0,
|
|
1647
1480
|
disableCheckbox: typeof R.disable == "boolean" ? R.disable : (L = R.disable) == null ? void 0 : L.checkbox,
|
|
1648
1481
|
isLeaf: !0
|
|
1649
1482
|
};
|
|
1650
|
-
return
|
|
1483
|
+
return h && (Y.children = C(h, R)), Y;
|
|
1651
1484
|
});
|
|
1652
|
-
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1485
|
+
Pe(() => {
|
|
1486
|
+
const a = C(e.list || []);
|
|
1487
|
+
u.value = a, o.value = a.filter((c) => c.checked).map((c) => c.key), (f == null ? void 0 : f.operationType.value) === "fixed" && (n.value = We().uuid(15));
|
|
1655
1488
|
});
|
|
1656
|
-
const
|
|
1489
|
+
const T = Re((a, c, g) => {
|
|
1657
1490
|
var V, ue;
|
|
1658
|
-
const
|
|
1491
|
+
const h = ((V = S(i).find((D) => D.uuid === a)) == null ? void 0 : V.key) || "", x = ((ue = S(i).find((D) => D.uuid === c)) == null ? void 0 : ue.key) || "", P = {
|
|
1659
1492
|
...f == null ? void 0 : f.columnsMap
|
|
1660
|
-
}, R = [...f.sortKeyColumns.value], O = R.findIndex((D) => D ===
|
|
1493
|
+
}, R = [...f.sortKeyColumns.value], O = R.findIndex((D) => D === h), Y = R.findIndex((D) => D === x), L = g > O;
|
|
1661
1494
|
if (O < 0)
|
|
1662
1495
|
return;
|
|
1663
1496
|
const N = R[O];
|
|
1664
|
-
R.splice(O, 1), g === 0 ? R.unshift(N) : R.splice(L ?
|
|
1665
|
-
|
|
1666
|
-
...
|
|
1667
|
-
order:
|
|
1497
|
+
R.splice(O, 1), g === 0 ? R.unshift(N) : R.splice(L ? Y : Y + 1, 0, N), R.forEach((D, J) => {
|
|
1498
|
+
P[D] = {
|
|
1499
|
+
...P[D] || {},
|
|
1500
|
+
order: J
|
|
1668
1501
|
};
|
|
1669
|
-
}), f == null || f.setColumnsMap(
|
|
1670
|
-
}),
|
|
1502
|
+
}), f == null || f.setColumnsMap(P, "drop"), f == null || f.setSortKeyColumns(R);
|
|
1503
|
+
}), m = Re((a) => {
|
|
1671
1504
|
var R;
|
|
1672
|
-
const
|
|
1505
|
+
const c = a.node.key, g = ((R = S(i).find((O) => O.uuid === c)) == null ? void 0 : R.key) || "", x = {
|
|
1673
1506
|
...(f == null ? void 0 : f.columnsMap[g]) || {}
|
|
1674
1507
|
};
|
|
1675
|
-
x.show =
|
|
1676
|
-
const
|
|
1508
|
+
x.show = a.checked;
|
|
1509
|
+
const P = {
|
|
1677
1510
|
...f == null ? void 0 : f.columnsMap,
|
|
1678
1511
|
[g]: x
|
|
1679
1512
|
};
|
|
1680
|
-
f == null || f.setColumnsMap(
|
|
1681
|
-
}),
|
|
1682
|
-
const
|
|
1683
|
-
return
|
|
1684
|
-
title:
|
|
1685
|
-
column:
|
|
1686
|
-
}, () => [
|
|
1513
|
+
f == null || f.setColumnsMap(P, "show");
|
|
1514
|
+
}), s = (a) => {
|
|
1515
|
+
const c = S(i).find((g) => g.uuid === a.key);
|
|
1516
|
+
return a.title || tl(d, "headerCell", {
|
|
1517
|
+
title: c.title,
|
|
1518
|
+
column: c
|
|
1519
|
+
}, () => [c.title]);
|
|
1687
1520
|
};
|
|
1688
1521
|
return () => {
|
|
1689
|
-
var
|
|
1690
|
-
return l.value ?
|
|
1522
|
+
var a, c;
|
|
1523
|
+
return l.value ? r(Ne, null, [e.showTitle && r("span", {
|
|
1691
1524
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1692
|
-
}, [e.title]),
|
|
1693
|
-
key:
|
|
1694
|
-
draggable: e.draggable && !!((
|
|
1525
|
+
}, [e.title]), r(cl, {
|
|
1526
|
+
key: n.value,
|
|
1527
|
+
draggable: e.draggable && !!((a = u.value) != null && a.length) && ((c = u.value) == null ? void 0 : c.length) > 1,
|
|
1695
1528
|
checkable: e.checkable,
|
|
1696
1529
|
blockNode: !0,
|
|
1697
1530
|
showLine: !1,
|
|
1698
|
-
checkedKeys:
|
|
1531
|
+
checkedKeys: o.value,
|
|
1699
1532
|
height: 280,
|
|
1700
1533
|
onDrop: (g) => {
|
|
1701
|
-
const
|
|
1702
|
-
dropPosition:
|
|
1534
|
+
const h = g.node.key, x = g.dragNode.key, {
|
|
1535
|
+
dropPosition: P,
|
|
1703
1536
|
dropToGap: R
|
|
1704
|
-
} = g, O =
|
|
1705
|
-
|
|
1537
|
+
} = g, O = P === -1 || !R ? P + 1 : P;
|
|
1538
|
+
T(x, h, O);
|
|
1706
1539
|
},
|
|
1707
|
-
onCheck: (g,
|
|
1708
|
-
treeData:
|
|
1540
|
+
onCheck: (g, h) => m(h),
|
|
1541
|
+
treeData: u.value
|
|
1709
1542
|
}, {
|
|
1710
1543
|
title: (g) => {
|
|
1711
1544
|
var x;
|
|
1712
|
-
const
|
|
1545
|
+
const h = {
|
|
1713
1546
|
...g,
|
|
1714
1547
|
children: void 0,
|
|
1715
|
-
title:
|
|
1548
|
+
title: s(g),
|
|
1716
1549
|
autoScroll: (x = f == null ? void 0 : f.autoScroll) == null ? void 0 : x.value
|
|
1717
1550
|
};
|
|
1718
|
-
return
|
|
1551
|
+
return r(ea, q({
|
|
1719
1552
|
hashId: e.hashId,
|
|
1720
1553
|
className: e.className
|
|
1721
|
-
},
|
|
1722
|
-
treeKey:
|
|
1554
|
+
}, h, {
|
|
1555
|
+
treeKey: h.key
|
|
1723
1556
|
}), null);
|
|
1724
1557
|
}
|
|
1725
1558
|
})]) : null;
|
|
1726
1559
|
};
|
|
1727
1560
|
}
|
|
1728
|
-
}),
|
|
1561
|
+
}), ta = /* @__PURE__ */ ne({
|
|
1729
1562
|
props: {
|
|
1730
1563
|
hashId: String,
|
|
1731
1564
|
className: String,
|
|
@@ -1734,65 +1567,65 @@ const Fe = (e) => {
|
|
|
1734
1567
|
},
|
|
1735
1568
|
setup(e) {
|
|
1736
1569
|
const {
|
|
1737
|
-
columns:
|
|
1738
|
-
} = re(), l = k([]),
|
|
1739
|
-
H(() =>
|
|
1740
|
-
l.value = [],
|
|
1741
|
-
if (
|
|
1570
|
+
columns: n
|
|
1571
|
+
} = re(), l = k([]), u = k([]), o = k([]), i = k([]);
|
|
1572
|
+
H(() => n.value, (C) => {
|
|
1573
|
+
l.value = [], u.value = [], o.value = [], C.forEach((T) => {
|
|
1574
|
+
if (T.hideInSetting)
|
|
1742
1575
|
return;
|
|
1743
1576
|
const {
|
|
1744
|
-
fixed:
|
|
1745
|
-
show:
|
|
1746
|
-
uuid:
|
|
1747
|
-
} =
|
|
1748
|
-
if ((
|
|
1749
|
-
|
|
1577
|
+
fixed: m,
|
|
1578
|
+
show: s,
|
|
1579
|
+
uuid: a
|
|
1580
|
+
} = T;
|
|
1581
|
+
if ((s || s === void 0) && a && i.value.push(a), m === "left") {
|
|
1582
|
+
u.value.push(T);
|
|
1750
1583
|
return;
|
|
1751
1584
|
}
|
|
1752
|
-
if (
|
|
1753
|
-
l.value.push(
|
|
1585
|
+
if (m === "right") {
|
|
1586
|
+
l.value.push(T);
|
|
1754
1587
|
return;
|
|
1755
1588
|
}
|
|
1756
|
-
|
|
1589
|
+
o.value.push(T);
|
|
1757
1590
|
});
|
|
1758
1591
|
}, {
|
|
1759
1592
|
immediate: !0
|
|
1760
1593
|
});
|
|
1761
|
-
const d =
|
|
1762
|
-
return () =>
|
|
1594
|
+
const d = p(() => l.value && l.value.length > 0), f = p(() => u.value && u.value.length > 0);
|
|
1595
|
+
return () => r("div", {
|
|
1763
1596
|
class: {
|
|
1764
1597
|
[`${e.hashId}`]: !0,
|
|
1765
1598
|
[`${e.className}-list`]: !0,
|
|
1766
1599
|
[`${e.className}-list-group`]: d.value || f.value
|
|
1767
1600
|
}
|
|
1768
|
-
}, [
|
|
1601
|
+
}, [r(Le, {
|
|
1769
1602
|
title: "固定在左侧",
|
|
1770
|
-
list:
|
|
1771
|
-
keys:
|
|
1603
|
+
list: u.value,
|
|
1604
|
+
keys: i.value,
|
|
1772
1605
|
hashId: e.hashId,
|
|
1773
1606
|
draggable: e.draggable,
|
|
1774
1607
|
checkable: e.checkable,
|
|
1775
1608
|
className: e.className
|
|
1776
|
-
}, null),
|
|
1777
|
-
list:
|
|
1778
|
-
keys:
|
|
1609
|
+
}, null), r(Le, {
|
|
1610
|
+
list: o.value,
|
|
1611
|
+
keys: i.value,
|
|
1779
1612
|
hashId: e.hashId,
|
|
1780
1613
|
draggable: e.draggable,
|
|
1781
1614
|
checkable: e.checkable,
|
|
1782
1615
|
title: "不固定",
|
|
1783
1616
|
showTitle: f.value || d.value,
|
|
1784
1617
|
className: e.className
|
|
1785
|
-
}, null),
|
|
1618
|
+
}, null), r(Le, {
|
|
1786
1619
|
title: "固定在右侧",
|
|
1787
1620
|
list: l.value,
|
|
1788
|
-
keys:
|
|
1621
|
+
keys: i.value,
|
|
1789
1622
|
hashId: e.hashId,
|
|
1790
1623
|
draggable: e.draggable,
|
|
1791
1624
|
checkable: e.checkable,
|
|
1792
1625
|
className: e.className
|
|
1793
1626
|
}, null)]);
|
|
1794
1627
|
}
|
|
1795
|
-
}),
|
|
1628
|
+
}), la = /* @__PURE__ */ ne({
|
|
1796
1629
|
props: {
|
|
1797
1630
|
draggable: {
|
|
1798
1631
|
type: Boolean,
|
|
@@ -1806,131 +1639,131 @@ const Fe = (e) => {
|
|
|
1806
1639
|
extra: [Function, Object, String, Boolean]
|
|
1807
1640
|
},
|
|
1808
1641
|
setup(e) {
|
|
1809
|
-
const
|
|
1642
|
+
const n = Ge({
|
|
1810
1643
|
suffixCls: "table-column-setting",
|
|
1811
1644
|
isPor: !0
|
|
1812
1645
|
}), {
|
|
1813
1646
|
wrapSSR: l,
|
|
1814
|
-
hashId:
|
|
1815
|
-
} =
|
|
1816
|
-
columns:
|
|
1817
|
-
settingsAction:
|
|
1818
|
-
} = re(), d =
|
|
1819
|
-
const
|
|
1647
|
+
hashId: u
|
|
1648
|
+
} = ze("ColumnSetting", [Zl], n), {
|
|
1649
|
+
columns: o,
|
|
1650
|
+
settingsAction: i
|
|
1651
|
+
} = re(), d = Re((s = !0) => {
|
|
1652
|
+
const a = {}, c = (g) => {
|
|
1820
1653
|
g.forEach(({
|
|
1821
|
-
key:
|
|
1654
|
+
key: h,
|
|
1822
1655
|
fixed: x,
|
|
1823
|
-
index:
|
|
1656
|
+
index: P,
|
|
1824
1657
|
children: R
|
|
1825
1658
|
}) => {
|
|
1826
|
-
const O =
|
|
1827
|
-
O && (
|
|
1828
|
-
show:
|
|
1659
|
+
const O = mt(h, P);
|
|
1660
|
+
O && (a[O] = {
|
|
1661
|
+
show: s,
|
|
1829
1662
|
fixed: x
|
|
1830
|
-
}), R &&
|
|
1663
|
+
}), R && c(R);
|
|
1831
1664
|
});
|
|
1832
1665
|
};
|
|
1833
|
-
|
|
1834
|
-
}), f =
|
|
1835
|
-
|
|
1836
|
-
}), C =
|
|
1837
|
-
|
|
1838
|
-
}),
|
|
1666
|
+
c(o.value), i == null || i.setColumnsMap(a, "show");
|
|
1667
|
+
}), f = Re((s) => {
|
|
1668
|
+
s.target.checked ? d() : d(!1);
|
|
1669
|
+
}), C = Re(() => {
|
|
1670
|
+
i == null || i.setColumnsMap(i == null ? void 0 : i.cacheColumnsMap, "fixed");
|
|
1671
|
+
}), T = p(() => (
|
|
1839
1672
|
// @ts-ignore
|
|
1840
|
-
Object.values(
|
|
1841
|
-
)),
|
|
1842
|
-
return () => l(
|
|
1673
|
+
Object.values(i == null ? void 0 : i.columnsMap).filter((s) => !s || s.show === !1)
|
|
1674
|
+
)), m = p(() => S(T).length > 0 && S(T).length !== o.value.length);
|
|
1675
|
+
return () => l(r(ol, {
|
|
1843
1676
|
arrowPointAtCenter: !0,
|
|
1844
|
-
title:
|
|
1845
|
-
class: [`${
|
|
1846
|
-
}, [
|
|
1847
|
-
indeterminate:
|
|
1848
|
-
checked: S(
|
|
1849
|
-
onChange: (
|
|
1677
|
+
title: r("div", {
|
|
1678
|
+
class: [`${n}-title`, u.value]
|
|
1679
|
+
}, [r(rl, {
|
|
1680
|
+
indeterminate: m.value,
|
|
1681
|
+
checked: S(T).length === 0 && S(T).length !== o.value.length,
|
|
1682
|
+
onChange: (s) => f(s)
|
|
1850
1683
|
}, {
|
|
1851
|
-
default: () => [
|
|
1852
|
-
}), e.checkedReset ?
|
|
1684
|
+
default: () => [Fe("列展示")]
|
|
1685
|
+
}), e.checkedReset ? r("a", {
|
|
1853
1686
|
onClick: C,
|
|
1854
|
-
class: [`${
|
|
1855
|
-
}, [
|
|
1687
|
+
class: [`${n}-action-rest-button`, u.value]
|
|
1688
|
+
}, [Fe("重置")]) : null, e != null && e.extra ? r(se, {
|
|
1856
1689
|
size: 12,
|
|
1857
1690
|
align: "center"
|
|
1858
1691
|
}, {
|
|
1859
1692
|
default: () => [e.extra]
|
|
1860
1693
|
}) : null]),
|
|
1861
|
-
overlayClassName: `${
|
|
1694
|
+
overlayClassName: `${n}-overlay ${u.value}`,
|
|
1862
1695
|
trigger: "click",
|
|
1863
1696
|
placement: "bottomRight",
|
|
1864
|
-
content:
|
|
1865
|
-
hashId:
|
|
1697
|
+
content: r(ta, {
|
|
1698
|
+
hashId: u.value,
|
|
1866
1699
|
checkable: e.checkable ?? !0,
|
|
1867
1700
|
draggable: e.draggable ?? !0,
|
|
1868
|
-
className:
|
|
1701
|
+
className: n
|
|
1869
1702
|
}, null)
|
|
1870
1703
|
}, {
|
|
1871
|
-
default: () => [
|
|
1704
|
+
default: () => [r(ee, {
|
|
1872
1705
|
title: "列设置"
|
|
1873
1706
|
}, {
|
|
1874
|
-
default: () => [
|
|
1707
|
+
default: () => [r(St, null, null)]
|
|
1875
1708
|
})]
|
|
1876
1709
|
}));
|
|
1877
1710
|
}
|
|
1878
|
-
}),
|
|
1711
|
+
}), Tt = /* @__PURE__ */ ne({
|
|
1879
1712
|
setup() {
|
|
1880
1713
|
const {
|
|
1881
1714
|
isFullscreen: e
|
|
1882
|
-
} =
|
|
1883
|
-
return () => e.value ?
|
|
1715
|
+
} = bt();
|
|
1716
|
+
return () => e.value ? r(ee, {
|
|
1884
1717
|
title: "退出全屏"
|
|
1885
1718
|
}, {
|
|
1886
|
-
default: () => [
|
|
1887
|
-
}) :
|
|
1719
|
+
default: () => [r(pl, null, null)]
|
|
1720
|
+
}) : r(ee, {
|
|
1888
1721
|
title: "全屏"
|
|
1889
1722
|
}, {
|
|
1890
|
-
default: () => [
|
|
1723
|
+
default: () => [r(Tl, null, null)]
|
|
1891
1724
|
});
|
|
1892
1725
|
}
|
|
1893
|
-
}),
|
|
1726
|
+
}), aa = () => {
|
|
1894
1727
|
const {
|
|
1895
1728
|
action: e,
|
|
1896
|
-
tableSize:
|
|
1729
|
+
tableSize: n
|
|
1897
1730
|
} = re();
|
|
1898
|
-
return
|
|
1899
|
-
overlay:
|
|
1900
|
-
selectedKeys: [
|
|
1731
|
+
return r(dl, {
|
|
1732
|
+
overlay: r(ke, {
|
|
1733
|
+
selectedKeys: [n.value],
|
|
1901
1734
|
onClick: ({
|
|
1902
1735
|
key: l
|
|
1903
1736
|
}) => {
|
|
1904
|
-
var
|
|
1905
|
-
(
|
|
1737
|
+
var u;
|
|
1738
|
+
(u = e.setTableSize) == null || u.call(e, l);
|
|
1906
1739
|
},
|
|
1907
1740
|
style: {
|
|
1908
1741
|
width: 80
|
|
1909
1742
|
}
|
|
1910
1743
|
}, {
|
|
1911
|
-
default: () => [
|
|
1744
|
+
default: () => [r(ke.Item, {
|
|
1912
1745
|
key: "large"
|
|
1913
1746
|
}, {
|
|
1914
|
-
default: () => [
|
|
1915
|
-
}),
|
|
1747
|
+
default: () => [Fe("默认")]
|
|
1748
|
+
}), r(ke.Item, {
|
|
1916
1749
|
key: "middle"
|
|
1917
1750
|
}, {
|
|
1918
|
-
default: () => [
|
|
1919
|
-
}),
|
|
1751
|
+
default: () => [Fe("中等")]
|
|
1752
|
+
}), r(ke.Item, {
|
|
1920
1753
|
key: "small"
|
|
1921
1754
|
}, {
|
|
1922
|
-
default: () => [
|
|
1755
|
+
default: () => [Fe("紧凑")]
|
|
1923
1756
|
})]
|
|
1924
1757
|
}),
|
|
1925
1758
|
trigger: ["click"]
|
|
1926
1759
|
}, {
|
|
1927
|
-
default: () => [
|
|
1760
|
+
default: () => [r(ee, {
|
|
1928
1761
|
title: "表格密度"
|
|
1929
1762
|
}, {
|
|
1930
|
-
default: () => [
|
|
1763
|
+
default: () => [r($l, null, null)]
|
|
1931
1764
|
})]
|
|
1932
1765
|
});
|
|
1933
|
-
},
|
|
1766
|
+
}, na = (e) => ({
|
|
1934
1767
|
[`${e.componentCls}`]: {
|
|
1935
1768
|
lineHeight: 1,
|
|
1936
1769
|
"&-container": {
|
|
@@ -1972,180 +1805,180 @@ const Fe = (e) => {
|
|
|
1972
1805
|
}
|
|
1973
1806
|
}
|
|
1974
1807
|
});
|
|
1975
|
-
function
|
|
1976
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1808
|
+
function ft(e) {
|
|
1809
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !me(e);
|
|
1977
1810
|
}
|
|
1978
1811
|
const {
|
|
1979
|
-
useBreakpoint:
|
|
1980
|
-
} =
|
|
1981
|
-
function
|
|
1982
|
-
if (
|
|
1812
|
+
useBreakpoint: ua
|
|
1813
|
+
} = Ue;
|
|
1814
|
+
function ia(e) {
|
|
1815
|
+
if (me(e))
|
|
1983
1816
|
return e;
|
|
1984
1817
|
if (e) {
|
|
1985
|
-
const
|
|
1818
|
+
const n = e, {
|
|
1986
1819
|
icon: l,
|
|
1987
|
-
tooltip:
|
|
1988
|
-
onClick:
|
|
1989
|
-
key:
|
|
1990
|
-
} =
|
|
1991
|
-
return l &&
|
|
1992
|
-
title:
|
|
1820
|
+
tooltip: u,
|
|
1821
|
+
onClick: o,
|
|
1822
|
+
key: i
|
|
1823
|
+
} = n;
|
|
1824
|
+
return l && u ? r(ee, {
|
|
1825
|
+
title: u
|
|
1993
1826
|
}, {
|
|
1994
|
-
default: () => [
|
|
1995
|
-
key:
|
|
1827
|
+
default: () => [r("span", {
|
|
1828
|
+
key: i,
|
|
1996
1829
|
onClick: () => {
|
|
1997
|
-
|
|
1830
|
+
o && o(i);
|
|
1998
1831
|
}
|
|
1999
1832
|
}, [l])]
|
|
2000
1833
|
}) : l;
|
|
2001
1834
|
}
|
|
2002
1835
|
return null;
|
|
2003
1836
|
}
|
|
2004
|
-
const
|
|
1837
|
+
const $t = /* @__PURE__ */ ne({
|
|
2005
1838
|
props: {
|
|
2006
|
-
actions:
|
|
1839
|
+
actions: he.toolBarBtn,
|
|
2007
1840
|
settings: [Array],
|
|
2008
|
-
titleTip:
|
|
1841
|
+
titleTip: he.titleTip,
|
|
2009
1842
|
prefixCls: String,
|
|
2010
|
-
headerTitle:
|
|
2011
|
-
titleTipText:
|
|
2012
|
-
optionsExtra:
|
|
1843
|
+
headerTitle: he.headerTitle,
|
|
1844
|
+
titleTipText: he.titleTipText,
|
|
1845
|
+
optionsExtra: he.optionsExtra
|
|
2013
1846
|
},
|
|
2014
1847
|
setup(e) {
|
|
2015
1848
|
const {
|
|
2016
|
-
wrapSSR:
|
|
1849
|
+
wrapSSR: n,
|
|
2017
1850
|
hashId: l
|
|
2018
|
-
} =
|
|
2019
|
-
isMobile:
|
|
2020
|
-
} = re(),
|
|
2021
|
-
var
|
|
2022
|
-
return !!(e.titleTip || e.headerTitle || (
|
|
2023
|
-
}), d =
|
|
2024
|
-
var
|
|
2025
|
-
return !!((
|
|
2026
|
-
}), f =
|
|
2027
|
-
var
|
|
2028
|
-
let
|
|
2029
|
-
return Array.isArray(e.actions) ? ((
|
|
1851
|
+
} = ze("ListToolBar", [na], e.prefixCls), u = ua(), {
|
|
1852
|
+
isMobile: o
|
|
1853
|
+
} = re(), i = p(() => {
|
|
1854
|
+
var a;
|
|
1855
|
+
return !!(e.titleTip || e.headerTitle || (a = e.actions) != null && a.length);
|
|
1856
|
+
}), d = p(() => {
|
|
1857
|
+
var a;
|
|
1858
|
+
return !!((a = e.settings) != null && a.length || e.optionsExtra);
|
|
1859
|
+
}), f = p(() => !!(e.titleTip || e.headerTitle)), C = p(() => {
|
|
1860
|
+
var c;
|
|
1861
|
+
let a;
|
|
1862
|
+
return Array.isArray(e.actions) ? ((c = e.actions) == null ? void 0 : c.length) < 1 ? null : r(se, {
|
|
2030
1863
|
align: "center"
|
|
2031
|
-
},
|
|
2032
|
-
key:
|
|
1864
|
+
}, ft(a = e.actions.map((g, h) => me(g) ? qe(g, {
|
|
1865
|
+
key: h,
|
|
2033
1866
|
...g == null ? void 0 : g.props
|
|
2034
|
-
}) :
|
|
2035
|
-
key:
|
|
2036
|
-
}, [g]))) ?
|
|
2037
|
-
default: () => [
|
|
1867
|
+
}) : r("template", {
|
|
1868
|
+
key: h
|
|
1869
|
+
}, [g]))) ? a : {
|
|
1870
|
+
default: () => [a]
|
|
2038
1871
|
}) : e.actions;
|
|
2039
|
-
}),
|
|
1872
|
+
}), T = Me(() => !i.value && d.value ? r("div", {
|
|
2040
1873
|
class: `${e.prefixCls}-left ${l.value}`
|
|
2041
|
-
}, null) : f.value ?
|
|
1874
|
+
}, null) : f.value ? r(se, {
|
|
2042
1875
|
class: `${e.prefixCls}-left ${l.value}`
|
|
2043
1876
|
}, {
|
|
2044
|
-
default: () => [
|
|
1877
|
+
default: () => [r("div", {
|
|
2045
1878
|
class: `${e.prefixCls}-title ${l.value}`
|
|
2046
|
-
}, [e.headerTitle, e.titleTip &&
|
|
1879
|
+
}, [e.headerTitle, e.titleTip && r(ee, {
|
|
2047
1880
|
title: e.titleTipText
|
|
2048
1881
|
}, {
|
|
2049
|
-
default: () => [ae(e.titleTip) && e.titleTip ?
|
|
2050
|
-
})]), C.value &&
|
|
1882
|
+
default: () => [ae(e.titleTip) && e.titleTip ? r(Fl, null, null) : e.titleTip]
|
|
1883
|
+
})]), C.value && r("div", {
|
|
2051
1884
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
2052
1885
|
}, [C.value])]
|
|
2053
|
-
}) :
|
|
1886
|
+
}) : r(se, {
|
|
2054
1887
|
class: `${e.prefixCls}-left ${l.value}`
|
|
2055
1888
|
}, {
|
|
2056
|
-
default: () => [C.value &&
|
|
1889
|
+
default: () => [C.value && r("div", {
|
|
2057
1890
|
class: `${e.prefixCls}-actions`
|
|
2058
1891
|
}, [C.value])]
|
|
2059
|
-
}), [() =>
|
|
2060
|
-
let
|
|
2061
|
-
return d.value ?
|
|
1892
|
+
}), [() => i.value, () => d.value, () => f.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), m = Me(() => {
|
|
1893
|
+
let a;
|
|
1894
|
+
return d.value ? r(se, {
|
|
2062
1895
|
size: 16,
|
|
2063
1896
|
class: `${e.prefixCls}-right ${l.value}`,
|
|
2064
|
-
align:
|
|
2065
|
-
direction:
|
|
1897
|
+
align: u.value.lg ? "center" : "end",
|
|
1898
|
+
direction: u.value.lg ? "horizontal" : "vertical"
|
|
2066
1899
|
}, {
|
|
2067
1900
|
default: () => {
|
|
2068
|
-
var
|
|
2069
|
-
return [e.optionsExtra, (
|
|
1901
|
+
var c;
|
|
1902
|
+
return [e.optionsExtra, (c = e.settings) != null && c.length ? r(se, {
|
|
2070
1903
|
size: 12,
|
|
2071
1904
|
align: "center",
|
|
2072
1905
|
class: `${e.prefixCls}-setting-items`
|
|
2073
|
-
},
|
|
2074
|
-
const x =
|
|
2075
|
-
return
|
|
2076
|
-
key:
|
|
1906
|
+
}, ft(a = e.settings.map((g, h) => {
|
|
1907
|
+
const x = ia(g);
|
|
1908
|
+
return r("div", {
|
|
1909
|
+
key: h,
|
|
2077
1910
|
class: `${e.prefixCls}-setting-item`
|
|
2078
1911
|
}, [x]);
|
|
2079
|
-
})) ?
|
|
2080
|
-
default: () => [
|
|
1912
|
+
})) ? a : {
|
|
1913
|
+
default: () => [a]
|
|
2081
1914
|
}) : null];
|
|
2082
1915
|
}
|
|
2083
1916
|
}) : null;
|
|
2084
|
-
}, [() =>
|
|
2085
|
-
if (!d.value && !
|
|
2086
|
-
const
|
|
1917
|
+
}, [() => u.value, () => d.value, () => e.prefixCls, () => f.value, () => C.value, () => e.settings]), s = Me(() => {
|
|
1918
|
+
if (!d.value && !i.value) return null;
|
|
1919
|
+
const a = {
|
|
2087
1920
|
[`${l.value}`]: !0,
|
|
2088
1921
|
[`${e.prefixCls}-container`]: !0,
|
|
2089
|
-
[`${e.prefixCls}-container-mobile`]:
|
|
1922
|
+
[`${e.prefixCls}-container-mobile`]: o.value
|
|
2090
1923
|
};
|
|
2091
|
-
return
|
|
2092
|
-
class:
|
|
2093
|
-
}, [
|
|
2094
|
-
}, [() =>
|
|
2095
|
-
return () =>
|
|
1924
|
+
return r("div", {
|
|
1925
|
+
class: a
|
|
1926
|
+
}, [T.value, m.value]);
|
|
1927
|
+
}, [() => o.value, () => i.value, () => d.value, () => T.value, () => e.prefixCls, () => m.value]);
|
|
1928
|
+
return () => n(r("div", {
|
|
2096
1929
|
class: `${e.prefixCls} ${l.value}`
|
|
2097
|
-
}, [
|
|
1930
|
+
}, [s.value]));
|
|
2098
1931
|
}
|
|
2099
1932
|
});
|
|
2100
|
-
|
|
2101
|
-
function
|
|
1933
|
+
$t.inheritAttrs = !1;
|
|
1934
|
+
function sa() {
|
|
2102
1935
|
return {
|
|
2103
1936
|
reload: {
|
|
2104
1937
|
text: "刷新",
|
|
2105
|
-
icon:
|
|
1938
|
+
icon: r(Rl, null, null)
|
|
2106
1939
|
},
|
|
2107
1940
|
density: {
|
|
2108
1941
|
text: "表格密度",
|
|
2109
|
-
icon:
|
|
1942
|
+
icon: r(aa, null, null)
|
|
2110
1943
|
},
|
|
2111
1944
|
setting: {
|
|
2112
1945
|
text: "列设置",
|
|
2113
|
-
icon:
|
|
1946
|
+
icon: r(St, null, null)
|
|
2114
1947
|
},
|
|
2115
1948
|
fullScreen: {
|
|
2116
1949
|
text: "全屏",
|
|
2117
|
-
icon:
|
|
1950
|
+
icon: r(Tt, null, null)
|
|
2118
1951
|
}
|
|
2119
1952
|
};
|
|
2120
1953
|
}
|
|
2121
|
-
function
|
|
1954
|
+
function oa(e, n) {
|
|
2122
1955
|
return Object.keys(e).filter((l) => l).map((l) => {
|
|
2123
|
-
const
|
|
2124
|
-
if (!
|
|
1956
|
+
const u = e[l];
|
|
1957
|
+
if (!u)
|
|
2125
1958
|
return null;
|
|
2126
|
-
let
|
|
2127
|
-
if (typeof
|
|
1959
|
+
let o = u === !0 ? n[l] : () => u == null ? void 0 : u();
|
|
1960
|
+
if (typeof o != "function" && (o = () => {
|
|
2128
1961
|
}), l === "setting")
|
|
2129
|
-
return
|
|
1962
|
+
return r(la, q(e[l], {
|
|
2130
1963
|
key: l
|
|
2131
1964
|
}), null);
|
|
2132
1965
|
if (l === "fullScreen")
|
|
2133
|
-
return
|
|
1966
|
+
return r("span", {
|
|
2134
1967
|
key: l,
|
|
2135
|
-
onClick:
|
|
2136
|
-
}, [
|
|
2137
|
-
const
|
|
2138
|
-
return
|
|
1968
|
+
onClick: o
|
|
1969
|
+
}, [r(Tt, null, null)]);
|
|
1970
|
+
const i = sa()[l];
|
|
1971
|
+
return i ? r("span", {
|
|
2139
1972
|
key: l,
|
|
2140
|
-
onClick:
|
|
2141
|
-
}, [
|
|
2142
|
-
title:
|
|
1973
|
+
onClick: o
|
|
1974
|
+
}, [r(ee, {
|
|
1975
|
+
title: i.text
|
|
2143
1976
|
}, {
|
|
2144
|
-
default: () => [
|
|
1977
|
+
default: () => [i.icon]
|
|
2145
1978
|
})]) : null;
|
|
2146
1979
|
}).filter((l) => l);
|
|
2147
1980
|
}
|
|
2148
|
-
const
|
|
1981
|
+
const ra = {
|
|
2149
1982
|
options: [Boolean, Object, Array],
|
|
2150
1983
|
titleTip: [Function, Boolean, Object, String],
|
|
2151
1984
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -2153,46 +1986,46 @@ const ia = {
|
|
|
2153
1986
|
titleTipText: [String],
|
|
2154
1987
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
2155
1988
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
2156
|
-
},
|
|
2157
|
-
props:
|
|
1989
|
+
}, ca = /* @__PURE__ */ ne({
|
|
1990
|
+
props: ra,
|
|
2158
1991
|
inheritAttrs: !1,
|
|
2159
1992
|
setup(e) {
|
|
2160
|
-
const
|
|
1993
|
+
const n = Ge({
|
|
2161
1994
|
suffixCls: "table-list-toolbar",
|
|
2162
1995
|
isPor: !0
|
|
2163
1996
|
}), {
|
|
2164
1997
|
action: l
|
|
2165
|
-
} = re(),
|
|
1998
|
+
} = re(), u = Me(() => {
|
|
2166
1999
|
var d;
|
|
2167
|
-
const
|
|
2000
|
+
const o = {
|
|
2168
2001
|
reload: () => l == null ? void 0 : l.reload(),
|
|
2169
2002
|
density: !0,
|
|
2170
2003
|
setting: !0,
|
|
2171
2004
|
fullScreen: () => l == null ? void 0 : l.toggle()
|
|
2172
2005
|
};
|
|
2173
2006
|
if (e.options === !1 || ((d = Object.keys(e.options)) == null ? void 0 : d.length) === 0) return [];
|
|
2174
|
-
const
|
|
2175
|
-
...
|
|
2007
|
+
const i = {
|
|
2008
|
+
...o,
|
|
2176
2009
|
...e.options
|
|
2177
2010
|
};
|
|
2178
|
-
return
|
|
2179
|
-
...
|
|
2011
|
+
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), oa(i, {
|
|
2012
|
+
...o
|
|
2180
2013
|
});
|
|
2181
2014
|
}, [() => l, () => e.options]);
|
|
2182
2015
|
return () => {
|
|
2183
|
-
const
|
|
2184
|
-
return
|
|
2185
|
-
prefixCls:
|
|
2016
|
+
const o = e.toolBarBtn || [];
|
|
2017
|
+
return r($t, {
|
|
2018
|
+
prefixCls: n,
|
|
2186
2019
|
optionsExtra: e.optionsExtra,
|
|
2187
2020
|
headerTitle: e.headerTitle,
|
|
2188
|
-
actions:
|
|
2189
|
-
settings: S(
|
|
2021
|
+
actions: o,
|
|
2022
|
+
settings: S(u),
|
|
2190
2023
|
titleTip: e.titleTip,
|
|
2191
2024
|
titleTipText: e.titleTipText
|
|
2192
2025
|
}, null);
|
|
2193
2026
|
};
|
|
2194
2027
|
}
|
|
2195
|
-
}),
|
|
2028
|
+
}), Ve = {
|
|
2196
2029
|
"&::-webkit-scrollbar": {
|
|
2197
2030
|
width: 4,
|
|
2198
2031
|
height: 4
|
|
@@ -2205,7 +2038,7 @@ const ia = {
|
|
|
2205
2038
|
backgroundColor: "transparent",
|
|
2206
2039
|
borderRadius: 2
|
|
2207
2040
|
}
|
|
2208
|
-
},
|
|
2041
|
+
}, da = (e) => ({
|
|
2209
2042
|
[e.componentCls]: {
|
|
2210
2043
|
"&-a": {
|
|
2211
2044
|
cursor: "pointer",
|
|
@@ -2380,211 +2213,208 @@ const ia = {
|
|
|
2380
2213
|
color: e.colorWhite
|
|
2381
2214
|
}
|
|
2382
2215
|
},
|
|
2383
|
-
[`${e.antCls}-table-content`]:
|
|
2384
|
-
[`${e.antCls}-table-body`]:
|
|
2216
|
+
[`${e.antCls}-table-content`]: Ve,
|
|
2217
|
+
[`${e.antCls}-table-body`]: Ve,
|
|
2385
2218
|
[`${e.antCls}-table-empty`]: {
|
|
2386
|
-
[`${e.antCls}-table-content`]:
|
|
2219
|
+
[`${e.antCls}-table-content`]: Ve
|
|
2387
2220
|
}
|
|
2388
2221
|
}
|
|
2389
2222
|
}), {
|
|
2390
|
-
useBreakpoint:
|
|
2391
|
-
} =
|
|
2223
|
+
useBreakpoint: fa
|
|
2224
|
+
} = Ue, ha = {
|
|
2392
2225
|
reload: !0,
|
|
2393
2226
|
density: !0,
|
|
2394
2227
|
setting: !0,
|
|
2395
2228
|
fullScreen: !0
|
|
2396
|
-
},
|
|
2229
|
+
}, He = /* @__PURE__ */ ne({
|
|
2397
2230
|
name: "GProTable",
|
|
2398
2231
|
inheritAttrs: !1,
|
|
2399
|
-
props:
|
|
2232
|
+
props: he,
|
|
2400
2233
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
|
|
2401
2234
|
slots: Object,
|
|
2402
2235
|
setup(e, {
|
|
2403
|
-
emit:
|
|
2236
|
+
emit: n,
|
|
2404
2237
|
slots: l,
|
|
2405
|
-
attrs:
|
|
2406
|
-
expose:
|
|
2238
|
+
attrs: u,
|
|
2239
|
+
expose: o
|
|
2407
2240
|
}) {
|
|
2408
|
-
const
|
|
2241
|
+
const i = Ge({
|
|
2409
2242
|
suffixCls: "table",
|
|
2410
2243
|
isPor: !0
|
|
2411
2244
|
}), {
|
|
2412
2245
|
wrapSSR: d,
|
|
2413
2246
|
hashId: f
|
|
2414
|
-
} =
|
|
2415
|
-
width:
|
|
2416
|
-
} =
|
|
2417
|
-
|
|
2247
|
+
} = ze("ProBaseTable", [da], i), C = fa(), {
|
|
2248
|
+
width: T
|
|
2249
|
+
} = nl(), m = xt(), s = k(), a = k(), c = k(e.waitRequest);
|
|
2250
|
+
Pe(() => c.value = e.waitRequest);
|
|
2418
2251
|
const {
|
|
2419
2252
|
toggle: g,
|
|
2420
|
-
isFullscreen:
|
|
2421
|
-
} =
|
|
2253
|
+
isFullscreen: h
|
|
2254
|
+
} = bt(s), x = p(() => ({
|
|
2422
2255
|
...e
|
|
2423
|
-
})),
|
|
2424
|
-
var
|
|
2425
|
-
return e.virtualScroll &&
|
|
2426
|
-
}), O =
|
|
2427
|
-
const
|
|
2428
|
-
...
|
|
2429
|
-
key:
|
|
2430
|
-
align:
|
|
2431
|
-
uuid:
|
|
2256
|
+
})), P = p(() => !C.value.xl), R = p(() => {
|
|
2257
|
+
var v, F;
|
|
2258
|
+
return e.virtualScroll && ll(!((v = e.scroll) != null && v.y), "参数scroll的Y值不能为空!"), !!((F = e.scroll) != null && F.y && e.virtualScroll);
|
|
2259
|
+
}), O = p(() => {
|
|
2260
|
+
const v = (e.columns || []).filter((F) => F.key || F.dataIndex).map((F) => ({
|
|
2261
|
+
...F,
|
|
2262
|
+
key: F.key || F.dataIndex,
|
|
2263
|
+
align: F.align || e.align,
|
|
2264
|
+
uuid: We().uuid(15)
|
|
2432
2265
|
}));
|
|
2433
|
-
return
|
|
2266
|
+
return qt(v, {
|
|
2434
2267
|
align: e.align || "left",
|
|
2435
2268
|
showIndex: e.showIndex || !1
|
|
2436
2269
|
});
|
|
2437
2270
|
}), {
|
|
2438
|
-
loadingComputed:
|
|
2271
|
+
loadingComputed: Y,
|
|
2439
2272
|
loading: L,
|
|
2440
2273
|
setLoading: N
|
|
2441
|
-
} =
|
|
2442
|
-
emit:
|
|
2443
|
-
loading:
|
|
2274
|
+
} = kl({
|
|
2275
|
+
emit: n,
|
|
2276
|
+
loading: Z(e, "loading")
|
|
2444
2277
|
}), {
|
|
2445
2278
|
sizeRef: V,
|
|
2446
2279
|
setTableSize: ue
|
|
2447
|
-
} =
|
|
2448
|
-
emit:
|
|
2449
|
-
size:
|
|
2280
|
+
} = Dl({
|
|
2281
|
+
emit: n,
|
|
2282
|
+
size: Z(e, "size")
|
|
2450
2283
|
}), {
|
|
2451
2284
|
paginationInfo: D,
|
|
2452
|
-
requestPagination:
|
|
2285
|
+
requestPagination: J,
|
|
2453
2286
|
setPagination: W
|
|
2454
|
-
} =
|
|
2287
|
+
} = jl({
|
|
2455
2288
|
slots: l,
|
|
2456
2289
|
props: x,
|
|
2457
|
-
pagination:
|
|
2458
|
-
}),
|
|
2459
|
-
|
|
2290
|
+
pagination: Z(e, "pagination")
|
|
2291
|
+
}), Ce = Wl(e), {
|
|
2292
|
+
proScroll: t,
|
|
2460
2293
|
breakpoint: b
|
|
2461
|
-
} =
|
|
2462
|
-
...
|
|
2463
|
-
innerWidth:
|
|
2294
|
+
} = _l({
|
|
2295
|
+
...Ce,
|
|
2296
|
+
innerWidth: T,
|
|
2464
2297
|
columns: O,
|
|
2465
2298
|
screens: C
|
|
2466
|
-
}),
|
|
2467
|
-
|
|
2468
|
-
cacheProColumns:
|
|
2299
|
+
}), B = Vl(e), {
|
|
2300
|
+
proColumns: y,
|
|
2301
|
+
cacheProColumns: $,
|
|
2469
2302
|
setColumns: M,
|
|
2470
|
-
changeColumns:
|
|
2471
|
-
resizeColumnWidth:
|
|
2472
|
-
} =
|
|
2473
|
-
...
|
|
2303
|
+
changeColumns: E,
|
|
2304
|
+
resizeColumnWidth: w
|
|
2305
|
+
} = Hl({
|
|
2306
|
+
...B,
|
|
2474
2307
|
breakpoint: b,
|
|
2475
2308
|
scroll: t,
|
|
2476
2309
|
columns: O
|
|
2477
2310
|
}), {
|
|
2478
|
-
columnsMap:
|
|
2479
|
-
operationType:
|
|
2311
|
+
columnsMap: Ke,
|
|
2312
|
+
operationType: Be,
|
|
2480
2313
|
setColumnsMap: ie,
|
|
2481
2314
|
sortKeyColumns: Ie,
|
|
2482
|
-
cacheColumnsMap:
|
|
2315
|
+
cacheColumnsMap: xe,
|
|
2483
2316
|
setSortKeyColumns: U
|
|
2484
|
-
} =
|
|
2485
|
-
columns:
|
|
2486
|
-
columnsState:
|
|
2487
|
-
changeColumns:
|
|
2317
|
+
} = Ll({
|
|
2318
|
+
columns: $,
|
|
2319
|
+
columnsState: Z(e, "columnsState"),
|
|
2320
|
+
changeColumns: E
|
|
2488
2321
|
}), {
|
|
2489
|
-
formDataRef:
|
|
2490
|
-
formParamsRef:
|
|
2322
|
+
formDataRef: te,
|
|
2323
|
+
formParamsRef: z,
|
|
2491
2324
|
defaultParamsRef: ce,
|
|
2492
2325
|
setFormParams: _
|
|
2493
|
-
} =
|
|
2494
|
-
search:
|
|
2495
|
-
searchMap:
|
|
2496
|
-
params:
|
|
2326
|
+
} = Yl({
|
|
2327
|
+
search: Z(e, "search"),
|
|
2328
|
+
searchMap: Z(e, "searchMap"),
|
|
2329
|
+
params: Z(e, "params"),
|
|
2497
2330
|
columns: O,
|
|
2498
2331
|
setPagination: W
|
|
2499
2332
|
}), {
|
|
2500
|
-
selectedKey:
|
|
2501
|
-
selectedItem:
|
|
2502
|
-
changeRowKey:
|
|
2503
|
-
selectRowKey:
|
|
2504
|
-
selectAllRowKey:
|
|
2505
|
-
syncSelectedRows:
|
|
2506
|
-
removeRowKeys:
|
|
2507
|
-
clearAllRowKeys:
|
|
2508
|
-
} =
|
|
2509
|
-
reload:
|
|
2510
|
-
reSetDataList:
|
|
2511
|
-
changeDataValue:
|
|
2512
|
-
isTreeDataRef:
|
|
2513
|
-
dataSource:
|
|
2514
|
-
handleTableChange:
|
|
2515
|
-
} =
|
|
2516
|
-
...
|
|
2517
|
-
waitRequest:
|
|
2333
|
+
selectedKey: Xe,
|
|
2334
|
+
selectedItem: Ft,
|
|
2335
|
+
changeRowKey: Rt,
|
|
2336
|
+
selectRowKey: Je,
|
|
2337
|
+
selectAllRowKey: Qe,
|
|
2338
|
+
syncSelectedRows: Ze,
|
|
2339
|
+
removeRowKeys: et,
|
|
2340
|
+
clearAllRowKeys: Pt
|
|
2341
|
+
} = Nl(Z(e, "rowKey"), Z(e, "rowSelection")), Bt = zl(e), {
|
|
2342
|
+
reload: Ae,
|
|
2343
|
+
reSetDataList: It,
|
|
2344
|
+
changeDataValue: Ot,
|
|
2345
|
+
isTreeDataRef: tt,
|
|
2346
|
+
dataSource: Se,
|
|
2347
|
+
handleTableChange: lt
|
|
2348
|
+
} = Kl({
|
|
2349
|
+
...Bt,
|
|
2350
|
+
waitRequest: c
|
|
2518
2351
|
}, {
|
|
2519
|
-
loading:
|
|
2352
|
+
loading: Y,
|
|
2520
2353
|
paginationInfo: D,
|
|
2521
2354
|
setPagination: W,
|
|
2522
|
-
removeRowKeys:
|
|
2523
|
-
syncSelectedRows:
|
|
2355
|
+
removeRowKeys: et,
|
|
2356
|
+
syncSelectedRows: Ze,
|
|
2524
2357
|
setLoading: N,
|
|
2525
2358
|
setColumns: M,
|
|
2526
2359
|
columns: y,
|
|
2527
|
-
formParamsRef:
|
|
2360
|
+
formParamsRef: z,
|
|
2528
2361
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2529
|
-
hasCustomRender:
|
|
2530
|
-
},
|
|
2531
|
-
...
|
|
2532
|
-
...
|
|
2533
|
-
} : !1),
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
dataSource: S(Ce)
|
|
2549
|
-
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2550
|
-
}), Qe = $(() => {
|
|
2362
|
+
hasCustomRender: p(() => ye(e.customRender || (l == null ? void 0 : l.customRender)))
|
|
2363
|
+
}, n), we = p(() => e.options ? {
|
|
2364
|
+
...ha,
|
|
2365
|
+
...X(e.options) ? e.options : {}
|
|
2366
|
+
} : !1), kt = p(() => ({
|
|
2367
|
+
size: S(V),
|
|
2368
|
+
scroll: S(t),
|
|
2369
|
+
dataSource: S(Se),
|
|
2370
|
+
pagination: S(D),
|
|
2371
|
+
virtualScroll: R.value,
|
|
2372
|
+
columns: S(y).filter((v) => v.show || v.show === void 0)
|
|
2373
|
+
})), at = p(() => {
|
|
2374
|
+
var F, I;
|
|
2375
|
+
const v = X(e.loading) ? Ee(e.loading, "spinning") : {};
|
|
2376
|
+
return !v.indicator && ((F = m == null ? void 0 : m.indicator) != null && F.value) && (v.indicator = (I = m == null ? void 0 : m.indicator) == null ? void 0 : I.value), {
|
|
2377
|
+
spinning: e.showLoading ? ye(L.value) : !1,
|
|
2378
|
+
...v
|
|
2379
|
+
};
|
|
2380
|
+
}), nt = p(() => {
|
|
2551
2381
|
var j;
|
|
2552
|
-
let
|
|
2553
|
-
const
|
|
2382
|
+
let v;
|
|
2383
|
+
const F = S(x).direction === "rtl" ? "bottomLeft" : "right", I = (j = S(D)) == null ? void 0 : j.position;
|
|
2554
2384
|
if (I !== null && Array.isArray(I)) {
|
|
2555
|
-
const
|
|
2556
|
-
!
|
|
2385
|
+
const A = I.find((Q) => Q.includes("top")), K = I.find((Q) => Q.includes("bottom")), de = I.every((Q) => `${Q}` == "none");
|
|
2386
|
+
!A && !K && !de && (v = F), A && (v = A.toLowerCase().replace("top", "")), K && (v = K.toLowerCase().replace("bottom", ""));
|
|
2557
2387
|
} else
|
|
2558
|
-
|
|
2559
|
-
return
|
|
2560
|
-
}),
|
|
2561
|
-
var
|
|
2562
|
-
|
|
2563
|
-
...
|
|
2388
|
+
v = F;
|
|
2389
|
+
return v;
|
|
2390
|
+
}), ut = async (v) => {
|
|
2391
|
+
var F;
|
|
2392
|
+
X(e.search) && ((F = e.search) != null && F.showSearch) ? (_({
|
|
2393
|
+
...v,
|
|
2564
2394
|
...e.params || {}
|
|
2565
|
-
}), await
|
|
2566
|
-
},
|
|
2567
|
-
|
|
2568
|
-
},
|
|
2569
|
-
W(
|
|
2570
|
-
},
|
|
2395
|
+
}), await Ae()) : _(v);
|
|
2396
|
+
}, Dt = async (v, F) => {
|
|
2397
|
+
F ? (n("reset", v), e.request && await ut(v)) : e.request ? (n("submit", v), await ut(v)) : n("submit", v);
|
|
2398
|
+
}, it = (v, F, I, j) => {
|
|
2399
|
+
W(ot(v, ["current", "pageSize"])), lt(v, F, I, j);
|
|
2400
|
+
}, jt = (v, F) => {
|
|
2571
2401
|
var I;
|
|
2572
2402
|
W({
|
|
2573
|
-
current:
|
|
2574
|
-
pageSize:
|
|
2575
|
-
}),
|
|
2576
|
-
current:
|
|
2577
|
-
pageSize:
|
|
2403
|
+
current: v,
|
|
2404
|
+
pageSize: F
|
|
2405
|
+
}), lt({
|
|
2406
|
+
current: v,
|
|
2407
|
+
pageSize: F,
|
|
2578
2408
|
total: D.value && ((I = D.value) == null ? void 0 : I.total) || 0
|
|
2579
2409
|
}, {}, {});
|
|
2580
|
-
},
|
|
2581
|
-
|
|
2582
|
-
},
|
|
2583
|
-
|
|
2584
|
-
},
|
|
2410
|
+
}, Mt = (v) => {
|
|
2411
|
+
n("expandedRowsChange", v);
|
|
2412
|
+
}, Nt = (v, F) => {
|
|
2413
|
+
n("expand", v, F);
|
|
2414
|
+
}, Et = (v, F) => w(v, F), zt = (v, F, I) => {
|
|
2585
2415
|
const j = I.align === "center" ? "top" : I.align === "left" || !I.align ? "topLeft" : "topRight";
|
|
2586
|
-
return
|
|
2587
|
-
class: `${
|
|
2416
|
+
return F && I.copyable ? r(ml.Paragraph, {
|
|
2417
|
+
class: `${i}-copyable`,
|
|
2588
2418
|
style: {
|
|
2589
2419
|
margin: "0",
|
|
2590
2420
|
width: "100%",
|
|
@@ -2592,211 +2422,216 @@ const ia = {
|
|
|
2592
2422
|
},
|
|
2593
2423
|
copyable: !0
|
|
2594
2424
|
}, {
|
|
2595
|
-
default: () => [
|
|
2596
|
-
title:
|
|
2425
|
+
default: () => [r(ee, {
|
|
2426
|
+
title: v,
|
|
2597
2427
|
placement: j
|
|
2598
2428
|
}, {
|
|
2599
|
-
default: () => [
|
|
2600
|
-
class: `${
|
|
2601
|
-
}, [
|
|
2429
|
+
default: () => [r("div", {
|
|
2430
|
+
class: `${i}-ellipsis`
|
|
2431
|
+
}, [v])]
|
|
2602
2432
|
})]
|
|
2603
|
-
}) :
|
|
2604
|
-
title:
|
|
2433
|
+
}) : F && !I.copyable ? r(ee, {
|
|
2434
|
+
title: v,
|
|
2605
2435
|
placement: j
|
|
2606
2436
|
}, {
|
|
2607
|
-
default: () => [
|
|
2608
|
-
class: `${
|
|
2609
|
-
}, [
|
|
2610
|
-
}) :
|
|
2437
|
+
default: () => [tt.value ? v : r("div", {
|
|
2438
|
+
class: `${i}-ellipsis`
|
|
2439
|
+
}, [v])]
|
|
2440
|
+
}) : v;
|
|
2611
2441
|
};
|
|
2612
|
-
function
|
|
2613
|
-
var I, j,
|
|
2614
|
-
const
|
|
2615
|
-
if (
|
|
2616
|
-
const
|
|
2617
|
-
return
|
|
2618
|
-
class: je(`${
|
|
2442
|
+
function st() {
|
|
2443
|
+
var I, j, A, K, de;
|
|
2444
|
+
const v = ge(l, e, "emptyText");
|
|
2445
|
+
if (v !== !1 && ((I = m == null ? void 0 : m.emptyText) == null ? void 0 : I.value) !== !1) {
|
|
2446
|
+
const Q = ((j = e.emptyTextProps) == null ? void 0 : j.extraProps) || {}, pe = v || ((A = m == null ? void 0 : m.emptyText) == null ? void 0 : A.value), Te = me(pe), ve = Te ? yt(pe, Q) : gt(pe || []);
|
|
2447
|
+
return r("div", {
|
|
2448
|
+
class: je(`${i}-empty-text`, f.value, (K = e.emptyTextProps) == null ? void 0 : K.class),
|
|
2619
2449
|
style: (de = e.emptyTextProps) == null ? void 0 : de.style
|
|
2620
|
-
}, [
|
|
2450
|
+
}, [Te ? ve : be(ve) ? ve.map((Oe) => qe(Oe, Q)) : r(vl, null, null)]);
|
|
2621
2451
|
}
|
|
2622
2452
|
return null;
|
|
2623
2453
|
}
|
|
2624
|
-
const
|
|
2625
|
-
var
|
|
2626
|
-
const
|
|
2627
|
-
if (
|
|
2628
|
-
if ((
|
|
2629
|
-
const I =
|
|
2630
|
-
return
|
|
2454
|
+
const Kt = () => {
|
|
2455
|
+
var F;
|
|
2456
|
+
const v = ht(l, e, "customRender");
|
|
2457
|
+
if (v) {
|
|
2458
|
+
if ((F = Se.value) != null && F.length) {
|
|
2459
|
+
const I = le(S(Se));
|
|
2460
|
+
return v == null ? void 0 : v({
|
|
2631
2461
|
dataSource: I,
|
|
2632
|
-
currentData:
|
|
2462
|
+
currentData: Ol(I, D.value)
|
|
2633
2463
|
});
|
|
2634
2464
|
}
|
|
2635
|
-
return
|
|
2465
|
+
return st();
|
|
2636
2466
|
}
|
|
2637
|
-
return
|
|
2638
|
-
},
|
|
2639
|
-
var
|
|
2640
|
-
const
|
|
2641
|
-
return
|
|
2642
|
-
headerTitle:
|
|
2467
|
+
return r(Ne, null, null);
|
|
2468
|
+
}, At = (v) => {
|
|
2469
|
+
var A, K;
|
|
2470
|
+
const F = ge(l, e, "headerTitle"), I = ge(l, e, "titleTip"), j = ge(l, e, "toolBarBtn");
|
|
2471
|
+
return r(ca, {
|
|
2472
|
+
headerTitle: F,
|
|
2643
2473
|
titleTip: I,
|
|
2644
2474
|
titleTipText: e.titleTipText,
|
|
2645
|
-
options: ae(
|
|
2646
|
-
...
|
|
2647
|
-
setting:
|
|
2648
|
-
density:
|
|
2475
|
+
options: ae(we.value) ? we.value : {
|
|
2476
|
+
...we.value,
|
|
2477
|
+
setting: v ? !1 : (A = we.value) == null ? void 0 : A.setting,
|
|
2478
|
+
density: v ? !1 : (K = we.value) == null ? void 0 : K.density
|
|
2649
2479
|
},
|
|
2650
|
-
settingExtra:
|
|
2651
|
-
optionsExtra:
|
|
2480
|
+
settingExtra: ge(l, e, "settingExtra"),
|
|
2481
|
+
optionsExtra: ge(l, e, "optionsExtra"),
|
|
2652
2482
|
toolBarBtn: j
|
|
2653
2483
|
}, null);
|
|
2654
2484
|
};
|
|
2655
|
-
return
|
|
2485
|
+
return Gl({
|
|
2656
2486
|
tableSize: V,
|
|
2657
2487
|
columns: y,
|
|
2658
2488
|
cacheColumns: O,
|
|
2659
|
-
isMobile:
|
|
2489
|
+
isMobile: P,
|
|
2660
2490
|
action: {
|
|
2661
2491
|
setTableSize: ue,
|
|
2662
|
-
reload: (
|
|
2492
|
+
reload: (v) => Ae(v),
|
|
2663
2493
|
toggle: g
|
|
2664
2494
|
},
|
|
2665
2495
|
settingsAction: {
|
|
2666
|
-
autoScroll:
|
|
2667
|
-
columnsMap:
|
|
2668
|
-
operationType:
|
|
2496
|
+
autoScroll: Z(e, "autoScroll"),
|
|
2497
|
+
columnsMap: Ke,
|
|
2498
|
+
operationType: Be,
|
|
2669
2499
|
setColumnsMap: ie,
|
|
2670
2500
|
sortKeyColumns: Ie,
|
|
2671
|
-
cacheColumnsMap:
|
|
2501
|
+
cacheColumnsMap: xe,
|
|
2672
2502
|
setSortKeyColumns: U
|
|
2673
2503
|
},
|
|
2674
2504
|
setPagination: W,
|
|
2675
|
-
changeColumns:
|
|
2505
|
+
changeColumns: E,
|
|
2676
2506
|
slots: l
|
|
2677
|
-
}),
|
|
2507
|
+
}), o({
|
|
2678
2508
|
formRef: () => ({
|
|
2679
|
-
getFormState: () => S(
|
|
2509
|
+
getFormState: () => S(z),
|
|
2680
2510
|
getFormInnerState: () => {
|
|
2681
|
-
var
|
|
2682
|
-
return ((
|
|
2511
|
+
var v;
|
|
2512
|
+
return ((v = a.value) == null ? void 0 : v.getFormState()) || {};
|
|
2683
2513
|
},
|
|
2684
|
-
restFormState: (
|
|
2685
|
-
var
|
|
2686
|
-
|
|
2514
|
+
restFormState: (v) => {
|
|
2515
|
+
var F;
|
|
2516
|
+
c.value = !0, v && (v == null || v()), (F = a.value) == null || F.resetForm(!1), c.value = !1;
|
|
2687
2517
|
}
|
|
2688
2518
|
}),
|
|
2689
2519
|
actionRef: () => ({
|
|
2690
2520
|
loading: L,
|
|
2691
|
-
dataSource:
|
|
2692
|
-
pageState:
|
|
2521
|
+
dataSource: Se,
|
|
2522
|
+
pageState: J,
|
|
2693
2523
|
pagination: D.value,
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
clear:
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2524
|
+
selectedKey: p(() => Xe.value),
|
|
2525
|
+
selectedItem: p(() => Ft.value),
|
|
2526
|
+
rowsSelection: {
|
|
2527
|
+
clear: Pt,
|
|
2528
|
+
select: Je,
|
|
2529
|
+
remove: et,
|
|
2530
|
+
sync: Ze,
|
|
2531
|
+
selectAll: Qe
|
|
2532
|
+
},
|
|
2533
|
+
reload: Ae,
|
|
2534
|
+
getLoadingStatus: () => S(Y),
|
|
2535
|
+
reloadAndReset: async (v) => {
|
|
2536
|
+
var F, I, j;
|
|
2537
|
+
c.value = !0, W({
|
|
2704
2538
|
current: 1,
|
|
2705
|
-
pageSize: (
|
|
2706
|
-
}),
|
|
2539
|
+
pageSize: (J == null ? void 0 : J.pageSize) || 10
|
|
2540
|
+
}), v != null && v.callBack && (v != null && v.wait ? await ((F = v == null ? void 0 : v.callBack) == null ? void 0 : F.call(v)) : (I = v == null ? void 0 : v.callBack) == null || I.call(v)), (j = a.value) == null || j.resetForm(!1), c.value = !1;
|
|
2707
2541
|
},
|
|
2708
|
-
reSetDataList:
|
|
2709
|
-
setPageAndReload:
|
|
2542
|
+
reSetDataList: It,
|
|
2543
|
+
setPageAndReload: it,
|
|
2710
2544
|
setPagination: W,
|
|
2711
|
-
setData:
|
|
2545
|
+
setData: Ot,
|
|
2712
2546
|
setLoading: N
|
|
2713
2547
|
})
|
|
2714
2548
|
}), () => {
|
|
2715
|
-
var
|
|
2716
|
-
const
|
|
2717
|
-
return d(
|
|
2718
|
-
ref:
|
|
2549
|
+
var F, I;
|
|
2550
|
+
const v = ye(e.customRender || l.customRender);
|
|
2551
|
+
return d(r("div", {
|
|
2552
|
+
ref: s,
|
|
2719
2553
|
class: je([{
|
|
2720
2554
|
[`${f.value}`]: !0,
|
|
2721
|
-
[`${
|
|
2722
|
-
[`${
|
|
2723
|
-
[`${
|
|
2724
|
-
[`${
|
|
2725
|
-
[`${
|
|
2555
|
+
[`${i}`]: !0,
|
|
2556
|
+
[`${u.class}`]: u.class,
|
|
2557
|
+
[`${i}-no-scroll`]: !Object.keys(S(t) || {}).length,
|
|
2558
|
+
[`${i}-table-tree`]: tt.value,
|
|
2559
|
+
[`${i}-full-screen`]: h.value
|
|
2726
2560
|
}]),
|
|
2727
|
-
style:
|
|
2728
|
-
}, [
|
|
2729
|
-
class: [`${
|
|
2730
|
-
}, [(
|
|
2731
|
-
ref:
|
|
2561
|
+
style: u.style
|
|
2562
|
+
}, [r("div", {
|
|
2563
|
+
class: [`${i}-content`, f.value]
|
|
2564
|
+
}, [(te.value.length > 0 || ye(l.search)) && r(pt, {
|
|
2565
|
+
ref: a,
|
|
2732
2566
|
search: e.search,
|
|
2733
2567
|
modal: e.modalScroll,
|
|
2734
|
-
searchMap:
|
|
2735
|
-
prefixCls:
|
|
2736
|
-
loading: !!S(
|
|
2737
|
-
onSearch:
|
|
2568
|
+
searchMap: te.value,
|
|
2569
|
+
prefixCls: i,
|
|
2570
|
+
loading: !!S(Y),
|
|
2571
|
+
onSearch: Dt,
|
|
2738
2572
|
defaultParams: ce
|
|
2739
2573
|
}, {
|
|
2740
2574
|
default: l.search ? () => {
|
|
2741
2575
|
var j;
|
|
2742
2576
|
return (j = l.search) == null ? void 0 : j.call(l);
|
|
2743
2577
|
} : null
|
|
2744
|
-
}), !R.value &&
|
|
2578
|
+
}), !R.value && At(v), v ? r(_e, at.value, {
|
|
2745
2579
|
default: () => {
|
|
2746
|
-
var j,
|
|
2747
|
-
return [
|
|
2748
|
-
class: `${
|
|
2749
|
-
}, [
|
|
2750
|
-
class: je(`${
|
|
2751
|
-
style: (
|
|
2752
|
-
}, [
|
|
2580
|
+
var j, A, K;
|
|
2581
|
+
return [r("div", {
|
|
2582
|
+
class: `${i}-wrapper ${f.value}`
|
|
2583
|
+
}, [r("div", {
|
|
2584
|
+
class: je(`${i}-list`, f.value, (j = e.tableProps) == null ? void 0 : j.class),
|
|
2585
|
+
style: (A = e.tableProps) == null ? void 0 : A.style
|
|
2586
|
+
}, [Kt()]), e.pagination !== !1 && ((K = Se.value) == null ? void 0 : K.length) > 0 && r(fl, q({
|
|
2753
2587
|
class: {
|
|
2754
|
-
[`${
|
|
2755
|
-
[`${
|
|
2588
|
+
[`${i}-pagination ${f.value}`]: !0,
|
|
2589
|
+
[`${i}-pagination-${nt.value} ${f.value}`]: !!nt.value
|
|
2756
2590
|
}
|
|
2757
|
-
},
|
|
2758
|
-
onChange:
|
|
2591
|
+
}, fe(S(D)), {
|
|
2592
|
+
onChange: jt
|
|
2759
2593
|
}), null)])];
|
|
2760
2594
|
}
|
|
2761
|
-
}) :
|
|
2762
|
-
style: (
|
|
2595
|
+
}) : r(hl, q(ot(e, Object.keys(wt)), kt.value, {
|
|
2596
|
+
style: (F = e.tableProps) == null ? void 0 : F.style,
|
|
2763
2597
|
class: (I = e.tableProps) == null ? void 0 : I.class,
|
|
2598
|
+
loading: at.value,
|
|
2764
2599
|
rowKey: (j) => j[e.rowKey || "sortIndex"],
|
|
2765
2600
|
transformCellText: (j) => {
|
|
2766
2601
|
var ve, Oe;
|
|
2767
2602
|
const {
|
|
2768
|
-
text:
|
|
2603
|
+
text: A,
|
|
2769
2604
|
column: K
|
|
2770
|
-
} = j, de =
|
|
2771
|
-
if (
|
|
2605
|
+
} = j, de = be(A) ? A == null ? void 0 : A[0] : A;
|
|
2606
|
+
if (me(de)) return A;
|
|
2772
2607
|
const {
|
|
2773
|
-
value:
|
|
2774
|
-
success:
|
|
2775
|
-
} =
|
|
2776
|
-
return K != null && K.ellipsis ?
|
|
2608
|
+
value: Q,
|
|
2609
|
+
success: pe
|
|
2610
|
+
} = Ut(de, (K == null ? void 0 : K.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Te = Il(Q, ((Oe = (ve = e.columns) == null ? void 0 : ve.find((Yt) => Yt.key === K.key)) == null ? void 0 : Oe.valueType) || K.valueType, i, f.value);
|
|
2611
|
+
return K != null && K.ellipsis ? zt(Te, pe, K) : Te;
|
|
2777
2612
|
},
|
|
2778
2613
|
rowSelection: e.rowSelection ? {
|
|
2779
|
-
...
|
|
2780
|
-
selectedRowKeys:
|
|
2781
|
-
onSelect:
|
|
2782
|
-
onSelectAll:
|
|
2783
|
-
onChange:
|
|
2614
|
+
...Ee(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2615
|
+
selectedRowKeys: Xe.value,
|
|
2616
|
+
onSelect: Je,
|
|
2617
|
+
onSelectAll: Qe,
|
|
2618
|
+
onChange: Rt
|
|
2784
2619
|
} : void 0,
|
|
2785
|
-
onChange:
|
|
2786
|
-
onExpandedRowsChange:
|
|
2787
|
-
onExpand:
|
|
2788
|
-
onResizeColumn: (j,
|
|
2620
|
+
onChange: it,
|
|
2621
|
+
onExpandedRowsChange: Mt,
|
|
2622
|
+
onExpand: Nt,
|
|
2623
|
+
onResizeColumn: (j, A) => Et(j, A)
|
|
2789
2624
|
}), {
|
|
2790
2625
|
...l,
|
|
2791
|
-
emptyText: () =>
|
|
2626
|
+
emptyText: () => st()
|
|
2792
2627
|
})])]));
|
|
2793
2628
|
};
|
|
2794
2629
|
}
|
|
2795
2630
|
});
|
|
2796
|
-
|
|
2631
|
+
He.install = (e) => (e.component(He.name, He), e);
|
|
2797
2632
|
export {
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2633
|
+
He as GProTable,
|
|
2634
|
+
He as default,
|
|
2635
|
+
he as proTableProps,
|
|
2636
|
+
Ra as useTable
|
|
2802
2637
|
};
|