Merge branch 'yueyixin'

This commit is contained in:
2026-05-20 14:15:20 +08:00
commit 13a2d3707f
1 changed files with 7 additions and 10 deletions

View File

@ -40,6 +40,7 @@
<el-form-item v-else-if="activeTab === 'password'" key="form-password-item" prop="password">
<el-input
ref="passwordInputRef"
v-model="loginForm.password"
placeholder="请输入密码"
type="password"
@ -101,6 +102,7 @@ const hideTab = ref<boolean>(false)
// login form
const userStore = useUserStore()
const loginFormRef = ref<FormInstance>()
const passwordInputRef = ref()
const loginForm = ref({
email: '',
countryCode: '+86',
@ -167,6 +169,11 @@ const handleLogin = async () => {
if (currentTab === 'phone' && loginForm.value.email !== '') {
loginForm.value.email = ''
}
//
setTimeout(() => {
passwordInputRef.value?.focus()
},400)
}
// +
else if (currentTab === 'password') {
@ -185,16 +192,6 @@ const handleLogin = async () => {
}
await userStore.login(loginParams)
setStorage('device_no', deviceNo)
activeTab.value = 'email' // tab
hideTab.value = false
loginForm.value = {
//
email: '',
countryCode: '+86',
phone: '',
password: '',
code: '',
}
}
} catch (error) {
console.error('表单校验失败:', error)