import axios from 'axios'
import {
Message } from 'element-ui'
export function postDownload(url, params, fileName, type) {
return new Promise((resolve, reject) => {
axios({
url,
method: 'post',
data: params,
responseType: 'blob',
headers: {
},
})
.then(res => {
if (!res.data.msg) {
let blob
if (type === 'pdf') {
blob = new Blob([res
基于vue的公共下载方法
最新推荐文章于 2024-06-24 19:39:11 发布