Bootstrap-vue doesn't load CSS

前端 未结 5 2214
感动是毒
感动是毒 2021-02-13 11:38

I am writing a Vue.js app with Bootstrap 4 and I can\'t loaded though I followed the documentation.

Added to main.js

Vue.use(BootstrapVue);

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-13 12:29

    I had to do a combination/variation of some of the other answers.

    App.vue:

    import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
    import Vue from 'vue'
    
    
    // Install BootstrapVue
    Vue.use(BootstrapVue)
    // Optionally install the BootstrapVue icon components plugin
    Vue.use(IconsPlugin)
    
    import 'bootstrap/dist/css/bootstrap.css'
    import 'bootstrap-vue/dist/bootstrap-vue.css'
    
    
    
    export default {
      name: 'App',
      components: {
      }
    }
    

    Sources: https://forum.vuejs.org/t/ui-library-styles-not-loading-in-web-components/77858/2 https://bootstrap-vue.org/docs

提交回复
热议问题