From a858069e6dbfca5f43bb60fe099a6ac04dda8108 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Tue, 14 Oct 2025 16:19:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=89=E6=8B=A9=E6=A1=86=E5=BD=95?= =?UTF-8?q?=E5=83=8F=20&=20=E5=AD=98=E6=A1=A3=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client-modules/src/render/components/choices.tsx | 4 +++- packages-user/client-modules/src/render/ui/save.tsx | 6 +++--- 2 files changed, 6 insertions(+), 4 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/ui/save.tsx b/packages-user/client-modules/src/render/ui/save.tsx index 11b9e36..a5b9888 100644 --- a/packages-user/client-modules/src/render/ui/save.tsx +++ b/packages-user/client-modules/src/render/ui/save.tsx @@ -241,10 +241,10 @@ export const Save = defineComponent( }; onMounted(() => { - const startIndex = getPosIndex(core.saves.saveIndex); - selected.value = startIndex - 1; + const startIndex = getPosIndex(core.saves.saveIndex - 1); + selected.value = startIndex; pageRef.value?.changePage( - Math.floor(core.saves.saveIndex / (grid.value.count - 1)) + Math.floor((core.saves.saveIndex - 1) / (grid.value.count - 1)) ); updateDataList(now.value); });