vue-router
$router.forward
$router.back
$router.go
缓存路由组件
作用:使不展示的路由组件仍然保持挂载,不在切换路由的时候被销魂
<keep-alive include='组件名'> <router-view></router-view> </keep-alive>
//缓存多个
<keep-alive :include="['组件名1','组件名2']"> <router-view></router-view> </keep-alive>