Skip to content

Commit 5401689

Browse files
committed
refine code
1 parent 04261f7 commit 5401689

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ router.beforeEach((to, from, next) => {
5353
const roles = res.data.role;
5454
store.dispatch('GenerateRoutes', { roles }).then(() => { // 生成可访问的路由表
5555
router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表
56-
next(Object.assign({}, to)); // hack方法 确保addRoutes已完成
56+
next({ ...to }); // hack方法 确保addRoutes已完成
5757
})
5858
})
5959
} else {

0 commit comments

Comments
 (0)