|  |  | 
 |  |  | import { outLogin } from '@/services/ant-design-pro/api'; | 
 |  |  | import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons'; | 
 |  |  | import { history, useModel } from '@umijs/max'; | 
 |  |  | import { history, useModel, FormattedMessage, useIntl } from '@umijs/max'; | 
 |  |  | import { Spin } from 'antd'; | 
 |  |  | import { createStyles } from 'antd-style'; | 
 |  |  | import { stringify } from 'querystring'; | 
 |  |  | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | export const AvatarDropdown = ({ menu, children }) => { | 
 |  |  |   const intl = useIntl(); | 
 |  |  |   const { styles } = useStyles(); | 
 |  |  |   const { initialState, setInitialState } = useModel('@@initialState'); | 
 |  |  |  | 
 |  |  | 
 |  |  |       loginOut(); | 
 |  |  |       return; | 
 |  |  |     } | 
 |  |  |     history.push(`/account/${key}`); | 
 |  |  |   }, | 
 |  |  |     [setInitialState], | 
 |  |  |   ); | 
 |  |  |     history.push(`/user/${key}`); | 
 |  |  |   }, [setInitialState]); | 
 |  |  |  | 
 |  |  |   const loading = ( | 
 |  |  |     <span className={styles.action}> | 
 |  |  | 
 |  |  |     //     }, | 
 |  |  |     //   ] | 
 |  |  |     //   : []), | 
 |  |  |     { | 
 |  |  |       key: 'settings', | 
 |  |  |       icon: <SettingOutlined />, | 
 |  |  |       label: '个人设置', | 
 |  |  |     }, | 
 |  |  |     { | 
 |  |  |       type: 'divider' | 
 |  |  |     }, | 
 |  |  |     // { | 
 |  |  |     //   type: 'divider' | 
 |  |  |     // }, | 
 |  |  |     { | 
 |  |  |       key: 'logout', | 
 |  |  |       icon: <LogoutOutlined />, | 
 |  |  |       label: '退出登录', | 
 |  |  |       label: intl.formatMessage({ id: 'common.account.logout', defaultMessage: '退出登录' }), | 
 |  |  |     }, | 
 |  |  |   ]; | 
 |  |  |  |