From 411b50c81989ae83032381859ab1d5e796e61b3b Mon Sep 17 00:00:00 2001 From: 86182 Date: Tue, 18 Oct 2022 11:45:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BApdf=E6=89=93=E4=B8=8D?= =?UTF-8?q?=E5=BC=80=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/Mynotes.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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");