This commit is contained in:
Gdpao
2020-09-18 14:22:31 +08:00
parent a1d9339948
commit 2d7922ff96
4 changed files with 31 additions and 17 deletions

View File

@@ -20,7 +20,7 @@
<view class="" v-if="state==0">
<view class="labales">
<image src="../../static/image/login/login(3).png"></image>
<input v-model="zhanghao" type="text" placeholder="请输入账号" />
<input v-model="zhanghao" type="text" @blur="getBlurVal" placeholder="请输入账号" />
</view>
<view class="labales">
<image src="../../static/image/login/login(1).png"></image>
@@ -30,7 +30,7 @@
<view class="" v-else-if="state==1">
<view class="labales">
<image src="../../static/image/login/login(3).png"></image>
<input v-model="zhanghaoA" type="text" placeholder="请输入账号" />
<input v-model="zhanghaoA" type="text" @blur="getBlurVal1" placeholder="请输入账号" />
</view>
<view class="labales">
<image src="../../static/image/login/login(1).png"></image>
@@ -128,6 +128,15 @@ export default {
}
})
},
// 失去焦点获取数据
getBlurVal(e) {
// console.log(e.detail.value);
this.zhanghao = this.$u.trim(e.detail.value,"all");
},
getBlurVal1(e) {
this.zhanghaoA = this.$u.trim(e.detail.value,"all");
// console.log(this.$u.trim(this.zhanghaoA));
},
logins() {
// 判断是否可以点击
// console.log(this.zhanghao);