复制代码 <view class="padding-xl">
<view class="margin-top input-style">
<text class="label">账号</text>
<input placeholder="请输入账号" @input="email = $event.detail.value" />
</view>
<view class="margin-top input-style">
<text class="label">密码</text>
<input password placeholder="请输入密码" @input="password = $event.detail.value" />
</view>
<view class="margin-top">
<button type="primary" @click="handleLogin">登陆</button>
</view>
<text>{{ email }}</text>
</view>
复制代码 export default {
data() {
return {
email: '',
password: '',
}
},
methods: {
handleLogin() {
if (!this.email) {
uni.showToast({
icon: 'none',
title: '请输入账号'
})
return null;
}
if (!this.password) {
uni.showToast({
icon: 'none',
title: '请输入密码'
})
return null;
}
uni.showToast({
icon: 'loading',
mask: true,
title: '登陆中,请稍后...',
duration: 2000
});
// uni.reLaunch({
// url:'/pages/index/index'
// })
}
}
}
1***@qq.com
我这边还是有同样的问题,只能通过blur解决,input是在弹窗里面
2021-03-23 11:18
DCloud_UNI_GSQ
回复 1***@qq.com: 使用的版本多少?vue 还是 nvue?
2021-03-26 11:24
w***@163.com
回复 DCloud_UNI_GSQ: 安卓 搜狗输入法 简体拼音 输入不了英文 nvue
2021-11-08 10:06