keepAlive的使用大家应该都清楚,如果我们在同一个router-view下展示的组件,有的想让他缓存,有的不想让他缓存应该怎么办呢? 缓存指定组件 我们可以使用include来指定缓存哪个组件 include接收一个数组,是你想要缓存的组件的name,注意要和你组件的name是一致的 选择性缓存组件 如果你想要在一定情况下缓存,一定情况下不缓存,那么就可以根据自己的情况去动态改变这个数组,来达到动态缓存的效果