js文件下载
if (response.status == 200) {
this.$message.success("下载成功!");
const blob = new Blob([response.data], {
type: "application/msword"
});
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob);
downloadElement.href = href
downloadElement.download = con.name + '.doc'
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement)
window.URL.revokeObjectURL(href)
console.log(response.data.data)
} else {
this.$message.error("下载文件异常!");
}