Browse Source

登录页面 -密码这里也加上回车事件

hella_online_20240821
wangyufei 1 month ago
parent
commit
9f4a6440a5
  1. 10
      src/views/login/components/LoginForm.vue

10
src/views/login/components/LoginForm.vue

@ -30,7 +30,7 @@
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item prop="password">
<el-input v-model="loginData.loginForm.password" :placeholder="t('login.passwordPlaceholder')"
:prefix-icon="iconLock" show-password type="password" @keyup.enter="getCode()" style="height: 42px;" />
:prefix-icon="iconLock" show-password type="password" @keyup.enter="passwordEnter" style="height: 42px;" />
</el-form-item>
</el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px" v-if="needCode">
@ -173,6 +173,14 @@
// verify.value.show()
// }
// }
const passwordEnter = ()=>{
if(!needCode.value){
handleLogin()
return
}else{
getCode()
}
}
function getCode() {
if(!needCode.value){
return

Loading…
Cancel
Save