VueJS 3 中的 BootstrapVue

问题描述 投票:0回答:3

我正在尝试在我的 Vue-JS 3 项目中使用 bootstrap-vue,但出现错误

使用 npm run serve

1

在我的浏览器中我得到了

浏览器错误

2

我在我的终端中使用了这个命令

npm install vue bootstrap bootstrap-vue

这是我的 main.js 代码

import { createApp } from 'vue'
import App from './App.vue'

import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'

// Import Bootstrap and BootstrapVue CSS files (order is important)
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'

createApp(App).use(BootstrapVue).use(IconsPlugin).mount('#app')

有人知道怎么解决吗?我看到是因为从 Vue 2 到 3 发生了一些变化,但我看到 Vue JS 3 中的一个项目已经使用引导程序运行,所以我想这个错误已经修复了

vue.js vuejs3 bootstrap-vue
3个回答
2
投票

问题:Bootstrap-Vue 还不兼容 Vue.js 3.


0
投票

https://cdmoro.github.io/bootstrap-vue-3/

使用它还没有完全发布但效果很好,我在几个项目中使用它

干杯


0
投票

对不起我的英语

gave the specified error for vue - 3

1)https://bootstrap-vue.github.io/bootstrap-vue-next / vue 3 不完整

2)https://bootstrap-vue.org / 适用于 vue 2 但适用于 vue 3

3)https://getbootstrap.com / 简单的引导程序 使用所有三个来源

npm i bootstrap bootstrap-vue-3

main.js

....

从“bootstrap-vue-3”导入 BootstrapVue3

导入'bootstrap/dist/css/bootstrap.css'

导入'bootstrap-vue-3/dist/bootstrap-vue-3.css'

...

应用程序使用(BootstrapVue3)

© www.soinside.com 2019 - 2024. All rights reserved.