feat: 优化前端代码

This commit is contained in:
JaguarJack
2023-04-17 16:48:16 +08:00
parent 521f32dce0
commit dc0c86fcc2
3 changed files with 4 additions and 3 deletions

View File

@@ -38,7 +38,8 @@ const guard = (router: Router) => {
const permissionStore = usePermissionsStore()
// 动态路由挂载
const asyncRoutes = permissionStore.getAsyncMenusFrom(toRaw(userStore.getPermissions))
asyncRoutes.forEach((route: Menu) => {
console.log(asyncRoutes)
asyncRoutes.forEach((route: Menu) => {
router.addRoute(route as unknown as RouteRecordRaw)
})
// 在动态路由之后挂载匹配 404 路由