@aplus-frontend/ui 0.4.14 → 0.4.16

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 (55) hide show
  1. package/es/src/ap-table/ap-table.vue2.mjs +203 -179
  2. package/es/src/ap-table/hooks/use-sticky-scroll.d.ts +6 -0
  3. package/es/src/ap-table/hooks/use-sticky-scroll.mjs +16 -0
  4. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +1 -1
  5. package/es/src/ap-upload/apUpload.vue.d.ts +9 -0
  6. package/es/src/ap-upload/apUpload.vue.mjs +22 -18
  7. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +66 -66
  8. package/es/src/ap-upload/components/Picture.vue2.mjs +82 -82
  9. package/es/src/ap-upload/components/SingleFile.vue2.mjs +114 -114
  10. package/es/src/config-provider/config-provider.d.ts +3 -0
  11. package/es/src/config-provider/css-var.d.ts +4 -0
  12. package/es/src/config-provider/css-var.mjs +22 -14
  13. package/es/src/config-provider/index.d.ts +15 -0
  14. package/es/src/scroll-bar/index.vue.d.ts +2 -0
  15. package/es/src/scroll-bar/index.vue.mjs +40 -35
  16. package/es/src/scroll-bar/interface.d.ts +4 -1
  17. package/es/src/theme/antd-global-overwrite/admin/index.css +24 -2
  18. package/es/src/theme/antd-global-overwrite/admin/table.css +24 -2
  19. package/es/src/theme/antd-global-overwrite/aplus/index.css +24 -2
  20. package/es/src/theme/antd-global-overwrite/aplus/table.css +24 -2
  21. package/es/src/utils/index.d.ts +1 -0
  22. package/es/src/utils/index.mjs +40 -30
  23. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  24. package/lib/src/ap-table/hooks/use-sticky-scroll.d.ts +6 -0
  25. package/lib/src/ap-table/hooks/use-sticky-scroll.js +1 -0
  26. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  27. package/lib/src/ap-upload/apUpload.vue.d.ts +9 -0
  28. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  29. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  30. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  31. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  32. package/lib/src/config-provider/config-provider.d.ts +3 -0
  33. package/lib/src/config-provider/css-var.d.ts +4 -0
  34. package/lib/src/config-provider/css-var.js +1 -1
  35. package/lib/src/config-provider/index.d.ts +15 -0
  36. package/lib/src/scroll-bar/index.vue.d.ts +2 -0
  37. package/lib/src/scroll-bar/index.vue.js +1 -1
  38. package/lib/src/scroll-bar/interface.d.ts +4 -1
  39. package/lib/src/theme/antd-global-overwrite/admin/index.css +24 -2
  40. package/lib/src/theme/antd-global-overwrite/admin/table.css +24 -2
  41. package/lib/src/theme/antd-global-overwrite/aplus/index.css +24 -2
  42. package/lib/src/theme/antd-global-overwrite/aplus/table.css +24 -2
  43. package/lib/src/utils/index.d.ts +1 -0
  44. package/lib/src/utils/index.js +1 -1
  45. package/package.json +3 -3
  46. package/theme/antd-global-overwrite/admin/index.css +24 -2
  47. package/theme/antd-global-overwrite/admin/table.css +24 -2
  48. package/theme/antd-global-overwrite/admin/table.less +8 -2
  49. package/theme/antd-global-overwrite/aplus/index.css +24 -2
  50. package/theme/antd-global-overwrite/aplus/table.css +24 -2
  51. package/theme/antd-global-overwrite/aplus/table.less +7 -2
  52. package/theme/ap-table/ap-table.css +9 -0
  53. package/theme/ap-table/ap-table.less +20 -8
  54. package/theme/ap-table-modal/index.css +9 -0
  55. package/theme/index.css +9 -0
