有两种方式:Plan1:app.vue使用meta作为标识,判断是否缓存路由器-view>2.在router.js中设置meta标签判断是否缓存path:"/service-channel",component:ServiceChannel,name:"ChannelConfiguration",menuShow:true,iconCls:'iconLeftnavservice-channel',meta:{keepAlive:true}```方案2:使用Vue2.1新属性include/excludeinclude哪些页面需要缓存exclude是指不需要缓存的页面使用include/exclude属性给所有vue类的名字赋值(注意不是给路由的名字赋值),否则include/exclude不会生效在组件中:exportdefault{name:'KeepAlive',components:{},data(){return{}},}