vue实现word,pdf,xlsx文件下载
导出word文档axios.get(`url`, { //url: 接口地址 responseType: `arraybuffer` //一定要写}).then(res => { if(res.status == 200){ const blob = new Blob([res.data], { type: `application/msword`, //word文档为msword,pdf文档为pdf,msexcel 为excel
原创
2022-03-02 12:07:45 ·
2161 阅读 ·
0 评论