1.拿到后端返回的excel文件编码
2.执行如下代码传入excel文件编码
var url = window.URL.createObjectURL(new Blob([res.data])) const link = document.createElement('a') link.href = url link.download = this.$t('sbom.spDef') + '.xlsx' document.body.appendChild(link) link.click() document.body.removeChild(link) window.URL.revokeObjectURL(url) this.expLoading = false