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