We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c88ba39 commit 93f8237Copy full SHA for 93f8237
src/Promise/components/UserAvatar/index.tsx
@@ -43,6 +43,7 @@ const UserAvatar: React.FC<{
43
prefixCls?: string;
44
className?: string;
45
defaultParams?: UserAvatarParams;
46
+ onLogout?: () => void;
47
}> = (props, ref) => {
48
let { getPrefixCls } = React.useContext(ConfigContext);
49
let prefixCls = getPrefixCls('promise--UserAvatar', props.prefixCls);
@@ -67,7 +68,7 @@ const UserAvatar: React.FC<{
67
68
<Menu.Divider />
69
<Menu.Item
70
icon={<ExportOutlined />}
- onClick={() => PromiseKit.DoveService.logout()}
71
+ onClick={props?.onLogout ?? PromiseKit.DoveService.logout}
72
>
73
退出
74
</Menu.Item>
0 commit comments