mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-18 04:02:02 +08:00
【同步】前端项目源码
【修复】工作流兼容问题
This commit is contained in:
17
frontend/apps/allin-ssl/src/router/index.tsx
Normal file
17
frontend/apps/allin-ssl/src/router/index.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { createWebHistory, useCreateRouter } from '@baota/router' // 框架路由
|
||||
import { createRoutes } from './import' // 自动导入路由配置
|
||||
import useRouterEach from './each' // 全局路由守卫
|
||||
|
||||
// 获取路由
|
||||
const { routeGroup, routes } = createRoutes() // 获取路由配置
|
||||
|
||||
// 创建路由
|
||||
const router = useCreateRouter({
|
||||
routes: routeGroup,
|
||||
history: createWebHistory(),
|
||||
})
|
||||
|
||||
// 全局路由守卫
|
||||
useRouterEach(router)
|
||||
|
||||
export { router, routes }
|
||||
Reference in New Issue
Block a user