From de39f3a54f70f66738c8d5e287a3de8fa0fd0e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8?= Date: Tue, 23 Jun 2026 13:10:14 +0800 Subject: [PATCH] bug --- src/views/profile/agent/index.vue | 4 ++-- src/views/user/Login.vue | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/views/profile/agent/index.vue b/src/views/profile/agent/index.vue index 7e427a5..7d35db5 100644 --- a/src/views/profile/agent/index.vue +++ b/src/views/profile/agent/index.vue @@ -26,8 +26,8 @@ 编辑 - - + + 调整金额 diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 6267472..f922594 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -14,7 +14,7 @@ v-for="tab in tabList" :key="tab.name" :class="['tab-item', { active: activeTab === tab.name }]" - @click="activeTab = tab.name" + @click="switchTab(tab.name)" > {{ tab.label }} @@ -121,6 +121,18 @@ const rules: FormRules = { ], } +// 切换登录方式:清空输入框并重置表单校验 +function switchTab(name: string) { + if (activeTab.value === name) return + activeTab.value = name + // 清空邮箱、手机号、密码 + loginForm.value.email = '' + loginForm.value.phone = '' + loginForm.value.password = '' + // 重置表单校验状态,清除错误提示 + loginFormRef.value?.clearValidate() +} + // 弹窗相关 const dialogVisible = ref(false) const dialogTitle = ref('')