We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我在页面中使用CacheLink进行页面的跳转和缓存,但是这里能不能跳转是由每个列表项循环出来的结果单独控制的,所以我希望不能跳转的项可以被leaveFilter阻止掉,但是我在路由配置的地方添加了leaveFilter后并没有达到预期的效果,第一个参数cb不管是否执行,页面都会进行跳转。
CacheLink
leaveFilter
cb
<HashRouter> <div> <Route name='rankitemdetail' path='teacher/detail/:code.html' component={RankItemDetail}/> <Route name='rankpage' path='teacher/rankpage.html' component={RankPage} leaveFilter={(cb, props) => { console.log('不会离开'); console.log('leave', props); cb() }} /> <Route cache name='homepage' path=':userType/homepage.html' component={HomePage}/> </div> </HashRouter>
实际不是这么写的,但大体意思是这样。不知道是我配置方法不对还是别的原因?
The text was updated successfully, but these errors were encountered:
@zhshengchao thanks,这是一个待修复问题。需求收集
Sorry, something went wrong.
@vifird 请问我想在表单验证通过后缓存当前页并跳转到下个页面,但是我在表单逻辑里面控制不了路由里的leaveFilter啊? CacheLlik刚好满足我的需求,但是只能缓存上一个页面,我想缓存所有的上级页面,并在返回上一步的时候,清除所有下级页面的缓存。多级嵌套路由可以做到,但好像有性能问题,我想知道用React-keeper并且不用嵌套路由能做到吗?
@andyyxw cache='parent'可以满足需求吗?
cache='parent'
No branches or pull requests
我在页面中使用
CacheLink
进行页面的跳转和缓存,但是这里能不能跳转是由每个列表项循环出来的结果单独控制的,所以我希望不能跳转的项可以被leaveFilter
阻止掉,但是我在路由配置的地方添加了leaveFilter
后并没有达到预期的效果,第一个参数cb
不管是否执行,页面都会进行跳转。实际不是这么写的,但大体意思是这样。不知道是我配置方法不对还是别的原因?
The text was updated successfully, but these errors were encountered: