fix(练习): 修复Windows平台中文输入法问题

- 输入法组合期间阻止自动跳转和字符分散
- 输入法确认后将组合字符正确分散到多个输入框
- 确保中文输入正常工作

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
This commit is contained in:
ittoview
2026-03-02 01:15:52 +00:00
parent 713c11b382
commit 426a7b0327
2 changed files with 29 additions and 2 deletions

View File

@@ -42,6 +42,13 @@ export function InputArea({
const newInput = [...userInput]
// 输入法组合期间,只更新当前输入框的值,不做任何跳转
if (isComposing) {
newInput[index] = value
onInputChange(newInput)
return
}
// 处理多字符输入(连续输入或粘贴)
if (value.length > 1) {
const chars = value.split('')