Ember Fontawesome不显示一些免费的SVG图标
我正在重写以前使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
前缀应为
fab
不是fa
,因为它在 b rands软件包中。The prefix should be
fab
notfa
, for it is in the brands package.