Js下载文件
/**
* 下载文件
* @param path
* @param name
*/
downFile (path, name) {
let link = document.createElement('a')
link.style.display = 'none'
link.href = path
link.setAttribute('download', name)
document.body.appendChild(link)
link.click()
}
标签:文件,name,Js,link,path,下载
From: https://www.cnblogs.com/sglblog/p/16628562.html