From 16a21e084ea0efaacd80f78d3d82eeb49979bb5a Mon Sep 17 00:00:00 2001 From: simple <2424585654@qq.com> Date: Mon, 12 Aug 2024 20:36:20 +0000 Subject: [PATCH] =?UTF-8?q?!2=20fix:=20=E6=AD=A3=E5=88=99=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=20=E4=BB=A3=E7=A0=81=E4=B8=AD=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E4=BD=BF=E7=94=A8=E6=8D=95=E8=8E=B7=E7=BB=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20Merge=20pull=20request=20!2=20from=20simple/div?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/router/access.ts | 2 +- internal/lint-configs/eslint-config/src/custom-config.ts | 8 -------- packages/effects/access/src/accessible.ts | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/apps/web-antd/src/router/access.ts b/apps/web-antd/src/router/access.ts index adee0d7f..e9c5beb0 100644 --- a/apps/web-antd/src/router/access.ts +++ b/apps/web-antd/src/router/access.ts @@ -121,7 +121,7 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) { // 外链: http开头 & 组件为Layout || ParentView // 正则判断是否为http://或者https://开头 if ( - /^http(s)?:\/\//.test(menu.path) && + /^https?:\/\//.test(menu.path) && (menu.component === 'Layout' || menu.component === 'ParentView') ) { menu.component = 'Link'; diff --git a/internal/lint-configs/eslint-config/src/custom-config.ts b/internal/lint-configs/eslint-config/src/custom-config.ts index f9410062..5e9d05d9 100644 --- a/internal/lint-configs/eslint-config/src/custom-config.ts +++ b/internal/lint-configs/eslint-config/src/custom-config.ts @@ -58,7 +58,6 @@ const customConfig: Linter.Config[] = [ }, ], 'perfectionist/sort-interfaces': 'off', - 'regexp/no-unused-capturing-group': 'off', }, }, { @@ -99,13 +98,6 @@ const customConfig: Linter.Config[] = [ ], }, }, - { - files: ['packages/effects/access/**/**'], - ignores: restrictedImportIgnores, - rules: { - 'regexp/no-unused-capturing-group': 'off', - }, - }, { // 不能引入@vben/*里面的包 files: [ diff --git a/packages/effects/access/src/accessible.ts b/packages/effects/access/src/accessible.ts index 46d6e53a..f250c3b4 100644 --- a/packages/effects/access/src/accessible.ts +++ b/packages/effects/access/src/accessible.ts @@ -27,7 +27,7 @@ async function generateAccessible( /** * 外链不应该被添加到路由 由menu处理 */ - if (/^http(s)?:\/\//.test(route.path)) { + if (/^https?:\/\//.test(route.path)) { return; } router.addRoute(route);