添加导航守卫
This commit is contained in:
parent
025e2bbcee
commit
ceed95eea8
@ -330,4 +330,11 @@ const router = createRouter({
|
||||
routes,
|
||||
});
|
||||
|
||||
router.beforeEach((to, from,next) => {
|
||||
// ...
|
||||
// 返回 false 以取消导航
|
||||
//console.log(to,from);
|
||||
|
||||
next()
|
||||
})
|
||||
export default router;
|
||||
|
Loading…
Reference in New Issue
Block a user