소스 검색

feat: use the not-found component instead of the invalid route component in the backend mode (#5871)

* 后端菜单模式下,使用not-found组件代替无效的路由组件
Netfan 5 달 전
부모
커밋
b0ad08dbbc
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      packages/utils/src/helpers/generate-routes-backend.ts

+ 1 - 0
packages/utils/src/helpers/generate-routes-backend.ts

@@ -63,6 +63,7 @@ function convertRoutes(
         route.component = pageMap[pageKey];
       } else {
         console.error(`route component is invalid: ${pageKey}`, route);
+        route.component = pageMap['/_core/fallback/not-found.vue'];
       }
     }