to.matched.some(record => record.meta.requiresAuth);
路由守卫
看下 es6的 some方法。 这里的意思是,to.matched 的数组中,如果在mate中有requiresAuth 那么就返回true,否则会返回false;
路由守卫判断meta中是否有值
原文:https://www.cnblogs.com/ygyy/p/12849618.html