ant-design使用Input.Password回显数据时,与浏览器保存的密码冲突问题解决
Input回显数据时,该Input设置为只读状态:添加readOnly属性<Input.Password placeholder={‘请输入密码’} max={30} readOnly onFocus={handleRemoveAttr}></Input.Password>当Input获取焦点时,去除只读属性const handleRemoveAttr = (event: any) => { event.target.removeAttribute('r.
原创
2022-05-19 15:49:59 ·
878 阅读 ·
0 评论