this.$router.push传参

  1. this.$router.push({name:'/xx/xx',query: {id:'1'}});
  2. this.$router.push({name:'/xx/xx',params: {id:'1'}});
  3. this.$router.push({path:'/xx/xx',query: {id:'1'}});
  4. this.$router.push({path:'/xx/xx',params: {id:'1'}});
   // 跳转到新增/编辑界面
        toChildPage(item) {
            console.log(item.PUBLISHCHANNELRELID);
            if (item) {
                debugger;
                this.$router.push({ name: 'EditSyncsign', query: {
                    relId: item.PUBLISHCHANNELRELID
                }});
            } else {
                this.$router.push({ name: 'EditSyncsign' });
            }
        },

跳转到的页面获取路由参数:

1.this.$route.query
2.this.$route.params


原文地址:https://www.cnblogs.com/zaco/p/14177501.html