ruoyi-plus-vben5/apps/antd-view/src/router/routes/builtin.ts

78 lines
1.8 KiB
TypeScript
Raw Normal View History

2024-05-19 21:20:42 +08:00
import type { RouteRecordRaw } from 'vue-router';
2024-05-21 22:42:25 +08:00
import { AuthPageLayout } from '@/layouts';
2024-05-19 21:20:42 +08:00
import { Fallback } from '@vben/common-ui';
/** 静态路由列表,访问这些页面可以不需要权限 */
const builtinRoutes: RouteRecordRaw[] = [
{
component: AuthPageLayout,
meta: {
title: 'Authentication',
},
name: 'Authentication',
path: '/auth',
children: [
{
name: 'Login',
path: 'login',
component: () => import('@/views/authentication/login.vue'),
meta: {
ignoreAccess: true,
title: 'Login',
},
},
{
name: 'CodeLogin',
path: 'code-login',
component: () => import('@/views/authentication/code-login.vue'),
meta: {
ignoreAccess: true,
title: 'CodeLogin',
},
},
{
name: 'QrCodeLogin',
path: 'qrcode-login',
component: () => import('@/views/authentication/qrcode-login.vue'),
meta: {
ignoreAccess: true,
title: 'QrCodeLogin',
},
},
{
name: 'ForgetPassword',
path: 'forget-password',
component: () => import('@/views/authentication/forget-password.vue'),
meta: {
ignoreAccess: true,
title: 'ForgetPassword',
},
},
{
name: 'Register',
path: 'register',
component: () => import('@/views/authentication/register.vue'),
meta: {
ignoreAccess: true,
title: 'Register',
},
},
],
},
// 错误页
{
component: Fallback,
meta: {
hideInBreadcrumb: true,
hideInMenu: true,
hideInTab: true,
title: 'Fallback',
},
name: 'Fallback',
path: '/:path(.*)*',
},
];
export { builtinRoutes };