From b97c867ac31952dad5e69df5cec0bf927864b931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Sun, 17 Aug 2025 17:52:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=20=E8=81=9A=E7=84=A6=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ai-suggestion-bar.tsx | 7 +++---- components/pages/work-flow.tsx | 4 ++-- components/pages/work-flow/thumbnail-grid.tsx | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/components/ai-suggestion-bar.tsx b/components/ai-suggestion-bar.tsx index ecb8211..05418d5 100644 --- a/components/ai-suggestion-bar.tsx +++ b/components/ai-suggestion-bar.tsx @@ -7,7 +7,7 @@ interface AISuggestionBarProps { suggestions: string[]; onSuggestionClick: (suggestion: string) => void; onSubmit: (text: string) => void; - onFocus: () => void; + onClick: () => void; placeholder?: string; } @@ -15,7 +15,7 @@ export function AISuggestionBar({ suggestions, onSuggestionClick, onSubmit, - onFocus, + onClick, placeholder = "输入你的想法,或点击预设词条获取 AI 建议..." }: AISuggestionBarProps) { const [inputText, setInputText] = useState(''); @@ -89,7 +89,7 @@ export function AISuggestionBar({ -
+
{/* 智能预设词条 英文 */} {showSuggestions && !isCollapsed && ( @@ -179,7 +179,6 @@ export function AISuggestionBar({ if (isCollapsed) { toggleCollapse(); } - onFocus(); }} onBlur={() => setIsFocused(false)} placeholder={isCollapsed ? "点击展开..." : placeholder} diff --git a/components/pages/work-flow.tsx b/components/pages/work-flow.tsx index a4bc0f0..991adbf 100644 --- a/components/pages/work-flow.tsx +++ b/components/pages/work-flow.tsx @@ -168,7 +168,7 @@ const WorkFlow = React.memo(function WorkFlow() { {taskObject.currentStage !== 'final_video' && taskObject.currentStage !== 'script' && (
setIsPauseWorkFlow(true)} + onClick={() => setIsPauseWorkFlow(true)} placeholder="Please input your ideas, or click the predefined tags to receive AI advice..." /> diff --git a/components/pages/work-flow/thumbnail-grid.tsx b/components/pages/work-flow/thumbnail-grid.tsx index f284d5f..edba93e 100644 --- a/components/pages/work-flow/thumbnail-grid.tsx +++ b/components/pages/work-flow/thumbnail-grid.tsx @@ -8,7 +8,7 @@ import { Loader2, X } from 'lucide-react'; import { TaskObject } from '@/api/DTO/movieEdit'; interface ThumbnailGridProps { - isEditModalOpen: boolean; + isDisabledFocus: boolean; taskObject: TaskObject; isLoading: boolean; currentSketchIndex: number; @@ -22,7 +22,7 @@ interface ThumbnailGridProps { } export function ThumbnailGrid({ - isEditModalOpen, + isDisabledFocus, taskObject, isLoading, currentSketchIndex, @@ -124,7 +124,7 @@ export function ThumbnailGrid({ // 监听键盘事件 useEffect(() => { // 组件挂载时自动聚焦 - if (thumbnailsRef.current && !isEditModalOpen) { + if (thumbnailsRef.current && !isDisabledFocus) { thumbnailsRef.current.focus(); } @@ -134,7 +134,7 @@ export function ThumbnailGrid({ // 确保在数据变化时保持焦点 useEffect(() => { - if (thumbnailsRef.current && !isFocused && !isEditModalOpen) { + if (thumbnailsRef.current && !isFocused && !isDisabledFocus) { thumbnailsRef.current.focus(); } }, [taskObject.currentStage, isFocused]);