VUE with parameters opens a page in a new window

 Jump page writing method

 // 本页面跳转到详情
    watchDetail(item) {
      console.log(item)
      const { href } = this.$router.resolve({
        path: '/resourcedirectory/resourceDataDetails',
        query: {
          entityId:item.ID,
          publicityId:this.publicityId
        }
      });
      window.open(href, '_blank');
    }

 

The jump target page accepts the parameter this.$route.query.?;

created() {
    this.queryParam.publicityId = this.$route.query.publicityId;
    this.searchEsParam.id = this.$route.query.entityId;
    this.searchEsParam.publicityId = this.$route.query.publicityId;
    console.log(this.$route.query.entityId)
    console.log(this.$route.query.publicityId)
  },

Guess you like

Origin blog.csdn.net/liuchenhaoy/article/details/127288152