@@ -1,23 +1,27 @@
1
- import { defineComponent as Te, useSlots as Fe, ref as P, computed as s, unref as t, createVNode as w, Fragment as q, watchEffect as xe, watch as G, openBlock as p, createElementBlock as T, normalizeClass as f, normalizeStyle as M, mergeProps as S, createSlots as _, withCtx as F, renderList as J, createBlock as Q, resolveDynamicComponent as Be, renderSlot as b, createCommentVNode as X, createElementVNode as N, normalizeProps as ke, guardReactiveProps as ze } from "vue";
2
- import { Divider as Pe, Table as Ne } from "@aplus-frontend/antdv";
3
- import { useToken as Ie } from "@aplus-frontend/antdv/es/theme/internal";
4
- import { ApForm as Ee } from "../ap-form/index.mjs";
5
- import { noRenderAsFormItemValueList as Y } from "./constants.mjs";
1
+ import { defineComponent as ze, useSlots as Pe, ref as S, computed as s, unref as t, createVNode as f, Fragment as G, watchEffect as Ne, watch as J, openBlock as p, createElementBlock as B, normalizeClass as m, normalizeStyle as Q, mergeProps as h, createSlots as X, withCtx as w, renderList as Y, createBlock as Z, resolveDynamicComponent as Ie, renderSlot as R, createCommentVNode as ee, createElementVNode as N, normalizeProps as Ee, guardReactiveProps as Ke } from "vue";
2
+ import { Divider as Oe, Table as Le } from "@aplus-frontend/antdv";
3
+ import { useToken as Ve } from "@aplus-frontend/antdv/es/theme/internal";
4
+ import { ApForm as Ae } from "../ap-form/index.mjs";
5
+ import { noRenderAsFormItemValueList as oe } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
- import { useTablePaging as Ke } from "./hooks/use-table-paging-ng.mjs";
8
- import { isUndefined as m, omit as Z, isBoolean as Oe } from "lodash-unified";
9
- import { getColumnOrder as ee, updateFormProps as Le, getFieldProps as Ve, getSearchFormItemRenderNode as Ae, recursionApColumns as oe, apColumnToColumn as De, getTableTitle as je, getTableRenderType as $e, getTableRenderProps as We, getTableCellRenderNode as He, falseToUndefined as Ue } from "./utils.mjs";
10
- import qe from "./hooks/use-table-content-height.mjs";
11
- import Ge from "./hooks/use-table-row-selection.mjs";
12
- import { isDef as Me } from "../utils/index.mjs";
7
+ import { useTablePaging as De } from "./hooks/use-table-paging-ng.mjs";
8
+ import { isUndefined as y, omit as ae, isBoolean as $e } from "lodash-unified";
9
+ import { getColumnOrder as re, updateFormProps as We, getFieldProps as je, getSearchFormItemRenderNode as _e, recursionApColumns as te, apColumnToColumn as He, getTableTitle as Ue, getTableRenderType as qe, getTableRenderProps as Me, getTableCellRenderNode as Ge, falseToUndefined as Je } from "./utils.mjs";
10
+ import Qe from "./hooks/use-table-content-height.mjs";
11
+ import Xe from "./hooks/use-table-row-selection.mjs";
12
+ import { isDef as Ye } from "../utils/index.mjs";
13
13
  import "./components/setting/modal/index.vue.mjs";
14
14
  import "./components/paragraph-ellipsis/index.vue.mjs";
