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

Use a-icon in vuecli3 to report an error and cannot be displayed #4295

Closed
1 task
songlinrong opened this issue Jun 30, 2021 · 5 comments
Closed
1 task

Use a-icon in vuecli3 to report an error and cannot be displayed #4295

songlinrong opened this issue Jun 30, 2021 · 5 comments
Labels

Comments

@songlinrong
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.2.0-rc.1

Environment

vue3.0.0

Reproduction link

https://gitee.com/songlinrong/antd-vue3.0.git

Steps to reproduce

What is expected?

页面回显图标

What is actually happening?

不显示图标,浏览器显示警告Failed to resolve component: a-icon

@github-actions github-actions bot changed the title vuecli3中使用a-icon报错,无法显示 Use a-icon in vuecli3 to report an error and cannot be displayed Jun 30, 2021
@zkwolf
Copy link
Member

zkwolf commented Jun 30, 2021

参见文档
image

@songlinrong
Copy link
Author

songlinrong commented Jun 30, 2021

@zkwolf 里面是没有icons文件的,按照截图方式引入是找不到icons的。

@zkwolf
Copy link
Member

zkwolf commented Jun 30, 2021

给你个示例吧如果你vue2里用<a-icon type="home" />的话,vue3需要import HomeOutlined from '@ant-design/icons-vue/HomeOutlined'

btw:文档那个路径好像确实有点问题

@songlinrong
Copy link
Author

给你个示例吧如果你vue2里用<a-icon type="home" />的话,vue3需要import HomeOutlined from '@ant-design/icons-vue/HomeOutlined'

btw:文档那个路径好像确实有点问题
谢谢,试过你给的方式,是可以的。

@github-actions
Copy link

github-actions bot commented Jul 2, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants