From ba2cd03ba0c6370acaf4a987d7c062eb41765690 Mon Sep 17 00:00:00 2001 From: pzzyf <2279948211@qq.com> Date: Thu, 24 Oct 2024 22:22:38 +0800 Subject: [PATCH] fix: path '/auth' is blank page --- apps/web-antd/src/router/routes/core.ts | 3 ++- apps/web-ele/src/router/routes/core.ts | 3 ++- apps/web-naive/src/router/routes/core.ts | 3 ++- playground/src/router/routes/core.ts | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/router/routes/core.ts b/apps/web-antd/src/router/routes/core.ts index 059fca62484..fe030a9a239 100644 --- a/apps/web-antd/src/router/routes/core.ts +++ b/apps/web-antd/src/router/routes/core.ts @@ -1,6 +1,6 @@ import type { RouteRecordRaw } from 'vue-router'; -import { DEFAULT_HOME_PATH } from '@vben/constants'; +import { DEFAULT_HOME_PATH, LOGIN_PATH } from '@vben/constants'; import { AuthPageLayout } from '#/layouts'; import { $t } from '#/locales'; @@ -37,6 +37,7 @@ const coreRoutes: RouteRecordRaw[] = [ }, name: 'Authentication', path: '/auth', + redirect: LOGIN_PATH, children: [ { name: 'Login', diff --git a/apps/web-ele/src/router/routes/core.ts b/apps/web-ele/src/router/routes/core.ts index 059fca62484..fe030a9a239 100644 --- a/apps/web-ele/src/router/routes/core.ts +++ b/apps/web-ele/src/router/routes/core.ts @@ -1,6 +1,6 @@ import type { RouteRecordRaw } from 'vue-router'; -import { DEFAULT_HOME_PATH } from '@vben/constants'; +import { DEFAULT_HOME_PATH, LOGIN_PATH } from '@vben/constants'; import { AuthPageLayout } from '#/layouts'; import { $t } from '#/locales'; @@ -37,6 +37,7 @@ const coreRoutes: RouteRecordRaw[] = [ }, name: 'Authentication', path: '/auth', + redirect: LOGIN_PATH, children: [ { name: 'Login', diff --git a/apps/web-naive/src/router/routes/core.ts b/apps/web-naive/src/router/routes/core.ts index 059fca62484..fe030a9a239 100644 --- a/apps/web-naive/src/router/routes/core.ts +++ b/apps/web-naive/src/router/routes/core.ts @@ -1,6 +1,6 @@ import type { RouteRecordRaw } from 'vue-router'; -import { DEFAULT_HOME_PATH } from '@vben/constants'; +import { DEFAULT_HOME_PATH, LOGIN_PATH } from '@vben/constants'; import { AuthPageLayout } from '#/layouts'; import { $t } from '#/locales'; @@ -37,6 +37,7 @@ const coreRoutes: RouteRecordRaw[] = [ }, name: 'Authentication', path: '/auth', + redirect: LOGIN_PATH, children: [ { name: 'Login', diff --git a/playground/src/router/routes/core.ts b/playground/src/router/routes/core.ts index 059fca62484..fe030a9a239 100644 --- a/playground/src/router/routes/core.ts +++ b/playground/src/router/routes/core.ts @@ -1,6 +1,6 @@ import type { RouteRecordRaw } from 'vue-router'; -import { DEFAULT_HOME_PATH } from '@vben/constants'; +import { DEFAULT_HOME_PATH, LOGIN_PATH } from '@vben/constants'; import { AuthPageLayout } from '#/layouts'; import { $t } from '#/locales'; @@ -37,6 +37,7 @@ const coreRoutes: RouteRecordRaw[] = [ }, name: 'Authentication', path: '/auth', + redirect: LOGIN_PATH, children: [ { name: 'Login',