对DOM对象进行操作 let link = document.createElement('a') link.style.display = 'none' //res就是你要导出的东西 link.href = window.URL.createObjectURL(new Blob([res], { type: '' })) link.setAttribute('download', "法外狂徒张三详解" + ".doc") document.body.appendChild(link) link.click()