@aplus-frontend/ui 0.2.4 → 0.2.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 (47) hide show
  1. package/es/index.mjs +133 -131
  2. package/es/src/ap-form/interface.d.ts +1 -0
  3. package/es/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +27 -0
  4. package/es/src/ap-scroll-bar/ap-scroll-bar.vue.mjs +4 -0
  5. package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +116 -0
  6. package/es/src/ap-scroll-bar/index.d.ts +62 -0
  7. package/es/src/ap-scroll-bar/index.mjs +8 -0
  8. package/es/src/ap-scroll-bar/interface.d.ts +4 -0
  9. package/es/src/ap-scroll-bar/interface.mjs +1 -0
  10. package/es/src/ap-scroll-bar/style/css.d.ts +0 -0
  11. package/es/src/ap-scroll-bar/style/css.js +1 -0
  12. package/es/src/ap-scroll-bar/style/index.d.ts +0 -0
  13. package/es/src/ap-scroll-bar/style/index.js +1 -0
  14. package/es/src/ap-table/ap-table.vue.d.ts +2 -0
  15. package/es/src/ap-table/ap-table.vue2.mjs +116 -123
  16. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  17. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +62 -56
  18. package/es/src/ap-table/constants.d.ts +40 -40
  19. package/es/src/ap-table/utils.d.ts +40 -40
  20. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +70 -63
  21. package/es/src/index.d.ts +1 -0
  22. package/es/src/index.mjs +192 -190
  23. package/es/src/path-map.mjs +1 -0
  24. package/lib/index.js +1 -1
  25. package/lib/src/ap-form/interface.d.ts +1 -0
  26. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +27 -0
  27. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.js +1 -0
  28. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +1 -0
  29. package/lib/src/ap-scroll-bar/index.d.ts +62 -0
  30. package/lib/src/ap-scroll-bar/index.js +1 -0
  31. package/lib/src/ap-scroll-bar/interface.d.ts +4 -0
  32. package/lib/src/ap-scroll-bar/interface.js +1 -0
  33. package/lib/src/ap-scroll-bar/style/css.d.ts +0 -0
  34. package/lib/src/ap-scroll-bar/style/css.js +1 -0
  35. package/lib/src/ap-scroll-bar/style/index.d.ts +0 -0
  36. package/lib/src/ap-scroll-bar/style/index.js +1 -0
  37. package/lib/src/ap-table/ap-table.vue.d.ts +2 -0
  38. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  39. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  40. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  41. package/lib/src/ap-table/constants.d.ts +40 -40
  42. package/lib/src/ap-table/utils.d.ts +40 -40
  43. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  44. package/lib/src/index.d.ts +1 -0
  45. package/lib/src/index.js +1 -1
  46. package/lib/src/path-map.js +1 -1
  47. package/package.json +6 -4
@@ -1,23 +1,22 @@
1
- import { defineComponent as ve, useSlots as Te, ref as z, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Fe, watch as G, openBlock as m, createElementBlock as F, normalizeClass as c, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as Be, renderSlot as S, createCommentVNode as Y, createElementVNode as I, h as xe, normalizeProps as ke, guardReactiveProps as Pe } from "vue";
2
- import { Typography as ze, Divider as Ie, Button as Ne, Table as Ee } from "@aplus-frontend/antdv";
3
- import { useToken as Ke } from "@aplus-frontend/antdv/es/theme/internal";
4
- import { ApForm as Le } from "../ap-form/index.mjs";
1
+ import { defineComponent as ve, useSlots as Te, ref as z, computed as s, unref as r, createVNode as y, Fragment as U, watchEffect as Fe, watch as G, openBlock as p, createElementBlock as T, normalizeClass as f, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as F, renderList as Q, createBlock as X, resolveDynamicComponent as Be, renderSlot as w, createCommentVNode as Y, createElementVNode as I, normalizeProps as xe, guardReactiveProps as ke } from "vue";
2
+ import { Typography as Pe, Divider as ze, Table as Ie } from "@aplus-frontend/antdv";
3
+ import { useToken as Ne } from "@aplus-frontend/antdv/es/theme/internal";
4
+ import { ApForm as Ee } from "../ap-form/index.mjs";
5
5
  import { noRenderAsFormItemValueList as Z } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
