diff --git a/src/layout/components/NavBar/components/UserProfile.vue b/src/layout/components/NavBar/components/UserProfile.vue index 4d8c80b..55a2eef 100644 --- a/src/layout/components/NavBar/components/UserProfile.vue +++ b/src/layout/components/NavBar/components/UserProfile.vue @@ -140,7 +140,14 @@ function submitHandle() { password: form.newPass, }); ElNotification.success("修改成功,请重新登陆"); - logout(); + userStore + .logout() + .then(() => { + tagsViewStore.delAllViews(); + }) + .then(() => { + router.push(`/login?redirect=${route.fullPath}`); + }); } catch (error) { formLoading.value = false; console.log(error);