Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

91
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!