From 0c0799bfa34e87b614ef1a7c7cc5b9a82860d3fc Mon Sep 17 00:00:00 2001 From: zhaoxiao Date: Thu, 9 Mar 2023 10:13:19 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=20ESLint=E3=80=91utils/util?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/utils/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jero-web/src/utils/util.js b/jero-web/src/utils/util.js index 3e556983..da2cbbbf 100644 --- a/jero-web/src/utils/util.js +++ b/jero-web/src/utils/util.js @@ -109,7 +109,7 @@ function generateChildRouters (data) { } else { component = 'views/' + item.component } - const URL = (item.meta.url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量 + const URL = (item.meta.url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => evil(s2)) // URL支持{{ window.xxx }}占位符变量 if (isURL(URL) || (item.meta.url && item.meta.url.indexOf('{{') === 0)) { item.meta.url = URL } @@ -601,4 +601,4 @@ export function getReportPrintUrl (url, id, open) { export function evil (fn) { const Fn = Function // 一个变量指向Function,防止有些前端编译工具报错 return new Fn('return ' + fn)() -} \ No newline at end of file +}