- import { useTablePaging as Oe } from "./hooks/use-table-paging.mjs";
8
- import { omit as _, isUndefined as g, isBoolean as Ve } from "lodash-unified";
9
- import { apColumnToColumn as De, getTableTitle as Ae, getTableRenderType as je, getTableRenderProps as We, getTableCellRenderNode as $e, getColumnOrder as ee, updateFormProps as He, getFieldProps as qe, getSearchFormItemRenderNode as Ue, recursionApColumns as ae, objectToString as Ge } from "./utils.mjs";
10
- import Me from "./hooks/use-table-content-height.mjs";
11
- import { getRawDisplayValue as Je } from "../editable-table/utils.mjs";
12
- import Qe from "./hooks/use-table-row-selection.mjs";
13
- import { isDef as Xe } from "../utils/index.mjs";
14
- import { SettingOutlined as Ye } from "@ant-design/icons-vue";
7
+ import { useTablePaging as Ke } from "./hooks/use-table-paging.mjs";
8
+ import { omit as _, isUndefined as m, isBoolean as Le } from "lodash-unified";
9
+ import { apColumnToColumn as Oe, getTableTitle as Ve, getTableRenderType as De, getTableRenderProps as Ae, getTableCellRenderNode as je, getColumnOrder as ee, updateFormProps as We, getFieldProps as $e, getSearchFormItemRenderNode as He, recursionApColumns as ae, objectToString as qe } from "./utils.mjs";
10
+ import Ue from "./hooks/use-table-content-height.mjs";
11
+ import { getRawDisplayValue as Ge } from "../editable-table/utils.mjs";
12
+ import Me from "./hooks/use-table-row-selection.mjs";
13
+ import { isDef as Je } from "../utils/index.mjs";
15
14
  import "./components/setting/modal/index.vue.mjs";
