@aplus-frontend/ui 6.25.0 → 6.26.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.
Files changed (46) hide show
  1. package/es/src/ag-grid/components/empty/index.vue.d.ts +3 -0
  2. package/es/src/ag-grid/components/empty/index.vue.mjs +4 -0
  3. package/es/src/ag-grid/components/empty/index.vue2.mjs +15 -0
  4. package/es/src/ag-grid/index.vue.mjs +80 -76
  5. package/es/src/ap-form/search-form/index.vue.d.ts +2 -8
  6. package/es/src/ap-form/search-form/index.vue.mjs +23 -24
  7. package/es/src/ap-grid/editable/form-item.vue.mjs +1 -0
  8. package/es/src/ap-grid/editable/index.vue.mjs +1 -0
  9. package/es/src/ap-grid/index.vue.mjs +295 -262
  10. package/es/src/ap-grid/interface.d.ts +21 -2
  11. package/es/src/ap-pro-card/components/card/index.vue2.mjs +70 -75
  12. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
  13. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +41 -41
  14. package/es/src/utils/copy.mjs +14 -4
  15. package/es/src/version.d.ts +1 -1
  16. package/es/src/version.mjs +1 -1
  17. package/lib/src/ag-grid/components/empty/index.vue.d.ts +3 -0
  18. package/lib/src/ag-grid/components/empty/index.vue.js +1 -0
  19. package/lib/src/ag-grid/components/empty/index.vue2.js +1 -0
  20. package/lib/src/ag-grid/index.vue.js +1 -1
  21. package/lib/src/ap-form/search-form/index.vue.d.ts +2 -8
  22. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  23. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  24. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  25. package/lib/src/ap-grid/index.vue.js +1 -1
  26. package/lib/src/ap-grid/interface.d.ts +21 -2
  27. package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
  28. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
  29. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  30. package/lib/src/utils/copy.js +1 -1
  31. package/lib/src/version.d.ts +1 -1
  32. package/lib/src/version.js +1 -1
  33. package/package.json +3 -3
  34. package/theme/ag-grid/index.css +1 -1
  35. package/theme/ag-grid/index.less +1 -1
  36. package/theme/ap-grid/index.css +1 -0
  37. package/theme/ap-grid/index.less +1 -0
  38. package/theme/ap-pro-card/index.css +22 -6
  39. package/theme/ap-pro-card/index.less +22 -7
  40. package/theme/css-var.css +32 -0
  41. package/theme/css-var.less +34 -0
  42. package/theme/index.css +56 -7
  43. package/es/src/ap-pro-card/utils/css-var.d.ts +0 -17
  44. package/es/src/ap-pro-card/utils/css-var.mjs +0 -29
  45. package/lib/src/ap-pro-card/utils/css-var.d.ts +0 -17
  46. package/lib/src/ap-pro-card/utils/css-var.js +0 -1
@@ -1,29 +1,29 @@
1
- import { defineComponent as $e, useSlots as We, getCurrentInstance as Me, ref as E, computed as n, unref as a, toRef as je, nextTick as He, watch as B, createElementBlock as P, openBlock as d, normalizeStyle as V, normalizeClass as g, createCommentVNode as w, createElementVNode as b, createVNode as _, mergeProps as R, createSlots as te, withCtx as h, Fragment as oe, renderList as K, createBlock as f, resolveDynamicComponent as L, renderSlot as D, normalizeProps as qe, guardReactiveProps as Ue } from "vue";
2
- import { VxeUI as ae, VxeTable as Ge, VxeColumn as re } from "vxe-table";
1
+ import { defineComponent as He, useSlots as Ue, getCurrentInstance as Ge, ref as I, computed as l, unref as r, toRef as Xe, nextTick as re, watch as B, createElementBlock as P, openBlock as i, normalizeStyle as V, normalizeClass as C, createCommentVNode as S, createElementVNode as R, createVNode as _, mergeProps as b, createSlots as L, withCtx as p, Fragment as ne, renderList as $, createBlock as c, resolveDynamicComponent as T, renderSlot as D, normalizeProps as Je, guardReactiveProps as Qe } from "vue";
2
+ import { VxeUI as le, VxeTable as Ye, VxeColumn as se } from "vxe-table";
3
3
  import "vxe-table/es/style.css";
4
- import { isUndefined as x, isFunction as le, omit as Xe } from "lodash-unified";
5
- import { ApForm as Je } from "../ap-form/index.mjs";
4
+ import { isUndefined as x, isFunction as O, isArray as Ze, omit as et } from "lodash-unified";
5
+ import { ApForm as tt } from "../ap-form/index.mjs";
6
6
  import "../config-provider/index.mjs";
