@aplus-frontend/ui 0.5.4 → 0.5.6

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 (40) hide show
  1. package/es/src/ap-grid/index.vue.mjs +140 -131
  2. package/es/src/ap-grid/utils/table.d.ts +3 -2
  3. package/es/src/ap-grid/utils/table.mjs +37 -30
  4. package/es/src/ap-table/ap-table.vue2.mjs +172 -159
  5. package/es/src/ap-table/context.d.ts +4 -4
  6. package/es/src/ap-table/hooks/use-sorted-filtered.d.ts +4 -1
  7. package/es/src/ap-table/hooks/use-sorted-filtered.mjs +11 -9
  8. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +3 -1
  9. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +53 -49
  10. package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -1
  11. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +2 -2
  12. package/es/src/business/ap-batch-action-group/index.d.ts +4 -4
  13. package/es/src/config-provider/hooks/use-namespace.d.ts +5 -1
  14. package/es/src/locale/lang/en.mjs +5 -3
  15. package/es/src/locale/lang/zh-cn.mjs +5 -3
  16. package/lib/src/ap-grid/index.vue.js +1 -1
  17. package/lib/src/ap-grid/utils/table.d.ts +3 -2
  18. package/lib/src/ap-grid/utils/table.js +1 -1
  19. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  20. package/lib/src/ap-table/context.d.ts +4 -4
  21. package/lib/src/ap-table/hooks/use-sorted-filtered.d.ts +4 -1
  22. package/lib/src/ap-table/hooks/use-sorted-filtered.js +1 -1
  23. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +3 -1
  24. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  25. package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -1
  26. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +2 -2
  27. package/lib/src/business/ap-batch-action-group/index.d.ts +4 -4
  28. package/lib/src/config-provider/hooks/use-namespace.d.ts +5 -1
  29. package/lib/src/locale/lang/en.js +1 -1
  30. package/lib/src/locale/lang/zh-cn.js +1 -1
  31. package/package.json +3 -3
  32. package/theme/antd-global-overwrite/aplus/field.css +6 -0
  33. package/theme/antd-global-overwrite/aplus/field.less +7 -0
  34. package/theme/antd-global-overwrite/aplus/index.css +6 -0
  35. package/theme/antd-global-overwrite/aplus/index.less +1 -0
  36. package/theme/ap-grid/index.css +0 -1
  37. package/theme/ap-grid/index.less +0 -1
  38. package/theme/index.css +0 -1
  39. package/es/src/ap-grid/hooks/use-load-vxe.mjs +0 -32
  40. package/lib/src/ap-grid/hooks/use-load-vxe.js +0 -1
@@ -1,25 +1,28 @@
1
- import { defineComponent as Ce, useSlots as be, ref as x, computed as n, unref as o, watch as E, createElementBlock as R, openBlock as s, normalizeStyle as N, normalizeClass as f, createCommentVNode as w, createElementVNode as k, createVNode as q, mergeProps as g, createSlots as _, withCtx as v, Fragment as G, renderList as z, createBlock as u, resolveDynamicComponent as T, renderSlot as A, normalizeProps as Se, guardReactiveProps as xe } from "vue";
2
- import { VxeTable as Re, VxeColumn as U } from "vxe-table";
3
- import { isUndefined as F, omit as ke } from "lodash-unified";
4
- import { ApForm as Fe } from "../ap-form/index.mjs";
1
+ import { defineComponent as ke, useSlots as Fe, getCurrentInstance as Be, ref as R, computed as n, unref as o, watch as N, createElementBlock as k, openBlock as s, normalizeStyle as z, normalizeClass as f, createCommentVNode as C, createElementVNode as F, createVNode as U, mergeProps as g, createSlots as G, withCtx as v, Fragment as X, renderList as T, createBlock as u, resolveDynamicComponent as A, renderSlot as _, normalizeProps as J, guardReactiveProps as Ie } from "vue";
2
+ import { VxeTable as Pe, VxeColumn as Q } from "vxe-table";
3
+ import "vxe-table/lib/style.css";
4
+ import "vxe-pc-ui/lib/style.css";
5
+ import { VxeUI as V } from "vxe-pc-ui";
6
+ import { isUndefined as B, omit as Ee } from "lodash-unified";
7
+ import { ApForm as Ne } from "../ap-form/index.mjs";
5
8
  import "../config-provider/index.mjs";
