pwindy  
在完成任务的同时,还需要不断“复盘”,不论你多么的忙,都需要留下时间思考,可以思考哪些地方做的好,哪些地方我们可以改进,应该如何改进,注重总结才是王道

1.this.$router.push
跳转到指定url路径,并想history栈中添加一个记录,点击后退会返回到上一个页面

// 字符串
this.$router.push('index') 

// 对象
this.$router.push({path: 'login-pw'})

// 带参数
this.$router.push({path: 'login-pw', query: {'account': this.account.account}})

// 跳转后的页面获取参数
this.account.account = this.$route.query.account

 

2.this.$router.replace
跳转到指定url路径,但是history栈中不会有记录,点击返回会跳转到上上个页面

 

3.this.$router.go(n)
向前或者向后跳转n个页面,n可为正整数或负整数

 

参考---https://blog.csdn.net/weixin_41876674/article/details/82994925

posted on 2021-04-27 17:56  pwindy  阅读(605)  评论(0编辑  收藏  举报