未验证 提交 9c4889f0 编写于 作者: L Lan 提交者: GitHub

fix(perm-guard): Fix the problem that the routing query is lost after refreshing the page (#941)

上级 59cf8605
......@@ -88,7 +88,8 @@ export function createPermissionGuard(router: Router) {
if (to.name === PAGE_NOT_FOUND_ROUTE.name) {
// 动态添加路由后,此处应当重定向到fullPath,否则会加载404页面内容
next({ path: to.fullPath, replace: true });
// fix: 添加query以免丢失
next({ path: to.fullPath, replace: true, query: to.query });
} else {
const redirectPath = (from.query.redirect || to.path) as string;
const redirect = decodeURIComponent(redirectPath);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册