我尝试过此-
import { library } from '@fortawesome/fontawesome-svg-core'
import { faFacebook } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
library.add(faFacebook)
Vue.component('font-awesome-icon', FontAwesomeIcon)
但是显然,免费的svg图标中没有faFacebook。如何包含Facebook图标?
答案 0 :(得分:2)
我遇到了同样的问题。解决了这个问题:
terminal:
npm install --save @fortawesome/free-brands-svg-icons
main.js:
import { faFacebook } from '@fortawesome/free-brands-svg-icons'
library.add(faFacebook)
inside code:
<font-awesome-icon :icon="{ prefix: 'fab', iconName: 'facebook' }"/>
答案 1 :(得分:1)
检查fontawesome-free-brands
中的faFacebookSquare
import { faFacebookSquare, faFacebookMessenger } from '@fortawesome/fontawesome-free-brands';
行得通吗?
编辑
只是看到faFacebookF
也在那里,我只是错过了
import { faFacebookF } from '@fortawesome/fontawesome-free-brands';