只需要这句话红框内容即可。
responseType: "arraybuffer",
文件流解析:
const blob = new Blob(这里是通过调用接口返回的文件流内容) const link = document.createElement('b') link.download =“文件名称” link.style.display = 'none' link.href = URL.createObjectURL(blob) document.body.appendChild(link) link.click() URL.revokeObjectURL(link.href) document.body.removeChild(link)
请叫我小仙女