fix(router): 修复动态路由加载和错误处理机制
- 将动态路由添加到路由器配置中 - 添加路由获取失败时的错误处理和404页面跳转 - 优化路由加载失败时的日志记录和错误提示 - 修复登出后的重定向路径为登录页面 - 统一错误消息显示格式
This commit is contained in:
@@ -456,7 +456,7 @@ export const dynamicRoutes = [
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: constantRoutes,
|
||||
routes: [...constantRoutes, ...dynamicRoutes],
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
if (savedPosition) {
|
||||
return savedPosition
|
||||
|
||||
Reference in New Issue
Block a user