diff --git a/jero-web/src/utils/util.js b/jero-web/src/utils/util.js index 43cb650b..23f06c77 100644 --- a/jero-web/src/utils/util.js +++ b/jero-web/src/utils/util.js @@ -84,7 +84,7 @@ export function formatDate(value, fmt) { // 生成首页路由 export function generateIndexRouter(data) { const redirectPath = findFirstRoute(data) -let indexRouter = [{ + let indexRouter = [{ path: '/', name: 'dashboard', //component: () => import('@/components/layouts/BasicLayout'), @@ -111,10 +111,9 @@ function generateChildRouters (data) { }else{ component = "views/"+item.component; } - // eslint-disable-next-line let URL = (item.meta.url|| '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量 - if (isURL(URL)) { + if (isURL(URL) || (item.meta.url && item.meta.url.indexOf("{{") == 0)) { item.meta.url = URL; }