feb-alive icon indicating copy to clipboard operation
feb-alive copied to clipboard

设置不缓存的子路由也进行缓存了

Open smalt762581 opened this issue 3 years ago • 1 comments

路由 /a/b/c --> /a/m/n

根路由

   <feb-alive>
     <router-view />
   </feb-alive>

二级路由

    <feb-alive>
      <router-view /> 
    </feb-alive>

如果/a/b/c路由不需要缓存 全部设置禁止缓存 由于渲染父组件的时候不会走到 https://github.com/wefront/feb-alive/blob/master/src/components/feb-alive.js#L101

那么如果b下边的子路由不包裹<feb-alive>不走render这个判断 可能复用了已缓存的父路由中的c组件导致渲染没有刷新

所以请问是不是全局路由都需要包裹<feb-alive> 否则有可能导致子路由渲染的不是最新的

smalt762581 avatar Jul 26 '22 02:07 smalt762581

是的

hangaoke1 avatar Jul 29 '22 02:07 hangaoke1