this.$router.push({})实现路由跳转


使用 this.$router.push(location) 来修改 url,完成跳转

push 后面可以是对象,也可以是字符串:

1 // 字符串
2 this.$router.push('/home/first')
3 // 对象
4 this.$router.push({ path: '/home/first' })
5 // 命名的路由
6 this.$router.push({ name: 'home', params: { userId: wise }})

 

例如:

1 // 点击事件里面写
2 this.$router.push({ name: 'distributesList', query: { ruleForm: this.ruleForm }})

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM