Replace async IIFE with onMounted for page initialization (S7785)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -146,7 +146,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, watch, onBeforeMount, onBeforeUnmount } from "vue";
|
||||
import { ref, computed, watch, onMounted, onBeforeMount, onBeforeUnmount } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useLoadingStore } from "@/stores/loading";
|
||||
@@ -578,8 +578,7 @@ function setActivityBgImage(mapData) {
|
||||
}
|
||||
}
|
||||
|
||||
// Created logic
|
||||
(async () => {
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const routeParams = route.params;
|
||||
const file = route.meta.file;
|
||||
@@ -635,7 +634,7 @@ function setActivityBgImage(mapData) {
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
})();
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
emitter.off("saveModal");
|
||||
|
||||
Reference in New Issue
Block a user