通过url下载文件downloadFile(dfile){//dfile为文件地址fetch(dfile).then(res=>res.blob()).then(blob=>{//链接地址字符内容转换为blob地址consta=document.createElement('a')a.href=URL.createObjectURL(blob)console.log(a.href)//截取路径中的文件名a.download=dfile.substring(dfile.lastIndexOf("/")+1,dfile.length)//下载文件的名称document.body.appendChild(a)a.click()![]})},
