Commit 60654108 authored by leon's avatar leon

feat: login input componment

parent cbe5f611
......@@ -3,10 +3,12 @@
<view class="content">
<u-form ref="uForm" :model="params" :error-type="['toast']" :label-width="200">
<u-form-item label="用户名" prop="userName">
<u-input v-model="params.userName" placeholder="请输入用户名" type="text" />
<!-- <u-input v-model="params.userName" placeholder="请输入用户名" type="text" @blur="blurUsername()" /> -->
<input placeholder="请输入用户名" type="text" @input="changeUsername" />
</u-form-item>
<u-form-item label="密码" prop="password">
<u-input v-model="params.password" placeholder="请输入密码" type="password" :password-icon="true" />
<!-- <u-input v-model="params.password" placeholder="请输入密码" type="password" :password-icon="true" @blur="blurPassword()"/> -->
<input placeholder="请输入密码" type="text" :password="true" @input="changePassword"/>
</u-form-item>
<u-form-item label="员工号(选填)" prop="staffNo">
<u-input v-model="params.staffNo" placeholder="填写员工号可以更精确的获取权限" type="number" />
......@@ -52,11 +54,25 @@
}
},
computed: {
submitDisabled() {
submitDisabled() {
return this.params.userName && this.params.password
}
},
methods: {
methods: {
// submitDisabled() {
// console.log(this.params)
// return this.params.userName && this.params.password
// },
changeUsername(event) {
console.log(event)
this.params.userName = event.detail.value
},
changePassword(event) {
this.params.password = event.detail.value
console.log(event)
},
// 登录
submit(type) {
this.$refs.uForm.validate(async valid => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment