umi-plugin-keep-alive icon indicating copy to clipboard operation
umi-plugin-keep-alive copied to clipboard

umi设置动态路由多开详情页tabs, 页面内容都是一样的,不是多开实例吗?

Open openScipt opened this issue 2 years ago • 4 comments

image image

openScipt avatar Dec 01 '22 08:12 openScipt

看看这个有没有帮助 多份缓存

CJY0208 avatar Dec 01 '22 10:12 CJY0208

多谢大佬,但是我又遇到一个其他问题,就是切换路由组件卸载了页面输入的数据全部销毁了,这个问题在umi3里面KeepAlive好像做不到缓存呀,烦请大佬再给一点提示

openScipt avatar Dec 03 '22 09:12 openScipt

你是自己写了 AliveScope 组件吗?

CJY0208 avatar Dec 05 '22 03:12 CJY0208

image image image meiyou没有重写呀!写了AliveScope包裹后,多份缓存不能实现了,所有详情的数据都一样了,编辑某一个详情,其他详情页会默认显示刚才页面的数据(我的详情组件是在动态路由写的)

openScipt avatar Dec 07 '22 06:12 openScipt