vue路由

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 }})
君不见,高堂明镜悲白发,朝如青丝暮成雪
原文地址:https://www.cnblogs.com/lzhflzjx/p/13612126.html