@dazhicheng/ui 1.5.223 → 1.5.225

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/dist/components/tt-form/index.d.ts +5 -3
  2. package/dist/components/tt-form/src/form/RenderContent.vue.js +8 -8
  3. package/dist/components/tt-form/src/form-render/FormField.vue2.js +122 -122
  4. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +4 -4
  5. package/dist/components/tt-form/src/form-render/context.d.ts +1 -1
  6. package/dist/components/tt-form/src/form-render/dependencies.js +56 -56
  7. package/dist/components/tt-form/src/form-render/form.vue.d.ts +1 -1
  8. package/dist/components/tt-form/src/formApi.d.ts +1 -1
  9. package/dist/components/tt-form/src/group-form/GroupForm.vue.d.ts +1 -1
  10. package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +35 -35
  11. package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +135 -134
  12. package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +68 -68
  13. package/dist/components/tt-form/src/group-form/groupFormApi.js +4 -4
  14. package/dist/components/tt-form/src/group-form/types.d.ts +25 -24
  15. package/dist/components/tt-form/src/group-form/useGroupForm.d.ts +2 -6
  16. package/dist/components/tt-form/src/group-form/utils.d.ts +8 -8
  17. package/dist/components/tt-form/src/index.vue.d.ts +12 -12
  18. package/dist/components/tt-form/src/types.d.ts +48 -47
  19. package/dist/components/tt-form/src/useForm.d.ts +2 -2
  20. package/dist/components/tt-modal/src/components/ModalHeader.vue.js +1 -1
  21. package/dist/components/tt-select/src/Select.vue.d.ts +4 -4
  22. package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
  23. package/dist/components/tt-table/index.d.ts +12 -12
  24. package/dist/components/tt-table/src/Table.vue.d.ts +4 -4
  25. package/dist/components/tt-table/src/TableForm.vue.d.ts +162 -58
  26. package/dist/components/tt-table/src/TableForm.vue.js +126 -113
  27. package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts +19 -1
  28. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +103 -94
  29. package/dist/components/tt-table/src/hooks/useTableForm.d.ts +1 -1
  30. package/dist/style.css +1 -1
  31. package/package.json +1 -1
