let res= await exportCompany({companyId:this.CurrenTable._id,typeId:this.typeId})
let buffer= new Uint8Array(res.data.buffer.data)
const link = document.createElement('a')
const blob = new Blob([buffer],{type:'application/vnd.ms-excel;charset=utf-8'})
link.href = URL.createObjectURL(blob)
link.setAttribute('download',this.CurrenTable.name)
document.body.appendChild(link)
link.click()
document.body.removeChild(link)** **
buffer 文件流导出
最新推荐文章于 2024-06-03 15:24:34 发布