解决keep-alive三级甚至四级路由缓存失效问题

router.beforeResolve((to,from,next)=> {
   if(to.matched && to.matched.length > 2) to.matched.splice(1,to.matched.length-2)
next()
})

 

posted @ 2021-12-15 11:13  看不懂吧  阅读(334)  评论(0编辑  收藏  举报