From ca7e1a3fcec15084a04c84049671cdac873957f3 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Wed, 15 Oct 2025 16:34:15 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=90=8C=E6=AD=A5=20template=20?= =?UTF-8?q?=E5=AF=B9=E9=83=A8=E5=88=86=E7=BB=84=E4=BB=B6=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client-modules/src/render/components/choices.tsx | 4 +++- .../src/render/components/textboxTyper.ts | 11 +++++++---- .../src/render/components/thumbnail.tsx | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages-user/client-modules/src/render/components/choices.tsx b/packages-user/client-modules/src/render/components/choices.tsx index b3d1a03..6a27d08 100644 --- a/packages-user/client-modules/src/render/components/choices.tsx +++ b/packages-user/client-modules/src/render/components/choices.tsx @@ -715,6 +715,7 @@ export async function routedConfirm( const confirm = getChoiceRoute(1) === 0; const timeout = core.control.__replay_getTimeout(); core.status.route.push(`choices:${confirm ? 0 : 1}`); + core.status.replay.toReplay.shift(); if (timeout === 0) return confirm; const instance = controller.open(ConfirmBoxUI, { ...(props ?? {}), @@ -769,6 +770,7 @@ export async function routedChoices( const selected = getChoiceRoute(0); const timeout = core.control.__replay_getTimeout(); core.status.route.push(`choices:${selected}`); + core.status.replay.toReplay.shift(); if (timeout === 0) return choices[selected][0]; const instance = controller.open(ChoicesUI, { ...(props ?? {}), @@ -782,7 +784,7 @@ export async function routedChoices( return choices[selected][0]; } else { const choice = await getChoice(controller, choices, loc, width, props); - const index = choices.findIndex(v => v[1] === choice); + const index = choices.findIndex(v => v[0] === choice); core.status.route.push(`choices:${index}`); return choice; } diff --git a/packages-user/client-modules/src/render/components/textboxTyper.ts b/packages-user/client-modules/src/render/components/textboxTyper.ts index f91e534..b74cde1 100644 --- a/packages-user/client-modules/src/render/components/textboxTyper.ts +++ b/packages-user/client-modules/src/render/components/textboxTyper.ts @@ -969,10 +969,13 @@ export class TextContentParser { continue; } else if (char === '$') { // 表达式 - pointer++; - inExpression = true; - expStart = pointer + 1; - continue; + const next = text[pointer + 1]; + if (next === '{') { + pointer++; + inExpression = true; + expStart = pointer + 1; + continue; + } } else if (char === '\n') { // 在这里预先将换行处理为多个 node,会比在分行时再处理更方便 this.addTextNode(pointer + 1, true); diff --git a/packages-user/client-modules/src/render/components/thumbnail.tsx b/packages-user/client-modules/src/render/components/thumbnail.tsx index 00312ca..7f9ef51 100644 --- a/packages-user/client-modules/src/render/components/thumbnail.tsx +++ b/packages-user/client-modules/src/render/components/thumbnail.tsx @@ -22,7 +22,7 @@ export interface ThumbnailProps extends SpriteProps { damage?: boolean; all?: boolean; noHD?: boolean; - /** 缩略图的比例 */ + /** 缩略图的比例,1 表示与实际地图大小一致 */ size?: number; }