Add emitter.off cleanup in onBeforeUnmount for 10 components
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
* start/end activity input.
|
||||
*/
|
||||
|
||||
import { ref, computed, watch } from "vue";
|
||||
import { ref, computed, watch, onBeforeUnmount } from "vue";
|
||||
import { useConformanceInputStore } from "@/stores/conformanceInput";
|
||||
import { sortNumEngZhtw } from "@/module/sortNumEngZhtw.js";
|
||||
import emitter from "@/utils/emitter";
|
||||
@@ -109,4 +109,8 @@ emitter.on("reset", (data) => {
|
||||
selectedRadio.value = data;
|
||||
});
|
||||
setGlobalActivityRadioDataState();
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
emitter.off("reset");
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user