vue-router push

//push 方法一 对象
                // this.$router.push({path:'HelloWorld2'});
                //push 方法二 命名的路由
                // this.$router.push({name:'HelloWorld2',params: { userId: 123 }});
                // push 方法三 带查询参数,变成 /HelloWorld2?plan=private
                this.$router.push({ path: 'HelloWorld2', query: { plan: 'private' }})

猜你喜欢

转载自www.cnblogs.com/mengfangui/p/9155344.html