!785 fix(router): 更新重置路由的白名单名称

Merge pull request !785 from MasterTang/fix/router-bug
This commit is contained in:
芋道源码 2025-06-22 07:08:13 +00:00 committed by Gitee
commit 168157d229
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -12,7 +12,7 @@ const router = createRouter({
}) })
export const resetRouter = (): void => { export const resetRouter = (): void => {
const resetWhiteNameList = ['Redirect', 'Login', 'NoFind', 'Root'] const resetWhiteNameList = ['Redirect', 'Login', 'NoFound', 'Home']
router.getRoutes().forEach((route) => { router.getRoutes().forEach((route) => {
const { name } = route const { name } = route
if (name && !resetWhiteNameList.includes(name as string)) { if (name && !resetWhiteNameList.includes(name as string)) {