fix: 关闭 pdf 预览 (#5838)
Some checks failed
Build Test / build-linux-binary (push) Failing after -6m37s
Build / SonarCloud (push) Failing after -6m40s
sync2gitee / repo-sync (push) Failing after -6m42s

pdfjs 安全漏洞,后续版本增加预览 pdf
This commit is contained in:
2024-07-16 19:17:27 +08:00 committed by GitHub
parent 464392f7e1
commit 3b1df05ae0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 12 deletions

View file

@ -30,7 +30,6 @@
"@highlightjs/vue-plugin": "^2.1.0",
"@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.8",
"@vue-office/pdf": "^2.0.2",
"@vueuse/core": "^8.9.4",
"@xterm/addon-fit": "^0.10.0",
"@xterm/xterm": "^5.5.0",

View file

@ -695,7 +695,7 @@ const openDeCompress = (item: File.File) => {
const openView = (item: File.File) => {
const fileType = getFileType(item.extension);
const previewTypes = ['image', 'video', 'audio', 'pdf', 'word', 'excel'];
const previewTypes = ['image', 'video', 'audio', 'word', 'excel'];
if (previewTypes.includes(fileType)) {
return openPreview(item, fileType);
}

View file

@ -35,15 +35,6 @@
<audio v-else-if="fileType === 'audio'" :src="fileUrl" controls></audio>
<vue-office-pdf
v-else-if="fileType === 'pdf'"
:src="fileUrl"
:style="isFullscreen ? 'height: 90vh' : 'height: 80vh'"
class="w-full"
@rendered="renderedHandler"
@error="errorHandler"
/>
<vue-office-docx
v-else-if="fileType === 'word'"
:src="fileUrl"
@ -73,7 +64,6 @@ import { ref } from 'vue';
import { Close, FullScreen } from '@element-plus/icons-vue';
import VueOfficeDocx from '@vue-office/docx';
import VueOfficeExcel from '@vue-office/excel';
import VueOfficePdf from '@vue-office/pdf';
import '@vue-office/docx/lib/index.css';
import '@vue-office/excel/lib/index.css';
import { MsgError } from '@/utils/message';