30-vue-Cache routing component objects

Understand that by
  default, the routing component objects that do not switch will be dead and released, and will be recreated when they come back again.
  In order to improve the user experience, you can set the cache routing component object.
 

Function to
  save the page state of the user's last operation
 

In the code example
  , add <keep-alive> to <router-view>

<keep-alive>
	<router-view><router-view>
<keep-alive>

Guess you like

Origin blog.csdn.net/A_Bow/article/details/113870975