美文网首页
解决浏览器记住密码的功能

解决浏览器记住密码的功能

作者: AlisaMfz | 来源:发表于2017-04-07 14:27 被阅读96次

以es6,加vue的写法为例:

data:{

spypasswd:'text',//显示密码

spyconfirmPassword:'text',//显示确认密码

}

ready:function(){

//解决浏览器记住密码的功能

setTimeout(() => {

this.spypasswd='password';

this.spyconfirmPassword='password';

},200);

}

html:

<input type='{{spypasswd}}' v-model="" />

<input type="{{spyconfirmPassword}}" v-model = ""/>

vue2.0 写法:

<input v-if="type=='spyconfirmPassword'"v-model="user.confirmPassword" />

相关文章

网友评论

      本文标题:解决浏览器记住密码的功能

      本文链接:https://www.haomeiwen.com/subject/pkshattx.html