diff --git a/plugins/80.finish.ts b/plugins/80.finish.ts index 4e543ef..178ac81 100644 --- a/plugins/80.finish.ts +++ b/plugins/80.finish.ts @@ -3,9 +3,17 @@ export default defineNuxtPlugin({ setup(nuxt) { console.log("setup start"); let loaded: Ref = ref(false); - nuxt.hook("page:finish", (comp) => { + nuxt.hook("app:beforeMount", (app) => { + loaded.value = false; + }); + nuxt.hook("page:start", (comp) => { + loaded.value = false; + // comp.$nuxt.$loaded = loaded; + }); + nuxt.hook("app:mounted", (comp) => { console.log("setup end"); - loaded.value = true; + loaded.value; + comp.$nuxt.$loaded.value = loaded.value = true; }); return { provide: {