umijs / dumi

📖 Static Site Generator for component library development
https://d.umijs.org
MIT License
3.6k stars 1.18k forks source link

bug: `^2.2.6` 中 `toc: content` 异常! #1842

Closed ayangweb closed 1 year ago

ayangweb commented 1 year ago

Versions

Steps to reproduce

https://github.com/ayangweb/dumi-test

What is actually happening?

切换路由丢失!

iShot_2023-08-21_13 08 48

github-actions[bot] commented 1 year ago

Hello @ayangweb. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @ayangweb,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

PeachScript commented 1 year ago

关键位置:https://github.com/umijs/dumi/blob/8c91a070de7c06658bf796d724e58286e546c247/src/client/theme-default/slots/Toc/index.tsx#L41 原因:获取 DOM 的时候内容区域还未渲染完毕