Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
钟摆人-Puppet゜
ant-design-pro
提交
dba0299a
A
ant-design-pro
项目概览
钟摆人-Puppet゜
/
ant-design-pro
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design-pro
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dba0299a
编写于
9月 20, 2018
作者:
D
digz6666
提交者:
陈帅
9月 25, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Localized GlobalHeader, NoticeIcon and Header.
上级
eaca60aa
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
38 addition
and
15 deletion
+38
-15
src/components/GlobalHeader/RightContent.js
src/components/GlobalHeader/RightContent.js
+10
-10
src/components/NoticeIcon/NoticeList.js
src/components/NoticeIcon/NoticeList.js
+1
-2
src/components/NoticeIcon/index.js
src/components/NoticeIcon/index.js
+3
-2
src/layouts/Header.js
src/layouts/Header.js
+2
-1
src/locales/en-US.js
src/locales/en-US.js
+11
-0
src/locales/zh-CN.js
src/locales/zh-CN.js
+11
-0
未找到文件。
src/components/GlobalHeader/RightContent.js
浏览文件 @
dba0299a
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
moment
from
'
moment
'
;
import
groupBy
from
'
lodash/groupBy
'
;
...
...
@@ -87,7 +87,7 @@ export default class GlobalHeaderRight extends PureComponent {
<
div
className
=
{
className
}
>
<
HeaderSearch
className
=
{
`
${
styles
.
action
}
${
styles
.
search
}
`
}
placeholder
=
"
站内搜索
"
placeholder
=
{
formatMessage
({
id
:
'
component.globalHeader.search
'
})}
dataSource
=
{[
'
搜索提示一
'
,
'
搜索提示二
'
,
'
搜索提示三
'
]}
onSearch
=
{
value
=>
{
console
.
log
(
'
input
'
,
value
);
// eslint-disable-line
...
...
@@ -96,13 +96,13 @@ export default class GlobalHeaderRight extends PureComponent {
console
.
log
(
'
enter
'
,
value
);
// eslint-disable-line
}}
/
>
<
Tooltip
title
=
"
使用文档
"
>
<
Tooltip
title
=
{
formatMessage
({
id
:
'
component.globalHeader.help
'
})}
>
<
a
target
=
"
_blank
"
href
=
"
https://pro.ant.design/docs/getting-started
"
rel
=
"
noopener noreferrer
"
className
=
{
styles
.
action
}
title
=
"
使用文档
"
title
=
"
{ formatMessage({id: 'component.globalHeader.help'}) }
"
>
<
Icon
type
=
"
question-circle-o
"
/>
<
/a
>
...
...
@@ -120,20 +120,20 @@ export default class GlobalHeaderRight extends PureComponent {
>
<
NoticeIcon
.
Tab
list
=
{
noticeData
[
'
通知
'
]}
title
=
"
通知
"
emptyText
=
"
你已查看所有通知
"
title
=
{
formatMessage
({
id
:
'
component.globalHeader.notification
'
})}
emptyText
=
{
formatMessage
({
id
:
'
component.globalHeader.notification.empty
'
})}
emptyImage
=
"
https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg
"
/>
<
NoticeIcon
.
Tab
list
=
{
noticeData
[
'
消息
'
]}
title
=
"
消息
"
emptyText
=
"
您已读完所有消息
"
title
=
{
formatMessage
({
id
:
'
component.globalHeader.message
'
})}
emptyText
=
{
formatMessage
({
id
:
'
component.globalHeader.message.empty
'
})}
emptyImage
=
"
https://gw.alipayobjects.com/zos/rmsportal/sAuJeJzSKbUmHfBQRzmZ.svg
"
/>
<
NoticeIcon
.
Tab
list
=
{
noticeData
[
'
待办
'
]}
title
=
"
待办
"
emptyText
=
"
你已完成所有待办
"
title
=
{
formatMessage
({
id
:
'
component.globalHeader.event
'
})}
emptyText
=
{
formatMessage
({
id
:
'
component.globalHeader.event.empty
'
})}
emptyImage
=
"
https://gw.alipayobjects.com/zos/rmsportal/HsIsxMZiWKrNUavQUXqx.svg
"
/>
<
/NoticeIcon
>
...
...
src/components/NoticeIcon/NoticeList.js
浏览文件 @
dba0299a
...
...
@@ -63,8 +63,7 @@ export default function NoticeList({
<
/List
>
{
showClear
?
(
<
div
className
=
{
styles
.
clear
}
onClick
=
{
onClear
}
>
{
locale
.
clear
}
{
title
}
{
locale
.
clear
}
{
title
}
<
/div
>
)
:
null
}
<
/div
>
...
...
src/components/NoticeIcon/index.js
浏览文件 @
dba0299a
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
{
Popover
,
Icon
,
Tabs
,
Badge
,
Spin
}
from
'
antd
'
;
import
classNames
from
'
classnames
'
;
import
List
from
'
./NoticeList
'
;
...
...
@@ -16,8 +17,8 @@ export default class NoticeIcon extends PureComponent {
onClear
:
()
=>
{},
loading
:
false
,
locale
:
{
emptyText
:
'
暂无数据
'
,
clear
:
'
清空
'
,
emptyText
:
formatMessage
({
id
:
'
component.noticeIcon.empty
'
})
,
clear
:
formatMessage
({
id
:
'
component.noticeIcon.clear
'
})
,
},
emptyImage
:
'
https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg
'
,
};
...
...
src/layouts/Header.js
浏览文件 @
dba0299a
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
{
Layout
,
message
}
from
'
antd
'
;
import
Animate
from
'
rc-animate
'
;
import
{
connect
}
from
'
dva
'
;
...
...
@@ -42,7 +43,7 @@ class HeaderView extends PureComponent {
};
handleNoticeClear
=
type
=>
{
message
.
success
(
`
清空了
${
type
}
`
);
message
.
success
(
`
${
formatMessage
({
id
:
'
component.noticeIcon.cleared
'
})}
${
type
}
`
);
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'
global/clearNotices
'
,
...
...
src/locales/en-US.js
浏览文件 @
dba0299a
export
default
{
'
navbar.lang
'
:
'
中文
'
,
'
component.globalHeader.search
'
:
'
Search
'
,
'
component.globalHeader.help
'
:
'
Help
'
,
'
component.globalHeader.notification
'
:
'
Notification
'
,
'
component.globalHeader.notification.empty
'
:
'
You have viewed all notifications.
'
,
'
component.globalHeader.message
'
:
'
Message
'
,
'
component.globalHeader.message.empty
'
:
'
You have viewed all messsages.
'
,
'
component.globalHeader.event
'
:
'
Event
'
,
'
component.globalHeader.event.empty
'
:
'
You have viewed all events.
'
,
'
component.noticeIcon.clear
'
:
'
Clear
'
,
'
component.noticeIcon.cleared
'
:
'
Cleared
'
,
'
component.noticeIcon.empty
'
:
'
No notifications
'
,
'
menu.home
'
:
'
Home
'
,
'
menu.dashboard
'
:
'
Dashboard
'
,
'
menu.dashboard.analysis
'
:
'
Analysis
'
,
...
...
src/locales/zh-CN.js
浏览文件 @
dba0299a
...
...
@@ -2,6 +2,17 @@
export
default
{
'
navbar.lang
'
:
'
English
'
,
'
component.globalHeader.search
'
:
'
站内搜索
'
,
'
component.globalHeader.help
'
:
'
使用文档
'
,
'
component.globalHeader.notification
'
:
'
通知
'
,
'
component.globalHeader.notification.empty
'
:
'
你已查看所有通知
'
,
'
component.globalHeader.message
'
:
'
消息"
'
,
'
component.globalHeader.message.empty
'
:
'
您已读完所有消息"
'
,
'
component.globalHeader.event
'
:
'
待办
'
,
'
component.globalHeader.event.empty
'
:
'
你已完成所有待办
'
,
'
component.noticeIcon.clear
'
:
'
清空
'
,
'
component.noticeIcon.cleared
'
:
'
清空了
'
,
'
component.noticeIcon.empty
'
:
'
暂无数据
'
,
'
menu.home
'
:
'
首页
'
,
'
menu.dashboard
'
:
'
Dashboard
'
,
'
menu.dashboard.analysis
'
:
'
分析页
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录