2020
10-10
10-10
Vue this.$router.push(参数)实现页面跳转操作
很多情况下,我们在执行点击按钮跳转页面之前还会执行一系列方法,这时可以使用this.$router.push(location)来修改url,完成跳转。push后面可以是对象,也可以是字符串://字符串this.$router.push('/home/first')//对象this.$router.push({path:'/home/first'})//命名的路由this.$router.push({name:'home',params:{userId:wise}})跳转页面并传递参数的方法:1.Params由于动态路由也是传递params的,所以在this...
继续阅读 >