|
|
@ -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, '-') |
|
|
|