12 lines
232 B
TypeScript
12 lines
232 B
TypeScript
export default defineNuxtPlugin(() => {
|
|
const router = useRouter()
|
|
|
|
router.beforeEach((to, from) => {
|
|
const modalStore = useModalStore()
|
|
|
|
if (to.path !== from.path) {
|
|
modalStore.handleResetModalAll()
|
|
}
|
|
})
|
|
})
|