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

272
Views
Nuxt: ¿cómo evitar el redireccionamiento a otra página al hacer clic en el botón en la parte superior de NuxtLink?

En este fragmento de código, tengo una v-card, que redirige al usuario a otra página. Quería poner un botón en la v-card para hacer algo diferente:

 <NuxtLink :to="`books/1`" style="text-decoration: none;"> <v-card hover width="400px"> <v-card-text> <span> Book 1 </span> <!-- button that does something different --> <v-btn icon @click="addToFavourites(1)"> <v-icon> mdi-star-outline </v-icon> </v-btn> </v-card-text> </v-card> </NuxtLink>
 addToFavourites(id) { console.log("add book " + id + " to favourites"); }

Ahora, cada vez que hago clic en el botón, me redirige a otra página, pero addToFavourites no redirige al usuario a otra página. ¿Cómo evito redirigir al usuario a otra página al hacer clic en el botón?

about 4 years ago · Juan Pablo Isaza
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!