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

94
Visualizações
Vue Lazy Loading banners

I Have 5 banners on a page that are shown or hide depending on a user click selection.

At this point the banners data comes from an API and I am iterating a banner component for every banner entry I have on the API, Any idea on how i can get the image downloaded only after a user click? I have tried lazy-loading native behavior, but the images load at the beguinning because all of them appears at first scroll, I show or hide images with user click.

<banner-base
    v-for="banner in entry.banners"
    :key="banner.id"
    :slug-ficha="slugSelected"
    :promo-selected="promoSelected"
    :banner-id="banner.id"
/>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can use v-show directive on the img element and it will show only when the banner is clicked.

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