@aplus-frontend/ui 6.33.0 → 6.35.0

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