创建a标签使用get请求下载文件

创建a标签使用get请求下载文件

 let url = `${BaseUrl.path}/aa/bb/cc?no=${this.sqcode}&pae=${this.wlName}&ase=${this.setDate(this.data[0])}&eae=${this.setDate(this.data[1])}&esy=${this.empId}&aay=${this.sqName}`;
      const a = document.createElement('a')
      a.style.display = 'none';
      a.setAttribute('target', '_blank');
      a.href = url;
      a.click();

原文地址:https://www.cnblogs.com/sugartang/p/12022269.html