vue中的this.$router.replace()和.push()和.go()的区别解析 2022年7月6日09:17:59 1. this.$router.push() 跳转到不同的url,但这个方法会向history栈添加一个记录,点击后会返回到上一个页面。 2. this.$router.replace() 跳转到不同的url,这个方法不会向history栈添加一个记录,点击后会返回到上上一个页面 3. this.$router.go(n) 向前向后跳转n个页面,n为正数向前跳转n个页面,负数后退n个页面