1. Project requirement is detail page – other, other return details page need to cache details page data

From the Internet to see a lot of examples are not good, they tried to do next

2. Failure examples

In app.vue, vif is used to determine whether the route has cache. In the route component, route navigator is used to determine beforeRouteLeave is used to determine which page needs to be returned to cache. Keepalive is true to return details from other pagesCopy the code

3. Personal summary: Cache should be true when you enter the page and it should also be true when you leave, so that you can return from other pages to have a cached page, and I changed the method in app.vue to