@aplus-frontend/ui 0.5.29 → 0.5.31

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 (57) hide show
  1. package/es/index.mjs +50 -48
  2. package/es/src/ap-field/interface.d.ts +3 -0
  3. package/es/src/ap-grid/editable/form-item.vue.mjs +45 -36
  4. package/es/src/ap-grid/editable/index.vue.mjs +21 -12
  5. package/es/src/ap-grid/index.vue.mjs +106 -102
  6. package/es/src/ap-grid/interface.d.ts +5 -0
  7. package/es/src/ap-grid/utils/col.mjs +88 -77
  8. package/es/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
  9. package/es/src/business/ap-product-info/ApProductInfo.mjs +59 -0
  10. package/es/src/business/ap-product-info/constans.d.ts +11 -14
  11. package/es/src/business/ap-product-info/constans.mjs +21 -0
  12. package/es/src/business/ap-product-info/index.d.ts +86 -0
  13. package/es/src/business/ap-product-info/index.mjs +7 -0
  14. package/es/src/business/ap-product-info/interface.d.ts +9 -7
  15. package/es/src/business/ap-product-info/interface.mjs +1 -0
  16. package/es/src/business/ap-product-info/style/css.d.ts +0 -0
  17. package/es/src/business/ap-product-info/style/css.js +1 -0
  18. package/es/src/business/ap-product-info/style/index.d.ts +0 -0
  19. package/es/src/business/ap-product-info/style/index.js +1 -0
  20. package/es/src/business/index.d.ts +1 -0
  21. package/es/src/business/index.mjs +21 -19
  22. package/es/src/components.d.ts +1 -0
  23. package/es/src/editable-table/form-item.vue.mjs +15 -7
  24. package/es/src/editable-table/index.vue.mjs +36 -28
  25. package/es/src/index.mjs +36 -34
  26. package/es/src/path-map.mjs +1 -0
  27. package/lib/index.js +1 -1
  28. package/lib/src/ap-field/interface.d.ts +3 -0
  29. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  30. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  31. package/lib/src/ap-grid/index.vue.js +1 -1
  32. package/lib/src/ap-grid/interface.d.ts +5 -0
  33. package/lib/src/ap-grid/utils/col.js +1 -1
  34. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
  35. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -0
  36. package/lib/src/business/ap-product-info/constans.d.ts +11 -14
  37. package/lib/src/business/ap-product-info/constans.js +1 -0
  38. package/lib/src/business/ap-product-info/index.d.ts +86 -0
  39. package/lib/src/business/ap-product-info/index.js +1 -0
  40. package/lib/src/business/ap-product-info/interface.d.ts +9 -7
  41. package/lib/src/business/ap-product-info/interface.js +1 -0
  42. package/lib/src/business/ap-product-info/style/css.cjs +1 -0
  43. package/lib/src/business/ap-product-info/style/css.d.ts +0 -0
  44. package/lib/src/business/ap-product-info/style/index.cjs +1 -0
  45. package/lib/src/business/ap-product-info/style/index.d.ts +0 -0
  46. package/lib/src/business/index.d.ts +1 -0
  47. package/lib/src/business/index.js +1 -1
  48. package/lib/src/components.d.ts +1 -0
  49. package/lib/src/editable-table/form-item.vue.js +1 -1
  50. package/lib/src/editable-table/index.vue.js +1 -1
  51. package/lib/src/index.js +1 -1
  52. package/lib/src/path-map.js +1 -1
  53. package/package.json +1 -1
  54. package/theme/ap-product-info/ap-product-info.css +87 -0
  55. package/theme/ap-product-info/ap-product-info.less +100 -0
  56. package/theme/index.css +87 -0
  57. package/theme/index.less +1 -0
package/es/index.mjs CHANGED
@@ -105,30 +105,31 @@ import { default as ct } from "./src/business/ap-upload-file/ap-upload-single/ap
105
105
  import { default as It } from "./src/business/batch-input-group/index.vue.mjs";
106
106
  import { default as bt } from "./src/business/batch-input-group/form-item.vue.mjs";
107
107
  import { ApSizeInput as Ct } from "./src/business/ap-size-input/index.mjs";
