반응형
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
- androidstudio
- linux
- Chrome
- TensorFlow
- 개발
- picker
- webpack
- centos
- 리눅스
- qunit
- unittest
- vsCode
- xcode
- MAC
- VirtualBox
- react
- build
- IOS
- localserver
- MachineLearning
- 맥
- Android
- jest
- 네트워크
- avds
- PYTHON
- node
- 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