From 1ad33332f507f0ec1014909447a52723ad05fb62 Mon Sep 17 00:00:00 2001 From: toesbieya <1647775459@qq.com> Date: Fri, 3 Jul 2020 10:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/utils/file.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vue/src/utils/file.js b/vue/src/utils/file.js index ea21a7a..8d39e04 100644 --- a/vue/src/utils/file.js +++ b/vue/src/utils/file.js @@ -14,8 +14,7 @@ const defaultOptions = { //文件预览 export function preview(url) { - const connectChar = url.includes('?') ? '&' : '?' - url = url + connectChar + 'fullfilename=' + url.replace(attachmentPrefix, '') + url = `${url}&fullfilename=${url.replace(attachmentPrefix, '')}` const anchor = document.createElement('a') anchor.style.visibility = 'hidden' anchor.href = `${filePreviewPrefix}/onlinePreview?url=${encodeURIComponent(url)}`