vue-axios 下载 zip文件包
axios({ method: 'get', url: '/api/group/export', params: data, headers: { Authentication: localStorage.getItem('token'), Accept: 'application/vnd.openxmlformats-officedocument' }, responseType: 'blob' }).then(response => { console.log(response.data); const blob = new Blob([response.data], {type: 'application/zip'}); const filename = response.headers['content-disposition']; const downloadElement = document.createElement('a'); const href = window.URL.createObjectURL(blob); //创建下载的链接 console.log(href); downloadElement.href = href; [downloadElement.download] = [filename.split('=')[1]]; document