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

帖子列表未响应浏览器后退 #55

Open
YunzheZJU opened this issue Sep 21, 2020 · 1 comment
Open

帖子列表未响应浏览器后退 #55

YunzheZJU opened this issue Sep 21, 2020 · 1 comment

Comments

@YunzheZJU
Copy link

帖子列表的翻页状态应该响应location变化。

环境

  • MacOS 10.15.6
  • Chrome 85.0.4183.102 64bit

复现步骤

  1. 新建标签页,打开/board/515/2。此时帖子列表显示该版面第2页的内容
  2. 点击翻页组件Pagination中的3,跳转到第3页。此时url为/board/515/3,帖子列表显示该版面第3页的内容
  3. 在页面空白处右键单击,点击”返回/后退“。url变为/board/515/2,此时帖子列表仍然显示该版面第3页的内容

期望的行为

  1. 在复现步骤第3步中,url变为/board/515/2,此时帖子列表显示该版面第2页的内容

可能的问题源

Body组件未实现生命周期函数componentDidUpdate

可能的解决方案

实现生命周期函数componentDidUpdate,判断url变化,相应地更新数据。

@zjufishboy
Copy link
Contributor

zjufishboy commented Dec 5, 2020

前辈可以尝试自己改下,帮忙提个PR.

我这边之后跟进一下

已提PR

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