Commit 9d6cc22d by Netfan Committed by GitHub

fix: missing route data in guard, fixed: #4108 (#4115)

1 parent 7a9ad7de
......@@ -115,10 +115,10 @@ function setupAccessGuard(router: Router) {
// 保存菜单信息和路由信息
accessStore.setAccessMenus(accessibleMenus);
accessStore.setAccessRoutes(accessibleRoutes);
const redirectPath = (from.query.redirect ?? to.path) as string;
const redirectPath = (from.query.redirect ?? to.fullPath) as string;
return {
path: decodeURIComponent(redirectPath),
...router.resolve(decodeURIComponent(redirectPath)),
replace: true,
};
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!