|
|
@ -1,5 +1,5 @@ |
|
|
import React, { PureComponent } from 'react'; |
|
|
import React, { PureComponent } from 'react'; |
|
|
import { FormattedMessage, setLocale, getLocale } from 'umi/locale'; |
|
|
import { FormattedMessage, formatMessage, setLocale, getLocale } from 'umi/locale'; |
|
|
import { Spin, Tag, Menu, Icon, Dropdown, Avatar, Tooltip, Button } from 'antd'; |
|
|
import { Spin, Tag, Menu, Icon, Dropdown, Avatar, Tooltip, Button } from 'antd'; |
|
|
import moment from 'moment'; |
|
|
import moment from 'moment'; |
|
|
import groupBy from 'lodash/groupBy'; |
|
|
import groupBy from 'lodash/groupBy'; |
|
|
@ -87,7 +87,7 @@ export default class GlobalHeaderRight extends PureComponent { |
|
|
<div className={className}> |
|
|
<div className={className}> |
|
|
<HeaderSearch |
|
|
<HeaderSearch |
|
|
className={`${styles.action} ${styles.search}`} |
|
|
className={`${styles.action} ${styles.search}`} |
|
|
placeholder="站内搜索" |
|
|
placeholder={formatMessage({ id: 'component.globalHeader.search' })} |
|
|
dataSource={['搜索提示一', '搜索提示二', '搜索提示三']} |
|
|
dataSource={['搜索提示一', '搜索提示二', '搜索提示三']} |
|
|
onSearch={value => { |
|
|
onSearch={value => { |
|
|
console.log('input', value); // eslint-disable-line
|
|
|
console.log('input', value); // eslint-disable-line
|
|
|
@ -96,13 +96,13 @@ export default class GlobalHeaderRight extends PureComponent { |
|
|
console.log('enter', value); // eslint-disable-line
|
|
|
console.log('enter', value); // eslint-disable-line
|
|
|
}} |
|
|
}} |
|
|
/> |
|
|
/> |
|
|
<Tooltip title="使用文档"> |
|
|
<Tooltip title={formatMessage({ id: 'component.globalHeader.help' })}> |
|
|
<a |
|
|
<a |
|
|
target="_blank" |
|
|
target="_blank" |
|
|
href="https://pro.ant.design/docs/getting-started" |
|
|
href="https://pro.ant.design/docs/getting-started" |
|
|
rel="noopener noreferrer" |
|
|
rel="noopener noreferrer" |
|
|
className={styles.action} |
|
|
className={styles.action} |
|
|
title="使用文档" |
|
|
title="{ formatMessage({id: 'component.globalHeader.help'}) }" |
|
|
> |
|
|
> |
|
|
<Icon type="question-circle-o" /> |
|
|
<Icon type="question-circle-o" /> |
|
|
</a> |
|
|
</a> |
|
|
@ -120,20 +120,20 @@ export default class GlobalHeaderRight extends PureComponent { |
|
|
> |
|
|
> |
|
|
<NoticeIcon.Tab |
|
|
<NoticeIcon.Tab |
|
|
list={noticeData['通知']} |
|
|
list={noticeData['通知']} |
|
|
title="通知" |
|
|
title={formatMessage({ id: 'component.globalHeader.notification' })} |
|
|
emptyText="你已查看所有通知" |
|
|
emptyText={formatMessage({ id: 'component.globalHeader.notification.empty' })} |
|
|
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg" |
|
|
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg" |
|
|
/> |
|
|
/> |
|
|
<NoticeIcon.Tab |
|
|
<NoticeIcon.Tab |
|
|
list={noticeData['消息']} |
|
|
list={noticeData['消息']} |
|
|
title="消息" |
|
|
title={formatMessage({ id: 'component.globalHeader.message' })} |
|
|
emptyText="您已读完所有消息" |
|
|
emptyText={formatMessage({ id: 'component.globalHeader.message.empty' })} |
|
|
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/sAuJeJzSKbUmHfBQRzmZ.svg" |
|
|
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/sAuJeJzSKbUmHfBQRzmZ.svg" |
|
|
/> |
|
|
/> |
|
|
<NoticeIcon.Tab |
|
|
<NoticeIcon.Tab |
|
|
list={noticeData['待办']} |
|
|
list={noticeData['待办']} |
|
|
title="待办" |
|
|
title={formatMessage({ id: 'component.globalHeader.event' })} |
|
|
emptyText="你已完成所有待办" |
|
|
emptyText={formatMessage({ id: 'component.globalHeader.event.empty' })} |
|
|
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/HsIsxMZiWKrNUavQUXqx.svg" |
|
|
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/HsIsxMZiWKrNUavQUXqx.svg" |
|
|
/> |
|
|
/> |
|
|
</NoticeIcon> |
|
|
</NoticeIcon> |
|
|
|