Vue-router路由判断页面未登录跳转到登录页面的实例 如下所示:router.beforeEach((to,from,next)=>{if(to.matched.some(record=>record.meta.requireAuth)){//判断该 未登录跳转到登陆页面