下载
作者:互联网
downFileFn(record) { console.log(record) var x = new XMLHttpRequest() x.open('GET', record.fileUrl, true) x.responseType = 'blob' x.onload = function(e) { var url = window.URL.createObjectURL(x.response) var a = document.createElement('a') a.href = url a.download = record.fileName a.click() } x.send() },
标签:XMLHttpRequest,url,record,createObjectURL,var,download,下载 来源: https://www.cnblogs.com/eihanhan/p/16148252.html