通过url下载文件

 downloadFile(dfile) {      // dfile是文件地址      fetch(dfile).then(res => res.blob()).then(blob => { // 将链接地址字符内容转变成blob地址        const a = 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()![]      })    },