mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix:路由处理,CSS处理,样式处理,全局变量处理
This commit is contained in:
+47
-19
@@ -1,42 +1,70 @@
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
import type { AppRouteRecordRaw } from '@/router/types';
|
||||
import { ErrorPage, RedirectName, Layout } from '@/router/constant';
|
||||
import { ErrorPage404, ErrorPage403, ErrorPage500, Layout } from '@/router/constant';
|
||||
import { PageEnum } from '@/enums/pageEnum'
|
||||
|
||||
|
||||
export const LoginRoute: RouteRecordRaw = {
|
||||
path: '/login',
|
||||
name: 'Login',
|
||||
component: () => import('@/views/login/index.vue'),
|
||||
meta: {
|
||||
title: '登录',
|
||||
},
|
||||
};
|
||||
|
||||
export const HttpErrorPage: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/error/404',
|
||||
name: PageEnum.ERROR_PAGE_NAME_404,
|
||||
component: ErrorPage404,
|
||||
meta: {
|
||||
title: PageEnum.ERROR_PAGE_NAME_404,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/error/403',
|
||||
name: PageEnum.ERROR_PAGE_NAME_403,
|
||||
component: ErrorPage403,
|
||||
meta: {
|
||||
title: PageEnum.ERROR_PAGE_NAME_403,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/error/500',
|
||||
name: PageEnum.ERROR_PAGE_NAME_500,
|
||||
component: ErrorPage500,
|
||||
meta: {
|
||||
title: PageEnum.ERROR_PAGE_NAME_500,
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
// 404 on a page
|
||||
export const ErrorPageRoute: AppRouteRecordRaw = {
|
||||
path: '/:path(.*)*',
|
||||
name: 'ErrorPage',
|
||||
component: Layout,
|
||||
component: ErrorPage404,
|
||||
meta: {
|
||||
title: 'ErrorPage',
|
||||
title: PageEnum.ERROR_PAGE_NAME_404,
|
||||
hideBreadcrumb: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/:path(.*)*',
|
||||
name: 'ErrorPageSon',
|
||||
component: ErrorPage,
|
||||
meta: {
|
||||
title: 'ErrorPage',
|
||||
hideBreadcrumb: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
};
|
||||
|
||||
export const RedirectRoute: AppRouteRecordRaw = {
|
||||
path: '/redirect',
|
||||
name: RedirectName,
|
||||
name: PageEnum.REDIRECT_NAME,
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: RedirectName,
|
||||
title: PageEnum.REDIRECT_NAME,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
name: RedirectName,
|
||||
name: PageEnum.REDIRECT_NAME,
|
||||
component: () => import('@/views/redirect/index.vue'),
|
||||
meta: {
|
||||
title: RedirectName,
|
||||
title: PageEnum.REDIRECT_NAME,
|
||||
hideBreadcrumb: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user