Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

首次切换回缓存页面数据为空 #276

Open
jinlllllll opened this issue Jun 7, 2023 · 1 comment
Open

首次切换回缓存页面数据为空 #276

jinlllllll opened this issue Jun 7, 2023 · 1 comment

Comments

@jinlllllll
Copy link

大佬们,我这个每次首次切换回缓存页面都没数据,需要重新触发请求才有数据,并且清除缓存后再点开页面会有上一次的搜索数据缓存,有人知道怎么回事吗。。。
image

@CJY0208
Copy link
Owner

CJY0208 commented Jul 6, 2023

KeepAlive 只能确保你的组件不被卸载,如果组件内应用了统一的数据源,例如 redux,而你是通过修改 redux 来调整数据的话,KeepAlive 对这部分数据是无效的,需要确保你的数据只由组件内部生成

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants