post请求导出Excel表格
axios . interceptors . response . use (( response ) => { if ( response . config && response . config . responseType == 'blob' ) { const blob = new Blob ([ response . data ], { type: 'application/x-msdownload' }); //后台需要相同的type let filename = ` ${ name } .xls` ; if ( 'download' in document . createElement ( 'a' )) { const downloadElement = document . createElement ( 'a' ); let href = '' ; if ( window . URL ) href = window . URL . createObjectURL ( blob ); else href = window . webkitURL . createObjectURL ( blob ); downloadElement . href = href ; downloadElement . download = filename ; document .