next/plugins/80.finish.ts

17 lines
295 B
TypeScript

export default defineNuxtPlugin({
name: "set finish",
setup(nuxt) {
console.log("setup start");
let loaded: Ref<boolean> = ref(false);
nuxt.hook("page:finish", (comp) => {
console.log("setup end");
loaded.value = true;
});
return {
provide: {
loaded,
},
};
},
});