Skip to content
This repository has been archived by the owner on May 8, 2022. It is now read-only.

页面缓存问题 #32

Open
Victor880829 opened this issue Nov 7, 2019 · 2 comments
Open

页面缓存问题 #32

Victor880829 opened this issue Nov 7, 2019 · 2 comments

Comments

@Victor880829
Copy link

点击router.push进入另一个页面之后,返回上一级页面,都是重新刷新上一级页面,有没有类似于vue keep alive的配置,不让上一级页面刷新?

@hqwlkj
Copy link
Owner

hqwlkj commented Nov 8, 2019

react-router 这边目前没有这项功能或配置,我自己在去他的项目中是采用的前置路由隐藏的方式来处理的,后期有空了来补充到这个项目中。你如果有更好的方式你也可以提交一个PR上来 👏 👏 👏

@Victor880829
Copy link
Author

我目前的实现方式是用了react-activation,在layout中做了相关页面的路径判断,需要keepalive的页面通过和标签包裹来实现的。

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

No branches or pull requests

2 participants