6
- import { noRenderAsFormItemValueList as Be } from "../ap-table/constants.mjs";
7
- import { getColumnOrder as J, updateFormProps as Pe, getFieldProps as Ie, getSearchFormItemRenderNode as Ee, recursionApColumns as Q } from "../ap-table/utils.mjs";
8
- import { useTablePaging as Ne } from "../ap-table/hooks/use-table-paging-ng.mjs";
9
- import { Empty as X, Pagination as ze } from "@aplus-frontend/antdv";
10
- import { useInnerParams as Te } from "./hooks/use-inner-params.mjs";
11
- import { toVxeProps as Ae, getRowExpandProps as Ve, getRowSelectionProps as Oe } from "./utils/table.mjs";
12
- import Ke from "../ap-table/hooks/use-table-row-selection.mjs";
13
- import { useProvideApTable as De } from "../ap-table/context.mjs";
14
- import { sizeReverseMap as Le, sizeMap as $e } from "./constants.mjs";
15
- import { useRenderColumns as je } from "./hooks/use-render-columns.mjs";
16
- import { useToken as He } from "@aplus-frontend/antdv/es/theme/internal";
9
+ import { noRenderAsFormItemValueList as ze } from "../ap-table/constants.mjs";
10
+ import { getColumnOrder as Y, updateFormProps as Te, getFieldProps as Ae, getSearchFormItemRenderNode as _e, recursionApColumns as Z } from "../ap-table/utils.mjs";
11
+ import { useTablePaging as Ve } from "../ap-table/hooks/use-table-paging-ng.mjs";
12
+ import { Empty as ee, Pagination as Le } from "@aplus-frontend/antdv";
13
+ import { useInnerParams as Oe } from "./hooks/use-inner-params.mjs";
14
+ import { toVxeProps as De, getRowExpandProps as Ke, getRowSelectionProps as $e } from "./utils/table.mjs";
15
+ import je from "../ap-table/hooks/use-table-row-selection.mjs";
16
+ import { useProvideApTable as He } from "../ap-table/context.mjs";
17
+ import { sizeReverseMap as We, sizeMap as Me } from "./constants.mjs";
18
+ import { useRenderColumns as qe } from "./hooks/use-render-columns.mjs";
19
+ import { useToken as Ue } from "@aplus-frontend/antdv/es/theme/internal";
17
20
  import "../scroll-bar/index.mjs";
