路由配置meta中设置了keepAlive: true
<keep-alive :include="cachedViews">
<router-view :key="key" />
</keep-alive>
输出cachedViews也正常有需要缓存的页面
此时 确保页面vue文件的name属性和router配置的name都写上即可解决
路由配置meta中设置了keepAlive: true
<keep-alive :include="cachedViews">
<router-view :key="key" />
</keep-alive>
输出cachedViews也正常有需要缓存的页面
此时 确保页面vue文件的name属性和router配置的name都写上即可解决