MoonBox icon indicating copy to clipboard operation
MoonBox copied to clipboard

routes.js添加缓存配置cache: true但是keep-alive未生效

Open qcl1024 opened this issue 1 year ago • 0 comments

record/index.vue中实现页面缓存用的 Utils.getLocalStorage,能够生效;但是在 client\src\router\routes.js 中配置 /mock/index 页面增加缓存配置 cache: true 不生效?打印日志发现 第二次进入页面的时候created钩子被再次调用,没找到keep-alive未生效的原因,可否看一下如何处理? { path: '/mock/index', component: () => import(/* webpackChunkName: 'mock' */ 'views/mock/index'), name: 'mock', meta: { title: '回放Mock', cache: true } },

qcl1024 avatar Dec 13 '23 09:12 qcl1024