如何在Bootstrap 4的Vue项目中包含Popper.js

时间:2018-11-20 02:55:04

标签: vue.js bootstrap-4 popper.js

有人知道如何要求popper.js吗?我正在将其导入我的main.js文件中,但是没有运气。这是设置

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import bootstrap from 'bootstrap'
import jQuery from 'jquery'
import Popper from 'popper'
global.jQuery = jQuery;
global.Popper = Popper;

Vue.config.productionTip = false

Vue.use(bootstrap);

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

我已经根据package.json安装了它

"dependencies": {
    "bootstrap": "^4.1.3",
    "jquery": "^3.3.1",
    "popper": "^1.0.1",
    "vue": "^2.5.17",
    "vue-router": "^3.0.1",
    "vuex": "^3.0.1"
  },

1 个答案:

答案 0 :(得分:-1)

所以我卸载了。然后重新安装软件包,现在看来工作正常。