function downPdf(val) { fetch(val).then(respose => { return respose.blob() }).then(blob => { console.log(val); const url = URL.createObjectURL(blob) const a = document.createElement("a") const name = val.substr(val.lastIndexOf('/') + 1, val.length) a.href = url a.download = name a.click() }) } export default downPdf