Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.2K
Visualizações
Importando bootstrapVue en vue 3

Hola, estaba tratando de usar bootstrapVue en mi aplicación vue 3 con mecanografiado aquí está mi main.ts:

 import { createApp } from 'vue' import App from './App.vue' import router from './router' import Vue from 'vue' import { BootstrapVue } from 'bootstrap-vue' createApp(App).use(router).use(BootstrapVue).mount('#app')

Causando este error:

 src/main.ts:9:32 TS2345: Argument of type 'BootstrapVuePlugin' is not assignable to parameter of type 'Plugin_2'. Type 'BootstrapVuePlugin' is not assignable to type '{ install: PluginInstallFunction; }'. Types of property 'install' are incompatible. Type 'PluginFunction<BvConfigOptions>' is not assignable to type 'PluginInstallFunction'. Types of parameters 'Vue' and 'app' are incompatible. Type 'App<any>' is missing the following properties from type 'VueConstructor<Vue>': extend, nextTick, set, delete, and 3 more. 7 | 8 | > 9 | createApp(App).use(router).use(BootstrapVue).mount('#app') | ^^^^^^^^^^^^ 10 |

¿Alguien sabe una solución a este problema? Gracias por adelantado.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

La versión actual de bootstrap-vue (v2.21.2) solo es compatible con Vue 2, pero hay un problema de GitHub que rastrea la compatibilidad con Vue 3 ( bootstrap-vue Issue #5196) .

Mientras tanto, hay una versión de terceros compatible con Vue 3 :

  1. Instale bootstrap y bootstrap-vue-3 :
 npm i -S bootstrap bootstrap-vue-3
  1. Inicialice bootstrap-vue-3 en main.ts :
 import { createApp } from 'vue' import BootstrapVue3 from 'bootstrap-vue-3' // Since every component imports their Bootstrap functionality, // the following line is not necessary: // import 'bootstrap' import 'bootstrap/dist/css/bootstrap.css' import 'bootstrap-vue-3/dist/bootstrap-vue-3.css' const app = createApp(App) app.use(BootstrapVue3) app.mount('#app')
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda