From 42aceb44032553935c8e9d3b472782b97301146d Mon Sep 17 00:00:00 2001 From: mtvpls Date: Wed, 31 Dec 2025 19:28:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4videocard=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E5=A4=8D=E6=89=93=E5=BC=80ai=E9=97=AE?= =?UTF-8?q?=E7=89=87=E5=90=8E=E6=97=A0=E6=B3=95=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AIChatPanel.tsx | 4 ++-- src/components/VideoCard.tsx | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/AIChatPanel.tsx b/src/components/AIChatPanel.tsx index 5122dc6..4bb5e66 100644 --- a/src/components/AIChatPanel.tsx +++ b/src/components/AIChatPanel.tsx @@ -106,8 +106,8 @@ export default function AIChatPanel({ }; checkMobile(); - // 聚焦输入框 - if (inputRef.current) { + // 只在非移动设备上聚焦输入框 + if (inputRef.current && window.innerWidth >= 768) { inputRef.current.focus(); } diff --git a/src/components/VideoCard.tsx b/src/components/VideoCard.tsx index f1720ef..2951e5b 100644 --- a/src/components/VideoCard.tsx +++ b/src/components/VideoCard.tsx @@ -593,8 +593,11 @@ const VideoCard = forwardRef(function VideoCard label: 'AI问片', icon: , onClick: () => { - setShowMobileActions(false); // 关闭菜单 - setShowAIChat(true); + setShowMobileActions(false); + // 延迟打开 AIChatPanel,确保 MobileActionSheet 完全清理完成 + setTimeout(() => { + setShowAIChat(true); + }, 250); }, color: 'default' as const, }); @@ -860,7 +863,7 @@ const VideoCard = forwardRef(function VideoCard return false; }} > - {actualYear} + {actualYear.slice(-2)} )} @@ -903,7 +906,7 @@ const VideoCard = forwardRef(function VideoCard {actualEpisodes && actualEpisodes > 1 && orientation === 'vertical' && (