umi-plugin-keep-alive
umi-plugin-keep-alive copied to clipboard
为啥这样写缓存会失效啊
const outlet = useOutlet()
const location = useLocation()
<KeepAlive id={location.key}>{outlet}</KeepAlive>
还是会失效。。。
还是会失效。。。
外层包了 AliveScope 吗
这样就好了
已经解决了,原来location.key每次都会不相同,导致缓存失效