108
- import { useTablePaging as Dt } from "./src/ap-table/hooks/use-table-paging.mjs";
109
- import { ApTable as ht } from "./src/ap-table/index.mjs";
110
- import { default as Rt } from "./src/editable-table/index.vue.mjs";
111
- import { default as Mt } from "./src/editable-table/form-item.vue.mjs";
112
- import { default as Nt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
113
- import { ensureRangeValue as wt } from "./src/scroll-bar/utils/index.mjs";
114
- import { default as vt } from "./src/scroll-bar/index.vue.mjs";
115
- import { default as Kt } from "./src/scroll-bar/internal.vue.mjs";
116
- import { default as Ut } from "./src/scroll-view/index.vue.mjs";
117
- import { default as Vt } from "./src/portal/index.vue.mjs";
118
- import { default as _t } from "./src/full-screen/index.vue.mjs";
119
- import { default as $t } from "./src/resize-observer/index.vue.mjs";
120
- import { default as qt } from "./src/ap-grid/index.vue.mjs";
121
- import { default as Qt } from "./src/ap-grid/editable/index.vue.mjs";
122
- import { default as Yt } from "./src/ap-grid/editable/form-item.vue.mjs";
123
- import { default as ep } from "./src/text/index.vue.mjs";
124
- import { default as rp } from "./src/text/group.vue.mjs";
125
- import { default as pp } from "./src/mask/index.vue.mjs";
126
- import { useMessage as fp } from "./src/hooks/useMessage.mjs";
127
- import { useControllableValue as lp } from "./src/hooks/useControllableValue.mjs";
128
- import { useManualRef as dp } from "./src/hooks/useManualRef.mjs";
129
- import { useThrottleRef as sp } from "./src/hooks/useThrottleRef.mjs";
130
- import { useFullScreen as ip } from "./src/hooks/useFullScreen.mjs";
131
- import { useResize as cp } from "./src/hooks/useResize.mjs";
108
+ import { ApProductInfo as Dt } from "./src/business/ap-product-info/index.mjs";
109
+ import { useTablePaging as ht } from "./src/ap-table/hooks/use-table-paging.mjs";
110
+ import { ApTable as Rt } from "./src/ap-table/index.mjs";
111
+ import { default as Mt } from "./src/editable-table/index.vue.mjs";
112
+ import { default as Nt } from "./src/editable-table/form-item.vue.mjs";
113
+ import { default as wt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
114
+ import { ensureRangeValue as vt } from "./src/scroll-bar/utils/index.mjs";
115
+ import { default as Kt } from "./src/scroll-bar/index.vue.mjs";
116
+ import { default as Ut } from "./src/scroll-bar/internal.vue.mjs";
117
+ import { default as Vt } from "./src/scroll-view/index.vue.mjs";
118
+ import { default as _t } from "./src/portal/index.vue.mjs";
119
+ import { default as $t } from "./src/full-screen/index.vue.mjs";
120
+ import { default as qt } from "./src/resize-observer/index.vue.mjs";
121
+ import { default as Qt } from "./src/ap-grid/index.vue.mjs";
122
+ import { default as Yt } from "./src/ap-grid/editable/index.vue.mjs";
123
+ import { default as ep } from "./src/ap-grid/editable/form-item.vue.mjs";
124
+ import { default as rp } from "./src/text/index.vue.mjs";
125
+ import { default as pp } from "./src/text/group.vue.mjs";
126
+ import { default as fp } from "./src/mask/index.vue.mjs";
127
+ import { useMessage as lp } from "./src/hooks/useMessage.mjs";
128
+ import { useControllableValue as dp } from "./src/hooks/useControllableValue.mjs";
129
+ import { useManualRef as sp } from "./src/hooks/useManualRef.mjs";
130
+ import { useThrottleRef as ip } from "./src/hooks/useThrottleRef.mjs";
131
+ import { useFullScreen as cp } from "./src/hooks/useFullScreen.mjs";
132
+ import { useResize as Ip } from "./src/hooks/useResize.mjs";
132
133
  const a = {
133
134
  install: (r) => {
134
135
  for (const t in o) {
@@ -153,7 +154,7 @@ export {
153
154
  nr as ApButtonGroup,
154
155
  Fr as ApCard,
155
156
  Xo as ApConfirmButton,
156
- Nt as ApDescriptions,
157
+ wt as ApDescriptions,
157
158
  ko as ApDownLoadNeedNameKeyDefault,
158
159
  Bo as ApDownload,
159
160
  Zo as ApDrawer,
@@ -200,7 +201,7 @@ export {
200
201
  he as ApFormProvider,
201
202
  se as ApFormSearchForm,
202
203
  Ie as ApFormSet,
203
- qt as ApGrid,
204
+ Qt as ApGrid,
204
205
  At as ApGroupSearch,
205
206
  Er as ApImage,
206
207
  Eo as ApInfoLayout,
@@ -212,17 +213,18 @@ export {
212
213
  Wo as ApModal,
213
214
  lt as ApNeedNameKeyDefault,
214
215
  it as ApPopoverSelect,
216
+ Dt as ApProductInfo,
215
217
  Ur as ApSelectLayout,
216
218
  Ct as ApSizeInput,
217
219
  Vr as ApStatus,
218
220
  Wr as ApStatusGroup,
219
221
  ft as ApSummary,
220
- ht as ApTable,
222
+ Rt as ApTable,
221
223
  tr as ApTableModal,
222
224
  Go as ApTag,
223
225
  Po as ApTagGroup,
224
- ep as ApText,
225
- rp as ApTextGroup,
226
+ rp as ApText,
227
+ pp as ApTextGroup,
226
228
  Hr as ApTitle,
227
229
  or as ApTransformDataHelper,
228
230
  yo as ApUpload,
@@ -234,18 +236,18 @@ export {
234
236
  s as DEFAULT_NAMESPACE,
235
237
  A as DEFAULT_UIMODE,
236
238
  Io as DictCode,
237
- Qt as EditableGrid,
238
- Yt as EditableGridFormItem,
239
- Rt as EditableTable,
240
- Mt as EditableTableFormItem,
241
- _t as FullScreen,
242
- Kt as InternalScrollBar,
243
- pp as Mask,
239
+ Yt as EditableGrid,
240
+ ep as EditableGridFormItem,
241
+ Mt as EditableTable,
242
+ Nt as EditableTableFormItem,
243
+ $t as FullScreen,
244
+ Ut as InternalScrollBar,
245
+ fp as Mask,
244
246
  Lo as NeedNameKeyDefault,
245
- Vt as Portal,
246
- $t as ResizeObserver,
247
- vt as ScrollBar,
248
- Ut as ScrollView,
247
+ _t as Portal,
248
+ qt as ResizeObserver,
249
+ Kt as ScrollBar,
250
+ Vt as ScrollView,
249
251
  go as WorkOrderModal,
250
252
  po as adminToken,
251
253
  ao as aplusToken,
@@ -258,7 +260,7 @@ export {
258
260
  So as createWorkOrderModal,
259
261
  a as default,
260
262
  h as defaultNamespace,
261
- wt as ensureRangeValue,
263
+ vt as ensureRangeValue,
262
264
  rt as flattenColumns,
263
265
  tt as formatDataIndex,
264
266
  pt as formatNumber,
@@ -272,21 +274,21 @@ export {
272
274
  l as pathMap,
273
275
  F as provideGlobalConfig,
274
276
  g as translate,
275
- lp as useControllableValue,
276
- ip as useFullScreen,
277
+ dp as useControllableValue,
278
+ cp as useFullScreen,
277
279
  R as useGetDerivedNamespace,
278
280
  I as useGlobalConfig,
279
281
  Zr as useGridRefresh,
280
282
  D as useLocale,
281
- dp as useManualRef,
282
- fp as useMessage,
283
+ sp as useManualRef,
284
+ lp as useMessage,
283
285
  E as useNamespace,
284
286
  Xr as usePageListApGrid,
285
287
  jr as usePageListApTable,
286
- cp as useResize,
288
+ Ip as useResize,
287
289
  ar as useTableModal,
288
- Dt as useTablePaging,
290
+ ht as useTablePaging,
289
291
  Jr as useTableRefresh,
290
292
  mr as useTableSelectModal,
291
- sp as useThrottleRef
293
+ ip as useThrottleRef
292
294
  };
@@ -7,6 +7,8 @@ import { LiteralUnion, Recordable } from '../type';
7
7
  import { InputPasswordProps } from './text/input-password-props';
8
8
  import { ZoneAlias } from '@aplus-frontend/utils';
9
9
  import { LegacyDataNode } from '@aplus-frontend/antdv/es/vc-tree-select/interface';
10
+ import { SharedTimeProps } from '@aplus-frontend/antdv/es/vc-picker/panels/TimePanel';
11
+ import { Dayjs } from 'dayjs';
10
12
  export type FieldMode = 'read' | 'edit';
11
13
  export type BasicApFieldProps<FieldPropsType = any> = {
12
14
  mode?: FieldMode;
@@ -64,6 +66,7 @@ export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' |
64
66
  label?: string;
65
67
  value: ZoneAlias;
66
68
  }[];
69
+ disabledTime?: SharedTimeProps<Dayjs>['disabledTime'];
67
70
  };
68
71
  export type ApFieldNumberProps = BasicApFieldProps<InputNumberProps> & {
69
72
  emptyText?: string;
@@ -1,15 +1,15 @@
1
- import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as s, watch as W, nextTick as G, createBlock as K, openBlock as U, mergeProps as g, withCtx as C, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
1
+ import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as f, watch as W, nextTick as G, createBlock as K, openBlock as U, mergeProps as C, 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 y } from "../../ap-form/index.mjs";
3
3
  import { isArray as Z, isUndefined as I, isNumber as m, cloneDeep as M, omit as ee } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import { isDef as w } from "../../utils/index.mjs";
6
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";
9
- import { useNamespace as te } from "../../config-provider/hooks/use-namespace.mjs";
8
+ import { useInjectForm as te } from "../../ap-form/context.mjs";
9
+ import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
10
10
  import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
11
11
  import ne from "../index.vue.mjs";
12
- const Ce = /* @__PURE__ */ P({
12
+ const ge = /* @__PURE__ */ P({
13
13
  name: "EditableGrid",
14
14
  __name: "form-item",
15
15
  props: {
@@ -113,6 +113,7 @@ const Ce = /* @__PURE__ */ P({
113
113
  default: void 0
114
114
  },
115
115
  onLoadingChange: {},
116
+ onShownColumnsChange: {},
116
117
  pagination: {
117
118
  type: [Boolean, Object],
118
119
  default: !1
@@ -158,14 +159,14 @@ const Ce = /* @__PURE__ */ P({
158
159
  }) {
159
160
  const R = A(), l = x, {
160
161
  b: B
161
- } = te("editable-grid");
162
+ } = ae("editable-grid");
162
163
  function S(e, o) {
163
- return Z(o) ? o.reduce((n, t) => n == null ? void 0 : n[t], e) : e == null ? void 0 : e[o];
164
+ return Z(o) ? o.reduce((n, a) => n == null ? void 0 : n[a], e) : e == null ? void 0 : e[o];
164
165
  }
165
166
  const {
166
- internalInstance: a,
167
+ internalInstance: t,
167
168
  model: F
168
- } = ae(), p = H(l.name), d = h(S(s(F), p.value) || []), N = y.useWatch(p);
169
+ } = te(), p = H(l.name), d = h(S(f(F), p.value) || []), N = y.useWatch(p);
169
170
  W(() => N.value, async (e) => {
170
171
  var o;
171
172
  await G(), d.value = e, (o = l.onChange) == null || o.call(l, e);
@@ -174,50 +175,58 @@ const Ce = /* @__PURE__ */ P({
174
175
  });
175
176
  const c = h(), v = le("valueTypeMap"), D = oe(l, v);
176
177
  function L(e, o) {
177
- var u;
178
- const n = ((u = s(d)) == null ? void 0 : u.length) || 0;
178
+ var r;
179
+ const n = ((r = f(d)) == null ? void 0 : r.length) || 0;
179
180
  if (w(l.maxLength) && n >= l.maxLength)
180
181
  return;
181
- const t = {
182
+ const a = {
182
183
  ...e || {}
183
184
  };
184
- a == null || a.setFieldValue(l.name, t, !0, (f, r) => {
185
- f[r] || (f[r] = [t]), I(o) ? f[r].push(t) : f[r].splice(o, 0, t);
185
+ t == null || t.setFieldValue(l.name, a, !0, (u, s) => {
186
+ if (!u[s]) {
187
+ u[s] = [a];
188
+ return;
189
+ }
190
+ I(o) ? u[s].push(a) : u[s].splice(o, 0, a);
186
191
  });
187
192
  }
188
193
  function V(e, o = "suffix") {
189
- var f;
190
- const n = ((f = s(d)) == null ? void 0 : f.length) || 0, t = m(e) ? e : e.length;
191
- if (w(l.maxLength) && n + t > l.maxLength)
194
+ var u;
195
+ const n = ((u = f(d)) == null ? void 0 : u.length) || 0, a = m(e) ? e : e.length;
196
+ if (w(l.maxLength) && n + a > l.maxLength)
192
197
  return;
193
- const u = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
194
- a == null || a.setFieldValue(l.name, u, !0, (r, i) => {
195
- r[i] || (r[i] = [...u]), o === "suffix" ? r[i].push(...u) : r[i].unshift(...u);
198
+ const r = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
199
+ t == null || t.setFieldValue(l.name, r, !0, (s, i) => {
200
+ if (!s[i]) {
201
+ s[i] = [...r];
202
+ return;
203
+ }
204
+ o === "suffix" ? s[i].push(...r) : s[i].unshift(...r);
196
205
  });
197
206
  }
198
207
  function T(e) {
199
208
  const o = new Set(m(e) ? [e] : e);
200
- a == null || a.setFieldValue(l.name, void 0, !0, (n, t) => {
201
- n[t] = n[t].filter((u, f) => !o.has(f));
209
+ t == null || t.setFieldValue(l.name, void 0, !0, (n, a) => {
210
+ n[a] = n[a].filter((r, u) => !o.has(u));
202
211
  });
203
212
  }
204
213
  function _() {
205
- return s(d);
214
+ return f(d);
206
215
  }
207
216
  function E(e) {
208
217
  var o;
209
- return (o = s(d)) == null ? void 0 : o[e];
218
+ return (o = f(d)) == null ? void 0 : o[e];
210
219
  }
211
220
  function k(e, o, n = !0) {
212
- a == null || a.setFieldValue(l.name, void 0, !0, (t, u) => {
213
- !t[u] || !t[u][e] || (t[u][e] = {
214
- ...n ? t[u][e] : {},
221
+ t == null || t.setFieldValue(l.name, void 0, !0, (a, r) => {
222
+ !a[r] || !a[r][e] || (a[r][e] = {
223
+ ...n ? a[r][e] : {},
215
224
  ...o
216
225
  });
217
226
  });
218
227
  }
219
228
  function j(e) {
220
- a == null || a.setFieldValue(l.name, e);
229
+ t == null || t.setFieldValue(l.name, e);
221
230
  }
222
231
  function z(e) {
223
232
  var n;
@@ -226,7 +235,7 @@ const Ce = /* @__PURE__ */ P({
226
235
  }
227
236
  function O() {
228
237
  var e;
229
- (e = a == null ? void 0 : a.setFieldValue) == null || e.call(a, l.name, []);
238
+ (e = t == null ? void 0 : t.setFieldValue) == null || e.call(t, l.name, []);
230
239
  }
231
240
  return b({
232
241
  add: L,
@@ -238,27 +247,27 @@ const Ce = /* @__PURE__ */ P({
238
247
  scrollTo: z,
239
248
  setTableData: j,
240
249
  clear: O
241
- }), (e, o) => (U(), K(s(y).FormItem, g(e.formItem, {
250
+ }), (e, o) => (U(), K(f(y).FormItem, C(e.formItem, {
242
251
  name: e.name,
243
252
  label: e.label
244
253
  }), {
245
- default: C(() => [$(ne, g(s(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
254
+ default: g(() => [$(ne, C(f(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
246
255
  ref_key: "tableRef",
247
256
  ref: c,
248
- class: s(B)(),
249
- columns: s(D),
257
+ class: f(B)(),
258
+ columns: f(D),
250
259
  "data-source": d.value,
251
260
  "search-form": !1
252
261
  }), q({
253
262
  _: 2
254
- }, [J(R, (n, t) => ({
255
- name: t,
256
- fn: C((u) => [Q(e.$slots, t, X(Y(u || {})))])
263
+ }, [J(R, (n, a) => ({
264
+ name: a,
265
+ fn: g((r) => [Q(e.$slots, a, X(Y(r || {})))])
257
266
  }))]), 1040, ["class", "columns", "data-source"])]),
258
267
  _: 3
259
268
  }, 16, ["name", "label"]));
260
269
  }
261
270
  });
262
271
  export {
263
- Ce as default
272
+ ge as default
264
273
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as U, useSlots as $, ref as w, watch as x, unref as u, createBlock as q, openBlock as J, withCtx as h, createVNode as v, mergeProps as Q, createSlots as X, renderList as Y, renderSlot as Z, normalizeProps as M, guardReactiveProps as ee } from "vue";
2
2
  import { ApForm as g } from "../../ap-form/index.mjs";
3
- import { isEqual as ae, isArray as R, isUndefined as te, isNumber as y, cloneDeep as le, omit as oe } from "lodash-unified";
3
+ import { isEqual as ae, isArray as R, isUndefined as te, isNumber as C, cloneDeep as le, omit as oe } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
6
  import { isDef as b } from "../../utils/index.mjs";
@@ -114,6 +114,7 @@ const Re = /* @__PURE__ */ U({
114
114
  default: void 0
115
115
  },
116
116
  onLoadingChange: {},
117
+ onShownColumnsChange: {},
117
118
  pagination: {
118
119
  type: [Boolean, Object],
119
120
  default: !1
@@ -154,12 +155,12 @@ const Re = /* @__PURE__ */ U({
154
155
  },
155
156
  emits: ["update:value"],
156
157
  setup(B, {
157
- expose: F,
158
- emit: S
158
+ expose: S,
159
+ emit: F
159
160
  }) {
160
161
  const N = $(), t = B, {
161
162
  b: V
162
- } = re("editable-grid"), _ = S, C = w(), {
163
+ } = re("editable-grid"), _ = F, y = w(), {
163
164
  value: m,
164
165
  updateValue: L
165
166
  } = se(t, _), i = w(), E = ue("valueTypeMap"), c = g.useWatch(t.name, i);
@@ -197,22 +198,30 @@ const Re = /* @__PURE__ */ U({
197
198
  ...e || {}
198
199
  };
199
200
  (s = (r = i.value) == null ? void 0 : r.setFieldValue) == null || s.call(r, t.name, o, !0, (d, f) => {
200
- d[f] || (d[f] = [o]), te(a) ? d[f].push(o) : d[f].splice(a, 0, o);
201
+ if (!d[f]) {
202
+ d[f] = [o];
203
+ return;
204
+ }
205
+ te(a) ? d[f].push(o) : d[f].splice(a, 0, o);
201
206
  });
202
207
  }
203
208
  function z(e, a = "suffix") {
204
209
  var r, s, d;
205
- const l = ((r = u(m)) == null ? void 0 : r.length) || 0, o = y(e) ? e : e.length;
210
+ const l = ((r = u(m)) == null ? void 0 : r.length) || 0, o = C(e) ? e : e.length;
206
211
  if (b(t.maxLength) && l + o > t.maxLength)
207
212
  return;
208
- const n = y(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
213
+ const n = C(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
209
214
  (d = (s = i.value) == null ? void 0 : s.setFieldValue) == null || d.call(s, t.name, n, !0, (f, p) => {
210
- f[p] || (f[p] = [...n]), a === "suffix" ? f[p].push(...n) : f[p].unshift(...n);
215
+ if (!f[p]) {
216
+ f[p] = [...n];
217
+ return;
218
+ }
219
+ a === "suffix" ? f[p].push(...n) : f[p].unshift(...n);
211
220
  });
212
221
  }
213
222
  function I(e) {
214
223
  var l, o;
215
- const a = new Set(y(e) ? [e] : e);
224
+ const a = new Set(C(e) ? [e] : e);
216
225
  (o = (l = i.value) == null ? void 0 : l.setFieldValue) == null || o.call(l, t.name, void 0, !0, (n, r) => {
217
226
  n[r] = n[r].filter((s, d) => !a.has(d));
218
227
  });
@@ -240,13 +249,13 @@ const Re = /* @__PURE__ */ U({
240
249
  function G(e) {
241
250
  var l;
242
251
  const a = e === "end" ? m.value.length - 1 : e;
243
- (l = C.value) == null || l.scrollToRow(a);
252
+ (l = y.value) == null || l.scrollToRow(a);
244
253
  }
245
254
  function K() {
246
255
  var e, a;
247
256
  (a = (e = i.value) == null ? void 0 : e.setFieldValue) == null || a.call(e, t.name, []);
248
257
  }
249
- return F({
258
+ return S({
250
259
  resetFields: T,
251
260
  validateFields: A,
252
261
  add: j,
@@ -274,7 +283,7 @@ const Re = /* @__PURE__ */ U({
274
283
  }, {
275
284
  default: h(() => [v(ie, Q(u(oe)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
276
285
  ref_key: "tableRef",
277
- ref: C,
286
+ ref: y,
278
287
  class: u(V)(),
279
288
  columns: u(D),
280
289
  "data-source": u(m),