update src/layout/index.vue.

菜单一级 对应的二级菜单为空时,理论上,是要直接打开一级菜单的。
这样修改后,后端就不用处理了。
因为我后端菜单递归处理时,没想好怎么修改。
This commit is contained in:
贾二小 2021-12-05 10:09:17 +00:00 committed by Gitee
parent 2105ab3da7
commit c36ccb9e2b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@
showMenu(route) {
this.pmenu = route;
this.nextMenu = this.filterUrl(route.children);
if(!route.children && route.component){
if((!route.children || route.children.length == 0) && route.component){
this.$router.push({path: route.path})
}
},