-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
bug: ^2.2.4
nav 解析异常!
#1815
Comments
这是符合期望的,因为 2.2.0 开始支持了约定式二级导航,具体可以参考文档说明:https://d.umijs.org/guide/conventional-routing#%E7%BA%A6%E5%AE%9A%E5%BC%8F%E4%BA%8C%E7%BA%A7%E5%AF%BC%E8%88%AA 对于你遇到的问题,如果想恢复到原来的结构,只需要把目录结构从 3 级嵌套调整为 2 级即可,也就是将 |
感谢, |
src 默认是资产文档目录,不会解析嵌套结构,所以保持 |
@PeachScript 大佬啊,新版本的 |
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,提前感谢和期待您的贡献。 |
关键位置: dumi/src/client/theme-api/useNavData.ts Line 67 in f6a51c1
原因:这里的 parentPath 应当取 locale 前缀后一级,比如 /en-US/components ,目前是把 /en-US 当成一级路由了解法:link 在做 match 之前先把 locale 前缀去掉,可以用这个 util:
|
Versions
Steps to reproduce
https://github.com/ayangweb/dumi-test
What is Expected?
将上面项目的
dumi
版本改为^2.1.22
,解析出来的是正常的!What is actually happening?
^2.2.4
中:指南路由在英文下是解析正常,但是中文下折叠起来了!
英文下组件路由跑到指南路由下了,bug:
^2.2.4
中toc: content
异常! #1816 gif 图能看到效果!The text was updated successfully, but these errors were encountered: