vue-route中this.$router.go()和this.$router.push()的差别

this.$router.go(val) => 在history记录中前进或者后退val步,当val为0时刷新当前页面。
this.$router.push(path) => 在history栈中添加一条新的记录。

 

posted @ 2020-08-27 09:26  甜粽子  阅读(4039)  评论(0编辑  收藏  举报