Commit 60654108 authored by leon's avatar leon

feat: login input componment

parent cbe5f611
...@@ -3,10 +3,12 @@ ...@@ -3,10 +3,12 @@
<view class="content"> <view class="content">
<u-form ref="uForm" :model="params" :error-type="['toast']" :label-width="200"> <u-form ref="uForm" :model="params" :error-type="['toast']" :label-width="200">
<u-form-item label="用户名" prop="userName"> <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>
<u-form-item label="密码" prop="password"> <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>
<u-form-item label="员工号(选填)" prop="staffNo"> <u-form-item label="员工号(选填)" prop="staffNo">
<u-input v-model="params.staffNo" placeholder="填写员工号可以更精确的获取权限" type="number" /> <u-input v-model="params.staffNo" placeholder="填写员工号可以更精确的获取权限" type="number" />
...@@ -57,6 +59,20 @@ ...@@ -57,6 +59,20 @@
} }
}, },
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) { submit(type) {
this.$refs.uForm.validate(async valid => { 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