15
- import { useProvideApTable as _e } from "./context.mjs";
16
- import { useNamespace as Je } from "../config-provider/hooks/use-namespace.mjs";
17
- import { useGlobalConfig as Qe } from "../config-provider/hooks/use-global-config.mjs";
18
- import Xe from "./components/paragraph-ellipsis/index.vue2.mjs";
19
- import Ye from "./components/setting/modal/index.vue2.mjs";
20
- const bo = /* @__PURE__ */ Te({
15
+ import { useProvideApTable as Ze } from "./context.mjs";
16
+ import "../scroll-bar/index.mjs";
17
+ import { useStickyScroll as eo } from "./hooks/use-sticky-scroll.mjs";
18
+ import { scrollbarSize as oo } from "../config-provider/css-var.mjs";
19
+ import { useNamespace as ao } from "../config-provider/hooks/use-namespace.mjs";
20
+ import { useGlobalConfig as ro } from "../config-provider/hooks/use-global-config.mjs";
21
+ import to from "./components/paragraph-ellipsis/index.vue2.mjs";
22
+ import lo from "./components/setting/modal/index.vue2.mjs";
23
+ import no from "../scroll-bar/index.vue.mjs";
24
+ const No = /* @__PURE__ */ ze({
21
25
  name: "ApTable",
22
26
  __name: "ap-table",
23
27
  props: {
@@ -141,175 +145,179 @@ const bo = /* @__PURE__ */ Te({
141
145
  default: void 0
142
146
  }
143
147
  },
144
- setup(ae, {
145
- expose: re
148
+ setup(le, {
149
+ expose: ne
146
150
  }) {
147
- const o = ae;
151
+ const o = le;
148
152
  let I = 0;
149
- const h = Fe(), [, te] = Ie(), {
153
+ const C = Pe(), [, se] = Ve(), {
150
154
  e: x,
151
155
  b: i,
152
- be: E
153
- } = Je("ap-table"), K = Qe("valueTypeMap"), {
154
- height: le,
155
- contentRef: ne
156
- } = qe(), B = P(o.size), u = P([]), O = P([]);
157
- _e({
156
+ be: E,
157
+ m: de
158
+ } = ao("ap-table"), K = ro("valueTypeMap"), {
159
+ height: ue,
160
+ contentRef: ie
161
+ } = Qe(), O = S(), L = S(), {
162
+ isStickyMode: V,
163
+ scrollBarRef: ce
164
+ } = eo(O), k = S(o.size), u = S([]), A = S([]);
165
+ Ze({
158
166
  columns: s(() => u.value),
159
- columnsBackup: s(() => O.value),
160
- size: s(() => B.value),
167
+ columnsBackup: s(() => A.value),
168
+ size: s(() => k.value),
161
169
  updateColumns(e) {
162
170
  u.value = e;
163
171
  },
164
172
  updateSize(e) {
165
- B.value = e;
173
+ k.value = e;
166
174
  },
167
- dataSource: s(() => t(y).records)
175
+ dataSource: s(() => t(g).records)
168
176
  });
169
- const L = s(() => {
170
- var e, r, a;
171
- return I++, ((a = (r = (e = o.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Y.includes(l.valueType))) == null ? void 0 : r.sort((l, d) => {
172
- let n = ee(l.order);
173
- return ee(d.order) - n;
174
- })) == null ? void 0 : a.map((l) => {
175
- const d = Le(l, Ve(l.fieldProps, {})), n = {
176
- ...l,
177
+ const D = s(() => {
178
+ var e, l, a;
179
+ return I++, ((a = (l = (e = o.columns) == null ? void 0 : e.filter((r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !oe.includes(r.valueType))) == null ? void 0 : l.sort((r, d) => {
180
+ let n = re(r.order);
181
+ return re(d.order) - n;
182
+ })) == null ? void 0 : a.map((r) => {
183
+ const d = We(r, je(r.fieldProps, {})), n = {
184
+ ...r,
177
185
  fieldProps: {
178
- label: l.title,
179
- name: l.dataIndex,
186
+ label: r.title,
187
+ name: r.dataIndex,
180
188
  ...d || {},
181
189
  _signal: I
182
190
  },
183
191
  renderNode: void 0
184
192
  };
185
- return n.renderNode = Ae(n, t(K)), n;
193
+ return n.renderNode = _e(n, t(K)), n;
186
194
  })) || [];
187
- }), se = s(() => oe(t(u), (e) => {
195
+ }), fe = s(() => te(t(u), (e) => {
188
196
  if (e.sorter === !0)
189
197
  return e.key || e.dataIndex;
190
- }).filter(Boolean)), de = s(() => oe(t(u), (e) => {
198
+ }).filter(Boolean)), pe = s(() => te(t(u), (e) => {
191
199
  if (e.filters && !e.onFilter)
192
200
  return e.key || e.dataIndex;
193
- }).filter(Boolean)), ue = s(() => m(o.dataSource) ? y.records : o.dataSource), {
194
- rowSelection: C,
195
- selectedRows: R,
196
- ...v
197
- } = Ge({
201
+ }).filter(Boolean)), me = s(() => y(o.dataSource) ? g.records : o.dataSource), {
202
+ rowSelection: v,
203
+ selectedRows: T,
204
+ ...F
205
+ } = Xe({
198
206
  fixed: !0,
199
207
  ...o.rowSelection === !0 ? {} : o.rowSelection,
200
208
  rowKey: o.rowKey,
201
- dataSource: ue
209
+ dataSource: me
202
210
  }), {
203
- formRef: k,
204
- submit: V,
205
- reset: A,
206
- tableProps: D,
207
- refresh: ie,
208
- data: y,
209
- setDataSource: ce,
210
- getColumnSFConfig: pe
211
- } = Ke({
211
+ formRef: z,
212
+ submit: $,
213
+ reset: W,
214
+ tableProps: j,
215
+ refresh: ye,
216
+ data: g,
217
+ setDataSource: ge,
218
+ getColumnSFConfig: be
219
+ } = De({
212
220
  async request(e) {
213
- var a, l;
214
- if (!C.value.preserveSelectedRowKeys && m(o.dataSource) && v.clearAll(), !m(o.dataSource))
221
+ var a, r;
222
+ if (!v.value.preserveSelectedRowKeys && y(o.dataSource) && F.clearAll(), !y(o.dataSource))
215
223
  return {
216
224
  data: o.dataSource || [],
217
225
  total: o.dataSource.length || 0
218
226
  };
219
- const r = await ((a = o.request) == null ? void 0 : a.call(o, e));
220
- return (l = o.onLoad) == null || l.call(o, (r == null ? void 0 : r.data) || []), {
221
- data: (r == null ? void 0 : r.data) || [],
222
- total: (r == null ? void 0 : r.total) || 0
227
+ const l = await ((a = o.request) == null ? void 0 : a.call(o, e));
228
+ return (r = o.onLoad) == null || r.call(o, (l == null ? void 0 : l.data) || []), {
229
+ data: (l == null ? void 0 : l.data) || [],
230
+ total: (l == null ? void 0 : l.total) || 0
223
231
  };
224
232
  },
225
- filterFields: de,
226
- sortFields: se,
233
+ filterFields: pe,
234
+ sortFields: fe,
227
235
  defaultParams: o.params,
228
236
  defaultData: o.defaultData,
229
237
  manual: o.manual,
230
238
  formatParams: o.beforeSearchSubmit,
231
239
  pagination: o.pagination
232
- }), fe = () => {
240
+ }), Se = () => {
233
241
  var a;
234
- let e = ((a = o.columns) == null ? void 0 : a.filter((l) => !l.hideInTable)) || [];
235
- function r(l, d) {
236
- return l.map((n) => ({
237
- resizable: Me(n.resizable) ? n.resizable : o.columnResizable,
238
- ...Z(De(n), ["ellipsis"]),
239
- ...pe(n),
242
+ let e = ((a = o.columns) == null ? void 0 : a.filter((r) => !r.hideInTable)) || [];
243
+ function l(r, d) {
244
+ return r.map((n) => ({
245
+ resizable: Ye(n.resizable) ? n.resizable : o.columnResizable,
246
+ ...ae(He(n), ["ellipsis"]),
247
+ ...be(n),
240
248
  fixed: d ? d.fixed : n.fixed,
241
- title: je(n, E("table-header", "title"), h.headerCell, t(te).colorPrimary),
249
+ title: Ue(n, E("table-header", "title"), C.headerCell, t(se).colorPrimary),
242
250
  customRender({
243
251
  value: c,
244
- ...g
252
+ ...b
245
253
  }) {
246
- var H, U;
247
- const $ = $e(n), Ce = We({
254
+ var q, M;
255
+ const H = qe(n), Be = Me({
248
256
  ...n,
249
- valueType: $
257
+ valueType: H
250
258
  }, {
251
259
  value: c,
252
- ...g
253
- }), Re = He($, Ce, g.record, t(K)), W = ((H = n.renderText) == null ? void 0 : H.call(n, {
260
+ ...b
261
+ }), xe = Ge(H, Be, b.record, t(K)), U = ((q = n.renderText) == null ? void 0 : q.call(n, {
254
262
  value: c,
255
- ...g
256
- })) || c, ve = n.renderText ? w(q, null, [(U = n.renderText) == null ? void 0 : U.call(n, {
263
+ ...b
264
+ })) || c, ke = n.renderText ? f(G, null, [(M = n.renderText) == null ? void 0 : M.call(n, {
257
265
  value: c,
258
- ...g
259
- })]) : Re;
260
- let z = we(n, W, ve);
261
- return n.customRender && (z = n.customRender({
266
+ ...b
267
+ })]) : xe;
268
+ let P = Ce(n, U, ke);
269
+ return n.customRender && (P = n.customRender({
262
270
  value: c,
263
- ...g,
271
+ ...b,
264
272
  column: n,
265
- originalNode: z,
266
- originalText: W
267
- })), z;
273
+ originalNode: P,
274
+ originalText: U
275
+ })), P;
268
276
  },
269
- children: r(n.children || [], d || n)
277
+ children: l(n.children || [], d || n)
270
278
  }));
271
279
  }
272
- return r(e);
280
+ return l(e);
273
281
  };
274
- xe(() => {
275
- const e = fe();
276
- u.value = e, O.value = e;
282
+ Ne(() => {
283
+ const e = Se();
284
+ u.value = e, A.value = e;
277
285
  });
278
- const me = s(() => {
279
- var r, a;
280
- if (o.adaptive && (y.total > 0 || ((r = o.dataSource) == null ? void 0 : r.length)))
286
+ const he = s(() => {
287
+ var l, a;
288
+ if (o.adaptive && (g.total > 0 || ((l = o.dataSource) == null ? void 0 : l.length)))
281
289
  return {
282
- y: t(le),
290
+ y: t(ue),
283
291
  x: ((a = o.scroll) == null ? void 0 : a.x) || "100%"
284
292
  };
285
293
  if (o.scroll)
286
294
  return o.scroll;
287
- }), ye = s(() => {
295
+ }), we = s(() => {
288
296
  var e;
289
297
  if (o.tableLayout)
290
298
  return o.tableLayout;
291
- if ((e = o.columns) != null && e.some((r) => r.ellipsis))
299
+ if ((e = o.columns) != null && e.some((l) => l.ellipsis))
292
300
  return "fixed";
293
- }), j = s(() => {
301
+ }), _ = s(() => {
294
302
  var a;
295
- const e = t(D), r = t(C);
303
+ const e = t(j), l = t(v);
296
304
  return {
297
305
  ...o,
298
306
  ...e,
299
307
  rowSelection: o.rowSelection === !0 || ((a = o.rowSelection) == null ? void 0 : a.mode) === "internal" ? {
300
- ...r,
308
+ ...l,
301
309
  // tips 如果是前端分页,则默认会走缓存
302
- preserveSelectedRowKeys: m(o.dataSource) ? r.preserveSelectedRowKeys : !0
303
- } : Ue(o.rowSelection),
304
- loading: m(o.loading) ? e.loading : o.loading,
310
+ preserveSelectedRowKeys: y(o.dataSource) ? l.preserveSelectedRowKeys : !0
311
+ } : Je(o.rowSelection),
312
+ loading: y(o.loading) ? e.loading : o.loading,
305
313
  pagination: o.pagination === !1 ? !1 : e.pagination,
306
- scroll: t(me)
314
+ scroll: t(he)
307
315
  };
308
- }), ge = s(() => [i(), o.card ? null : i("wrapper"), o.adaptive ? i("adaptive") : null].filter(Boolean));
309
- function we(e, r, a) {
310
- return Y.includes(e.valueType) ? a : e.copyable || e.ellipsis ? w(Xe, {
316
+ }), Re = s(() => [i(), o.card ? null : i("wrapper"), o.adaptive ? i("adaptive") : null, V ? de(`sticky-${oo === 0 ? "absolute" : "relative"}`) : null].filter(Boolean));
317
+ function Ce(e, l, a) {
318
+ return oe.includes(e.valueType) ? a : e.copyable || e.ellipsis ? f(to, {
311
319
  copyable: e.copyable,
312
- ellipsis: e.ellipsis ? Oe(e.ellipsis) ? {
320
+ ellipsis: e.ellipsis ? $e(e.ellipsis) ? {
313
321
  tooltip: a,
314
322
  rows: 1
315
323
  } : {
@@ -319,53 +327,55 @@ const bo = /* @__PURE__ */ Te({
319
327
  content: a
320
328
  }, null) : a;
321
329
  }
322
- G(() => t(y).loading, (e) => {
323
- var r;
324
- (r = o.onLoadingChange) == null || r.call(o, e);
325
- }), G(() => o.dataSource, (e) => {
326
- ce(e);
330
+ J(() => t(g).loading, (e) => {
331
+ var l;
332
+ (l = o.onLoadingChange) == null || l.call(o, e);
333
+ }), J(() => o.dataSource, (e) => {
334
+ ge(e);
327
335
  }, {
328
336
  immediate: !0
329
337
  });
330
- function Se(e) {
331
- var r, a, l;
332
- (l = (a = (r = k.value) == null ? void 0 : r.apForm) == null ? void 0 : a.setFieldsValue) == null || l.call(a, e);
338
+ function ve(e) {
339
+ var l, a, r;
340
+ (r = (a = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : a.setFieldsValue) == null || r.call(a, e);
333
341
  }
334
- function be(e = !1) {
335
- var a, l, d;
336
- const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
337
- return (d = (l = (a = k.value) == null ? void 0 : a.apForm) == null ? void 0 : l[r]) == null ? void 0 : d.call(l, !0);
342
+ function Te(e = !1) {
343
+ var a, r, d;
344
+ const l = e ? "getFieldsValueTransformed" : "getFieldsValue";
345
+ return (d = (r = (a = z.value) == null ? void 0 : a.apForm) == null ? void 0 : r[l]) == null ? void 0 : d.call(r, !0);
338
346
  }
339
- function he() {
347
+ function Fe() {
340
348
  return t(u);
341
349
  }
342
- return re({
343
- submit: () => V(),
344
- reset: () => A(),
345
- refresh: () => ie(),
346
- setSearchFormValues: Se,
347
- getSearchFormValues: be,
348
- getShownColumns: he,
349
- dataSource: s(() => t(y).records),
350
+ return ne({
351
+ submit: () => $(),
352
+ reset: () => W(),
353
+ refresh: () => ye(),
354
+ setSearchFormValues: ve,
355
+ getSearchFormValues: Te,
356
+ getShownColumns: Fe,
357
+ dataSource: s(() => t(g).records),
350
358
  rowSelection: {
351
- selectedRows: s(() => t(R)),
352
- ...v
359
+ selectedRows: s(() => t(T)),
360
+ ...F
353
361
  }
354
- }), (e, r) => (p(), T("div", {
355
- class: f(ge.value)
356
- }, [t(m)(e.dataSource) && e.searchForm !== !1 && L.value.length > 0 ? (p(), T("div", {
362
+ }), (e, l) => (p(), B("div", {
363
+ ref_key: "tableWrapperRef",
364
+ ref: O,
365
+ class: m(Re.value)
366
+ }, [t(y)(e.dataSource) && e.searchForm !== !1 && D.value.length > 0 ? (p(), B("div", {
357
367
  key: 0,
358
- class: f(e.card ? t(x)("search-wrapper") : null),
359
- style: M(e.searchFormWrapperStyle)
360
- }, [w(t(Ee).SearchForm, S(e.searchForm || {}, {
368
+ class: m(e.card ? t(x)("search-wrapper") : null),
369
+ style: Q(e.searchFormWrapperStyle)
370
+ }, [f(t(Ae).SearchForm, h(e.searchForm || {}, {
361
371
  ref_key: "formRef",
362
- ref: k,
372
+ ref: z,
363
373
  "custom-reset": "",
364
- "submit-loading": t(D).loading,
365
- onSubmit: t(V),
366
- onReset: t(A)
367
- }), _({
368
- default: F(() => [(p(!0), T(q, null, J(L.value, (a) => (p(), Q(Be(a.renderNode.Comp), S({
374
+ "submit-loading": t(j).loading,
375
+ onSubmit: t($),
376
+ onReset: t(W)
377
+ }), X({
378
+ default: w(() => [(p(!0), B(G, null, Y(D.value, (a) => (p(), Z(Ie(a.renderNode.Comp), h({
369
379
  key: a.dataIndex,
370
380
  item: a,
371
381
  ref_for: !0
@@ -374,56 +384,70 @@ const bo = /* @__PURE__ */ Te({
374
384
  "custom-render": a.renderNode.render
375
385
  }), null, 16, ["item", "span", "custom-render"]))), 128))]),
376
386
  _: 2
377
- }, [h.searchFormExtra ? {
387
+ }, [C.searchFormExtra ? {
378
388
  name: "extra",
379
- fn: F(() => [b(e.$slots, "searchFormExtra")]),
389
+ fn: w(() => [R(e.$slots, "searchFormExtra")]),
380
390
  key: "0"
381
- } : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : X("", !0), N("div", {
391
+ } : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : ee("", !0), N("div", {
382
392
  ref_key: "contentRef",
383
- ref: ne,
384
- class: f([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
385
- style: M(e.tableWrapperStyle)
393
+ ref: ie,
394
+ class: m([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
395
+ style: Q(e.tableWrapperStyle)
386
396
  }, [N("div", {
387
- class: f(t(i)("header-wrapper"))
388
- }, [e.settings ? (p(), T("div", {
397
+ class: m(t(i)("header-wrapper"))
398
+ }, [e.settings ? (p(), B("div", {
389
399
  key: 0,
390
- class: f(t(i)("header"))
400
+ class: m(t(i)("header"))
391
401
  }, [N("div", {
392
- class: f(t(E)("header", "title"))
393
- }, [b(e.$slots, "title", S({
394
- selectedRows: t(R),
395
- selectedRowKeys: t(C).selectedRowKeys,
402
+ class: m(t(E)("header", "title"))
403
+ }, [R(e.$slots, "title", h({
404
+ selectedRows: t(T),
405
+ selectedRowKeys: t(v).selectedRowKeys,
396
406
  shownColumns: u.value
397
- }, v))], 2), h.title ? (p(), Q(t(Pe), {
407
+ }, F))], 2), C.title ? (p(), Z(t(Oe), {
398
408
  key: 0,
399
409
  type: "vertical"
400
- })) : X("", !0), w(Ye, {
410
+ })) : ee("", !0), f(lo, {
401
411
  config: e.settings === !0 ? {} : e.settings
402
- }, null, 8, ["config"])], 2)) : b(e.$slots, "title", S({
412
+ }, null, 8, ["config"])], 2)) : R(e.$slots, "title", h({
403
413
  key: 1,
404
- selectedRows: t(R),
405
- selectedRowKeys: t(C).selectedRowKeys,
414
+ selectedRows: t(T),
415
+ selectedRowKeys: t(v).selectedRowKeys,
406
416
  shownColumns: u.value
407
- }, v))], 2), w(t(Ne), S({
417
+ }, F))], 2), f(t(Le), h({
418
+ ref_key: "antdTableRef",
419
+ ref: L,
408
420
  class: t(i)("table")
409
- }, j.value, {
410
- size: B.value,
411
- "table-layout": ye.value,
421
+ }, _.value, {
422
+ size: k.value,
423
+ "table-layout": we.value,
412
424
  columns: u.value,
413
- onResizeColumn: r[0] || (r[0] = (a, l) => l.width = a)
414
- }), _({
415
- summary: F(() => [b(e.$slots, "summary", {
425
+ onResizeColumn: l[0] || (l[0] = (a, r) => r.width = a)
426
+ }), X({
427
+ summary: w(() => [R(e.$slots, "summary", {
416
428
  columns: u.value,
417
- records: j.value.dataSource,
418
- selectedRows: t(R)
429
+ records: _.value.dataSource,
430
+ selectedRows: t(T)
419
431
  })]),
420
432
  _: 2
421
- }, [J(t(Z)(h, ["title", "searchFormExtra", "headerCell", "summary"]), (a, l) => ({
422
- name: l,
423
- fn: F((d) => [b(e.$slots, l, ke(ze(d || {})))])
433
+ }, [t(V) ? {
434
+ name: "bottomPaginationTop",
435
+ fn: w(() => {
436
+ var a, r;
437
+ return [f(t(no), {
438
+ ref_key: "scrollBarRef",
439
+ ref: ce,
440
+ "scroll-container": (r = (a = L.value) == null ? void 0 : a.table) == null ? void 0 : r.scrollBodyRef,
441
+ direction: "horizontal"
442
+ }, null, 8, ["scroll-container"])];
443
+ }),
444
+ key: "0"
445
+ } : void 0, Y(t(ae)(C, ["title", "searchFormExtra", "headerCell", "summary"]), (a, r) => ({
446
+ name: r,
447
+ fn: w((d) => [R(e.$slots, r, Ee(Ke(d || {})))])
424
448
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
425
449
  }
426
450
  });
427
451
  export {
428
- bo as default
452
+ No as default
429
453
  };
@@ -0,0 +1,6 @@
1
+ import { ScrollBarExpose } from '../../scroll-bar';
2
+ import { Ref, ComputedRef } from 'vue';
3
+ export declare const useStickyScroll: (tableWrapper: Ref<HTMLElement | undefined>) => {
4
+ isStickyMode: ComputedRef<boolean>;
5
+ scrollBarRef: Ref<ScrollBarExpose | undefined, ScrollBarExpose | undefined>;
6
+ };
@@ -0,0 +1,16 @@
1
+ import { ref as o, computed as e } from "vue";
2
+ const i = "ap-table--sticky", r = (t) => {
3
+ const c = o();
4
+ return {
5
+ isStickyMode: e(
6
+ () => {
7
+ var s;
8
+ return ((s = t.value) == null ? void 0 : s.classList.contains(i)) || !1;
9
+ }
10
+ ),
11
+ scrollBarRef: c
12
+ };
13
+ };
14
+ export {
15
+ r as useStickyScroll
16
+ };
@@ -5,7 +5,7 @@ import { parseFieldValue as ae, dataIndexToStr as se, isEqualCustom as ce } from
5
5
  import { isArray as N, isEqualWith as ie } from "lodash-unified";
6
6
  import { useLocale as le } from "../../config-provider/hooks/use-locale.mjs";
7
7
  import { useNamespace as ue } from "../../config-provider/hooks/use-namespace.mjs";
8
- const S = 1, L = 100;
8
+ const S = 1, L = 10;
9
9
  function fe(g) {
10
10
  const l = {};
11
11
  return g && (g === !0 ? (l.current = S, l.pageSize = L) : (l.current = g.defaultCurrent || S, l.pageSize = g.defaultPageSize || L)), l;
@@ -77,6 +77,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
77
77
  type: StringConstructor;
78
78
  default: undefined;
79
79
  };
80
+ onRemove: {
81
+ type: FunctionConstructor;
82
+ default: undefined;
83
+ };
80
84
  }>, {
81
85
  done: ComputedRef<boolean>;
82
86
  clear: typeof clear;
@@ -148,6 +152,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
148
152
  type: StringConstructor;
149
153
  default: undefined;
150
154
  };
155
+ onRemove: {
156
+ type: FunctionConstructor;
157
+ default: undefined;
158
+ };
151
159
  }>> & Readonly<{
152
160
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
153
161
  }>, {
@@ -167,6 +175,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
167
175
  customRequest: CustomRequest;
168
176
  maxSizeErrorMsg: string;
169
177
  acceptErrorMsg: string;
178
+ onRemove: Function;
170
179
  maxCount: number;
171
180
  maxCountErrorMsg: string;
172
181
  }, {}, {}, {}, string, ComponentProvideOptions, true, {