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

134
Views
enlace de redirección generado por los métodos a href o nuxt-link

Hola quiero mostrar una página con un enlace generado por un método.
Aquí está mi código actual.

 <template> <nuxt-link :to="seeProduct(item.sku.product.id).toString()"> <div> <span>Go to product</span> </div> </nuxt-link> </template> <script> export default { methods: { async seeProduct(id) { const app = { $axios: this.$axios }; const urlProduct = await endPoint.getProduct(app, id); console.log(urlProduct.url); // https://www.products/gants.html => this is the url return urlProduct.url; }, } } </script>

Cuando hago clic en el enlace, la redirección no es buena. ¿Cómo hacer una buena redirección con una URL generada por un método?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Si es una ruta interna, le recomiendo que pase solo una ruta real o incluso mejor, un nombre como se muestra aquí: https://router.vuejs.org/guide/essentials/navigation.html#router-push-location-oncomplete -al abortar

Debería tener un aspecto similar :to="{ name: 'gants' }" cuando finalice el método seeProduct.

over 4 years ago · Santiago Trujillo 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!