-
Notifications
You must be signed in to change notification settings - Fork 32
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
多开相同的Page后,点返回,router.query不对 #15
Comments
希望作者能完成导航守卫的功能 |
碰到类似的问题,返回再进入不同id的相同页面组件,computed里的 |
其实挺好改的 增加了 const query = _$mp.page && _$mp.page.options; const parseRoute = ($mp) => {
const _$mp = $mp || {};
const path = _$mp.page && _$mp.page.route;
const query = _$mp.page && _$mp.page.options;
return {
path: `/${path}`,
params: {},
query,
hash: '',
fullPath: parseUrl({
path: `/${path}`,
query,
}),
name: path && path.replace(/\/(\w)/g, ($0, $1) => $1.toUpperCase())
};
}; |
请问这个问题有什么方法可以解决吗?我现在也遇到了,真坑。 |
1、将业务逻辑改成重新获取数据,而不是重复跳转到相同界面。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
打开页面 : pages/xxx?id=1
然后
打开页面 : pages/xxx?id=2
然后
返回
this.$route.query 里还是id = 2
另外 router 的 beforeEach 能否也考虑设计下?跳转登录的,没有这个比较蛋疼
The text was updated successfully, but these errors were encountered: