fix: $form type error when using form fields
parent
fbc12930b1
commit
4643660682
|
@ -213,27 +213,29 @@ export interface FormSlots {
|
||||||
* Default content slot.
|
* Default content slot.
|
||||||
* @param {Object} scope - default slot's params.
|
* @param {Object} scope - default slot's params.
|
||||||
*/
|
*/
|
||||||
default: (scope: {
|
default: (
|
||||||
/**
|
scope: {
|
||||||
* Registers a form field for validation and tracking.
|
/**
|
||||||
* @param field - The name of the form field to register.
|
* Registers a form field for validation and tracking.
|
||||||
* @param options - Configuration options for the field, such as validation rules.
|
* @param field - The name of the form field to register.
|
||||||
* @returns - Returns an object or value representing the registered field.
|
* @param options - Configuration options for the field, such as validation rules.
|
||||||
*/
|
* @returns - Returns an object or value representing the registered field.
|
||||||
register: (field: string, options: any) => any;
|
*/
|
||||||
/**
|
register: (field: string, options: any) => any;
|
||||||
* Resets the entire form state, clearing values and validation statuses.
|
/**
|
||||||
*/
|
* Resets the entire form state, clearing values and validation statuses.
|
||||||
reset: () => void;
|
*/
|
||||||
/**
|
reset: () => void;
|
||||||
* Indicates whether the form is valid, returning `true` if all fields pass validation.
|
/**
|
||||||
*/
|
* Indicates whether the form is valid, returning `true` if all fields pass validation.
|
||||||
valid: boolean;
|
*/
|
||||||
/**
|
valid: boolean;
|
||||||
* Stores the state of each form field, with the field name as the key and its state as the value.
|
|
||||||
*/
|
/**
|
||||||
states: Record<string, FormFieldState>;
|
* Index signature for dynamically added form fields.
|
||||||
}) => VNode[];
|
*/
|
||||||
|
} & Record<string, FormFieldState>
|
||||||
|
) => VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue