Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

开启路由同步时,切换子应用的tab(路由变化),刷新后,点击后退按钮,路由不变页面内容也不变 #223

Closed
expanding opened this issue Oct 17, 2022 · 2 comments

Comments

@expanding
Copy link

image

@yiludege
Copy link
Collaborator

刷新页面,history堆栈都清空了,前进后退必然没办法生效哦

@yiludege
Copy link
Collaborator

yiludege commented Dec 7, 2022

我的理解错误,history堆栈不会清空。

子应用运行在 iframe 内部,子应用发生跳转的时候即 iframe 跳转路由的时候会在浏览器里面添加一条记录,注意这条记录是和iframe 严格绑定的,当发生刷新后原来的 iframe 被销毁子应用渲染的时候又新建了一个 iframe,此时点击回退的话浏览器只会将上一条记录里面的 iframe 回退,但是那个 iframe 已经销毁了,所以没有办法回退了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants