Vue成神之路(七):VueRouter的router.push(),router.replace(),router.go()区别和this.$router传递参数与取值
一:this.$router.push、replace、go的区别1.router.push()方式向路由对象中添加新的路由路径(会在浏览器history中留下记录)声明式:编程式:router.push(…)2.router.replace()方式向路由对象中添加新的路由路径(不会在浏览器history中留下记录)声明式:`编程式:router.replace(…)3.router.go(-1)