You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.6 KiB
TypeScript

import localRoutes from './localRoutes';
import IRoutes from './IRoutes';
const routes: IRoutes[] = [
{
path: '/',
component: '../layouts',
routes: [
//示例
{
path: '/example',
title: '示例',
hidden: true,
routes: [
{
path: 'button',
title: 'Button - [按钮]',
component: './example/button',
},
{
path: 'card',
title: 'Card - [卡片]',
component: './example/card',
},
{
path: 'radio',
title: 'Radio - [单选]',
component: './example/radio',
},
{
path: 'table',
title: 'Table - [表格]',
component: './example/table',
},
{
path: 'tabs',
title: 'Tabs - [选项卡]',
component: './example/tabs',
},
{
path: 'tree',
title: 'Tree - [树]',
component: './example/tree',
},
],
},
//错误页
{
path: 'system',
title: '错误页面',
hidden: true,
routes: [
{
path: '404',
title: '404',
component: '../system/404',
},
{
path: '500',
title: '500',
component: '../system/500',
},
],
},
],
},
];
let _routes: IRoutes[] = [];
if (localRoutes.length > 0 && routes[0].routes) {
_routes = routes[0].routes.concat(localRoutes);
routes[0].routes = _routes;
}
export { IRoutes };
export default routes;