mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
试题模板更换
This commit is contained in:
BIN
public/template/test-question-template.xls
Normal file
BIN
public/template/test-question-template.xls
Normal file
Binary file not shown.
Binary file not shown.
@@ -383,12 +383,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
downloadTemplate(){
|
||||
let fileName = "试题导入模板.xlsx";
|
||||
let fileName = "试题导入模板.xls";
|
||||
let link = document.createElement('a'); //创建a标签
|
||||
link.style.display = 'none'; //使其隐藏
|
||||
link.download = this.webBaseUrl+'/template/test-question-template.xlsx';
|
||||
link.download = this.webBaseUrl+'/template/test-question-template.xls';
|
||||
link.setAttribute('target', '_blank');
|
||||
link.href = this.webBaseUrl+'/template/test-question-template.xlsx'; //赋予文件下载地址
|
||||
link.href = this.webBaseUrl+'/template/test-question-template.xls'; //赋予文件下载地址
|
||||
link.setAttribute('download', fileName); //设置下载属性 以及文件名
|
||||
document.body.appendChild(link); //a标签插至页面中
|
||||
link.click(); //强制触发a标签事件
|
||||
|
||||
Reference in New Issue
Block a user