feat(projects): 新增项目、执行、任务等功能
This commit is contained in:
@@ -153,7 +153,12 @@ export function getCacheRouteNames(routes: RouteRecordRaw[]) {
|
||||
const cacheNames: LastLevelRouteKey[] = [];
|
||||
|
||||
routes.forEach(route => {
|
||||
// only get last two level route, which has component
|
||||
// Check first-level routes (routes with component but no children)
|
||||
if (route.component && route.meta?.keepAlive && !route.children?.length) {
|
||||
cacheNames.push(route.name as LastLevelRouteKey);
|
||||
}
|
||||
|
||||
// Check second-level routes
|
||||
route.children?.forEach(child => {
|
||||
if (child.component && child.meta?.keepAlive) {
|
||||
cacheNames.push(child.name as LastLevelRouteKey);
|
||||
|
||||
Reference in New Issue
Block a user