Skip to content
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

ant-design-icons在nextjs首页渲染时样式未能预先加载 #616

Open
FeiPengDev opened this issue Jan 19, 2024 · 1 comment
Open
Assignees

Comments

@FeiPengDev
Copy link

FeiPengDev commented Jan 19, 2024

Reproduction link

Edit on CodeSandbox

Steps to reproduce

按照指导在使用nextjs app router时添加了@ant-design/nextjs-registry来解决页面闪动,但是icon库的样式并未按照预想的提前加载

image

可以看到刷新页面时spin的样式不能及时加载导致loading icon静止
spin

https://ant.design/docs/react/use-with-next-cn#%E4%BD%BF%E7%94%A8-app-router

What is expected?

icon库的样式正确加载

What is actually happening?

在nextjs中antd-icons库的样式加载顺序不正确

Environment Info
antd 5.13.2
ant-design/icons 5.2.6
React react18
System windows
Browser chrome
@FeiPengDev
Copy link
Author

@afc163 麻烦问下这个有解决方案嘛,我这边是把spin样式手动加了一下来让样式首次加载能生效

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

No branches or pull requests

2 participants