From 4d72a77aeb9977d8f84dbc3044667353d1b8927c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 7 Oct 2026 10:54:32 +0800 Subject: [PATCH] =?UTF-8?q?OnlineValuesCard=20=E7=BA=BF=E4=B8=8A=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=96=87=E6=A1=88=E6=91=8A=E5=B9=B3=E5=B5=8C=E5=A5=97?= =?UTF-8?q?=E4=B8=89=E5=85=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 模板字符串里的版本号后缀与已发布/未发布两态改为先算 onlineSummary 变量 - 行为不变,去掉嵌套三元 --- .../export/tabs/taonier/OnlineValuesCard.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/project-development/export/tabs/taonier/OnlineValuesCard.tsx b/apps/ai-game-creator-shell/src/view/project-development/export/tabs/taonier/OnlineValuesCard.tsx index 7a8182a6d..790acd847 100644 --- a/apps/ai-game-creator-shell/src/view/project-development/export/tabs/taonier/OnlineValuesCard.tsx +++ b/apps/ai-game-creator-shell/src/view/project-development/export/tabs/taonier/OnlineValuesCard.tsx @@ -41,6 +41,17 @@ export function OnlineValuesCard({ onAdoptCover: () => void; onAdoptScreenshots: () => void; }) { + // 先把「已发布」这段文案算成变量,避免在模板字符串里再叠一层三元。 + let onlineSummary = + '这个项目还没有发布到游戏广场。发布后会在这里显示线上值。'; + if (onlineState === 'ready' && online?.state === 'update') { + const versionSuffix = + online.latestVersionNumber > 0 + ? `,线上最近提交 v${online.latestVersionNumber}` + : ''; + onlineSummary = `这个项目已发布到游戏广场${versionSuffix}。线上值只读展示,点「沿用」才会写进草稿。`; + } + return (

- {online.state === 'update' - ? `这个项目已发布到游戏广场${ - online.latestVersionNumber > 0 - ? `,线上最近提交 v${online.latestVersionNumber}` - : '' - }。线上值只读展示,点「沿用」才会写进草稿。` - : '这个项目还没有发布到游戏广场。发布后会在这里显示线上值。'} + {onlineSummary}

{TAONIER_FORM_FIELDS.map((meta) => {