refactor(projects): 登录重定向地址相关重构

This commit is contained in:
Soybean
2021-10-18 18:01:14 +08:00
parent 336c7766f9
commit 04008b63ee
11 changed files with 52 additions and 52 deletions

View File

@ -13,9 +13,11 @@ import { UserAvatar, Logout } from '@vicons/carbon';
import { dynamicIconRender, resetAuthStorage } from '@/utils';
import { HoverContainer } from '@/components';
import avatar from '@/assets/svg/avatar/avatar01.svg';
import { useRouterChange } from '@/hooks';
type DropdownKey = 'user-center' | 'logout';
const { toLogin } = useRouterChange();
const dialog = useDialog();
const options = [
@ -45,7 +47,7 @@ function handleDropdown(optionKey: string) {
negativeText: '取消',
onPositiveClick: () => {
resetAuthStorage();
window.location.reload();
toLogin('pwd-login', 'current');
}
});
}

View File

@ -6,6 +6,7 @@
:collapsed="app.menu.collapsed"
:collapsed-width="theme.menuStyle.collapsedWidth"
:width="menuWidth"
show-trigger="bar"
@collapse="handleMenuCollapse(true)"
@expand="handleMenuCollapse(false)"
>