@aplus-frontend/ui 6.13.3 → 6.13.4

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 (31) hide show
  1. package/es/src/ap-form/ap-form.vue2.mjs +123 -120
  2. package/es/src/ap-form/dependency/index.vue.mjs +26 -28
  3. package/es/src/ap-form/hooks/use-watch.mjs +28 -31
  4. package/es/src/ap-form/interface.d.ts +5 -0
  5. package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +22 -24
  6. package/es/src/ap-form/utils/get.d.ts +2 -0
  7. package/es/src/ap-form/utils/get.mjs +12 -7
  8. package/es/src/ap-grid/editable/form-item.vue.mjs +84 -87
  9. package/es/src/business/batch-input-group/form-item.vue.mjs +34 -28
  10. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +9 -7
  11. package/es/src/editable-table/form-item.vue.mjs +78 -81
  12. package/es/src/locale/lang/en.mjs +1 -1
  13. package/es/src/locale/lang/zh-cn.mjs +1 -1
  14. package/es/src/version.d.ts +1 -1
  15. package/es/src/version.mjs +1 -1
  16. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  17. package/lib/src/ap-form/dependency/index.vue.js +1 -1
  18. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  19. package/lib/src/ap-form/interface.d.ts +5 -0
  20. package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
  21. package/lib/src/ap-form/utils/get.d.ts +2 -0
  22. package/lib/src/ap-form/utils/get.js +1 -1
  23. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  24. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  25. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
  26. package/lib/src/editable-table/form-item.vue.js +1 -1
  27. package/lib/src/locale/lang/en.js +1 -1
  28. package/lib/src/locale/lang/zh-cn.js +1 -1
  29. package/lib/src/version.d.ts +1 -1
  30. package/lib/src/version.js +1 -1
  31. package/package.json +1 -1
