使用this.$router.resolve跳转传递对象接收不到

如果是数字的话就可以传递并打印出来,但是若化成对象就打印错误

let pathInfo = this.$router.resolve({
    path:'/LiveBroadcastingRoom',
         query: {
            liveingInfo:res.data.data ,
             },
})
window.open(pathInfo.href, '_blank');

新页面接收

  created() {
    this.liveingInfo = this.$route.query.liveingInfo;
    console.log(this.liveingInfo);
  },

res.data.data是一个对象

阅读 3.9k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题