16
- import { useProvideApTable as Ze } from "./context.mjs";
17
- import { useNamespace as _e } from "../config-provider/hooks/use-namespace.mjs";
18
- import { useGlobalConfig as ea } from "../config-provider/hooks/use-global-config.mjs";
19
- import aa from "./components/setting/modal/index.vue2.mjs";
20
- const Ra = /* @__PURE__ */ ve({
15
+ import { useProvideApTable as Qe } from "./context.mjs";
16
+ import { useNamespace as Xe } from "../config-provider/hooks/use-namespace.mjs";
17
+ import { useGlobalConfig as Ye } from "../config-provider/hooks/use-global-config.mjs";
18
+ import Ze from "./components/setting/modal/index.vue2.mjs";
19
+ const ha = /* @__PURE__ */ ve({
21
20
  name: "ApTable",
22
21
  __name: "ap-table",
23
22
  props: {
@@ -146,15 +145,15 @@ const Ra = /* @__PURE__ */ ve({
146
145
  }) {
147
146
  const a = oe;
148
147
  let N = 0;
149
- const b = Te(), [, re] = Ke(), {
148
+ const S = Te(), [, re] = Ne(), {
150
149
  e: B,
151
150
  b: i,
152
151
  be: E
153
- } = _e("ap-table"), K = ea("valueTypeMap"), {
152
+ } = Xe("ap-table"), K = Ye("valueTypeMap"), {
154
153
  height: le,
155
154
  contentRef: ne
156
- } = Me(), x = z(a.size), d = z([]), L = z([]);
157
- Ze({
155
+ } = Ue(), x = z(a.size), d = z([]), L = z([]);
156
+ Qe({
158
157
  columns: s(() => d.value),
159
158
  columnsBackup: s(() => L.value),
160
159
  size: s(() => x.value),
@@ -166,36 +165,36 @@ const Ra = /* @__PURE__ */ ve({
166
165
  }
167
166
  });
168
167
  const se = () => {
169
- var r;
170
- let e = ((r = a.columns) == null ? void 0 : r.filter((l) => !l.hideInTable)) || [];
168
+ var t;
169
+ let e = ((t = a.columns) == null ? void 0 : t.filter((l) => !l.hideInTable)) || [];
171
170
  function o(l, u) {
172
171
  return l.map((n) => ({
173
- resizable: Xe(n.resizable) ? n.resizable : a.columnResizable,
174
- ..._(De(n), ["ellipsis"]),
172
+ resizable: Je(n.resizable) ? n.resizable : a.columnResizable,
173
+ ..._(Oe(n), ["ellipsis"]),
175
174
  fixed: u ? u.fixed : n.fixed,
176
- title: Ae(n, E("table-header", "title"), b.headerCell, t(re).colorPrimary),
175
+ title: Ve(n, E("table-header", "title"), S.headerCell, r(re).colorPrimary),
177
176
  customRender({
178
- value: p,
179
- ...y
177
+ value: c,
178
+ ...g
180
179
  }) {
181
180
  var H, q;
182
- const W = je(n), be = We({
181
+ const W = De(n), be = Ae({
183
182
  ...n,
184
183
  valueType: W
185
184
  }, {
186
- value: p,
187
- ...y
188
- }), Re = $e(W, be, y.record, t(K)), $ = ((H = n.renderText) == null ? void 0 : H.call(n, {
189
- value: p,
190
- ...y
191
- })) || p, Ce = n.renderText ? f(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
192
- value: p,
193
- ...y
185
+ value: c,
186
+ ...g
187
+ }), Re = je(W, be, g.record, r(K)), $ = ((H = n.renderText) == null ? void 0 : H.call(n, {
188
+ value: c,
189
+ ...g
190
+ })) || c, Ce = n.renderText ? y(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
191
+ value: c,
192
+ ...g
194
193
  })]) : Re;
195
194
  let P = ye(n, $, Ce);
196
195
  return n.customRender && (P = n.customRender({
197
- value: p,
198
- ...y,
196
+ value: c,
197
+ ...g,
199
198
  column: n,
200
199
  originalNode: P,
201
200
  originalText: $
@@ -211,12 +210,12 @@ const Ra = /* @__PURE__ */ ve({
211
210
  d.value = e, L.value = e;
212
211
  });
213
212
  const O = s(() => {
214
- var e, o, r;
215
- return N++, ((r = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Z.includes(l.valueType))) == null ? void 0 : o.sort((l, u) => {
213
+ var e, o, t;
214
+ return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Z.includes(l.valueType))) == null ? void 0 : o.sort((l, u) => {
216
215
  let n = ee(l.order);
217
216
  return ee(u.order) - n;
218
- })) == null ? void 0 : r.map((l) => {
219
- const u = He(l, qe(l.fieldProps, {})), n = {
217
+ })) == null ? void 0 : t.map((l) => {
218
+ const u = We(l, $e(l.fieldProps, {})), n = {
220
219
  ...l,
221
220
  fieldProps: {
222
221
  label: l.title,
@@ -226,19 +225,19 @@ const Ra = /* @__PURE__ */ ve({
226
225
  },
227
226
  renderNode: void 0
228
227
  };
229
- return n.renderNode = Ue(n, t(K)), n;
228
+ return n.renderNode = He(n, r(K)), n;
230
229
  })) || [];
231
- }), de = s(() => ae(t(d), (e) => {
230
+ }), de = s(() => ae(r(d), (e) => {
232
231
  if (e.sorter === !0)
233
232
  return e.key;
234
- }).filter(Boolean)), ue = s(() => ae(t(d), (e) => {
233
+ }).filter(Boolean)), ue = s(() => ae(r(d), (e) => {
235
234
  if (e.filters && !e.onFilter)
236
235
  return e.key;
237
- }).filter(Boolean)), ie = s(() => g(a.dataSource) ? T.value.records : a.dataSource), {
238
- rowSelection: R,
239
- selectedRows: C,
240
- ...v
241
- } = Qe({
236
+ }).filter(Boolean)), ie = s(() => m(a.dataSource) ? v.value.records : a.dataSource), {
237
+ rowSelection: b,
238
+ selectedRows: R,
239
+ ...C
240
+ } = Me({
242
241
  ...a.rowSelection === !0 ? {} : a.rowSelection,
243
242
  rowKey: a.rowKey,
244
243
  dataSource: ie
@@ -248,17 +247,17 @@ const Ra = /* @__PURE__ */ ve({
248
247
  reset: D,
249
248
  tableProps: A,
250
249
  refresh: ce,
251
- data: T,
250
+ data: v,
252
251
  setDataSource: pe
253
- } = Oe({
252
+ } = Ke({
254
253
  async request(e) {
255
- var r, l;
256
- if (!R.value.preserveSelectedRowKeys && g(a.dataSource) && v.clearAll(), !g(a.dataSource))
254
+ var t, l;
255
+ if (!b.value.preserveSelectedRowKeys && m(a.dataSource) && C.clearAll(), !m(a.dataSource))
257
256
  return {
258
257
  data: a.dataSource || [],
259
258
  total: a.dataSource.length || 0
260
259
  };
261
- const o = await ((r = a.request) == null ? void 0 : r.call(a, e));
260
+ const o = await ((t = a.request) == null ? void 0 : t.call(a, e));
262
261
  return (l = a.onLoad) == null || l.call(a, (o == null ? void 0 : o.data) || []), {
263
262
  data: (o == null ? void 0 : o.data) || [],
264
263
  total: (o == null ? void 0 : o.total) || 0
@@ -275,11 +274,11 @@ const Ra = /* @__PURE__ */ ve({
275
274
  showLessItems: a.pagination ? a.pagination.showLessItems : void 0,
276
275
  showTotal: a.pagination ? a.pagination.showTotal : void 0
277
276
  }), fe = s(() => {
278
- var o, r;
279
- if (a.adaptive && (T.value.total > 0 || ((o = a.dataSource) == null ? void 0 : o.length)))
277
+ var o, t;
278
+ if (a.adaptive && (v.value.total > 0 || ((o = a.dataSource) == null ? void 0 : o.length)))
280
279
  return {
281
- y: t(le),
282
- x: ((r = a.scroll) == null ? void 0 : r.x) || "100%"
280
+ y: r(le),
281
+ x: ((t = a.scroll) == null ? void 0 : t.x) || "100%"
283
282
  };
284
283
  if (a.scroll)
285
284
  return a.scroll;
@@ -290,40 +289,40 @@ const Ra = /* @__PURE__ */ ve({
290
289
  if ((e = a.columns) != null && e.some((o) => o.ellipsis))
291
290
  return "fixed";
292
291
  }), j = s(() => {
293
- var r;
294
- const e = t(A), o = t(R);
292
+ var t;
293
+ const e = r(A), o = r(b);
295
294
  return {
296
295
  ...a,
297
296
  ...e,
298
- rowSelection: a.rowSelection === !0 || ((r = a.rowSelection) == null ? void 0 : r.mode) === "internal" ? {
297
+ rowSelection: a.rowSelection === !0 || ((t = a.rowSelection) == null ? void 0 : t.mode) === "internal" ? {
299
298
  ...o,
300
299
  // tips 如果是前端分页,则默认会走缓存
301
- preserveSelectedRowKeys: g(a.dataSource) ? o.preserveSelectedRowKeys : !0
300
+ preserveSelectedRowKeys: m(a.dataSource) ? o.preserveSelectedRowKeys : !0
302
301
  } : a.rowSelection,
303
- loading: g(a.loading) ? e.loading : a.loading,
302
+ loading: m(a.loading) ? e.loading : a.loading,
304
303
  pagination: a.pagination === !1 ? !1 : e.pagination,
305
- scroll: t(fe)
304
+ scroll: r(fe)
306
305
  };
307
306
  }), ge = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
308
- function ye(e, o, r) {
307
+ function ye(e, o, t) {
309
308
  if (Z.includes(e.valueType))
310
- return r;
311
- const l = Ge(o);
312
- return e.copyable || e.ellipsis ? f(ze.Paragraph, {
309
+ return t;
310
+ const l = qe(o);
311
+ return e.copyable || e.ellipsis ? y(Pe.Paragraph, {
313
312
  copyable: e.copyable ? {
314
313
  text: l,
315
314
  tooltip: !1
316
315
  } : !1,
317
- ellipsis: e.ellipsis ? Ve(e.ellipsis) ? {
316
+ ellipsis: e.ellipsis ? Le(e.ellipsis) ? {
318
317
  tooltip: l
319
318
  } : {
320
319
  ...e.ellipsis,
321
320
  tooltip: l
322
321
  } : !1,
323
- content: e.ellipsis ? Je(e, o) : r
324
- }, null) : r;
322
+ content: e.ellipsis ? Ge(e, o) : t
323
+ }, null) : t;
325
324
  }
326
- G(() => t(T).loading, (e) => {
325
+ G(() => r(v).loading, (e) => {
327
326
  var o;
328
327
  (o = a.onLoadingChange) == null || o.call(a, e);
329
328
  }), G(() => a.dataSource, (e) => {
@@ -332,15 +331,15 @@ const Ra = /* @__PURE__ */ ve({
332
331
  immediate: !0
333
332
  });
334
333
  function he(e) {
335
- var o, r, l;
336
- (l = (r = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : r.setFieldsValue) == null || l.call(r, e);
334
+ var o, t, l;
335
+ (l = (t = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
337
336
  }
338
337
  function we() {
339
- var e, o, r;
340
- return (r = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : r.call(o, !0);
338
+ var e, o, t;
339
+ return (t = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : t.call(o, !0);
341
340
  }
342
341
  function Se() {
343
- return t(d);
342
+ return r(d);
344
343
  }
345
344
  return te({
346
345
  submit: () => V(),
@@ -349,88 +348,82 @@ const Ra = /* @__PURE__ */ ve({
349
348
  setSearchFormValues: he,
350
349
  getSearchFormValues: we,
351
350
  getShownColumns: Se,
352
- dataSource: s(() => t(T).records),
351
+ dataSource: s(() => r(v).records),
353
352
  rowSelection: {
354
- selectedRows: s(() => t(C)),
355
- ...v
353
+ selectedRows: s(() => r(R)),
354
+ ...C
356
355
  }
357
- }), (e, o) => (m(), F("div", {
358
- class: c(ge.value)
359
- }, [t(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (m(), F("div", {
356
+ }), (e, o) => (p(), T("div", {
357
+ class: f(ge.value)
358
+ }, [r(m)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (p(), T("div", {
360
359
  key: 0,
361
- class: c(e.card ? t(B)("search-wrapper") : null),
360
+ class: f(e.card ? r(B)("search-wrapper") : null),
362
361
  style: M(e.searchFormWrapperStyle)
363
- }, [f(t(Le).SearchForm, h(e.searchForm || {}, {
362
+ }, [y(r(Ee).SearchForm, h(e.searchForm || {}, {
364
363
  ref_key: "formRef",
365
364
  ref: k,
366
365
  "custom-reset": "",
367
- onSubmit: t(V),
368
- onReset: t(D),
369
- "submit-loading": t(A).loading
366
+ onSubmit: r(V),
367
+ onReset: r(D),
368
+ "submit-loading": r(A).loading
370
369
  }), J({
371
- default: w(() => [(m(!0), F(U, null, Q(O.value, (r) => (m(), X(Be(r.renderNode), h({
372
- key: r.dataIndex,
370
+ default: F(() => [(p(!0), T(U, null, Q(O.value, (t) => (p(), X(Be(t.renderNode), h({
371
+ key: t.dataIndex,
373
372
  ref_for: !0
374
- }, r.fieldProps || {}, {
375
- span: r.span
373
+ }, t.fieldProps || {}, {
374
+ span: t.span
376
375
  }), null, 16, ["span"]))), 128))]),
377
376
  _: 2
378
- }, [b.searchFormExtra ? {
377
+ }, [S.searchFormExtra ? {
379
378
  name: "extra",
380
- fn: w(() => [S(e.$slots, "searchFormExtra")]),
379
+ fn: F(() => [w(e.$slots, "searchFormExtra")]),
381
380
  key: "0"
382
381
  } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : Y("", !0), I("div", {
383
382
  ref_key: "contentRef",
384
383
  ref: ne,
385
- class: c([t(B)("table-wrapper"), e.card ? t(B)("table-wrapper-card") : null]),
384
+ class: f([r(B)("table-wrapper"), e.card ? r(B)("table-wrapper-card") : null]),
386
385
  style: M(e.tableWrapperStyle)
387
386
  }, [I("div", {
388
- class: c(t(i)("header-wrapper"))
389
- }, [e.settings ? (m(), F("div", {
387
+ class: f(r(i)("header-wrapper"))
388
+ }, [e.settings ? (p(), T("div", {
390
389
  key: 0,
391
- class: c(t(i)("header"))
390
+ class: f(r(i)("header"))
392
391
  }, [I("div", {
393
- class: c(t(E)("header", "title"))
394
- }, [S(e.$slots, "title", h({
395
- selectedRows: t(C),
396
- selectedRowKeys: t(R).selectedRowKeys,
392
+ class: f(r(E)("header", "title"))
393
+ }, [w(e.$slots, "title", h({
394
+ selectedRows: r(R),
395
+ selectedRowKeys: r(b).selectedRowKeys,
397
396
  shownColumns: d.value
398
- }, v))], 2), b.title ? (m(), X(t(Ie), {
397
+ }, C))], 2), S.title ? (p(), X(r(ze), {
399
398
  key: 0,
400
399
  type: "vertical"
401
- })) : Y("", !0), f(aa, {
400
+ })) : Y("", !0), y(Ze, {
402
401
  config: e.settings === !0 ? {} : e.settings
403
- }, {
404
- trigger: w(() => [f(t(Ne), {
405
- class: c(t(i)("setting-trigger-button")),
406
- icon: xe(t(Ye))
407
- }, null, 8, ["class", "icon"])]),
408
- _: 1
409
- }, 8, ["config"])], 2)) : S(e.$slots, "title", h({
402
+ }, null, 8, ["config"])], 2)) : w(e.$slots, "title", h({
410
403
  key: 1,
411
- selectedRows: t(C),
412
- selectedRowKeys: t(R).selectedRowKeys,
404
+ selectedRows: r(R),
405
+ selectedRowKeys: r(b).selectedRowKeys,
413
406
  shownColumns: d.value
414
- }, v))], 2), f(t(Ee), h({
415
- class: t(i)("table")
407
+ }, C))], 2), y(r(Ie), h({
408
+ class: r(i)("table")
416
409
  }, j.value, {
417
410
  size: x.value,
418
411
  "table-layout": me.value,
419
412
  columns: d.value,
420
- onResizeColumn: o[0] || (o[0] = (r, l) => l.width = r)
413
+ onResizeColumn: o[0] || (o[0] = (t, l) => l.width = t)
421
414
  }), J({
422
- summary: w(() => [S(e.$slots, "summary", {
415
+ summary: F(() => [w(e.$slots, "summary", {
423
416
  columns: d.value,
424
417
  records: j.value.dataSource,
425
- selectedRows: t(C)
418
+ selectedRows: r(R)
426
419
  })]),
427
420
  _: 2
428
- }, [Q(t(_)(b, ["title", "searchFormExtra", "headerCell", "summary"]), (r, l) => ({
421
+ }, [Q(r(_)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, l) => ({
429
422
  name: l,
430
- fn: w((u) => [S(e.$slots, l, ke(Pe(u || {})))])
423
+ fn: F((u) => [w(e.$slots, l, xe(ke(u || {})))])
431
424
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
432
425
  }
433
426
  });
434
427
  export {
435
- Ra as default
428
+ ha as default
436
429
  };
@@ -2,7 +2,7 @@ import { ApTableSettingModalProps } from '../../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
3
  import { ApTableSettingType } from '../../..';
4
4
  type TableSettingModalSlots = {
5
- trigger: any;
5
+ trigger?: any;
6
6
  };
7
7
  declare function __VLS_template(): {
8
8
  slots: Readonly<TableSettingModalSlots> & TableSettingModalSlots;
@@ -1,100 +1,106 @@
1
- import { defineComponent as $, ref as x, unref as e, useSlots as j, cloneVNode as F, openBlock as y, createElementBlock as G, Fragment as H, createBlock as L, resolveDynamicComponent as M, createCommentVNode as q, createVNode as l, withCtx as i, createElementVNode as s, normalizeClass as r, toDisplayString as m, createTextVNode as v, isRef as J } from "vue";
2
- import { Modal as K, Button as P, RadioGroup as Q, RadioButton as _, Divider as h } from "@aplus-frontend/antdv";
3
- import { getSingleVNode as W } from "../../../../utils/slot.mjs";
4
- import { useInjectApTable as X } from "../../../context.mjs";
1
+ import { defineComponent as G, ref as x, unref as e, useSlots as H, createVNode as l, cloneVNode as L, openBlock as y, createElementBlock as M, Fragment as q, createBlock as J, resolveDynamicComponent as K, createCommentVNode as P, withCtx as s, createElementVNode as i, normalizeClass as r, toDisplayString as m, createTextVNode as v, isRef as Q } from "vue";
2
+ import { Button as B, Modal as W, RadioGroup as X, RadioButton as _, Divider as h } from "@aplus-frontend/antdv";
3
+ import { getSingleVNode as Y } from "../../../../utils/slot.mjs";
4
+ import { useInjectApTable as Z } from "../../../context.mjs";
5
5
  import "../tree-select/index.vue.mjs";
6
- import { useTableColumnState as Y } from "../../../hooks/use-table-column-state.mjs";
6
+ import { useTableColumnState as ee } from "../../../hooks/use-table-column-state.mjs";
7
7
  import "../../../../config-provider/index.mjs";
8
8
  import "../sorter/index.vue.mjs";
9
- import Z, { customCloneColumnStates as B } from "../utils.mjs";
10
- import { useLocale as ee } from "../../../../config-provider/hooks/use-locale.mjs";
11
- import { useNamespace as te } from "../../../../config-provider/hooks/use-namespace.mjs";
12
- import le from "../tree-select/index.vue2.mjs";
13
- import oe from "../sorter/index.vue2.mjs";
14
- const ae = {
9
+ import te, { customCloneColumnStates as N } from "../utils.mjs";
10
+ import { SettingOutlined as le } from "@ant-design/icons-vue";
11
+ import { useLocale as oe } from "../../../../config-provider/hooks/use-locale.mjs";
12
+ import { useNamespace as T } from "../../../../config-provider/hooks/use-namespace.mjs";
13
+ import ne from "../tree-select/index.vue2.mjs";
14
+ import ae from "../sorter/index.vue2.mjs";
15
+ const ie = {
15
16
  style: {
16
17
  lineHeight: "22px",
17
18
  color: "#8896B0"
18
19
  }
19
- }, Se = /* @__PURE__ */ $({
20
+ }, xe = /* @__PURE__ */ G({
20
21
  __name: "index",
21
22
  props: {
22
23
  config: {
23
24
  default: () => ({})
24
25
  }
25
26
  },
26
- setup(N) {
27
- const C = N, {
28
- columnsBackup: T,
29
- size: A,
27
+ setup(A) {
28
+ const C = A, {
29
+ columnsBackup: V,
30
+ size: z,
30
31
  updateSize: c,
31
32
  updateColumns: d
32
- } = X(), f = x(e(A)), {
33
- columnState: a,
34
- setColumnState: V,
35
- isAllSelected: z,
36
- toggleSelectAll: R,
37
- columnStateBackup: w,
38
- setColumnStateBackup: D,
39
- cacheColumnStateIfNeeded: U
40
- } = Y(C.config, []), {
41
- t: n
42
- } = ee(), {
33
+ } = Z(), f = x(e(z)), {
34
+ columnState: n,
35
+ setColumnState: R,
36
+ isAllSelected: w,
37
+ toggleSelectAll: D,
38
+ columnStateBackup: O,
39
+ setColumnStateBackup: U,
40
+ cacheColumnStateIfNeeded: E
41
+ } = ee(C.config, []), {
42
+ t: a
43
+ } = oe(), {
43
44
  b: g,
44
45
  be: S
45
- } = te("ap-column-setting"), u = x(!1), E = j(), k = W(E.trigger), b = k ? F(k, {
46
+ } = T("ap-column-setting"), {
47
+ b: I
48
+ } = T("ap-table"), u = x(!1), $ = H(), b = Y($.trigger) || l(B, {
49
+ icon: l(le, null, null),
50
+ class: I("setting-trigger-button")
51
+ }, null), k = b ? L(b, {
46
52
  onClick: () => {
47
53
  u.value = !0;
48
54
  }
49
55
  }) : null;
50
- function I() {
51
- V(B(e(w)));
56
+ function j() {
57
+ R(N(e(O)));
52
58
  }
53
- function O() {
59
+ function F() {
54
60
  var t, o;
55
- d == null || d(Z(e(T), e(a))), c == null || c(e(f)), u.value = !1;
56
- const p = B(a.value);
57
- D(p), U(p), (o = (t = C.config) == null ? void 0 : t.onChange) == null || o.call(t, p);
61
+ d == null || d(te(e(V), e(n))), c == null || c(e(f)), u.value = !1;
62
+ const p = N(n.value);
63
+ U(p), E(p), (o = (t = C.config) == null ? void 0 : t.onChange) == null || o.call(t, p);
58
64
  }
59
- return (p, t) => (y(), G(H, null, [e(b) ? (y(), L(M(e(b)), {
65
+ return (p, t) => (y(), M(q, null, [e(k) ? (y(), J(K(e(k)), {
60
66
  key: 0
61
- })) : q("", !0), l(e(K), {
62
- title: e(n)("ap.apTable.setting.title"),
67
+ })) : P("", !0), l(e(W), {
68
+ title: e(a)("ap.apTable.setting.title"),
63
69
  open: u.value,
64
70
  "onUpdate:open": t[2] || (t[2] = (o) => u.value = o),
65
71
  width: 900,
66
- onOk: O,
72
+ onOk: F,
67
73
  "body-style": {
68
74
  padding: "0px !important",
69
75
  height: "450px"
70
76
  }
71
77
  }, {
72
- default: i(() => [s("div", {
78
+ default: s(() => [i("div", {
73
79
  class: r(e(g)("wrapper"))
74
- }, [s("div", {
80
+ }, [i("div", {
75
81
  class: r(e(g)("left"))
76
- }, [s("div", {
82
+ }, [i("div", {
77
83
  class: r(e(S)("left", "header"))
78
- }, [s("div", null, [s("span", ae, m(e(n)("ap.apTable.setting.selectAllTip")), 1), l(e(P), {
84
+ }, [i("div", null, [i("span", ie, m(e(a)("ap.apTable.setting.selectAllTip")), 1), l(e(B), {
79
85
  type: "link",
80
86
  size: "small",
81
- onClick: e(R)
87
+ onClick: e(D)
82
88
  }, {
83
- default: i(() => [v(m(e(z) ? e(n)("ap.apTable.setting.unSelectAll") : e(n)("ap.apTable.setting.selectAll")), 1)]),
89
+ default: s(() => [v(m(e(w) ? e(a)("ap.apTable.setting.unSelectAll") : e(a)("ap.apTable.setting.selectAll")), 1)]),
84
90
  _: 1
85
- }, 8, ["onClick"])]), l(e(Q), {
91
+ }, 8, ["onClick"])]), l(e(X), {
86
92
  value: f.value,
87
93
  "onUpdate:value": t[0] || (t[0] = (o) => f.value = o)
88
94
  }, {
89
- default: i(() => [l(e(_), {
95
+ default: s(() => [l(e(_), {
90
96
  value: "small"
91
97
  }, {
92
- default: i(() => [v(m(e(n)("ap.apTable.setting.sizeSmall")), 1)]),
98
+ default: s(() => [v(m(e(a)("ap.apTable.setting.sizeSmall")), 1)]),
93
99
  _: 1
94
100
  }), l(e(_), {
95
101
  value: "middle"
96
102
  }, {
97
- default: i(() => [v(m(e(n)("ap.apTable.setting.sizeNormal")), 1)]),
103
+ default: s(() => [v(m(e(a)("ap.apTable.setting.sizeNormal")), 1)]),
98
104
  _: 1
99
105
  })]),
100
106
  _: 1
@@ -103,26 +109,26 @@ const ae = {
103
109
  style: {
104
110
  margin: "0px"
105
111
  }
106
- }), l(le, {
112
+ }), l(ne, {
107
113
  class: r(e(S)("left", "content")),
108
- value: e(a)
114
+ value: e(n)
109
115
  }, null, 8, ["class", "value"])], 2), l(e(h), {
110
116
  type: "vertical",
111
117
  style: {
112
118
  height: "100%",
113
119
  margin: "0px"
114
120
  }
115
- }), s("div", {
121
+ }), i("div", {
116
122
  class: r(e(g)("right"))
117
- }, [l(oe, {
118
- value: e(a),
119
- "onUpdate:value": t[1] || (t[1] = (o) => J(a) ? a.value = o : null),
120
- onReset: I
123
+ }, [l(ae, {
124
+ value: e(n),
125
+ "onUpdate:value": t[1] || (t[1] = (o) => Q(n) ? n.value = o : null),
126
+ onReset: j
121
127
  }, null, 8, ["value"])], 2)], 2)]),
122
128
  _: 1
123
129
  }, 8, ["title", "open"])], 64));
124
130
  }
125
131
  });
126
132
  export {
127
- Se as default
133
+ xe as default
128
134
  };