路由守卫判断meta中是否有值
时间:2020-05-08 13:53:31
收藏:0
阅读:100
to.matched.some(record => record.meta.requiresAuth);
路由守卫
看下 es6的 some方法。 这里的意思是,to.matched 的数组中,如果在mate中有requiresAuth 那么就返回true,否则会返回false;
原文:https://www.cnblogs.com/ygyy/p/12849618.html
评论(0)