From 0670facae4c470e693e088616a78bafa5d36a9ff Mon Sep 17 00:00:00 2001 From: shizhong <124974919@qq.com> Date: Mon, 25 Sep 2023 15:08:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=A4=84=E7=90=86=E9=A1=B6?= =?UTF-8?q?=E7=BA=A7=E9=9D=9E=E7=9B=AE=E5=BD=95=E8=B7=AF=E7=94=B1=E7=9A=84?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=90=8D=E7=A7=B0=E9=80=BB=E8=BE=91=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/routerHelper.ts b/src/utils/routerHelper.ts index a6825653..d9fe42aa 100644 --- a/src/utils/routerHelper.ts +++ b/src/utils/routerHelper.ts @@ -93,7 +93,10 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord meta.alwaysShow = true const childrenData: AppRouteRecordRaw = { path: '', - name: toCamelCase(route.path, true), + name: + route.componentName && route.componentName.length > 0 + ? route.componentName + : toCamelCase(route.path, true), redirect: route.redirect, meta: meta }