We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
4.0.0-beta.7
https://codesandbox.io/s/vue-router-next-beforerouteupdate-qpclb
beforeRouteLeave
beforeRouteEnter
beforeRouteUpdate
router-link
1
2
Home
The text was updated successfully, but these errors were encountered:
When you have routes like this
routes: [ { path: '/', component: Foo }, { path: '/app/:matchAll(.*)', component: Foo }, ],
and Component Foo registers beforeRouteLeave, beforeRouteEnter and beforeRouteUpdate like this
Foo
beforeRouteUpdate(to, from, next) { console.log('update', to.path) next() },
/
enter
/app/1
leave
/app/2
update
Sorry, something went wrong.
fix(view): save reused instances in records
1664c18
Close #444
I forgot to say a workaround is to key the router-view:
key
<router-view :key="$route.path" />
e1f62ff
@posva <router-view :key="$route.path" /> This seems to make keepAlive invalid
Successfully merging a pull request may close this issue.
Version
4.0.0-beta.7
Reproduction link
https://codesandbox.io/s/vue-router-next-beforerouteupdate-qpclb
Steps to reproduce
beforeRouteLeave
,beforeRouteEnter
andbeforeRouteUpdate
router-link
, you would not receive all navigation eventWhat is expected?
1
, shows "leave /app/1" and "enter /app/1"2
, shows "update /app/2"Home
, shows "leave /" and "enter /"What is actually happening?
1
, shows "leave /app/1" and "enter /app/1"2
, nothing showsHome
, shows "enter /"The text was updated successfully, but these errors were encountered: