Replace async IIFE with onMounted for page initialization (S7785)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 08:47:34 +08:00
co-authored by Claude Opus 4.6
parent e9e588385b
commit bbca475bbe
5 changed files with 13 additions and 25 deletions
+3 -4
View File
@@ -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");