mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-10-15 14:23:41 +08:00
refactor(projects): 优化路由声明,添加路由模块导入,规范路相关文件夹
This commit is contained in:
@@ -1,21 +1,27 @@
|
||||
import type { CustomRoute } from '@/interface';
|
||||
import { setRouterCacheName, setSingleRoute } from '@/utils';
|
||||
import { setSingleRoute } from '@/utils';
|
||||
import { BasicLayout } from '@/layouts';
|
||||
import About from '@/views/about/index.vue';
|
||||
import { getRouteConst } from '../const';
|
||||
import { getRouteConst, routeName } from '../constant';
|
||||
|
||||
const { name, path, title } = getRouteConst('about');
|
||||
setRouterCacheName(About, name);
|
||||
|
||||
const ABOUT: CustomRoute = setSingleRoute(BasicLayout, {
|
||||
name,
|
||||
path,
|
||||
component: About,
|
||||
const ABOUT: CustomRoute = setSingleRoute({
|
||||
route: {
|
||||
name,
|
||||
path,
|
||||
component: About,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title,
|
||||
icon: 'fluent:book-information-24-regular'
|
||||
}
|
||||
},
|
||||
container: BasicLayout,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title,
|
||||
icon: 'fluent:book-information-24-regular'
|
||||
}
|
||||
order: 7
|
||||
},
|
||||
notFoundName: routeName('not-found')
|
||||
});
|
||||
|
||||
export default ABOUT;
|
||||
|
Reference in New Issue
Block a user