1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 16:29:17 +08:00

fix: 解决点击退出登录后,console会有个报错信息的 BUG

This commit is contained in:
zhengkunwang223 2023-02-28 16:48:54 +08:00 committed by zhengkunwang223
parent 895e6ce181
commit ac8dda9e4f

View File

@ -18,7 +18,7 @@
popper-class="menu-popper"
>
<SubItem :menuList="routerMenus"></SubItem>
<el-menu-item>
<el-menu-item :index="''">
<el-icon @click="logout">
<SvgIcon :iconName="'p-logout'" :className="'svg-icon'"></SvgIcon>
</el-icon>
@ -77,12 +77,14 @@ const logout = () => {
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),
type: 'warning',
}).then(() => {
systemLogOut();
router.push({ name: 'login' });
globalStore.setLogStatus(false);
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
});
})
.then(() => {
systemLogOut();
router.push({ name: 'login' });
globalStore.setLogStatus(false);
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
})
.catch(() => {});
};
const systemLogOut = async () => {