一
在template里面
<router-link to='/home'>aa</router-link>
点击aa跳转到/home页面
二
<button @click="goHome">aa</button>
methods:{ goHome() {this.$router.push("/home");}}
三
this.$router.go(1)向前进一步
this.$router.go(-1)向后退一步
四
this.router.replace()
直接替换掉当前页面,history里面没有记录,返回上一个页面会直接返回上上个页面