I\'m using vue-router with a series of components like tabs. Each is a tab and the space below is the . Two
I don't think you will be able to cache router-view using keep-alive. From the documentation of keep-alive:
keep-alive does not work with functional components because they do not have instances to be cached.
And router-view is a functional component, from the documentation:
The component is a functional component that renders the matched component for the given path.
To make this work, you need to have dynamic component inside keep-alive, like following: