fix: ukey登录输入密码后,一回车就自动刷新页面了
parent
c0cf72d07d
commit
502ba048ac
|
@ -13,7 +13,7 @@
|
|||
<span class="desc-title">{{ configs.promotionalTitle }}</span>
|
||||
<span class="desc-remark">{{ configs.promotionalContent }}</span>
|
||||
</div>
|
||||
<el-form :model="loginForm" ref="loginFormRef" label-position="left" label-width="0px" class="card-box login-form" @keyup.enter="activeName === 'normal' ? handleLogin : handleUkeyLogin">
|
||||
<el-form :model="loginForm" ref="loginFormRef" label-position="left" label-width="0px" class="card-box login-form" @keyup.enter="handleUkeyLogin" @submit.prevent>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="云管登录" name="normal">
|
||||
<div v-if="activeName === 'normal'">
|
||||
|
@ -52,7 +52,7 @@
|
|||
<div v-if="activeName === 'UKEY'">
|
||||
<el-tooltip :visible="capsTooltip" content="大写锁定已打开" placement="right" :manual="true">
|
||||
<el-form-item class="login-form-item" prop="ukeyPassword" :rules="[{ ...required, message: '请输入UKEY密码' }]">
|
||||
<el-input show-password v-model="loginForm.ukeyPassword" placeholder="UKEY密码" @blur="capsTooltip = false" @keyup="checkCapslock">
|
||||
<el-input show-password v-model="loginForm.ukeyPassword" placeholder="UKEY密码" @blur="capsTooltip = false" @keyup="checkCapslock" ref="ukeyPasswordInputRef">
|
||||
<template #prefix>
|
||||
<el-icon><icon-ep-lock /></el-icon>
|
||||
</template>
|
||||
|
@ -79,7 +79,11 @@ import { required } from '@/validate'
|
|||
import { setUkeyPassword } from 'utils/auth'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
|
||||
const activeName = ref('normal')
|
||||
const ukeyPasswordInputRef = ref()
|
||||
onMounted(() => {
|
||||
if (typeof ukeyPasswordInputRef.value.focus === 'function') ukeyPasswordInputRef.value.focus()
|
||||
})
|
||||
const activeName = ref('UKEY')
|
||||
const loginForm = reactive({
|
||||
account: '',
|
||||
password: '',
|
||||
|
|
Loading…
Reference in New Issue