@aplus-frontend/ui 7.17.0 → 7.17.1

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 (121) hide show
  1. package/es/src/ap-field/cascader/index.vue.mjs +86 -131
  2. package/es/src/ap-field/cascader/read.vue2.mjs +36 -35
  3. package/es/src/ap-field/checkbox/index.vue.d.ts +18 -1
  4. package/es/src/ap-field/checkbox/index.vue.mjs +42 -43
  5. package/es/src/ap-field/checkbox/read.vue2.mjs +1 -1
  6. package/es/src/ap-field/date/index.vue.mjs +48 -48
  7. package/es/src/ap-field/date/read.vue2.mjs +1 -1
  8. package/es/src/ap-field/date-range/index.vue.mjs +31 -31
  9. package/es/src/ap-field/date-range/read.vue2.mjs +1 -1
  10. package/es/src/ap-field/interface.d.ts +7 -22
  11. package/es/src/ap-field/number/index.vue.mjs +36 -34
  12. package/es/src/ap-field/number/read.vue2.mjs +1 -1
  13. package/es/src/ap-field/radio/index.vue.mjs +34 -42
  14. package/es/src/ap-field/radio/read.vue2.mjs +1 -1
  15. package/es/src/ap-field/rate/index.vue.mjs +23 -23
  16. package/es/src/ap-field/second/index.vue.mjs +27 -29
  17. package/es/src/ap-field/second/read.vue2.mjs +2 -2
  18. package/es/src/ap-field/segmented/index.vue.mjs +37 -37
  19. package/es/src/ap-field/select/index.vue.mjs +90 -92
  20. package/es/src/ap-field/select/read.vue2.mjs +1 -1
  21. package/es/src/ap-field/slider/index.vue.mjs +35 -37
  22. package/es/src/ap-field/switch/index.vue.mjs +38 -38
  23. package/es/src/ap-field/switch/read.vue2.mjs +3 -3
  24. package/es/src/ap-field/text/index.vue.d.ts +478 -3
  25. package/es/src/ap-field/text/index.vue2.mjs +47 -46
  26. package/es/src/ap-field/text/password.vue.d.ts +549 -3
  27. package/es/src/ap-field/text/password.vue.mjs +61 -56
  28. package/es/src/ap-field/text/read-password.vue2.mjs +16 -16
  29. package/es/src/ap-field/text/read.vue2.mjs +1 -1
  30. package/es/src/ap-field/text-area/index.vue.mjs +29 -31
  31. package/es/src/ap-field/text-area/read.vue2.mjs +1 -1
  32. package/es/src/ap-field/tree-select/index.vue.mjs +47 -47
  33. package/es/src/ap-field/tree-select/read.vue2.mjs +3 -3
  34. package/es/src/ap-form/drawer-form/index.vue.mjs +99 -90
  35. package/es/src/ap-form/hooks/use-regist-form.d.ts +7 -0
  36. package/es/src/ap-form/hooks/use-regist-form.mjs +24 -0
  37. package/es/src/ap-form/item/index.vue.d.ts +6 -6
  38. package/es/src/ap-form/item/index.vue.mjs +85 -94
  39. package/es/src/ap-form/item-group/index.vue.mjs +14 -14
  40. package/es/src/ap-form/items/cascader/index.vue.d.ts +2 -2
  41. package/es/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
  42. package/es/src/ap-form/items/date/index.vue.d.ts +2 -2
  43. package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -2
  44. package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
  45. package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
  46. package/es/src/ap-form/items/switch/index.vue.d.ts +2 -2
  47. package/es/src/ap-form/items/text/index.vue.d.ts +476 -4
  48. package/es/src/ap-form/items/text/password.vue.d.ts +547 -4
  49. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  50. package/es/src/ap-form/list/index.vue.mjs +29 -34
  51. package/es/src/ap-form/modal-form/index.vue.mjs +77 -68
  52. package/es/src/ap-form/set/index.vue.d.ts +2 -4
  53. package/es/src/ap-form/set/index.vue.mjs +23 -18
  54. package/es/src/ap-grid/index.vue.mjs +1 -1
  55. package/es/src/ap-table/constants.d.ts +593 -31
  56. package/es/src/ap-table/utils.d.ts +1 -1
  57. package/es/src/business/batch-input-group/index.vue.d.ts +240 -3
  58. package/es/src/business/batch-input-group/index.vue.mjs +1 -1
  59. package/es/src/version.d.ts +1 -1
  60. package/es/src/version.mjs +1 -1
  61. package/lib/src/ap-field/cascader/index.vue.js +1 -1
  62. package/lib/src/ap-field/cascader/read.vue2.js +1 -1
  63. package/lib/src/ap-field/checkbox/index.vue.d.ts +18 -1
  64. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  65. package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
  66. package/lib/src/ap-field/date/index.vue.js +1 -1
  67. package/lib/src/ap-field/date/read.vue2.js +1 -1
  68. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  69. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  70. package/lib/src/ap-field/interface.d.ts +7 -22
  71. package/lib/src/ap-field/number/index.vue.js +1 -1
  72. package/lib/src/ap-field/number/read.vue2.js +1 -1
  73. package/lib/src/ap-field/radio/index.vue.js +1 -1
  74. package/lib/src/ap-field/radio/read.vue2.js +1 -1
  75. package/lib/src/ap-field/rate/index.vue.js +1 -1
  76. package/lib/src/ap-field/second/index.vue.js +1 -1
  77. package/lib/src/ap-field/second/read.vue2.js +1 -1
  78. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  79. package/lib/src/ap-field/select/index.vue.js +1 -1
  80. package/lib/src/ap-field/select/read.vue2.js +1 -1
  81. package/lib/src/ap-field/slider/index.vue.js +1 -1
  82. package/lib/src/ap-field/switch/index.vue.js +1 -1
  83. package/lib/src/ap-field/switch/read.vue2.js +1 -1
  84. package/lib/src/ap-field/text/index.vue.d.ts +478 -3
  85. package/lib/src/ap-field/text/index.vue2.js +1 -1
  86. package/lib/src/ap-field/text/password.vue.d.ts +549 -3
  87. package/lib/src/ap-field/text/password.vue.js +1 -1
  88. package/lib/src/ap-field/text/read-password.vue2.js +1 -1
  89. package/lib/src/ap-field/text/read.vue2.js +1 -1
  90. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  91. package/lib/src/ap-field/text-area/read.vue2.js +1 -1
  92. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  93. package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
  94. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  95. package/lib/src/ap-form/hooks/use-regist-form.d.ts +7 -0
  96. package/lib/src/ap-form/hooks/use-regist-form.js +1 -0
  97. package/lib/src/ap-form/item/index.vue.d.ts +6 -6
  98. package/lib/src/ap-form/item/index.vue.js +1 -1
  99. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  100. package/lib/src/ap-form/items/cascader/index.vue.d.ts +2 -2
  101. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
  102. package/lib/src/ap-form/items/date/index.vue.d.ts +2 -2
  103. package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -2
  104. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
  105. package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
  106. package/lib/src/ap-form/items/switch/index.vue.d.ts +2 -2
  107. package/lib/src/ap-form/items/text/index.vue.d.ts +476 -4
  108. package/lib/src/ap-form/items/text/password.vue.d.ts +547 -4
  109. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  110. package/lib/src/ap-form/list/index.vue.js +1 -1
  111. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  112. package/lib/src/ap-form/set/index.vue.d.ts +2 -4
  113. package/lib/src/ap-form/set/index.vue.js +1 -1
  114. package/lib/src/ap-grid/index.vue.js +1 -1
  115. package/lib/src/ap-table/constants.d.ts +593 -31
  116. package/lib/src/ap-table/utils.d.ts +1 -1
  117. package/lib/src/business/batch-input-group/index.vue.d.ts +240 -3
  118. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  119. package/lib/src/version.d.ts +1 -1
  120. package/lib/src/version.js +1 -1
  121. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
