const dow= async (url: string,fileName:string) => {标签:文件,const,url,error,value,mulSelUrls,vue3,下载 From: https://www.cnblogs.com/angin-iit/p/17692646.html
mulSelUrls.value=[]
mulSelUrls.value.push(url as never)
const requests = mulSelUrls.value.map(url => axios.get(url, {responseType: 'blob'}));
try {
const responses = await axios.all(requests);
responses.forEach((response, index) => {
saveAs(response.data, fileName);
});
} catch (error) {
console.error(error);
}
}