After loading the nuxt.js list interface in pages, go to the details page and return to the previous page how to prevent the interface from reloading.

problem description

after the nuxt.js list interface is loaded in pages, go to the details page and return to the previous page how to prevent the interface from reloading

due to the rendering characteristics of nuxt.js server, there is neither keep-alive nor activated lifecycle. How to enter the details return list interface and return to the previous content and location after loading the list in pages

the current solution is to store the list in state when loading the list, and then determine whether to display the data in state or reload it when returning.

is there a better solution

May.30,2022

solved
data can only be saved through state and localstorage and then displayed or retrieved according to the actual situation

Menu