导出文件格式问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6980cd275e
commit
fead8b8c8f
|
@ -50,7 +50,8 @@ service.interceptors.response.use(
|
|||
const a = document.createElement('a')
|
||||
// xls类型: application/vnd.ms-excel
|
||||
// xlsx类型:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
||||
const href = URL.createObjectURL(new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' }))
|
||||
// const href = URL.createObjectURL(new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' }))
|
||||
const href = URL.createObjectURL(new Blob([res], { type: response.headers['content-type'] }))
|
||||
a.download = fileName
|
||||
a.href = href
|
||||
a.click()
|
||||
|
|
Loading…
Reference in New Issue