mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 16:46:19 +08:00
fix: when the form is destroyed, the form parameters still exist (#4834)
* fix: when the form is destroyed, the form parameters still exist * chore: update deps
This commit is contained in:
@@ -253,6 +253,7 @@ export class FormApi {
|
||||
}
|
||||
|
||||
unmount() {
|
||||
this.form?.resetForm?.();
|
||||
// this.state = null;
|
||||
this.isMounted = false;
|
||||
this.stateHandler.reset();
|
||||
|
@@ -11,6 +11,7 @@ import {
|
||||
computed,
|
||||
nextTick,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
toRaw,
|
||||
useSlots,
|
||||
useTemplateRef,
|
||||
@@ -256,6 +257,11 @@ onMounted(() => {
|
||||
props.api?.mount?.(gridRef.value, formApi);
|
||||
init();
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
formApi?.unmount?.();
|
||||
props.api?.unmount?.();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@@ -1 +1 @@
|
||||
@import '@vben-core/design/bem';
|
||||
@use '@vben-core/design/bem' as *;
|
||||
|
Reference in New Issue
Block a user