diff --git a/packages/shared/src/components/PlatformProfileRechargeModal/index.tsx b/packages/shared/src/components/PlatformProfileRechargeModal/index.tsx index 619bfae2e..04ed1522c 100644 --- a/packages/shared/src/components/PlatformProfileRechargeModal/index.tsx +++ b/packages/shared/src/components/PlatformProfileRechargeModal/index.tsx @@ -54,7 +54,10 @@ function resolveRovingIndex( case 'End': return length - 1; case 'ArrowLeft': - return (currentIndex - 1 + length) % length; + // 未选中(-1)时应回卷到最后一项,而不是 (length - 2) % length。 + return currentIndex < 0 + ? length - 1 + : (currentIndex - 1 + length) % length; case 'ArrowRight': return (currentIndex + 1) % length; default: