fix: 文件预览

This commit is contained in:
bietiaop committed 2025-02-04 21:08:28 +08:00
1 parent ecd2fba629
commit 11db25e355
2 files changed
+8 -7

No files matched your search

@@ -45,6 +45,12 @@ export default function FilePreviewModal({
}
)
useEffect(() => {
if (filePath) {
run()
}
}, [filePath])
let contentElement = null
if (!supportedPreviewExts.includes(ext)) {
contentElement = <div>暂不支持预览此文件类型</div>
@@ -68,12 +74,6 @@ export default function FilePreviewModal({
)
}
useEffect(() => {
if (filePath) {
run()
}
}, [])
return (
<Modal isOpen={isOpen} onClose={onClose} scrollBehavior="inside" size="3xl">
<ModalContent>