diff --git a/src/features/ecommerce/EcommercePage.tsx b/src/features/ecommerce/EcommercePage.tsx index fbed900..34f86a4 100644 --- a/src/features/ecommerce/EcommercePage.tsx +++ b/src/features/ecommerce/EcommercePage.tsx @@ -981,9 +981,9 @@ const cloneSetCountOptions: Array<{ ]; const cloneSetCountKeys = cloneSetCountOptions.map((option) => option.key); const defaultCloneSetCounts: Record = { - selling: 3, + selling: 1, white: 1, - scene: 3, + scene: 1, }; const minCloneSetTotal = 1; const maxCloneSetTotal = 16; @@ -1674,9 +1674,9 @@ function ProductClonePage(_props: ProductClonePageProps = {}) { const [selectedScenes, setSelectedScenes] = useState([]); useEffect(() => { - if (status === "done") { + if (status === "done" || status === "generating") { setIsCommandComposerCompact(true); - } else if (status === "generating" || status === "idle") { + } else if (status === "idle") { setIsCommandComposerCompact(false); } }, [status]); @@ -2623,6 +2623,12 @@ function ProductClonePage(_props: ProductClonePageProps = {}) { if (next.length === 0) { setStatus("idle"); setResults([]); + setCanvasNodes([]); + setIsCommandComposerCompact(false); + setPreviewOffset({ x: 0, y: 0 }); + previewOffsetRef.current = { x: 0, y: 0 }; + setPreviewZoom(1); + setActiveHistoryRecordId(null); } return next; }); @@ -3013,7 +3019,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) { const composer = commandComposerWrapRef.current; if (composer?.contains(target)) return; - if (composerMenu && composerMenu !== "settings") setComposerMenu(null); + if (composerMenu) setComposerMenu(null); if (status === "done" && !isCommandComposerCompact) setIsCommandComposerCompact(true); }; @@ -3629,6 +3635,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) { setDetailRequirement(""); setSelectedDetailModules(defaultDetailModuleIds); setDetailStatus("idle"); + setIsCommandComposerCompact(false); }; const activeToolMeta = sideTools.find((tool) => tool.key === activeTool); @@ -4655,25 +4662,27 @@ function ProductClonePage(_props: ProductClonePageProps = {}) { } }} > - {node.mode === "set" ? "套图" : node.mode === "detail" ? "详情图" : node.mode === "model" ? "模特图" : node.mode === "hot" ? "爆款图" : node.mode} {node.sourceImage ? ( - +
+ +
) : null}