There are four ways to jump the route vue
1. router-link
2. this. $ Router.push () (function call inside)
3. this. $ Router.replace () (use the same push)
4. this.$router.go(n)
A, with no parameters
1.1 router-link
1.2 this.$router.push()
Second, with reference
2.1 router-link
2.2 this.$router.push(query传参
this.$router.go(n)
this. $ router.go (n) this. $ router.go (n) to jump forward or backward n pages, n can be positive or negative integers is
the difference:
this. $ router.push jump to a specified url path and would like to add a record in the history stack, click the back will return to the previous page
this. $ router.replace jump to a specified url path, but there will be no record history stack, click Back will jump to the last page (that is a direct replacement for the current page)
this. $ router.go (n) to jump forward or backward a page of n, n can be positive or negative integers
__EOF__
Source: Elk Lu yo