将其value置为null
<input
type="file"
id="tts-input-text"
accept="text/plain"
onChange={readFile}
onClick={ (e: any) => ( e.target.value = null )} /> //点击时将value置为null