fix: 修复开启 CachingAsyncRoutes 后,存入本地存储的动态路由改变造成刷新页面空白的问题

This commit is contained in:
xiaoxian521 2022-12-04 16:20:10 +08:00
parent b14f41c8d7
commit b5839d6398

View File

@ -198,7 +198,7 @@ function initRouter() {
} else {
return new Promise(resolve => {
getAsyncRoutes().then(({ data }) => {
handleAsyncRoutes(data);
handleAsyncRoutes(cloneDeep(data));
storageSession.setItem(key, data);
resolve(router);
});
@ -207,7 +207,7 @@ function initRouter() {
} else {
return new Promise(resolve => {
getAsyncRoutes().then(({ data }) => {
handleAsyncRoutes(data);
handleAsyncRoutes(cloneDeep(data));
resolve(router);
});
});