fix: 路由父级的记录改为全局 修复点击选项卡X无法跳转到正确来源的bug
This commit is contained in:
@ -38,9 +38,12 @@ function createPageGuard(router: Router) {
|
||||
// Notify routing changes
|
||||
setRouteChange(to);
|
||||
const toPath = to.path;
|
||||
if (toPath.indexOf('views/secondDev') >= 0 || toPath.indexOf('/viewForm') >= 0) {
|
||||
if (/createFlow|approveFlow|createForm|viewForm/.test(toPath)) {
|
||||
// 记录从哪里来的 关闭页面的时候好跳回去
|
||||
localStorage.setItem('parentRoutePath', from.path);
|
||||
if(!window.fcd.routeBackMapping[to.path]){
|
||||
// tab切换也会触发路由守卫 所以只记录第一次的状态
|
||||
window.fcd.routeBackMapping[to.path] = from.path;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user