fix(练习): 修复中文输入法和字符验证问题
- 移除 input maxLength 限制,支持输入法多字符输入 - 使用 ref 保存最新输入状态,避免闭包导致的状态滞后 - 重构验证逻辑,修复字符对比错误(对比原始答案而非标准化答案) - 修复输入法确认后验证使用旧数据的问题 via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
This commit is contained in:
@@ -134,7 +134,6 @@ export function InputArea({
|
||||
!isComposing && isError && 'border-red-500',
|
||||
inputLocked && 'cursor-not-allowed opacity-50'
|
||||
)}
|
||||
maxLength={1}
|
||||
autoComplete="off"
|
||||
autoCorrect="off"
|
||||
autoCapitalize="off"
|
||||
|
||||
Reference in New Issue
Block a user