diff --git a/src/router/index.js b/src/router/index.js index e5011253..2a276506 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -109,8 +109,15 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) { // eslint-disable-next-line let URL = (menuList[i].url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量 if (isURL(URL)) { - route['path'] = route['name'] = `i-${menuList[i].id}` + if (menuList[i].menuCode.indexOf('newTab-') === 0) { + // 新建标签页打开链接 + route['path'] = menuList[i].url + route['name'] = `i-${menuList[i].id}` + } else { + route['path'] = route['name'] = `i-${menuList[i].id}` + } route['meta']['iframeURL'] = URL + } else { URL = URL.replace(/^\//, '').replace(/_/g, '-') route['path'] = route['name'] = URL.replace(/\//g, '-') diff --git a/src/views/main-sidebar-sub-menu.vue b/src/views/main-sidebar-sub-menu.vue index 0a2caf33..332e8535 100644 --- a/src/views/main-sidebar-sub-menu.vue +++ b/src/views/main-sidebar-sub-menu.vue @@ -16,6 +16,7 @@