build(projects): update tsconfig、eslintrc

This commit is contained in:
Soybean
2022-03-12 16:21:40 +08:00
parent 4093dcd6dc
commit 75de2b0604
131 changed files with 1174 additions and 1140 deletions

View File

@ -6,10 +6,10 @@ import type { RouteRecordRaw } from 'vue-router';
*/
export function getCacheRoutes(routes: RouteRecordRaw[]) {
const cacheNames: string[] = [];
routes.forEach(route => {
routes.forEach((route) => {
// 只需要获取二级路由的缓存的组件名
if (hasChildren(route)) {
route.children!.forEach(item => {
(route.children as RouteRecordRaw[]).forEach((item) => {
if (isKeepAlive(item)) {
cacheNames.push(item.name as string);
}