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