From d8fb70628dfcf41b4fe9ef9759ef958fe9d1483d Mon Sep 17 00:00:00 2001 From: "DESKTOP-ELFHO53\\zqx" Date: Fri, 13 Sep 2024 13:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=8F=9C=E5=8D=95=E7=9A=84=E8=B7=AF=E7=94=B1=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E4=B8=BA=E9=93=BE=E6=8E=A5=E6=97=B6=E4=B8=8D=E5=B8=A6?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/routerHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/routerHelper.ts b/src/utils/routerHelper.ts index f292751a..6dcba9af 100644 --- a/src/utils/routerHelper.ts +++ b/src/utils/routerHelper.ts @@ -88,7 +88,7 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord // 2. 生成 data(AppRouteRecordRaw) // 路由地址转首字母大写驼峰,作为路由名称,适配keepAlive let data: AppRouteRecordRaw = { - path: route.path.indexOf('?') > -1 ? route.path.split('?')[0] : route.path, + path: route.path.indexOf('?') > -1 && !route.path.startsWith('http') ? route.path.split('?')[0] : route.path, name: route.componentName && route.componentName.length > 0 ? route.componentName