fix(projects): Fix the logic of root route redirection to home

现在在静态路由下如果修改了home,进入/还是会重定向至/home,而不是用户定义的新home
This commit is contained in:
Azir 2024-03-01 09:51:09 +08:00 committed by GitHub
parent 418302a34b
commit fa354866ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,7 @@ import { transformElegantRoutesToVueRoutes } from '../elegant/transform';
export const ROOT_ROUTE: CustomRoute = { export const ROOT_ROUTE: CustomRoute = {
name: 'root', name: 'root',
path: '/', path: '/',
redirect: '/home', redirect: import.meta.env.VITE_ROUTE_HOME || '/home',
meta: { meta: {
title: 'root', title: 'root',
constant: true constant: true