@aplus-frontend/ui 6.28.1 → 6.28.3
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/es/src/ag-grid/hooks/use-columns-def.mjs +72 -64
- package/es/src/ag-grid/index.vue.mjs +254 -244
- package/es/src/ag-grid/renderer/select.d.ts +4 -1
- package/es/src/ag-grid/renderer/select.mjs +11 -7
- package/es/src/ap-field/tree-select/index.vue.d.ts +20 -0
- package/es/src/ap-field/tree-select/index.vue.mjs +15 -14
- package/es/src/ap-field/tree-select/read.vue2.mjs +1 -0
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +22 -0
- package/es/src/ap-table/constants.d.ts +11 -0
- package/es/src/ap-table/utils.mjs +51 -42
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/renderer/select.d.ts +4 -1
- package/lib/src/ag-grid/renderer/select.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.d.ts +20 -0
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +22 -0
- package/lib/src/ap-table/constants.d.ts +11 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/theme/ag-grid/index.css +10 -6
- package/theme/ag-grid/index.less +9 -6
- package/theme/ap-form/ap-form-item.css +3 -0
- package/theme/ap-form/ap-form-item.less +3 -0
- package/theme/ap-form/index.css +3 -0
- package/theme/ap-form/search-form.css +3 -0
- package/theme/ap-grid/index.css +3 -0
- package/theme/ap-table/ap-table.css +3 -0
- package/theme/ap-table-modal/index.css +3 -0
- package/theme/editable-table/index.css +3 -0
- package/theme/index.css +10 -6
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { AgGridVue as
|
|
3
|
-
import { ModuleRegistry as
|
|
4
|
-
import { Spin as
|
|
5
|
-
import { isUndefined as
|
|
1
|
+
import { defineComponent as qe, useSlots as Je, ref as F, toRef as k, unref as t, computed as l, nextTick as Qe, watch as z, createElementBlock as E, openBlock as C, normalizeStyle as V, normalizeClass as m, createCommentVNode as ee, createElementVNode as R, createVNode as A, mergeProps as N, createSlots as Xe, withCtx as oe, Fragment as Ye, renderList as Ze, createBlock as te, resolveDynamicComponent as _e, renderSlot as re, withDirectives as eo, vShow as oo } from "vue";
|
|
2
|
+
import { AgGridVue as to } from "ag-grid-vue3";
|
|
3
|
+
import { ModuleRegistry as ro, AllCommunityModule as no } from "ag-grid-community";
|
|
4
|
+
import { Spin as ao, Pagination as lo } from "@aplus-frontend/antdv";
|
|
5
|
+
import { isUndefined as b, isFunction as so } from "lodash-unified";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { ApForm as
|
|
8
|
-
import { recursionApColumns as
|
|
9
|
-
import { useTablePaging as
|
|
10
|
-
import
|
|
11
|
-
import { useProvideSorter as
|
|
12
|
-
import { useProvideApTable as
|
|
13
|
-
import { sizeReverseMap as
|
|
14
|
-
import { useToken as
|
|
15
|
-
import { useTheme as
|
|
16
|
-
import { useColumns as
|
|
17
|
-
import { useColumnsDef as
|
|
18
|
-
import { isDef as
|
|
19
|
-
import { getValidVNodeList as
|
|
20
|
-
import { useSearchForm as
|
|
7
|
+
import { ApForm as io } from "../ap-form/index.mjs";
|
|
8
|
+
import { recursionApColumns as co } from "../ap-table/utils.mjs";
|
|
9
|
+
import { useTablePaging as uo } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
10
|
+
import mo from "./hooks/use-row-selection.mjs";
|
|
11
|
+
import { useProvideSorter as po } from "./context.mjs";
|
|
12
|
+
import { useProvideApTable as fo } from "../ap-table/context.mjs";
|
|
13
|
+
import { sizeReverseMap as go, sizeMap as So } from "../ap-grid/constants.mjs";
|
|
14
|
+
import { useToken as wo } from "@aplus-frontend/antdv/es/theme/internal";
|
|
15
|
+
import { useTheme as yo } from "./theme.mjs";
|
|
16
|
+
import { useColumns as ho } from "./hooks/use-columns.mjs";
|
|
17
|
+
import { useColumnsDef as vo } from "./hooks/use-columns-def.mjs";
|
|
18
|
+
import { isDef as Co } from "../utils/index.mjs";
|
|
19
|
+
import { getValidVNodeList as Ro } from "../utils/slot.mjs";
|
|
20
|
+
import { useSearchForm as bo } from "./hooks/use-search-form.mjs";
|
|
21
21
|
import "./components/empty/index.vue.mjs";
|
|
22
|
-
import
|
|
23
|
-
import { usePinnedRow as
|
|
24
|
-
import
|
|
25
|
-
import { useNamespace as
|
|
26
|
-
import
|
|
27
|
-
const
|
|
22
|
+
import Bo from "./hooks/use-virtual-config.mjs";
|
|
23
|
+
import { usePinnedRow as Fo } from "./hooks/use-pinned-row.mjs";
|
|
24
|
+
import ko from "./hooks/use-selection-col-def.mjs";
|
|
25
|
+
import { useNamespace as xo } from "../config-provider/hooks/use-namespace.mjs";
|
|
26
|
+
import Io from "./components/empty/index.vue2.mjs";
|
|
27
|
+
const ot = /* @__PURE__ */ qe({
|
|
28
28
|
name: "AgGrid",
|
|
29
29
|
__name: "index",
|
|
30
30
|
props: {
|
|
@@ -93,69 +93,69 @@ const Jo = /* @__PURE__ */ We({
|
|
|
93
93
|
onRowClicked: {},
|
|
94
94
|
onScrollEnd: {}
|
|
95
95
|
},
|
|
96
|
-
setup(
|
|
97
|
-
|
|
98
|
-
const o =
|
|
99
|
-
function
|
|
100
|
-
return e.reduce((r,
|
|
96
|
+
setup(ne, { expose: ae }) {
|
|
97
|
+
ro.registerModules([no]);
|
|
98
|
+
const o = ne, M = Je();
|
|
99
|
+
function le(...e) {
|
|
100
|
+
return e.reduce((r, n) => ({ ...r, ...n }), {});
|
|
101
101
|
}
|
|
102
|
-
const { e:
|
|
103
|
-
|
|
104
|
-
), d =
|
|
105
|
-
let
|
|
106
|
-
const
|
|
107
|
-
|
|
102
|
+
const { e: B, b: c, be: se } = xo("ag-grid"), y = F(o.size), ie = yo(y, k(o, "rowHeight")), ce = Bo(k(o, "virtual")), { rowPinnedGridConfig: de, getRowPinnedCellClass: ue } = Fo(
|
|
103
|
+
k(o, "summary")
|
|
104
|
+
), d = F(), [, me] = wo();
|
|
105
|
+
let p = !!o.dataSource;
|
|
106
|
+
const O = bo(o), { shownColumns: f, columns: W, columnKeys: pe } = ho(o), { defaultColDef: fe, columnDefs: ge } = vo(
|
|
107
|
+
W,
|
|
108
108
|
o,
|
|
109
|
-
|
|
110
|
-
),
|
|
111
|
-
|
|
112
|
-
sorter:
|
|
109
|
+
ue
|
|
110
|
+
), x = F({});
|
|
111
|
+
po({
|
|
112
|
+
sorter: x,
|
|
113
113
|
setSorter(e) {
|
|
114
|
-
|
|
114
|
+
x.value = e;
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
|
-
const
|
|
117
|
+
const Se = {
|
|
118
118
|
asc: "ascend",
|
|
119
119
|
desc: "descend"
|
|
120
120
|
};
|
|
121
|
-
function
|
|
122
|
-
const e = d.value.getColumns()?.filter((s) => s.getSort() !== void 0), r = t(
|
|
123
|
-
let
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
121
|
+
function we() {
|
|
122
|
+
const e = d.value.getColumns()?.filter((s) => s.getSort() !== void 0), r = t(x) || {};
|
|
123
|
+
let n = e?.[0];
|
|
124
|
+
const u = Object.keys(r);
|
|
125
|
+
if (u.length && u.every((s) => r[s] === null)) {
|
|
126
126
|
const s = Object.keys(r)[0];
|
|
127
|
-
s && (
|
|
127
|
+
s && (n = d.value?.getColumn(s));
|
|
128
128
|
}
|
|
129
|
-
if (!
|
|
129
|
+
if (!n)
|
|
130
130
|
return;
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
column:
|
|
134
|
-
field:
|
|
135
|
-
order:
|
|
131
|
+
const i = n.getColDef(), w = n.getSort();
|
|
132
|
+
L(void 0, void 0, {
|
|
133
|
+
column: i,
|
|
134
|
+
field: i.field,
|
|
135
|
+
order: w ? Se[w] : null
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const ye = l(() => co(t(f), (e) => {
|
|
139
139
|
if (e.sorter === !0)
|
|
140
140
|
return e.key || e.dataIndex;
|
|
141
|
-
}).filter(Boolean)),
|
|
142
|
-
formRef:
|
|
143
|
-
submit:
|
|
144
|
-
reset:
|
|
141
|
+
}).filter(Boolean)), he = l(() => Co(o.manual) ? o.manual : Ro(M.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
|
|
142
|
+
formRef: g,
|
|
143
|
+
submit: I,
|
|
144
|
+
reset: T,
|
|
145
145
|
data: S,
|
|
146
|
-
tableProps:
|
|
147
|
-
handleTableChangeOptional:
|
|
148
|
-
submitWith:
|
|
149
|
-
refresh:
|
|
150
|
-
getPaging:
|
|
151
|
-
setPaging:
|
|
152
|
-
setDataSource:
|
|
153
|
-
} =
|
|
146
|
+
tableProps: j,
|
|
147
|
+
handleTableChangeOptional: L,
|
|
148
|
+
submitWith: G,
|
|
149
|
+
refresh: H,
|
|
150
|
+
getPaging: ve,
|
|
151
|
+
setPaging: Ce,
|
|
152
|
+
setDataSource: Re
|
|
153
|
+
} = uo({
|
|
154
154
|
async request(e) {
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
155
|
+
if (p = !1, !Fe.value && b(o.dataSource) && P(), !b(o.dataSource)) {
|
|
156
|
+
const n = e.pageSize * (e.current - 1);
|
|
157
157
|
return {
|
|
158
|
-
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(
|
|
158
|
+
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(n, n + e.pageSize)) || [],
|
|
159
159
|
total: o.dataSource.length || 0
|
|
160
160
|
};
|
|
161
161
|
}
|
|
@@ -166,291 +166,301 @@ const Jo = /* @__PURE__ */ We({
|
|
|
166
166
|
};
|
|
167
167
|
},
|
|
168
168
|
namespace: "ap-grid",
|
|
169
|
-
filterFields:
|
|
170
|
-
params:
|
|
169
|
+
filterFields: F([]),
|
|
170
|
+
params: k(o, "params"),
|
|
171
171
|
defaultData: o.defaultData,
|
|
172
|
-
manual: t(
|
|
172
|
+
manual: t(he),
|
|
173
173
|
formatParams: o.beforeSearchSubmit,
|
|
174
174
|
pagination: o.pagination,
|
|
175
|
-
sortFields:
|
|
176
|
-
}),
|
|
177
|
-
() =>
|
|
178
|
-
),
|
|
175
|
+
sortFields: ye
|
|
176
|
+
}), be = ko(o, f), Be = l(
|
|
177
|
+
() => b(o.dataSource) ? S.records : o.dataSource
|
|
178
|
+
), Fe = l(() => {
|
|
179
179
|
const e = o.rowSelection === !0 ? {} : o.rowSelection;
|
|
180
180
|
return e ? e.preserveSelectedRowKeys !== !1 : !1;
|
|
181
181
|
}), {
|
|
182
|
-
select:
|
|
183
|
-
unSelect:
|
|
184
|
-
selectedRows:
|
|
185
|
-
selectedRowKeys:
|
|
186
|
-
clearAll:
|
|
187
|
-
selectMultiByKeys:
|
|
188
|
-
} =
|
|
182
|
+
select: ke,
|
|
183
|
+
unSelect: xe,
|
|
184
|
+
selectedRows: D,
|
|
185
|
+
selectedRowKeys: Ie,
|
|
186
|
+
clearAll: Te,
|
|
187
|
+
selectMultiByKeys: De
|
|
188
|
+
} = mo({
|
|
189
189
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
190
|
-
dataSource:
|
|
190
|
+
dataSource: Be,
|
|
191
191
|
rowKey: o.rowKey
|
|
192
|
-
}),
|
|
192
|
+
}), Ke = {
|
|
193
193
|
checkbox: "multiRow",
|
|
194
194
|
radio: "singleRow"
|
|
195
|
-
},
|
|
195
|
+
}, Pe = l(() => {
|
|
196
196
|
if (!o.rowSelection)
|
|
197
197
|
return;
|
|
198
198
|
const { type: e = "checkbox", disabled: r } = o.rowSelection === !0 ? {} : o.rowSelection;
|
|
199
199
|
return {
|
|
200
|
-
mode:
|
|
201
|
-
isRowSelectable: (
|
|
200
|
+
mode: Ke[e],
|
|
201
|
+
isRowSelectable: (n) => r ? !r(n.data) : !0
|
|
202
202
|
};
|
|
203
203
|
});
|
|
204
|
-
function
|
|
205
|
-
return
|
|
204
|
+
function K(e) {
|
|
205
|
+
return so(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
206
206
|
}
|
|
207
|
-
const
|
|
207
|
+
const U = ({
|
|
208
208
|
api: e = d.value
|
|
209
209
|
}) => {
|
|
210
210
|
if (!o.rowSelection)
|
|
211
211
|
return;
|
|
212
|
-
const r =
|
|
212
|
+
const r = D.value;
|
|
213
213
|
if (!r.length) {
|
|
214
214
|
setTimeout(() => {
|
|
215
|
-
|
|
215
|
+
p = !0;
|
|
216
216
|
}, 0);
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
|
-
|
|
220
|
-
const
|
|
221
|
-
e.forEachNode((
|
|
222
|
-
const
|
|
223
|
-
r.find((
|
|
224
|
-
}), e.setNodesSelected({ nodes:
|
|
225
|
-
|
|
219
|
+
p = !1;
|
|
220
|
+
const n = [];
|
|
221
|
+
e.forEachNode((u) => {
|
|
222
|
+
const h = u.data, i = K(h);
|
|
223
|
+
r.find((w) => K(w) === i) && n.push(u);
|
|
224
|
+
}), e.setNodesSelected({ nodes: n, newValue: !0 }), setTimeout(() => {
|
|
225
|
+
p = !0;
|
|
226
226
|
}, 0);
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
},
|
|
232
|
-
|
|
227
|
+
}, ze = (e) => {
|
|
228
|
+
p && (e.node.isSelected() ? ke(e.data) : xe(e.data));
|
|
229
|
+
}, Ee = () => {
|
|
230
|
+
p = !0;
|
|
231
|
+
}, P = () => {
|
|
232
|
+
Te(), d.value?.deselectAll();
|
|
233
233
|
};
|
|
234
|
-
function
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
function Ve(e) {
|
|
235
|
+
De(e), Qe(() => {
|
|
236
|
+
U({});
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function $(e = !1) {
|
|
240
240
|
const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
241
|
-
return
|
|
242
|
-
}
|
|
243
|
-
function U(e) {
|
|
244
|
-
f.value?.apForm?.setFieldsValue?.(e);
|
|
245
|
-
}
|
|
246
|
-
function $() {
|
|
247
|
-
return f.value?.getSorterItems() || [];
|
|
241
|
+
return g.value?.apForm?.[r]?.(!0);
|
|
248
242
|
}
|
|
249
243
|
function q(e) {
|
|
250
|
-
|
|
244
|
+
g.value?.apForm?.setFieldsValue?.(e);
|
|
251
245
|
}
|
|
252
246
|
function J() {
|
|
253
|
-
|
|
247
|
+
return g.value?.getSorterItems() || [];
|
|
248
|
+
}
|
|
249
|
+
function Q(e) {
|
|
250
|
+
g.value?.setSorterItems(e);
|
|
251
|
+
}
|
|
252
|
+
function X() {
|
|
253
|
+
g.value?.resetSorterItems();
|
|
254
|
+
}
|
|
255
|
+
function Y(e) {
|
|
256
|
+
return e && String(e);
|
|
254
257
|
}
|
|
255
|
-
function
|
|
258
|
+
function Ae(e) {
|
|
256
259
|
const r = d.value;
|
|
257
260
|
if (!r)
|
|
258
261
|
return;
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
})
|
|
270
|
-
|
|
271
|
-
|
|
262
|
+
const n = r.getColumnState() || [], u = e.map((a) => a.key ? String(a.key) : a.key).filter(Boolean), h = n.map((a) => {
|
|
263
|
+
if (!pe.value.includes(a.colId))
|
|
264
|
+
return a;
|
|
265
|
+
const v = !u.includes(a.colId), Z = {
|
|
266
|
+
...a,
|
|
267
|
+
hide: v
|
|
268
|
+
}, _ = e.find(
|
|
269
|
+
($e) => Y($e.key) === a.colId
|
|
270
|
+
);
|
|
271
|
+
return _ && (Z.pinned = _.fixed || null), Z;
|
|
272
|
+
}), i = new Map(
|
|
273
|
+
e.map((a, v) => [Y(a.key), v])
|
|
274
|
+
), w = h.filter((a) => i.has(a.colId)).sort(
|
|
275
|
+
(a, v) => i.get(a.colId) - i.get(v.colId)
|
|
276
|
+
), s = [];
|
|
277
|
+
let Ue = 0;
|
|
278
|
+
for (const a of h)
|
|
279
|
+
i.has(a.colId) ? s.push(w[Ue++]) : s.push(a);
|
|
280
|
+
r.applyColumnState({
|
|
281
|
+
state: s,
|
|
272
282
|
applyOrder: !0
|
|
273
283
|
});
|
|
274
284
|
}
|
|
275
|
-
|
|
276
|
-
columns: l(() =>
|
|
277
|
-
columnsBackup: l(() =>
|
|
278
|
-
size: l(() =>
|
|
285
|
+
fo({
|
|
286
|
+
columns: l(() => f.value),
|
|
287
|
+
columnsBackup: l(() => W.value),
|
|
288
|
+
size: l(() => So[y.value]),
|
|
279
289
|
updateColumns(e) {
|
|
280
|
-
|
|
290
|
+
console.log("run reset", e), f.value = e, o.onShownColumnsChange?.(e), Ae(e);
|
|
281
291
|
},
|
|
282
292
|
updateSize(e) {
|
|
283
|
-
y.value =
|
|
293
|
+
y.value = go[e];
|
|
284
294
|
},
|
|
285
295
|
renderConfig: l(() => ({
|
|
286
|
-
className:
|
|
287
|
-
color:
|
|
296
|
+
className: se("table-header", "title"),
|
|
297
|
+
color: me.value.colorTextTertiary
|
|
288
298
|
})),
|
|
289
299
|
dataSource: l(() => t(S).records),
|
|
290
|
-
getSearchFormValues:
|
|
291
|
-
setSearchFormValues:
|
|
292
|
-
submit:
|
|
293
|
-
submitWith:
|
|
294
|
-
reset:
|
|
295
|
-
refresh:
|
|
296
|
-
getSearchFormSorterItems:
|
|
297
|
-
setSearchFormSorterItems:
|
|
298
|
-
resetSearchFormSorterItems:
|
|
300
|
+
getSearchFormValues: $,
|
|
301
|
+
setSearchFormValues: q,
|
|
302
|
+
submit: I,
|
|
303
|
+
submitWith: G,
|
|
304
|
+
reset: T,
|
|
305
|
+
refresh: H,
|
|
306
|
+
getSearchFormSorterItems: J,
|
|
307
|
+
setSearchFormSorterItems: Q,
|
|
308
|
+
resetSearchFormSorterItems: X
|
|
299
309
|
});
|
|
300
|
-
const
|
|
301
|
-
() =>
|
|
302
|
-
),
|
|
303
|
-
|
|
304
|
-
o.card ? null :
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
].filter(Boolean)),
|
|
310
|
+
const Ne = l(
|
|
311
|
+
() => b(o.loading) ? S.loading : o.loading
|
|
312
|
+
), Me = l(() => [
|
|
313
|
+
c(),
|
|
314
|
+
o.card ? null : c("wrapper"),
|
|
315
|
+
c("adaptive"),
|
|
316
|
+
c(`size-${y.value}`)
|
|
317
|
+
].filter(Boolean)), Oe = l(() => ({
|
|
308
318
|
height: "100%",
|
|
309
319
|
...o.tableStyle || {}
|
|
310
|
-
})),
|
|
311
|
-
|
|
320
|
+
})), We = (e, r) => {
|
|
321
|
+
L({ current: e, pageSize: r });
|
|
312
322
|
};
|
|
313
|
-
function
|
|
323
|
+
function je(e) {
|
|
314
324
|
const r = e.data;
|
|
315
|
-
return
|
|
325
|
+
return K(r);
|
|
316
326
|
}
|
|
317
|
-
function
|
|
327
|
+
function Le(e, r) {
|
|
318
328
|
d.value?.ensureIndexVisible(e, r);
|
|
319
329
|
}
|
|
320
|
-
function
|
|
330
|
+
function Ge(e) {
|
|
321
331
|
o.onRowClicked?.(e.data);
|
|
322
332
|
}
|
|
323
|
-
function
|
|
333
|
+
function He(e) {
|
|
324
334
|
o.onScrollEnd?.(e.direction);
|
|
325
335
|
}
|
|
326
|
-
return
|
|
336
|
+
return z(
|
|
327
337
|
() => o.dataSource,
|
|
328
338
|
(e) => {
|
|
329
|
-
|
|
339
|
+
Re(e);
|
|
330
340
|
},
|
|
331
341
|
{ immediate: !0, deep: !0 }
|
|
332
|
-
),
|
|
342
|
+
), z(
|
|
333
343
|
() => o.size,
|
|
334
344
|
(e) => {
|
|
335
345
|
y.value = e;
|
|
336
346
|
}
|
|
337
|
-
),
|
|
347
|
+
), z(
|
|
338
348
|
() => t(S).loading,
|
|
339
349
|
(e) => {
|
|
340
350
|
o.onLoadingChange?.(e);
|
|
341
351
|
}
|
|
342
|
-
),
|
|
343
|
-
submit:
|
|
344
|
-
reset:
|
|
345
|
-
refresh:
|
|
346
|
-
submitWith:
|
|
347
|
-
setSearchFormValues:
|
|
348
|
-
getSearchFormValues:
|
|
349
|
-
getShowColumns: () => t(
|
|
352
|
+
), ae({
|
|
353
|
+
submit: I,
|
|
354
|
+
reset: T,
|
|
355
|
+
refresh: H,
|
|
356
|
+
submitWith: G,
|
|
357
|
+
setSearchFormValues: q,
|
|
358
|
+
getSearchFormValues: $,
|
|
359
|
+
getShowColumns: () => t(f),
|
|
350
360
|
rowSelection: {
|
|
351
|
-
selectedRows: l(() =>
|
|
352
|
-
setSelectedRowKeys:
|
|
353
|
-
clearAll:
|
|
361
|
+
selectedRows: l(() => D.value),
|
|
362
|
+
setSelectedRowKeys: Ve,
|
|
363
|
+
clearAll: P
|
|
354
364
|
},
|
|
355
|
-
scrollToRow:
|
|
365
|
+
scrollToRow: Le,
|
|
356
366
|
getDataSource: () => t(S.records),
|
|
357
|
-
getPaging:
|
|
358
|
-
setPaging:
|
|
359
|
-
getSearchFormSorterItems:
|
|
360
|
-
setSearchFormSorterItems:
|
|
361
|
-
resetSearchFormSorterItems:
|
|
362
|
-
}), (e, r) => (
|
|
363
|
-
class:
|
|
364
|
-
style:
|
|
367
|
+
getPaging: ve,
|
|
368
|
+
setPaging: Ce,
|
|
369
|
+
getSearchFormSorterItems: J,
|
|
370
|
+
setSearchFormSorterItems: Q,
|
|
371
|
+
resetSearchFormSorterItems: X
|
|
372
|
+
}), (e, r) => (C(), E("div", {
|
|
373
|
+
class: m(Me.value),
|
|
374
|
+
style: V(e.wrapperStyle)
|
|
365
375
|
}, [
|
|
366
|
-
t(
|
|
376
|
+
t(b)(e.dataSource) && e.searchForm !== !1 && t(O).length > 0 ? (C(), E("div", {
|
|
367
377
|
key: 0,
|
|
368
|
-
class:
|
|
369
|
-
style:
|
|
378
|
+
class: m(e.card ? t(B)("search-wrapper") : null),
|
|
379
|
+
style: V(e.searchFormWrapperStyle)
|
|
370
380
|
}, [
|
|
371
|
-
|
|
381
|
+
A(t(io).SearchForm, N(e.searchForm || {}, {
|
|
372
382
|
ref_key: "formRef",
|
|
373
|
-
ref:
|
|
383
|
+
ref: g,
|
|
374
384
|
"custom-reset": "",
|
|
375
|
-
"submit-loading": t(
|
|
376
|
-
onSubmit: t(
|
|
377
|
-
onReset: t(
|
|
378
|
-
}),
|
|
379
|
-
default:
|
|
380
|
-
(
|
|
381
|
-
key:
|
|
385
|
+
"submit-loading": t(j).loading,
|
|
386
|
+
onSubmit: t(I),
|
|
387
|
+
onReset: t(T)
|
|
388
|
+
}), Xe({
|
|
389
|
+
default: oe(() => [
|
|
390
|
+
(C(!0), E(Ye, null, Ze(t(O), (n) => (C(), te(_e(n.renderNode), {
|
|
391
|
+
key: n.dataIndex
|
|
382
392
|
}))), 128))
|
|
383
393
|
]),
|
|
384
394
|
_: 2
|
|
385
395
|
}, [
|
|
386
|
-
|
|
396
|
+
M.searchFormExtra ? {
|
|
387
397
|
name: "extra",
|
|
388
|
-
fn:
|
|
389
|
-
|
|
398
|
+
fn: oe(() => [
|
|
399
|
+
re(e.$slots, "searchFormExtra")
|
|
390
400
|
]),
|
|
391
401
|
key: "0"
|
|
392
402
|
} : void 0
|
|
393
403
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
394
|
-
], 6)) :
|
|
395
|
-
|
|
396
|
-
class:
|
|
397
|
-
style:
|
|
404
|
+
], 6)) : ee("", !0),
|
|
405
|
+
R("div", {
|
|
406
|
+
class: m([t(B)("table-wrapper"), e.card ? t(B)("table-wrapper-card") : null]),
|
|
407
|
+
style: V(e.tableWrapperStyle)
|
|
398
408
|
}, [
|
|
399
|
-
|
|
400
|
-
class:
|
|
409
|
+
R("div", {
|
|
410
|
+
class: m(t(c)("header-wrapper"))
|
|
401
411
|
}, [
|
|
402
|
-
|
|
403
|
-
selectedRows: t(
|
|
404
|
-
selectedRowKeys: t(
|
|
405
|
-
shownColumns: t(
|
|
406
|
-
clearAll:
|
|
412
|
+
re(e.$slots, "title", {
|
|
413
|
+
selectedRows: t(D),
|
|
414
|
+
selectedRowKeys: t(Ie),
|
|
415
|
+
shownColumns: t(f),
|
|
416
|
+
clearAll: P
|
|
407
417
|
})
|
|
408
418
|
], 2),
|
|
409
|
-
|
|
410
|
-
class:
|
|
419
|
+
R("div", {
|
|
420
|
+
class: m(t(c)("grid-wrapper"))
|
|
411
421
|
}, [
|
|
412
|
-
|
|
413
|
-
style:
|
|
422
|
+
A(t(to), N(le(t(ce), t(de)), {
|
|
423
|
+
style: Oe.value,
|
|
414
424
|
"row-data": t(S).records,
|
|
415
|
-
"column-defs": t(
|
|
416
|
-
"default-col-def": t(
|
|
425
|
+
"column-defs": t(ge),
|
|
426
|
+
"default-col-def": t(fe),
|
|
417
427
|
"suppress-loading-overlay": "",
|
|
418
|
-
"row-selection":
|
|
419
|
-
"selection-column-def": t(
|
|
420
|
-
"get-row-id":
|
|
421
|
-
theme: t(
|
|
428
|
+
"row-selection": Pe.value,
|
|
429
|
+
"selection-column-def": t(be),
|
|
430
|
+
"get-row-id": je,
|
|
431
|
+
theme: t(ie),
|
|
422
432
|
"tooltip-show-delay": 500,
|
|
423
433
|
"enable-browser-tooltips": e.browserTooltips,
|
|
424
434
|
"tooltip-interaction": "",
|
|
425
|
-
"no-rows-overlay-component":
|
|
426
|
-
onSortChanged:
|
|
427
|
-
onGridReady: r[0] || (r[0] = (
|
|
428
|
-
onRowDataUpdated:
|
|
429
|
-
onRowSelected:
|
|
430
|
-
onFirstDataRendered:
|
|
431
|
-
onRowClicked:
|
|
432
|
-
onBodyScrollEnd:
|
|
435
|
+
"no-rows-overlay-component": Io,
|
|
436
|
+
onSortChanged: we,
|
|
437
|
+
onGridReady: r[0] || (r[0] = (n) => d.value = n.api),
|
|
438
|
+
onRowDataUpdated: U,
|
|
439
|
+
onRowSelected: ze,
|
|
440
|
+
onFirstDataRendered: Ee,
|
|
441
|
+
onRowClicked: Ge,
|
|
442
|
+
onBodyScrollEnd: He
|
|
433
443
|
}), null, 16, ["style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "theme", "enable-browser-tooltips"]),
|
|
434
|
-
|
|
435
|
-
class:
|
|
444
|
+
eo(R("div", {
|
|
445
|
+
class: m(t(B)("table-loading-wrapper"))
|
|
436
446
|
}, [
|
|
437
|
-
|
|
447
|
+
A(t(ao), { delay: 300 })
|
|
438
448
|
], 2), [
|
|
439
|
-
[
|
|
449
|
+
[oo, Ne.value]
|
|
440
450
|
])
|
|
441
451
|
], 2),
|
|
442
|
-
|
|
443
|
-
class:
|
|
452
|
+
R("div", {
|
|
453
|
+
class: m(t(c)("pagination-wrapper"))
|
|
444
454
|
}, [
|
|
445
|
-
e.pagination !== !1 ? (
|
|
455
|
+
e.pagination !== !1 ? (C(), te(t(lo), N({
|
|
446
456
|
key: 0,
|
|
447
|
-
class: t(
|
|
448
|
-
}, t(
|
|
457
|
+
class: t(c)("pagination")
|
|
458
|
+
}, t(j).pagination, { onChange: We }), null, 16, ["class"])) : ee("", !0)
|
|
449
459
|
], 2)
|
|
450
460
|
], 6)
|
|
451
461
|
], 6));
|
|
452
462
|
}
|
|
453
463
|
});
|
|
454
464
|
export {
|
|
455
|
-
|
|
465
|
+
ot as default
|
|
456
466
|
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { ApFieldSelectProps } from '../../ap-field';
|
|
2
|
-
|
|
2
|
+
import { ValueEnum } from '../../ap-table';
|
|
3
|
+
export declare function selectRenderer(props: ApFieldSelectProps & {
|
|
4
|
+
valueEnum?: ValueEnum;
|
|
5
|
+
}): any;
|