Add emitter.off cleanup in onBeforeUnmount for 10 components
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
* fields and bounded min/max validation.
|
||||
*/
|
||||
|
||||
import { ref, computed, watch, onMounted } from "vue";
|
||||
import { ref, computed, watch, onMounted, onBeforeUnmount } from "vue";
|
||||
import emitter from "@/utils/emitter";
|
||||
|
||||
const props = defineProps({
|
||||
@@ -397,6 +397,10 @@ emitter.on("reset", () => {
|
||||
createData();
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
emitter.off("reset");
|
||||
});
|
||||
|
||||
// mounted
|
||||
onMounted(() => {
|
||||
inputTypes.value = display.value.split("");
|
||||
|
||||
Reference in New Issue
Block a user