详情页修改

This commit is contained in:
2026-10-08 11:47:35 +08:00
parent 99ab0a1183
commit f8c25dc9b8
5 changed files with 48 additions and 43 deletions
+9 -3
View File
@@ -41,7 +41,7 @@ const handleFileType = (type:string) => {
</div>
</template>
<!-- Word 预览 -->
<template v-if="handleFileType(previewFile?.file_type) === 'word'">
<template v-else-if="handleFileType(previewFile?.file_type) === 'word'">
<VueOfficeDocx :src="previewFile?.file_url" class="w-full items-center" />
</template>
<!-- Excel 预览 -->
@@ -49,15 +49,21 @@ const handleFileType = (type:string) => {
<VueOfficeExcel :src="previewFile?.file_url" class="w-full items-center" />
</template>
<!-- Ppt 预览 -->
<template v-if="handleFileType(previewFile?.file_type) === 'ppt'">
<template v-else-if="handleFileType(previewFile?.file_type) === 'ppt'">
<VueOfficePptx :src="previewFile?.file_url" class="w-full items-center" />
</template>
<!-- PDF 预览 -->
<template v-if="handleFileType(previewFile?.file_type) === 'pdf'">
<template v-else-if="handleFileType(previewFile?.file_type) === 'pdf'">
<div class="h-[68vh]">
<PDF :src="previewFile?.file_url" class="w-full h-full items-center" />
</div>
</template>
<!-- 其他类型文件预览 -->
<template v-else>
<div class="flex items-center justify-center py-2">
<p>暂不支持预览该文件类型</p>
</div>
</template>
</div>
</template>