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