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]);