说明:用于组件的缓存
使用方法:
include:白名单(会被缓存)
exclude:黑名单(不会被缓存)
名单中的值为组件的name(非router)
<keep-alive :include="whiteList" :exclude="blackList">
<router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
参考:
彻底揭秘keep-alive:https://github.com/qiudongwei/blog/issues/4