ant-design官网路由跳转后保持当前页同时显示nprogress效果怎么实现? #12369
Unanswered
imjamespond
asked this question in
Q&A
Replies: 1 comment 1 reply
-
跳转路由的时候包在 react 18 的 startTransition 里,可以看下 antd 文档站的源码,现在 nextjs 如果要显示 loading 条进度也要这么做。 这里有一个 PR 可以参考:https://github.com/umijs/umi/pull/11364/files ,这是一个 umi 插件,可以 patch 路由跳转方法从而降低页面跳转的优先级,从而避开 Suspense loading ,在这个过程开始之前启动 ng progress ,结束后关闭 ng progress 即可。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://ant-design.antgroup.com/components/cascader-cn
跳转时保持当前页面不变(但是地址已经变化),等分割的模块代码加载完成后再切换到新模块显示
Beta Was this translation helpful? Give feedback.
All reactions