From 83c6381a4b8df41b71e4d5d8ecbc26421ab78dc6 Mon Sep 17 00:00:00 2001 From: chenghongxing <1126263215@qq.com> Date: Tue, 12 Jan 2021 11:47:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=E8=B7=AF=E7=94=B1=E4=B8=8D=E8=83=BD=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E6=8F=90=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B?= =?UTF-8?q?=20fix:=20the=20problem=20that=20it=20does=20not=20prompt=20cor?= =?UTF-8?q?rectly=20when=20loading=20routes;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/routerUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/routerUtil.js b/src/utils/routerUtil.js index 5d31ef2..037cb10 100644 --- a/src/utils/routerUtil.js +++ b/src/utils/routerUtil.js @@ -32,7 +32,7 @@ function parseRoutes(routesConfig, routerMap) { routesConfig.forEach(item => { // 获取注册在 routerMap 中的 router,初始化 routeCfg let router = undefined, routeCfg = {} - if (typeof item === 'string' && routerMap[item]) { + if (typeof item === 'string') { router = routerMap[item] routeCfg = {path: router.path || item, router: item} } else if (typeof item === 'object') {