@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.
- package/dist/components/tt-form/index.d.ts +5 -3
- package/dist/components/tt-form/src/form/RenderContent.vue.js +8 -8
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +122 -122
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +4 -4
- package/dist/components/tt-form/src/form-render/context.d.ts +1 -1
- package/dist/components/tt-form/src/form-render/dependencies.js +56 -56
- package/dist/components/tt-form/src/form-render/form.vue.d.ts +1 -1
- package/dist/components/tt-form/src/formApi.d.ts +1 -1
- package/dist/components/tt-form/src/group-form/GroupForm.vue.d.ts +1 -1
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +35 -35
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +135 -134
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +68 -68
- package/dist/components/tt-form/src/group-form/groupFormApi.js +4 -4
- package/dist/components/tt-form/src/group-form/types.d.ts +25 -24
- package/dist/components/tt-form/src/group-form/useGroupForm.d.ts +2 -6
- package/dist/components/tt-form/src/group-form/utils.d.ts +8 -8
- package/dist/components/tt-form/src/index.vue.d.ts +12 -12
- package/dist/components/tt-form/src/types.d.ts +48 -47
- package/dist/components/tt-form/src/useForm.d.ts +2 -2
- package/dist/components/tt-modal/src/components/ModalHeader.vue.js +1 -1
- package/dist/components/tt-select/src/Select.vue.d.ts +4 -4
- package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
- package/dist/components/tt-table/index.d.ts +12 -12
- package/dist/components/tt-table/src/Table.vue.d.ts +4 -4
- package/dist/components/tt-table/src/TableForm.vue.d.ts +162 -58
- package/dist/components/tt-table/src/TableForm.vue.js +126 -113
- package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts +19 -1
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +103 -94
- package/dist/components/tt-table/src/hooks/useTableForm.d.ts +1 -1
- package/dist/style.css +1 -1
- 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
|
|
10
|
-
type
|
|
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
|
|
4
|
-
import { defineComponent as
|
|
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
|
|
16
|
-
import {
|
|
17
|
-
const
|
|
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 =
|
|
31
|
-
return () => 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
|
-
|
|
42
|
+
S as default
|
|
43
43
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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
|
|
8
|
-
import { clnm as
|
|
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
|
|
15
|
-
import
|
|
16
|
-
import
|
|
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
|
|
19
|
+
import { useFormValues as Ae, useFieldError as Me, Field as Ue } from "vee-validate";
|
|
20
20
|
/* empty css */
|
|
21
|
-
import
|
|
22
|
-
import { toTypedSchema as
|
|
23
|
-
import { injectComponentRefMap as
|
|
24
|
-
import { useFormContext as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import { useSelectCollapseOptions as
|
|
28
|
-
import { isEventObjectLike as
|
|
29
|
-
const
|
|
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
|
-
},
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
89
|
+
return Le(S.value, t, o), ne.validateField(t), !0;
|
|
90
90
|
}
|
|
91
91
|
})
|
|
92
|
-
),
|
|
93
|
-
const e = y(n.component) ?
|
|
94
|
-
return
|
|
95
|
-
}), { dynamicComponentProps:
|
|
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
|
-
),
|
|
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 =
|
|
103
|
-
var o,
|
|
104
|
-
if (!
|
|
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
|
|
108
|
-
if (
|
|
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 = (
|
|
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
|
-
}),
|
|
119
|
+
}), ae = a(() => {
|
|
120
120
|
var o;
|
|
121
|
-
if (!
|
|
121
|
+
if (!D.value)
|
|
122
122
|
return null;
|
|
123
123
|
let e = s.value;
|
|
124
124
|
if (!e)
|
|
125
|
-
return
|
|
125
|
+
return B.value ? He(A.value) : null;
|
|
126
126
|
if (y(e))
|
|
127
127
|
return e;
|
|
128
|
-
if (!!
|
|
129
|
-
const
|
|
130
|
-
|
|
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
|
|
133
|
-
}), r =
|
|
134
|
-
const e =
|
|
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
|
-
...
|
|
138
|
+
...te.value
|
|
139
139
|
};
|
|
140
|
-
}), { selectComponentProps:
|
|
141
|
-
|
|
140
|
+
}), { selectComponentProps: re } = Qe(
|
|
141
|
+
a(() => ({
|
|
142
142
|
componentProps: r,
|
|
143
143
|
component: n.component,
|
|
144
|
-
selectWrapRef:
|
|
144
|
+
selectWrapRef: E,
|
|
145
145
|
selectRef: f
|
|
146
146
|
}))
|
|
147
147
|
);
|
|
148
|
-
|
|
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 &&
|
|
155
|
-
|
|
154
|
+
e === !0 && Ce(() => {
|
|
155
|
+
fe();
|
|
156
156
|
});
|
|
157
157
|
},
|
|
158
158
|
{ immediate: !0 }
|
|
159
159
|
);
|
|
160
|
-
const
|
|
160
|
+
const V = a(() => {
|
|
161
161
|
var e;
|
|
162
|
-
return
|
|
163
|
-
}),
|
|
164
|
-
const e =
|
|
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
|
|
172
|
+
function me(e) {
|
|
173
173
|
var v;
|
|
174
|
-
const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"],
|
|
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 &&
|
|
176
|
+
if (t && Ie(t) && i) {
|
|
177
177
|
const d = t.target;
|
|
178
|
-
m =
|
|
178
|
+
m = Q(t) ? d == null ? void 0 : d[i] : (t == null ? void 0 : t[i]) ?? t;
|
|
179
179
|
}
|
|
180
|
-
return
|
|
181
|
-
[`onUpdate:${
|
|
182
|
-
[
|
|
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
|
|
185
|
-
const
|
|
186
|
-
if (!
|
|
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
|
|
189
|
-
return g == null ? void 0 : g((
|
|
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
|
|
198
|
-
function
|
|
199
|
-
const t =
|
|
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
|
-
...
|
|
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) &&
|
|
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
|
|
209
|
+
function fe() {
|
|
210
210
|
var e, t;
|
|
211
|
-
f.value &&
|
|
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 =
|
|
215
|
-
return
|
|
214
|
+
const p = ze();
|
|
215
|
+
return G(f, (e) => {
|
|
216
216
|
p == null || p.set(n.fieldName, e);
|
|
217
|
-
}),
|
|
217
|
+
}), ge(() => {
|
|
218
218
|
p != null && p.has(n.fieldName) && p.delete(n.fieldName);
|
|
219
|
-
}), (e, t) => !e.hide && l(
|
|
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
|
-
|
|
221
|
+
Fe(F(l(Ve), N({
|
|
222
222
|
class: [{
|
|
223
|
-
"form-valid-error":
|
|
224
|
-
"form-is-required":
|
|
225
|
-
"pb-(--form-valid-error-nocompact-padding-bottom)": !
|
|
226
|
-
"pb-2":
|
|
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
|
-
|
|
231
|
-
class:
|
|
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(
|
|
233
|
+
e.hideLabel ? c("", !0) : (u(), h(Je, {
|
|
234
234
|
key: 0,
|
|
235
|
-
class:
|
|
236
|
-
l(
|
|
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:
|
|
249
|
-
style:
|
|
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(
|
|
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
|
-
|
|
264
|
-
|
|
263
|
+
L("div", Xe, [
|
|
264
|
+
L("div", {
|
|
265
265
|
ref_key: "wrapperRef",
|
|
266
|
-
ref:
|
|
267
|
-
class:
|
|
266
|
+
ref: E,
|
|
267
|
+
class: k(l(q)("relative flex w-full items-center", e.wrapperClass))
|
|
268
268
|
}, [
|
|
269
|
-
F(l(
|
|
270
|
-
class:
|
|
269
|
+
F(l(Be), {
|
|
270
|
+
class: k(l(q)(e.controlClass))
|
|
271
271
|
}, {
|
|
272
272
|
default: b(() => [
|
|
273
|
-
|
|
273
|
+
Re(e.$slots, "default", we(Se({
|
|
274
274
|
...o,
|
|
275
|
-
...
|
|
276
|
-
disabled:
|
|
277
|
-
isInValid:
|
|
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(
|
|
281
|
+
(u(), h(Ne(A.value), N({
|
|
282
282
|
ref_key: "fieldComponentRef",
|
|
283
283
|
ref: f
|
|
284
284
|
}, {
|
|
285
|
-
...
|
|
286
|
-
disabled:
|
|
287
|
-
isInValid:
|
|
285
|
+
...z(o),
|
|
286
|
+
disabled: V.value,
|
|
287
|
+
isInValid: w.value,
|
|
288
288
|
form: P,
|
|
289
289
|
fieldName: e.fieldName
|
|
290
|
-
}, { disabled:
|
|
291
|
-
|
|
292
|
-
name:
|
|
290
|
+
}, { disabled: V.value }), ke({ _: 2 }, [
|
|
291
|
+
Oe(ue.value, (i) => ({
|
|
292
|
+
name: i,
|
|
293
293
|
fn: b((m) => [
|
|
294
|
-
F(l(
|
|
295
|
-
content:
|
|
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(),
|
|
305
|
-
F(l(
|
|
304
|
+
e.suffix ? (u(), H("div", Ye, [
|
|
305
|
+
F(l(O), { content: e.suffix }, null, 8, ["content"])
|
|
306
306
|
])) : c("", !0),
|
|
307
|
-
|
|
307
|
+
R.value && w.value ? (u(), h(l(qe), {
|
|
308
308
|
key: 1,
|
|
309
|
-
"ref-dom":
|
|
309
|
+
"ref-dom": E.value
|
|
310
310
|
}, null, 8, ["ref-dom"])) : c("", !0)
|
|
311
311
|
], 2)
|
|
312
312
|
])
|
|
313
313
|
], 2),
|
|
314
|
-
e.description || !
|
|
314
|
+
e.description || !R.value ? (u(), H("div", {
|
|
315
315
|
key: 0,
|
|
316
|
-
style:
|
|
316
|
+
style: J(!l(C) && !e.hideLabel ? { paddingLeft: `${(e.labelWidth || 0) + 8}px` } : {})
|
|
317
317
|
}, [
|
|
318
|
-
e.description ? (u(), h(l(
|
|
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(
|
|
323
|
+
F(l(O), { content: e.description }, null, 8, ["content"])
|
|
324
324
|
]),
|
|
325
325
|
_: 1
|
|
326
326
|
})) : c("", !0),
|
|
327
|
-
F(
|
|
327
|
+
F(Ee, { name: "slide-up" }, {
|
|
328
328
|
default: b(() => [
|
|
329
|
-
!
|
|
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
|
-
[
|
|
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
|
-
|
|
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<
|
|
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>>;
|