-
Notifications
You must be signed in to change notification settings - Fork 2.1k
在 router 中配置了 fallback: false 后,在 IE 9 下不停的刷新 #221
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
Comments
@JounQin 多谢回复,您的 Demo 确实没问题 我看了下,大概是在执行 |
我也遇到过类似的问题, 不过我是直接在safari(也好像是QQ浏览器, 有点记不得了), |
暴力解决: if (!(window.history && 'pushState' in window.history)) {
// 阻止调用store.replaceState,导致死循环的关键
window.__INITIAL_STATE__ = null;
// 直接跳转
window.history.pushState = function(state, title, url) {
location.href = url;
};
// 直接跳转
window.history.replaceState = function(state, title, url) {
location.href = url;
};
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
测试环境中只把 vue-router 版本升级到 2.7.0,其他代码都没改
本希望通过 fallback 选项把自动回滚到 hash 模式给禁用掉,从而实现在 IE 9 中点击链接能重新刷新页面。不知道是不是配置有问题?
The text was updated successfully, but these errors were encountered: