function download(){ const link = document.createElement('a') link.href = window.location.origin + `/static/doc/${this.type}.docx` + '?auth=' + getToken() const fileName = '20230615.docx' link.download = fileName document.body.appendChild(link) link.click() document.body.removeChild(link) }
标签:body,web,link,file,download,document,本地下载 From: https://www.cnblogs.com/dhjy123/p/17483129.html