How does vue use router to jump to the page in the click event of methods?

clipboard.png

clipboard.png
5
router-link

clipboard.png

how should I write in setTimeout. I have no idea. Everyone, give me some advice. no, no, no. Give me a hand. Thank you.

Mar.23,2021

<p ref="chengshi" @click="goLink">fdsfdfsf

methods:{ goLink:function(){ setTimeout(function(){ this.$router.push({name: 'searchGoods'}); },5000); } }

reference documentation: vue-router manual programmer navigation


clipboard.png

clipboard.png


see the detailed introduction of vue-router http://router.vuejs.org/en/es.


function name is amazing

Menu