dumi
dumi copied to clipboard
feat: add search-bar for doc mode, https://github.com/umijs/dumi/issues/373
🤔 这个变动的性质是?/ What is the nature of this change?
- [☑️] 新特性提交 / New feature
🔗 相关 Issue / Related Issue
https://github.com/umijs/dumi/issues/373
长这个样子,覆盖了原来的样式,
仅支持 pc 版本,mobile 版本保持原样
📝 更新日志 / Changelog
Language | Changelog |
---|---|
🇺🇸 English | add search-bar for doc mode |
🇨🇳 Chinese | 为 doc mode 添加搜索框 |
⚡️ Deploying PR Preview...

⚡️ Deploying PR Mobile Preview...

Codecov Report
Merging #678 (b3c21d7) into master (5656c82) will decrease coverage by
0.33%
. The diff coverage is33.33%
.
:exclamation: Current head b3c21d7 differs from pull request most recent head 4680a8c. Consider uploading reports for the commit 4680a8c to get more accurate results
@@ Coverage Diff @@
## master #678 +/- ##
==========================================
- Coverage 94.17% 93.83% -0.34%
==========================================
Files 112 112
Lines 2453 2467 +14
Branches 795 799 +4
==========================================
+ Hits 2310 2315 +5
- Misses 139 148 +9
Partials 4 4
Impacted Files | Coverage Δ | |
---|---|---|
...ackages/theme-default/src/components/SearchBar.tsx | 46.42% <31.25%> (-16.08%) |
:arrow_down: |
packages/theme-default/src/components/SideMenu.tsx | 87.50% <40.00%> (+0.65%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5656c82...4680a8c. Read the comment docs.
感觉 UI 可以优化下,大家一起看看:
- 侧边栏的拥挤程度已经很高了,搜索框是不是默认收起会好一些,或者有没有更好的布局方案,哪怕大刀阔斧一些
- 搜索的结果替代侧边栏子项的方式会比较奇怪,是不是仍旧采用 popup 的形态会好一些
这样的处理参考自 docz ,或者你们有更好的想法。 popup 会有点奇怪 可能有 header 的时候会比较好一点
怎么使用搜索呢??
cc @suedar
有点久了这个,之前的场景是复用原搜索框,由于 mode: doc
没有搜索框,将 mode: site
右上角的搜索框放到 doc
上了。
现在可能有点变化,我有空再看看。
❤️ 感谢贡献,dumi v1 不再更新,PR 将会关闭;dumi v2 已发布,欢迎继续参与 dumi 的建设,https://d.umijs.org/