From c1eb1ea7a1ec2920c1e9dc5b9c5f4622d84cab19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Wed, 24 Jan 2024 10:59:55 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/EditorPage.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/EditorPage.vue b/src/views/EditorPage.vue index 1d94ebc..71c72d4 100644 --- a/src/views/EditorPage.vue +++ b/src/views/EditorPage.vue @@ -294,7 +294,9 @@ export default { * @param file */ viewFileClick (file) { - const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + this.$route.query.fileName))}` + const filePaths = file.filePath.split('/') + const fileName = filePaths[filePaths.length - 1] + const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}` window.open(url, '_blank') }, /**