fix: improve the scroll bar flashing when the modal box is opened (#4438)

This commit is contained in:
Vben
2024-09-19 21:56:49 +08:00
committed by GitHub
parent 56bdb8f606
commit 161820dbc1
18 changed files with 530 additions and 42 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;