在input 上写入autoComplete='new-password' 可以禁止浏览器的自动填充密码
1 定义一个变量
const [inputType,setInputType] = useState('text')
2 进入页面的是否将密码输入框的type设置为text
<input type = { inputType } onChange = {onChangePass(e) }/>
3 再jsx函数体内声明onchange函数
const onChangePass= (e) => {
setInputType('password')
}
只有在输入的时候才会将input的类型设置为password
在使用antdpro的时候 name字段不要设置为username。改为其他的字段
<Form.Item name="accountname"></Form.Item>