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
^3.4.29
https://stackblitz.com/edit/vitejs-vite-otefqw
click switch(切换) button, check console , then you'll see twice output
call onMounted once
nested router-view width nested keepalive will cause twice onMounted hook call in inner nested component. 目的是想让 keep-alive 缓存嵌套路由的所有组件,结果发现二层嵌套中 keep-alive 包的组件在首次切换的时候会调用两次 onMounted
win10 chrome@latest
No response
The text was updated successfully, but these errors were encountered:
minimal reproduction with playground
Sorry, something went wrong.
similar to #7280 duplicate of #3937 For more detail see vuejs/router#626
Successfully merging a pull request may close this issue.
Vue version
^3.4.29
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-otefqw
Steps to reproduce
click switch(切换) button, check console , then you'll see twice output
What is expected?
call onMounted once
What is actually happening?
nested router-view width nested keepalive will cause twice onMounted hook call in inner nested component.
目的是想让 keep-alive 缓存嵌套路由的所有组件,结果发现二层嵌套中 keep-alive 包的组件在首次切换的时候会调用两次 onMounted
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: