解决菜单缓存的bug

This commit is contained in:
季圣华
2021-09-02 22:24:01 +08:00
parent 11040f6a83
commit 204bf7e330
6 changed files with 79 additions and 71 deletions

View File

@@ -113,6 +113,11 @@ function generateChildRouters (data) {
if (isURL(URL)) {
item.url = URL;
}
let componentName =''
if(item.component) {
let index = item.component.lastIndexOf("\/");
componentName = item.component.substring(index + 1, item.component.length);
}
let menu = {
path: item.url,
name: item.text,
@@ -122,8 +127,9 @@ function generateChildRouters (data) {
title: item.text,
icon: item.icon,
url: item.url,
// permissionList:"",
// keepAlive:"",
componentName:componentName,
keepAlive: true
// permissionList:""
}
}
if (item.children && item.children.length > 0) {