<input placeholder="请输入用户名称" id="username" type="text" autocomplete="off" class="input" v-model="userInfo.userName"/>
<input type="password" placeholder="请输入密码" autocomplete="new-password" οnfοcus="this.removeAttribute('readonly');" οnblur="this.setAttribute('readonly',true);" readonly class="input" v-model="userInfo.passWord"/>
这是百度了好半天,结合各种结果搞出来的
给input type为text的加上id,type为password的不要加id,还有就是给type为password的input加上οnfοcus="this.removeAttribute('readonly');" οnblur="this.setAttribute('readonly',true);" readonly 这一坨,