不多说,先上代码:谷歌浏览器记住密码之后 点击input 会出来浏览器记住账号和密码:
解决办法:
<el-row style="margin-top:60px;"> <el-col :span="12"> <el-form-item label="旧密码:" prop="oldpwd"> <el-input v-model="listform.oldpwd" size="small" @focus="handleFocus" @blur="handleBlur" class="inputPsd" placeholder="请输入旧密码" /> </el-form-item> </el-col> </el-row>
methods: { handleFocus(){ this.$refs.password= 'password' }, handleBlur(){ this.$refs.password = 'text' }, }
<style> .inputPsd{ -webkit-text-security:disc; //默认圆点 } </style>
这样就完美解决获取浏览器记住账号密码问题