mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
parent
464392f7e1
commit
3b1df05ae0
@ -30,7 +30,6 @@
|
|||||||
"@highlightjs/vue-plugin": "^2.1.0",
|
"@highlightjs/vue-plugin": "^2.1.0",
|
||||||
"@vue-office/docx": "^1.6.2",
|
"@vue-office/docx": "^1.6.2",
|
||||||
"@vue-office/excel": "^1.7.8",
|
"@vue-office/excel": "^1.7.8",
|
||||||
"@vue-office/pdf": "^2.0.2",
|
|
||||||
"@vueuse/core": "^8.9.4",
|
"@vueuse/core": "^8.9.4",
|
||||||
"@xterm/addon-fit": "^0.10.0",
|
"@xterm/addon-fit": "^0.10.0",
|
||||||
"@xterm/xterm": "^5.5.0",
|
"@xterm/xterm": "^5.5.0",
|
||||||
|
@ -695,7 +695,7 @@ const openDeCompress = (item: File.File) => {
|
|||||||
const openView = (item: File.File) => {
|
const openView = (item: File.File) => {
|
||||||
const fileType = getFileType(item.extension);
|
const fileType = getFileType(item.extension);
|
||||||
|
|
||||||
const previewTypes = ['image', 'video', 'audio', 'pdf', 'word', 'excel'];
|
const previewTypes = ['image', 'video', 'audio', 'word', 'excel'];
|
||||||
if (previewTypes.includes(fileType)) {
|
if (previewTypes.includes(fileType)) {
|
||||||
return openPreview(item, fileType);
|
return openPreview(item, fileType);
|
||||||
}
|
}
|
||||||
|
@ -35,15 +35,6 @@
|
|||||||
|
|
||||||
<audio v-else-if="fileType === 'audio'" :src="fileUrl" controls></audio>
|
<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
|
<vue-office-docx
|
||||||
v-else-if="fileType === 'word'"
|
v-else-if="fileType === 'word'"
|
||||||
:src="fileUrl"
|
:src="fileUrl"
|
||||||
@ -73,7 +64,6 @@ import { ref } from 'vue';
|
|||||||
import { Close, FullScreen } from '@element-plus/icons-vue';
|
import { Close, FullScreen } from '@element-plus/icons-vue';
|
||||||
import VueOfficeDocx from '@vue-office/docx';
|
import VueOfficeDocx from '@vue-office/docx';
|
||||||
import VueOfficeExcel from '@vue-office/excel';
|
import VueOfficeExcel from '@vue-office/excel';
|
||||||
import VueOfficePdf from '@vue-office/pdf';
|
|
||||||
import '@vue-office/docx/lib/index.css';
|
import '@vue-office/docx/lib/index.css';
|
||||||
import '@vue-office/excel/lib/index.css';
|
import '@vue-office/excel/lib/index.css';
|
||||||
import { MsgError } from '@/utils/message';
|
import { MsgError } from '@/utils/message';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user