@dazhicheng/ui 1.5.213 → 1.5.216

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 (33) hide show
  1. package/dist/components/tt-form/src/config.js +44 -42
  2. package/dist/components/tt-form/src/form-render/FormField.vue2.js +67 -70
  3. package/dist/components/tt-form/src/form-render/FormFieldContact.d.ts +9 -0
  4. package/dist/components/tt-form/src/form-render/FormFieldContact.js +28 -25
  5. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +3 -0
  6. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +20 -18
  7. package/dist/components/tt-form/src/form-render/array-register/props.d.ts +4 -0
  8. package/dist/components/tt-form/src/form-render/array-register/props.js +1 -0
  9. package/dist/components/tt-form/src/form-render/array-register/types.d.ts +4 -0
  10. package/dist/components/tt-form/src/form-render/dependencies.d.ts +5 -0
  11. package/dist/components/tt-form/src/form-render/dependencies.js +77 -39
  12. package/dist/components/tt-form/src/group-form/GroupForm.vue.d.ts +15 -7
  13. package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +120 -104
  14. package/dist/components/tt-form/src/group-form/GroupSection.vue.d.ts +1 -0
  15. package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +68 -64
  16. package/dist/components/tt-form/src/group-form/LazyFormField.vue.d.ts +1 -0
  17. package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +131 -101
  18. package/dist/components/tt-form/src/group-form/groupFormApi.d.ts +110 -46
  19. package/dist/components/tt-form/src/group-form/groupFormApi.js +465 -314
  20. package/dist/components/tt-form/src/group-form/lazyContext.d.ts +15 -13
  21. package/dist/components/tt-form/src/group-form/lazyContext.js +42 -26
  22. package/dist/components/tt-form/src/group-form/types.d.ts +13 -3
  23. package/dist/components/tt-form/src/group-form/useGroupForm.js +47 -50
  24. package/dist/components/tt-form/src/hooks/useFieldArray.js +101 -93
  25. package/dist/components/tt-form/src/hooks/useSelectCollapse.js +47 -47
  26. package/dist/components/tt-form/src/types.d.ts +3 -5
  27. package/dist/components/tt-modal-form/index.vue.js +12 -11
  28. package/dist/components/tt-radio-group/index.d.ts +5 -1
  29. package/dist/components/tt-radio-group/index.vue.d.ts +8 -1
  30. package/dist/components/tt-radio-group/index.vue.js +31 -33
  31. package/dist/components/tt-table/src/TableForm.vue.js +3 -2
  32. package/dist/style.css +1 -1
  33. package/package.json +3 -3
