/**
* 下载考试模板
* *****/
async downloadFile() {
// 替换为你的文件 URL
const fileUrl = '你的url';
const fileName = '考试模板.xls';
const response =await fetch(fileUrl);
const blob =await response.blob();
// 创建一个a标签,设置下载链接,并模拟点击
const a = document.createElement('a');
a.href = window.URL.createObjectURL(blob);
a.download = fileName; // 设置下载时显示的文件名
document.body.appendChild(a);
a.click();
// 清理创建的元素
document.body.removeChild(a);
},