js实现-二进制数据转换为blob

let blob = new Blob([response.data],  {type: 'application/pdf;charset=UTF-8'});
let fileURL = URL.creatObjectURL(blob)

且将响应头的responseType设置为arraybuffer

posted @ 2020-07-26 16:56  ashen1999  阅读(9168)  评论(1编辑  收藏  举报