vue路由递归查找某路径
hasRoute(path, routeList) {
// console.log('path', path, routeList);
for (let i = 0; i < routeList.length; i++) {
if (routeList[i].path === path) {
return true;
}
if (routeList[i].children) {
let flag = this.hasRoute(path, routeList[i].children);
if (flag) {
return flag;
}
}
}
return false;
},