视频教程中的笔记

缓存路由组件

  1. 作用:让不展示的路由组件保持挂载,不被销毁。

  2. 具体编码:

   <keep-alive include="News"> 
       <router-view></router-view>
   </keep-alive>