导出文件格式问题
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')
|
const a = document.createElement('a')
|
||||||
// xls类型: application/vnd.ms-excel
|
// xls类型: application/vnd.ms-excel
|
||||||
// xlsx类型:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
// 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.download = fileName
|
||||||
a.href = href
|
a.href = href
|
||||||
a.click()
|
a.click()
|
||||||
|
|
Loading…
Reference in New Issue