更新退出

This commit is contained in:
2025-07-28 10:39:23 +08:00
parent be77d67c47
commit 5d3de61273
2 changed files with 13 additions and 12 deletions

View File

@ -1,5 +1,5 @@
<template>
<!-- <el-dropdown class="avatar-container" trigger="click">
<el-dropdown class="avatar-container" trigger="click">
<div class="avatar-wrapper">
<el-avatar
shape="circle"
@ -12,7 +12,7 @@
<el-dropdown-item divided @click="logout()">退出登录</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown> -->
</el-dropdown>
<UpdatePwdDialog v-model="UpdatePwdVisible"></UpdatePwdDialog>
</template>
@ -28,13 +28,12 @@ const updatePwd = () => {
const store = useStore();
const logout = () => {
store.dispatch("user/logout");
store.commit("app/clearTag", null, {
immediate: true
});
store.commit("permission/deleteRouter", {
immediate: true
});
window.opener = null;
window.open('', '_self');
window.close();
store.commit("app/clearTag", null, { immediate: true });
store.commit("permission/deleteRouter", { immediate: true });
store.commit("user/deleteKeepLiiveRoute", "home");
};
</script>