### 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 ```shell win10 chrome@latest ``` ### Any additional comments? _No response_