18
- import { useLoadVxe as We } from "./hooks/use-load-vxe.mjs";
19
- import { useNamespace as Me } from "../config-provider/hooks/use-namespace.mjs";
20
- import { useGlobalConfig as qe } from "../config-provider/hooks/use-global-config.mjs";
21
- import _e from "../scroll-bar/index.vue.mjs";
22
- const vo = /* @__PURE__ */ Ce({
21
+ import { useNamespace as Ge } from "../config-provider/hooks/use-namespace.mjs";
22
+ import { useGlobalConfig as Xe } from "../config-provider/hooks/use-global-config.mjs";
23
+ import { useLocale as Je } from "../config-provider/hooks/use-locale.mjs";
24
+ import Qe from "../scroll-bar/index.vue.mjs";
25
+ const Ro = /* @__PURE__ */ ke({
23
26
  name: "ApGrid",
24
27
  __name: "index",
25
28
  props: {
@@ -103,66 +106,72 @@ const vo = /* @__PURE__ */ Ce({
103
106
  expandable: {},
104
107
  value: {}
105
108
  },
106
- setup(Y, { expose: Z }) {
107
- const V = be(), a = Y, { e: B, b: i, be: ee } = Me("ap-grid"), oe = qe("valueTypeMap");
108
- We();
109
- const d = x([]), O = x([]), p = x(), C = x(a.size), [, m] = He(), { renderConfig: ae, updateSignal: re } = je(d);
110
- let K = 0;
111
- const te = n(() => {
109
+ setup(oe, { expose: ae }) {
110
+ var q;
111
+ console.log(V);
112
+ const L = Fe(), a = oe, w = (q = Be()) == null ? void 0 : q.appContext.app;
113
+ w && !w.__VXE_PC_UI_INSTALLED__ && (w.use(V), w.__VXE_PC_UI_INSTALLED__ = !0);
114
+ const { e: I, b: i, be: re } = Ge("ap-grid"), te = Xe("valueTypeMap"), d = R([]), O = R([]), p = R(), b = R(a.size), [, m] = Ue(), { t: le } = Je();
115
+ V.setConfig({
116
+ i18n: (e, l) => le(`ap.${e}`, l)
117
+ });
118
+ const { renderConfig: ne, updateSignal: se } = qe(d);
119
+ let D = 0;
120
+ const de = n(() => {
112
121
  if (p.value)
113
122
  return p.value.$el.querySelector(
114
123
  ".vxe-table--header-inner-wrapper"
115
124
  );
116
- }), D = n(() => {
125
+ }), K = n(() => {
117
126
  var e, l, t;
118
- return K++, ((t = (l = (e = a.columns) == null ? void 0 : e.filter(
119
- (r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !Be.includes(r.valueType)
127
+ return D++, ((t = (l = (e = a.columns) == null ? void 0 : e.filter(
128
+ (r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !ze.includes(r.valueType)
120
129
  )) == null ? void 0 : l.sort((r, c) => {
121
- let y = J(r.order);
122
- return J(c.order) - y;
130
+ let y = Y(r.order);
131
+ return Y(c.order) - y;
123
132
  })) == null ? void 0 : t.map((r) => {
124
- const c = Pe(
133
+ const c = Te(
125
134
  r,
126
- Ie(r.fieldProps, {})
135
+ Ae(r.fieldProps, {})
127
136
  ), y = {
128
137
  ...r,
129
138
  fieldProps: {
130
139
  label: r.title,
131
140
  name: r.dataIndex,
132
141
  ...c || {},
133
- _signal: K
142
+ _signal: D
134
143
  },
135
144
  renderNode: void 0
136
145
  };
137
- return y.renderNode = Ee(
146
+ return y.renderNode = _e(
138
147
  y,
139
- o(oe)
148
+ o(te)
140
149
  ), y;
141
150
  })) || [];
142
- }), le = n(() => [
151
+ }), ie = n(() => [
143
152
  i(),
144
153
  a.card ? null : i("wrapper"),
145
154
  a.adaptive ? i("adaptive") : null,
146
155
  a.sticky ? i("sticky") : null
147
- ].filter(Boolean)), L = n(() => Q(o(d), (e) => {
156
+ ].filter(Boolean)), $ = n(() => Z(o(d), (e) => {
148
157
  if (e.sorter === !0)
149
158
  return e.key || e.dataIndex;
150
- }).filter(Boolean)), $ = n(() => Q(o(d), (e) => {
159
+ }).filter(Boolean)), j = n(() => Z(o(d), (e) => {
151
160
  if (e.filters && !e.onFilter)
152
161
  return e.key || e.dataIndex;
153
162
  }).filter(Boolean)), {
154
163
  formRef: P,
155
- submit: j,
156
- reset: H,
157
- refresh: ne,
164
+ submit: H,
165
+ reset: W,
166
+ refresh: ce,
158
167
  data: h,
159
- tableProps: se,
160
- setDataSource: de,
161
- handleTableChange: ie
162
- } = Ne({
168
+ tableProps: ue,
169
+ setDataSource: pe,
170
+ handleTableChange: me
171
+ } = Ve({
163
172
  async request(e) {
164
173
  var t;
165
- if (!S.value.preserveSelectedRowKeys && F(a.dataSource) && I(), !F(a.dataSource)) {
174
+ if (!x.value.preserveSelectedRowKeys && B(a.dataSource) && E(), !B(a.dataSource)) {
166
175
  const r = e.pageSize * (e.current - 1);
167
176
  return {
168
177
  data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(r, r + e.pageSize)) || [],
@@ -176,126 +185,126 @@ const vo = /* @__PURE__ */ Ce({
176
185
  };
177
186
  },
178
187
  namespace: "ap-grid",
179
- filterFields: $,
180
- sortFields: L,
188
+ filterFields: j,
189
+ sortFields: $,
181
190
  defaultParams: a.params,
182
191
  defaultData: a.defaultData,
183
192
  manual: a.manual,
184
193
  formatParams: a.beforeSearchSubmit,
185
194
  pagination: a.pagination
186
- }), { sortChangeEvent: ce, filterChangeEvent: ue, paginationChangeEvent: pe } = Te(ie);
187
- De({
195
+ }), { sortChangeEvent: fe, filterChangeEvent: ge, paginationChangeEvent: ve } = Oe(me);
196
+ He({
188
197
  columns: n(() => d.value),
189
198
  columnsBackup: n(() => O.value),
190
- size: n(() => C.value ? $e[C.value] : "middle"),
199
+ size: n(() => b.value ? Me[b.value] : "middle"),
191
200
  updateColumns(e) {
192
201
  d.value = e;
193
202
  },
194
203
  updateSize(e) {
195
- C.value = Le[e];
204
+ b.value = We[e];
196
205
  },
197
206
  renderConfig: n(() => ({
198
- className: ee("table-header", "title"),
207
+ className: re("table-header", "title"),
199
208
  color: m.value.colorPrimary
200
209
  }))
201
210
  });
202
- const W = n(
211
+ const he = n(
203
212
  () => d.value.some(
204
213
  (e) => e.fixed === "left" || e.fixed === !0
205
214
  ) ? "left" : void 0
206
- ), me = n(
207
- () => F(a.dataSource) ? h.records : a.dataSource
208
- ), { selectedRows: b, rowSelection: S, ...fe } = Ke({
215
+ ), ye = n(
216
+ () => B(a.dataSource) ? h.records : a.dataSource
217
+ ), { selectedRows: S, rowSelection: x, ...Ce } = je({
209
218
  ...a.rowSelection === !0 ? {} : a.rowSelection,
210
- dataSource: me,
219
+ dataSource: ye,
211
220
  rowKey: a.rowKey
212
221
  }), M = () => {
213
222
  const e = p.value;
214
- e && (b.value = [
223
+ e && (S.value = [
215
224
  ...e.getCheckboxReserveRecords(),
216
225
  ...e.getCheckboxRecords()
217
226
  ]);
218
- }, ge = () => {
227
+ }, we = () => {
219
228
  const e = p.value;
220
- e && (b.value = [e.getRadioRecord()]);
229
+ e && (S.value = [e.getRadioRecord()]);
221
230
  };
222
- function ve() {
231
+ function be() {
223
232
  var e;
224
233
  return ((e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInTable)) || [];
225
234
  }
226
- function he(e) {
235
+ function Se(e) {
227
236
  var l, t, r;
228
237
  (r = (t = (l = P.value) == null ? void 0 : l.apForm) == null ? void 0 : t.setFieldsValue) == null || r.call(t, e);
229
238
  }
230
- function ye(e = !1) {
239
+ function xe(e = !1) {
231
240
  var t, r, c;
232
241
  const l = e ? "getFieldsValueTransformed" : "getFieldsValue";
233
242
  return (c = (r = (t = P.value) == null ? void 0 : t.apForm) == null ? void 0 : r[l]) == null ? void 0 : c.call(r, !0);
234
243
  }
235
- function I() {
236
- fe.clearAll();
244
+ function E() {
245
+ Ce.clearAll();
237
246
  const e = p.value;
238
- e && (S.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
247
+ e && (x.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
239
248
  }
240
- async function we(e, l) {
249
+ async function Re(e, l) {
241
250
  var r;
242
251
  const t = h.records[e];
243
252
  if (t)
244
253
  return (r = p.value) == null ? void 0 : r.scrollToRow(t, l);
245
254
  }
246
- return E(
255
+ return N(
247
256
  () => [a.columnResizable, a.columns],
248
257
  () => {
249
- const e = ve();
258
+ const e = be();
250
259
  d.value = e, O.value = e;
251
260
  },
252
261
  {
253
262
  deep: !0,
254
263
  immediate: !0
255
264
  }
256
- ), E(
265
+ ), N(
257
266
  () => a.dataSource,
258
267
  (e) => {
259
- de(e);
268
+ pe(e);
260
269
  },
261
270
  { immediate: !0 }
262
- ), E(
271
+ ), N(
263
272
  () => o(h).loading,
264
273
  (e) => {
265
274
  var l;
266
275
  (l = a.onLoadingChange) == null || l.call(a, e);
267
276
  }
268
- ), Z({
269
- submit: j,
270
- reset: H,
271
- refresh: ne,
272
- setSearchFormValues: he,
273
- getSearchFormValues: ye,
277
+ ), ae({
278
+ submit: H,
279
+ reset: W,
280
+ refresh: ce,
281
+ setSearchFormValues: Se,
282
+ getSearchFormValues: xe,
274
283
  getShowColumns: () => o(d),
275
284
  rowSelection: {
276
- selectedRows: n(() => b.value),
277
- clearAll: I
285
+ selectedRows: n(() => S.value),
286
+ clearAll: E
278
287
  },
279
- scrollToRow: we
280
- }), (e, l) => (s(), R("div", {
281
- class: f(le.value),
282
- style: N(e.wrapperStyle)
288
+ scrollToRow: Re
289
+ }), (e, l) => (s(), k("div", {
290
+ class: f(ie.value),
291
+ style: z(e.wrapperStyle)
283
292
  }, [
284
- o(F)(e.dataSource) && e.searchForm !== !1 && D.value.length > 0 ? (s(), R("div", {
293
+ o(B)(e.dataSource) && e.searchForm !== !1 && K.value.length > 0 ? (s(), k("div", {
285
294
  key: 0,
286
- class: f(e.card ? o(B)("search-wrapper") : null),
287
- style: N(e.searchFormWrapperStyle)
295
+ class: f(e.card ? o(I)("search-wrapper") : null),
296
+ style: z(e.searchFormWrapperStyle)
288
297
  }, [
289
- q(o(Fe).SearchForm, g(e.searchForm || {}, {
298
+ U(o(Ne).SearchForm, g(e.searchForm || {}, {
290
299
  ref_key: "formRef",
291
300
  ref: P,
292
301
  "custom-reset": "",
293
302
  "submit-loading": !1,
294
- onSubmit: o(j),
295
- onReset: o(H)
296
- }), _({
303
+ onSubmit: o(H),
304
+ onReset: o(W)
305
+ }), G({
297
306
  default: v(() => [
298
- (s(!0), R(G, null, z(D.value, (t) => (s(), u(T(t.renderNode.Comp), g({
307
+ (s(!0), k(X, null, T(K.value, (t) => (s(), u(A(t.renderNode.Comp), g({
299
308
  key: t.dataIndex,
300
309
  item: t,
301
310
  ref_for: !0
@@ -306,39 +315,39 @@ const vo = /* @__PURE__ */ Ce({
306
315
  ]),
307
316
  _: 2
308
317
  }, [
309
- V.searchFormExtra ? {
318
+ L.searchFormExtra ? {
310
319
  name: "extra",
311
320
  fn: v(() => [
312
- A(e.$slots, "searchFormExtra")
321
+ _(e.$slots, "searchFormExtra")
313
322
  ]),
314
323
  key: "0"
315
324
  } : void 0
316
325
  ]), 1040, ["onSubmit", "onReset"])
317
- ], 6)) : w("", !0),
318
- k("div", {
319
- class: f([o(B)("table-wrapper"), e.card ? o(B)("table-wrapper-card") : null]),
320
- style: N(e.tableWrapperStyle)
326
+ ], 6)) : C("", !0),
327
+ F("div", {
328
+ class: f([o(I)("table-wrapper"), e.card ? o(I)("table-wrapper-card") : null]),
329
+ style: z(e.tableWrapperStyle)
321
330
  }, [
322
- k("div", {
331
+ F("div", {
323
332
  class: f(o(i)("header-wrapper"))
324
333
  }, [
325
- A(e.$slots, "title", {
326
- selectedRows: o(b),
327
- selectedRowKeys: o(S).selectedRowKeys,
334
+ _(e.$slots, "title", {
335
+ selectedRows: o(S),
336
+ selectedRowKeys: o(x).selectedRowKeys,
328
337
  shownColumns: d.value,
329
- clearAll: I
338
+ clearAll: E
330
339
  })
331
340
  ], 2),
332
- k("div", {
341
+ F("div", {
333
342
  class: f(o(i)("vxe-wrapper"))
334
343
  }, [
335
- (s(), u(o(Re), g(o(Ae)(a), {
344
+ (s(), u(o(Pe), g(o(De)(a), {
336
345
  ref_key: "tableRef",
337
346
  ref: p,
338
- key: o(re),
347
+ key: o(se),
339
348
  data: o(h).records,
340
- "sort-config": { remote: L.value.length > 0 },
341
- "filter-config": { remote: $.value.length > 0 },
349
+ "sort-config": { remote: $.value.length > 0 },
350
+ "filter-config": { remote: j.value.length > 0 },
342
351
  loading: o(h).loading,
343
352
  "row-config": {
344
353
  isHover: !0,
@@ -354,57 +363,57 @@ const vo = /* @__PURE__ */ Ce({
354
363
  "--vxe-ui-table-row-radio-checked-background-color": o(m).controlItemBgActive,
355
364
  "--vxe-ui-table-row-hover-radio-checked-background-color": o(m).controlItemBgActiveHover
356
365
  },
357
- size: C.value,
358
- onSortChange: o(ce),
359
- onFilterChange: o(ue),
366
+ size: b.value,
367
+ onSortChange: o(fe),
368
+ onFilterChange: o(ge),
360
369
  onCheckboxChange: M,
361
370
  onCheckboxAll: M,
362
- onRadioChange: ge
363
- }), _({
371
+ onRadioChange: we
372
+ }), G({
364
373
  empty: v(() => [
365
- q(o(X), {
366
- image: o(X).PRESENTED_IMAGE_SIMPLE
374
+ U(o(ee), {
375
+ image: o(ee).PRESENTED_IMAGE_SIMPLE
367
376
  }, null, 8, ["image"])
368
377
  ]),
369
378
  default: v(() => [
370
- a.expandable ? (s(), u(o(U), g({ key: 0 }, o(Ve)(e.expandable), { fixed: W.value }), {
379
+ a.expandable ? (s(), u(o(Q), g({ key: 0 }, o(Ke)(e.expandable), { fixed: he.value }), {
371
380
  content: v((t) => [
372
- (s(), u(T(a.expandable.renderContent(t))))
381
+ (s(), u(A(a.expandable.renderContent(t))))
373
382
  ]),
374
383
  _: 1
375
- }, 16, ["fixed"])) : w("", !0),
376
- a.rowSelection ? (s(), u(o(U), g({ key: 1 }, o(Oe)(o(S)), { fixed: W.value }), null, 16, ["fixed"])) : w("", !0),
377
- (s(!0), R(G, null, z(o(ae), (t) => (s(), u(T(t), {
384
+ }, 16, ["fixed"])) : C("", !0),
385
+ a.rowSelection ? (s(), u(o(Q), J(g({ key: 1 }, o($e)(o(x), d.value))), null, 16)) : C("", !0),
386
+ (s(!0), k(X, null, T(o(ne), (t) => (s(), u(A(t), {
378
387
  key: t.props.colId
379
388
  }))), 128))
380
389
  ]),
381
390
  _: 2
382
391
  }, [
383
- z(o(ke)(V, ["searchFormExtra"]), (t, r) => ({
392
+ T(o(Ee)(L, ["searchFormExtra"]), (t, r) => ({
384
393
  name: r,
385
394
  fn: v((c) => [
386
- A(e.$slots, r, Se(xe(c || {})))
395
+ _(e.$slots, r, J(Ie(c || {})))
387
396
  ])
388
397
  }))
389
398
  ]), 1040, ["data", "sort-config", "filter-config", "loading", "row-config", "style", "size", "onSortChange", "onFilterChange"]))
390
399
  ], 2),
391
- k("div", {
400
+ F("div", {
392
401
  class: f(o(i)("pagination-wrapper"))
393
402
  }, [
394
- e.sticky ? (s(), u(o(_e), {
403
+ e.sticky ? (s(), u(o(Qe), {
395
404
  key: 0,
396
405
  direction: "horizontal",
397
- "scroll-container": te.value
398
- }, null, 8, ["scroll-container"])) : w("", !0),
399
- e.pagination !== !1 ? (s(), u(o(ze), g({
406
+ "scroll-container": de.value
407
+ }, null, 8, ["scroll-container"])) : C("", !0),
408
+ e.pagination !== !1 ? (s(), u(o(Le), g({
400
409
  key: 1,
401
410
  class: o(i)("pagination")
402
- }, o(se).pagination, { onChange: o(pe) }), null, 16, ["class", "onChange"])) : w("", !0)
411
+ }, o(ue).pagination, { onChange: o(ve) }), null, 16, ["class", "onChange"])) : C("", !0)
403
412
  ], 2)
404
413
  ], 6)
405
414
  ], 6));
406
415
  }
407
416
  });
408
417
  export {
409
- vo as default
418
+ Ro as default
410
419
  };
@@ -1,10 +1,11 @@
1
1
  import { VxeTableEventProps, VxeTableProps } from 'vxe-table';
2
- import { ApGridProps, ApGridRowSelection } from '../interface';
2
+ import { ApGridColumnType, ApGridProps, ApGridRowSelection } from '../interface';
3
3
  import { RowSelectionType } from '@aplus-frontend/antdv/es/table/interface';
4
4
  export declare function toVxeProps<RecordType>(props: any): VxeTableProps<RecordType> & VxeTableEventProps<RecordType>;
5
- export declare function getRowSelectionProps(rowSelection: ApGridRowSelection<any> | true): {
5
+ export declare function getRowSelectionProps(rowSelection: ApGridRowSelection<any> | true, columns: ApGridColumnType[]): {
6
6
  type: RowSelectionType;
7
7
  width: string | number;
8
+ fixed: "left" | "right" | undefined;
8
9
  };
9
10
  export declare function getRowExpandProps(config: ApGridProps['expandable']): {
10
11
  readonly type: "expand";
@@ -1,9 +1,9 @@
1
- import { omit as u, isUndefined as d, isFunction as c, isNumber as f } from "lodash-unified";
2
- const h = 30, b = 50;
3
- function v(e) {
4
- var r, l, n;
1
+ import { omit as d, isUndefined as n, isFunction as f, isNumber as c } from "lodash-unified";
2
+ const h = 30, v = 50;
3
+ function R(e) {
4
+ var r, l, o;
5
5
  const t = {
6
- ...u(e, [
6
+ ...d(e, [
7
7
  "columns",
8
8
  "request",
9
9
  "searchForm",
@@ -15,48 +15,55 @@ function v(e) {
15
15
  if (e.adaptive && (t.autoResize = !0, t.height = "100%"), e.columnResizable && (t.columnConfig ? t.columnConfig.resizable = !0 : t.columnConfig = {
16
16
  resizable: !0
17
17
  }), e.rowSelection) {
18
- const o = e.rowSelection === !0 ? {} : e.rowSelection;
19
- o.type === "radio" ? t.radioConfig = {
18
+ const i = e.rowSelection === !0 ? {} : e.rowSelection;
19
+ i.type === "radio" ? t.radioConfig = {
20
20
  highlight: !0,
21
- checkMethod({ row: i }) {
22
- return o.disabled ? !o.disabled(i) : !0;
21
+ checkMethod({ row: u }) {
22
+ return i.disabled ? !i.disabled(u) : !0;
23
23
  },
24
- checkRowKey: (r = o.defaultSelectedRowKeys) == null ? void 0 : r[0],
25
- reserve: d(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
24
+ checkRowKey: (r = i.defaultSelectedRowKeys) == null ? void 0 : r[0],
25
+ reserve: n(i.preserveSelectedRowKeys) ? !0 : i.preserveSelectedRowKeys
26
26
  } : t.checkboxConfig = {
27
27
  highlight: !0,
28
- checkMethod({ row: i }) {
29
- return o.disabled ? !o.disabled(i) : !0;
28
+ checkMethod({ row: u }) {
29
+ return i.disabled ? !i.disabled(u) : !0;
30
30
  },
31
- checkRowKeys: o.defaultSelectedRowKeys,
32
- reserve: d(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
31
+ checkRowKeys: i.defaultSelectedRowKeys,
32
+ reserve: n(i.preserveSelectedRowKeys) ? !0 : i.preserveSelectedRowKeys
33
33
  };
34
34
  }
35
- return t.border = e.bordered, e.expandable && (t.expandConfig = u(e.expandable, [
35
+ return t.border = e.bordered, e.expandable && (t.expandConfig = d(e.expandable, [
36
36
  "renderContent",
37
37
  "width",
38
38
  "title"
39
- ])), e.footer && (t.showFooter = !0, c(e.footer) ? t.footerMethod = e.footer : t.footerData = e.footer), e.virtual === !1 ? (t.virtualXConfig = {
39
+ ])), e.footer && (t.showFooter = !0, f(e.footer) ? t.footerMethod = e.footer : t.footerData = e.footer), e.virtual === !1 ? (t.virtualXConfig = {
40
40
  enabled: !1
41
41
  }, t.virtualYConfig = {
42
42
  enabled: !1
43
- }) : (a(t, "X", (l = e.virtual) == null ? void 0 : l.x), a(t, "Y", (n = e.virtual) == null ? void 0 : n.y)), t;
43
+ }) : (a(t, "X", (l = e.virtual) == null ? void 0 : l.x), a(t, "Y", (o = e.virtual) == null ? void 0 : o.y)), t;
44
44
  }
45
45
  function a(e, t, r) {
46
- const l = t === "X", n = l ? "virtualXConfig" : "virtualYConfig", o = r !== !1, i = l ? h : b, s = f(r) && r >= 0 ? r : i;
47
- e[n] = {
48
- enabled: o,
46
+ const l = t === "X", o = l ? "virtualXConfig" : "virtualYConfig", i = r !== !1, u = l ? h : v, s = c(r) && r >= 0 ? r : u;
47
+ e[o] = {
48
+ enabled: i,
49
49
  gt: s
50
50
  };
51
51
  }
52
- function y(e) {
53
- const t = e === !0 || !e.type ? "checkbox" : e.type, r = e === !0 ? 60 : e.columnWidth || 60;
54
- return {
55
- type: t,
56
- width: r
52
+ function b(e) {
53
+ return e === !0 ? "left" : e;
54
+ }
55
+ function w(e, t) {
56
+ const r = e === !0 || !e.type ? "checkbox" : e.type, l = e === !0 ? 60 : e.columnWidth || 60;
57
+ let o = e === !0 ? void 0 : b(e.fixed);
58
+ return o || (o === !1 ? o = void 0 : o = t.some(
59
+ (i) => i.fixed === "left" || i.fixed === !0
60
+ ) ? "left" : void 0), {
61
+ type: r,
62
+ width: l,
63
+ fixed: o
57
64
  };
58
65
  }
59
- function R(e) {
66
+ function x(e) {
60
67
  const t = (e == null ? void 0 : e.width) || "auto";
61
68
  return {
62
69
  type: "expand",
@@ -65,7 +72,7 @@ function R(e) {
65
72
  };
66
73
  }
67
74
  export {
68
- R as getRowExpandProps,
69
- y as getRowSelectionProps,
70
- v as toVxeProps
75
+ x as getRowExpandProps,
76
+ w as getRowSelectionProps,
77
+ R as toVxeProps
71
78
  };