网上有很多关于这个问题的资料,什么autocomplete = off 啦  等等啦 , 什么 autocomplete =‘new-password’啦。

可惜都是统统不靠谱的,可能是更新的问题,还是为何,不知道为何这么多无效的资料。

我这记录下载react中可用的解决方案,估计vue或者input也适用:

我这是用的antd:

就是在  form 中最上面 加一个 不显示的 input。加上可读属性!

<Form.Item label=" " className={`list_item regEmailSend_submits forget`}>
    <div className={`no_reg`}>ログイン</div>
    <Input readOnly={true}  autoComplete="off" style={{display:"none"}} />
</Form.Item>

这样,浏览器就不会对其他的input进行自动输入了!

 

 

posted on 2020-09-02 10:44  lllomh  阅读(90)  评论(0编辑  收藏  举报