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

返回时 是this.$router.location没有更新 #7

Open
callmesoul opened this issue Apr 28, 2019 · 1 comment
Open

返回时 是this.$router.location没有更新 #7

callmesoul opened this issue Apr 28, 2019 · 1 comment

Comments

@callmesoul
Copy link

a页面 this.$router.location=a;
->
a页面跳转b页面 this.$router.location=b;
->b后退上一页a页面 this.$router.location=b;

@imyelo
Copy link
Member

imyelo commented Apr 28, 2019

确实有问题,请先用 this.$route.fullPath / this.$route.path 代替

logs:

// page a
this.$route: {path: "/pages/a", query: {…}, fullPath: "/pages/a"}
this.$router: Router {_tabs: Array(0), location: "/pages/a"}

// navigate to page b
this.$route: {path: "/pages/b", query: {…}, fullPath: "/pages/b"}
this.$router: Router {_tabs: Array(0), location: "/pages/b"}

// back to page a
this.$route: {path: "/pages/a", query: {…}, fullPath: "/pages/a"}
this.$router: Router {_tabs: Array(0), location: "/pages/b"}

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