7
- import { noRenderAsFormItemValueList as Qe } from "../ap-table/constants.mjs";
8
- import { getColumnOrder as ne, updateFormProps as Ye, getFieldProps as Ze, getSearchFormItemRenderNode as et, recursionApColumns as se } from "../ap-table/utils.mjs";
9
- import { useTablePaging as tt } from "../ap-table/hooks/use-table-paging-ng.mjs";
10
- import { Spin as ot, Empty as ie, Pagination as at } from "@aplus-frontend/antdv";
11
- import { useInnerParams as rt } from "./hooks/use-inner-params.mjs";
12
- import { toVxeProps as lt, getRowExpandProps as nt, getRowSelectionProps as st } from "./utils/table.mjs";
13
- import it from "./hooks/use-row-selection.mjs";
14
- import { useProvideApTable as dt } from "../ap-table/context.mjs";
15
- import { sizeReverseMap as ut, sizeMap as ct, ROW_SELECTION_FIELD as ft } from "./constants.mjs";
16
- import { useRenderColumns as pt } from "./hooks/use-render-columns.mjs";
17
- import { useToken as mt } from "@aplus-frontend/antdv/es/theme/internal";
7
+ import { noRenderAsFormItemValueList as ot } from "../ap-table/constants.mjs";
8
+ import { getColumnOrder as ie, updateFormProps as at, getFieldProps as rt, getSearchFormItemRenderNode as nt, recursionApColumns as de } from "../ap-table/utils.mjs";
9
+ import { useTablePaging as lt } from "../ap-table/hooks/use-table-paging-ng.mjs";
10
+ import { Spin as st, Empty as ue, Pagination as it } from "@aplus-frontend/antdv";
11
+ import { useInnerParams as dt } from "./hooks/use-inner-params.mjs";
12
+ import { toVxeProps as ut, getRowExpandProps as ct, getRowSelectionProps as ft } from "./utils/table.mjs";
13
+ import pt from "./hooks/use-row-selection.mjs";
14
+ import { useProvideApTable as mt } from "../ap-table/context.mjs";
15
+ import { sizeReverseMap as gt, sizeMap as ht, ROW_SELECTION_FIELD as Ct } from "./constants.mjs";
16
+ import { useRenderColumns as yt } from "./hooks/use-render-columns.mjs";
17
+ import { useToken as vt } from "@aplus-frontend/antdv/es/theme/internal";
18
18
  import "../scroll-bar/index.mjs";
