angular.js - react-redux应用滚动条位置记录?
PHPz
PHPz 2017-05-15 16:59:11
0
1
688

开发单页面应用的时候,滚动条在页面切换的时候总是会保持固定的位置,现在是用了scroll-behavior来解决这个问题并且还能记录上一个页面的滚动条位置,但是它不支持异步的情况,各位大神有好的解决方案吗?

PHPz
PHPz

学习是最好的投资!

reply all (1)
大家讲道理

For such a requirement, it is indispensable to maintain the scroll bar position as state.
The remaining method that can be thought of is to use the API provided by react router, onEnter to prefetch the data and set the redux store, and the table will automatically fill the data according to the store. In this way, when the page render is completed, setting the scroll bar position is completely no problem.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!