feat: vue3 axios add download function

This commit is contained in:
xingyu
2022-07-25 21:03:14 +08:00
parent 611e11ae23
commit b085f35dfe
26 changed files with 48 additions and 37 deletions

View File

@ -4,15 +4,15 @@ const request = useAxios()
// 导出Html
export const exportHtmlApi = () => {
return request.get({ url: '/infra/db-doc/export-html', responseType: 'blob' })
return request.download({ url: '/infra/db-doc/export-html' })
}
// 导出Word
export const exportWordApi = () => {
return request.get({ url: '/infra/db-doc/export-word', responseType: 'blob' })
return request.download({ url: '/infra/db-doc/export-word' })
}
// 导出Markdown
export const exportMarkdownApi = () => {
return request.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' })
return request.download({ url: '/infra/db-doc/export-markdown' })
}