vue的this.$router.push()方法跳转路由带参数

这个方法需要注意一点,path和params不能同时使用使用了path,params就失效了

解决方法  加入 路由a 跳转到 路由b

路由a

        this.$router.push({
            name:"Show", 
            params: { 
              key:value
            }

        })

路由b

    this.$route.params中就有a传的参数了

猜你喜欢

转载自blog.csdn.net/liuguochao1024/article/details/80204085