From 0073fbd188b8c62bc99a27bb287293a4e99c9efc Mon Sep 17 00:00:00 2001 From: Linghong Date: Sat, 8 Aug 2026 08:56:12 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=9F=B3=E6=95=88=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=AE=88=E5=8D=AB=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改正 soundEffectDialog 的描述:它只是类型收窄,不做 canonical 化。 说明 canGenerate 守卫与 disabled 同源,是防止未来移除 disabled 后漏发付费请求的冗余防线。 --- .../image-editor/ImageCanvasGenerationComposerView.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/image-editor/ImageCanvasGenerationComposerView.tsx b/src/components/image-editor/ImageCanvasGenerationComposerView.tsx index bd347e2a5..32610af16 100644 --- a/src/components/image-editor/ImageCanvasGenerationComposerView.tsx +++ b/src/components/image-editor/ImageCanvasGenerationComposerView.tsx @@ -1407,8 +1407,10 @@ function ImageCanvasAudioGenerationComposerView({ disabled={!canGenerate} aria-label={dialogLabel} onClick={() => { - // SFX 提交的是 canonical 化后的 soundEffectDialog,且守卫沿用 canGenerate - // (含空提示词与 2048 上限),不能退回通用 composer 的 dialog / !isGenerating。 + // 与 disabled 用同一个 canGenerate 做冗余守卫:原生 disabled 已经挡住点击, + // 但若将来去掉 disabled 或换成非原生按钮,空提示词、超限和优化中仍不能把 + // 付费请求发出去。soundEffectDialog 与 dialog 值相同,这里取前者只为与 + // 本分支其余 SFX 代码保持一致。 if (canGenerate) { onSubmit(soundEffectDialog); }