1
 {
  path: '/information',
  name:"information",
  meta:{
    keepAlive:true 
  },
  component: function (resolve) {
  require(['@/view/personal/components/information/information'],         
  resolve)
  },
},


meta:{
    keepAlive:true 
},


页面不被缓存


2019-01-24 提问
2 个回答
0

已采纳

route设不设定mete有什么关系,vue又不会自动识别。重点是App.vue里面是否有根据路由mete进行keep-alive包裹呢?

<keep-alive>
  <router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive"></router-view>

类似这样

0
<keep-alive>
    <router-view>这样使用</router-view>
</keep-alive>

撰写答案

推广链接