19
- import { isDef as gt } from "../utils/index.mjs";
20
- import { getValidVNodeList as ht } from "../utils/slot.mjs";
21
- import { useTableStyle as Ct } from "./hooks/use-table-style.mjs";
22
- import { useNamespace as vt } from "../config-provider/hooks/use-namespace.mjs";
23
- import { useGlobalConfig as yt } from "../config-provider/hooks/use-global-config.mjs";
24
- import { useLocale as St } from "../config-provider/hooks/use-locale.mjs";
25
- import wt from "../scroll-bar/index.vue.mjs";
26
- const Gt = /* @__PURE__ */ $e({
19
+ import { isDef as wt } from "../utils/index.mjs";
20
+ import { getValidVNodeList as St } from "../utils/slot.mjs";
21
+ import { useTableStyle as Rt } from "./hooks/use-table-style.mjs";
22
+ import { useNamespace as bt } from "../config-provider/hooks/use-namespace.mjs";
23
+ import { useGlobalConfig as xt } from "../config-provider/hooks/use-global-config.mjs";
24
+ import { useLocale as kt } from "../config-provider/hooks/use-locale.mjs";
25
+ import Ft from "../scroll-bar/index.vue.mjs";
26
+ const Yt = /* @__PURE__ */ He({
27
27
  name: "ApGrid",
28
28
  __name: "index",
29
29
  props: {
@@ -112,242 +112,258 @@ const Gt = /* @__PURE__ */ $e({
112
112
  expandable: {},
113
113
  value: {},
114
114
  rowHighlightable: { type: [Boolean, Function], default: !1 },
115
- treeConfig: {}
115
+ treeConfig: {},
116
+ onReady: {}
116
117
  },
117
- setup(de, { expose: ue }) {
118
- var ee;
119
- const v = We(), o = de, k = (ee = Me()) == null ? void 0 : ee.appContext.app;
120
- k && !k.__VXE_PC_UI_INSTALLED__ && (k.use(ae), k.__VXE_PC_UI_INSTALLED__ = !0);
121
- const { e: F, b: u, be: ce } = vt("ap-grid"), fe = yt("valueTypeMap"), i = E([]), O = E([]), s = E(), I = E(o.size), pe = Ct(), [, me] = mt(), { t: ge } = St();
122
- ae.setConfig({
123
- i18n: (e, t) => ge(`ap.${e}`, t)
118
+ setup(ce, { expose: fe }) {
119
+ var oe;
120
+ const v = Ue(), o = ce, k = (oe = Ge()) == null ? void 0 : oe.appContext.app;
121
+ k && !k.__VXE_PC_UI_INSTALLED__ && (k.use(le), k.__VXE_PC_UI_INSTALLED__ = !0);
122
+ const { e: F, b: f, be: pe } = bt("ap-grid"), me = xt("valueTypeMap"), d = I([]), W = I([]), s = I(), E = I(o.size), ge = Rt(), [, he] = vt(), { t: Ce } = kt();
123
+ le.setConfig({
124
+ i18n: (e, t) => Ce(`ap.${e}`, t)
124
125
  });
125
- const { renderConfig: he, updateSignal: Ce } = pt(i);
126
- let $ = 0;
127
- const ve = n(() => {
126
+ const { renderConfig: ye, updateSignal: ve } = yt(d);
127
+ let M = 0;
128
+ const we = l(() => {
128
129
  if (s.value)
129
130
  return s.value.$el.querySelector(
130
131
  ".vxe-table--header-inner-wrapper"
131
132
  );
132
- }), W = n(() => {
133
- var e, t, l;
134
- return $++, ((l = (t = (e = o.columns) == null ? void 0 : e.filter(
135
- (r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !Qe.includes(r.valueType)
136
- )) == null ? void 0 : t.sort((r, c) => {
137
- let S = ne(r.order);
138
- return ne(c.order) - S;
139
- })) == null ? void 0 : l.map((r) => {
140
- const c = Ye(
141
- r,
142
- Ze(r.fieldProps, {})
143
- ), S = {
144
- ...r,
133
+ }), j = l(() => {
134
+ var e, t, n;
135
+ return M++, ((n = (t = (e = o.columns) == null ? void 0 : e.filter(
136
+ (a) => !a.hideInSearch && a.dataIndex && (a.valueType || a.customRenderFormItem) && !ot.includes(a.valueType)
137
+ )) == null ? void 0 : t.sort((a, u) => {
138
+ let h = ie(a.order);
139
+ return ie(u.order) - h;
140
+ })) == null ? void 0 : n.map((a) => {
141
+ const u = at(
142
+ a,
143
+ rt(a.fieldProps, {})
144
+ ), h = {
145
+ ...a,
145
146
  fieldProps: {
146
- label: r.title,
147
- name: r.dataIndex,
147
+ label: a.title,
148
+ name: a.dataIndex,
148
149
  // tips: 在表格中的查询表单项默认是带边框的
149
150
  bordered: !0,
150
- ...c || {},
151
- _signal: $
151
+ ...u || {},
152
+ _signal: M
152
153
  },
153
154
  renderNode: void 0
154
155
  };
155
- return S.renderNode = et(
156
- S,
157
- a(fe)
158
- ), S;
156
+ return h.renderNode = nt(
157
+ h,
158
+ r(me)
159
+ ), h;
159
160
  })) || [];
160
- }), ye = n(() => {
161
+ }), Se = l(() => {
161
162
  var t;
162
- return gt(o.manual) ? o.manual : ht(((t = v.searchFormExtra) == null ? void 0 : t.call(v)) || []).some((l) => {
163
- var r;
164
- return ((r = l.type) == null ? void 0 : r.name) === "ApView";
163
+ return wt(o.manual) ? o.manual : St(((t = v.searchFormExtra) == null ? void 0 : t.call(v)) || []).some((n) => {
164
+ var a;
165
+ return ((a = n.type) == null ? void 0 : a.name) === "ApView";
165
166
  });
166
- }), Se = n(() => [
167
- u(),
168
- o.card ? null : u("wrapper"),
169
- o.adaptive ? u("adaptive") : null,
170
- o.sticky ? u("sticky") : null
171
- ].filter(Boolean)), M = n(() => se(a(i), (e) => {
167
+ }), Re = l(() => [
168
+ f(),
169
+ o.card ? null : f("wrapper"),
170
+ o.adaptive ? f("adaptive") : null,
171
+ o.sticky ? f("sticky") : null
172
+ ].filter(Boolean)), q = l(() => de(r(d), (e) => {
172
173
  if (e.sorter === !0)
173
174
  return e.key || e.dataIndex;
174
- }).filter(Boolean)), j = n(() => se(a(i), (e) => {
175
+ }).filter(Boolean)), H = l(() => de(r(d), (e) => {
175
176
  if (e.filters && !e.onFilter)
176
177
  return e.key || e.dataIndex;
177
178
  }).filter(Boolean)), {
178
- formRef: C,
179
- submit: T,
180
- reset: N,
181
- refresh: H,
182
- data: p,
183
- tableProps: q,
184
- setDataSource: we,
185
- handleTableChangeOptional: be,
186
- getPaging: Re,
187
- setPaging: xe,
188
- submitWith: U
189
- } = tt({
179
+ formRef: y,
180
+ submit: N,
181
+ reset: z,
182
+ refresh: U,
183
+ data: m,
184
+ tableProps: G,
185
+ setDataSource: be,
186
+ handleTableChangeOptional: xe,
187
+ getPaging: ke,
188
+ setPaging: Fe,
189
+ submitWith: X
190
+ } = lt({
190
191
  async request(e) {
191
- var l;
192
- if (!m.value.preserveSelectedRowKeys && x(o.dataSource) && A(), !x(o.dataSource)) {
193
- const r = e.pageSize * (e.current - 1);
192
+ var n;
193
+ if (!g.value.preserveSelectedRowKeys && x(o.dataSource) && K(), !x(o.dataSource)) {
194
+ const a = e.pageSize * (e.current - 1);
194
195
  return {
195
- data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(r, r + e.pageSize)) || [],
196
+ data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(a, a + e.pageSize)) || [],
196
197
  total: o.dataSource.length || 0
197
198
  };
198
199
  }
199
- const t = await ((l = o.request) == null ? void 0 : l.call(o, e));
200
+ const t = await ((n = o.request) == null ? void 0 : n.call(o, e));
200
201
  return {
201
202
  data: (t == null ? void 0 : t.data) || [],
202
203
  total: (t == null ? void 0 : t.total) || 0
203
204
  };
204
205
  },
205
206
  namespace: "ap-grid",
206
- filterFields: j,
207
- sortFields: M,
208
- params: je(o, "params"),
207
+ filterFields: H,
208
+ sortFields: q,
209
+ params: Xe(o, "params"),
209
210
  defaultData: o.defaultData,
210
- manual: a(ye),
211
+ manual: r(Se),
211
212
  formatParams: o.beforeSearchSubmit,
212
213
  pagination: o.pagination,
213
- onClickReset: De,
214
- onAfterRequest: Z
215
- }), { sortChangeEvent: ke, filterChangeEvent: Fe, paginationChangeEvent: Ie } = rt(be);
216
- dt({
217
- columns: n(() => i.value),
218
- columnsBackup: n(() => O.value),
219
- size: n(() => ct[I.value]),
214
+ onClickReset: Oe,
215
+ onAfterRequest: We
216
+ }), { sortChangeEvent: Ee, filterChangeEvent: Ie, paginationChangeEvent: Be } = dt(xe);
217
+ mt({
218
+ columns: l(() => d.value),
219
+ columnsBackup: l(() => W.value),
220
+ size: l(() => ht[E.value]),
220
221
  updateColumns(e) {
221
222
  var t;
222
- i.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e);
223
+ d.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e);
223
224
  },
224
225
  updateSize(e) {
225
- I.value = ut[e];
226
+ E.value = gt[e];
226
227
  },
227
- renderConfig: n(() => ({
228
- className: ce("table-header", "title"),
229
- color: me.value.colorTextTertiary
228
+ renderConfig: l(() => ({
229
+ className: pe("table-header", "title"),
230
+ color: he.value.colorTextTertiary
230
231
  })),
231
- dataSource: n(() => a(p).records),
232
- getSearchFormValues: X,
233
- setSearchFormValues: G,
234
- submit: T,
235
- submitWith: U,
236
- reset: N,
237
- refresh: H,
238
- getSearchFormSorterItems: J,
239
- setSearchFormSorterItems: Q,
240
- resetSearchFormSorterItems: Y
232
+ dataSource: l(() => r(m).records),
233
+ getSearchFormValues: Q,
234
+ setSearchFormValues: J,
235
+ submit: N,
236
+ submitWith: X,
237
+ reset: z,
238
+ refresh: U,
239
+ getSearchFormSorterItems: Y,
240
+ setSearchFormSorterItems: Z,
241
+ resetSearchFormSorterItems: ee
241
242
  });
242
- const Ee = n(
243
- () => i.value.some(
243
+ const Pe = l(
244
+ () => d.value.some(
244
245
  (e) => e.fixed === "left" || e.fixed === !0
245
246
  ) ? "left" : void 0
246
- ), Be = n(
247
- () => x(o.loading) ? p.loading : o.loading
248
- ), Pe = n(
249
- () => x(o.dataSource) ? p.records : o.dataSource
250
- ), { selectedRows: z, rowSelection: m, ...y } = it({
247
+ ), Te = l(
248
+ () => x(o.loading) ? m.loading : o.loading
249
+ ), Ne = l(
250
+ () => x(o.dataSource) ? m.records : o.dataSource
251
+ ), { selectedRows: A, rowSelection: g, ...w } = pt({
251
252
  ...o.rowSelection === !0 ? {} : o.rowSelection,
252
- dataSource: Pe,
253
+ dataSource: Ne,
253
254
  rowKey: o.rowKey
254
- }), Te = ({
255
+ }), ze = ({
255
256
  checked: e
256
257
  }) => {
257
258
  const t = s.value;
258
- t && t && y.selectChange(
259
+ t && t && w.selectChange(
259
260
  e,
260
261
  t.getCheckboxRecords(),
261
262
  t.getCheckboxReserveRecords()
262
263
  );
263
- }, Ne = ({
264
+ }, Ae = ({
264
265
  checked: e
265
266
  }) => {
266
267
  const t = s.value;
267
- t && y.selectAllChange(e, [
268
+ t && w.selectAllChange(e, [
268
269
  ...t.getCheckboxReserveRecords(),
269
270
  ...t.getCheckboxRecords()
270
271
  ]);
271
- }, ze = () => {
272
+ }, Ke = () => {
272
273
  const e = s.value;
273
- e && y.selectRangeChange(e.getCheckboxRecords(), [
274
+ e && w.selectRangeChange(e.getCheckboxRecords(), [
274
275
  ...e.getCheckboxReserveRecords(),
275
276
  ...e.getCheckboxRecords()
276
277
  ]);
277
- }, Ae = () => {
278
+ }, Ve = () => {
278
279
  const e = s.value;
279
- e && (z.value = [e.getRadioRecord()]);
280
- }, Ve = ({
280
+ e && (A.value = [e.getRadioRecord()]);
281
+ }, _e = ({
281
282
  row: e
282
283
  }) => {
283
284
  const t = o.rowHighlightable;
284
- le(t) && t(e);
285
+ O(t) && t(e);
285
286
  };
286
- function _e() {
287
+ function Le() {
287
288
  var e;
288
289
  return ((e = o.columns) == null ? void 0 : e.filter((t) => !t.hideInTable)) || [];
289
290
  }
290
- function G(e) {
291
- var t, l, r;
292
- (r = (l = (t = C.value) == null ? void 0 : t.apForm) == null ? void 0 : l.setFieldsValue) == null || r.call(l, e);
291
+ function J(e) {
292
+ var t, n, a;
293
+ (a = (n = (t = y.value) == null ? void 0 : t.apForm) == null ? void 0 : n.setFieldsValue) == null || a.call(n, e);
293
294
  }
294
- function X(e = !1) {
295
- var l, r, c;
295
+ function Q(e = !1) {
296
+ var n, a, u;
296
297
  const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
297
- return (c = (r = (l = C.value) == null ? void 0 : l.apForm) == null ? void 0 : r[t]) == null ? void 0 : c.call(r, !0);
298
+ return (u = (a = (n = y.value) == null ? void 0 : n.apForm) == null ? void 0 : a[t]) == null ? void 0 : u.call(a, !0);
298
299
  }
299
- function J() {
300
+ function Y() {
300
301
  var e;
301
- return ((e = C.value) == null ? void 0 : e.getSorterItems()) || [];
302
+ return ((e = y.value) == null ? void 0 : e.getSorterItems()) || [];
302
303
  }
303
- function Q(e) {
304
+ function Z(e) {
304
305
  var t;
305
- (t = C.value) == null || t.setSorterItems(e);
306
+ (t = y.value) == null || t.setSorterItems(e);
306
307
  }
307
- function Y() {
308
+ function ee() {
308
309
  var e;
309
- (e = C.value) == null || e.resetSorterItems();
310
+ (e = y.value) == null || e.resetSorterItems();
310
311
  }
311
- function A() {
312
- y.clearAll();
312
+ function K() {
313
+ w.clearAll();
313
314
  const e = s.value;
314
- e && (m.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
315
+ e && (g.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
315
316
  }
316
- function Ke(e) {
317
- le(o.rowKey) || (y.selectMultiByKeys(e), Z());
317
+ function $e(e) {
318
+ O(o.rowKey) || (w.selectMultiByKeys(e), te());
318
319
  }
319
- function Le(e) {
320
+ function De(e) {
320
321
  const t = s.value;
321
322
  if (!t)
322
323
  return;
323
- const l = String(e[o.rowKey]), r = t.getRowById(l);
324
- t.setCurrentRow(r);
324
+ const n = String(e[o.rowKey]), a = t.getRowById(n);
325
+ t.setCurrentRow(a);
325
326
  }
326
- function De() {
327
+ function Oe() {
327
328
  const e = s.value;
328
329
  e && (e.clearSort(), e.clearFilter());
329
330
  }
330
- function Z() {
331
- He(() => {
331
+ function te() {
332
+ re(() => {
332
333
  var e, t;
333
- m.value.type === "radio" ? (e = s.value) == null || e.setRadioRowKey(m.value.selectedRowKeys[0]) : (t = s.value) == null || t.setCheckboxRowKey(
334
- m.value.selectedRowKeys,
334
+ g.value.type === "radio" ? (e = s.value) == null || e.setRadioRowKey(g.value.selectedRowKeys[0]) : (t = s.value) == null || t.setCheckboxRowKey(
335
+ g.value.selectedRowKeys,
335
336
  !0
336
337
  );
337
338
  });
338
339
  }
339
- async function Oe(e, t) {
340
- var r;
341
- const l = p.records[e];
342
- if (l)
343
- return (r = s.value) == null ? void 0 : r.scrollToRow(l, t);
340
+ function We(e) {
341
+ te(), o.onReady && re(() => {
342
+ o.onReady(e);
343
+ });
344
+ }
345
+ async function Me(e, t) {
346
+ var a;
347
+ const n = m.records[e];
348
+ if (n)
349
+ return (a = s.value) == null ? void 0 : a.scrollToRow(n, t);
350
+ }
351
+ const je = (e) => O(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
352
+ async function qe(e, t = !0) {
353
+ const n = s.value;
354
+ if (!n)
355
+ return;
356
+ const a = Ze(e) ? e : [e], h = (n.getData() || []).filter(
357
+ (ae) => a.includes(je(ae))
358
+ );
359
+ n.setRowExpand(h, t);
344
360
  }
345
361
  return B(
346
362
  () => [o.columnResizable, o.columns],
347
363
  () => {
348
364
  var t;
349
- const e = _e();
350
- i.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e), O.value = e;
365
+ const e = Le();
366
+ d.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e), W.value = e;
351
367
  },
352
368
  {
353
369
  deep: !0,
@@ -356,11 +372,11 @@ const Gt = /* @__PURE__ */ $e({
356
372
  ), B(
357
373
  () => o.dataSource,
358
374
  (e) => {
359
- we(e);
375
+ be(e);
360
376
  },
361
377
  { immediate: !0, deep: !0 }
362
378
  ), B(
363
- () => a(p).loading,
379
+ () => r(m).loading,
364
380
  (e) => {
365
381
  var t;
366
382
  (t = o.onLoadingChange) == null || t.call(o, e);
@@ -368,163 +384,180 @@ const Gt = /* @__PURE__ */ $e({
368
384
  ), B(
369
385
  () => o.size,
370
386
  (e) => {
371
- I.value = e;
387
+ E.value = e;
372
388
  }
373
- ), ue({
374
- submit: T,
375
- reset: N,
376
- refresh: H,
377
- submitWith: U,
378
- setSearchFormValues: G,
379
- getSearchFormValues: X,
380
- getShowColumns: () => a(i),
389
+ ), fe({
390
+ submit: N,
391
+ reset: z,
392
+ refresh: U,
393
+ submitWith: X,
394
+ setSearchFormValues: J,
395
+ getSearchFormValues: Q,
396
+ getShowColumns: () => r(d),
381
397
  rowSelection: {
382
- selectedRows: n(() => z.value),
383
- setSelectedRowKeys: Ke,
384
- clearAll: A
398
+ selectedRows: l(() => A.value),
399
+ setSelectedRowKeys: $e,
400
+ clearAll: K
385
401
  },
386
- scrollToRow: Oe,
387
- getDataSource: () => a(p.records),
388
- setCurrentRow: Le,
389
- getPaging: Re,
390
- setPaging: xe,
391
- getSearchFormSorterItems: J,
392
- setSearchFormSorterItems: Q,
393
- resetSearchFormSorterItems: Y
394
- }), (e, t) => (d(), P("div", {
395
- class: g(Se.value),
402
+ scrollToRow: Me,
403
+ getDataSource: () => r(m.records),
404
+ setCurrentRow: De,
405
+ getPaging: ke,
406
+ setPaging: Fe,
407
+ getSearchFormSorterItems: Y,
408
+ setSearchFormSorterItems: Z,
409
+ resetSearchFormSorterItems: ee,
410
+ setRowExpand: qe
411
+ }), (e, t) => (i(), P("div", {
412
+ class: C(Re.value),
396
413
  style: V(e.wrapperStyle)
397
414
  }, [
398
- a(x)(e.dataSource) && e.searchForm !== !1 && W.value.length > 0 ? (d(), P("div", {
415
+ r(x)(e.dataSource) && e.searchForm !== !1 && j.value.length > 0 ? (i(), P("div", {
399
416
  key: 0,
400
- class: g(e.card ? a(F)("search-wrapper") : null),
417
+ class: C(e.card ? r(F)("search-wrapper") : null),
401
418
  style: V(e.searchFormWrapperStyle)
402
419
  }, [
403
- _(a(Je).SearchForm, R(e.searchForm || {}, {
420
+ _(r(tt).SearchForm, b(e.searchForm || {}, {
404
421
  ref_key: "formRef",
405
- ref: C,
422
+ ref: y,
406
423
  "custom-reset": "",
407
- "submit-loading": a(q).loading,
408
- onSubmit: a(T),
409
- onReset: a(N)
410
- }), te({
411
- default: h(() => [
412
- (d(!0), P(oe, null, K(W.value, (l) => (d(), f(L(l.renderNode), {
413
- key: l.dataIndex
424
+ "submit-loading": r(G).loading,
425
+ onSubmit: r(N),
426
+ onReset: r(z)
427
+ }), L({
428
+ default: p(() => [
429
+ (i(!0), P(ne, null, $(j.value, (n) => (i(), c(T(n.renderNode), {
430
+ key: n.dataIndex
414
431
  }))), 128))
415
432
  ]),
416
433
  _: 2
417
434
  }, [
418
435
  v.searchFormExtra ? {
419
436
  name: "extra",
420
- fn: h(() => [
437
+ fn: p(() => [
421
438
  D(e.$slots, "searchFormExtra")
422
439
  ]),
423
440
  key: "0"
424
441
  } : void 0
425
442
  ]), 1040, ["submit-loading", "onSubmit", "onReset"])
426
- ], 6)) : w("", !0),
427
- b("div", {
428
- class: g([a(F)("table-wrapper"), e.card ? a(F)("table-wrapper-card") : null]),
443
+ ], 6)) : S("", !0),
444
+ R("div", {
445
+ class: C([r(F)("table-wrapper"), e.card ? r(F)("table-wrapper-card") : null]),
429
446
  style: V(e.tableWrapperStyle)
430
447
  }, [
431
- b("div", {
432
- class: g(a(u)("header-wrapper"))
448
+ R("div", {
449
+ class: C(r(f)("header-wrapper"))
433
450
  }, [
434
451
  D(e.$slots, "title", {
435
- selectedRows: a(z),
436
- selectedRowKeys: a(m).selectedRowKeys,
437
- shownColumns: i.value,
438
- clearAll: A
452
+ selectedRows: r(A),
453
+ selectedRowKeys: r(g).selectedRowKeys,
454
+ shownColumns: d.value,
455
+ clearAll: K
439
456
  })
440
457
  ], 2),
441
- b("div", {
442
- class: g(a(u)("vxe-wrapper"))
458
+ R("div", {
459
+ class: C(r(f)("vxe-wrapper"))
443
460
  }, [
444
- (d(), f(a(Ge), R(a(lt)(o), {
461
+ (i(), c(r(Ye), b(r(ut)(o), {
445
462
  ref_key: "tableRef",
446
463
  ref: s,
447
- key: a(Ce),
448
- data: a(p).records,
464
+ key: r(ve),
465
+ data: r(m).records,
449
466
  "sort-config": {
450
- remote: M.value.length > 0,
467
+ remote: q.value.length > 0,
451
468
  trigger: "cell"
452
469
  },
453
470
  "filter-config": {
454
- remote: j.value.length > 0
471
+ remote: H.value.length > 0
455
472
  },
456
- loading: Be.value,
457
- style: a(pe),
458
- size: I.value,
459
- onSortChange: a(ke),
460
- onFilterChange: a(Fe),
461
- onCheckboxChange: Te,
462
- onCheckboxRangeChange: ze,
463
- onCheckboxAll: Ne,
464
- onRadioChange: Ae,
465
- onCurrentRowChange: Ve
466
- }), te({
467
- empty: h(() => [
468
- _(a(ie), {
469
- image: a(ie).PRESENTED_IMAGE_SIMPLE
473
+ loading: Te.value,
474
+ style: r(ge),
475
+ size: E.value,
476
+ onSortChange: r(Ee),
477
+ onFilterChange: r(Ie),
478
+ onCheckboxChange: ze,
479
+ onCheckboxRangeChange: Ke,
480
+ onCheckboxAll: Ae,
481
+ onRadioChange: Ve,
482
+ onCurrentRowChange: _e
483
+ }), L({
484
+ empty: p(() => [
485
+ _(r(ue), {
486
+ image: r(ue).PRESENTED_IMAGE_SIMPLE
470
487
  }, null, 8, ["image"])
471
488
  ]),
472
- loading: h(() => [
473
- b("div", {
474
- class: g(a(F)("table-loading-wrapper"))
489
+ loading: p(() => [
490
+ R("div", {
491
+ class: C(r(F)("table-loading-wrapper"))
475
492
  }, [
476
- _(a(ot))
493
+ _(r(st))
477
494
  ], 2)
478
495
  ]),
479
- default: h(() => [
480
- o.expandable && i.value.length ? (d(), f(a(re), R({ key: 0 }, a(nt)(e.expandable), { fixed: Ee.value }), {
481
- content: h((l) => [
482
- (d(), f(L(o.expandable.renderContent(l))))
483
- ]),
484
- _: 1
485
- }, 16, ["fixed"])) : w("", !0),
486
- o.rowSelection && i.value.length ? (d(), f(a(re), R(
487
- { key: 1 },
488
- a(st)(a(m), i.value, o.size),
489
- {
490
- resizable: !1,
491
- field: a(ft)
492
- }
493
- ), null, 16, ["field"])) : w("", !0),
494
- (d(!0), P(oe, null, K(a(he), (l) => (d(), f(L(l), {
495
- key: l.props.colId
496
- }))), 128))
497
- ]),
496
+ default: p(() => {
497
+ var n;
498
+ return [
499
+ o.expandable && d.value.length ? (i(), c(r(se), b({ key: 0 }, r(ct)(e.expandable), { fixed: Pe.value }), L({
500
+ content: p((a) => [
501
+ (i(), c(T(o.expandable.renderContent(a))))
502
+ ]),
503
+ _: 2
504
+ }, [
505
+ (n = e.expandable) != null && n.renderCell ? {
506
+ name: "default",
507
+ fn: p((a) => [
508
+ (i(), c(T(
509
+ e.expandable.renderCell(
510
+ a.$table.isRowExpandByRow(a.row),
511
+ a.row
512
+ )
513
+ )))
514
+ ]),
515
+ key: "0"
516
+ } : void 0
517
+ ]), 1040, ["fixed"])) : S("", !0),
518
+ o.rowSelection && d.value.length ? (i(), c(r(se), b(
519
+ { key: 1 },
520
+ r(ft)(r(g), d.value, o.size),
521
+ {
522
+ resizable: !1,
523
+ field: r(Ct)
524
+ }
525
+ ), null, 16, ["field"])) : S("", !0),
526
+ (i(!0), P(ne, null, $(r(ye), (a) => (i(), c(T(a), {
527
+ key: a.props.colId
528
+ }))), 128))
529
+ ];
530
+ }),
498
531
  _: 2
499
532
  }, [
500
- K(a(Xe)(v, ["searchFormExtra"]), (l, r) => ({
501
- name: r,
502
- fn: h((c) => [
503
- D(e.$slots, r, qe(Ue(c || {})))
533
+ $(r(et)(v, ["searchFormExtra"]), (n, a) => ({
534
+ name: a,
535
+ fn: p((u) => [
536
+ D(e.$slots, a, Je(Qe(u || {})))
504
537
  ])
505
538
  }))
506
539
  ]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
507
540
  ], 2),
508
- b("div", {
509
- class: g(a(u)("pagination-wrapper"))
541
+ R("div", {
542
+ class: C(r(f)("pagination-wrapper"))
510
543
  }, [
511
- e.sticky ? (d(), f(a(wt), {
544
+ e.sticky ? (i(), c(r(Ft), {
512
545
  key: 0,
513
546
  direction: "horizontal",
514
- "scroll-container": ve.value,
547
+ "scroll-container": we.value,
515
548
  "extra-size": -4.2,
516
549
  "bar-color": "var(--ap-scrollbar-thumb-color-base)",
517
550
  "track-color": "var(--ap-table-header-bg, #f2f6f9)"
518
- }, null, 8, ["scroll-container"])) : w("", !0),
519
- e.pagination !== !1 ? (d(), f(a(at), R({
551
+ }, null, 8, ["scroll-container"])) : S("", !0),
552
+ e.pagination !== !1 ? (i(), c(r(it), b({
520
553
  key: 1,
521
- class: a(u)("pagination")
522
- }, a(q).pagination, { onChange: a(Ie) }), null, 16, ["class", "onChange"])) : w("", !0)
554
+ class: r(f)("pagination")
555
+ }, r(G).pagination, { onChange: r(Be) }), null, 16, ["class", "onChange"])) : S("", !0)
523
556
  ], 2)
524
557
  ], 6)
525
558
  ], 6));
526
559
  }
527
560
  });
528
561
  export {
529
- Gt as default
562
+ Yt as default
530
563
  };