码迷,mamicode.com
首页 > 其他好文 > 详细

this.$router.push

时间:2019-08-17 01:22:33      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:his   home   str   class   点击   word   distrib   route   comment   

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

// 字符串
this.$router.push(‘/home/first‘)
// 对象
this.$router.push({ path: ‘/home/first‘ })
// 命名的路由
this.$router.push({ name: ‘home‘, params: { userId: wise }})

例如:

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


this.$router.push

标签:his   home   str   class   点击   word   distrib   route   comment   

原文地址:https://www.cnblogs.com/fan-1994716/p/11366797.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!