this.router :
this.$route 是路由【參數對象】,所有路由中的參數, params, query 都屬於它。
用來獲取路由信息,包含的是路由基本信息,如fullPath等,
this.$route.matched[0].name
this.$router 是路由【導航對象】,用它 可以方便的 使用 JS 代碼,實現路由的 前進、後退、 跳轉到新的 URL 地址。
用來進行路由操作,在原型鏈(proto)中包含路由的處理方法,如跳轉push等。
this.$router.push({path:'/addNew'})
this.$router.push('/') //跳轉到根目錄,保留歷史記錄,可以返回
this.$router.replace('/') //跳轉到根目錄,替換掉當前歷史記錄,無法返回替換前的頁面
this.$router.back() //返回上一個頁面
this.$router.go(1) // 1 爲向前跳轉,-1 爲返回(相當於back)
參考:https://blog.csdn.net/LzzMandy/article/details/92782553