this. r o u t e r . g o ( ) 和 t h i s . router.go()和this. router.go()和this.router.push()的差别
-
this.$router.go(val) => 在history记录中前进或者后退val步,
当val为-1时回到上一页。
当val为0时刷新当前页面。
当val为1到下一页。 -
this.$router.push(path) => 在history栈中添加一条新的记录。
this. r o u t e r . g o ( ) 和 t h i s . router.go()和this. router.go()和this.router.push()的差别
this.$router.go(val) => 在history记录中前进或者后退val步,
当val为-1时回到上一页。
当val为0时刷新当前页面。
当val为1到下一页。
this.$router.push(path) => 在history栈中添加一条新的记录。