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

使用iconfontUrl 配置后一级页面(不存在左边导航菜单的路由页面)无法加载图标 #11424

Open
liueiamp opened this issue Jan 13, 2025 · 1 comment

Comments

@liueiamp
Copy link

Reproduction link

https://github.com/ant-design/ant-design

Steps to reproduce

ant-design-pro 在配置iconfontUrl 后,一级路由页面不会自动加载图标,只有一个独立页面,没有左边二级菜单,这样的页面都不会加载图标,请检查下问题,我们测试了很久无法解决

What is expected?

iconfontUrl 配置后,每个页面都应该正常加载图标

What is actually happening?

一级页面不加载

Environment Info
antd 5.23.1
React 18.2.0
System win11
Browser edge
Copy link

关于您在使用 iconfontUrl 配置后一级页面无法加载图标的问题,目前在 Ant Design 的问题库中没有找到类似的报告。以下是一些可能的解决方案,您可以尝试:

  1. 检查 iconfontUrl 配置:确保 iconfontUrl 配置正确,并且能够在浏览器中直接访问。如果 URL 不可访问,图标将无法加载。

  2. 网络请求检查:在浏览器的开发者工具中查看网络请求,确保图标字体文件被正确加载。如果有请求失败,可能是 URL 配置错误或网络问题。

  3. 样式覆盖:检查是否有其他样式覆盖了图标的显示,确保图标的 CSS 类名与配置一致。

  4. 异步加载问题:如果图标是异步加载的,确保在图标加载完成后再渲染页面。

如果以上方法仍未解决问题,建议在 Ant Design 的 GitHub 仓库中提交一个详细的 issue,以便开发团队进行进一步调查。

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@afc163 afc163 transferred this issue from ant-design/ant-design Jan 13, 2025
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

1 participant