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)}`