1 async downloadFun() { // 下载使用说明书
 2                 const InstructionManualvv = await InstructionManual();
 3 
 4                 let blob = new Blob([InstructionManualvv.data], {type: 'application/pdf;charset=UTF-8'});
 5                 let fileName = '使用说明书.pdf';
 6                 if (window.navigator.msSaveOrOpenBlob) {
 7                     navigator.msSaveBlob(blob, fileName)
 8                 } else {
 9                     var link = document.createElement('a');
10                     link.href = window.URL.createObjectURL(blob);
11                     link.download = fileName;
12                     link.click();
13                     window.URL.revokeObjectURL(link.href) //释放内存
14                 }
15             },

 

相关文章:

  • 2022-12-23
  • 2021-11-18
  • 2022-02-09
  • 2022-02-23
  • 2021-12-23
  • 2022-01-08
猜你喜欢
  • 2022-01-28
  • 2022-12-23
  • 2022-01-21
  • 2021-11-22
  • 2022-01-06
  • 2022-01-13
  • 2022-12-23
相关资源
相似解决方案