this.$router.push

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 }})


posted @ 2019-08-16 23:06  FFLYY  阅读(162)  评论(0编辑  收藏  举报