【问题标题】:Vue problem with table components and bootrstrap表格组件和引导程序的Vue问题
【发布时间】:2022-06-27 22:08:26
【问题描述】:

当我使用文档中的默认示例时,即使所有内容都已安装,组件和 bootstrap-vue 也存在问题:

<template>
  <div>
    <b-table striped hover :items="items" :fields="fields"></b-table>
  </div>
</template>

页面上没有呈现任何内容。 我的软件包版本是:

"vue": "^2.6.12",
"bootstrap": "^5.1.3",
"bootstrap-vue": "^2.22.0",

提前致谢。

【问题讨论】:

    标签: javascript vue.js bootstrap-vue


    【解决方案1】:

    你的 main.js 看起来像这样吗?

    import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue';
    import Vue from 'vue';
    import App from './App.vue';
    import router from './router';
    import store from './store';
    import 'bootstrap/dist/css/bootstrap.css';
    
    Vue.use(BootstrapVue);
    Vue.use(BootstrapVueIcons);
    
    Vue.config.productionTip = false
    
    new Vue({
      router,
      store,
      render: h => h(App)
    }).$mount('#app')
    

    【讨论】:

      猜你喜欢
      • 2016-04-26
      • 2021-04-30
      • 1970-01-01
      • 2015-09-15
      • 2011-04-03
      • 2022-01-19
      • 2016-12-06
      • 1970-01-01
      相关资源
      最近更新 更多