@@ -6,12 +6,14 @@ declare function setConfig(rules?: Record<string, (value: any, params: any, ctx:
6
6
  declare function addComponent(component?: Partial<Record<BaseFormComponentType, Component>>): void;
7
7
  export { addComponent, setConfig };
8
8
  export { COMPONENT_MAP, useForm };
9
- type TtFormSchema = FormSchema<BaseFormComponentType>;
10
- type TtFormRenderProps = FormRenderProps<BaseFormComponentType>;
9
+ export type { FormApi } from './src/formApi';
10
+ type TtFormSchema<TValues extends Record<string, any> = Record<string, any>> = FormSchema<TValues>;
11
+ type TtFormRenderProps<TValues extends Record<string, any> = Record<string, any>> = FormRenderProps<TValues>;
11
12
  type TtExtendedFormApi = ExtendedFormApi;
12
- export type { ArraySchemaContext, BaseFormComponentMap, BaseFormComponentType, FormArrayActions, FormSlotSchema, InferredComponentPropsType, NestedArrayHandle, } from './src/types';
13
+ export type { ArraySchemaContext, BaseFormComponentMap, BaseFormComponentType, ComponentProps, FormArrayActions, FormItemDependenciesCondition, FormItemDependenciesConditionWithProps, FormItemDependenciesConditionWithRules, FormSlotSchema, InferredComponentPropsType, NestedArrayHandle, RenderComponentContentType, } from './src/types';
13
14
  export type { FieldArrayContext, FieldEntry, ReadonlyFieldEntry, ResolvedFieldArrayContext } from './src/types/forms';
14
15
  export type { TtExtendedFormApi, TtFormProps, TtFormRenderProps, TtFormSchema };
15
16
  export * as z from 'zod';
16
17
  export { useGroupForm } from './src/group-form';
17
18
  export type * from './src/group-form';
19
+ export type { GroupFormApi } from './src/group-form';
@@ -1,7 +1,7 @@
1
1
  import "axios";
2
2
  import "element-plus";
3
- import { isObject as m, isFunction as o } from "../../../../packages/utils/src/is.js";
4
- import { defineComponent as c, h as u } from "vue";
3
+ import { isObject as c, isFunction as o } from "../../../../packages/utils/src/is.js";
4
+ import { defineComponent as u, unref as f, h as p } from "vue";
5
5
  import "xe-utils";
6
6
  import "dayjs";
7
7
  import "dayjs/plugin/utc";
@@ -12,9 +12,9 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/en
12
12
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
13
13
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
14
14
  import "lodash-es";
15
- import { useFormValues as f } from "vee-validate";
16
- import { injectRenderFormProps as p } from "../form-render/context.js";
17
- const y = c({
15
+ import { useFormValues as s } from "vee-validate";
16
+ import { injectFormProps as l } from "../useFormContext.js";
17
+ const S = u({
18
18
  name: "RenderContent",
19
19
  inheritAttrs: !1,
20
20
  props: {
@@ -27,8 +27,8 @@ const y = c({
27
27
  }
28
28
  },
29
29
  setup(t, { attrs: n, slots: e }) {
30
- const r = f(), i = p().form;
31
- return () => t.content ? (m(t.content) || o(t.content)) && t.content !== null ? o(t.content) ? t.content(r.value, i) : u(t.content, {
30
+ const r = s(), [i] = l(), m = f(i).formApi;
31
+ return () => t.content ? (c(t.content) || o(t.content)) && t.content !== null ? o(t.content) ? t.content(r.value, m) : p(t.content, {
32
32
  ...n,
33
33
  props: {
34
34
  ...t,
@@ -39,5 +39,5 @@ const y = c({
39
39
  }
40
40
  });
41
41
  export {
42
- y as default
42
+ S as default
43
43
  };
@@ -1,35 +1,35 @@
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
- import Ee from "../form/FormControl.vue.js";
3
- import Be from "../form/FormDescription.vue.js";
4
- import Pe from "../form/FormItem.vue.js";
1
+ import { defineComponent as ve, useTemplateRef as K, unref as l, computed as a, reactive as he, markRaw as be, toRaw as ye, watch as G, nextTick as Ce, onUnmounted as ge, createBlock as h, createCommentVNode as c, openBlock as u, mergeProps as N, withCtx as b, withDirectives as Fe, createVNode as F, createElementVNode as L, createElementBlock as H, normalizeClass as k, normalizeStyle as J, renderSlot as Re, normalizeProps as we, guardReactiveProps as Se, resolveDynamicComponent as Ne, createSlots as ke, renderList as Oe, Transition as Ee, vShow as Pe } from "vue";
2
+ import Be from "../form/FormControl.vue.js";
3
+ import Te from "../form/FormDescription.vue.js";
4
+ import Ve from "../form/FormItem.vue.js";
5
5
  import "axios";
6
6
  import "element-plus";
7
- import { isString as y, isFunction as q, isObject as Te } from "../../../../packages/utils/src/is.js";
8
- import { clnm as j } from "../../../../packages/utils/src/tool.js";
7
+ import { isString as y, isFunction as $, isObject as Ie } from "../../../../packages/utils/src/is.js";
8
+ import { clnm as q } from "../../../../packages/utils/src/tool.js";
9
9
  import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
10
10
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
11
11
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
12
12
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
13
13
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
14
- import { set as Ve, get as Ie } from "lodash-es";
15
- import Le from "../form/FormMessageToolTip.vue.js";
16
- import $e from "../form/FormMessage.vue.js";
14
+ import { set as Le, get as $e } from "lodash-es";
15
+ import qe from "../form/FormMessageToolTip.vue.js";
16
+ import je from "../form/FormMessage.vue.js";
17
17
  import "../../../tt-icon/index.js";
18
18
  import "@vueuse/core";
19
- import { useFormValues as qe, useFieldError as je, Field as Me } from "vee-validate";
19
+ import { useFormValues as Ae, useFieldError as Me, Field as Ue } from "vee-validate";
20
20
  /* empty css */
21
- import E from "../form/RenderContent.vue.js";
22
- import { toTypedSchema as Ue } from "@vee-validate/zod";
23
- import { injectComponentRefMap as De } from "../useFormContext.js";
24
- import { useFormContext as We, injectRenderFormProps as ze } from "./context.js";
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 = {
21
+ import O from "../form/RenderContent.vue.js";
22
+ import { toTypedSchema as De } from "@vee-validate/zod";
23
+ import { injectFormProps as We, injectComponentRefMap as ze } from "../useFormContext.js";
24
+ import { useFormContext as xe, injectRenderFormProps as Ke } from "./context.js";
25
+ import Ge, { resolveRequiredRuleName as He } from "./dependencies.js";
26
+ import Je from "./FormLabel.vue2.js";
27
+ import { useSelectCollapseOptions as Qe } from "../hooks/useSelectCollapse.js";
28
+ import { isEventObjectLike as Q } from "./helper.js";
29
+ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
30
30
  key: 0,
31
31
  class: "ml-1"
32
- }, Sn = /* @__PURE__ */ fe({
32
+ }, On = /* @__PURE__ */ ve({
33
33
  __name: "FormField",
34
34
  props: {
35
35
  component: {},
@@ -66,10 +66,10 @@ const He = { class: "flex-auto overflow-hidden" }, Je = {
66
66
  commonComponentProps: {}
67
67
  },
68
68
  setup(n) {
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(() => {
69
+ const E = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = xe(), Z = Ke(), S = Ae(), _ = Me(n.fieldName), f = K("fieldComponentRef"), [ee, ne] = We(), j = l(ee).formApi, R = a(() => Z.compact), w = a(() => {
70
70
  var e;
71
71
  return ((e = _.value) == null ? void 0 : e.length) > 0;
72
- }), P = pe(
72
+ }), P = he(
73
73
  new Proxy({}, {
74
74
  /**
75
75
  * @param _target 代理目标(空对象,不实际存储)
@@ -77,7 +77,7 @@ const He = { class: "flex-auto overflow-hidden" }, Je = {
77
77
  * @returns 当前表单值
78
78
  */
79
79
  get(e, t) {
80
- return Ie(N.value, t);
80
+ return $e(S.value, t);
81
81
  },
82
82
  /**
83
83
  * @param _target 代理目标
@@ -86,82 +86,82 @@ const He = { class: "flex-auto overflow-hidden" }, Je = {
86
86
  * @returns 是否设置成功
87
87
  */
88
88
  set(e, t, o) {
89
- return Ve(N.value, t, o), R == null || R.validateField(t), !0;
89
+ return Le(S.value, t, o), ne.validateField(t), !0;
90
90
  }
91
91
  })
92
- ), U = i(() => {
93
- const e = y(n.component) ? Z.value[n.component] : n.component;
94
- return ve(he(e));
95
- }), { dynamicComponentProps: ee, dynamicRules: ne, isDisabled: te, isIf: D, isRequired: T, isShow: W } = Ae(
92
+ ), A = a(() => {
93
+ const e = y(n.component) ? Y.value[n.component] : n.component;
94
+ return be(ye(e));
95
+ }), { dynamicComponentProps: te, dynamicRules: oe, isDisabled: le, isIf: M, isRequired: B, isShow: U } = Ge(
96
96
  () => n.dependencies
97
- ), oe = i(() => {
97
+ ), ie = a(() => {
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), z = i(() => !n.hide && D.value && W.value), V = i(() => {
103
- var o, a, m;
104
- if (!z.value)
102
+ }), s = a(() => oe.value || n.rules), D = a(() => !n.hide && M.value && U.value), T = a(() => {
103
+ var o, i, m;
104
+ if (!D.value)
105
105
  return !1;
106
106
  if (!s.value)
107
- return T.value;
108
- if (T.value)
107
+ return B.value;
108
+ if (B.value)
109
109
  return !0;
110
110
  if (y(s.value))
111
111
  return ["required", "selectRequired"].includes(s.value);
112
- let e = (a = (o = s == null ? void 0 : s.value) == null ? void 0 : o.isOptional) == null ? void 0 : a.call(o);
112
+ let e = (i = (o = s == null ? void 0 : s.value) == null ? void 0 : o.isOptional) == null ? void 0 : i.call(o);
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
116
  v && (e = (m = v.isOptional) == null ? void 0 : m.call(v));
117
117
  }
118
118
  return !e;
119
- }), le = i(() => {
119
+ }), ae = a(() => {
120
120
  var o;
121
- if (!z.value)
121
+ if (!D.value)
122
122
  return null;
123
123
  let e = s.value;
124
124
  if (!e)
125
- return T.value ? xe(U.value) : null;
125
+ return B.value ? He(A.value) : null;
126
126
  if (y(e))
127
127
  return e;
128
- if (!!V.value) {
129
- const a = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
130
- a && (e = a);
128
+ if (!!T.value) {
129
+ const i = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
130
+ i && (e = i);
131
131
  }
132
- return Ue(e);
133
- }), r = i(() => {
134
- const e = q(n.componentProps) ? n.componentProps(N.value, R) : n.componentProps;
132
+ return De(e);
133
+ }), r = a(() => {
134
+ const e = $(n.componentProps) ? n.componentProps(S.value, j) : n.componentProps;
135
135
  return {
136
136
  ...n.commonComponentProps,
137
137
  ...e,
138
- ...ee.value
138
+ ...te.value
139
139
  };
140
- }), { selectComponentProps: ae } = Ge(
141
- i(() => ({
140
+ }), { selectComponentProps: re } = Qe(
141
+ a(() => ({
142
142
  componentProps: r,
143
143
  component: n.component,
144
- selectWrapRef: B,
144
+ selectWrapRef: E,
145
145
  selectRef: f
146
146
  }))
147
147
  );
148
- H(
148
+ G(
149
149
  () => {
150
150
  var e;
151
151
  return (e = r.value) == null ? void 0 : e.autofocus;
152
152
  },
153
153
  (e) => {
154
- e === !0 && be(() => {
155
- de();
154
+ e === !0 && Ce(() => {
155
+ fe();
156
156
  });
157
157
  },
158
158
  { immediate: !0 }
159
159
  );
160
- const I = i(() => {
160
+ const V = a(() => {
161
161
  var e;
162
- return te.value || n.disabled || ((e = r.value) == null ? void 0 : e.disabled);
163
- }), A = i(() => q(n.renderComponentContent) ? n.renderComponentContent(N.value, R) : {}), ie = i(() => Object.keys(A.value)), re = i(() => {
164
- const e = le.value;
162
+ return le.value || n.disabled || ((e = r.value) == null ? void 0 : e.disabled);
163
+ }), W = a(() => $(n.renderComponentContent) ? n.renderComponentContent(S.value, j) : {}), ue = a(() => Object.keys(W.value)), se = a(() => {
164
+ const e = ae.value;
165
165
  return {
166
166
  keepValue: !0,
167
167
  label: y(n.label) ? n.label : "",
@@ -169,24 +169,24 @@ const He = { class: "flex-auto overflow-hidden" }, Je = {
169
169
  ...n.formFieldProps
170
170
  };
171
171
  });
172
- function ue(e) {
172
+ function me(e) {
173
173
  var v;
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);
174
+ const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], i = n.modelPropName || (y(n.component) ? (v = X.value) == null ? void 0 : v[n.component] : null);
175
175
  let m = t;
176
- if (t && Te(t) && a) {
176
+ if (t && Ie(t) && i) {
177
177
  const d = t.target;
178
- m = X(t) ? d == null ? void 0 : d[a] : (t == null ? void 0 : t[a]) ?? t;
178
+ m = Q(t) ? d == null ? void 0 : d[i] : (t == null ? void 0 : t[i]) ?? t;
179
179
  }
180
- return a ? {
181
- [`onUpdate:${a}`]: o,
182
- [a]: m === void 0 ? n.emptyStateValue : m,
180
+ return i ? {
181
+ [`onUpdate:${i}`]: o,
182
+ [i]: m === void 0 ? n.emptyStateValue : m,
183
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
- if (!ce)
184
+ var x;
185
+ const pe = Q(d), g = (x = e == null ? void 0 : e.componentField) == null ? void 0 : x.onChange;
186
+ if (!pe)
187
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);
188
+ const I = d.target;
189
+ return g == null ? void 0 : g((I == null ? void 0 : I[i]) ?? d);
190
190
  },
191
191
  ...n.disabledOnInputListener ? { onInput: void 0 } : {}
192
192
  } : {
@@ -194,46 +194,46 @@ const He = { class: "flex-auto overflow-hidden" }, Je = {
194
194
  ...n.disabledOnChangeListener ? { onChange: void 0 } : {}
195
195
  };
196
196
  }
197
- const se = /* @__PURE__ */ new Set(["ElCheckbox", "ElCheckboxButton", "ElSwitch"]), me = /* @__PURE__ */ new Set(["ElInputNumber"]);
198
- function x(e) {
199
- const t = ue(e), o = {
197
+ const de = /* @__PURE__ */ new Set(["ElCheckbox", "ElCheckboxButton", "ElSwitch"]), ce = /* @__PURE__ */ new Set(["ElInputNumber"]);
198
+ function z(e) {
199
+ const t = me(e), o = {
200
200
  ...e.componentField,
201
201
  ...r.value,
202
- ...ae.value,
202
+ ...re.value,
203
203
  ...t,
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) && me.has(n.component) && (o.controls = !1, o.align = "left"), o;
207
+ return Reflect.has(r.value, "name") || delete o.name, y(n.component) && de.has(n.component) && o.modelValue === void 0 && (o.modelValue = !1), y(n.component) && ce.has(n.component) && (o.controls = !1, o.align = "left"), o;
208
208
  }
209
- function de() {
209
+ function fe() {
210
210
  var e, t;
211
- f.value && q(f.value.focus) && // 检查当前是否有元素被聚焦
211
+ f.value && $(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
- const p = De();
215
- return H(f, (e) => {
214
+ const p = ze();
215
+ return G(f, (e) => {
216
216
  p == null || p.set(n.fieldName, e);
217
- }), ye(() => {
217
+ }), ge(() => {
218
218
  p != null && p.has(n.fieldName) && p.delete(n.fieldName);
219
- }), (e, t) => !e.hide && l(D) ? (u(), h(l(Me), k({ key: 0 }, re.value, { name: e.fieldName }), {
219
+ }), (e, t) => !e.hide && l(M) ? (u(), h(l(Ue), N({ key: 0 }, se.value, { name: e.fieldName }), {
220
220
  default: b((o) => [
221
- Ce(F(l(Pe), k({
221
+ Fe(F(l(Ve), N({
222
222
  class: [{
223
- "form-valid-error": S.value,
224
- "form-is-required": V.value,
225
- "pb-(--form-valid-error-nocompact-padding-bottom)": !w.value,
226
- "pb-2": w.value
223
+ "form-valid-error": w.value,
224
+ "form-is-required": T.value,
225
+ "pb-(--form-valid-error-nocompact-padding-bottom)": !R.value,
226
+ "pb-2": R.value
227
227
  }, "relative"]
228
228
  }, e.$attrs), {
229
229
  default: b(() => [
230
- $("div", {
231
- class: O([{ "flex-col": l(C), "flex-row items-center": !l(C) }, "flex"])
230
+ L("div", {
231
+ class: k([{ "flex-col": l(C), "flex-row items-center": !l(C) }, "flex"])
232
232
  }, [
233
- e.hideLabel ? c("", !0) : (u(), h(Ke, {
233
+ e.hideLabel ? c("", !0) : (u(), h(Je, {
234
234
  key: 0,
235
- class: O(
236
- l(j)(
235
+ class: k(
236
+ l(q)(
237
237
  "flex leading-6",
238
238
  {
239
239
  "mr-2 shrink-0 items-center justify-end": !l(C),
@@ -245,54 +245,54 @@ const He = { class: "flex-auto overflow-hidden" }, Je = {
245
245
  help: e.help,
246
246
  colon: e.colon,
247
247
  label: e.label,
248
- required: V.value && !e.hideRequiredMark,
249
- style: Q(oe.value),
248
+ required: T.value && !e.hideRequiredMark,
249
+ style: J(ie.value),
250
250
  "tool-tip": e.toolTip,
251
251
  "help-trigger": e.helpTrigger,
252
252
  form: P,
253
253
  "tool-tip-text": e.toolTipText
254
254
  }, {
255
255
  default: b(() => [
256
- e.label ? (u(), h(l(E), {
256
+ e.label ? (u(), h(l(O), {
257
257
  key: 0,
258
258
  content: e.label
259
259
  }, null, 8, ["content"])) : c("", !0)
260
260
  ]),
261
261
  _: 1
262
262
  }, 8, ["class", "help", "colon", "label", "required", "style", "tool-tip", "help-trigger", "form", "tool-tip-text"])),
263
- $("div", He, [
264
- $("div", {
263
+ L("div", Xe, [
264
+ L("div", {
265
265
  ref_key: "wrapperRef",
266
- ref: B,
267
- class: O(l(j)("relative flex w-full items-center", e.wrapperClass))
266
+ ref: E,
267
+ class: k(l(q)("relative flex w-full items-center", e.wrapperClass))
268
268
  }, [
269
- F(l(Ee), {
270
- class: O(l(j)(e.controlClass))
269
+ F(l(Be), {
270
+ class: k(l(q)(e.controlClass))
271
271
  }, {
272
272
  default: b(() => [
273
- ge(e.$slots, "default", Fe(Re({
273
+ Re(e.$slots, "default", we(Se({
274
274
  ...o,
275
- ...x(o),
276
- disabled: I.value,
277
- isInValid: S.value,
275
+ ...z(o),
276
+ disabled: V.value,
277
+ isInValid: w.value,
278
278
  form: P,
279
279
  fieldName: e.fieldName
280
280
  })), () => [
281
- (u(), h(we(U.value), k({
281
+ (u(), h(Ne(A.value), N({
282
282
  ref_key: "fieldComponentRef",
283
283
  ref: f
284
284
  }, {
285
- ...x(o),
286
- disabled: I.value,
287
- isInValid: S.value,
285
+ ...z(o),
286
+ disabled: V.value,
287
+ isInValid: w.value,
288
288
  form: P,
289
289
  fieldName: e.fieldName
290
- }, { disabled: I.value }), Se({ _: 2 }, [
291
- Ne(ie.value, (a) => ({
292
- name: a,
290
+ }, { disabled: V.value }), ke({ _: 2 }, [
291
+ Oe(ue.value, (i) => ({
292
+ name: i,
293
293
  fn: b((m) => [
294
- F(l(E), k({
295
- content: A.value[a]
294
+ F(l(O), N({
295
+ content: W.value[i]
296
296
  }, { ...m, formContext: o }), null, 16, ["content"])
297
297
  ])
298
298
  }))
@@ -301,32 +301,32 @@ const He = { class: "flex-auto overflow-hidden" }, Je = {
301
301
  ]),
302
302
  _: 2
303
303
  }, 1032, ["class"]),
304
- e.suffix ? (u(), J("div", Je, [
305
- F(l(E), { content: e.suffix }, null, 8, ["content"])
304
+ e.suffix ? (u(), H("div", Ye, [
305
+ F(l(O), { content: e.suffix }, null, 8, ["content"])
306
306
  ])) : c("", !0),
307
- w.value && S.value ? (u(), h(l(Le), {
307
+ R.value && w.value ? (u(), h(l(qe), {
308
308
  key: 1,
309
- "ref-dom": B.value
309
+ "ref-dom": E.value
310
310
  }, null, 8, ["ref-dom"])) : c("", !0)
311
311
  ], 2)
312
312
  ])
313
313
  ], 2),
314
- e.description || !w.value ? (u(), J("div", {
314
+ e.description || !R.value ? (u(), H("div", {
315
315
  key: 0,
316
- style: Q(!l(C) && !e.hideLabel ? { paddingLeft: `${(e.labelWidth || 0) + 8}px` } : {})
316
+ style: J(!l(C) && !e.hideLabel ? { paddingLeft: `${(e.labelWidth || 0) + 8}px` } : {})
317
317
  }, [
318
- e.description ? (u(), h(l(Be), {
318
+ e.description ? (u(), h(l(Te), {
319
319
  key: 0,
320
320
  class: "text-[12px]"
321
321
  }, {
322
322
  default: b(() => [
323
- F(l(E), { content: e.description }, null, 8, ["content"])
323
+ F(l(O), { content: e.description }, null, 8, ["content"])
324
324
  ]),
325
325
  _: 1
326
326
  })) : c("", !0),
327
- F(ke, { name: "slide-up" }, {
327
+ F(Ee, { name: "slide-up" }, {
328
328
  default: b(() => [
329
- !w.value && S.value ? (u(), h(l($e), {
329
+ !R.value && w.value ? (u(), h(l(je), {
330
330
  key: 0,
331
331
  class: "absolute"
332
332
  })) : c("", !0)
@@ -337,7 +337,7 @@ const He = { class: "flex-auto overflow-hidden" }, Je = {
337
337
  ]),
338
338
  _: 2
339
339
  }, 1040, ["class"]), [
340
- [Oe, l(W)]
340
+ [Pe, l(U)]
341
341
  ])
342
342
  ]),
343
343
  _: 3
@@ -345,5 +345,5 @@ const He = { class: "flex-auto overflow-hidden" }, Je = {
345
345
  }
346
346
  });
347
347
  export {
348
- Sn as default
348
+ On as default
349
349
  };
@@ -6,8 +6,8 @@ export declare const FormArrayRegister: import('vue').DefineComponent<{
6
6
  hide?: boolean | undefined;
7
7
  defaultValue?: any;
8
8
  wrapperClass?: string | undefined;
9
- arraySchema?: FormSchema[] | ((entry: FieldEntry<Recordable>, currentIndex: number, ctx: ArraySchemaContext) => FormSchema[]) | undefined;
10
- dependencies?: import('./types').ArrayRegisterDependencies | undefined;
9
+ arraySchema?: FormSchema<Record<string, any>>[] | ((entry: FieldEntry<Recordable>, currentIndex: number, ctx: ArraySchemaContext) => FormSchema<Record<string, any>>[]) | undefined;
10
+ dependencies?: import('./types').ArrayRegisterDependencies<Record<string, any>> | undefined;
11
11
  fieldName: string;
12
12
  rules?: import('../../types').FormSchemaRuleType | undefined;
13
13
  formItemClass?: (() => string) | string | undefined;
@@ -18,8 +18,8 @@ export declare const FormArrayRegister: import('vue').DefineComponent<{
18
18
  hide?: boolean | undefined;
19
19
  defaultValue?: any;
20
20
  wrapperClass?: string | undefined;
21
- arraySchema?: FormSchema[] | ((entry: FieldEntry<Recordable>, currentIndex: number, ctx: ArraySchemaContext) => FormSchema[]) | undefined;
22
- dependencies?: import('./types').ArrayRegisterDependencies | undefined;
21
+ arraySchema?: FormSchema<Record<string, any>>[] | ((entry: FieldEntry<Recordable>, currentIndex: number, ctx: ArraySchemaContext) => FormSchema<Record<string, any>>[]) | undefined;
22
+ dependencies?: import('./types').ArrayRegisterDependencies<Record<string, any>> | undefined;
23
23
  fieldName: string;
24
24
  rules?: import('../../types').FormSchemaRuleType | undefined;
25
25
  formItemClass?: (() => string) | string | undefined;
@@ -1,5 +1,5 @@
1
1
  import { FormRenderProps } from '../types';
2
- export declare const injectRenderFormProps: <T extends FormRenderProps<keyof import('../types').BaseFormComponentMap> | null | undefined = FormRenderProps<keyof import('../types').BaseFormComponentMap>>(fallback?: T | undefined) => T extends null ? FormRenderProps<keyof import('../types').BaseFormComponentMap> | null : FormRenderProps<keyof import('../types').BaseFormComponentMap>, provideFormRenderProps: (contextValue: FormRenderProps<keyof import('../types').BaseFormComponentMap>) => FormRenderProps<keyof import('../types').BaseFormComponentMap>;
2
+ export declare const injectRenderFormProps: <T extends FormRenderProps<Record<string, any>> | null | undefined = FormRenderProps<Record<string, any>>>(fallback?: T | undefined) => T extends null ? FormRenderProps<Record<string, any>> | null : FormRenderProps<Record<string, any>>, provideFormRenderProps: (contextValue: FormRenderProps<Record<string, any>>) => FormRenderProps<Record<string, any>>;
3
3
  export declare const useFormContext: () => {
4
4
  componentBindEventMap: import('vue').ComputedRef<Partial<Record<keyof import('../types').BaseFormComponentMap, string>> | undefined>;
5
5
  componentMap: import('vue').ComputedRef<Record<keyof import('../types').BaseFormComponentMap, import('vue').Component>>;