From e88edbe165c6a814396f4dac789ea933abfbdb2b Mon Sep 17 00:00:00 2001 From: Stringadmin Date: Fri, 12 Jun 2026 12:37:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=20compact=20=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=A1=86=E3=80=81=E7=94=BB=E5=B8=83=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E3=80=81=E5=88=A0=E5=9B=BE=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E5=8F=8A=E6=AF=94=E4=BE=8B=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - compact 模式尺寸调整,生成按钮不再溢出框外 - 生成时自动进入 compact 状态,idle 时恢复 - 删除所有样图后重置为新对话状态(清除画布、恢复标题) - 去掉 drag handle 模式标签,原图右上角统一高级黑 tag - 作品图不再显示重复标识 - 比例弹窗宽度自适应内容,添加 hover/active 交互样式 - 套图模式默认三种各一张 - 设置弹窗点击外部可关闭 - 历史记录删除按钮样式优化 Co-Authored-By: Claude Opus 4.7 --- src/features/ecommerce/EcommercePage.tsx | 47 +++++--- src/styles/ecommerce-standalone.css | 143 +++++++++++++++-------- 2 files changed, 120 insertions(+), 70 deletions(-) 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}