From 0bfef3579222ca324a34ca8f3ab7113a8921baf2 Mon Sep 17 00:00:00 2001 From: 10396 <1039655633@qq.com> Date: Fri, 27 Jun 2025 10:51:22 +0800 Subject: [PATCH] =?UTF-8?q?refactor(layout):=20=E4=BC=98=E5=8C=96=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=86=E7=A0=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在更新信息组件中,仅当用户修改了密码且确认新密码后才执行登出操作 - 这样可以避免用户在未更改密码时不必要的登出,提升用户体验 --- src/layout/header/components/update_info.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layout/header/components/update_info.vue b/src/layout/header/components/update_info.vue index bfec4c4..0cb3359 100644 --- a/src/layout/header/components/update_info.vue +++ b/src/layout/header/components/update_info.vue @@ -136,7 +136,9 @@ const fnSubmit = debounce( PASSWORD: form.value.newpwd, }); ElMessage.success("修改成功"); - await fnSignOut(); + if(form.value.newpwd && form.value.newpassword1){ + await fnSignOut(); + } emits("get-data"); }, { atBegin: true }