fix(projects): Fix homepage mount error under dynamic routing

This commit is contained in:
恕瑞玛的皇帝
2024-03-01 13:12:28 +08:00
parent 0123c37de2
commit 9cf2a513f7
2 changed files with 5 additions and 3 deletions

View File

@@ -100,9 +100,9 @@ export function getRouteIcons(route: App.Global.TabRoute) {
* Get default home tab
*
* @param router
* @param homeRouteName routeHome in useRouteStore
*/
export function getDefaultHomeTab(router: Router) {
const homeRouteName = import.meta.env.VITE_ROUTE_HOME;
export function getDefaultHomeTab(router: Router, homeRouteName: LastLevelRouteKey) {
const homeRoutePath = getRoutePath(homeRouteName);
const i18nLabel = $t(`route.${homeRouteName}`);