8000 feat: add nprogress when switch page by afc163 · Pull Request #1648 · umijs/dumi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add nprogress when switch page #1648

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

Merged
merged 8 commits into from
May 11, 2023
Merged

Conversation

afc163
Copy link
Contributor
@afc163 afc163 commented May 9, 2023

🤔 这个变动的性质是?/ What is the nature of this change?

  • 新特性提交 / New feature
  • bug 修复 / Fix bug
  • 样式优化 / Style optimization
  • 代码风格优化 / Code style optimization
  • 性能优化 / Performance optimization
  • 构建优化 / Build optimization
  • 网站、文档、Demo 改进 / Website, documentation, demo improvements
  • 重构代码或样式 / Refactor code or style
  • 测试相关 / Test related
  • 其他 / Other

🔗 相关 Issue / Related Issue

close #1637

💡 需求背景和解决方案 / Background or solution

  themeConfig: {
    hd: { rules: [] },
    rtl: true,
    name: 'dumi',
    logo: 'https://gw.alipayobjects.com/zos/bmw-prod/d3e3eb39-1cd7-4aa5-827c-877deced6b7e/lalxt4g3_w256_h256.png',
    footer: `Open-source MIT Licensed | Copyright © 2019-present
<br />
Powered by self`,
    prefersColor: { default: 'auto' },
    socialLinks: {
      github: 'https://github.com/umijs/dumi',
    },
+   nprogress: true,
  },

📝 更新日志 / Changelog

Language Changelog
🇺🇸 English 新增 config.themeConfig.nprogress 配置,支持开启页面切换的进度条效果。
🇨🇳 Chinese Add config.themeConfig.nprogress to enable page switch progress style.

@vercel
Copy link
vercel bot commented May 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dumi ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2023 6:08am

@afc163 afc163 force-pushed the feat/nprogress branch from b63d044 to 33f7684 Compare May 9, 2023 10:38
@afc163 afc163 marked this pull request as ready for review May 10, 2023 10:20
@afc163
Copy link
Contributor Author
afc163 commented May 10, 2023

好了,等 CI。

@afc163 afc163 marked this pull request as ready for review May 10, 2023 11:27
@@ -84,6 +84,13 @@ dumi 内置了一套完善的默认主题,默认主题的呈现效果与 dumi

是否开启 RTL 切换,配置为 `true` 时导航栏会展示 RTL 按钮,用于将站点文本阅读方向切换为『从右到左』,通常在站点用户群体中有使用希伯来语或阿拉伯语时启用。

### nprogress (v2.1.23+)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 v2.1.23+ 必须得加,否则切到这个页面会挂。

因为 nprogress 标题会生成 id="nprogress" 的元素,所以会抢 nprogress 的 dom 。

@PeachScript
Copy link
Member

预览效果好酷 👍

@PeachScript PeachScript merged commit d975660 into umijs:master May 11, 2023
@afc163 afc163 deleted the feat/nprogress branch May 11, 2023 06:59
@afc163 afc163 mentioned this pull request May 11, 2023
20 tasks
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.

切换路由时增加 nprogress 的效果
2 participants
0