diff --git a/src/router/index.ts b/src/router/index.ts index 03dd41e..7dd8d39 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -330,4 +330,11 @@ const router = createRouter({ routes, }); +router.beforeEach((to, from,next) => { + // ... + // 返回 false 以取消导航 + //console.log(to,from); + + next() +}) export default router;