When I was working on the project, I wrote a part of the code with Vue, and I wanted to use router-link to implement routing jumps, and then refresh the page on the current page.
<router-link to="/someWhere" @click.native="refresh">
<button>按钮</button>
</router-link>
<script>
export default {
...
...
methods:{
refresh:function(){
this.$router.go(0);
}
}
}
</script>
router is a routing instance, for example: var router = new Router({})
router.go(n) is a method of routing, which means how many steps forward or backward in the history record, 0 means it is still current, similar to window.history .go(n)