| | |
| | | if (path !== undefined && path.lastIndexOf("/") > 0 && hideList.indexOf(path) === -1) {
|
| | | const tmpPath = path.substring(1, path.length);
|
| | | activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/"));
|
| | | appStore.toggleSideBarHide(false);
|
| | | if (!route.meta.link) {
|
| | | appStore.toggleSideBarHide(false);
|
| | | }
|
| | | } else if(!route.children) {
|
| | | activePath = path;
|
| | | appStore.toggleSideBarHide(true);
|
| | |
| | | window.open(key, "_blank");
|
| | | } else if (!route || !route.children) {
|
| | | // 没有子路由路径内部打开
|
| | | router.push({ path: key });
|
| | | const routeMenu = childrenMenus.value.find(item => item.path === key);
|
| | | if (routeMenu && routeMenu.query) {
|
| | | let query = JSON.parse(routeMenu.query);
|
| | | router.push({ path: key, query: query });
|
| | | } else {
|
| | | router.push({ path: key });
|
| | | }
|
| | | appStore.toggleSideBarHide(true);
|
| | | } else {
|
| | | // 显示左侧联动菜单
|
| | |
| | | }
|
| | | if(routes.length > 0) {
|
| | | permissionStore.setSidebarRouters(routes);
|
| | | } else {
|
| | | appStore.toggleSideBarHide(true);
|
| | | }
|
| | | return routes;
|
| | | }
|