Last active
January 13, 2020 16:56
-
-
Save harrytran998/b422b8227a66c3f8486bf07cfdbd6a88 to your computer and use it in GitHub Desktop.
Store the plugin of vueJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import { | |
LayoutPlugin, | |
BCard, | |
BCardBody, | |
BCardTitle, | |
BCardText, | |
BCardGroup, | |
BButton, | |
} from 'bootstrap-vue' | |
import 'bootstrap/dist/css/bootstrap.css' | |
import 'bootstrap-vue/dist/bootstrap-vue.css' | |
Vue.use(LayoutPlugin, { breakpoints: ['sm', 'lg', 'xl', 'xxl'] }) | |
Vue.component('b-card', BCard) | |
Vue.component('b-card-body', BCardBody) | |
Vue.component('b-card-title', BCardTitle) | |
Vue.component('b-card-text', BCardText) | |
Vue.component('b-card-group', BCardGroup) | |
Vue.component('b-button', BButton) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import { library, config } from '@fortawesome/fontawesome-svg-core' | |
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' | |
import { | |
faEnvelope, | |
faPhone, | |
faComments, | |
faCouch, | |
faRulerCombined, | |
faHotel, | |
faUtensils, | |
faDungeon, | |
faCaretDown, | |
faArrowRight, | |
} from '@fortawesome/free-solid-svg-icons' | |
// This is important, we are going to let Nuxt.js worry about the CSS | |
config.autoAddCss = false | |
// You can add your icons directly in this plugin. See other examples for how you | |
// can add other styles or just individual icons. | |
const icons = [ | |
faEnvelope, | |
faPhone, | |
faComments, | |
faCouch, | |
faRulerCombined, | |
faHotel, | |
faUtensils, | |
faDungeon, | |
faCaretDown, | |
faArrowRight, | |
] | |
icons.forEach(icon => { | |
library.add(icon) | |
}) | |
// Register the component globally | |
Vue.component('font-awesome-icon', FontAwesomeIcon) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment