axios({ method: 'post', data: param, responseType:'blob', url: _urls + '/Downloaddata' }).then(data=>{ var blob = new Blob([data.data], {type: "application/vnd.ms -excel"} ); var url = window.URL.createObjectURL(blob); window.location.href = url; })
完成,后台记得返回文件时 把文件转成blob格式,ie暂时不能用