不多說,先上代碼:谷歌瀏覽器記住密碼之后 點擊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>
這樣就完美解決獲取瀏覽器記住賬號密碼問題