input 输入框自动获取用户密码报错Cannot read properties of undefined (reading ‘toLowerCase‘)

最近项目登录页面的时候会自动获取浏览器保存的用户名和密码,出现了报错了

Uncaught TypeError: Cannot read properties of undefined (reading ‘toLowerCase’)
at HTMLDocument.eval (eval at (eval at pushExceTo (adb_ct.js:1:1)), :1:62695)

但是这个报错并不影响操作,为了解决报错

<el-input placeholder="请输入" class="input-css" v-model="form.password" show-password
          autocomplete="new-password">
        </el-input>

添加autocomplete=“new-password” 这个报错就解决了 报错是由于浏览器对于input框的自动填充,添加后报错会消失,但是自动填充功能也就没有了

Guess you like

Origin blog.csdn.net/qq_32881447/article/details/128200519