@aplus-frontend/ui 6.34.0 → 6.35.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.
- package/es/src/ag-grid/components/tooltip/index.vue2.mjs +1 -1
- package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
- package/es/src/ag-grid/index.vue.mjs +77 -72
- package/es/src/ag-grid/interface.d.ts +5 -1
- package/es/src/ap-form/ap-form.vue.d.ts +2 -6
- package/es/src/ap-form/ap-form.vue2.mjs +71 -69
- package/es/src/ap-form/item/index.vue.mjs +13 -12
- package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
- package/es/src/ap-grid/editable/index.vue.mjs +94 -91
- package/es/src/ap-grid/index.vue.mjs +74 -69
- package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue2.mjs +72 -69
- package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
- package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
- package/es/src/business/ap-copy/ApCopy.mjs +5 -6
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
- package/es/src/business/ap-label/ApLabel.d.ts +1 -1
- package/es/src/business/ap-label/index.d.ts +3 -3
- package/es/src/business/hooks/useKeepAliveFlag.d.ts +3 -0
- package/es/src/business/hooks/useKeepAliveFlag.mjs +10 -7
- package/es/src/business/hooks/usePageListAgGrid.d.ts +1 -2
- package/es/src/business/hooks/usePageListAgGrid.mjs +29 -38
- package/es/src/business/hooks/usePageListApTable.mjs +10 -9
- package/es/src/editable-table/form-item.vue.mjs +75 -72
- package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
- package/es/src/editable-table/index.vue.mjs +68 -65
- package/es/src/utils/warning.d.ts +25 -0
- package/es/src/utils/warning.mjs +74 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
- package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +5 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-copy/ApCopy.js +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
- package/lib/src/business/ap-label/index.d.ts +3 -3
- package/lib/src/business/hooks/useKeepAliveFlag.d.ts +3 -0
- package/lib/src/business/hooks/useKeepAliveFlag.js +1 -1
- package/lib/src/business/hooks/usePageListAgGrid.d.ts +1 -2
- package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/utils/warning.d.ts +25 -0
- package/lib/src/utils/warning.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -9,7 +9,7 @@ const w = /* @__PURE__ */ p({
|
|
|
9
9
|
setup(l) {
|
|
10
10
|
const n = l, e = m(!1), { e: s } = x("ag-grid");
|
|
11
11
|
return u(() => {
|
|
12
|
-
const { rowIndex: o, column: t, gridWrapperRef: c, lineClamp: i } = n.params, r = c.value
|
|
12
|
+
const { rowIndex: o, column: t, gridWrapperRef: c, lineClamp: i } = n.params, r = c.value?.querySelector(
|
|
13
13
|
`div.ag-row[row-index="${o}"] .ag-cell[col-id="${t.colId}"] span.ag-cell-value`
|
|
14
14
|
);
|
|
15
15
|
if (!r) {
|
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { isFunction as
|
|
1
|
+
import { computed as s } from "vue";
|
|
2
|
+
import { isFunction as m } from "lodash-unified";
|
|
3
3
|
import "../../ap-grid/index.mjs";
|
|
4
4
|
import { pxToNumber as a } from "../utils.mjs";
|
|
5
5
|
import { ROW_SELECTION_FIELD as d } from "../../ap-grid/constants.mjs";
|
|
6
|
-
function
|
|
7
|
-
return
|
|
6
|
+
function p(t) {
|
|
7
|
+
return t?.bottom?.length || t?.top?.length;
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
9
|
+
const v = (t, c) => s(() => {
|
|
10
|
+
if (!t.rowSelection)
|
|
11
11
|
return;
|
|
12
|
-
const
|
|
12
|
+
const o = t.rowSelection === !0 ? {} : t.rowSelection, i = {
|
|
13
13
|
sortable: !1,
|
|
14
14
|
resizable: !1,
|
|
15
|
-
width: a(
|
|
15
|
+
width: a(o.columnWidth, 60),
|
|
16
|
+
tooltipValueGetter: o.tooltip ? ({ node: e }) => {
|
|
17
|
+
if (typeof o.tooltip == "string")
|
|
18
|
+
return o.tooltip;
|
|
19
|
+
const r = !e?.selectable, n = !!e?.isSelected();
|
|
20
|
+
return o.tooltip(n, r, e);
|
|
21
|
+
} : void 0
|
|
16
22
|
};
|
|
17
|
-
let
|
|
18
|
-
if (
|
|
19
|
-
(
|
|
20
|
-
) ? "left" : void 0),
|
|
21
|
-
const { cellClassName:
|
|
22
|
-
|
|
23
|
+
let l = o.fixed;
|
|
24
|
+
if (l === void 0 && (l = c.value.some(
|
|
25
|
+
(e) => e.fixed === "left" || e.fixed === !0
|
|
26
|
+
) ? "left" : void 0), i.pinned = l, p(t.summary)) {
|
|
27
|
+
const { cellClassName: e } = t.summary;
|
|
28
|
+
i.cellClass = ({
|
|
23
29
|
node: r,
|
|
24
|
-
data:
|
|
25
|
-
colDef:
|
|
26
|
-
rowIndex:
|
|
30
|
+
data: n,
|
|
31
|
+
colDef: f,
|
|
32
|
+
rowIndex: u
|
|
27
33
|
}) => {
|
|
28
|
-
if (!(!r.rowPinned || !
|
|
29
|
-
return
|
|
30
|
-
},
|
|
34
|
+
if (!(!r.rowPinned || !e))
|
|
35
|
+
return m(e) ? e(n, f, r.rowPinned, u) : e;
|
|
36
|
+
}, i.cellRenderer = ({ data: r }) => r?.[d];
|
|
31
37
|
}
|
|
32
|
-
return
|
|
38
|
+
return i;
|
|
33
39
|
});
|
|
34
40
|
export {
|
|
35
|
-
|
|
41
|
+
v as default
|
|
36
42
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as oo, useSlots as to, ref as I, toRef as T, unref as t, computed as l, nextTick as ro, watch as z, createElementBlock as A, openBlock as b, normalizeStyle as V, normalizeClass as m, createCommentVNode as
|
|
1
|
+
import { defineComponent as oo, useSlots as to, ref as I, toRef as T, unref as t, computed as l, nextTick as ro, watch as z, createElementBlock as A, openBlock as b, normalizeStyle as V, normalizeClass as m, createCommentVNode as ae, createElementVNode as B, createVNode as M, mergeProps as O, createSlots as ao, withCtx as ne, Fragment as no, renderList as lo, createBlock as le, resolveDynamicComponent as so, renderSlot as se, withDirectives as io, vShow as uo } from "vue";
|
|
2
2
|
import { AgGridVue as co } from "ag-grid-vue3";
|
|
3
3
|
import { ModuleRegistry as mo, AllCommunityModule as po } from "ag-grid-community";
|
|
4
4
|
import { mergeProps as fo } from "./utils.mjs";
|
|
5
5
|
import { Spin as go, Pagination as wo } from "@aplus-frontend/antdv";
|
|
6
|
-
import { isUndefined as F, isFunction as
|
|
6
|
+
import { isUndefined as F, isFunction as G } from "lodash-unified";
|
|
7
7
|
import "../config-provider/index.mjs";
|
|
8
8
|
import { ApForm as So } from "../ap-form/index.mjs";
|
|
9
9
|
import { recursionApColumns as yo } from "../ap-table/utils.mjs";
|
|
@@ -101,11 +101,11 @@ const mt = /* @__PURE__ */ oo({
|
|
|
101
101
|
},
|
|
102
102
|
setup(de, { expose: ue }) {
|
|
103
103
|
mo.registerModules([po]);
|
|
104
|
-
const o = de, W = to(), { e: k, b: u, be: ce } = zo("ag-grid"),
|
|
104
|
+
const o = de, W = to(), { e: k, b: u, be: ce } = zo("ag-grid"), C = I(o.size), me = ko(C, T(o, "rowHeight")), pe = Eo(T(o, "virtual")), { rowPinnedGridConfig: H, getRowPinnedCellClass: fe } = Ko(
|
|
105
105
|
T(o, "summary")
|
|
106
106
|
), ge = Ao("apGrid"), s = I(), [, we] = Fo();
|
|
107
107
|
let p = !!o.dataSource;
|
|
108
|
-
const
|
|
108
|
+
const L = Do(o), { shownColumns: f, columns: U, columnKeys: Se, getTargetColumnByKey: ye } = xo(o), { defaultColDef: Ce, columnDefs: he, gridWrapperRef: ve } = Io(U, o, fe), x = I({});
|
|
109
109
|
vo({
|
|
110
110
|
sorter: x,
|
|
111
111
|
setSorter(e) {
|
|
@@ -126,11 +126,11 @@ const mt = /* @__PURE__ */ oo({
|
|
|
126
126
|
}
|
|
127
127
|
if (!a)
|
|
128
128
|
return;
|
|
129
|
-
const i = a.getColDef(),
|
|
130
|
-
|
|
129
|
+
const i = a.getColDef(), y = a.getSort(), v = ye(i.colId);
|
|
130
|
+
$(void 0, void 0, {
|
|
131
131
|
column: i,
|
|
132
132
|
field: v?.field ?? i.field ?? i.colId,
|
|
133
|
-
order:
|
|
133
|
+
order: y ? Re[y] : null
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
const Be = l(() => yo(t(f), (e) => {
|
|
@@ -148,16 +148,16 @@ const mt = /* @__PURE__ */ oo({
|
|
|
148
148
|
submit: N,
|
|
149
149
|
reset: D,
|
|
150
150
|
data: w,
|
|
151
|
-
tableProps:
|
|
152
|
-
handleTableChangeOptional:
|
|
153
|
-
submitWith:
|
|
154
|
-
refresh:
|
|
151
|
+
tableProps: j,
|
|
152
|
+
handleTableChangeOptional: $,
|
|
153
|
+
submitWith: q,
|
|
154
|
+
refresh: J,
|
|
155
155
|
getPaging: xe,
|
|
156
156
|
setPaging: Ie,
|
|
157
157
|
setDataSource: Te
|
|
158
158
|
} = Co({
|
|
159
159
|
async request(e) {
|
|
160
|
-
if (p = !1,
|
|
160
|
+
if (p = !1, S.value && !S.value.preserveSelectedRowKeys && F(o.dataSource) && P(), !F(o.dataSource)) {
|
|
161
161
|
const a = e.pageSize * (e.current - 1);
|
|
162
162
|
return {
|
|
163
163
|
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(a, a + e.pageSize)) || [],
|
|
@@ -179,7 +179,7 @@ const mt = /* @__PURE__ */ oo({
|
|
|
179
179
|
pagination: o.pagination,
|
|
180
180
|
sortFields: Be,
|
|
181
181
|
onClickReset: Fe
|
|
182
|
-
}),
|
|
182
|
+
}), S = l(() => {
|
|
183
183
|
const e = o.rowSelection || ge.value?.rowSelection;
|
|
184
184
|
if (e)
|
|
185
185
|
return e === !0 ? ie : {
|
|
@@ -196,14 +196,14 @@ const mt = /* @__PURE__ */ oo({
|
|
|
196
196
|
clearAll: ze,
|
|
197
197
|
selectMultiByKeys: Ae
|
|
198
198
|
} = ho({
|
|
199
|
-
...
|
|
199
|
+
...S,
|
|
200
200
|
dataSource: De,
|
|
201
201
|
rowKey: o.rowKey
|
|
202
202
|
}), Ve = {
|
|
203
203
|
checkbox: "multiRow",
|
|
204
204
|
radio: "singleRow"
|
|
205
205
|
}, Me = l(() => {
|
|
206
|
-
const e =
|
|
206
|
+
const e = S.value;
|
|
207
207
|
if (!e)
|
|
208
208
|
return;
|
|
209
209
|
const { type: r = "checkbox", disabled: a } = e;
|
|
@@ -213,12 +213,12 @@ const mt = /* @__PURE__ */ oo({
|
|
|
213
213
|
};
|
|
214
214
|
});
|
|
215
215
|
function K(e) {
|
|
216
|
-
return
|
|
216
|
+
return G(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const Q = ({
|
|
219
219
|
api: e = s.value
|
|
220
220
|
}) => {
|
|
221
|
-
if (o.onUpdate?.(), !
|
|
221
|
+
if (o.onUpdate?.(), !S.value)
|
|
222
222
|
return;
|
|
223
223
|
const r = E.value;
|
|
224
224
|
if (!r.length) {
|
|
@@ -231,39 +231,44 @@ const mt = /* @__PURE__ */ oo({
|
|
|
231
231
|
const a = [];
|
|
232
232
|
e.forEachNode((d) => {
|
|
233
233
|
const h = d.data, i = K(h);
|
|
234
|
-
r.find((
|
|
234
|
+
r.find((y) => K(y) === i) && a.push(d);
|
|
235
235
|
}), e.setNodesSelected({ nodes: a, newValue: !0 }), setTimeout(() => {
|
|
236
236
|
p = !0;
|
|
237
237
|
}, 0);
|
|
238
238
|
}, Oe = (e) => {
|
|
239
|
-
p && (e.node.isSelected() ? Ee(e.data) : Ke(e.data))
|
|
240
|
-
|
|
239
|
+
p && (e.node.isSelected() ? Ee(e.data) : Ke(e.data), G(S.value?.tooltip) && e.api.refreshCells({
|
|
240
|
+
rowNodes: [e.node],
|
|
241
|
+
// todo: 取消硬编码
|
|
242
|
+
columns: ["ag-Grid-SelectionColumn"],
|
|
243
|
+
force: !0
|
|
244
|
+
}));
|
|
245
|
+
}, Ge = () => {
|
|
241
246
|
p = !0;
|
|
242
247
|
}, P = () => {
|
|
243
248
|
ze(), s.value?.deselectAll();
|
|
244
249
|
};
|
|
245
|
-
function
|
|
250
|
+
function We(e) {
|
|
246
251
|
Ae(e), ro(() => {
|
|
247
|
-
|
|
252
|
+
Q({});
|
|
248
253
|
});
|
|
249
254
|
}
|
|
250
|
-
function
|
|
255
|
+
function X(e = !1) {
|
|
251
256
|
const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
252
257
|
return g.value?.apForm?.[r]?.(!0);
|
|
253
258
|
}
|
|
254
|
-
function
|
|
259
|
+
function Y(e) {
|
|
255
260
|
g.value?.apForm?.setFieldsValue?.(e);
|
|
256
261
|
}
|
|
257
|
-
function
|
|
262
|
+
function Z() {
|
|
258
263
|
return g.value?.getSorterItems() || [];
|
|
259
264
|
}
|
|
260
|
-
function
|
|
265
|
+
function _(e) {
|
|
261
266
|
g.value?.setSorterItems(e);
|
|
262
267
|
}
|
|
263
|
-
function
|
|
268
|
+
function ee() {
|
|
264
269
|
g.value?.resetSorterItems();
|
|
265
270
|
}
|
|
266
|
-
function
|
|
271
|
+
function oe(e) {
|
|
267
272
|
return e && String(e);
|
|
268
273
|
}
|
|
269
274
|
function He(e) {
|
|
@@ -273,21 +278,21 @@ const mt = /* @__PURE__ */ oo({
|
|
|
273
278
|
const a = r.getColumnState() || [], d = e.map((n) => n.key ? String(n.key) : n.key).filter(Boolean), h = a.map((n) => {
|
|
274
279
|
if (!Se.value.includes(n.colId))
|
|
275
280
|
return n;
|
|
276
|
-
const R = !d.includes(n.colId),
|
|
281
|
+
const R = !d.includes(n.colId), te = {
|
|
277
282
|
...n,
|
|
278
283
|
hide: R
|
|
279
|
-
},
|
|
280
|
-
(eo) =>
|
|
284
|
+
}, re = e.find(
|
|
285
|
+
(eo) => oe(eo.key) === n.colId
|
|
281
286
|
);
|
|
282
|
-
return
|
|
287
|
+
return re && (te.pinned = re.fixed || null), te;
|
|
283
288
|
}), i = new Map(
|
|
284
|
-
e.map((n, R) => [
|
|
285
|
-
),
|
|
289
|
+
e.map((n, R) => [oe(n.key), R])
|
|
290
|
+
), y = h.filter((n) => i.has(n.colId)).sort(
|
|
286
291
|
(n, R) => i.get(n.colId) - i.get(R.colId)
|
|
287
292
|
), v = [];
|
|
288
293
|
let c = 0;
|
|
289
294
|
for (const n of h)
|
|
290
|
-
i.has(n.colId) ? v.push(
|
|
295
|
+
i.has(n.colId) ? v.push(y[c++]) : v.push(n);
|
|
291
296
|
r.applyColumnState({
|
|
292
297
|
state: v,
|
|
293
298
|
applyOrder: !0
|
|
@@ -295,28 +300,28 @@ const mt = /* @__PURE__ */ oo({
|
|
|
295
300
|
}
|
|
296
301
|
Ro({
|
|
297
302
|
columns: l(() => f.value),
|
|
298
|
-
columnsBackup: l(() =>
|
|
299
|
-
size: l(() => Bo[
|
|
303
|
+
columnsBackup: l(() => U.value),
|
|
304
|
+
size: l(() => Bo[C.value]),
|
|
300
305
|
updateColumns(e) {
|
|
301
306
|
f.value = e, o.onShownColumnsChange?.(e), He(e);
|
|
302
307
|
},
|
|
303
308
|
updateSize(e) {
|
|
304
|
-
|
|
309
|
+
C.value = bo[e];
|
|
305
310
|
},
|
|
306
311
|
renderConfig: l(() => ({
|
|
307
312
|
className: ce("table-header", "title"),
|
|
308
313
|
color: we.value.colorTextTertiary
|
|
309
314
|
})),
|
|
310
315
|
dataSource: l(() => t(w).records),
|
|
311
|
-
getSearchFormValues:
|
|
312
|
-
setSearchFormValues:
|
|
316
|
+
getSearchFormValues: X,
|
|
317
|
+
setSearchFormValues: Y,
|
|
313
318
|
submit: N,
|
|
314
|
-
submitWith:
|
|
319
|
+
submitWith: q,
|
|
315
320
|
reset: D,
|
|
316
|
-
refresh:
|
|
317
|
-
getSearchFormSorterItems:
|
|
318
|
-
setSearchFormSorterItems:
|
|
319
|
-
resetSearchFormSorterItems:
|
|
321
|
+
refresh: J,
|
|
322
|
+
getSearchFormSorterItems: Z,
|
|
323
|
+
setSearchFormSorterItems: _,
|
|
324
|
+
resetSearchFormSorterItems: ee
|
|
320
325
|
});
|
|
321
326
|
const Le = l(
|
|
322
327
|
() => F(o.loading) ? w.loading : o.loading
|
|
@@ -324,12 +329,12 @@ const mt = /* @__PURE__ */ oo({
|
|
|
324
329
|
u(),
|
|
325
330
|
o.card ? null : u("wrapper"),
|
|
326
331
|
u("adaptive"),
|
|
327
|
-
u(`size-${
|
|
332
|
+
u(`size-${C.value}`)
|
|
328
333
|
].filter(Boolean)), je = l(() => ({
|
|
329
334
|
height: "100%",
|
|
330
335
|
...o.tableStyle || {}
|
|
331
336
|
})), $e = (e, r) => {
|
|
332
|
-
|
|
337
|
+
$({ current: e, pageSize: r });
|
|
333
338
|
};
|
|
334
339
|
function qe(e) {
|
|
335
340
|
const r = e.data;
|
|
@@ -352,10 +357,10 @@ const mt = /* @__PURE__ */ oo({
|
|
|
352
357
|
}
|
|
353
358
|
const _e = (e) => {
|
|
354
359
|
const r = [
|
|
355
|
-
|
|
360
|
+
H.value.getRowClass?.(e)
|
|
356
361
|
];
|
|
357
362
|
if (!e.node.rowPinned) {
|
|
358
|
-
const a =
|
|
363
|
+
const a = G(o.rowClassName) ? o.rowClassName(e.data, e.rowIndex) : o.rowClassName;
|
|
359
364
|
r.push(a);
|
|
360
365
|
}
|
|
361
366
|
return r.flat().filter(Boolean);
|
|
@@ -369,7 +374,7 @@ const mt = /* @__PURE__ */ oo({
|
|
|
369
374
|
), z(
|
|
370
375
|
() => o.size,
|
|
371
376
|
(e) => {
|
|
372
|
-
|
|
377
|
+
C.value = e;
|
|
373
378
|
}
|
|
374
379
|
), z(
|
|
375
380
|
() => t(w).loading,
|
|
@@ -379,23 +384,23 @@ const mt = /* @__PURE__ */ oo({
|
|
|
379
384
|
), ue({
|
|
380
385
|
submit: N,
|
|
381
386
|
reset: D,
|
|
382
|
-
refresh:
|
|
383
|
-
submitWith:
|
|
384
|
-
setSearchFormValues:
|
|
385
|
-
getSearchFormValues:
|
|
387
|
+
refresh: J,
|
|
388
|
+
submitWith: q,
|
|
389
|
+
setSearchFormValues: Y,
|
|
390
|
+
getSearchFormValues: X,
|
|
386
391
|
getShowColumns: () => t(f),
|
|
387
392
|
rowSelection: {
|
|
388
393
|
selectedRows: l(() => E.value),
|
|
389
|
-
setSelectedRowKeys:
|
|
394
|
+
setSelectedRowKeys: We,
|
|
390
395
|
clearAll: P
|
|
391
396
|
},
|
|
392
397
|
scrollToRow: Je,
|
|
393
398
|
getDataSource: () => t(w.records),
|
|
394
399
|
getPaging: xe,
|
|
395
400
|
setPaging: Ie,
|
|
396
|
-
getSearchFormSorterItems:
|
|
397
|
-
setSearchFormSorterItems:
|
|
398
|
-
resetSearchFormSorterItems:
|
|
401
|
+
getSearchFormSorterItems: Z,
|
|
402
|
+
setSearchFormSorterItems: _,
|
|
403
|
+
resetSearchFormSorterItems: ee,
|
|
399
404
|
refreshCells: Ye,
|
|
400
405
|
redrawRows: Ze,
|
|
401
406
|
_internalGridApi: l(() => s.value)
|
|
@@ -403,7 +408,7 @@ const mt = /* @__PURE__ */ oo({
|
|
|
403
408
|
class: m(Ue.value),
|
|
404
409
|
style: V(e.wrapperStyle)
|
|
405
410
|
}, [
|
|
406
|
-
t(F)(e.dataSource) && e.searchForm !== !1 && t(
|
|
411
|
+
t(F)(e.dataSource) && e.searchForm !== !1 && t(L).length > 0 ? (b(), A("div", {
|
|
407
412
|
key: 0,
|
|
408
413
|
class: m(e.card ? t(k)("search-wrapper") : null),
|
|
409
414
|
style: V(e.searchFormWrapperStyle)
|
|
@@ -412,12 +417,12 @@ const mt = /* @__PURE__ */ oo({
|
|
|
412
417
|
ref_key: "formRef",
|
|
413
418
|
ref: g,
|
|
414
419
|
"custom-reset": "",
|
|
415
|
-
"submit-loading": t(
|
|
420
|
+
"submit-loading": t(j).loading,
|
|
416
421
|
onSubmit: t(N),
|
|
417
422
|
onReset: t(D)
|
|
418
423
|
}), ao({
|
|
419
|
-
default:
|
|
420
|
-
(b(!0), A(no, null, lo(t(
|
|
424
|
+
default: ne(() => [
|
|
425
|
+
(b(!0), A(no, null, lo(t(L), (a) => (b(), le(so(a.renderNode), {
|
|
421
426
|
key: a.dataIndex
|
|
422
427
|
}))), 128))
|
|
423
428
|
]),
|
|
@@ -425,13 +430,13 @@ const mt = /* @__PURE__ */ oo({
|
|
|
425
430
|
}, [
|
|
426
431
|
W.searchFormExtra ? {
|
|
427
432
|
name: "extra",
|
|
428
|
-
fn:
|
|
429
|
-
|
|
433
|
+
fn: ne(() => [
|
|
434
|
+
se(e.$slots, "searchFormExtra")
|
|
430
435
|
]),
|
|
431
436
|
key: "0"
|
|
432
437
|
} : void 0
|
|
433
438
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
434
|
-
], 6)) :
|
|
439
|
+
], 6)) : ae("", !0),
|
|
435
440
|
B("div", {
|
|
436
441
|
class: m([t(k)("table-wrapper"), e.card ? t(k)("table-wrapper-card") : null]),
|
|
437
442
|
style: V(e.tableWrapperStyle)
|
|
@@ -439,7 +444,7 @@ const mt = /* @__PURE__ */ oo({
|
|
|
439
444
|
B("div", {
|
|
440
445
|
class: m(t(u)("header-wrapper"))
|
|
441
446
|
}, [
|
|
442
|
-
|
|
447
|
+
se(e.$slots, "title", {
|
|
443
448
|
selectedRows: t(E),
|
|
444
449
|
selectedRowKeys: t(Pe),
|
|
445
450
|
shownColumns: t(f),
|
|
@@ -451,7 +456,7 @@ const mt = /* @__PURE__ */ oo({
|
|
|
451
456
|
ref: ve,
|
|
452
457
|
class: m(t(u)("grid-wrapper"))
|
|
453
458
|
}, [
|
|
454
|
-
M(t(co), O(t(fo)(t(pe), t(
|
|
459
|
+
M(t(co), O(t(fo)(t(pe), t(H)), {
|
|
455
460
|
"get-row-class": _e,
|
|
456
461
|
style: je.value,
|
|
457
462
|
"row-data": t(w).records,
|
|
@@ -471,9 +476,9 @@ const mt = /* @__PURE__ */ oo({
|
|
|
471
476
|
"dom-layout": e.autoHeight ? "autoHeight" : "normal",
|
|
472
477
|
onSortChanged: be,
|
|
473
478
|
onGridReady: r[0] || (r[0] = (a) => s.value = a.api),
|
|
474
|
-
onRowDataUpdated:
|
|
479
|
+
onRowDataUpdated: Q,
|
|
475
480
|
onRowSelected: Oe,
|
|
476
|
-
onFirstDataRendered:
|
|
481
|
+
onFirstDataRendered: Ge,
|
|
477
482
|
onRowClicked: Qe,
|
|
478
483
|
onBodyScrollEnd: Xe
|
|
479
484
|
}), null, 16, ["style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "theme", "enable-browser-tooltips", "row-class-rules", "dom-layout"]),
|
|
@@ -488,10 +493,10 @@ const mt = /* @__PURE__ */ oo({
|
|
|
488
493
|
B("div", {
|
|
489
494
|
class: m(t(u)("pagination-wrapper"))
|
|
490
495
|
}, [
|
|
491
|
-
e.pagination !== !1 ? (b(),
|
|
496
|
+
e.pagination !== !1 ? (b(), le(t(wo), O({
|
|
492
497
|
key: 0,
|
|
493
498
|
class: t(u)("pagination")
|
|
494
|
-
}, t(
|
|
499
|
+
}, t(j).pagination, { onChange: $e }), null, 16, ["class"])) : ae("", !0)
|
|
495
500
|
], 2)
|
|
496
501
|
], 6)
|
|
497
502
|
], 6));
|
|
@@ -106,7 +106,7 @@ export type AgGridColumnType<RecordType = any, ExtraValueType = 'text', ValueTyp
|
|
|
106
106
|
} : null;
|
|
107
107
|
export type AgGridRowSelection<RecordType> = Pick<TableRowSelection<RecordType>, 'type' | 'fixed' | 'columnWidth' | 'defaultSelectedRowKeys'> & {
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
109
|
+
* 设置禁用的行
|
|
110
110
|
* @param row
|
|
111
111
|
* @returns
|
|
112
112
|
*/
|
|
@@ -115,6 +115,10 @@ export type AgGridRowSelection<RecordType> = Pick<TableRowSelection<RecordType>,
|
|
|
115
115
|
* 在后端分页下,是否在网络请求后仍然保留上一次的选中(即使不在当前数据中)
|
|
116
116
|
*/
|
|
117
117
|
preserveSelectedRowKeys?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* 行选择列自定义tooltip
|
|
120
|
+
*/
|
|
121
|
+
tooltip?: string | ((checked: boolean, disabled: boolean, rowNode: IRowNode) => string | any);
|
|
118
122
|
};
|
|
119
123
|
export type AgGridVirtualConfig = {
|
|
120
124
|
row?: boolean;
|
|
@@ -370,9 +370,7 @@ declare function __VLS_template(): {
|
|
|
370
370
|
default: string | number | ColSize;
|
|
371
371
|
};
|
|
372
372
|
xxl: {
|
|
373
|
-
type:
|
|
374
|
-
* 执行Watch回调
|
|
375
|
-
*/).PropType<string | number | ColSize>;
|
|
373
|
+
type: PropType<string | number | ColSize>;
|
|
376
374
|
default: string | number | ColSize;
|
|
377
375
|
};
|
|
378
376
|
prefixCls: StringConstructor;
|
|
@@ -1042,9 +1040,7 @@ declare const __VLS_component: DefineComponent<ApFormProps, {
|
|
|
1042
1040
|
default: string | number | ColSize;
|
|
1043
1041
|
};
|
|
1044
1042
|
xxl: {
|
|
1045
|
-
type:
|
|
1046
|
-
* 执行Watch回调
|
|
1047
|
-
*/).PropType<string | number | ColSize>;
|
|
1043
|
+
type: PropType<string | number | ColSize>;
|
|
1048
1044
|
default: string | number | ColSize;
|
|
1049
1045
|
};
|
|
1050
1046
|
prefixCls: StringConstructor;
|