一、修改src目录下的permission.js文件
1、注释
//if (hasToken) { // if (to.path === '/login') { // // if is logged in, redirect to the home page // next({ path: '/' }) // NProgress.done() // } else { ....................... // } else { // // other pages that do not have permission to access are redirected to the login page. // next(`/login?redirect=${to.path}`) // NProgress.done() // } // } 2、原生静态菜单改为 next() 3、从后端动态获取菜单的方式改为 //去除权限 next() constaccessRoutes = awaitstore.dispatch('permission/generateRoutes') router.addRoutes(accessRoutes) 标签:vue,permission,next,done,template,去除,path,login,element From: https://www.cnblogs.com/robots2/p/17242503.html