📜  npm font awesome vue - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:36.854000             🧑  作者: Mango

代码示例1
// Install all needed fontawesome dependencies
npm install @fortawesome/fontawesome-svg-core
npm install @fortawesome/free-solid-svg-icons
npm install @fortawesome/vue-fontawesome

// Import fontawesome 
import {library} from '@fortawesome/fontawesome-svg-core'
import {fas} from '@fortawesome/free-solid-svg-icons'
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome'

// Add solid icons library
library.add(fas);

// Create fontawesome vue component
Vue.component('font-awesome-icon', FontAwesomeIcon)