- import { defineComponent as k, onMounted as V, computed as f, unref as o, renderSlot as K } from "vue";
2
- import { isArray as g } from "lodash-unified";
3
- import { useInjectForm as h } from "../context.mjs";
4
- const L = /* @__PURE__ */ k({
1
+ import { defineComponent as _, computed as f, unref as s, renderSlot as k } from "vue";
2
+ import { isArray as K } from "lodash-unified";
3
+ import { useInjectForm as g } from "../context.mjs";
4
+ import h from "../hooks/use-regist-form.mjs";
5
+ const b = /* @__PURE__ */ _({
5
6
  name: "ApFormList",
6
7
  __name: "index",
7
8
  props: {
@@ -10,46 +11,40 @@ const L = /* @__PURE__ */ k({
10
11
  transform: { type: [Function, Object] }
11
12
  },
12
13
  setup(p) {
13
- let a = 1;
14
- const s = [], t = p, { model: l, updateModel: m, internalInstance: d } = h();
15
- V(() => {
16
- d?.registerField({
17
- name: t.name,
18
- initialValue: t.initialValue,
19
- transform: t.transform
20
- });
21
- });
22
- const i = f(() => t.name ? g(t.name) ? t.name.reduce((e, n) => e?.[n], o(l)) : l?.value[t.name] : null);
23
- function y(e = void 0) {
24
- const n = o(i) ? [...o(i), e] : [e], r = a;
25
- return s.push(r), a += 1, m?.(t.name, n), r;
14
+ let o = 1;
15
+ const u = [], n = p, { model: i, updateModel: l } = g();
16
+ h(n);
17
+ const a = f(() => n.name ? K(n.name) ? n.name.reduce((e, t) => e?.[t], s(i)) : i?.value[n.name] : null);
18
+ function d(e = void 0) {
19
+ const t = s(a) ? [...s(a), e] : [e], r = o;
20
+ return u.push(r), o += 1, l?.(n.name, t), r;
26
21
  }
27
- function v(e) {
28
- let n = o(i) || [];
29
- n = [...n.slice(0, e), ...n.slice(e + 1)], s.splice(e, 1), m?.(t.name, n);
22
+ function y(e) {
23
+ let t = s(a) || [];
24
+ t = [...t.slice(0, e), ...t.slice(e + 1)], u.splice(e, 1), l?.(n.name, t);
30
25
  }
31
- function F() {
26
+ function v() {
32
27
  return c.value.map((e) => e.key);
33
28
  }
34
- const _ = {
35
- add: y,
36
- remove: v,
37
- getFieldKeys: F
38
- }, c = f(() => (o(i) || []).map((n, r) => {
39
- let u = s[r];
40
- return typeof u > "u" && (s[r] = a, u = a, a += 1), {
41
- key: u,
29
+ const F = {
30
+ add: d,
31
+ remove: y,
32
+ getFieldKeys: v
33
+ }, c = f(() => (s(a) || []).map((t, r) => {
34
+ let m = u[r];
35
+ return typeof m > "u" && (u[r] = o, m = o, o += 1), {
36
+ key: m,
42
37
  fieldName: r,
43
- name: [t.name, r].flat(),
44
- value: n
38
+ name: [n.name, r].flat(),
39
+ value: t
45
40
  };
46
41
  }));
47
- return (e, n) => K(e.$slots, "default", {
42
+ return (e, t) => k(e.$slots, "default", {
48
43
  fields: c.value,
49
- actions: _
44
+ actions: F
50
45
  });
51
46
  }
52
47
  });
53
48
  export {
54
- L as default
49
+ b as default
55
50
  };
@@ -1,19 +1,21 @@
1
- import { isVNode as O, defineComponent as z, useSlots as E, ref as d, watch as $, cloneVNode as q, computed as A, createVNode as n, mergeProps as m, unref as o, createElementBlock as D, openBlock as p, Fragment as L, createBlock as T, createCommentVNode as K, withCtx as b, createElementVNode as W, normalizeClass as G, normalizeStyle as H, renderSlot as C, resolveDynamicComponent as B, createTextVNode as J, toDisplayString as Q } from "vue";
2
- import { Button as v, Flex as X, Space as Y, Modal as Z } from "@aplus-frontend/antdv";
1
+ import { isVNode as E, defineComponent as $, computed as p, useSlots as q, ref as d, watch as A, cloneVNode as L, createVNode as n, mergeProps as m, unref as a, createElementBlock as D, openBlock as v, Fragment as K, createBlock as C, createCommentVNode as B, withCtx as b, createElementVNode as W, normalizeClass as G, normalizeStyle as H, renderSlot as k, createTextVNode as J, toDisplayString as Q } from "vue";
2
+ import { Button as y, Flex as X, Space as Y, Modal as Z } from "@aplus-frontend/antdv";
3
3
  import { omit as ee } from "lodash-unified";
4
+ import "../../render/index.mjs";
4
5
  import "../../config-provider/index.mjs";
5
6
  import "../../hooks/index.mjs";
6
7
  import { getSingleVNode as te } from "../../utils/slot.mjs";
7
8
  import "../ap-form.vue.mjs";
8
9
  import le from "../style/modal-form.mjs";
9
- import { useControllableValue as ae } from "../../hooks/useControllableValue.mjs";
10
- import { useLocale as oe } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { useControllableValue as oe } from "../../hooks/useControllableValue.mjs";
11
+ import { useLocale as ae } from "../../config-provider/hooks/use-locale.mjs";
11
12
  import { useNamespace as se } from "../../config-provider/hooks/use-namespace.mjs";
12
13
  import ne from "../ap-form.vue2.mjs";
13
- function k(r) {
14
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !O(r);
14
+ import P from "../../render/render.mjs";
15
+ function S(r) {
16
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !E(r);
15
17
  }
16
- const Ne = /* @__PURE__ */ z({
18
+ const Re = /* @__PURE__ */ $({
17
19
  name: "ApFormModalForm",
18
20
  __name: "index",
19
21
  props: {
@@ -96,52 +98,55 @@ const Ne = /* @__PURE__ */ z({
96
98
  },
97
99
  emits: ["update:open"],
98
100
  setup(r, {
99
- expose: P,
100
- emit: S
101
+ expose: w,
102
+ emit: N
101
103
  }) {
102
- const t = r, c = E(), w = S, a = d(), y = d(0), i = d(), s = d(!1), {
103
- value: N,
104
+ const t = r, x = p(() => ee(t, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), c = q(), R = N, o = d(), F = d(0), i = d(), s = d(!1), {
105
+ value: _,
104
106
  updateValue: u
105
- } = ae(t, w, {
107
+ } = oe(t, R, {
106
108
  valuePropName: "open",
107
109
  defaultValue: !1,
108
110
  beforeUpdateValue(e) {
109
- return e && (y.value += 1), !0;
111
+ return e && (F.value += 1), !0;
110
112
  }
111
113
  }), {
112
114
  t: f
113
- } = oe(), x = le("ap-form-modal-form"), {
114
- b: R,
115
- e: F
115
+ } = ae(), I = le("ap-form-modal-form"), {
116
+ b: M,
117
+ e: h
116
118
  } = se("ap-form-modal-form");
117
- $(() => a.value, (e) => {
119
+ A(() => o.value, (e) => {
118
120
  e && i.value && (e.setFieldsValue?.(i.value), i.value = void 0);
119
121
  });
120
- const h = te(c.trigger), g = h ? q(h, {
121
- onClick: () => {
122
- u(!0);
123
- }
124
- }) : null, _ = A(() => {
122
+ const g = p(() => {
123
+ const e = te(c.trigger);
124
+ return e ? L(e, {
125
+ onClick: () => {
126
+ u(!0);
127
+ }
128
+ }) : null;
129
+ }), V = p(() => {
125
130
  const e = [];
126
131
  if (t.submitter === !1)
127
132
  return null;
128
133
  if (t.showCancel) {
129
134
  let l;
130
- e.push(n(v, {
131
- onClick: V,
135
+ e.push(n(y, {
136
+ onClick: T,
132
137
  disabled: s.value
133
- }, k(l = f("ap.common.cancelText")) ? l : {
138
+ }, S(l = f("ap.common.cancelText")) ? l : {
134
139
  default: () => [l]
135
140
  }));
136
141
  }
137
- return t.submitter?.resetButtonProps !== !1 && e.push(n(v, m(t.submitter?.resetButtonProps || {}, {
142
+ return t.submitter?.resetButtonProps !== !1 && e.push(n(y, m(t.submitter?.resetButtonProps || {}, {
138
143
  key: "reset",
139
144
  disabled: s.value,
140
- onClick: I,
145
+ onClick: U,
141
146
  htmlType: "reset"
142
147
  }), {
143
148
  default: () => [t.submitter?.resetText || f("ap.common.resetText")]
144
- })), t.submitter?.submitButtonProps !== !1 && e.push(n(v, m({
149
+ })), t.submitter?.submitButtonProps !== !1 && e.push(n(y, m({
145
150
  type: "primary",
146
151
  key: "submit",
147
152
  htmlType: "submit"
@@ -151,26 +156,26 @@ const Ne = /* @__PURE__ */ z({
151
156
  default: () => [t.submitter?.submitText || f("ap.common.okText")]
152
157
  })), n(X, {
153
158
  justify: "flex-end",
154
- key: o(y),
155
- class: [F("footer")]
159
+ key: a(F),
160
+ class: [h("footer")]
156
161
  }, {
157
- default: () => [c.submitter ? c.submitter(e) : n(Y, null, k(e) ? e : {
162
+ default: () => [c.submitter ? c.submitter(e) : n(Y, null, S(e) ? e : {
158
163
  default: () => [e]
159
164
  })]
160
165
  });
161
166
  });
162
- function I() {
163
- t.submitter !== !1 && (a.value?.resetFields(), t.submitter?.onReset?.());
167
+ function U() {
168
+ t.submitter !== !1 && (o.value?.resetFields(), t.submitter?.onReset?.());
164
169
  }
165
- async function M(e) {
170
+ async function j(e) {
166
171
  if (t.submitter !== !1)
167
172
  try {
168
173
  t.submitter?.onSubmit?.(), s.value = !0;
169
174
  const l = t.onFinish?.(e);
170
175
  if (t.submitTimeout && l instanceof Promise) {
171
- const j = setTimeout(() => s.value = !1, t.submitTimeout);
176
+ const z = setTimeout(() => s.value = !1, t.submitTimeout);
172
177
  l.finally(() => {
173
- clearTimeout(j), s.value = !1;
178
+ clearTimeout(z), s.value = !1;
174
179
  });
175
180
  }
176
181
  await l && u(!1);
@@ -178,72 +183,76 @@ const Ne = /* @__PURE__ */ z({
178
183
  s.value = !1;
179
184
  }
180
185
  }
181
- function V() {
182
- o(s) || u(!1);
186
+ function T() {
187
+ a(s) || u(!1);
183
188
  }
184
- function U(e) {
185
- !e && o(s) || u(e);
189
+ function O(e) {
190
+ !e && a(s) || u(e);
186
191
  }
187
- return P({
192
+ return w({
188
193
  resetFields: async () => {
189
- a.value?.resetFields();
194
+ o.value?.resetFields();
190
195
  },
191
196
  clearValidate: (e) => {
192
- a.value?.clearValidate(e);
197
+ o.value?.clearValidate(e);
193
198
  },
194
- validateFields: (e, l) => a.value?.validateFields(e, l),
195
- getFieldsValue: (e) => a.value?.getFieldsValue(e),
196
- validate: (e, l) => a.value?.validate(e, l),
199
+ validateFields: (e, l) => o.value?.validateFields(e, l),
200
+ getFieldsValue: (e) => o.value?.getFieldsValue(e),
201
+ validate: (e, l) => o.value?.validate(e, l),
197
202
  scrollToField: (e, l = {}) => {
198
- a.value?.scrollToField(e, l);
203
+ o.value?.scrollToField(e, l);
199
204
  },
200
205
  setFieldValue: (e, l) => {
201
- a.value?.setFieldValue?.(e, l);
206
+ o.value?.setFieldValue?.(e, l);
202
207
  },
203
208
  setFieldsValue: (e) => {
204
- if (!a.value) {
209
+ if (!o.value) {
205
210
  i.value = e;
206
211
  return;
207
212
  }
208
- a.value?.setFieldsValue?.(e);
213
+ o.value?.setFieldsValue?.(e);
209
214
  },
210
- getInternalInstance: (e) => a.value?.getInternalInstance(e),
215
+ getInternalInstance: (e) => o.value?.getInternalInstance(e),
211
216
  getFieldsValueTransformed(e) {
212
- return a.value?.getFieldsValueTransformed(e);
217
+ return o.value?.getFieldsValueTransformed(e);
213
218
  },
214
219
  validateFieldsReturnTransformed(e, l) {
215
- return a.value?.validateFieldsReturnTransformed(e, l);
220
+ return o.value?.validateFieldsReturnTransformed(e, l);
216
221
  }
217
- }), (e, l) => (p(), D(L, null, [n(o(Z), m(e.modalProps, {
218
- open: o(N),
222
+ }), (e, l) => (v(), D(K, null, [n(a(Z), m(e.modalProps, {
223
+ open: a(_),
219
224
  footer: null,
220
225
  width: e.width,
221
- class: [o(R)(), o(x)],
226
+ class: [a(M)(), a(I)],
222
227
  "body-style": {
223
228
  padding: "0px !important"
224
229
  },
225
- "onUpdate:open": U,
226
- onCancel: V
230
+ "onUpdate:open": O,
231
+ onCancel: T
227
232
  }), {
228
- title: b(() => [C(e.$slots, "title", {}, () => [J(Q(t.title), 1)])]),
233
+ title: b(() => [k(e.$slots, "title", {}, () => [J(Q(t.title), 1)])]),
229
234
  default: b(() => [n(ne, m({
230
235
  ref_key: "formRef",
231
- ref: a
232
- }, o(ee)(t, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"]), {
233
- onFinish: M
236
+ ref: o
237
+ }, x.value, {
238
+ onFinish: j
234
239
  }), {
235
240
  default: b(() => [W("div", {
236
241
  style: H(e.modalProps?.bodyStyle),
237
- class: G(o(F)("content"))
238
- }, [C(e.$slots, "default")], 6), (p(), T(B(_.value)))]),
242
+ class: G(a(h)("content"))
243
+ }, [k(e.$slots, "default")], 6), V.value ? (v(), C(a(P), {
244
+ key: 0,
245
+ node: V.value
246
+ }, null, 8, ["node"])) : B("", !0)]),
239
247
  _: 3
240
248
  }, 16)]),
241
249
  _: 3
242
- }, 16, ["open", "width", "class"]), o(g) ? (p(), T(B(o(g)), {
243
- key: 0
244
- })) : K("", !0)], 64));
250
+ }, 16, ["open", "width", "class"]), g.value ? (v(), C(a(P), {
251
+ key: 0,
252
+ node: g.value
253
+ }, null, 8, ["node"])) : B("", !0)], 64));
245
254
  }
246
255
  });
247
256
  export {
248
- Ne as default
257
+ Re as default
249
258
  };
@@ -2,10 +2,8 @@ import { ApFormSetProps } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
- slots: Readonly<{
6
- default: any;
7
- }> & {
8
- default: any;
5
+ slots: {
6
+ default?(_: {}): any;
9
7
  };
10
8
  refs: {};
11
9
  rootEl: any;
@@ -1,8 +1,11 @@
1
- import { defineComponent as c, useSlots as u, cloneVNode as p, onMounted as f, createElementBlock as d, openBlock as o, Fragment as V, renderList as _, createBlock as y, resolveDynamicComponent as C } from "vue";
2
- import { isFunction as F, cloneDeep as k } from "lodash-unified";
3
- import { isPromise as g } from "../../utils/is.mjs";
4
- import { useInjectForm as h } from "../context.mjs";
5
- const I = /* @__PURE__ */ c({
1
+ import { defineComponent as p, cloneVNode as f, createBlock as i, openBlock as u, unref as c, withCtx as l, renderSlot as d } from "vue";
2
+ import "../../render/index.mjs";
3
+ import "../../utils/index.mjs";
4
+ import { useDevWarning as _ } from "../../utils/warning.mjs";
5
+ import g from "../hooks/use-regist-form.mjs";
6
+ import { isDef as F } from "../../utils/is.mjs";
7
+ import k from "../../render/render.mjs";
8
+ const B = /* @__PURE__ */ p({
6
9
  name: "ApFormSet",
7
10
  __name: "index",
8
11
  props: {
@@ -11,21 +14,23 @@ const I = /* @__PURE__ */ c({
11
14
  initialValue: {},
12
15
  transform: {}
13
16
  },
14
- setup(i) {
15
- const { internalInstance: l } = h(), s = u(), e = i, m = () => (s.default?.() || []).map((r, t) => {
16
- const a = e.as === "array" ? [e.name, t] : [e.name, r.props?.name || ""];
17
- return p(r, { name: a });
17
+ setup(o) {
18
+ const e = o;
19
+ g(e);
20
+ const t = _("ApFormSet"), a = (n) => n.map((r, m) => {
21
+ if (e.as === "object" && !F(r.props?.name))
22
+ return t(!1, "usage", "FormItem skip because of no name prop."), r;
23
+ const s = e.as === "array" ? [e.name, m] : [e.name, r.props.name];
24
+ return f(r, { name: s.flat() });
18
25
  });
19
- return f(async () => {
20
- let n = F(e.initialValue) ? e.initialValue() : e.initialValue;
21
- g(n) && (n = await n), l?.registerField({
22
- name: e.name,
23
- initialValue: k(n),
24
- transform: e.transform
25
- });
26
- }), (n, r) => (o(!0), d(V, null, _(m(), (t, a) => (o(), y(C(t), { key: a }))), 128));
26
+ return (n, r) => (u(), i(c(k), { renderer: a }, {
27
+ default: l(() => [
28
+ d(n.$slots, "default")
29
+ ]),
30
+ _: 3
31
+ }));
27
32
  }
28
33
  });
29
34
  export {
30
- I as default
35
+ B as default
31
36
  };
@@ -124,7 +124,7 @@ const uo = /* @__PURE__ */ Ye({
124
124
  x && !x.__VXE_PC_UI_INSTALLED__ && (x.use(le), x.__VXE_PC_UI_INSTALLED__ = !0), Ct("ApGrid")(
125
125
  !1,
126
126
  "breaking",
127
- "AgGrid has been EOL, Please use AgGrid(https://aplus.aplnk.com/aplus-ui/components/ag-grid/) instead."
127
+ "ApGrid has been EOL, Please use AgGrid(https://aplus.aplnk.com/aplus-ui/components/ag-grid/) instead."
128
128
  );
129
129
  const { e: k, b: u, be: me } = Pt("ap-grid"), ge = Ft("ap-grid"), he = ce("valueTypeMap"), Ce = ce("apGrid"), i = y([]), W = y([]), l = y(), F = y(o.size), ve = kt(), [, ye] = lt(), { t: we } = Tt(), T = y(!0);
130
130
  le.setConfig({