downloadFileMethod(file){
let that = this;
event.preventDefault();
axios({
method: 'get',
url: that.downloadCommonUrl+'?id='+file.id,
responseType: 'blob'
}).then(data => {
let balo = data.data;
if(balo.length=0){
return;
}
let url = window.URL.createObjectURL(new Blob([balo]))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', file.name)
document.body.appendChild(link)
link.click()
})
}
element upload组件调用::on-preview="downloadFileMethod"