diff --git a/src/layout/components/Sidebar/Link.vue b/src/layout/components/Sidebar/Link.vue index 8ad5f9a..d212b2a 100644 --- a/src/layout/components/Sidebar/Link.vue +++ b/src/layout/components/Sidebar/Link.vue @@ -20,21 +20,21 @@ export default { }, type() { - // if (this.isExternal) { - // return 'a' - // } + if (this.isExternal) { + return 'a' + } return 'router-link' } }, methods: { linkProps(to) { - // if (this.isExternal) { - // return { - // href: to, - // target: '_blank', - // rel: 'noopener' - // } - // } + if (this.isExternal) { + return { + href: to, + target: '_blank', + rel: 'noopener' + } + } return { to: to } diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index d18d626..aea5cc9 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -103,20 +103,16 @@ } return true } - console.log("this.onlyOneChild", this.onlyOneChild) return false }, resolvePath(routePath) { - if (isExternal(routePath)) { - console.log("path",routePath) + if (isExternal(routePath)) { return routePath } - if (isExternal(this.basePath)) { - console.log("basePath",this.basePath) + if (isExternal(this.basePath)) { return this.basePath - } - console.log("resolve",path.resolve(this.basePath, routePath)) + } return path.resolve(this.basePath, routePath) } } diff --git a/src/router/index.js b/src/router/index.js index 0e0d57a..5d7f7b8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -71,7 +71,20 @@ export const constantRoutes = [{ } }], hidden: true - }, + }, + // { + // path: '/record/menu_10', + // component: Layout, + // children: [{ + // path: '/record/menu_10', + // component: () => import('@/views/record/index'), + // name: '搜索', + // meta: { + // title: '搜索' + // } + // }], + // hidden: true + // }, { path: '/', diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 232c00e..3859c95 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -125,8 +125,7 @@ export function generaMenu(routes, data) { children: [{ path: "", name: 'menu_' + item.id, - // component: (item.url.includes('#')||item.path == '') ? Layout : loadView(item.url), - component: Layout, + component: (item.url.includes('#')||item.path == '') ? Layout : loadView(item.url), meta: { title: item.name, id: item.id,