반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- node
- PYTHON
- 맥
- react
- build
- VirtualBox
- avds
- jest
- 리눅스
- vsCode
- webpack
- 네트워크
- xcode
- MAC
- IOS
- qunit
- MachineLearning
- Android
- picker
- centos
- linux
- Chrome
- unittest
- androidstudio
- 센토스
- TensorFlow
- 개발
- localserver
- ReactNative
Archives
- Today
- Total
로메오의 블로그
[VUE + TYPESCRIPT] font-awesome 설치 본문
반응형
설치
## vue 2.x
$ npm i --save @fortawesome/vue-fontawesome@latest
## vue 3.x
$ npm i --save @fortawesome/vue-fontawesome@prerelease
## free 버전
$ npm i --save @fortawesome/free-solid-svg-icons
$ npm i --save @fortawesome/free-brands-svg-icons
$ npm i --save @fortawesome/free-regular-svg-icons
## pro 버전
$ npm i --save @fortawesome/pro-solid-svg-icons
$ npm i --save @fortawesome/pro-regular-svg-icons
$ npm i --save @fortawesome/pro-light-svg-icons
$ npm i --save @fortawesome/pro-duotone-svg-icons
main.ts
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faAngleDown, faAngleUp } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
library.add(faAngleDown, faAngleUp)
Vue.component('font-awesome-icon', FontAwesomeIcon)
Vue.config.productionTip = false
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
<template>
<div>
<font-awesome-icon icon="fa-angle-down" />
<font-awesome-icon icon="fa-angle-up" />
</div>
</template>
https://fontawesome.com/search?m=free&s=brands%2Csolid
반응형
'Frontend > Vue' 카테고리의 다른 글
[Vue + typescript] transition (0) | 2022.05.04 |
---|---|
[Vue + typescript] dynamic Component 생성하기 (0) | 2022.05.04 |
[VUE + TYPESCRIPT] vue splitpanes (0) | 2022.04.20 |
[VUE + TYPESCRIPT] 메세지 추가 애니메이션 (0) | 2022.03.25 |
[VUE + TYPESCRIPT] proxy server 구현 (0) | 2022.03.24 |
Comments