@tmagic/form 1.0.0-beta.6 → 1.0.0-rc.2
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/LICENSE +5432 -0
- package/README.md +1 -0
- package/coverage/clover.xml +1360 -0
- package/coverage/coverage-final.json +38 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +176 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/Form.vue.html +676 -0
- package/coverage/lcov-report/src/FormDialog.vue.html +583 -0
- package/coverage/lcov-report/src/containers/Col.vue.html +253 -0
- package/coverage/lcov-report/src/containers/Container.vue.html +925 -0
- package/coverage/lcov-report/src/containers/Fieldset.vue.html +499 -0
- package/coverage/lcov-report/src/containers/GroupList.vue.html +541 -0
- package/coverage/lcov-report/src/containers/GroupListItem.vue.html +562 -0
- package/coverage/lcov-report/src/containers/Panel.vue.html +403 -0
- package/coverage/lcov-report/src/containers/Row.vue.html +277 -0
- package/coverage/lcov-report/src/containers/Step.vue.html +331 -0
- package/coverage/lcov-report/src/containers/Table.vue.html +1987 -0
- package/coverage/lcov-report/src/containers/Tabs.vue.html +625 -0
- package/coverage/lcov-report/src/containers/index.html +251 -0
- package/coverage/lcov-report/src/fields/Cascader.vue.html +526 -0
- package/coverage/lcov-report/src/fields/Checkbox.vue.html +286 -0
- package/coverage/lcov-report/src/fields/CheckboxGroup.vue.html +217 -0
- package/coverage/lcov-report/src/fields/ColorPicker.vue.html +199 -0
- package/coverage/lcov-report/src/fields/Date.vue.html +238 -0
- package/coverage/lcov-report/src/fields/DateTime.vue.html +262 -0
- package/coverage/lcov-report/src/fields/Daterange.vue.html +310 -0
- package/coverage/lcov-report/src/fields/Display.vue.html +187 -0
- package/coverage/lcov-report/src/fields/DynamicField.vue.html +412 -0
- package/coverage/lcov-report/src/fields/Hidden.vue.html +172 -0
- package/coverage/lcov-report/src/fields/Link.vue.html +421 -0
- package/coverage/lcov-report/src/fields/Number.vue.html +244 -0
- package/coverage/lcov-report/src/fields/RadioGroup.vue.html +184 -0
- package/coverage/lcov-report/src/fields/Select.vue.html +1243 -0
- package/coverage/lcov-report/src/fields/Switch.vue.html +280 -0
- package/coverage/lcov-report/src/fields/Text.vue.html +487 -0
- package/coverage/lcov-report/src/fields/Textarea.vue.html +265 -0
- package/coverage/lcov-report/src/fields/Time.vue.html +229 -0
- package/coverage/lcov-report/src/fields/index.html +371 -0
- package/coverage/lcov-report/src/index.html +146 -0
- package/coverage/lcov-report/src/index.ts.html +466 -0
- package/coverage/lcov-report/src/theme/index.html +116 -0
- package/coverage/lcov-report/src/theme/index.scss.html +112 -0
- package/coverage/lcov-report/src/utils/config.ts.html +166 -0
- package/coverage/lcov-report/src/utils/createForm.ts.html +160 -0
- package/coverage/lcov-report/src/utils/fieldProps.ts.html +202 -0
- package/coverage/lcov-report/src/utils/form.ts.html +895 -0
- package/coverage/lcov-report/src/utils/index.html +176 -0
- package/coverage/lcov-report/src/utils/useAddField.ts.html +205 -0
- package/coverage/lcov.info +3061 -0
- package/dist/style.css +9 -11
- package/dist/tmagic-form.es.js +188 -127
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +191 -131
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/Form.vue.d.ts +181 -120
- package/dist/types/src/FormDialog.vue.d.ts +357 -238
- package/dist/types/src/containers/Col.vue.d.ts +42 -0
- package/dist/types/src/containers/Container.vue.d.ts +1 -0
- package/dist/types/src/containers/Row.vue.d.ts +0 -1
- package/dist/types/src/containers/Table.vue.d.ts +1742 -544
- package/dist/types/src/fields/Checkbox.vue.d.ts +2 -2
- package/dist/types/src/fields/Link.vue.d.ts +710 -472
- package/dist/types/src/schema.d.ts +2 -0
- package/package.json +29 -9
- package/src/Form.vue +7 -2
- package/src/FormDialog.vue +1 -1
- package/src/containers/Col.vue +56 -0
- package/src/containers/Container.vue +28 -11
- package/src/containers/GroupListItem.vue +4 -4
- package/src/containers/Row.vue +13 -17
- package/src/containers/Table.vue +14 -6
- package/src/fields/Checkbox.vue +2 -2
- package/src/fields/Link.vue +1 -1
- package/src/fields/Select.vue +8 -15
- package/src/fields/Text.vue +4 -4
- package/src/fields/Textarea.vue +11 -13
- package/src/schema.ts +2 -0
- package/src/theme/form.scss +24 -17
- package/src/utils/form.ts +5 -1
- package/dist/types/src/fields/Cascader.vue.d.ts +0 -1748
- package/dist/types/src/fields/Select.vue.d.ts +0 -975
- package/tsconfig.json +0 -9
- package/vite.config.ts +0 -27
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { LooseRequired } from '@vue/shared';
|
|
2
|
+
import type { FormItemRule, FormItemProp, FormItemContext, FormValidateCallback, FormValidationResult } from 'element-plus';
|
|
3
|
+
import type { BuildPropType, Arrayable, BuildPropReturn, PropWrapper } from 'element-plus/es/utils';
|
|
4
4
|
import type { DefineComponent, Ref, ComponentInternalInstance, ExtractPropTypes, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, PropType } from 'vue';
|
|
5
5
|
import type { FormConfig, FormState, LinkConfig } from '../schema';
|
|
6
6
|
declare const _default: DefineComponent<{
|
|
@@ -49,7 +49,7 @@ declare const _default: DefineComponent<{
|
|
|
49
49
|
default: () => never[];
|
|
50
50
|
};
|
|
51
51
|
labelWidth: (StringConstructor | NumberConstructor)[];
|
|
52
|
-
size: PropType<"small" | "
|
|
52
|
+
size: PropType<"small" | "default" | "large">;
|
|
53
53
|
confirmText: {
|
|
54
54
|
type: StringConstructor;
|
|
55
55
|
default: string;
|
|
@@ -87,7 +87,7 @@ declare const _default: DefineComponent<{
|
|
|
87
87
|
default: () => never[];
|
|
88
88
|
};
|
|
89
89
|
labelWidth: (StringConstructor | NumberConstructor)[];
|
|
90
|
-
size: PropType<"small" | "
|
|
90
|
+
size: PropType<"small" | "default" | "large">;
|
|
91
91
|
confirmText: {
|
|
92
92
|
type: StringConstructor;
|
|
93
93
|
default: string;
|
|
@@ -144,7 +144,7 @@ declare const _default: DefineComponent<{
|
|
|
144
144
|
default: () => number;
|
|
145
145
|
};
|
|
146
146
|
size: {
|
|
147
|
-
type:
|
|
147
|
+
type: PropType<"small" | "default" | "large">;
|
|
148
148
|
};
|
|
149
149
|
inline: {
|
|
150
150
|
type: BooleanConstructor;
|
|
@@ -158,6 +158,9 @@ declare const _default: DefineComponent<{
|
|
|
158
158
|
type: StringConstructor;
|
|
159
159
|
default: string;
|
|
160
160
|
};
|
|
161
|
+
popperClass: {
|
|
162
|
+
type: StringConstructor;
|
|
163
|
+
};
|
|
161
164
|
}>> & {
|
|
162
165
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
163
166
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -208,7 +211,7 @@ declare const _default: DefineComponent<{
|
|
|
208
211
|
default: () => number;
|
|
209
212
|
};
|
|
210
213
|
size: {
|
|
211
|
-
type:
|
|
214
|
+
type: PropType<"small" | "default" | "large">;
|
|
212
215
|
};
|
|
213
216
|
inline: {
|
|
214
217
|
type: BooleanConstructor;
|
|
@@ -222,6 +225,9 @@ declare const _default: DefineComponent<{
|
|
|
222
225
|
type: StringConstructor;
|
|
223
226
|
default: string;
|
|
224
227
|
};
|
|
228
|
+
popperClass: {
|
|
229
|
+
type: StringConstructor;
|
|
230
|
+
};
|
|
225
231
|
}>> & {
|
|
226
232
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
227
233
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -236,49 +242,36 @@ declare const _default: DefineComponent<{
|
|
|
236
242
|
$: ComponentInternalInstance;
|
|
237
243
|
$data: {};
|
|
238
244
|
$props: Partial<{
|
|
245
|
+
size: BuildPropType<StringConstructor, "" | "small" | "default" | "large", unknown>;
|
|
239
246
|
disabled: boolean;
|
|
240
|
-
|
|
241
|
-
labelWidth:
|
|
247
|
+
rules: Partial<Record<string, Arrayable<FormItemRule>>>;
|
|
248
|
+
labelWidth: BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
242
249
|
labelSuffix: string;
|
|
250
|
+
showMessage: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
251
|
+
validateOnRuleChange: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
252
|
+
hideRequiredAsterisk: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
253
|
+
inline: boolean;
|
|
243
254
|
inlineMessage: boolean;
|
|
244
255
|
statusIcon: boolean;
|
|
245
|
-
showMessage: boolean;
|
|
246
|
-
validateOnRuleChange: boolean;
|
|
247
|
-
hideRequiredAsterisk: boolean;
|
|
248
256
|
scrollToError: boolean;
|
|
249
257
|
}> & Omit<Readonly<ExtractPropTypes<{
|
|
250
|
-
model: ObjectConstructor;
|
|
251
|
-
rules:
|
|
252
|
-
labelPosition: StringConstructor;
|
|
253
|
-
labelWidth:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
showMessage: {
|
|
265
|
-
type: BooleanConstructor;
|
|
266
|
-
default: boolean;
|
|
267
|
-
};
|
|
268
|
-
size: PropType<"small" | "default" | "large">;
|
|
269
|
-
disabled: BooleanConstructor;
|
|
270
|
-
validateOnRuleChange: {
|
|
271
|
-
type: BooleanConstructor;
|
|
272
|
-
default: boolean;
|
|
273
|
-
};
|
|
274
|
-
hideRequiredAsterisk: {
|
|
275
|
-
type: BooleanConstructor;
|
|
276
|
-
default: boolean;
|
|
277
|
-
};
|
|
278
|
-
scrollToError: BooleanConstructor;
|
|
258
|
+
readonly model: ObjectConstructor;
|
|
259
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
260
|
+
readonly labelPosition: StringConstructor;
|
|
261
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
262
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
263
|
+
readonly inline: BooleanConstructor;
|
|
264
|
+
readonly inlineMessage: BooleanConstructor;
|
|
265
|
+
readonly statusIcon: BooleanConstructor;
|
|
266
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
267
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
268
|
+
readonly disabled: BooleanConstructor;
|
|
269
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
270
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
271
|
+
readonly scrollToError: BooleanConstructor;
|
|
279
272
|
}>> & {
|
|
280
|
-
onValidate?: ((
|
|
281
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "labelWidth" | "disabled" | "inline" | "labelSuffix" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
273
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
274
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "labelWidth" | "disabled" | "size" | "inline" | "rules" | "labelSuffix" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
282
275
|
$attrs: {
|
|
283
276
|
[x: string]: unknown;
|
|
284
277
|
};
|
|
@@ -290,57 +283,93 @@ declare const _default: DefineComponent<{
|
|
|
290
283
|
}>;
|
|
291
284
|
$root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
292
285
|
$parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
293
|
-
$emit: (event: "validate",
|
|
286
|
+
$emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
294
287
|
$el: any;
|
|
295
288
|
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
296
|
-
model: ObjectConstructor;
|
|
297
|
-
rules:
|
|
298
|
-
labelPosition: StringConstructor;
|
|
299
|
-
labelWidth:
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
showMessage: {
|
|
311
|
-
type: BooleanConstructor;
|
|
312
|
-
default: boolean;
|
|
313
|
-
};
|
|
314
|
-
size: PropType<"small" | "default" | "large">;
|
|
315
|
-
disabled: BooleanConstructor;
|
|
316
|
-
validateOnRuleChange: {
|
|
317
|
-
type: BooleanConstructor;
|
|
318
|
-
default: boolean;
|
|
319
|
-
};
|
|
320
|
-
hideRequiredAsterisk: {
|
|
321
|
-
type: BooleanConstructor;
|
|
322
|
-
default: boolean;
|
|
323
|
-
};
|
|
324
|
-
scrollToError: BooleanConstructor;
|
|
289
|
+
readonly model: ObjectConstructor;
|
|
290
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
291
|
+
readonly labelPosition: StringConstructor;
|
|
292
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
293
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
294
|
+
readonly inline: BooleanConstructor;
|
|
295
|
+
readonly inlineMessage: BooleanConstructor;
|
|
296
|
+
readonly statusIcon: BooleanConstructor;
|
|
297
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
298
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
299
|
+
readonly disabled: BooleanConstructor;
|
|
300
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
301
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
302
|
+
readonly scrollToError: BooleanConstructor;
|
|
325
303
|
}>> & {
|
|
326
|
-
onValidate?: ((
|
|
304
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
327
305
|
}, {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
306
|
+
COMPONENT_NAME: string;
|
|
307
|
+
props: Readonly<LooseRequired<Readonly<ExtractPropTypes<{
|
|
308
|
+
readonly model: ObjectConstructor;
|
|
309
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
310
|
+
readonly labelPosition: StringConstructor;
|
|
311
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
312
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
313
|
+
readonly inline: BooleanConstructor;
|
|
314
|
+
readonly inlineMessage: BooleanConstructor;
|
|
315
|
+
readonly statusIcon: BooleanConstructor;
|
|
316
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
317
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
318
|
+
readonly disabled: BooleanConstructor;
|
|
319
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
320
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
321
|
+
readonly scrollToError: BooleanConstructor;
|
|
322
|
+
}>> & {
|
|
323
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
324
|
+
}>>;
|
|
325
|
+
emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
326
|
+
fields: FormItemContext[];
|
|
327
|
+
formSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
328
|
+
ns: {
|
|
329
|
+
namespace: ComputedRef<string>;
|
|
330
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
331
|
+
e: (element?: string | undefined) => string;
|
|
332
|
+
m: (modifier?: string | undefined) => string;
|
|
333
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
334
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
335
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
336
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
337
|
+
is: {
|
|
338
|
+
(name: string, state: boolean | undefined): string;
|
|
339
|
+
(name: string): string;
|
|
340
|
+
};
|
|
341
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
342
|
+
cssVarName: (name: string) => string;
|
|
343
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
344
|
+
cssVarBlockName: (name: string) => string;
|
|
345
|
+
};
|
|
346
|
+
formClasses: ComputedRef<(string | {
|
|
347
|
+
[x: string]: string | boolean | undefined;
|
|
348
|
+
})[]>;
|
|
349
|
+
addField: (field: FormItemContext) => void;
|
|
350
|
+
removeField: (field: FormItemContext) => void;
|
|
351
|
+
resetFields: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
352
|
+
clearValidate: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
353
|
+
isValidatable: ComputedRef<boolean>;
|
|
354
|
+
obtainValidateFields: (props: Arrayable<FormItemProp>) => FormItemContext[];
|
|
355
|
+
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
356
|
+
doValidateField: (props?: Arrayable<FormItemProp> | undefined) => Promise<boolean>;
|
|
357
|
+
validateField: (props?: Arrayable<FormItemProp> | undefined, callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
358
|
+
scrollToField: (prop: FormItemProp) => void;
|
|
359
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
360
|
+
validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean;
|
|
361
|
+
}, string, {
|
|
362
|
+
size: BuildPropType<StringConstructor, "" | "small" | "default" | "large", unknown>;
|
|
335
363
|
disabled: boolean;
|
|
336
|
-
|
|
337
|
-
labelWidth:
|
|
364
|
+
rules: Partial<Record<string, Arrayable<FormItemRule>>>;
|
|
365
|
+
labelWidth: BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
338
366
|
labelSuffix: string;
|
|
367
|
+
showMessage: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
368
|
+
validateOnRuleChange: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
369
|
+
hideRequiredAsterisk: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
370
|
+
inline: boolean;
|
|
339
371
|
inlineMessage: boolean;
|
|
340
372
|
statusIcon: boolean;
|
|
341
|
-
showMessage: boolean;
|
|
342
|
-
validateOnRuleChange: boolean;
|
|
343
|
-
hideRequiredAsterisk: boolean;
|
|
344
373
|
scrollToError: boolean;
|
|
345
374
|
}> & {
|
|
346
375
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -363,44 +392,76 @@ declare const _default: DefineComponent<{
|
|
|
363
392
|
$nextTick: typeof nextTick;
|
|
364
393
|
$watch(source: string | Function, cb: Function, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
|
|
365
394
|
} & Readonly<ExtractPropTypes<{
|
|
366
|
-
model: ObjectConstructor;
|
|
367
|
-
rules:
|
|
368
|
-
labelPosition: StringConstructor;
|
|
369
|
-
labelWidth:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
showMessage: {
|
|
381
|
-
type: BooleanConstructor;
|
|
382
|
-
default: boolean;
|
|
383
|
-
};
|
|
384
|
-
size: PropType<"small" | "default" | "large">;
|
|
385
|
-
disabled: BooleanConstructor;
|
|
386
|
-
validateOnRuleChange: {
|
|
387
|
-
type: BooleanConstructor;
|
|
388
|
-
default: boolean;
|
|
389
|
-
};
|
|
390
|
-
hideRequiredAsterisk: {
|
|
391
|
-
type: BooleanConstructor;
|
|
392
|
-
default: boolean;
|
|
393
|
-
};
|
|
394
|
-
scrollToError: BooleanConstructor;
|
|
395
|
+
readonly model: ObjectConstructor;
|
|
396
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
397
|
+
readonly labelPosition: StringConstructor;
|
|
398
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
399
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
400
|
+
readonly inline: BooleanConstructor;
|
|
401
|
+
readonly inlineMessage: BooleanConstructor;
|
|
402
|
+
readonly statusIcon: BooleanConstructor;
|
|
403
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
404
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
405
|
+
readonly disabled: BooleanConstructor;
|
|
406
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
407
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
408
|
+
readonly scrollToError: BooleanConstructor;
|
|
395
409
|
}>> & {
|
|
396
|
-
onValidate?: ((
|
|
410
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
397
411
|
} & ShallowUnwrapRef<{
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
412
|
+
COMPONENT_NAME: string;
|
|
413
|
+
props: Readonly<LooseRequired<Readonly<ExtractPropTypes<{
|
|
414
|
+
readonly model: ObjectConstructor;
|
|
415
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
416
|
+
readonly labelPosition: StringConstructor;
|
|
417
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
418
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
419
|
+
readonly inline: BooleanConstructor;
|
|
420
|
+
readonly inlineMessage: BooleanConstructor;
|
|
421
|
+
readonly statusIcon: BooleanConstructor;
|
|
422
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
423
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
424
|
+
readonly disabled: BooleanConstructor;
|
|
425
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
426
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
427
|
+
readonly scrollToError: BooleanConstructor;
|
|
428
|
+
}>> & {
|
|
429
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
430
|
+
}>>;
|
|
431
|
+
emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
432
|
+
fields: FormItemContext[];
|
|
433
|
+
formSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
434
|
+
ns: {
|
|
435
|
+
namespace: ComputedRef<string>;
|
|
436
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
437
|
+
e: (element?: string | undefined) => string;
|
|
438
|
+
m: (modifier?: string | undefined) => string;
|
|
439
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
440
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
441
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
442
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
443
|
+
is: {
|
|
444
|
+
(name: string, state: boolean | undefined): string;
|
|
445
|
+
(name: string): string;
|
|
446
|
+
};
|
|
447
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
448
|
+
cssVarName: (name: string) => string;
|
|
449
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
450
|
+
cssVarBlockName: (name: string) => string;
|
|
451
|
+
};
|
|
452
|
+
formClasses: ComputedRef<(string | {
|
|
453
|
+
[x: string]: string | boolean | undefined;
|
|
454
|
+
})[]>;
|
|
455
|
+
addField: (field: FormItemContext) => void;
|
|
456
|
+
removeField: (field: FormItemContext) => void;
|
|
457
|
+
resetFields: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
458
|
+
clearValidate: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
459
|
+
isValidatable: ComputedRef<boolean>;
|
|
460
|
+
obtainValidateFields: (props: Arrayable<FormItemProp>) => FormItemContext[];
|
|
461
|
+
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
462
|
+
doValidateField: (props?: Arrayable<FormItemProp> | undefined) => Promise<boolean>;
|
|
463
|
+
validateField: (props?: Arrayable<FormItemProp> | undefined, callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
464
|
+
scrollToField: (prop: FormItemProp) => void;
|
|
404
465
|
}> & {} & {} & ComponentCustomProperties) | undefined>;
|
|
405
466
|
formState: FormState;
|
|
406
467
|
changeHandler: () => void;
|
|
@@ -469,7 +530,7 @@ declare const _default: DefineComponent<{
|
|
|
469
530
|
default: () => number;
|
|
470
531
|
};
|
|
471
532
|
size: {
|
|
472
|
-
type:
|
|
533
|
+
type: PropType<"small" | "default" | "large">;
|
|
473
534
|
};
|
|
474
535
|
inline: {
|
|
475
536
|
type: BooleanConstructor;
|
|
@@ -483,6 +544,9 @@ declare const _default: DefineComponent<{
|
|
|
483
544
|
type: StringConstructor;
|
|
484
545
|
default: string;
|
|
485
546
|
};
|
|
547
|
+
popperClass: {
|
|
548
|
+
type: StringConstructor;
|
|
549
|
+
};
|
|
486
550
|
}>> & {
|
|
487
551
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
488
552
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -497,49 +561,36 @@ declare const _default: DefineComponent<{
|
|
|
497
561
|
$: ComponentInternalInstance;
|
|
498
562
|
$data: {};
|
|
499
563
|
$props: Partial<{
|
|
564
|
+
size: BuildPropType<StringConstructor, "" | "small" | "default" | "large", unknown>;
|
|
500
565
|
disabled: boolean;
|
|
501
|
-
|
|
502
|
-
labelWidth:
|
|
566
|
+
rules: Partial<Record<string, Arrayable<FormItemRule>>>;
|
|
567
|
+
labelWidth: BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
503
568
|
labelSuffix: string;
|
|
569
|
+
showMessage: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
570
|
+
validateOnRuleChange: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
571
|
+
hideRequiredAsterisk: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
572
|
+
inline: boolean;
|
|
504
573
|
inlineMessage: boolean;
|
|
505
574
|
statusIcon: boolean;
|
|
506
|
-
showMessage: boolean;
|
|
507
|
-
validateOnRuleChange: boolean;
|
|
508
|
-
hideRequiredAsterisk: boolean;
|
|
509
575
|
scrollToError: boolean;
|
|
510
576
|
}> & Omit<Readonly<ExtractPropTypes<{
|
|
511
|
-
model: ObjectConstructor;
|
|
512
|
-
rules:
|
|
513
|
-
labelPosition: StringConstructor;
|
|
514
|
-
labelWidth:
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
showMessage: {
|
|
526
|
-
type: BooleanConstructor;
|
|
527
|
-
default: boolean;
|
|
528
|
-
};
|
|
529
|
-
size: PropType<"small" | "default" | "large">;
|
|
530
|
-
disabled: BooleanConstructor;
|
|
531
|
-
validateOnRuleChange: {
|
|
532
|
-
type: BooleanConstructor;
|
|
533
|
-
default: boolean;
|
|
534
|
-
};
|
|
535
|
-
hideRequiredAsterisk: {
|
|
536
|
-
type: BooleanConstructor;
|
|
537
|
-
default: boolean;
|
|
538
|
-
};
|
|
539
|
-
scrollToError: BooleanConstructor;
|
|
577
|
+
readonly model: ObjectConstructor;
|
|
578
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
579
|
+
readonly labelPosition: StringConstructor;
|
|
580
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
581
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
582
|
+
readonly inline: BooleanConstructor;
|
|
583
|
+
readonly inlineMessage: BooleanConstructor;
|
|
584
|
+
readonly statusIcon: BooleanConstructor;
|
|
585
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
586
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
587
|
+
readonly disabled: BooleanConstructor;
|
|
588
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
589
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
590
|
+
readonly scrollToError: BooleanConstructor;
|
|
540
591
|
}>> & {
|
|
541
|
-
onValidate?: ((
|
|
542
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "labelWidth" | "disabled" | "inline" | "labelSuffix" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
592
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
593
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "labelWidth" | "disabled" | "size" | "inline" | "rules" | "labelSuffix" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
543
594
|
$attrs: {
|
|
544
595
|
[x: string]: unknown;
|
|
545
596
|
};
|
|
@@ -551,57 +602,93 @@ declare const _default: DefineComponent<{
|
|
|
551
602
|
}>;
|
|
552
603
|
$root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
553
604
|
$parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
554
|
-
$emit: (event: "validate",
|
|
605
|
+
$emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
555
606
|
$el: any;
|
|
556
607
|
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
557
|
-
model: ObjectConstructor;
|
|
558
|
-
rules:
|
|
559
|
-
labelPosition: StringConstructor;
|
|
560
|
-
labelWidth:
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
showMessage: {
|
|
572
|
-
type: BooleanConstructor;
|
|
573
|
-
default: boolean;
|
|
574
|
-
};
|
|
575
|
-
size: PropType<"small" | "default" | "large">;
|
|
576
|
-
disabled: BooleanConstructor;
|
|
577
|
-
validateOnRuleChange: {
|
|
578
|
-
type: BooleanConstructor;
|
|
579
|
-
default: boolean;
|
|
580
|
-
};
|
|
581
|
-
hideRequiredAsterisk: {
|
|
582
|
-
type: BooleanConstructor;
|
|
583
|
-
default: boolean;
|
|
584
|
-
};
|
|
585
|
-
scrollToError: BooleanConstructor;
|
|
608
|
+
readonly model: ObjectConstructor;
|
|
609
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
610
|
+
readonly labelPosition: StringConstructor;
|
|
611
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
612
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
613
|
+
readonly inline: BooleanConstructor;
|
|
614
|
+
readonly inlineMessage: BooleanConstructor;
|
|
615
|
+
readonly statusIcon: BooleanConstructor;
|
|
616
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
617
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
618
|
+
readonly disabled: BooleanConstructor;
|
|
619
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
620
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
621
|
+
readonly scrollToError: BooleanConstructor;
|
|
586
622
|
}>> & {
|
|
587
|
-
onValidate?: ((
|
|
623
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
588
624
|
}, {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
625
|
+
COMPONENT_NAME: string;
|
|
626
|
+
props: Readonly<LooseRequired<Readonly<ExtractPropTypes<{
|
|
627
|
+
readonly model: ObjectConstructor;
|
|
628
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
629
|
+
readonly labelPosition: StringConstructor;
|
|
630
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
631
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
632
|
+
readonly inline: BooleanConstructor;
|
|
633
|
+
readonly inlineMessage: BooleanConstructor;
|
|
634
|
+
readonly statusIcon: BooleanConstructor;
|
|
635
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
636
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
637
|
+
readonly disabled: BooleanConstructor;
|
|
638
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
639
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
640
|
+
readonly scrollToError: BooleanConstructor;
|
|
641
|
+
}>> & {
|
|
642
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
643
|
+
}>>;
|
|
644
|
+
emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
645
|
+
fields: FormItemContext[];
|
|
646
|
+
formSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
647
|
+
ns: {
|
|
648
|
+
namespace: ComputedRef<string>;
|
|
649
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
650
|
+
e: (element?: string | undefined) => string;
|
|
651
|
+
m: (modifier?: string | undefined) => string;
|
|
652
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
653
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
654
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
655
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
656
|
+
is: {
|
|
657
|
+
(name: string, state: boolean | undefined): string;
|
|
658
|
+
(name: string): string;
|
|
659
|
+
};
|
|
660
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
661
|
+
cssVarName: (name: string) => string;
|
|
662
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
663
|
+
cssVarBlockName: (name: string) => string;
|
|
664
|
+
};
|
|
665
|
+
formClasses: ComputedRef<(string | {
|
|
666
|
+
[x: string]: string | boolean | undefined;
|
|
667
|
+
})[]>;
|
|
668
|
+
addField: (field: FormItemContext) => void;
|
|
669
|
+
removeField: (field: FormItemContext) => void;
|
|
670
|
+
resetFields: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
671
|
+
clearValidate: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
672
|
+
isValidatable: ComputedRef<boolean>;
|
|
673
|
+
obtainValidateFields: (props: Arrayable<FormItemProp>) => FormItemContext[];
|
|
674
|
+
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
675
|
+
doValidateField: (props?: Arrayable<FormItemProp> | undefined) => Promise<boolean>;
|
|
676
|
+
validateField: (props?: Arrayable<FormItemProp> | undefined, callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
677
|
+
scrollToField: (prop: FormItemProp) => void;
|
|
678
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
679
|
+
validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean;
|
|
680
|
+
}, string, {
|
|
681
|
+
size: BuildPropType<StringConstructor, "" | "small" | "default" | "large", unknown>;
|
|
596
682
|
disabled: boolean;
|
|
597
|
-
|
|
598
|
-
labelWidth:
|
|
683
|
+
rules: Partial<Record<string, Arrayable<FormItemRule>>>;
|
|
684
|
+
labelWidth: BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
599
685
|
labelSuffix: string;
|
|
686
|
+
showMessage: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
687
|
+
validateOnRuleChange: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
688
|
+
hideRequiredAsterisk: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
689
|
+
inline: boolean;
|
|
600
690
|
inlineMessage: boolean;
|
|
601
691
|
statusIcon: boolean;
|
|
602
|
-
showMessage: boolean;
|
|
603
|
-
validateOnRuleChange: boolean;
|
|
604
|
-
hideRequiredAsterisk: boolean;
|
|
605
692
|
scrollToError: boolean;
|
|
606
693
|
}> & {
|
|
607
694
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -624,44 +711,76 @@ declare const _default: DefineComponent<{
|
|
|
624
711
|
$nextTick: typeof nextTick;
|
|
625
712
|
$watch(source: string | Function, cb: Function, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
|
|
626
713
|
} & Readonly<ExtractPropTypes<{
|
|
627
|
-
model: ObjectConstructor;
|
|
628
|
-
rules:
|
|
629
|
-
labelPosition: StringConstructor;
|
|
630
|
-
labelWidth:
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
showMessage: {
|
|
642
|
-
type: BooleanConstructor;
|
|
643
|
-
default: boolean;
|
|
644
|
-
};
|
|
645
|
-
size: PropType<"small" | "default" | "large">;
|
|
646
|
-
disabled: BooleanConstructor;
|
|
647
|
-
validateOnRuleChange: {
|
|
648
|
-
type: BooleanConstructor;
|
|
649
|
-
default: boolean;
|
|
650
|
-
};
|
|
651
|
-
hideRequiredAsterisk: {
|
|
652
|
-
type: BooleanConstructor;
|
|
653
|
-
default: boolean;
|
|
654
|
-
};
|
|
655
|
-
scrollToError: BooleanConstructor;
|
|
714
|
+
readonly model: ObjectConstructor;
|
|
715
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
716
|
+
readonly labelPosition: StringConstructor;
|
|
717
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
718
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
719
|
+
readonly inline: BooleanConstructor;
|
|
720
|
+
readonly inlineMessage: BooleanConstructor;
|
|
721
|
+
readonly statusIcon: BooleanConstructor;
|
|
722
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
723
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
724
|
+
readonly disabled: BooleanConstructor;
|
|
725
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
726
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
727
|
+
readonly scrollToError: BooleanConstructor;
|
|
656
728
|
}>> & {
|
|
657
|
-
onValidate?: ((
|
|
729
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
658
730
|
} & ShallowUnwrapRef<{
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
731
|
+
COMPONENT_NAME: string;
|
|
732
|
+
props: Readonly<LooseRequired<Readonly<ExtractPropTypes<{
|
|
733
|
+
readonly model: ObjectConstructor;
|
|
734
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
735
|
+
readonly labelPosition: StringConstructor;
|
|
736
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
737
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
738
|
+
readonly inline: BooleanConstructor;
|
|
739
|
+
readonly inlineMessage: BooleanConstructor;
|
|
740
|
+
readonly statusIcon: BooleanConstructor;
|
|
741
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
742
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
743
|
+
readonly disabled: BooleanConstructor;
|
|
744
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
745
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
746
|
+
readonly scrollToError: BooleanConstructor;
|
|
747
|
+
}>> & {
|
|
748
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
749
|
+
}>>;
|
|
750
|
+
emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
751
|
+
fields: FormItemContext[];
|
|
752
|
+
formSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
753
|
+
ns: {
|
|
754
|
+
namespace: ComputedRef<string>;
|
|
755
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
756
|
+
e: (element?: string | undefined) => string;
|
|
757
|
+
m: (modifier?: string | undefined) => string;
|
|
758
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
759
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
760
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
761
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
762
|
+
is: {
|
|
763
|
+
(name: string, state: boolean | undefined): string;
|
|
764
|
+
(name: string): string;
|
|
765
|
+
};
|
|
766
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
767
|
+
cssVarName: (name: string) => string;
|
|
768
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
769
|
+
cssVarBlockName: (name: string) => string;
|
|
770
|
+
};
|
|
771
|
+
formClasses: ComputedRef<(string | {
|
|
772
|
+
[x: string]: string | boolean | undefined;
|
|
773
|
+
})[]>;
|
|
774
|
+
addField: (field: FormItemContext) => void;
|
|
775
|
+
removeField: (field: FormItemContext) => void;
|
|
776
|
+
resetFields: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
777
|
+
clearValidate: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
778
|
+
isValidatable: ComputedRef<boolean>;
|
|
779
|
+
obtainValidateFields: (props: Arrayable<FormItemProp>) => FormItemContext[];
|
|
780
|
+
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
781
|
+
doValidateField: (props?: Arrayable<FormItemProp> | undefined) => Promise<boolean>;
|
|
782
|
+
validateField: (props?: Arrayable<FormItemProp> | undefined, callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
783
|
+
scrollToField: (prop: FormItemProp) => void;
|
|
665
784
|
}> & {} & {} & ComponentCustomProperties) | undefined>;
|
|
666
785
|
formState: FormState;
|
|
667
786
|
changeHandler: () => void;
|
|
@@ -719,7 +838,7 @@ declare const _default: DefineComponent<{
|
|
|
719
838
|
default: () => never[];
|
|
720
839
|
};
|
|
721
840
|
labelWidth: (StringConstructor | NumberConstructor)[];
|
|
722
|
-
size: PropType<"small" | "
|
|
841
|
+
size: PropType<"small" | "default" | "large">;
|
|
723
842
|
confirmText: {
|
|
724
843
|
type: StringConstructor;
|
|
725
844
|
default: string;
|
|
@@ -776,7 +895,7 @@ declare const _default: DefineComponent<{
|
|
|
776
895
|
default: () => number;
|
|
777
896
|
};
|
|
778
897
|
size: {
|
|
779
|
-
type:
|
|
898
|
+
type: PropType<"small" | "default" | "large">;
|
|
780
899
|
};
|
|
781
900
|
inline: {
|
|
782
901
|
type: BooleanConstructor;
|
|
@@ -790,6 +909,9 @@ declare const _default: DefineComponent<{
|
|
|
790
909
|
type: StringConstructor;
|
|
791
910
|
default: string;
|
|
792
911
|
};
|
|
912
|
+
popperClass: {
|
|
913
|
+
type: StringConstructor;
|
|
914
|
+
};
|
|
793
915
|
}>> & {
|
|
794
916
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
795
917
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -840,7 +962,7 @@ declare const _default: DefineComponent<{
|
|
|
840
962
|
default: () => number;
|
|
841
963
|
};
|
|
842
964
|
size: {
|
|
843
|
-
type:
|
|
965
|
+
type: PropType<"small" | "default" | "large">;
|
|
844
966
|
};
|
|
845
967
|
inline: {
|
|
846
968
|
type: BooleanConstructor;
|
|
@@ -854,6 +976,9 @@ declare const _default: DefineComponent<{
|
|
|
854
976
|
type: StringConstructor;
|
|
855
977
|
default: string;
|
|
856
978
|
};
|
|
979
|
+
popperClass: {
|
|
980
|
+
type: StringConstructor;
|
|
981
|
+
};
|
|
857
982
|
}>> & {
|
|
858
983
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
859
984
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -868,49 +993,36 @@ declare const _default: DefineComponent<{
|
|
|
868
993
|
$: ComponentInternalInstance;
|
|
869
994
|
$data: {};
|
|
870
995
|
$props: Partial<{
|
|
996
|
+
size: BuildPropType<StringConstructor, "" | "small" | "default" | "large", unknown>;
|
|
871
997
|
disabled: boolean;
|
|
872
|
-
|
|
873
|
-
labelWidth:
|
|
998
|
+
rules: Partial<Record<string, Arrayable<FormItemRule>>>;
|
|
999
|
+
labelWidth: BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
874
1000
|
labelSuffix: string;
|
|
1001
|
+
showMessage: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1002
|
+
validateOnRuleChange: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1003
|
+
hideRequiredAsterisk: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1004
|
+
inline: boolean;
|
|
875
1005
|
inlineMessage: boolean;
|
|
876
1006
|
statusIcon: boolean;
|
|
877
|
-
showMessage: boolean;
|
|
878
|
-
validateOnRuleChange: boolean;
|
|
879
|
-
hideRequiredAsterisk: boolean;
|
|
880
1007
|
scrollToError: boolean;
|
|
881
1008
|
}> & Omit<Readonly<ExtractPropTypes<{
|
|
882
|
-
model: ObjectConstructor;
|
|
883
|
-
rules:
|
|
884
|
-
labelPosition: StringConstructor;
|
|
885
|
-
labelWidth:
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
showMessage: {
|
|
897
|
-
type: BooleanConstructor;
|
|
898
|
-
default: boolean;
|
|
899
|
-
};
|
|
900
|
-
size: PropType<"small" | "default" | "large">;
|
|
901
|
-
disabled: BooleanConstructor;
|
|
902
|
-
validateOnRuleChange: {
|
|
903
|
-
type: BooleanConstructor;
|
|
904
|
-
default: boolean;
|
|
905
|
-
};
|
|
906
|
-
hideRequiredAsterisk: {
|
|
907
|
-
type: BooleanConstructor;
|
|
908
|
-
default: boolean;
|
|
909
|
-
};
|
|
910
|
-
scrollToError: BooleanConstructor;
|
|
1009
|
+
readonly model: ObjectConstructor;
|
|
1010
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1011
|
+
readonly labelPosition: StringConstructor;
|
|
1012
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1013
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1014
|
+
readonly inline: BooleanConstructor;
|
|
1015
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1016
|
+
readonly statusIcon: BooleanConstructor;
|
|
1017
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1018
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1019
|
+
readonly disabled: BooleanConstructor;
|
|
1020
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1021
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1022
|
+
readonly scrollToError: BooleanConstructor;
|
|
911
1023
|
}>> & {
|
|
912
|
-
onValidate?: ((
|
|
913
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "labelWidth" | "disabled" | "inline" | "labelSuffix" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
1024
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
1025
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "labelWidth" | "disabled" | "size" | "inline" | "rules" | "labelSuffix" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
914
1026
|
$attrs: {
|
|
915
1027
|
[x: string]: unknown;
|
|
916
1028
|
};
|
|
@@ -922,57 +1034,93 @@ declare const _default: DefineComponent<{
|
|
|
922
1034
|
}>;
|
|
923
1035
|
$root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
924
1036
|
$parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
925
|
-
$emit: (event: "validate",
|
|
1037
|
+
$emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
926
1038
|
$el: any;
|
|
927
1039
|
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
928
|
-
model: ObjectConstructor;
|
|
929
|
-
rules:
|
|
930
|
-
labelPosition: StringConstructor;
|
|
931
|
-
labelWidth:
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
showMessage: {
|
|
943
|
-
type: BooleanConstructor;
|
|
944
|
-
default: boolean;
|
|
945
|
-
};
|
|
946
|
-
size: PropType<"small" | "default" | "large">;
|
|
947
|
-
disabled: BooleanConstructor;
|
|
948
|
-
validateOnRuleChange: {
|
|
949
|
-
type: BooleanConstructor;
|
|
950
|
-
default: boolean;
|
|
951
|
-
};
|
|
952
|
-
hideRequiredAsterisk: {
|
|
953
|
-
type: BooleanConstructor;
|
|
954
|
-
default: boolean;
|
|
955
|
-
};
|
|
956
|
-
scrollToError: BooleanConstructor;
|
|
1040
|
+
readonly model: ObjectConstructor;
|
|
1041
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1042
|
+
readonly labelPosition: StringConstructor;
|
|
1043
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1044
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1045
|
+
readonly inline: BooleanConstructor;
|
|
1046
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1047
|
+
readonly statusIcon: BooleanConstructor;
|
|
1048
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1049
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1050
|
+
readonly disabled: BooleanConstructor;
|
|
1051
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1052
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1053
|
+
readonly scrollToError: BooleanConstructor;
|
|
957
1054
|
}>> & {
|
|
958
|
-
onValidate?: ((
|
|
1055
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
959
1056
|
}, {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1057
|
+
COMPONENT_NAME: string;
|
|
1058
|
+
props: Readonly<LooseRequired<Readonly<ExtractPropTypes<{
|
|
1059
|
+
readonly model: ObjectConstructor;
|
|
1060
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1061
|
+
readonly labelPosition: StringConstructor;
|
|
1062
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1063
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1064
|
+
readonly inline: BooleanConstructor;
|
|
1065
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1066
|
+
readonly statusIcon: BooleanConstructor;
|
|
1067
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1068
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1069
|
+
readonly disabled: BooleanConstructor;
|
|
1070
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1071
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1072
|
+
readonly scrollToError: BooleanConstructor;
|
|
1073
|
+
}>> & {
|
|
1074
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
1075
|
+
}>>;
|
|
1076
|
+
emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
1077
|
+
fields: FormItemContext[];
|
|
1078
|
+
formSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
1079
|
+
ns: {
|
|
1080
|
+
namespace: ComputedRef<string>;
|
|
1081
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
1082
|
+
e: (element?: string | undefined) => string;
|
|
1083
|
+
m: (modifier?: string | undefined) => string;
|
|
1084
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
1085
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
1086
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
1087
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
1088
|
+
is: {
|
|
1089
|
+
(name: string, state: boolean | undefined): string;
|
|
1090
|
+
(name: string): string;
|
|
1091
|
+
};
|
|
1092
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
1093
|
+
cssVarName: (name: string) => string;
|
|
1094
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
1095
|
+
cssVarBlockName: (name: string) => string;
|
|
1096
|
+
};
|
|
1097
|
+
formClasses: ComputedRef<(string | {
|
|
1098
|
+
[x: string]: string | boolean | undefined;
|
|
1099
|
+
})[]>;
|
|
1100
|
+
addField: (field: FormItemContext) => void;
|
|
1101
|
+
removeField: (field: FormItemContext) => void;
|
|
1102
|
+
resetFields: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
1103
|
+
clearValidate: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
1104
|
+
isValidatable: ComputedRef<boolean>;
|
|
1105
|
+
obtainValidateFields: (props: Arrayable<FormItemProp>) => FormItemContext[];
|
|
1106
|
+
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
1107
|
+
doValidateField: (props?: Arrayable<FormItemProp> | undefined) => Promise<boolean>;
|
|
1108
|
+
validateField: (props?: Arrayable<FormItemProp> | undefined, callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
1109
|
+
scrollToField: (prop: FormItemProp) => void;
|
|
1110
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1111
|
+
validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean;
|
|
1112
|
+
}, string, {
|
|
1113
|
+
size: BuildPropType<StringConstructor, "" | "small" | "default" | "large", unknown>;
|
|
967
1114
|
disabled: boolean;
|
|
968
|
-
|
|
969
|
-
labelWidth:
|
|
1115
|
+
rules: Partial<Record<string, Arrayable<FormItemRule>>>;
|
|
1116
|
+
labelWidth: BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
970
1117
|
labelSuffix: string;
|
|
1118
|
+
showMessage: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1119
|
+
validateOnRuleChange: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1120
|
+
hideRequiredAsterisk: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1121
|
+
inline: boolean;
|
|
971
1122
|
inlineMessage: boolean;
|
|
972
1123
|
statusIcon: boolean;
|
|
973
|
-
showMessage: boolean;
|
|
974
|
-
validateOnRuleChange: boolean;
|
|
975
|
-
hideRequiredAsterisk: boolean;
|
|
976
1124
|
scrollToError: boolean;
|
|
977
1125
|
}> & {
|
|
978
1126
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -995,44 +1143,76 @@ declare const _default: DefineComponent<{
|
|
|
995
1143
|
$nextTick: typeof nextTick;
|
|
996
1144
|
$watch(source: string | Function, cb: Function, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
|
|
997
1145
|
} & Readonly<ExtractPropTypes<{
|
|
998
|
-
model: ObjectConstructor;
|
|
999
|
-
rules:
|
|
1000
|
-
labelPosition: StringConstructor;
|
|
1001
|
-
labelWidth:
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
showMessage: {
|
|
1013
|
-
type: BooleanConstructor;
|
|
1014
|
-
default: boolean;
|
|
1015
|
-
};
|
|
1016
|
-
size: PropType<"small" | "default" | "large">;
|
|
1017
|
-
disabled: BooleanConstructor;
|
|
1018
|
-
validateOnRuleChange: {
|
|
1019
|
-
type: BooleanConstructor;
|
|
1020
|
-
default: boolean;
|
|
1021
|
-
};
|
|
1022
|
-
hideRequiredAsterisk: {
|
|
1023
|
-
type: BooleanConstructor;
|
|
1024
|
-
default: boolean;
|
|
1025
|
-
};
|
|
1026
|
-
scrollToError: BooleanConstructor;
|
|
1146
|
+
readonly model: ObjectConstructor;
|
|
1147
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1148
|
+
readonly labelPosition: StringConstructor;
|
|
1149
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1150
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1151
|
+
readonly inline: BooleanConstructor;
|
|
1152
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1153
|
+
readonly statusIcon: BooleanConstructor;
|
|
1154
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1155
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1156
|
+
readonly disabled: BooleanConstructor;
|
|
1157
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1158
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1159
|
+
readonly scrollToError: BooleanConstructor;
|
|
1027
1160
|
}>> & {
|
|
1028
|
-
onValidate?: ((
|
|
1161
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
1029
1162
|
} & ShallowUnwrapRef<{
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1163
|
+
COMPONENT_NAME: string;
|
|
1164
|
+
props: Readonly<LooseRequired<Readonly<ExtractPropTypes<{
|
|
1165
|
+
readonly model: ObjectConstructor;
|
|
1166
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1167
|
+
readonly labelPosition: StringConstructor;
|
|
1168
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1169
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1170
|
+
readonly inline: BooleanConstructor;
|
|
1171
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1172
|
+
readonly statusIcon: BooleanConstructor;
|
|
1173
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1174
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1175
|
+
readonly disabled: BooleanConstructor;
|
|
1176
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1177
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1178
|
+
readonly scrollToError: BooleanConstructor;
|
|
1179
|
+
}>> & {
|
|
1180
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
1181
|
+
}>>;
|
|
1182
|
+
emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
1183
|
+
fields: FormItemContext[];
|
|
1184
|
+
formSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
1185
|
+
ns: {
|
|
1186
|
+
namespace: ComputedRef<string>;
|
|
1187
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
1188
|
+
e: (element?: string | undefined) => string;
|
|
1189
|
+
m: (modifier?: string | undefined) => string;
|
|
1190
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
1191
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
1192
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
1193
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
1194
|
+
is: {
|
|
1195
|
+
(name: string, state: boolean | undefined): string;
|
|
1196
|
+
(name: string): string;
|
|
1197
|
+
};
|
|
1198
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
1199
|
+
cssVarName: (name: string) => string;
|
|
1200
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
1201
|
+
cssVarBlockName: (name: string) => string;
|
|
1202
|
+
};
|
|
1203
|
+
formClasses: ComputedRef<(string | {
|
|
1204
|
+
[x: string]: string | boolean | undefined;
|
|
1205
|
+
})[]>;
|
|
1206
|
+
addField: (field: FormItemContext) => void;
|
|
1207
|
+
removeField: (field: FormItemContext) => void;
|
|
1208
|
+
resetFields: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
1209
|
+
clearValidate: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
1210
|
+
isValidatable: ComputedRef<boolean>;
|
|
1211
|
+
obtainValidateFields: (props: Arrayable<FormItemProp>) => FormItemContext[];
|
|
1212
|
+
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
1213
|
+
doValidateField: (props?: Arrayable<FormItemProp> | undefined) => Promise<boolean>;
|
|
1214
|
+
validateField: (props?: Arrayable<FormItemProp> | undefined, callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
1215
|
+
scrollToField: (prop: FormItemProp) => void;
|
|
1036
1216
|
}> & {} & {} & ComponentCustomProperties) | undefined>;
|
|
1037
1217
|
formState: FormState;
|
|
1038
1218
|
changeHandler: () => void;
|
|
@@ -1101,7 +1281,7 @@ declare const _default: DefineComponent<{
|
|
|
1101
1281
|
default: () => number;
|
|
1102
1282
|
};
|
|
1103
1283
|
size: {
|
|
1104
|
-
type:
|
|
1284
|
+
type: PropType<"small" | "default" | "large">;
|
|
1105
1285
|
};
|
|
1106
1286
|
inline: {
|
|
1107
1287
|
type: BooleanConstructor;
|
|
@@ -1115,6 +1295,9 @@ declare const _default: DefineComponent<{
|
|
|
1115
1295
|
type: StringConstructor;
|
|
1116
1296
|
default: string;
|
|
1117
1297
|
};
|
|
1298
|
+
popperClass: {
|
|
1299
|
+
type: StringConstructor;
|
|
1300
|
+
};
|
|
1118
1301
|
}>> & {
|
|
1119
1302
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1120
1303
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -1129,49 +1312,36 @@ declare const _default: DefineComponent<{
|
|
|
1129
1312
|
$: ComponentInternalInstance;
|
|
1130
1313
|
$data: {};
|
|
1131
1314
|
$props: Partial<{
|
|
1315
|
+
size: BuildPropType<StringConstructor, "" | "small" | "default" | "large", unknown>;
|
|
1132
1316
|
disabled: boolean;
|
|
1133
|
-
|
|
1134
|
-
labelWidth:
|
|
1317
|
+
rules: Partial<Record<string, Arrayable<FormItemRule>>>;
|
|
1318
|
+
labelWidth: BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
1135
1319
|
labelSuffix: string;
|
|
1320
|
+
showMessage: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1321
|
+
validateOnRuleChange: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1322
|
+
hideRequiredAsterisk: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1323
|
+
inline: boolean;
|
|
1136
1324
|
inlineMessage: boolean;
|
|
1137
1325
|
statusIcon: boolean;
|
|
1138
|
-
showMessage: boolean;
|
|
1139
|
-
validateOnRuleChange: boolean;
|
|
1140
|
-
hideRequiredAsterisk: boolean;
|
|
1141
1326
|
scrollToError: boolean;
|
|
1142
1327
|
}> & Omit<Readonly<ExtractPropTypes<{
|
|
1143
|
-
model: ObjectConstructor;
|
|
1144
|
-
rules:
|
|
1145
|
-
labelPosition: StringConstructor;
|
|
1146
|
-
labelWidth:
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
showMessage: {
|
|
1158
|
-
type: BooleanConstructor;
|
|
1159
|
-
default: boolean;
|
|
1160
|
-
};
|
|
1161
|
-
size: PropType<"small" | "default" | "large">;
|
|
1162
|
-
disabled: BooleanConstructor;
|
|
1163
|
-
validateOnRuleChange: {
|
|
1164
|
-
type: BooleanConstructor;
|
|
1165
|
-
default: boolean;
|
|
1166
|
-
};
|
|
1167
|
-
hideRequiredAsterisk: {
|
|
1168
|
-
type: BooleanConstructor;
|
|
1169
|
-
default: boolean;
|
|
1170
|
-
};
|
|
1171
|
-
scrollToError: BooleanConstructor;
|
|
1328
|
+
readonly model: ObjectConstructor;
|
|
1329
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1330
|
+
readonly labelPosition: StringConstructor;
|
|
1331
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1332
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1333
|
+
readonly inline: BooleanConstructor;
|
|
1334
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1335
|
+
readonly statusIcon: BooleanConstructor;
|
|
1336
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1337
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1338
|
+
readonly disabled: BooleanConstructor;
|
|
1339
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1340
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1341
|
+
readonly scrollToError: BooleanConstructor;
|
|
1172
1342
|
}>> & {
|
|
1173
|
-
onValidate?: ((
|
|
1174
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "labelWidth" | "disabled" | "inline" | "labelSuffix" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
1343
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
1344
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "labelWidth" | "disabled" | "size" | "inline" | "rules" | "labelSuffix" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
|
|
1175
1345
|
$attrs: {
|
|
1176
1346
|
[x: string]: unknown;
|
|
1177
1347
|
};
|
|
@@ -1183,57 +1353,93 @@ declare const _default: DefineComponent<{
|
|
|
1183
1353
|
}>;
|
|
1184
1354
|
$root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
1185
1355
|
$parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
1186
|
-
$emit: (event: "validate",
|
|
1356
|
+
$emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
1187
1357
|
$el: any;
|
|
1188
1358
|
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
1189
|
-
model: ObjectConstructor;
|
|
1190
|
-
rules:
|
|
1191
|
-
labelPosition: StringConstructor;
|
|
1192
|
-
labelWidth:
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
showMessage: {
|
|
1204
|
-
type: BooleanConstructor;
|
|
1205
|
-
default: boolean;
|
|
1206
|
-
};
|
|
1207
|
-
size: PropType<"small" | "default" | "large">;
|
|
1208
|
-
disabled: BooleanConstructor;
|
|
1209
|
-
validateOnRuleChange: {
|
|
1210
|
-
type: BooleanConstructor;
|
|
1211
|
-
default: boolean;
|
|
1212
|
-
};
|
|
1213
|
-
hideRequiredAsterisk: {
|
|
1214
|
-
type: BooleanConstructor;
|
|
1215
|
-
default: boolean;
|
|
1216
|
-
};
|
|
1217
|
-
scrollToError: BooleanConstructor;
|
|
1359
|
+
readonly model: ObjectConstructor;
|
|
1360
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1361
|
+
readonly labelPosition: StringConstructor;
|
|
1362
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1363
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1364
|
+
readonly inline: BooleanConstructor;
|
|
1365
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1366
|
+
readonly statusIcon: BooleanConstructor;
|
|
1367
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1368
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1369
|
+
readonly disabled: BooleanConstructor;
|
|
1370
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1371
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1372
|
+
readonly scrollToError: BooleanConstructor;
|
|
1218
1373
|
}>> & {
|
|
1219
|
-
onValidate?: ((
|
|
1374
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
1220
1375
|
}, {
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1376
|
+
COMPONENT_NAME: string;
|
|
1377
|
+
props: Readonly<LooseRequired<Readonly<ExtractPropTypes<{
|
|
1378
|
+
readonly model: ObjectConstructor;
|
|
1379
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1380
|
+
readonly labelPosition: StringConstructor;
|
|
1381
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1382
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1383
|
+
readonly inline: BooleanConstructor;
|
|
1384
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1385
|
+
readonly statusIcon: BooleanConstructor;
|
|
1386
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1387
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1388
|
+
readonly disabled: BooleanConstructor;
|
|
1389
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1390
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1391
|
+
readonly scrollToError: BooleanConstructor;
|
|
1392
|
+
}>> & {
|
|
1393
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
1394
|
+
}>>;
|
|
1395
|
+
emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
1396
|
+
fields: FormItemContext[];
|
|
1397
|
+
formSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
1398
|
+
ns: {
|
|
1399
|
+
namespace: ComputedRef<string>;
|
|
1400
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
1401
|
+
e: (element?: string | undefined) => string;
|
|
1402
|
+
m: (modifier?: string | undefined) => string;
|
|
1403
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
1404
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
1405
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
1406
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
1407
|
+
is: {
|
|
1408
|
+
(name: string, state: boolean | undefined): string;
|
|
1409
|
+
(name: string): string;
|
|
1410
|
+
};
|
|
1411
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
1412
|
+
cssVarName: (name: string) => string;
|
|
1413
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
1414
|
+
cssVarBlockName: (name: string) => string;
|
|
1415
|
+
};
|
|
1416
|
+
formClasses: ComputedRef<(string | {
|
|
1417
|
+
[x: string]: string | boolean | undefined;
|
|
1418
|
+
})[]>;
|
|
1419
|
+
addField: (field: FormItemContext) => void;
|
|
1420
|
+
removeField: (field: FormItemContext) => void;
|
|
1421
|
+
resetFields: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
1422
|
+
clearValidate: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
1423
|
+
isValidatable: ComputedRef<boolean>;
|
|
1424
|
+
obtainValidateFields: (props: Arrayable<FormItemProp>) => FormItemContext[];
|
|
1425
|
+
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
1426
|
+
doValidateField: (props?: Arrayable<FormItemProp> | undefined) => Promise<boolean>;
|
|
1427
|
+
validateField: (props?: Arrayable<FormItemProp> | undefined, callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
1428
|
+
scrollToField: (prop: FormItemProp) => void;
|
|
1429
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1430
|
+
validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean;
|
|
1431
|
+
}, string, {
|
|
1432
|
+
size: BuildPropType<StringConstructor, "" | "small" | "default" | "large", unknown>;
|
|
1228
1433
|
disabled: boolean;
|
|
1229
|
-
|
|
1230
|
-
labelWidth:
|
|
1434
|
+
rules: Partial<Record<string, Arrayable<FormItemRule>>>;
|
|
1435
|
+
labelWidth: BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
1231
1436
|
labelSuffix: string;
|
|
1437
|
+
showMessage: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1438
|
+
validateOnRuleChange: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1439
|
+
hideRequiredAsterisk: BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
1440
|
+
inline: boolean;
|
|
1232
1441
|
inlineMessage: boolean;
|
|
1233
1442
|
statusIcon: boolean;
|
|
1234
|
-
showMessage: boolean;
|
|
1235
|
-
validateOnRuleChange: boolean;
|
|
1236
|
-
hideRequiredAsterisk: boolean;
|
|
1237
1443
|
scrollToError: boolean;
|
|
1238
1444
|
}> & {
|
|
1239
1445
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -1256,44 +1462,76 @@ declare const _default: DefineComponent<{
|
|
|
1256
1462
|
$nextTick: typeof nextTick;
|
|
1257
1463
|
$watch(source: string | Function, cb: Function, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
|
|
1258
1464
|
} & Readonly<ExtractPropTypes<{
|
|
1259
|
-
model: ObjectConstructor;
|
|
1260
|
-
rules:
|
|
1261
|
-
labelPosition: StringConstructor;
|
|
1262
|
-
labelWidth:
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
showMessage: {
|
|
1274
|
-
type: BooleanConstructor;
|
|
1275
|
-
default: boolean;
|
|
1276
|
-
};
|
|
1277
|
-
size: PropType<"small" | "default" | "large">;
|
|
1278
|
-
disabled: BooleanConstructor;
|
|
1279
|
-
validateOnRuleChange: {
|
|
1280
|
-
type: BooleanConstructor;
|
|
1281
|
-
default: boolean;
|
|
1282
|
-
};
|
|
1283
|
-
hideRequiredAsterisk: {
|
|
1284
|
-
type: BooleanConstructor;
|
|
1285
|
-
default: boolean;
|
|
1286
|
-
};
|
|
1287
|
-
scrollToError: BooleanConstructor;
|
|
1465
|
+
readonly model: ObjectConstructor;
|
|
1466
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1467
|
+
readonly labelPosition: StringConstructor;
|
|
1468
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1469
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1470
|
+
readonly inline: BooleanConstructor;
|
|
1471
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1472
|
+
readonly statusIcon: BooleanConstructor;
|
|
1473
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1474
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1475
|
+
readonly disabled: BooleanConstructor;
|
|
1476
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1477
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1478
|
+
readonly scrollToError: BooleanConstructor;
|
|
1288
1479
|
}>> & {
|
|
1289
|
-
onValidate?: ((
|
|
1480
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
1290
1481
|
} & ShallowUnwrapRef<{
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1482
|
+
COMPONENT_NAME: string;
|
|
1483
|
+
props: Readonly<LooseRequired<Readonly<ExtractPropTypes<{
|
|
1484
|
+
readonly model: ObjectConstructor;
|
|
1485
|
+
readonly rules: BuildPropReturn<PropWrapper<Partial<Record<string, Arrayable<FormItemRule>>>>, unknown, unknown, unknown, unknown>;
|
|
1486
|
+
readonly labelPosition: StringConstructor;
|
|
1487
|
+
readonly labelWidth: BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
1488
|
+
readonly labelSuffix: BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
1489
|
+
readonly inline: BooleanConstructor;
|
|
1490
|
+
readonly inlineMessage: BooleanConstructor;
|
|
1491
|
+
readonly statusIcon: BooleanConstructor;
|
|
1492
|
+
readonly showMessage: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1493
|
+
readonly size: BuildPropReturn<StringConstructor, unknown, unknown, "" | "small" | "default" | "large", unknown>;
|
|
1494
|
+
readonly disabled: BooleanConstructor;
|
|
1495
|
+
readonly validateOnRuleChange: BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
1496
|
+
readonly hideRequiredAsterisk: BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
1497
|
+
readonly scrollToError: BooleanConstructor;
|
|
1498
|
+
}>> & {
|
|
1499
|
+
onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
1500
|
+
}>>;
|
|
1501
|
+
emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void;
|
|
1502
|
+
fields: FormItemContext[];
|
|
1503
|
+
formSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
1504
|
+
ns: {
|
|
1505
|
+
namespace: ComputedRef<string>;
|
|
1506
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
1507
|
+
e: (element?: string | undefined) => string;
|
|
1508
|
+
m: (modifier?: string | undefined) => string;
|
|
1509
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
1510
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
1511
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
1512
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
1513
|
+
is: {
|
|
1514
|
+
(name: string, state: boolean | undefined): string;
|
|
1515
|
+
(name: string): string;
|
|
1516
|
+
};
|
|
1517
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
1518
|
+
cssVarName: (name: string) => string;
|
|
1519
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
1520
|
+
cssVarBlockName: (name: string) => string;
|
|
1521
|
+
};
|
|
1522
|
+
formClasses: ComputedRef<(string | {
|
|
1523
|
+
[x: string]: string | boolean | undefined;
|
|
1524
|
+
})[]>;
|
|
1525
|
+
addField: (field: FormItemContext) => void;
|
|
1526
|
+
removeField: (field: FormItemContext) => void;
|
|
1527
|
+
resetFields: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
1528
|
+
clearValidate: (props?: Arrayable<FormItemProp> | undefined) => void;
|
|
1529
|
+
isValidatable: ComputedRef<boolean>;
|
|
1530
|
+
obtainValidateFields: (props: Arrayable<FormItemProp>) => FormItemContext[];
|
|
1531
|
+
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
1532
|
+
doValidateField: (props?: Arrayable<FormItemProp> | undefined) => Promise<boolean>;
|
|
1533
|
+
validateField: (props?: Arrayable<FormItemProp> | undefined, callback?: FormValidateCallback | undefined) => FormValidationResult;
|
|
1534
|
+
scrollToField: (prop: FormItemProp) => void;
|
|
1297
1535
|
}> & {} & {} & ComponentCustomProperties) | undefined>;
|
|
1298
1536
|
formState: FormState;
|
|
1299
1537
|
changeHandler: () => void;
|