Ember Fontawesome不显示一些免费的SVG图标

发布于 2025-01-27 20:38:55 字数 759 浏览 2 评论 0原文

我正在重写以前使用Ember 3.12构建的应用程序,现在已通过4.20进行了测试。我正在构建一些组件,并决定与页脚弄乱,它需要一个简单的span带有一些文本和github图标。以前,我们使用“ Ember-Font-awesome”:“^3.1”,,但我认为没有人当前正在维护插件,我们正在寻求使用“@fortawesome/ember-fontawesome “:”^0.3.2“, with:

"@fortawesome/free-brands-svg-icons": "^6.1.1",
"@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",

设置内容后有一些图标可行,但有些图标不做:< faicon @icon =“ github” @prefix =' @prefix = “ fa”/>。我将前缀属性放入其中,因为它指出您可能需要这样做,因为默认fas prefix和github iCON使用fa。这是我在浏览器控制台中收到的错误消息。

fa-icon.js:117找不到图标:iconName = github,prefix = fa。您可能需要将其添加到您的图标

。特定图标。任何建议。

I am working a rewrite of of an application that was previously built with Ember 3.12 and now being tested with 4.20. I am building out a few components and decided to mess around with the footer and it requires a simple span that had some text and a github icon. Previously we used "ember-font-awesome": "^3.1", but I think no-one is currently maintaining the addon and we are looking to use "@fortawesome/ember-fontawesome": "^0.3.2", with:

"@fortawesome/free-brands-svg-icons": "^6.1.1",
"@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",

After setting things up there are a few icons that work but some that don't for instance: <FaIcon @icon="github" @prefix="fa"/>. I put the prefix attribute in because it stated that you may need to do this because of the default fas prefix and github icon uses fa. Here is the error message I get in the browser console.

fa-icon.js:117 Could not find icon: iconName=github, prefix=fa. You may need to add it to your icons.js.

So I added an icon.js file to the config/ folder I am still having no luck displaying specific icons. Any suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

謌踐踏愛綪 2025-02-03 20:38:55

前缀应为fab不是fa,因为它在 b rands软件包中。

The prefix should be fab not fa, for it is in the brands package.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文