安蝶

前端学习ing

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2020年8月1日

摘要: vue缓存时如果发现组件相同,则会认定为同一个。 同一个组件根据不同路由做不同的缓存需在keep-alive的router-view中加上key,如下所示: <keep-alive> <router-view :key="$route.fullPath" /> </keep-alive> 加上key 阅读全文
posted @ 2020-08-01 17:08 安蝶 阅读(2422) 评论(0) 推荐(0)