73 lines
1.5 KiB
TypeScript
73 lines
1.5 KiB
TypeScript
import type { AppRouteRecordRaw } from '@/router/types';
|
|
import { ErrorPage, RedirectName, Layout } from '@/router/constant';
|
|
import { ProjectOutlined } from '@vicons/antd';
|
|
import { renderIcon } from '@/utils/index';
|
|
|
|
// 404 on a page
|
|
export const ErrorPageRoute: AppRouteRecordRaw = {
|
|
path: '/:path(.*)*',
|
|
name: 'ErrorPageParent',
|
|
component: Layout,
|
|
meta: {
|
|
title: 'ErrorPage',
|
|
hideBreadcrumb: true,
|
|
},
|
|
children: [
|
|
{
|
|
path: '/:path(.*)*',
|
|
name: 'ErrorPage',
|
|
component: ErrorPage,
|
|
meta: {
|
|
title: 'ErrorPage',
|
|
hideBreadcrumb: true,
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
|
|
export const AboutPageRoute: AppRouteRecordRaw ={
|
|
path: '/about',
|
|
name: 'about',
|
|
component: Layout,
|
|
meta: {
|
|
sort: 12,
|
|
isRoot: true,
|
|
activeMenu: 'about_index',
|
|
alwaysShow: true,
|
|
icon: renderIcon(ProjectOutlined),
|
|
},
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
name: `about_index`,
|
|
meta: {
|
|
title: '关于项目',
|
|
activeMenu: 'about_index',
|
|
},
|
|
component: () => import('@/views/about/index.vue'),
|
|
},
|
|
],
|
|
};
|
|
|
|
export const RedirectRoute: AppRouteRecordRaw = {
|
|
path: '/redirect',
|
|
name: `${RedirectName}Parent`,
|
|
component: Layout,
|
|
meta: {
|
|
title: RedirectName,
|
|
hideBreadcrumb: true,
|
|
},
|
|
children: [
|
|
{
|
|
path: '/redirect/:path(.*)',
|
|
name: RedirectName,
|
|
component: () => import('@/views/redirect/index.vue'),
|
|
meta: {
|
|
title: RedirectName,
|
|
hideBreadcrumb: true,
|
|
},
|
|
},
|
|
],
|
|
};
|