第一种方式 router-link跳转:
第二种方式 this.$router.push()
第三种方式this.$router.replace() 跟this.$router.push()一种写法
第四种方式this.$router.go(n)
向前或者向后跳转n个页面,n可为正整数或负整数
跳转到指定url路径,点击后退会返回到上一个页面
this.$router.push
跳转到指定url路径,但是history栈中不会有记录,点击返回会跳转到上个页面 (直接替换当前页面)。
this.$router.replace
向前或者向后跳转n个页面,n可为正整数或负整数。
this.$router.go(n)