feat: support preview pdf file

This commit is contained in:
zzs 2025-03-04 15:31:11 +08:00
parent 639894ec2f
commit 75b6789432

View File

@ -60,7 +60,7 @@ async function handleOnlineView(record: Recordable, type: 'openNewTab' | 'iframe
console.warn(record) console.warn(record)
console.warn(type) console.warn(type)
const fileType = record.name.substring(record.name.lastIndexOf('.') + 1) const fileType = record.name.substring(record.name.lastIndexOf('.') + 1)
if (!'docx xlsx pptx'.includes(fileType)) { if (!'docx xlsx pptx pdf'.includes(fileType)) {
createMessage.success(`暂不支持预览 ${fileType} 格式文件!`) createMessage.success(`暂不支持预览 ${fileType} 格式文件!`)
return return
} }