登录后复制 exportIotMS(this.exportForm).then(response=>{ this.download1(response) }) download1 (data) { const blob = new Blob([data]);//处理文档流 const fileName = this.exportForm.clientId+'_'+this.exportForm.firmId+'_'+this.exportForm.productId+'_'+new Date().getTime()+'.txt'; const elink = document.createElement('a'); elink.download = fileName; elink.style.display = 'none'; elink.href = URL.createObjectURL(blob); document.body.appendChild(elink); elink.click(); URL.revokeObjectURL(elink.href); // 释放URL 对象 document.body.removeChild(elink); }, 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16. 原创作者: song 转载于: https://blog.51cto.com/song/11868793