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


posted @ 2020-12-23 11:15  走在路上的张先森  阅读(439)  评论(0编辑  收藏  举报