From 73eb7fccf69d3d7b8e4938d9249a9ad981d870da Mon Sep 17 00:00:00 2001 From: jmal Date: Thu, 11 Jun 2020 09:25:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0pdf=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShowFile/ShowFile.vue | 7 ++++++- src/main.js | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index a4d34f7..9d90dcd 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -2518,6 +2518,11 @@ Bus.$emit('onAddAudio',row, this.audioCoverUrl) return } + if(row.suffix === 'pdf'){ + // pdf文件 + window.open(`${process.env.VUE_APP_BASE_FILE_API}/preview/${row.name}?jmal-token=${this.$store.state.user.token}&fileIds=${row.id}`, '_blank') + return + } if(suffix.compressedFile.includes(row.suffix)){ // 压缩文件 this.openCompressionVisible = true @@ -2542,7 +2547,7 @@ this.notPreviewDialogVisible = false }, downLaod(file){ - window.open(`${process.env.VUE_APP_BASE_FILE_API}preview/${file.name}?jmal-token=${this.$store.state.user.token}&fileIds=${file.id}`, '_self') + window.open(`${process.env.VUE_APP_BASE_FILE_API}/preview/${file.name}?jmal-token=${this.$store.state.user.token}&fileIds=${file.id}`, '_self') }, } } diff --git a/src/main.js b/src/main.js index b44fc7c..a89acff 100644 --- a/src/main.js +++ b/src/main.js @@ -19,8 +19,8 @@ import { Popup,Search, Button, Cell, CellGroup, Image, List, PullRefresh, SwipeC // ant-design-vue -import { Tree } from 'ant-design-vue'; -Vue.use(Tree) +// import { Tree } from 'ant-design-vue'; +// Vue.use(Tree) // mavonEditor import mavonEditor from 'mavon-editor'