diff --git a/src/views/user/Mynotes.vue b/src/views/user/Mynotes.vue index 190482ff..1ae064db 100644 --- a/src/views/user/Mynotes.vue +++ b/src/views/user/Mynotes.vue @@ -300,7 +300,8 @@ export default { this.$message.error('导出失败'); } else { const link = document.createElement('a');// 创建a标签 - let blob = new Blob([res],{type: 'application/vnd.pdf;charset=UTF-8'}); // 设置文件类型 + // let blob = new Blob([res],{type: 'application/vnd.ms-pdf;charset=UTF-8'}); // 设置文件类型 + let blob = new Blob([res],{type: 'application/pdf;charset=UTF-8'}); // 设置文件类型 link.style.display = "none"; link.href = URL.createObjectURL(blob); // 创建URL link.setAttribute("download", "我的笔记.pdf"); @@ -326,7 +327,7 @@ export default { this.$message.error('导出失败'); } else { const link = document.createElement('a');// 创建a标签 - let blob = new Blob([res],{type: 'application/vnd.ms-excel;charset=UTF-8'}); // 设置文件类型 + let blob = new Blob([res],{type: 'application/vnd.;charset=UTF-8'}); // 设置文件类型 link.style.display = "none"; link.href = URL.createObjectURL(blob); // 创建URL link.setAttribute("download", "我的笔记.xls");