@@ -1,61 +1,63 @@
1
- import { ElColorPicker as d, ElCascader as f, ElUpload as u, ElTreeSelect as O, ElTimePicker as N, ElSwitch as P, ElSelectV2 as b, ElSelect as C, ElRadioGroup as M, ElRadio as T, ElInputNumber as _, ElDatePicker as k, ElCheckboxGroup as S, ElCheckboxButton as h, ElCheckbox as R } from "element-plus";
2
- import { TtSelect as A } from "../../tt-select/index.js";
3
- import { TtCheckbox as L } from "../../tt-checkbox/index.js";
4
- import { TtRadioGroup as x } from "../../tt-radio-group/index.js";
5
- import { TtPanelSelect as y } from "../../tt-panel-select/index.js";
6
- import { TtUpload as D } from "../../tt-upload/index.js";
7
- import { TtApiComponent as F } from "../../tt-api-component/index.js";
8
- import { globalShareState as I } from "./shared/global-state.js";
9
- import { defineRule as U } from "vee-validate";
10
- import G from "./components/FormElInput.vue.js";
11
- const p = "modelValue", V = {}, j = {
12
- TtSelect: A,
13
- TtCheckbox: L,
14
- TtRadioGroup: x,
15
- TtUpload: D,
16
- ElCheckbox: R,
17
- ElCheckboxButton: h,
18
- ElCheckboxGroup: S,
19
- ElDatePicker: k,
20
- ElInput: G,
21
- ElInputNumber: _,
22
- ElRadio: T,
23
- ElRadioGroup: M,
24
- ElSelect: C,
25
- ElSelectV2: b,
26
- ElSwitch: P,
27
- ElTimePicker: N,
1
+ import { ElColorPicker as d, ElCascader as f, ElUpload as u, ElTreeSelect as O, ElTimePicker as M, ElSwitch as N, ElSelectV2 as P, ElSelect as T, ElRadioGroup as b, ElRadio as C, ElMention as _, ElInputTag as k, ElInputNumber as S, ElDatePicker as h, ElCheckboxGroup as R, ElCheckboxButton as A, ElCheckbox as I } from "element-plus";
2
+ import { TtSelect as L } from "../../tt-select/index.js";
3
+ import { TtCheckbox as x } from "../../tt-checkbox/index.js";
4
+ import { TtRadioGroup as y } from "../../tt-radio-group/index.js";
5
+ import { TtPanelSelect as D } from "../../tt-panel-select/index.js";
6
+ import { TtUpload as F } from "../../tt-upload/index.js";
7
+ import { TtApiComponent as U } from "../../tt-api-component/index.js";
8
+ import { globalShareState as G } from "./shared/global-state.js";
9
+ import { defineRule as V } from "vee-validate";
10
+ import j from "./components/FormElInput.vue.js";
11
+ const p = "modelValue", g = {}, B = {
12
+ TtSelect: L,
13
+ TtCheckbox: x,
14
+ TtRadioGroup: y,
15
+ TtUpload: F,
16
+ ElCheckbox: I,
17
+ ElCheckboxButton: A,
18
+ ElCheckboxGroup: R,
19
+ ElDatePicker: h,
20
+ ElInput: j,
21
+ ElInputNumber: S,
22
+ ElInputTag: k,
23
+ ElMention: _,
24
+ ElRadio: C,
25
+ ElRadioGroup: b,
26
+ ElSelect: T,
27
+ ElSelectV2: P,
28
+ ElSwitch: N,
29
+ ElTimePicker: M,
28
30
  ElTreeSelect: O,
29
31
  ElUpload: u,
30
32
  ElCascader: f,
31
33
  ElColorPicker: d,
32
- TtApiComponent: F,
33
- TtPanelSelect: y
34
+ TtApiComponent: U,
35
+ TtPanelSelect: D
34
36
  }, i = {
35
37
  ElUpload: "fileList"
36
38
  };
37
- function W(c) {
38
- const { config: e, defineRules: r } = c, {
39
- disabledOnChangeListener: a = !0,
39
+ function Y(a) {
40
+ const { config: e, defineRules: l } = a, {
41
+ disabledOnChangeListener: c = !0,
40
42
  disabledOnInputListener: s = !0,
41
43
  emptyStateValue: E = void 0
42
44
  } = e || {};
43
- if (Object.assign(V, {
44
- disabledOnChangeListener: a,
45
+ if (Object.assign(g, {
46
+ disabledOnChangeListener: c,
45
47
  disabledOnInputListener: s,
46
48
  emptyStateValue: E
47
- }), r)
48
- for (const o of Object.keys(r))
49
- U(o, r[o]);
50
- const m = (e == null ? void 0 : e.baseModelPropName) ?? p, l = e == null ? void 0 : e.modelPropNameMap, n = I.getComponents();
49
+ }), l)
50
+ for (const o of Object.keys(l))
51
+ V(o, l[o]);
52
+ const m = (e == null ? void 0 : e.baseModelPropName) ?? p, r = e == null ? void 0 : e.modelPropNameMap, n = G.getComponents();
51
53
  for (const o of Object.keys(n)) {
52
54
  const t = o;
53
- j[t] = n[o], m !== p && (i[t] = m), l && l[t] && (i[t] = l[t]);
55
+ B[t] = n[o], m !== p && (i[t] = m), r && r[t] && (i[t] = r[t]);
54
56
  }
55
57
  }
56
58
  export {
57
59
  i as COMPONENT_BIND_EVENT_MAP,
58
- j as COMPONENT_MAP,
59
- V as DEFAULT_FORM_COMMON_CONFIG,
60
- W as setupForm
60
+ B as COMPONENT_MAP,
61
+ g as DEFAULT_FORM_COMMON_CONFIG,
62
+ Y as setupForm
61
63
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as fe, useTemplateRef as K, computed as i, reactive as pe, markRaw as ve, toRaw as he, watch as G, nextTick as be, onUnmounted as ye, createBlock as h, createCommentVNode as c, unref as l, openBlock as u, mergeProps as N, withCtx as b, withDirectives as Ce, createVNode as F, createElementVNode as $, createElementBlock as H, normalizeClass as O, normalizeStyle as J, renderSlot as ge, normalizeProps as we, guardReactiveProps as Fe, resolveDynamicComponent as Re, createSlots as Se, renderList as ke, Transition as Ne, vShow as Oe } from "vue";
1
+ import { defineComponent as fe, useTemplateRef as G, computed as i, reactive as pe, markRaw as ve, toRaw as he, watch as H, nextTick as be, onUnmounted as ye, createBlock as h, createCommentVNode as c, unref as l, openBlock as u, mergeProps as k, withCtx as b, withDirectives as Ce, createVNode as F, createElementVNode as $, createElementBlock as J, normalizeClass as O, normalizeStyle as Q, renderSlot as ge, normalizeProps as Fe, guardReactiveProps as Re, resolveDynamicComponent as we, createSlots as Se, renderList as Ne, Transition as ke, vShow as Oe } from "vue";
2
2
  import Ee from "../form/FormControl.vue.js";
3
3
  import Be from "../form/FormDescription.vue.js";
4
4
  import Pe from "../form/FormItem.vue.js";
@@ -22,14 +22,14 @@ import E from "../form/RenderContent.vue.js";
22
22
  import { toTypedSchema as Ue } from "@vee-validate/zod";
23
23
  import { injectComponentRefMap as De } from "../useFormContext.js";
24
24
  import { useFormContext as We, injectRenderFormProps as ze } from "./context.js";
25
- import xe from "./dependencies.js";
26
- import Ae from "./FormLabel.vue2.js";
27
- import { useSelectCollapseOptions as Ke } from "../hooks/useSelectCollapse.js";
28
- import { isEventObjectLike as Q } from "./helper.js";
29
- const Ge = { class: "flex-auto overflow-hidden" }, He = {
25
+ import Ae, { resolveRequiredRuleName as xe } from "./dependencies.js";
26
+ import Ke from "./FormLabel.vue2.js";
27
+ import { useSelectCollapseOptions as Ge } from "../hooks/useSelectCollapse.js";
28
+ import { isEventObjectLike as X } from "./helper.js";
29
+ const He = { class: "flex-auto overflow-hidden" }, Je = {
30
30
  key: 0,
31
31
  class: "ml-1"
32
- }, Rn = /* @__PURE__ */ fe({
32
+ }, Sn = /* @__PURE__ */ fe({
33
33
  __name: "FormField",
34
34
  props: {
35
35
  component: {},
@@ -66,9 +66,9 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
66
66
  commonComponentProps: {}
67
67
  },
68
68
  setup(n) {
69
- const B = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = We(), M = ze(), k = qe(), Z = je(n.fieldName), f = K("fieldComponentRef"), R = M.form, S = i(() => M.compact), g = i(() => {
69
+ const B = G("wrapperRef"), { componentBindEventMap: Y, componentMap: Z, isVertical: C } = We(), M = ze(), N = qe(), _ = je(n.fieldName), f = G("fieldComponentRef"), R = M.form, w = i(() => M.compact), S = i(() => {
70
70
  var e;
71
- return ((e = Z.value) == null ? void 0 : e.length) > 0;
71
+ return ((e = _.value) == null ? void 0 : e.length) > 0;
72
72
  }), P = pe(
73
73
  new Proxy({}, {
74
74
  /**
@@ -77,7 +77,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
77
77
  * @returns 当前表单值
78
78
  */
79
79
  get(e, t) {
80
- return Ie(k.value, t);
80
+ return Ie(N.value, t);
81
81
  },
82
82
  /**
83
83
  * @param _target 代理目标
@@ -86,22 +86,22 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
86
86
  * @returns 是否设置成功
87
87
  */
88
88
  set(e, t, o) {
89
- return Ve(k.value, t, o), R == null || R.validateField(t), !0;
89
+ return Ve(N.value, t, o), R == null || R.validateField(t), !0;
90
90
  }
91
91
  })
92
- ), _ = i(() => {
93
- const e = y(n.component) ? Y.value[n.component] : n.component;
92
+ ), U = i(() => {
93
+ const e = y(n.component) ? Z.value[n.component] : n.component;
94
94
  return ve(he(e));
95
- }), { dynamicComponentProps: ee, dynamicRules: ne, isDisabled: te, isIf: U, isRequired: T, isShow: D } = xe(
95
+ }), { dynamicComponentProps: ee, dynamicRules: ne, isDisabled: te, isIf: D, isRequired: T, isShow: W } = Ae(
96
96
  () => n.dependencies
97
97
  ), oe = i(() => {
98
98
  var e;
99
99
  return (e = n.labelClass) != null && e.includes("w-") || C.value ? {} : {
100
100
  width: `${n.labelWidth}px`
101
101
  };
102
- }), s = i(() => ne.value || n.rules), W = i(() => !n.hide && U.value && D.value), V = i(() => {
103
- var o, a, d;
104
- if (!W.value)
102
+ }), s = i(() => ne.value || n.rules), z = i(() => !n.hide && D.value && W.value), V = i(() => {
103
+ var o, a, m;
104
+ if (!z.value)
105
105
  return !1;
106
106
  if (!s.value)
107
107
  return T.value;
@@ -113,16 +113,16 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
113
113
  const t = s.value.def;
114
114
  if ((t == null ? void 0 : t.type) === "default" && "innerType" in t) {
115
115
  const v = t.innerType;
116
- v && (e = (d = v.isOptional) == null ? void 0 : d.call(v));
116
+ v && (e = (m = v.isOptional) == null ? void 0 : m.call(v));
117
117
  }
118
118
  return !e;
119
119
  }), le = i(() => {
120
120
  var o;
121
- if (!W.value)
121
+ if (!z.value)
122
122
  return null;
123
123
  let e = s.value;
124
124
  if (!e)
125
- return T.value ? "required" : null;
125
+ return T.value ? xe(U.value) : null;
126
126
  if (y(e))
127
127
  return e;
128
128
  if (!!V.value) {
@@ -131,13 +131,13 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
131
131
  }
132
132
  return Ue(e);
133
133
  }), r = i(() => {
134
- const e = q(n.componentProps) ? n.componentProps(k.value, R) : n.componentProps;
134
+ const e = q(n.componentProps) ? n.componentProps(N.value, R) : n.componentProps;
135
135
  return {
136
136
  ...n.commonComponentProps,
137
137
  ...e,
138
138
  ...ee.value
139
139
  };
140
- }), { selectComponentProps: ae } = Ke(
140
+ }), { selectComponentProps: ae } = Ge(
141
141
  i(() => ({
142
142
  componentProps: r,
143
143
  component: n.component,
@@ -145,14 +145,14 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
145
145
  selectRef: f
146
146
  }))
147
147
  );
148
- G(
148
+ H(
149
149
  () => {
150
150
  var e;
151
151
  return (e = r.value) == null ? void 0 : e.autofocus;
152
152
  },
153
153
  (e) => {
154
154
  e === !0 && be(() => {
155
- me();
155
+ de();
156
156
  });
157
157
  },
158
158
  { immediate: !0 }
@@ -160,7 +160,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
160
160
  const I = i(() => {
161
161
  var e;
162
162
  return te.value || n.disabled || ((e = r.value) == null ? void 0 : e.disabled);
163
- }), z = i(() => q(n.renderComponentContent) ? n.renderComponentContent(k.value, R) : {}), ie = i(() => Object.keys(z.value)), re = i(() => {
163
+ }), A = i(() => q(n.renderComponentContent) ? n.renderComponentContent(N.value, R) : {}), ie = i(() => Object.keys(A.value)), re = i(() => {
164
164
  const e = le.value;
165
165
  return {
166
166
  keepValue: !0,
@@ -171,22 +171,22 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
171
171
  });
172
172
  function ue(e) {
173
173
  var v;
174
- const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], a = n.modelPropName || (y(n.component) ? (v = X.value) == null ? void 0 : v[n.component] : null);
175
- let d = t;
174
+ const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], a = n.modelPropName || (y(n.component) ? (v = Y.value) == null ? void 0 : v[n.component] : null);
175
+ let m = t;
176
176
  if (t && Te(t) && a) {
177
- const m = t.target;
178
- d = Q(t) ? m == null ? void 0 : m[a] : (t == null ? void 0 : t[a]) ?? t;
177
+ const d = t.target;
178
+ m = X(t) ? d == null ? void 0 : d[a] : (t == null ? void 0 : t[a]) ?? t;
179
179
  }
180
180
  return a ? {
181
181
  [`onUpdate:${a}`]: o,
182
- [a]: d === void 0 ? n.emptyStateValue : d,
183
- onChange: n.disabledOnChangeListener ? void 0 : (m) => {
184
- var A;
185
- const ce = Q(m), w = (A = e == null ? void 0 : e.componentField) == null ? void 0 : A.onChange;
182
+ [a]: m === void 0 ? n.emptyStateValue : m,
183
+ onChange: n.disabledOnChangeListener ? void 0 : (d) => {
184
+ var K;
185
+ const ce = X(d), g = (K = e == null ? void 0 : e.componentField) == null ? void 0 : K.onChange;
186
186
  if (!ce)
187
- return w == null ? void 0 : w(m);
188
- const L = m.target;
189
- return w == null ? void 0 : w((L == null ? void 0 : L[a]) ?? m);
187
+ return g == null ? void 0 : g(d);
188
+ const L = d.target;
189
+ return g == null ? void 0 : g((L == null ? void 0 : L[a]) ?? d);
190
190
  },
191
191
  ...n.disabledOnInputListener ? { onInput: void 0 } : {}
192
192
  } : {
@@ -194,7 +194,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
194
194
  ...n.disabledOnChangeListener ? { onChange: void 0 } : {}
195
195
  };
196
196
  }
197
- const se = /* @__PURE__ */ new Set(["ElCheckbox", "ElCheckboxButton", "ElSwitch"]), de = /* @__PURE__ */ new Set(["ElInputNumber"]);
197
+ const se = /* @__PURE__ */ new Set(["ElCheckbox", "ElCheckboxButton", "ElSwitch"]), me = /* @__PURE__ */ new Set(["ElInputNumber"]);
198
198
  function x(e) {
199
199
  const t = ue(e), o = {
200
200
  ...e.componentField,
@@ -204,33 +204,33 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
204
204
  ...Reflect.has(r.value, "onChange") ? { onChange: r.value.onChange } : {},
205
205
  ...Reflect.has(r.value, "onInput") ? { onInput: r.value.onInput } : {}
206
206
  };
207
- return Reflect.has(r.value, "name") || delete o.name, y(n.component) && se.has(n.component) && o.modelValue === void 0 && (o.modelValue = !1), y(n.component) && de.has(n.component) && (o.controls = !1, o.align = "left"), o;
207
+ return Reflect.has(r.value, "name") || delete o.name, y(n.component) && se.has(n.component) && o.modelValue === void 0 && (o.modelValue = !1), y(n.component) && me.has(n.component) && (o.controls = !1, o.align = "left"), o;
208
208
  }
209
- function me() {
209
+ function de() {
210
210
  var e, t;
211
211
  f.value && q(f.value.focus) && // 检查当前是否有元素被聚焦
212
212
  document.activeElement !== f.value && ((t = (e = f.value) == null ? void 0 : e.focus) == null || t.call(e));
213
213
  }
214
214
  const p = De();
215
- return G(f, (e) => {
215
+ return H(f, (e) => {
216
216
  p == null || p.set(n.fieldName, e);
217
217
  }), ye(() => {
218
218
  p != null && p.has(n.fieldName) && p.delete(n.fieldName);
219
- }), (e, t) => !e.hide && l(U) ? (u(), h(l(Me), N({ key: 0 }, re.value, { name: e.fieldName }), {
219
+ }), (e, t) => !e.hide && l(D) ? (u(), h(l(Me), k({ key: 0 }, re.value, { name: e.fieldName }), {
220
220
  default: b((o) => [
221
- Ce(F(l(Pe), N({
221
+ Ce(F(l(Pe), k({
222
222
  class: [{
223
- "form-valid-error": g.value,
223
+ "form-valid-error": S.value,
224
224
  "form-is-required": V.value,
225
- "pb-(--form-valid-error-nocompact-padding-bottom)": !S.value,
226
- "pb-2": S.value
225
+ "pb-(--form-valid-error-nocompact-padding-bottom)": !w.value,
226
+ "pb-2": w.value
227
227
  }, "relative"]
228
228
  }, e.$attrs), {
229
229
  default: b(() => [
230
230
  $("div", {
231
231
  class: O([{ "flex-col": l(C), "flex-row items-center": !l(C) }, "flex"])
232
232
  }, [
233
- e.hideLabel ? c("", !0) : (u(), h(Ae, {
233
+ e.hideLabel ? c("", !0) : (u(), h(Ke, {
234
234
  key: 0,
235
235
  class: O(
236
236
  l(j)(
@@ -246,7 +246,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
246
246
  colon: e.colon,
247
247
  label: e.label,
248
248
  required: V.value && !e.hideRequiredMark,
249
- style: J(oe.value),
249
+ style: Q(oe.value),
250
250
  "tool-tip": e.toolTip,
251
251
  "help-trigger": e.helpTrigger,
252
252
  form: P,
@@ -260,7 +260,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
260
260
  ]),
261
261
  _: 1
262
262
  }, 8, ["class", "help", "colon", "label", "required", "style", "tool-tip", "help-trigger", "form", "tool-tip-text"])),
263
- $("div", Ge, [
263
+ $("div", He, [
264
264
  $("div", {
265
265
  ref_key: "wrapperRef",
266
266
  ref: B,
@@ -270,53 +270,50 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
270
270
  class: O(l(j)(e.controlClass))
271
271
  }, {
272
272
  default: b(() => [
273
- ge(e.$slots, "default", we(Fe({
273
+ ge(e.$slots, "default", Fe(Re({
274
274
  ...o,
275
275
  ...x(o),
276
276
  disabled: I.value,
277
- isInValid: g.value,
277
+ isInValid: S.value,
278
278
  form: P,
279
279
  fieldName: e.fieldName
280
280
  })), () => [
281
- (u(), h(Re(_.value), N({
281
+ (u(), h(we(U.value), k({
282
282
  ref_key: "fieldComponentRef",
283
- ref: f,
284
- class: {
285
- "border-destructive hover:border-destructive/80 focus:border-destructive focus:shadow-[0_0_0_2px_rgba(255,38,5,0.06)]": g.value
286
- }
283
+ ref: f
287
284
  }, {
288
285
  ...x(o),
289
286
  disabled: I.value,
290
- isInValid: g.value,
287
+ isInValid: S.value,
291
288
  form: P,
292
289
  fieldName: e.fieldName
293
290
  }, { disabled: I.value }), Se({ _: 2 }, [
294
- ke(ie.value, (a) => ({
291
+ Ne(ie.value, (a) => ({
295
292
  name: a,
296
- fn: b((d) => [
297
- F(l(E), N({
298
- content: z.value[a]
299
- }, { ...d, formContext: o }), null, 16, ["content"])
293
+ fn: b((m) => [
294
+ F(l(E), k({
295
+ content: A.value[a]
296
+ }, { ...m, formContext: o }), null, 16, ["content"])
300
297
  ])
301
298
  }))
302
- ]), 1040, ["class", "disabled"]))
299
+ ]), 1040, ["disabled"]))
303
300
  ])
304
301
  ]),
305
302
  _: 2
306
303
  }, 1032, ["class"]),
307
- e.suffix ? (u(), H("div", He, [
304
+ e.suffix ? (u(), J("div", Je, [
308
305
  F(l(E), { content: e.suffix }, null, 8, ["content"])
309
306
  ])) : c("", !0),
310
- S.value && g.value ? (u(), h(l(Le), {
307
+ w.value && S.value ? (u(), h(l(Le), {
311
308
  key: 1,
312
309
  "ref-dom": B.value
313
310
  }, null, 8, ["ref-dom"])) : c("", !0)
314
311
  ], 2)
315
312
  ])
316
313
  ], 2),
317
- e.description || !S.value ? (u(), H("div", {
314
+ e.description || !w.value ? (u(), J("div", {
318
315
  key: 0,
319
- style: J(!l(C) && !e.hideLabel ? { paddingLeft: `${(e.labelWidth || 0) + 8}px` } : {})
316
+ style: Q(!l(C) && !e.hideLabel ? { paddingLeft: `${(e.labelWidth || 0) + 8}px` } : {})
320
317
  }, [
321
318
  e.description ? (u(), h(l(Be), {
322
319
  key: 0,
@@ -327,9 +324,9 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
327
324
  ]),
328
325
  _: 1
329
326
  })) : c("", !0),
330
- F(Ne, { name: "slide-up" }, {
327
+ F(ke, { name: "slide-up" }, {
331
328
  default: b(() => [
332
- !S.value && g.value ? (u(), h(l($e), {
329
+ !w.value && S.value ? (u(), h(l($e), {
333
330
  key: 0,
334
331
  class: "absolute"
335
332
  })) : c("", !0)
@@ -340,7 +337,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
340
337
  ]),
341
338
  _: 2
342
339
  }, 1040, ["class"]), [
343
- [Oe, l(D)]
340
+ [Oe, l(W)]
344
341
  ])
345
342
  ]),
346
343
  _: 3
@@ -348,5 +345,5 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
348
345
  }
349
346
  });
350
347
  export {
351
- Rn as default
348
+ Sn as default
352
349
  };
@@ -16,6 +16,10 @@ export declare const FieldRenderer: import('vue').DefineComponent<import('vue').
16
16
  type: BooleanConstructor;
17
17
  default: boolean;
18
18
  };
19
+ progressive: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
19
23
  scrollElement: {
20
24
  type: PropType<Element | null>;
21
25
  default: null;
@@ -44,6 +48,10 @@ export declare const FieldRenderer: import('vue').DefineComponent<import('vue').
44
48
  type: BooleanConstructor;
45
49
  default: boolean;
46
50
  };
51
+ progressive: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
47
55
  scrollElement: {
48
56
  type: PropType<Element | null>;
49
57
  default: null;
@@ -59,6 +67,7 @@ export declare const FieldRenderer: import('vue').DefineComponent<import('vue').
59
67
  }>> & Readonly<{}>, {
60
68
  rules: import('../types').FormSchemaRuleType | undefined;
61
69
  virtual: boolean;
70
+ progressive: boolean;
62
71
  rootMargin: string;
63
72
  estimateFieldHeight: number;
64
73
  scrollElement: Element | null;
@@ -1,9 +1,9 @@
1
- import { defineComponent as a, h as l } from "vue";
2
- import i from "../group-form/LazyFormField.vue.js";
1
+ import { defineComponent as i, h as l } from "vue";
2
+ import a from "../group-form/LazyFormField.vue.js";
3
3
  /* empty css */
4
4
  import { FormArrayRegister as m } from "./array-register/FormArrayRegister.js";
5
- import o from "./FormField.vue2.js";
6
- const c = a({
5
+ import s from "./FormField.vue2.js";
6
+ const g = i({
7
7
  name: "FieldRenderer",
8
8
  props: {
9
9
  fieldConfig: {
@@ -12,43 +12,46 @@ const c = a({
12
12
  },
13
13
  rules: { type: [String, Object], default: void 0 },
14
14
  virtual: { type: Boolean, default: !1 },
15
+ progressive: { type: Boolean, default: !1 },
15
16
  scrollElement: { type: Object, default: null },
16
17
  rootMargin: { type: String, default: "200px 0px" },
17
18
  estimateFieldHeight: { type: Number, default: 52 }
18
19
  },
19
- setup(r, { slots: t }) {
20
+ setup(e, { slots: t }) {
20
21
  return () => {
21
- const e = {
22
+ const r = {
22
23
  commonComponentProps: {},
23
- ...r.fieldConfig
24
+ ...e.fieldConfig
24
25
  };
25
- return e.useArraySchema ? l(
26
+ return r.useArraySchema ? l(
26
27
  m,
27
28
  {
28
- ...e,
29
- rules: r.rules,
30
- virtual: r.virtual,
31
- arraySchema: e.arraySchema,
32
- fieldName: e.fieldName,
33
- formItemClass: e.formItemClass,
34
- wrapperClass: e.wrapperClass
29
+ ...r,
30
+ rules: e.rules,
31
+ virtual: e.virtual,
32
+ progressive: e.progressive,
33
+ arraySchema: r.arraySchema,
34
+ fieldName: r.fieldName,
35
+ formItemClass: r.formItemClass,
36
+ wrapperClass: r.wrapperClass
35
37
  },
36
38
  t
37
- ) : r.virtual ? l(
38
- i,
39
+ ) : e.virtual || e.progressive ? l(
40
+ a,
39
41
  {
40
- fieldProps: e,
41
- rules: r.rules,
42
- fieldClass: e.formItemClass,
43
- scrollElement: r.scrollElement,
44
- rootMargin: r.rootMargin,
45
- estimateFieldHeight: r.estimateFieldHeight
42
+ fieldProps: r,
43
+ rules: e.rules,
44
+ fieldClass: r.formItemClass,
45
+ progressive: e.progressive && !e.virtual,
46
+ scrollElement: e.scrollElement,
47
+ rootMargin: e.rootMargin,
48
+ estimateFieldHeight: e.estimateFieldHeight
46
49
  },
47
50
  t
48
- ) : l(o, { ...e, class: e.formItemClass, rules: r.rules }, t);
51
+ ) : l(s, { ...r, class: r.formItemClass, rules: e.rules }, t);
49
52
  };
50
53
  }
51
54
  });
52
55
  export {
53
- c as FieldRenderer
56
+ g as FieldRenderer
54
57
  };
@@ -12,6 +12,7 @@ export declare const FormArrayRegister: import('vue').DefineComponent<{
12
12
  rules?: import('../../types').FormSchemaRuleType | undefined;
13
13
  formItemClass?: (() => string) | string | undefined;
14
14
  virtual?: boolean | undefined;
15
+ progressive?: boolean | undefined;
15
16
  }, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
16
17
  disabled?: boolean | undefined;
17
18
  hide?: boolean | undefined;
@@ -23,6 +24,7 @@ export declare const FormArrayRegister: import('vue').DefineComponent<{
23
24
  rules?: import('../../types').FormSchemaRuleType | undefined;
24
25
  formItemClass?: (() => string) | string | undefined;
25
26
  virtual?: boolean | undefined;
27
+ progressive?: boolean | undefined;
26
28
  }> & Readonly<{}>, {
27
29
  readonly disabled: boolean | undefined;
28
30
  readonly hide: boolean | undefined;
@@ -34,4 +36,5 @@ export declare const FormArrayRegister: import('vue').DefineComponent<{
34
36
  readonly rules: import('../../types').FormSchemaRuleType | undefined;
35
37
  readonly formItemClass: NonNullable<string | (() => string) | undefined>;
36
38
  readonly virtual: boolean;
39
+ readonly progressive: boolean;
37
40
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;