this.$route和this.$router的区别

做项目的时候发现传参数是通过 this.$route.query或者 this.$route.params接收router-link传的参数。 在路由跳转的时候除了用router-link标签以外需要在script标签在事件里面跳转,所以有个方法就是在script标签里面写this.$router.push('要跳转的路径名'),还有this.$router.go(-1)返回上一页面  在写的时候
相关文章
相关标签/搜索