Skip to content

Commit 93f8237

Browse files
author
hocgin
committed
dev
1 parent c88ba39 commit 93f8237

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Promise/components/UserAvatar/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const UserAvatar: React.FC<{
4343
prefixCls?: string;
4444
className?: string;
4545
defaultParams?: UserAvatarParams;
46+
onLogout?: () => void;
4647
}> = (props, ref) => {
4748
let { getPrefixCls } = React.useContext(ConfigContext);
4849
let prefixCls = getPrefixCls('promise--UserAvatar', props.prefixCls);
@@ -67,7 +68,7 @@ const UserAvatar: React.FC<{
6768
<Menu.Divider />
6869
<Menu.Item
6970
icon={<ExportOutlined />}
70-
onClick={() => PromiseKit.DoveService.logout()}
71+
onClick={props?.onLogout ?? PromiseKit.DoveService.logout}
7172
>
7273
退出
7374
</Menu.Item>

0 commit comments

Comments
 (0)