This commit is contained in:
dap
2024-09-20 08:06:53 +08:00
69 changed files with 2200 additions and 1218 deletions

View File

@@ -43,13 +43,13 @@ function getDefaultState(): VbenFormProps {
}
export class FormApi {
// private prevState!: ModalState;
private state: null | VbenFormProps = null;
// private api: Pick<VbenFormProps, 'handleReset' | 'handleSubmit'>;
public form = {} as FormActions;
isMounted = false;
// private prevState!: ModalState;
public state: null | VbenFormProps = null;
stateHandler: StateHandler;
public store: Store<VbenFormProps>;
@@ -92,6 +92,10 @@ export class FormApi {
this.store.batch(cb);
}
getState() {
return this.state;
}
async getValues() {
const form = await this.getForm();
return form.values;