【js】文件下载
const donwLoadFn = (arr) => { if (arr.length <= 0) return const fullUrl = `http://192.168.2.50:9803${arr[0]?.filePath}` fetch(fullUrl) .then(res => res.blob()) .then(blob => { const a = document.createElement("a"); const objectUrl = window.URL.createObjectURL(blob); a.download = arr[0]?.fileName; a.href = objectUrl; a.click(); window.URL.revokeObjectURL(objectUrl); a.remove(); }) }

浙公网安备 33010602011771号