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

173
Visualizações
Dynamically load a Vuetify component in vue 3

I am trying to load vuetify components dynamically in a vue 3 project using the following code:

<template>
   <v-chip>try</v-chip>
   <component :is="object.tag">{{ object.content }}</component>
</template>
<script>
export default {
  name: 'component1',
  data: () => ({
    object: {
      tag: 'v-chip',
      content: 'hey'
    },
  }),
}
</script>

Trying this I get no errors, using v-chip component normally works fine but the second component doesn't work well and doesn't get initialized as a vuetify component instead I get the following: enter image description here I have tried using VChip or vChip but they also don't work and there is no errors at all. I also tried to use a none vuetify component, one that I have created and it loads successfully.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

object.tag should be the imported component, not a string.

// import only needed if ala-carte
import VChip from 'somewhere'
{ object: { tag: VChip } }
about 4 years ago · Juan Pablo Isaza 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