From eb0ddfcc1e698bc2df124ea362090c6da730c8bd Mon Sep 17 00:00:00 2001 From: Lightling Date: Wed, 10 Apr 2024 18:22:58 -0400 Subject: [PATCH] ensure same-template views refresh data after route change --- src/main.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.vue b/src/main.vue index a101dd9..cbb6ab5 100644 --- a/src/main.vue +++ b/src/main.vue @@ -22,6 +22,7 @@ let routeConfig = routeStore._routes[currentRoute.path] let rememberWarning = false const ready = ref(false) +const firstInit = ref(false) const acknowledged = ref(false) const storageId = ref('') const warning = ref({} as WarningModal) @@ -83,7 +84,7 @@ const refresh = async () => { top: 0, }) - ready.value = true + setTimeout(() => ready.value = true) } const onAcknowledgedWarning = () => { @@ -106,6 +107,7 @@ const handlePageClosed = async (scriptUrl?: string) => { onMounted(async () => { await refresh() + firstInit.value = true determineGlobalStylesheets() router.afterEach(async (to, from) => { const oldUrl = routeConfig.scriptUrl @@ -118,7 +120,7 @@ onMounted(async () => {