我尝试禁用拼写检查,但打字稿不满意
<form>
<input
type='text'
name='accountName'
ref={accountName}
onChange={checkName}
spellCheck='false' // <====== Disable spellcheck here
/>
</form>
我得到的错误是...
Type '{ type: string; name: string; ref: RefObject<HTMLInputElement>; onChange: (event: ChangeEvent<Element>) => Promise<void>; spellcheck: string; }' is not assignable to type 'DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>'.
Property 'spellcheck' does not exist on type 'DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>'.ts(2322)