vft 0.0.493 → 0.0.495
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/index.d.ts +6 -6
- package/es/components/button/index.d.ts +9 -9
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +4 -4
- package/es/components/select/select.vue.d.ts +4 -4
- package/es/components/select/useSelect.d.ts +4 -4
- package/es/components/super-form/index.d.ts +9 -0
- package/es/components/super-form/super-form-item.vue2.js +219 -219
- package/es/components/super-form/super-form.vue2.js +97 -95
- package/es/components/super-form/types.d.ts +20 -1
- package/es/components/super-form/use/use-form-events.d.ts +1 -0
- package/es/components/super-form/use/use-form-events.js +205 -171
- package/es/components/switch/index.d.ts +2 -2
- package/es/components/switch/types.d.ts +22 -1
- package/es/components/table/field.js +60 -55
- package/es/components/table/index.d.ts +3 -3
- package/es/components/table/table.vue.d.ts +1 -1
- package/es/components/table/types.d.ts +2 -2
- package/es/components/table/use/use-data-source.d.ts +1 -1
- package/es/components/table/use/use-data-source.js +136 -119
- package/es/components/table/use/use-loading.js +15 -13
- package/es/components/tree/index.d.ts +5 -5
- package/es/components/tree/tree.vue.d.ts +2 -2
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +1 -1
- package/es/components/upload/upload.vue.d.ts +1 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +6 -6
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +4 -4
- package/lib/components/select/select.vue.d.ts +4 -4
- package/lib/components/select/useSelect.d.ts +4 -4
- package/lib/components/super-form/index.d.ts +9 -0
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +20 -1
- package/lib/components/super-form/use/use-form-events.cjs +1 -1
- package/lib/components/super-form/use/use-form-events.d.ts +1 -0
- package/lib/components/switch/index.d.ts +2 -2
- package/lib/components/switch/types.d.ts +22 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/index.d.ts +3 -3
- package/lib/components/table/table.vue.d.ts +1 -1
- package/lib/components/table/types.d.ts +2 -2
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/table/use/use-data-source.d.ts +1 -1
- package/lib/components/table/use/use-loading.cjs +1 -1
- package/lib/components/tree/index.d.ts +5 -5
- package/lib/components/tree/tree.vue.d.ts +2 -2
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/upload.vue.d.ts +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/table.scss +2 -4
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftCol as
|
|
3
|
-
import { VftForm as
|
|
4
|
-
import { VftRow as
|
|
5
|
-
import { useTimeoutFn as
|
|
6
|
-
import { cloneDeep as
|
|
1
|
+
import { defineComponent as j, useAttrs as ue, reactive as ie, ref as m, computed as u, unref as n, watch as d, nextTick as me, useSlots as fe, createBlock as i, createCommentVNode as K, openBlock as r, mergeProps as B, withKeys as ce, withModifiers as pe, withCtx as h, renderSlot as O, normalizeProps as U, createElementBlock as de, Fragment as Be, renderList as W, createSlots as he, resolveDynamicComponent as A, h as ye } from "vue";
|
|
2
|
+
import { VftCol as ve } from "../col/index.js";
|
|
3
|
+
import { VftForm as be } from "../form/index.js";
|
|
4
|
+
import { VftRow as ge } from "../row/index.js";
|
|
5
|
+
import { useTimeoutFn as we, useDebounceFn as Fe } from "@vueuse/core";
|
|
6
|
+
import { cloneDeep as Re, isEqual as Se, pick as Ce, deepMerge as ke } from "@vft/utils";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
8
8
|
import "lodash-es";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as Ee } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { useAutoFocus as
|
|
13
|
+
import Oe from "./super-form-action.vue2.js";
|
|
14
|
+
import Ae from "./super-form-item.vue2.js";
|
|
15
|
+
import { useAutoFocus as Me } from "./use/use-auto-focus.js";
|
|
16
16
|
import { createFormContext as Pe } from "./use/use-form-context.js";
|
|
17
17
|
import { useFormEvents as Ve } from "./use/use-form-events.js";
|
|
18
18
|
import { useFormValues as Ie } from "./use/use-form-values.js";
|
|
19
|
-
import { willFormExceedOneRow as
|
|
20
|
-
const
|
|
19
|
+
import { willFormExceedOneRow as _e } from "./use/helper.js";
|
|
20
|
+
const De = j({
|
|
21
21
|
name: "vft-super-form"
|
|
22
|
-
}),
|
|
23
|
-
...
|
|
22
|
+
}), tt = /* @__PURE__ */ j({
|
|
23
|
+
...De,
|
|
24
24
|
props: {
|
|
25
25
|
size: {
|
|
26
26
|
default: "default"
|
|
@@ -111,6 +111,7 @@ const _e = J({
|
|
|
111
111
|
labelWidth: {
|
|
112
112
|
default: "auto"
|
|
113
113
|
},
|
|
114
|
+
formatter: {},
|
|
114
115
|
disabled: {
|
|
115
116
|
type: Boolean
|
|
116
117
|
},
|
|
@@ -149,30 +150,30 @@ const _e = J({
|
|
|
149
150
|
}
|
|
150
151
|
},
|
|
151
152
|
emits: ["register", "reset", "submit", "field-value-change", "common-btn-click"],
|
|
152
|
-
setup(
|
|
153
|
-
expose:
|
|
154
|
-
emit:
|
|
153
|
+
setup(J, {
|
|
154
|
+
expose: Q,
|
|
155
|
+
emit: X
|
|
155
156
|
}) {
|
|
156
|
-
const
|
|
157
|
-
...
|
|
157
|
+
const M = J, y = X, P = Ee("super-form"), Y = ue(), l = ie({}), p = m({}), v = m(!1), b = m({}), V = m(), g = m(null), I = m(), t = u(() => ({
|
|
158
|
+
...M,
|
|
158
159
|
...n(b)
|
|
159
160
|
})), f = u(() => ({
|
|
160
|
-
...
|
|
161
|
-
...
|
|
161
|
+
...Y,
|
|
162
|
+
...M,
|
|
162
163
|
...n(t)
|
|
163
164
|
})), a = u(() => {
|
|
164
|
-
const e = n(
|
|
165
|
-
return
|
|
165
|
+
const e = n(V);
|
|
166
|
+
return Re(e);
|
|
166
167
|
}), {
|
|
167
|
-
handleFormValues:
|
|
168
|
+
handleFormValues: Z,
|
|
168
169
|
initDefault: ee
|
|
169
170
|
} = Ie({
|
|
170
171
|
getProps: t,
|
|
171
172
|
defaultValueRef: p,
|
|
172
173
|
getSchema: a,
|
|
173
|
-
formModel:
|
|
174
|
+
formModel: l
|
|
174
175
|
});
|
|
175
|
-
|
|
176
|
+
Me({
|
|
176
177
|
getSchema: a,
|
|
177
178
|
getProps: t,
|
|
178
179
|
isInitedDefault: v,
|
|
@@ -181,28 +182,29 @@ const _e = J({
|
|
|
181
182
|
const {
|
|
182
183
|
handleSubmit: c,
|
|
183
184
|
setFieldsValue: w,
|
|
184
|
-
clearValidate:
|
|
185
|
-
validate:
|
|
186
|
-
validateField:
|
|
185
|
+
clearValidate: _,
|
|
186
|
+
validate: D,
|
|
187
|
+
validateField: T,
|
|
187
188
|
getFieldsValue: F,
|
|
188
189
|
updateSchema: R,
|
|
189
190
|
resetSchema: S,
|
|
190
|
-
appendSchemaByField:
|
|
191
|
-
removeSchemaByField:
|
|
191
|
+
appendSchemaByField: x,
|
|
192
|
+
removeSchemaByField: q,
|
|
192
193
|
resetFields: C,
|
|
193
194
|
scrollToField: te,
|
|
194
|
-
getFieldValue:
|
|
195
|
-
setFormItemError:
|
|
195
|
+
getFieldValue: L,
|
|
196
|
+
setFormItemError: $,
|
|
197
|
+
getFormattedFormModel: oe
|
|
196
198
|
} = Ve({
|
|
197
199
|
emit: y,
|
|
198
200
|
getProps: t,
|
|
199
|
-
formModel:
|
|
201
|
+
formModel: l,
|
|
200
202
|
getSchema: a,
|
|
201
203
|
defaultValueRef: p,
|
|
202
204
|
formElRef: g,
|
|
203
|
-
schemaRef:
|
|
204
|
-
handleFormValues:
|
|
205
|
-
initValues:
|
|
205
|
+
schemaRef: V,
|
|
206
|
+
handleFormValues: Z,
|
|
207
|
+
initValues: I
|
|
206
208
|
});
|
|
207
209
|
Pe({
|
|
208
210
|
resetAction: C,
|
|
@@ -216,24 +218,24 @@ const _e = J({
|
|
|
216
218
|
}, {
|
|
217
219
|
immediate: !0
|
|
218
220
|
}), d(() => n(t).schemas, (e, o) => {
|
|
219
|
-
|
|
221
|
+
Se(e, o) || S(e ?? []);
|
|
220
222
|
}), d(() => a.value, (e) => {
|
|
221
|
-
|
|
222
|
-
}), !n(v) && e?.length && (ee(), v.value = !0, t.value?.watchDataIsChange &&
|
|
223
|
-
|
|
223
|
+
me(() => {
|
|
224
|
+
}), !n(v) && e?.length && (ee(), v.value = !0, t.value?.watchDataIsChange && we(() => {
|
|
225
|
+
I.value = F();
|
|
224
226
|
}, 40));
|
|
225
|
-
}), d(() =>
|
|
227
|
+
}), d(() => l, Fe(() => {
|
|
226
228
|
n(t).submitOnChange && c();
|
|
227
229
|
}, 300), {
|
|
228
230
|
deep: !0
|
|
229
231
|
});
|
|
230
|
-
async function
|
|
231
|
-
b.value =
|
|
232
|
+
async function N(e) {
|
|
233
|
+
b.value = ke(n(b) || {}, e);
|
|
232
234
|
}
|
|
233
|
-
function
|
|
234
|
-
|
|
235
|
+
function ne(e, o, s) {
|
|
236
|
+
l[e] = o;
|
|
235
237
|
}
|
|
236
|
-
function
|
|
238
|
+
function ae(e) {
|
|
237
239
|
const {
|
|
238
240
|
autoSubmitOnEnter: o
|
|
239
241
|
} = n(t);
|
|
@@ -242,113 +244,113 @@ const _e = J({
|
|
|
242
244
|
s && s.tagName && s.tagName.toUpperCase() === "INPUT" && c();
|
|
243
245
|
}
|
|
244
246
|
}
|
|
245
|
-
const
|
|
247
|
+
const G = {
|
|
246
248
|
getFieldsValue: F,
|
|
247
|
-
getFieldValue:
|
|
249
|
+
getFieldValue: L,
|
|
248
250
|
setFieldsValue: w,
|
|
249
251
|
resetFields: C,
|
|
250
252
|
updateSchema: R,
|
|
251
253
|
resetSchema: S,
|
|
252
|
-
setProps:
|
|
253
|
-
removeSchemaByField:
|
|
254
|
-
appendSchemaByField:
|
|
255
|
-
clearValidate:
|
|
256
|
-
validateField:
|
|
257
|
-
setFormItemError:
|
|
258
|
-
validate:
|
|
254
|
+
setProps: N,
|
|
255
|
+
removeSchemaByField: q,
|
|
256
|
+
appendSchemaByField: x,
|
|
257
|
+
clearValidate: _,
|
|
258
|
+
validateField: T,
|
|
259
|
+
setFormItemError: $,
|
|
260
|
+
validate: D,
|
|
259
261
|
submit: c,
|
|
260
262
|
scrollToField: te
|
|
261
263
|
};
|
|
262
|
-
y("register",
|
|
263
|
-
const
|
|
264
|
+
y("register", G);
|
|
265
|
+
const se = u(() => Ce(t.value, ["showResetButton", "showCommonButton", "showSubmitButton", "resetButtonOptions", "submitButtonOptions", "commonButtonOptions", "actionRowOptions", "actionSpan", "submitResetReverse"])), re = u(() => {
|
|
264
266
|
const {
|
|
265
267
|
showCommonButton: e,
|
|
266
268
|
showResetButton: o,
|
|
267
269
|
showSubmitButton: s
|
|
268
270
|
} = t.value;
|
|
269
271
|
return !!(e || o || s);
|
|
270
|
-
}),
|
|
272
|
+
}), H = u(() => {
|
|
271
273
|
const e = n(a);
|
|
272
274
|
if (!e || e.length === 0)
|
|
273
275
|
return !1;
|
|
274
276
|
try {
|
|
275
|
-
return
|
|
277
|
+
return _e(e, t.value, l, p.value).willExceed;
|
|
276
278
|
} catch {
|
|
277
279
|
return !1;
|
|
278
280
|
}
|
|
279
|
-
}), k =
|
|
281
|
+
}), k = fe(), E = (e) => e ? ye(Oe, se.value, {
|
|
280
282
|
resetBefore: (o) => k.resetBefore?.(o),
|
|
281
283
|
submitBefore: (o) => k.submitBefore?.(o),
|
|
282
284
|
submitAfter: (o) => k.submitAfter?.(o)
|
|
283
285
|
}) : null;
|
|
284
|
-
return
|
|
286
|
+
return Q({
|
|
285
287
|
getFieldsValue: F,
|
|
286
|
-
getFieldValue:
|
|
288
|
+
getFieldValue: L,
|
|
287
289
|
setFieldsValue: w,
|
|
288
290
|
resetFields: C,
|
|
289
291
|
updateSchema: R,
|
|
290
292
|
resetSchema: S,
|
|
291
|
-
setProps:
|
|
292
|
-
removeSchemaByField:
|
|
293
|
-
appendSchemaByField:
|
|
294
|
-
clearValidate:
|
|
295
|
-
validateField:
|
|
296
|
-
validate:
|
|
293
|
+
setProps: N,
|
|
294
|
+
removeSchemaByField: q,
|
|
295
|
+
appendSchemaByField: x,
|
|
296
|
+
clearValidate: _,
|
|
297
|
+
validateField: T,
|
|
298
|
+
validate: D,
|
|
297
299
|
submit: c,
|
|
298
300
|
getSchema: a,
|
|
299
|
-
setFormItemError:
|
|
300
|
-
formModel: u(() =>
|
|
301
|
-
hasActionButton:
|
|
302
|
-
willExceedOneRow:
|
|
303
|
-
}), (e, o) => a.value?.length ? (
|
|
301
|
+
setFormItemError: $,
|
|
302
|
+
formModel: u(() => oe()),
|
|
303
|
+
hasActionButton: re,
|
|
304
|
+
willExceedOneRow: H
|
|
305
|
+
}), (e, o) => a.value?.length ? (r(), i(n(be), B({
|
|
304
306
|
key: 0
|
|
305
307
|
}, f.value, {
|
|
306
308
|
ref_key: "formElRef",
|
|
307
309
|
ref: g,
|
|
308
|
-
class: [n(
|
|
309
|
-
[n(
|
|
310
|
+
class: [n(P).b(), {
|
|
311
|
+
[n(P).is("exceed-one-row")]: H.value
|
|
310
312
|
}],
|
|
311
|
-
model:
|
|
312
|
-
onSubmit: o[0] || (o[0] =
|
|
313
|
+
model: l,
|
|
314
|
+
onSubmit: o[0] || (o[0] = pe(() => {
|
|
313
315
|
}, ["prevent"])),
|
|
314
|
-
onKeypress:
|
|
316
|
+
onKeypress: ce(ae, ["enter"])
|
|
315
317
|
}), {
|
|
316
|
-
default: h(() => [a.value?.length ? (
|
|
318
|
+
default: h(() => [a.value?.length ? (r(), i(n(ge), U(B({
|
|
317
319
|
key: 0
|
|
318
320
|
}, f.value?.rowProps)), {
|
|
319
|
-
default: h(() => [O(e.$slots, "formHeader"), (
|
|
321
|
+
default: h(() => [O(e.$slots, "formHeader"), (r(!0), de(Be, null, W(a.value, (s) => (r(), i(Ae, {
|
|
320
322
|
key: s.field,
|
|
321
|
-
"form-action-type":
|
|
323
|
+
"form-action-type": G,
|
|
322
324
|
schema: s,
|
|
323
325
|
"form-props": t.value,
|
|
324
326
|
"all-default-values": p.value,
|
|
325
|
-
"form-model":
|
|
326
|
-
"set-form-model":
|
|
327
|
+
"form-model": l,
|
|
328
|
+
"set-form-model": ne,
|
|
327
329
|
"update-schema": n(R)
|
|
328
|
-
},
|
|
330
|
+
}, he({
|
|
329
331
|
_: 2
|
|
330
|
-
}, [
|
|
331
|
-
name:
|
|
332
|
-
fn: h((
|
|
332
|
+
}, [W(Object.keys(e.$slots), (z) => ({
|
|
333
|
+
name: z,
|
|
334
|
+
fn: h((le) => [O(e.$slots, z, B({
|
|
333
335
|
ref_for: !0
|
|
334
|
-
},
|
|
335
|
-
}))]), 1032, ["schema", "form-props", "all-default-values", "form-model", "update-schema"]))), 128)), t.value?.customLayout ? (
|
|
336
|
+
}, le || {}))])
|
|
337
|
+
}))]), 1032, ["schema", "form-props", "all-default-values", "form-model", "update-schema"]))), 128)), t.value?.customLayout ? (r(), i(A(E(t.value?.showActionButtonGroup && t.value?.actionInline)), {
|
|
336
338
|
key: 1
|
|
337
|
-
})) : (
|
|
339
|
+
})) : (r(), i(n(ve), U(B({
|
|
338
340
|
key: 0
|
|
339
341
|
}, f.value?.quickColSpan ? {
|
|
340
342
|
span: Math.ceil(24 / f.value?.quickColSpan),
|
|
341
343
|
...f.value?.baseColProps
|
|
342
344
|
} : {})), {
|
|
343
|
-
default: h(() => [(
|
|
345
|
+
default: h(() => [(r(), i(A(E(t.value?.showActionButtonGroup && t.value?.actionInline))))]),
|
|
344
346
|
_: 1
|
|
345
347
|
}, 16))]),
|
|
346
348
|
_: 3
|
|
347
|
-
}, 16)) :
|
|
349
|
+
}, 16)) : K("", !0), (r(), i(A(E(t.value?.showActionButtonGroup && !t.value?.actionInline)))), O(e.$slots, "formFooter")]),
|
|
348
350
|
_: 3
|
|
349
|
-
}, 16, ["class", "model"])) :
|
|
351
|
+
}, 16, ["class", "model"])) : K("", !0);
|
|
350
352
|
}
|
|
351
353
|
});
|
|
352
354
|
export {
|
|
353
|
-
|
|
355
|
+
tt as default
|
|
354
356
|
};
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import type { SwitchProps } from 'vft/es/components';
|
|
2
|
+
import type { AutocompleteProps } from 'vft/es/components/autocomplete/autocomplete.vue';
|
|
2
3
|
import type { ButtonProps } from 'vft/es/components/button';
|
|
4
|
+
import type { CascaderProps } from 'vft/es/components/cascader-panel';
|
|
5
|
+
import type { CheckboxGroupProps } from 'vft/es/components/checkbox/checkbox-group.vue';
|
|
3
6
|
import type { ColProps } from 'vft/es/components/col';
|
|
7
|
+
import type { ColorPickerProps } from 'vft/es/components/color-picker/color-picker.vue';
|
|
8
|
+
import type { DatePickerProps } from 'vft/es/components/date-picker';
|
|
9
|
+
import type { DividerProps } from 'vft/es/components/divider/divider.vue';
|
|
4
10
|
import type { FormItemProp, FormItemProps, FormProps } from 'vft/es/components/form';
|
|
5
11
|
import type { IconProps } from 'vft/es/components/icon';
|
|
12
|
+
import type { InputProps } from 'vft/es/components/input';
|
|
13
|
+
import type { InputNumberProps } from 'vft/es/components/input-number/input-number.vue';
|
|
14
|
+
import type { InputTagProps } from 'vft/es/components/input-tag';
|
|
15
|
+
import type { RadioGroupProps } from 'vft/es/components/radio/radio-group.vue';
|
|
6
16
|
import type { RowProps } from 'vft/es/components/row';
|
|
17
|
+
import type { SearchProps } from 'vft/es/components/search';
|
|
18
|
+
import type { SelectV2Props } from 'vft/es/components/select';
|
|
19
|
+
import type { SliderProps } from 'vft/es/components/slider/slider.vue';
|
|
20
|
+
import type { TimePickerDefaultProps } from 'vft/es/components/time-picker';
|
|
7
21
|
import type { ToolTipProps } from 'vft/es/components/tooltip';
|
|
22
|
+
import type { UploadProps } from 'vft/es/components/upload';
|
|
8
23
|
import type { ComponentSize } from 'vft/es/constants';
|
|
9
24
|
import type { Arrayable } from 'vft/es/utils';
|
|
10
25
|
import { type FormCompEnumType } from 'vft/es/utils';
|
|
@@ -40,7 +55,7 @@ type FormItemRule = Omit<RuleItem, 'validator'> & Rule & {
|
|
|
40
55
|
} & {
|
|
41
56
|
isNumber?: boolean;
|
|
42
57
|
};
|
|
43
|
-
export type SchemaCompOptions = SwitchProps | Record<string, any>;
|
|
58
|
+
export type SchemaCompOptions = InputProps | SelectV2Props | RadioGroupProps | CheckboxGroupProps | DatePickerProps | TimePickerDefaultProps | CascaderProps | AutocompleteProps | ColorPickerProps | UploadProps | SliderProps | InputNumberProps | InputTagProps | DividerProps | SearchProps | SwitchProps | Record<string, any>;
|
|
44
59
|
/** 渲染回调参数接口 */
|
|
45
60
|
export interface RenderCallbackParams {
|
|
46
61
|
/** 表单配置模式 */
|
|
@@ -180,6 +195,8 @@ export interface SuperFormProps extends FormInnerProps {
|
|
|
180
195
|
submitResetReverse?: boolean;
|
|
181
196
|
labelPosition?: 'left' | 'right' | 'top';
|
|
182
197
|
labelWidth?: string | number;
|
|
198
|
+
/** 表单值格式化函数,用于格式化 getFieldsValue 的输出值 */
|
|
199
|
+
formatter?: (values: Recordable) => Recordable;
|
|
183
200
|
}
|
|
184
201
|
/** 表单配置模式接口 */
|
|
185
202
|
export interface FormSchema {
|
|
@@ -265,6 +282,8 @@ export interface FormSchema {
|
|
|
265
282
|
helpIcon?: IconProps | string;
|
|
266
283
|
/** 帮助提示配置 */
|
|
267
284
|
helpTooltip?: string | ToolTipProps;
|
|
285
|
+
/** 字段值格式化函数,用于格式化该字段在 getFieldsValue 中的输出值 */
|
|
286
|
+
formatter?: (value: any, field: string, values: Recordable, schema: FormSchema) => any;
|
|
268
287
|
}
|
|
269
288
|
/** 表单项属性接口 */
|
|
270
289
|
export interface SuperFormItemProps {
|
|
@@ -27,5 +27,6 @@ export declare function useFormEvents({ emit, getProps, formModel, getSchema, de
|
|
|
27
27
|
scrollToField: (name: any, options?: ScrollOptions | undefined) => Promise<void>;
|
|
28
28
|
getFieldValue: (field: string) => string | number | Recordable;
|
|
29
29
|
setFormItemError: (field: string, errMess: string) => Promise<void>;
|
|
30
|
+
getFormattedFormModel: () => Recordable;
|
|
30
31
|
};
|
|
31
32
|
export {};
|