原文出處:https://blog.csdn.net/weixin_40030173/article/details/98085887
https://blog.csdn.net/caiye_007/article/details/109581915
// 界面代碼 <a @click="downFile()">{{文件名}}</a> // 文件下載 downFile () { let a = document.createElement('a') a.href = `使用后端的請求url` // 這里的請求方式為get,如果需要認證,接口上需要帶上token a.click() },