Files
FreeERP.Antd.Admin/src/components/Header/HeaderUserInfo.tsx

24 lines
571 B
TypeScript
Raw Normal View History

2026-01-05 17:06:16 +08:00
import { Button, Popconfirm } from 'antd';
import { useUserStore } from '@/store/UserStore';
import { GapBox } from '../GapBox';
export const HeaderUserInfo: React.FC = () => {
const userInfo = useUserStore().user;
return (
<GapBox>
<div>{userInfo.login_name}</div>
<Popconfirm
title='确定要退出登录吗?'
onConfirm={() => {
location.hash = '#/login';
}}
>
<Button size='small' variant='text' color='primary'>
退
</Button>
</Popconfirm>
</GapBox>
);
};