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

168
Visualizações
How to show custom tooltip message in Vue?

I'm encountering an 'undefined' message after binding 'tooltip' prop in '' element. I want simply to show tooltip messages on required input fields.

full code: https://jsfiddle.net/8gaysr9u/

in line 16th appending v-bind:tooltip="tooltip" at

<label>SKU<input type="text" id="sku" v-model="this.product.sku" placeholder="ID"></label><tooltips v-bind:tooltip="tooltip"/>

and in line 122th appending v-bind:tooltip="tooltip">{{tooltip.tooltipText.onSubmit}}

<div class="tooltip">
  <span class="tooltiptext" v-bind:tooltip="tooltip">{{tooltip.tooltipText.onSubmit}}</span>
</div> 

the console simply thows 'undefined'. I variated the code in all ways but like against the brick wall the console throws 'undefined'. What I am doing wrong here??

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

0

False alarm! :D Solved by myself. :)

I added to my custom tooltip element: :tooltip="this.tooltipText"

<tooltips :tooltip="this.tooltipText" />

and in custom component 'tootips': v-bind:tooltip="tooltip">{{tooltip.onSubmit}}

<span class="tooltiptext" v-bind:tooltip="tooltip">{{tooltip.onSubmit}}</span>

Now my tooltip shows as expected :))

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