2018-05-18 axios的post方式下载excel文件及git gui操作工具

1.axios post方式下载excel文件


calculationResultExport(data) {

axios.post('/wechat/myd/calculationResultExport', data, {responseType:'arraybuffer'}).then((res) => {

let blob =new Blob([res.data], {type:"application/vnd.ms-excel"});

let objectUrl =URL.createObjectURL(blob);

let link_a=document.createElement('a');

let file_name='test.xls';

link_a.href=objectUrl;

link_a.download=file_name;

link_a.click();

}).catch(function (res) {

});

}

相关参考:http://www.cnblogs.com/wanliyuan/p/5650105.html


2.git 工具sourceTree免登录https://blog.csdn.net/u011498933/article/details/78329448

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容