@aplus-frontend/ui 0.5.0-beta.0 → 0.5.0-beta.1
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.
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { VxeTableSlots } from 'vxe-table';
|
|
2
|
+
import { ApGridColumnType, ApGridExpose, ApGridProps } from './interface';
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
4
|
+
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApGridProps<RecordType> & Partial<{}>> & PublicProps;
|
|
6
|
+
expose(exposed: ShallowUnwrapRef<ApGridExpose>): void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: Readonly<VxeTableSlots<RecordType> & {
|
|
9
|
+
/**
|
|
10
|
+
* 自定义查询表单额外的区域
|
|
11
|
+
*/
|
|
12
|
+
searchFormExtra?: any;
|
|
13
|
+
/**
|
|
14
|
+
* 自定义表格上部查询表单下部分区域的渲染
|
|
15
|
+
*/
|
|
16
|
+
title?: (params: {
|
|
17
|
+
selectedRows: RecordType[];
|
|
18
|
+
selectedRowKeys: (string | number)[];
|
|
19
|
+
shownColumns: ApGridColumnType<RecordType>[];
|
|
20
|
+
clearAll: () => void;
|
|
21
|
+
}) => any;
|
|
22
|
+
}> & VxeTableSlots<RecordType> & {
|
|
23
|
+
/**
|
|
24
|
+
* 自定义查询表单额外的区域
|
|
25
|
+
*/
|
|
26
|
+
searchFormExtra?: any;
|
|
27
|
+
/**
|
|
28
|
+
* 自定义表格上部查询表单下部分区域的渲染
|
|
29
|
+
*/
|
|
30
|
+
title?: (params: {
|
|
31
|
+
selectedRows: RecordType[];
|
|
32
|
+
selectedRowKeys: (string | number)[];
|
|
33
|
+
shownColumns: ApGridColumnType<RecordType>[];
|
|
34
|
+
clearAll: () => void;
|
|
35
|
+
}) => any;
|
|
36
|
+
};
|
|
37
|
+
emit: {};
|
|
38
|
+
}>) => VNode & {
|
|
39
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
40
|
+
};
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_PrettifyLocal<T> = {
|
|
43
|
+
[K in keyof T]: T[K];
|
|
44
|
+
} & {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as ye, getCurrentInstance as Se, useSlots as we, ref as w, computed as
|
|
1
|
+
import { defineComponent as ye, getCurrentInstance as Se, useSlots as we, ref as w, computed as n, unref as a, watchEffect as ve, watch as $, createElementBlock as v, openBlock as s, normalizeClass as b, createCommentVNode as R, createElementVNode as H, normalizeStyle as U, createVNode as be, mergeProps as c, createSlots as q, withCtx as f, Fragment as M, renderList as P, createBlock as u, resolveDynamicComponent as E, renderSlot as N, normalizeProps as Re, guardReactiveProps as xe } from "vue";
|
|
2
2
|
import { VxeTable as Fe, VxeColumn as G } from "vxe-table";
|
|
3
3
|
import ke from "vxe-pc-ui";
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
4
|
+
import "vxe-table/lib/style.css";
|
|
5
|
+
import "vxe-pc-ui/lib/style.css";
|
|
6
6
|
import { isUndefined as x, omit as Be } from "lodash-unified";
|
|
7
7
|
import { ApForm as Ie } from "../ap-form/index.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
@@ -24,78 +24,44 @@ const ga = /* @__PURE__ */ ye({
|
|
|
24
24
|
__name: "index",
|
|
25
25
|
props: {
|
|
26
26
|
dropdownPrefixCls: {},
|
|
27
|
-
loading: {
|
|
28
|
-
|
|
29
|
-
default: void 0
|
|
30
|
-
},
|
|
31
|
-
bordered: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: !1
|
|
34
|
-
},
|
|
27
|
+
loading: { type: [Boolean, Object], default: void 0 },
|
|
28
|
+
bordered: { type: Boolean, default: !1 },
|
|
35
29
|
locale: {},
|
|
36
30
|
onChange: {},
|
|
37
31
|
onResizeColumn: {},
|
|
38
32
|
getPopupContainer: {},
|
|
39
33
|
scroll: {},
|
|
40
|
-
sortDirections: {
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
showSorterTooltip: {
|
|
44
|
-
type: [Boolean, Object],
|
|
45
|
-
default: !1
|
|
46
|
-
},
|
|
34
|
+
sortDirections: { default: () => ["ascend", "descend"] },
|
|
35
|
+
showSorterTooltip: { type: [Boolean, Object], default: !1 },
|
|
47
36
|
prefixCls: {},
|
|
48
37
|
tableLayout: {},
|
|
49
38
|
title: {},
|
|
50
39
|
id: {},
|
|
51
|
-
showHeader: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: !0
|
|
54
|
-
},
|
|
40
|
+
showHeader: { type: Boolean, default: !0 },
|
|
55
41
|
components: {},
|
|
56
42
|
customRow: {},
|
|
57
43
|
customHeaderRow: {},
|
|
58
44
|
direction: {},
|
|
59
|
-
expandFixed: {
|
|
60
|
-
type: [String, Boolean],
|
|
61
|
-
default: !1
|
|
62
|
-
},
|
|
45
|
+
expandFixed: { type: [String, Boolean], default: !1 },
|
|
63
46
|
expandColumnWidth: {},
|
|
64
47
|
expandedRowKeys: {},
|
|
65
48
|
defaultExpandedRowKeys: {},
|
|
66
49
|
expandedRowRender: {},
|
|
67
|
-
expandRowByClick: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: !1
|
|
70
|
-
},
|
|
50
|
+
expandRowByClick: { type: Boolean, default: !1 },
|
|
71
51
|
expandIcon: {},
|
|
72
52
|
onExpand: {},
|
|
73
53
|
onExpandedRowsChange: {},
|
|
74
|
-
defaultExpandAllRows: {
|
|
75
|
-
|
|
76
|
-
default: !1
|
|
77
|
-
},
|
|
78
|
-
indentSize: {
|
|
79
|
-
default: 15
|
|
80
|
-
},
|
|
54
|
+
defaultExpandAllRows: { type: Boolean, default: !1 },
|
|
55
|
+
indentSize: { default: 15 },
|
|
81
56
|
expandIconColumnIndex: {},
|
|
82
|
-
showExpandColumn: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: !0
|
|
85
|
-
},
|
|
57
|
+
showExpandColumn: { type: Boolean, default: !0 },
|
|
86
58
|
expandedRowClassName: {},
|
|
87
|
-
childrenColumnName: {
|
|
88
|
-
default: "children"
|
|
89
|
-
},
|
|
59
|
+
childrenColumnName: { default: "children" },
|
|
90
60
|
rowExpandable: {},
|
|
91
|
-
sticky: {
|
|
92
|
-
type: [Boolean, Object]
|
|
93
|
-
},
|
|
61
|
+
sticky: { type: [Boolean, Object] },
|
|
94
62
|
transformCellText: {},
|
|
95
63
|
rowClassName: {},
|
|
96
|
-
stripe: {
|
|
97
|
-
type: Boolean
|
|
98
|
-
},
|
|
64
|
+
stripe: { type: Boolean },
|
|
99
65
|
headerRowClassName: {},
|
|
100
66
|
footerRowClassName: {},
|
|
101
67
|
cellClassName: {},
|
|
@@ -114,76 +80,45 @@ const ga = /* @__PURE__ */ ye({
|
|
|
114
80
|
mergeFooterItems: {},
|
|
115
81
|
cellConfig: {},
|
|
116
82
|
columns: {},
|
|
117
|
-
rowSelection: {
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
card: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
default: !1
|
|
123
|
-
},
|
|
83
|
+
rowSelection: { type: Boolean },
|
|
84
|
+
card: { type: Boolean, default: !1 },
|
|
124
85
|
params: {},
|
|
125
86
|
request: {},
|
|
126
87
|
defaultData: {},
|
|
127
88
|
dataSource: {},
|
|
128
89
|
onLoadingChange: {},
|
|
129
|
-
searchForm: {
|
|
130
|
-
type: [Boolean, Object],
|
|
131
|
-
default: void 0
|
|
132
|
-
},
|
|
90
|
+
searchForm: { type: [Boolean, Object], default: void 0 },
|
|
133
91
|
beforeSearchSubmit: {},
|
|
134
|
-
pagination: {
|
|
135
|
-
type: [Boolean, Object],
|
|
136
|
-
default: void 0
|
|
137
|
-
},
|
|
92
|
+
pagination: { type: [Boolean, Object], default: void 0 },
|
|
138
93
|
searchFormWrapperStyle: {},
|
|
139
94
|
tableWrapperStyle: {},
|
|
140
|
-
manual: {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
default: "medium"
|
|
146
|
-
},
|
|
147
|
-
adaptive: {
|
|
148
|
-
type: Boolean,
|
|
149
|
-
default: !1
|
|
150
|
-
},
|
|
151
|
-
columnResizable: {
|
|
152
|
-
type: [Boolean, Object],
|
|
153
|
-
default: !1
|
|
154
|
-
},
|
|
155
|
-
rowKey: {
|
|
156
|
-
default: "key"
|
|
157
|
-
},
|
|
95
|
+
manual: { type: Boolean, default: !1 },
|
|
96
|
+
size: { default: "medium" },
|
|
97
|
+
adaptive: { type: Boolean, default: !1 },
|
|
98
|
+
columnResizable: { type: [Boolean, Object], default: !1 },
|
|
99
|
+
rowKey: { default: "key" },
|
|
158
100
|
footer: {},
|
|
159
|
-
virtual: {
|
|
160
|
-
type: [Boolean, Object],
|
|
161
|
-
default: void 0
|
|
162
|
-
},
|
|
101
|
+
virtual: { type: [Boolean, Object], default: void 0 },
|
|
163
102
|
expandable: {}
|
|
164
103
|
},
|
|
165
|
-
setup(Q, {
|
|
166
|
-
expose: Y
|
|
167
|
-
}) {
|
|
104
|
+
setup(Q, { expose: Y }) {
|
|
168
105
|
var W;
|
|
169
106
|
const m = (W = Se()) == null ? void 0 : W.appContext.app;
|
|
170
107
|
m && !m.__VXE_PC_UI_INSTALLED__ && (m.use(ke), m.__VXE_PC_UI_INSTALLED__ = !0);
|
|
171
|
-
const z = we(), o = Q, {
|
|
172
|
-
e: F,
|
|
173
|
-
b: g,
|
|
174
|
-
be: Z
|
|
175
|
-
} = Ue("ap-grid"), ee = qe("valueTypeMap"), d = w([]), T = w([]), h = w(), k = w(o.size), [, ae] = He(), {
|
|
176
|
-
renderConfig: oe,
|
|
177
|
-
updateSignal: te
|
|
178
|
-
} = $e(d);
|
|
108
|
+
const z = we(), o = Q, { e: F, b: g, be: Z } = Ue("ap-grid"), ee = qe("valueTypeMap"), d = w([]), T = w([]), h = w(), k = w(o.size), [, ae] = He(), { renderConfig: oe, updateSignal: te } = $e(d);
|
|
179
109
|
let V = 0;
|
|
180
|
-
const _ =
|
|
181
|
-
var e,
|
|
182
|
-
return V++, ((r = (
|
|
110
|
+
const _ = n(() => {
|
|
111
|
+
var e, l, r;
|
|
112
|
+
return V++, ((r = (l = (e = o.columns) == null ? void 0 : e.filter(
|
|
113
|
+
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !Pe.includes(t.valueType)
|
|
114
|
+
)) == null ? void 0 : l.sort((t, i) => {
|
|
183
115
|
let p = X(t.order);
|
|
184
116
|
return X(i.order) - p;
|
|
185
117
|
})) == null ? void 0 : r.map((t) => {
|
|
186
|
-
const i = Ee(
|
|
118
|
+
const i = Ee(
|
|
119
|
+
t,
|
|
120
|
+
Ne(t.fieldProps, {})
|
|
121
|
+
), p = {
|
|
187
122
|
...t,
|
|
188
123
|
fieldProps: {
|
|
189
124
|
label: t.title,
|
|
@@ -193,21 +128,24 @@ const ga = /* @__PURE__ */ ye({
|
|
|
193
128
|
},
|
|
194
129
|
renderNode: void 0
|
|
195
130
|
};
|
|
196
|
-
return p.renderNode = ze(
|
|
131
|
+
return p.renderNode = ze(
|
|
132
|
+
p,
|
|
133
|
+
a(ee)
|
|
134
|
+
), p;
|
|
197
135
|
})) || [];
|
|
198
|
-
}), re =
|
|
136
|
+
}), re = n(() => [g(), o.card ? null : g("wrapper")].filter(Boolean)), A = n(() => J(a(d), (e) => {
|
|
199
137
|
if (e.sorter === !0)
|
|
200
138
|
return e.key || e.dataIndex;
|
|
201
|
-
}).filter(Boolean)), O =
|
|
139
|
+
}).filter(Boolean)), O = n(() => J(a(d), (e) => {
|
|
202
140
|
if (e.filters && !e.onFilter)
|
|
203
141
|
return e.key || e.dataIndex;
|
|
204
142
|
}).filter(Boolean)), {
|
|
205
143
|
formRef: B,
|
|
206
144
|
submit: L,
|
|
207
145
|
reset: D,
|
|
208
|
-
refresh:
|
|
146
|
+
refresh: le,
|
|
209
147
|
data: C,
|
|
210
|
-
tableProps:
|
|
148
|
+
tableProps: ne,
|
|
211
149
|
setDataSource: se,
|
|
212
150
|
handleTableChange: de
|
|
213
151
|
} = Te({
|
|
@@ -220,10 +158,10 @@ const ga = /* @__PURE__ */ ye({
|
|
|
220
158
|
total: o.dataSource.length || 0
|
|
221
159
|
};
|
|
222
160
|
}
|
|
223
|
-
const
|
|
161
|
+
const l = await ((r = o.request) == null ? void 0 : r.call(o, e));
|
|
224
162
|
return {
|
|
225
|
-
data: (
|
|
226
|
-
total: (
|
|
163
|
+
data: (l == null ? void 0 : l.data) || [],
|
|
164
|
+
total: (l == null ? void 0 : l.total) || 0
|
|
227
165
|
};
|
|
228
166
|
},
|
|
229
167
|
namespace: "ap-grid",
|
|
@@ -234,53 +172,54 @@ const ga = /* @__PURE__ */ ye({
|
|
|
234
172
|
manual: o.manual,
|
|
235
173
|
formatParams: o.beforeSearchSubmit,
|
|
236
174
|
pagination: o.pagination
|
|
237
|
-
}), {
|
|
238
|
-
sortChangeEvent: ie,
|
|
239
|
-
filterChangeEvent: ue,
|
|
240
|
-
paginationChangeEvent: ce
|
|
241
|
-
} = _e(de);
|
|
175
|
+
}), { sortChangeEvent: ie, filterChangeEvent: ue, paginationChangeEvent: ce } = _e(de);
|
|
242
176
|
Ke({
|
|
243
|
-
columns:
|
|
244
|
-
columnsBackup:
|
|
245
|
-
size:
|
|
177
|
+
columns: n(() => d.value),
|
|
178
|
+
columnsBackup: n(() => T.value),
|
|
179
|
+
size: n(() => We[k.value]),
|
|
246
180
|
updateColumns(e) {
|
|
247
181
|
d.value = e;
|
|
248
182
|
},
|
|
249
183
|
updateSize(e) {
|
|
250
184
|
k.value = je[e];
|
|
251
185
|
},
|
|
252
|
-
renderConfig:
|
|
186
|
+
renderConfig: n(() => ({
|
|
253
187
|
className: Z("table-header", "title"),
|
|
254
188
|
color: ae.value.colorPrimary
|
|
255
189
|
}))
|
|
256
190
|
});
|
|
257
|
-
const K =
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
191
|
+
const K = n(
|
|
192
|
+
() => d.value.some(
|
|
193
|
+
(e) => e.fixed === "left" || e.fixed === !0
|
|
194
|
+
) ? "left" : void 0
|
|
195
|
+
), pe = n(
|
|
196
|
+
() => x(o.dataSource) ? C.records : o.dataSource
|
|
197
|
+
), { selectedRows: y, rowSelection: S, ...fe } = De({
|
|
262
198
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
263
199
|
dataSource: pe,
|
|
264
200
|
rowKey: o.rowKey
|
|
265
201
|
}), j = () => {
|
|
266
202
|
const e = h.value;
|
|
267
|
-
e && (y.value = [
|
|
203
|
+
e && (y.value = [
|
|
204
|
+
...e.getCheckboxReserveRecords(),
|
|
205
|
+
...e.getCheckboxRecords()
|
|
206
|
+
]);
|
|
268
207
|
}, me = () => {
|
|
269
208
|
const e = h.value;
|
|
270
209
|
e && (y.value = [e.getRadioRecord()]);
|
|
271
210
|
};
|
|
272
211
|
function ge() {
|
|
273
212
|
var e;
|
|
274
|
-
return ((e = o.columns) == null ? void 0 : e.filter((
|
|
213
|
+
return ((e = o.columns) == null ? void 0 : e.filter((l) => !l.hideInTable)) || [];
|
|
275
214
|
}
|
|
276
215
|
function he(e) {
|
|
277
|
-
var
|
|
278
|
-
(t = (r = (
|
|
216
|
+
var l, r, t;
|
|
217
|
+
(t = (r = (l = B.value) == null ? void 0 : l.apForm) == null ? void 0 : r.setFieldsValue) == null || t.call(r, e);
|
|
279
218
|
}
|
|
280
219
|
function Ce(e = !1) {
|
|
281
220
|
var r, t, i;
|
|
282
|
-
const
|
|
283
|
-
return (i = (t = (r = B.value) == null ? void 0 : r.apForm) == null ? void 0 : t[
|
|
221
|
+
const l = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
222
|
+
return (i = (t = (r = B.value) == null ? void 0 : r.apForm) == null ? void 0 : t[l]) == null ? void 0 : i.call(t, !0);
|
|
284
223
|
}
|
|
285
224
|
function I() {
|
|
286
225
|
fe.clearAll();
|
|
@@ -290,108 +229,126 @@ const ga = /* @__PURE__ */ ye({
|
|
|
290
229
|
return ve(() => {
|
|
291
230
|
const e = ge();
|
|
292
231
|
d.value = e, T.value = e;
|
|
293
|
-
}), $(
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
232
|
+
}), $(
|
|
233
|
+
() => o.dataSource,
|
|
234
|
+
(e) => {
|
|
235
|
+
se(e);
|
|
236
|
+
},
|
|
237
|
+
{ immediate: !0 }
|
|
238
|
+
), $(
|
|
239
|
+
() => a(C).loading,
|
|
240
|
+
(e) => {
|
|
241
|
+
var l;
|
|
242
|
+
(l = o.onLoadingChange) == null || l.call(o, e);
|
|
243
|
+
}
|
|
244
|
+
), Y({
|
|
301
245
|
submit: L,
|
|
302
246
|
reset: D,
|
|
303
|
-
refresh:
|
|
247
|
+
refresh: le,
|
|
304
248
|
setSearchFormValues: he,
|
|
305
249
|
getSearchFormValues: Ce,
|
|
306
250
|
getShowColumns: () => a(d),
|
|
307
251
|
rowSelection: {
|
|
308
|
-
selectedRows:
|
|
252
|
+
selectedRows: n(() => y.value),
|
|
309
253
|
clearAll: I
|
|
310
254
|
}
|
|
311
|
-
}), (e,
|
|
255
|
+
}), (e, l) => (s(), v("div", {
|
|
312
256
|
class: b(re.value)
|
|
313
|
-
}, [
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
257
|
+
}, [
|
|
258
|
+
a(x)(e.dataSource) && e.searchForm !== !1 && _.value.length > 0 ? (s(), v("div", {
|
|
259
|
+
key: 0,
|
|
260
|
+
class: b(e.card ? a(F)("search-wrapper") : null),
|
|
261
|
+
style: U(e.searchFormWrapperStyle)
|
|
262
|
+
}, [
|
|
263
|
+
be(a(Ie).SearchForm, c(e.searchForm || {}, {
|
|
264
|
+
ref_key: "formRef",
|
|
265
|
+
ref: B,
|
|
266
|
+
"custom-reset": "",
|
|
267
|
+
"submit-loading": !1,
|
|
268
|
+
onSubmit: a(L),
|
|
269
|
+
onReset: a(D)
|
|
270
|
+
}), q({
|
|
271
|
+
default: f(() => [
|
|
272
|
+
(s(!0), v(M, null, P(_.value, (r) => (s(), u(E(r.renderNode.Comp), c({
|
|
273
|
+
key: r.dataIndex,
|
|
274
|
+
item: r,
|
|
275
|
+
ref_for: !0
|
|
276
|
+
}, r.fieldProps || {}, {
|
|
277
|
+
span: r.span,
|
|
278
|
+
"custom-render": r.renderNode.render
|
|
279
|
+
}), null, 16, ["item", "span", "custom-render"]))), 128))
|
|
280
|
+
]),
|
|
281
|
+
_: 2
|
|
282
|
+
}, [
|
|
283
|
+
z.searchFormExtra ? {
|
|
284
|
+
name: "extra",
|
|
285
|
+
fn: f(() => [
|
|
286
|
+
N(e.$slots, "searchFormExtra")
|
|
287
|
+
]),
|
|
288
|
+
key: "0"
|
|
289
|
+
} : void 0
|
|
290
|
+
]), 1040, ["onSubmit", "onReset"])
|
|
291
|
+
], 6)) : R("", !0),
|
|
292
|
+
H("div", {
|
|
293
|
+
class: b([a(F)("table-wrapper"), e.card ? a(F)("table-wrapper-card") : null]),
|
|
294
|
+
style: U(e.tableWrapperStyle)
|
|
295
|
+
}, [
|
|
296
|
+
H("div", {
|
|
297
|
+
class: b(a(g)("header-wrapper"))
|
|
298
|
+
}, [
|
|
299
|
+
N(e.$slots, "title", {
|
|
300
|
+
selectedRows: a(y),
|
|
301
|
+
selectedRowKeys: a(S).selectedRowKeys,
|
|
302
|
+
shownColumns: d.value,
|
|
303
|
+
clearAll: I
|
|
304
|
+
})
|
|
305
|
+
], 2),
|
|
306
|
+
(s(), u(a(Fe), c(a(Ae)(o), {
|
|
307
|
+
ref_key: "tableRef",
|
|
308
|
+
ref: h,
|
|
309
|
+
key: a(te),
|
|
310
|
+
data: a(C).records,
|
|
311
|
+
"sort-config": { remote: A.value.length > 0 },
|
|
312
|
+
"filter-config": { remote: O.value.length > 0 },
|
|
313
|
+
loading: a(C).loading,
|
|
314
|
+
"row-config": {
|
|
315
|
+
isHover: !0,
|
|
316
|
+
keyField: o.rowKey
|
|
317
|
+
},
|
|
318
|
+
size: k.value,
|
|
319
|
+
onSortChange: a(ie),
|
|
320
|
+
onFilterChange: a(ue),
|
|
321
|
+
onCheckboxChange: j,
|
|
322
|
+
onCheckboxAll: j,
|
|
323
|
+
onRadioChange: me
|
|
324
|
+
}), q({
|
|
325
|
+
default: f(() => [
|
|
326
|
+
o.expandable ? (s(), u(a(G), c({ key: 0 }, a(Oe)(e.expandable), { fixed: K.value }), {
|
|
327
|
+
content: f((r) => [
|
|
328
|
+
(s(), u(E(o.expandable.renderContent(r))))
|
|
329
|
+
]),
|
|
330
|
+
_: 1
|
|
331
|
+
}, 16, ["fixed"])) : R("", !0),
|
|
332
|
+
o.rowSelection ? (s(), u(a(G), c({ key: 1 }, a(Le)(a(S)), { fixed: K.value }), null, 16, ["fixed"])) : R("", !0),
|
|
333
|
+
(s(!0), v(M, null, P(a(oe), (r) => (s(), u(E(r), {
|
|
334
|
+
key: r.props.colId
|
|
335
|
+
}))), 128))
|
|
336
|
+
]),
|
|
337
|
+
_: 2
|
|
338
|
+
}, [
|
|
339
|
+
P(a(Be)(z, ["searchFormExtra"]), (r, t) => ({
|
|
340
|
+
name: t,
|
|
341
|
+
fn: f((i) => [
|
|
342
|
+
N(e.$slots, t, Re(xe(i || {})))
|
|
343
|
+
])
|
|
344
|
+
}))
|
|
345
|
+
]), 1040, ["data", "sort-config", "filter-config", "loading", "row-config", "size", "onSortChange", "onFilterChange"])),
|
|
346
|
+
e.pagination !== !1 ? (s(), u(a(Ve), c({
|
|
347
|
+
key: 0,
|
|
348
|
+
class: a(g)("pagination")
|
|
349
|
+
}, a(ne).pagination, { onChange: a(ce) }), null, 16, ["class", "onChange"])) : R("", !0)
|
|
350
|
+
], 6)
|
|
351
|
+
], 2));
|
|
395
352
|
}
|
|
396
353
|
});
|
|
397
354
|
export {
|
|
@@ -4,7 +4,7 @@ import { Recordable } from '../type';
|
|
|
4
4
|
import { TableProps } from '@aplus-frontend/antdv';
|
|
5
5
|
import { ColumnFilterItem, SortOrder, TableRowSelection } from '@aplus-frontend/antdv/es/table/interface';
|
|
6
6
|
import { ComputedRef, CSSProperties, Ref, VNode } from 'vue';
|
|
7
|
-
import { VxeTablePropTypes,
|
|
7
|
+
import { VxeTablePropTypes, VxeColumnPropTypes, VxeTableProps, VxeTableDefines, VxeColumnSlots } from 'vxe-table';
|
|
8
8
|
export type ColConfigType = VxeTableDefines.ColumnOptions;
|
|
9
9
|
export type ApGridColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? Omit<ExtraProColumnType<RecordType>, 'sorter' | 'rowSpan' | 'customCell' | 'customHeaderCell' | 'minWidth'> & {
|
|
10
10
|
children?: ApGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>[];
|
|
@@ -221,21 +221,6 @@ export type ApGridVirtualConfig = {
|
|
|
221
221
|
export type ApGridColumnProps<RecordType> = {
|
|
222
222
|
column: ApGridColumnType<RecordType>;
|
|
223
223
|
};
|
|
224
|
-
export type ApGridSlots<RecordType> = VxeTableSlots<RecordType> & {
|
|
225
|
-
/**
|
|
226
|
-
* 自定义查询表单额外的区域
|
|
227
|
-
*/
|
|
228
|
-
searchFormExtra?: any;
|
|
229
|
-
/**
|
|
230
|
-
* 自定义表格上部查询表单下部分区域的渲染
|
|
231
|
-
*/
|
|
232
|
-
title?: (params: {
|
|
233
|
-
selectedRows: RecordType[];
|
|
234
|
-
selectedRowKeys: (string | number)[];
|
|
235
|
-
shownColumns: ApGridColumnType<RecordType>[];
|
|
236
|
-
clearAll: () => void;
|
|
237
|
-
}) => any;
|
|
238
|
-
};
|
|
239
224
|
export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
240
225
|
/**
|
|
241
226
|
* 表格查询提交(重制页码但查询参数不会重置)
|
|
@@ -263,7 +248,7 @@ export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
263
248
|
* @param transform 是否获取转换后的数据 默认为`false`
|
|
264
249
|
* @returns
|
|
265
250
|
*/
|
|
266
|
-
getSearchFormValues: (transform?: boolean) => Partial<SearchParamsType> & Recordable<any
|
|
251
|
+
getSearchFormValues: (transform?: boolean) => (Partial<SearchParamsType> & Recordable<any>) | undefined;
|
|
267
252
|
/**
|
|
268
253
|
* 获取最终现实的列配置
|
|
269
254
|
* @returns
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { VxeTableSlots } from 'vxe-table';
|
|
2
|
+
import { ApGridColumnType, ApGridExpose, ApGridProps } from './interface';
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
4
|
+
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApGridProps<RecordType> & Partial<{}>> & PublicProps;
|
|
6
|
+
expose(exposed: ShallowUnwrapRef<ApGridExpose>): void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: Readonly<VxeTableSlots<RecordType> & {
|
|
9
|
+
/**
|
|
10
|
+
* 自定义查询表单额外的区域
|
|
11
|
+
*/
|
|
12
|
+
searchFormExtra?: any;
|
|
13
|
+
/**
|
|
14
|
+
* 自定义表格上部查询表单下部分区域的渲染
|
|
15
|
+
*/
|
|
16
|
+
title?: (params: {
|
|
17
|
+
selectedRows: RecordType[];
|
|
18
|
+
selectedRowKeys: (string | number)[];
|
|
19
|
+
shownColumns: ApGridColumnType<RecordType>[];
|
|
20
|
+
clearAll: () => void;
|
|
21
|
+
}) => any;
|
|
22
|
+
}> & VxeTableSlots<RecordType> & {
|
|
23
|
+
/**
|
|
24
|
+
* 自定义查询表单额外的区域
|
|
25
|
+
*/
|
|
26
|
+
searchFormExtra?: any;
|
|
27
|
+
/**
|
|
28
|
+
* 自定义表格上部查询表单下部分区域的渲染
|
|
29
|
+
*/
|
|
30
|
+
title?: (params: {
|
|
31
|
+
selectedRows: RecordType[];
|
|
32
|
+
selectedRowKeys: (string | number)[];
|
|
33
|
+
shownColumns: ApGridColumnType<RecordType>[];
|
|
34
|
+
clearAll: () => void;
|
|
35
|
+
}) => any;
|
|
36
|
+
};
|
|
37
|
+
emit: {};
|
|
38
|
+
}>) => VNode & {
|
|
39
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
40
|
+
};
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_PrettifyLocal<T> = {
|
|
43
|
+
[K in keyof T]: T[K];
|
|
44
|
+
} & {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("vxe-table"),re=require("vxe-pc-ui");require("vxe-table/lib/style.css");require("vxe-pc-ui/lib/style.css");const c=require("lodash-unified"),ae=require("../ap-form/index.js");require("../config-provider/index.js");const te=require("../ap-table/constants.js"),u=require("../ap-table/utils.js"),ne=require("../ap-table/hooks/use-table-paging-ng.js"),le=require("@aplus-frontend/antdv"),se=require("./hooks/use-inner-params.js"),b=require("./utils/table.js"),ue=require("../ap-table/hooks/use-table-row-selection.js"),de=require("../ap-table/context.js"),V=require("./constants.js"),ce=require("./hooks/use-render-columns.js"),ie=require("@aplus-frontend/antdv/es/theme/internal"),fe=require("../config-provider/hooks/use-namespace.js"),pe=require("../config-provider/hooks/use-global-config.js"),me=e.defineComponent({name:"ApGrid",__name:"index",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},tableLayout:{},title:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},rowClassName:{},stripe:{type:Boolean},headerRowClassName:{},footerRowClassName:{},cellClassName:{},headerCellClassName:{},footerCellClassName:{},rowStyle:{},headerRowStyle:{},footerRowStyle:{},cellStyle:{},headerCellStyle:{},footerCellStyle:{},height:{},minHeight:{},maxHeight:{},mergeCells:{},mergeFooterItems:{},cellConfig:{},columns:{},rowSelection:{type:Boolean},card:{type:Boolean,default:!1},params:{},request:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"medium"},adaptive:{type:Boolean,default:!1},columnResizable:{type:[Boolean,Object],default:!1},rowKey:{default:"key"},footer:{},virtual:{type:[Boolean,Object],default:void 0},expandable:{}},setup(T,{expose:_}){var z;const i=(z=e.getCurrentInstance())==null?void 0:z.appContext.app;i&&!i.__VXE_PC_UI_INSTALLED__&&(i.use(re),i.__VXE_PC_UI_INSTALLED__=!0);const x=e.useSlots(),r=T,{e:h,b:f,be:A}=fe.useNamespace("ap-grid"),O=pe.useGlobalConfig("valueTypeMap"),l=e.ref([]),k=e.ref([]),p=e.ref(),S=e.ref(r.size),[,L]=ie.useToken(),{renderConfig:D,updateSignal:K}=ce.useRenderColumns(l);let R=0;const B=e.computed(()=>{var o,n,t;return R++,((t=(n=(o=r.columns)==null?void 0:o.filter(a=>!a.hideInSearch&&a.dataIndex&&(a.valueType||a.customRenderFormItem)&&!te.noRenderAsFormItemValueList.includes(a.valueType)))==null?void 0:n.sort((a,s)=>{let d=u.getColumnOrder(a.order);return u.getColumnOrder(s.order)-d}))==null?void 0:t.map(a=>{const s=u.updateFormProps(a,u.getFieldProps(a.fieldProps,{})),d={...a,fieldProps:{label:a.title,name:a.dataIndex,...s||{},_signal:R},renderNode:void 0};return d.renderNode=u.getSearchFormItemRenderNode(d,e.unref(O)),d}))||[]}),j=e.computed(()=>[f(),r.card?null:f("wrapper")].filter(Boolean)),F=e.computed(()=>u.recursionApColumns(e.unref(l),o=>{if(o.sorter===!0)return o.key||o.dataIndex}).filter(Boolean)),P=e.computed(()=>u.recursionApColumns(e.unref(l),o=>{if(o.filters&&!o.onFilter)return o.key||o.dataIndex}).filter(Boolean)),{formRef:y,submit:N,reset:E,refresh:U,data:m,tableProps:$,setDataSource:W,handleTableChange:H}=ne.useTablePaging({async request(o){var t;if(!C.value.preserveSelectedRowKeys&&c.isUndefined(r.dataSource)&&v(),!c.isUndefined(r.dataSource)){const a=o.pageSize*(o.current-1);return{data:(r.pagination===!1?r.dataSource:r.dataSource.slice(a,a+o.pageSize))||[],total:r.dataSource.length||0}}const n=await((t=r.request)==null?void 0:t.call(r,o));return{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},namespace:"ap-grid",filterFields:P,sortFields:F,defaultParams:r.params,defaultData:r.defaultData,manual:r.manual,formatParams:r.beforeSearchSubmit,pagination:r.pagination}),{sortChangeEvent:M,filterChangeEvent:G,paginationChangeEvent:X}=se.useInnerParams(H);de.useProvideApTable({columns:e.computed(()=>l.value),columnsBackup:e.computed(()=>k.value),size:e.computed(()=>V.sizeMap[S.value]),updateColumns(o){l.value=o},updateSize(o){S.value=V.sizeReverseMap[o]},renderConfig:e.computed(()=>({className:A("table-header","title"),color:L.value.colorPrimary}))});const I=e.computed(()=>l.value.some(o=>o.fixed==="left"||o.fixed===!0)?"left":void 0),J=e.computed(()=>c.isUndefined(r.dataSource)?m.records:r.dataSource),{selectedRows:g,rowSelection:C,...Q}=ue.default({...r.rowSelection===!0?{}:r.rowSelection,dataSource:J,rowKey:r.rowKey}),q=()=>{const o=p.value;o&&(g.value=[...o.getCheckboxReserveRecords(),...o.getCheckboxRecords()])},Y=()=>{const o=p.value;o&&(g.value=[o.getRadioRecord()])};function Z(){var o;return((o=r.columns)==null?void 0:o.filter(n=>!n.hideInTable))||[]}function ee(o){var n,t,a;(a=(t=(n=y.value)==null?void 0:n.apForm)==null?void 0:t.setFieldsValue)==null||a.call(t,o)}function oe(o=!1){var t,a,s;const n=o?"getFieldsValueTransformed":"getFieldsValue";return(s=(a=(t=y.value)==null?void 0:t.apForm)==null?void 0:a[n])==null?void 0:s.call(a,!0)}function v(){Q.clearAll();const o=p.value;o&&(C.value.type==="radio"?(o.clearRadioRow(),o.clearRadioReserve()):(o.clearCheckboxRow(),o.clearCheckboxReserve()))}return e.watchEffect(()=>{const o=Z();l.value=o,k.value=o}),e.watch(()=>r.dataSource,o=>{W(o)},{immediate:!0}),e.watch(()=>e.unref(m).loading,o=>{var n;(n=r.onLoadingChange)==null||n.call(r,o)}),_({submit:N,reset:E,refresh:U,setSearchFormValues:ee,getSearchFormValues:oe,getShowColumns:()=>e.unref(l),rowSelection:{selectedRows:e.computed(()=>g.value),clearAll:v}}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(j.value)},[e.unref(c.isUndefined)(o.dataSource)&&o.searchForm!==!1&&B.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.card?e.unref(h)("search-wrapper"):null),style:e.normalizeStyle(o.searchFormWrapperStyle)},[e.createVNode(e.unref(ae.ApForm).SearchForm,e.mergeProps(o.searchForm||{},{ref_key:"formRef",ref:y,"custom-reset":"","submit-loading":!1,onSubmit:e.unref(N),onReset:e.unref(E)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,t=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.renderNode.Comp),e.mergeProps({key:t.dataIndex,item:t,ref_for:!0},t.fieldProps||{},{span:t.span,"custom-render":t.renderNode.render}),null,16,["item","span","custom-render"]))),128))]),_:2},[x.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(h)("table-wrapper"),o.card?e.unref(h)("table-wrapper-card"):null]),style:e.normalizeStyle(o.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(f)("header-wrapper"))},[e.renderSlot(o.$slots,"title",{selectedRows:e.unref(g),selectedRowKeys:e.unref(C).selectedRowKeys,shownColumns:l.value,clearAll:v})],2),(e.openBlock(),e.createBlock(e.unref(w.VxeTable),e.mergeProps(e.unref(b.toVxeProps)(r),{ref_key:"tableRef",ref:p,key:e.unref(K),data:e.unref(m).records,"sort-config":{remote:F.value.length>0},"filter-config":{remote:P.value.length>0},loading:e.unref(m).loading,"row-config":{isHover:!0,keyField:r.rowKey},size:S.value,onSortChange:e.unref(M),onFilterChange:e.unref(G),onCheckboxChange:q,onCheckboxAll:q,onRadioChange:Y}),e.createSlots({default:e.withCtx(()=>[r.expandable?(e.openBlock(),e.createBlock(e.unref(w.VxeColumn),e.mergeProps({key:0},e.unref(b.getRowExpandProps)(o.expandable),{fixed:I.value}),{content:e.withCtx(t=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.expandable.renderContent(t))))]),_:1},16,["fixed"])):e.createCommentVNode("",!0),r.rowSelection?(e.openBlock(),e.createBlock(e.unref(w.VxeColumn),e.mergeProps({key:1},e.unref(b.getRowSelectionProps)(e.unref(C)),{fixed:I.value}),null,16,["fixed"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(D),t=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{key:t.props.colId}))),128))]),_:2},[e.renderList(e.unref(c.omit)(x,["searchFormExtra"]),(t,a)=>({name:a,fn:e.withCtx(s=>[e.renderSlot(o.$slots,a,e.normalizeProps(e.guardReactiveProps(s||{})))])}))]),1040,["data","sort-config","filter-config","loading","row-config","size","onSortChange","onFilterChange"])),o.pagination!==!1?(e.openBlock(),e.createBlock(e.unref(le.Pagination),e.mergeProps({key:0,class:e.unref(f)("pagination")},e.unref($).pagination,{onChange:e.unref(X)}),null,16,["class","onChange"])):e.createCommentVNode("",!0)],6)],2))}});exports.default=me;
|
|
@@ -4,7 +4,7 @@ import { Recordable } from '../type';
|
|
|
4
4
|
import { TableProps } from '@aplus-frontend/antdv';
|
|
5
5
|
import { ColumnFilterItem, SortOrder, TableRowSelection } from '@aplus-frontend/antdv/es/table/interface';
|
|
6
6
|
import { ComputedRef, CSSProperties, Ref, VNode } from 'vue';
|
|
7
|
-
import { VxeTablePropTypes,
|
|
7
|
+
import { VxeTablePropTypes, VxeColumnPropTypes, VxeTableProps, VxeTableDefines, VxeColumnSlots } from 'vxe-table';
|
|
8
8
|
export type ColConfigType = VxeTableDefines.ColumnOptions;
|
|
9
9
|
export type ApGridColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? Omit<ExtraProColumnType<RecordType>, 'sorter' | 'rowSpan' | 'customCell' | 'customHeaderCell' | 'minWidth'> & {
|
|
10
10
|
children?: ApGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>[];
|
|
@@ -221,21 +221,6 @@ export type ApGridVirtualConfig = {
|
|
|
221
221
|
export type ApGridColumnProps<RecordType> = {
|
|
222
222
|
column: ApGridColumnType<RecordType>;
|
|
223
223
|
};
|
|
224
|
-
export type ApGridSlots<RecordType> = VxeTableSlots<RecordType> & {
|
|
225
|
-
/**
|
|
226
|
-
* 自定义查询表单额外的区域
|
|
227
|
-
*/
|
|
228
|
-
searchFormExtra?: any;
|
|
229
|
-
/**
|
|
230
|
-
* 自定义表格上部查询表单下部分区域的渲染
|
|
231
|
-
*/
|
|
232
|
-
title?: (params: {
|
|
233
|
-
selectedRows: RecordType[];
|
|
234
|
-
selectedRowKeys: (string | number)[];
|
|
235
|
-
shownColumns: ApGridColumnType<RecordType>[];
|
|
236
|
-
clearAll: () => void;
|
|
237
|
-
}) => any;
|
|
238
|
-
};
|
|
239
224
|
export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
240
225
|
/**
|
|
241
226
|
* 表格查询提交(重制页码但查询参数不会重置)
|
|
@@ -263,7 +248,7 @@ export type ApGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
263
248
|
* @param transform 是否获取转换后的数据 默认为`false`
|
|
264
249
|
* @returns
|
|
265
250
|
*/
|
|
266
|
-
getSearchFormValues: (transform?: boolean) => Partial<SearchParamsType> & Recordable<any
|
|
251
|
+
getSearchFormValues: (transform?: boolean) => (Partial<SearchParamsType> & Recordable<any>) | undefined;
|
|
267
252
|
/**
|
|
268
253
|
* 获取最终现实的列配置
|
|
269
254
|
* @returns
|