index.ts
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types';
import { DEFAULT_LAYOUT_COMPONENT, PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '../constant';
import { genRouteModule } from '/@/utils/helper/routeHelper';
import LoginRoute from './modules/sys';
// demo
import exceptionDemo from './modules/demo/exception';
import dashboardDemo from './modules/demo/dashboard';
import iframeDemo from './modules/demo/iframe';
import compDemo from './modules/demo/comp';
import permissionDemo from './modules/demo/permission';
import featDemo from './modules/demo/feat';
const routeModuleList: AppRouteModule[] = [
exceptionDemo,
dashboardDemo,
iframeDemo,
compDemo,
featDemo,
permissionDemo,
];
export const asyncRoutes = [
REDIRECT_ROUTE,
PAGE_NOT_FOUND_ROUTE,
...genRouteModule(routeModuleList),
];
// 主框架根路由
export const RootRoute: AppRouteRecordRaw = {
path: '/',
name: 'Root',
component: DEFAULT_LAYOUT_COMPONENT,
redirect: '/dashboard',
meta: {
title: 'Root',
},
children: [],
};
// 基础路由 不用权限
export const basicRoutes = [LoginRoute, RootRoute];