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

fix: 修复前后退不更新版面帖子的问题 #60

Closed
wants to merge 0 commits into from

Conversation

zjufishboy
Copy link
Contributor

但我认为这个解决方案不是很合理,直接加了个key强制重新挂载组件。

测试下来:

版面内无问题,但前后退加载时会把不必要的部分一起重新加载(分页器等)但需要重新加载的只有版面列表。

TODO:或许可以在V4里把获取列表信息的触发加到列表组件里。因为优化改造可能过大。感觉扔V4比较好

@zjufishboy
Copy link
Contributor Author

zjufishboy commented Dec 8, 2020

顺手再修了一个bug

描述:在进入消息页面后,点击顶栏中的消息的几个选项,无法跳转。

原因:是因为link和route 不在同一层router下导致的

修复:

  1. 删除了多余的一层router
  2. 增加了消息设置的快捷入口
  3. 消息设置页面不需要全部已读按钮,做了个判断

@YunzheZJU
Copy link

YunzheZJU commented Jan 15, 2021

ref issue 55
分页器里的active page会随url变化,它的重新渲染看上去合理。不想要重渲染的组件可以由它自己实现shouldComponentUpdate生命周期,或改用React.PureComponent。

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

Successfully merging this pull request may close these issues.

2 participants