From 11db25e35543d4089ae0cf3c844c7c0f5861b6e8 Mon Sep 17 00:00:00 2001 From: bietiaop <1527109126@qq.com> Date: Tue, 4 Feb 2025 21:08:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/file_manage/file_preview_modal.tsx | 12 ++++++------ .../src/components/file_manage/image_name_button.tsx | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/napcat.webui/src/components/file_manage/file_preview_modal.tsx b/napcat.webui/src/components/file_manage/file_preview_modal.tsx index 3bb23bfe..897d3a77 100644 --- a/napcat.webui/src/components/file_manage/file_preview_modal.tsx +++ b/napcat.webui/src/components/file_manage/file_preview_modal.tsx @@ -45,6 +45,12 @@ export default function FilePreviewModal({ } ) + useEffect(() => { + if (filePath) { + run() + } + }, [filePath]) + let contentElement = null if (!supportedPreviewExts.includes(ext)) { contentElement =