@@ -1,15 +1,16 @@
1
- import { defineComponent as P, useSlots as A, toRef as W, ref as h, unref as u, watch as G, nextTick as U, createBlock as $, openBlock as q, mergeProps as y, withCtx as g, createVNode as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as I } from "vue";
1
+ import { defineComponent as K, useSlots as H, toRef as P, ref as h, unref as u, watch as A, nextTick as W, createBlock as G, openBlock as U, mergeProps as y, withCtx as g, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
2
  import { ApForm as C } from "../../ap-form/index.mjs";
3
- import { isArray as w, isUndefined as M, isNumber as m, cloneDeep as ee, omit as oe } from "lodash-unified";
3
+ import { isUndefined as Z, isNumber as m, cloneDeep as I, isArray as M, omit as ee } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
- import { isDef as b } from "../../utils/index.mjs";
6
- import { useGetEditableColumns as te } from "../hooks/use-editable-columns.mjs";
5
+ import { isDef as w } from "../../utils/index.mjs";
6
+ import { useGetEditableColumns as oe } from "../hooks/use-editable-columns.mjs";
7
7
  import "../index.vue2.mjs";
8
- import { useInjectForm as ae } from "../../ap-form/context.mjs";
8
+ import { useInjectForm as te } from "../../ap-form/context.mjs";
9
+ import { getModelValue as ae } from "../../ap-form/utils/get.mjs";
9
10
  import { useNamespace as le } from "../../config-provider/hooks/use-namespace.mjs";
10
11
  import { useGlobalConfig as ne } from "../../config-provider/hooks/use-global-config.mjs";
11
- import fe from "../index.vue.mjs";
12
- const Ce = /* @__PURE__ */ P({
12
+ import re from "../index.vue.mjs";
13
+ const we = /* @__PURE__ */ K({
13
14
  name: "EditableGridFormItem",
14
15
  __name: "form-item",
15
16
  props: {
@@ -161,134 +162,130 @@ const Ce = /* @__PURE__ */ P({
161
162
  default: () => ({})
162
163
  }
163
164
  },
164
- setup(x, {
165
- expose: R
165
+ setup(b, {
166
+ expose: x
166
167
  }) {
167
- const B = A(), l = x, {
168
- b: S
169
- } = le("editable-grid");
170
- function F(e, t) {
171
- return w(t) ? t.reduce((n, a) => n == null ? void 0 : n[a], e) : e == null ? void 0 : e[t];
172
- }
173
- const {
168
+ const R = H(), l = b, {
169
+ b: B
170
+ } = le("editable-grid"), {
174
171
  internalInstance: o,
175
- model: v
176
- } = ae(), p = W(l.name), d = h(F(u(v), p.value) || []), N = C.useWatch(p);
177
- G(() => N.value, async (e) => {
178
- var t;
179
- await U(), d.value = e, (t = l.onChange) == null || t.call(l, e);
172
+ model: S
173
+ } = te(), p = P(l.name), d = h(ae(u(S), p.value) || []), v = C.useWatch(p);
174
+ A(() => v.value, async (e) => {
175
+ var a;
176
+ await W(), d.value = e, (a = l.onChange) == null || a.call(l, e);
180
177
  }, {
181
178
  deep: !0
182
179
  });
183
- const c = h(), D = ne("valueTypeMap"), V = te(l, D);
184
- function L(e, t) {
185
- var f;
186
- const n = ((f = u(d)) == null ? void 0 : f.length) || 0;
187
- if (b(l.maxLength) && n >= l.maxLength)
180
+ const c = h(), F = ne("valueTypeMap"), N = oe(l, F);
181
+ function D(e, a) {
182
+ var n;
183
+ const r = ((n = u(d)) == null ? void 0 : n.length) || 0;
184
+ if (w(l.maxLength) && r >= l.maxLength)
188
185
  return;
189
- const a = {
186
+ const t = {
190
187
  ...e || {}
191
188
  };
192
- o == null || o.setFieldValue(l.name, a, !0, (r, s) => {
193
- if (!r[s]) {
194
- r[s] = [a];
189
+ o == null || o.setFieldValue(l.name, t, !0, (f, s) => {
190
+ if (!f[s]) {
191
+ f[s] = [t];
195
192
  return;
196
193
  }
197
- M(t) ? r[s].push(a) : r[s].splice(t, 0, a);
194
+ Z(a) ? f[s].push(t) : f[s].splice(a, 0, t);
198
195
  });
199
196
  }
200
- function T(e, t = "suffix") {
201
- var r;
202
- const n = ((r = u(d)) == null ? void 0 : r.length) || 0, a = m(e) ? e : e.length;
203
- if (b(l.maxLength) && n + a > l.maxLength)
197
+ function V(e, a = "suffix") {
198
+ var f;
199
+ const r = ((f = u(d)) == null ? void 0 : f.length) || 0, t = m(e) ? e : e.length;
200
+ if (w(l.maxLength) && r + t > l.maxLength)
204
201
  return;
205
- const f = m(e) ? new Array(e).fill(0).map(() => ({})) : ee(e);
206
- o == null || o.setFieldValue(l.name, f, !0, (s, i) => {
202
+ const n = m(e) ? new Array(e).fill(0).map(() => ({})) : I(e);
203
+ o == null || o.setFieldValue(l.name, n, !0, (s, i) => {
207
204
  if (!s[i]) {
208
- s[i] = [...f];
205
+ s[i] = [...n];
209
206
  return;
210
207
  }
211
- t === "suffix" ? s[i].push(...f) : s[i].unshift(...f);
208
+ a === "suffix" ? s[i].push(...n) : s[i].unshift(...n);
212
209
  });
213
210
  }
214
- function k(e) {
215
- const t = new Set(m(e) ? [e] : e);
216
- o == null || o.setFieldValue(l.name, void 0, !0, (n, a) => {
217
- n[a] = n[a].filter((f, r) => !t.has(r));
211
+ function L(e) {
212
+ const a = new Set(m(e) ? [e] : e);
213
+ o == null || o.setFieldValue(l.name, void 0, !0, (r, t) => {
214
+ r[t] = r[t].filter((n, f) => !a.has(f));
218
215
  });
219
216
  }
220
- function _(e) {
221
- var n;
222
- const t = new Set(w(e) ? e : [e]);
223
- t.size !== 0 && ((n = o == null ? void 0 : o.setFieldValue) == null || n.call(o, l.name, void 0, !0, (a, f) => {
224
- a[f] = a[f].filter((r) => !t.has(r[l.rowKey]));
217
+ function T(e) {
218
+ var r;
219
+ const a = new Set(M(e) ? e : [e]);
220
+ a.size !== 0 && ((r = o == null ? void 0 : o.setFieldValue) == null || r.call(o, l.name, void 0, !0, (t, n) => {
221
+ t[n] = t[n].filter((f) => !a.has(f[l.rowKey]));
225
222
  }));
226
223
  }
227
- function j() {
224
+ function k() {
228
225
  return u(d);
229
226
  }
230
- function E(e) {
231
- var t;
232
- return (t = u(d)) == null ? void 0 : t[e];
227
+ function _(e) {
228
+ var a;
229
+ return (a = u(d)) == null ? void 0 : a[e];
233
230
  }
234
- function O(e, t, n = !0) {
235
- o == null || o.setFieldValue(l.name, void 0, !0, (a, f) => {
236
- if (!(!a[f] || !a[f][e])) {
237
- if (!n) {
238
- const r = Object.keys(a[f][e]);
239
- for (const s of r)
240
- s !== l.rowKey && delete a[f][e][s];
231
+ function j(e, a, r = !0) {
232
+ o == null || o.setFieldValue(l.name, void 0, !0, (t, n) => {
233
+ if (!(!t[n] || !t[n][e])) {
234
+ if (!r) {
235
+ const f = Object.keys(t[n][e]);
236
+ for (const s of f)
237
+ s !== l.rowKey && delete t[n][e][s];
241
238
  }
242
- Object.assign(a[f][e], {
243
- ...t
239
+ Object.assign(t[n][e], {
240
+ ...a
244
241
  });
245
242
  }
246
243
  });
247
244
  }
248
- function z(e) {
245
+ function E(e) {
249
246
  o == null || o.setFieldValue(l.name, e);
250
247
  }
251
- function K(e) {
252
- var n;
253
- const t = e === "end" ? d.value.length - 1 : e;
254
- (n = c.value) == null || n.scrollToRow(t);
248
+ function O(e) {
249
+ var r;
250
+ const a = e === "end" ? d.value.length - 1 : e;
251
+ (r = c.value) == null || r.scrollToRow(a);
255
252
  }
256
- function H() {
253
+ function z() {
257
254
  var e;
258
255
  (e = o == null ? void 0 : o.setFieldValue) == null || e.call(o, l.name, []);
259
256
  }
260
- return R({
261
- add: L,
262
- remove: k,
263
- getRowData: E,
264
- getRowsData: j,
265
- setRowData: O,
266
- addMultiple: T,
267
- scrollTo: K,
268
- setTableData: z,
269
- clear: H,
270
- removeByKey: _
271
- }), (e, t) => (q(), $(u(C).FormItem, y(e.formItem, {
257
+ return x({
258
+ add: D,
259
+ remove: L,
260
+ getRowData: _,
261
+ getRowsData: k,
262
+ setRowData: j,
263
+ addMultiple: V,
264
+ scrollTo: O,
265
+ setTableData: E,
266
+ clear: z,
267
+ removeByKey: T
268
+ }), (e, a) => (U(), G(u(C).FormItem, y(e.formItem, {
272
269
  name: e.name,
273
270
  label: e.label
274
271
  }), {
275
- default: g(() => [J(fe, y(u(oe)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
272
+ default: g(() => [$(re, y(u(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
276
273
  ref_key: "tableRef",
277
274
  ref: c,
278
- class: u(S)(),
279
- columns: u(V),
275
+ class: u(B)(),
276
+ columns: u(N),
280
277
  "data-source": d.value,
281
278
  "search-form": !1
282
- }), Q({
279
+ }), q({
283
280
  _: 2
284
- }, [X(B, (n, a) => ({
285
- name: a,
286
- fn: g((f) => [Y(e.$slots, a, Z(I(f || {})))])
281
+ }, [J(R, (r, t) => ({
282
+ name: t,
283
+ fn: g((n) => [Q(e.$slots, t, X(Y(n || {})))])
287
284
  }))]), 1040, ["class", "columns", "data-source"])]),
288
285
  _: 3
289
286
  }, 16, ["name", "label"]));
290
287
  }
291
288
  });
292
289
  export {
293
- Ce as default
290
+ we as default
294
291
  };
@@ -1,11 +1,13 @@
1
- import { defineComponent as b, computed as r, createBlock as B, openBlock as g, mergeProps as f, unref as m, withCtx as _, createVNode as V } from "vue";
1
+ import { defineComponent as B, computed as n, createBlock as g, openBlock as V, mergeProps as m, unref as s, withCtx as _, createVNode as x } from "vue";
2
2
  import "./index.vue2.mjs";
3
3
  import "../../ap-form/item/index.vue2.mjs";
4
- import { isValid as s } from "@aplus-frontend/utils";
5
- import { omit as p } from "lodash-unified";
6
- import x from "../../ap-form/item/index.vue.mjs";
7
- import k from "./index.vue.mjs";
8
- const $ = /* @__PURE__ */ b({
4
+ import { isValid as p } from "@aplus-frontend/utils";
5
+ import { omit as c } from "lodash-unified";
6
+ import { useInjectForm as F } from "../../ap-form/context.mjs";
7
+ import { getModelValue as k } from "../../ap-form/utils/get.mjs";
8
+ import C from "../../ap-form/item/index.vue.mjs";
9
+ import S from "./index.vue.mjs";
10
+ const L = /* @__PURE__ */ B({
9
11
  name: "ApFormItemBatchInputGroup",
10
12
  __name: "form-item",
11
13
  props: {
@@ -56,30 +58,34 @@ const $ = /* @__PURE__ */ b({
56
58
  trim: { type: Boolean, default: !0 },
57
59
  defaultSelectedAllKey: { type: Boolean }
58
60
  },
59
- setup(c) {
60
- const l = c, v = r(() => (l == null ? void 0 : l.transform) || {
61
+ setup(v) {
62
+ const l = v, { internalInstance: r } = F(), y = n(() => (l == null ? void 0 : l.transform) || {
61
63
  flat: !1,
62
64
  transformer: (e) => {
63
- var a, o, i, n, d, u;
65
+ var i, o, a, d, u, f;
64
66
  if (e)
65
- return !(e != null && e.value) || ((a = e == null ? void 0 : e.value) == null ? void 0 : a.length) < 1 ? void 0 : (o = l == null ? void 0 : l.field) != null && o.options ? {
67
+ return !(e != null && e.value) || ((i = e == null ? void 0 : e.value) == null ? void 0 : i.length) < 1 ? void 0 : (o = l == null ? void 0 : l.field) != null && o.options ? {
66
68
  ...e,
67
- value: (n = (i = e == null ? void 0 : e.value) == null ? void 0 : i.filter((t) => s(t == null ? void 0 : t.trim()))) == null ? void 0 : n.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
68
- } : (u = (d = e == null ? void 0 : e.value) == null ? void 0 : d.filter((t) => s(t == null ? void 0 : t.trim()))) == null ? void 0 : u.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
69
+ value: (d = (a = e == null ? void 0 : e.value) == null ? void 0 : a.filter((t) => p(t == null ? void 0 : t.trim()))) == null ? void 0 : d.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
70
+ } : (f = (u = e == null ? void 0 : e.value) == null ? void 0 : u.filter((t) => p(t == null ? void 0 : t.trim()))) == null ? void 0 : f.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
69
71
  }
70
- }), y = r(() => {
72
+ }), h = n(() => {
71
73
  var e;
72
74
  return ((e = l.field) == null ? void 0 : e.style) || "width:auto";
73
- }), h = r(() => {
74
- var e, a;
75
- return (l == null ? void 0 : l.initialValue) || {
76
- key: (a = (e = l == null ? void 0 : l.field) == null ? void 0 : e.options) == null ? void 0 : a.map((o) => o.value)
77
- };
75
+ }), b = n(() => {
76
+ var i, o;
77
+ if (l.initialValue)
78
+ return l.initialValue;
79
+ const e = r == null ? void 0 : r.getInitialValues();
80
+ if (!k(e, l.name))
81
+ return {
82
+ key: (o = (i = l == null ? void 0 : l.field) == null ? void 0 : i.options) == null ? void 0 : o.map((a) => a.value)
83
+ };
78
84
  });
79
- return (e, a) => {
80
- var o, i;
81
- return g(), B(x, f(
82
- m(p)(l, [
85
+ return (e, i) => {
86
+ var o, a;
87
+ return V(), g(C, m(
88
+ s(c)(l, [
83
89
  "field",
84
90
  "initialValue",
85
91
  "transform",
@@ -87,14 +93,14 @@ const $ = /* @__PURE__ */ b({
87
93
  "disabled"
88
94
  ]),
89
95
  {
90
- "initial-value": h.value,
91
- transform: v.value,
92
- bordered: (i = (o = e.field) == null ? void 0 : o.options) != null && i.length ? !1 : e.bordered
96
+ "initial-value": b.value,
97
+ transform: y.value,
98
+ bordered: (a = (o = e.field) == null ? void 0 : o.options) != null && a.length ? !1 : e.bordered
93
99
  }
94
100
  ), {
95
101
  default: _(() => [
96
- V(k, f(m(p)(l.field, ["style"]), {
97
- style: y.value,
102
+ x(S, m(s(c)(l.field, ["style"]), {
103
+ style: h.value,
98
104
  disabled: e.disabled,
99
105
  placeholer: e.placeholer
100
106
  }), null, 16, ["style", "disabled", "placeholer"])
@@ -105,5 +111,5 @@ const $ = /* @__PURE__ */ b({
105
111
  }
106
112
  });
107
113
  export {
108
- $ as default
114
+ L as default
109
115
  };
@@ -32,30 +32,32 @@ const J = /* @__PURE__ */ k({
32
32
  }
33
33
  h(r);
34
34
  }
35
- function V(t) {
35
+ function N(t) {
36
36
  var a;
37
37
  o.disabled ? n.value = !1 : n.value = t, !t && ((a = o.onClose) == null || a.call(o));
38
38
  }
39
- const { b: s, e: y, em: I, bm: N } = R("batch-input-group-popover-input");
39
+ const { b: s, e: V, em: y, bm: I } = R("batch-input-group-popover-input");
40
40
  return (t, a) => (w(), A("div", {
41
41
  class: p(e(s)())
42
42
  }, [
43
43
  u(e(L), {
44
- "overlay-class-name": e(y)("popover"),
44
+ "overlay-class-name": e(V)("popover"),
45
45
  "get-popup-container": x,
46
46
  trigger: "click",
47
47
  placement: "bottomLeft",
48
48
  open: n.value,
49
- onOpenChange: V
49
+ onOpenChange: N
50
50
  }, {
51
51
  content: f(() => [
52
52
  B("div", {
53
- class: p(e(I)("popover", "content"))
53
+ class: p(e(y)("popover", "content"))
54
54
  }, [
55
55
  u(e(P), {
56
56
  ref_key: "textAreaRef",
57
57
  ref: l,
58
- placeholder: e(C)("ap.batchInputGroup.popoverInputPlaceholder"),
58
+ placeholder: e(C)("ap.batchInputGroup.popoverInputPlaceholder", {
59
+ maxNum: t.maxNum + ""
60
+ }),
59
61
  bordered: !1,
60
62
  rows: 10,
61
63
  value: e(b),
@@ -69,7 +71,7 @@ const J = /* @__PURE__ */ k({
69
71
  u(e(z), {
70
72
  class: p([
71
73
  e(s)("trigger-icon"),
72
- t.disabled ? e(N)("trigger-icon", "disabled") : null
74
+ t.disabled ? e(I)("trigger-icon", "disabled") : null
73
75
  ])
74
76
  }, null, 8, ["class"])
75
77
  ]),
@@ -1,15 +1,16 @@
1
- import { defineComponent as G, ref as c, unref as s, useSlots as H, toRef as U, watch as W, nextTick as $, createBlock as q, openBlock as J, mergeProps as h, withCtx as w, createVNode as Q, createSlots as X, renderList as Y, renderSlot as Z, normalizeProps as I, guardReactiveProps as M } from "vue";
2
- import { Table as ee } from "@aplus-frontend/antdv";
1
+ import { defineComponent as A, ref as c, unref as n, useSlots as O, toRef as G, watch as H, nextTick as U, createBlock as W, openBlock as $, mergeProps as h, withCtx as w, createVNode as q, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
2
+ import { Table as I } from "@aplus-frontend/antdv";
3
3
  import { ApForm as x } from "../ap-form/index.mjs";
4
- import { isArray as g, isUndefined as oe, isNumber as m, cloneDeep as te, omit as y } from "lodash-unified";
4
+ import { isUndefined as M, isNumber as i, cloneDeep as ee, isArray as oe, omit as g } from "lodash-unified";
5
5
  import "../config-provider/index.mjs";
6
- import { useInjectForm as ae } from "../ap-form/context.mjs";
7
- import { isDef as b } from "../utils/index.mjs";
8
- import le from "./hooks/use-get-columns.mjs";
9
- import { scrollToRowIndex as ue } from "./utils.mjs";
10
- import { useNamespace as fe } from "../config-provider/hooks/use-namespace.mjs";
11
- import { useGlobalConfig as ne } from "../config-provider/hooks/use-global-config.mjs";
12
- const ye = /* @__PURE__ */ G({
6
+ import { useInjectForm as te } from "../ap-form/context.mjs";
7
+ import { isDef as y } from "../utils/index.mjs";
8
+ import ae from "./hooks/use-get-columns.mjs";
9
+ import { scrollToRowIndex as le } from "./utils.mjs";
10
+ import { getModelValue as ue } from "../ap-form/utils/get.mjs";
11
+ import { useNamespace as se } from "../config-provider/hooks/use-namespace.mjs";
12
+ import { useGlobalConfig as fe } from "../config-provider/hooks/use-global-config.mjs";
13
+ const be = /* @__PURE__ */ A({
13
14
  name: "EditableTableFormItem",
14
15
  __name: "form-item",
15
16
  props: {
@@ -109,127 +110,123 @@ const ye = /* @__PURE__ */ G({
109
110
  default: () => ({})
110
111
  }
111
112
  },
112
- setup(C, {
113
- expose: R
113
+ setup(b, {
114
+ expose: C
114
115
  }) {
115
- const l = C;
116
- function B(e, a) {
117
- return g(a) ? a.reduce((u, t) => u == null ? void 0 : u[t], e) : e == null ? void 0 : e[a];
118
- }
119
- const {
116
+ const l = b, {
120
117
  internalInstance: o,
121
- model: F
122
- } = ae(), d = c(B(s(F), l.name) || []), T = H(), D = U(l, "name"), V = x.useWatch(D);
123
- W(() => V.value, async (e) => {
118
+ model: R
119
+ } = te(), d = c(ue(n(R), l.name) || []), B = O(), F = G(l, "name"), v = x.useWatch(F);
120
+ H(() => v.value, async (e) => {
124
121
  var a;
125
- await $(), d.value = e, (a = l.onChange) == null || a.call(l, e);
122
+ await U(), d.value = e, (a = l.onChange) == null || a.call(l, e);
126
123
  }, {
127
124
  deep: !0
128
125
  });
129
126
  const {
130
- b: L
131
- } = fe("editable-table"), p = c(), S = ne("valueTypeMap"), v = le(l, S);
132
- function N(e, a) {
133
- var f;
134
- const u = ((f = s(d)) == null ? void 0 : f.length) || 0;
135
- if (b(l.maxLength) && u >= l.maxLength)
127
+ b: T
128
+ } = se("editable-table"), p = c(), D = fe("valueTypeMap"), V = ae(l, D);
129
+ function L(e, a) {
130
+ var u;
131
+ const s = ((u = n(d)) == null ? void 0 : u.length) || 0;
132
+ if (y(l.maxLength) && s >= l.maxLength)
136
133
  return;
137
134
  const t = {
138
135
  ...e || {}
139
136
  };
140
- o == null || o.setFieldValue(l.name, t, !0, (n, r) => {
141
- if (!n[r]) {
142
- n[r] = [t];
137
+ o == null || o.setFieldValue(l.name, t, !0, (f, r) => {
138
+ if (!f[r]) {
139
+ f[r] = [t];
143
140
  return;
144
141
  }
145
- oe(a) ? n[r].push(t) : n[r].splice(a, 0, t);
142
+ M(a) ? f[r].push(t) : f[r].splice(a, 0, t);
146
143
  });
147
144
  }
148
- function E(e, a = "suffix") {
149
- var n;
150
- const u = ((n = s(d)) == null ? void 0 : n.length) || 0, t = m(e) ? e : e.length;
151
- if (b(l.maxLength) && u + t > l.maxLength)
145
+ function S(e, a = "suffix") {
146
+ var f;
147
+ const s = ((f = n(d)) == null ? void 0 : f.length) || 0, t = i(e) ? e : e.length;
148
+ if (y(l.maxLength) && s + t > l.maxLength)
152
149
  return;
153
- const f = m(e) ? new Array(e).fill(0).map(() => ({})) : te(e);
154
- o == null || o.setFieldValue(l.name, f, !0, (r, i) => {
155
- if (!r[i]) {
156
- r[i] = [...f];
150
+ const u = i(e) ? new Array(e).fill(0).map(() => ({})) : ee(e);
151
+ o == null || o.setFieldValue(l.name, u, !0, (r, m) => {
152
+ if (!r[m]) {
153
+ r[m] = [...u];
157
154
  return;
158
155
  }
159
- a === "suffix" ? r[i].push(...f) : r[i].unshift(...f);
156
+ a === "suffix" ? r[m].push(...u) : r[m].unshift(...u);
160
157
  });
161
158
  }
162
- function _(e) {
163
- const a = new Set(m(e) ? [e] : e);
164
- o == null || o.setFieldValue(l.name, void 0, !0, (u, t) => {
165
- u[t] = u[t].filter((f, n) => !a.has(n));
159
+ function N(e) {
160
+ const a = new Set(i(e) ? [e] : e);
161
+ o == null || o.setFieldValue(l.name, void 0, !0, (s, t) => {
162
+ s[t] = s[t].filter((u, f) => !a.has(f));
166
163
  });
167
164
  }
168
- function k(e) {
169
- var u;
170
- const a = new Set(g(e) ? e : [e]);
171
- a.size !== 0 && ((u = o == null ? void 0 : o.setFieldValue) == null || u.call(o, l.name, void 0, !0, (t, f) => {
172
- t[f] = t[f].filter((n) => !a.has(n[l.rowKey]));
165
+ function E(e) {
166
+ var s;
167
+ const a = new Set(oe(e) ? e : [e]);
168
+ a.size !== 0 && ((s = o == null ? void 0 : o.setFieldValue) == null || s.call(o, l.name, void 0, !0, (t, u) => {
169
+ t[u] = t[u].filter((f) => !a.has(f[l.rowKey]));
173
170
  }));
174
171
  }
175
- function j() {
176
- return s(d);
172
+ function _() {
173
+ return n(d);
177
174
  }
178
- function z(e) {
175
+ function k(e) {
179
176
  var a;
180
- return (a = s(d)) == null ? void 0 : a[e];
177
+ return (a = n(d)) == null ? void 0 : a[e];
181
178
  }
182
- function K(e, a, u = !0) {
183
- o == null || o.setFieldValue(l.name, void 0, !0, (t, f) => {
184
- !t[f] || !t[f][e] || (t[f][e] = {
185
- ...u ? t[f][e] : {},
179
+ function j(e, a, s = !0) {
180
+ o == null || o.setFieldValue(l.name, void 0, !0, (t, u) => {
181
+ !t[u] || !t[u][e] || (t[u][e] = {
182
+ ...s ? t[u][e] : {},
186
183
  ...a
187
184
  });
188
185
  });
189
186
  }
190
- function P(e) {
187
+ function z(e) {
191
188
  o == null || o.setFieldValue(l.name, e);
192
189
  }
193
- function A(e, a) {
190
+ function K(e, a) {
194
191
  var t;
195
- const u = e === "end" ? d.value.length - 1 : e;
196
- ue(u, (t = p.value) == null ? void 0 : t.$el, a);
192
+ const s = e === "end" ? d.value.length - 1 : e;
193
+ le(s, (t = p.value) == null ? void 0 : t.$el, a);
197
194
  }
198
- function O() {
195
+ function P() {
199
196
  var e;
200
197
  (e = o == null ? void 0 : o.setFieldValue) == null || e.call(o, l.name, []);
201
198
  }
202
- return R({
203
- add: N,
204
- remove: _,
205
- getRowData: z,
206
- getRowsData: j,
207
- setRowData: K,
208
- addMultiple: E,
209
- scrollTo: A,
210
- setTableData: P,
211
- clear: O,
212
- removeByKey: k
213
- }), (e, a) => (J(), q(s(x).FormItem, h(e.formItem, {
199
+ return C({
200
+ add: L,
201
+ remove: N,
202
+ getRowData: k,
203
+ getRowsData: _,
204
+ setRowData: j,
205
+ addMultiple: S,
206
+ scrollTo: K,
207
+ setTableData: z,
208
+ clear: P,
209
+ removeByKey: E
210
+ }), (e, a) => ($(), W(n(x).FormItem, h(e.formItem, {
214
211
  name: e.name,
215
212
  label: e.label
216
213
  }), {
217
- default: w(() => [Q(s(ee), h(s(y)(l, ["name", "maxLength", "onChange"]), {
214
+ default: w(() => [q(n(I), h(n(g)(l, ["name", "maxLength", "onChange"]), {
218
215
  ref_key: "tableRef",
219
216
  ref: p,
220
- class: s(L)(),
221
- columns: s(v),
217
+ class: n(T)(),
218
+ columns: n(V),
222
219
  "data-source": d.value
223
- }), X({
220
+ }), J({
224
221
  _: 2
225
- }, [Y(s(y)(T, ["headerCell"]), (u, t) => ({
222
+ }, [Q(n(g)(B, ["headerCell"]), (s, t) => ({
226
223
  name: t,
227
- fn: w((f) => [Z(e.$slots, t, I(M(f || {})))])
224
+ fn: w((u) => [X(e.$slots, t, Y(Z(u || {})))])
228
225
  }))]), 1040, ["class", "columns", "data-source"])]),
229
226
  _: 3
230
227
  }, 16, ["name", "label"]));
231
228
  }
232
229
  });
233
230
  export {
234
- ye as default
231
+ be as default
235
232
  };
@@ -148,7 +148,7 @@ const a = {
148
148
  appendix: "Appendix"
149
149
  },
150
150
  batchInputGroup: {
151
- popoverInputPlaceholder: "A maximum of 200 entries can be entered in batches, separated by newlines"
151
+ popoverInputPlaceholder: "A maximum of {maxNum} entries can be entered in batches, separated by newlines"
152
152
  },
153
153
  apSummary: {
154
154
  total: "Total"
@@ -156,7 +156,7 @@ const a = {
156
156
  appendix: "附件"
157
157
  },
158
158
  batchInputGroup: {
159
- popoverInputPlaceholder: "支持批量输入,可用换行符分隔,最多输入200条"
159
+ popoverInputPlaceholder: "支持批量输入,可用换行符分隔,最多输入{maxNum}条"
160
160
  },
161
161
  apSummary: {
162
162
  total: "合计"
@@ -1,2 +1,2 @@
1
- declare const _default: "6.13.3";
1
+ declare const _default: "6.13.4";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "6.13.3";
1
+ const e = "6.13.4";
2
2
  export {
3
3
  e as default
4
4
  };