Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
钟摆人-Puppet゜
ant-design-pro
提交
1be42896
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,发现更多精彩内容 >>
提交
1be42896
编写于
9月 25, 2018
作者:
D
digz6666
提交者:
陈帅
9月 25, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Localize example and mock data of GlobalHeader and notification
上级
dba0299a
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
26 addition
and
16 deletion
+26
-16
mock/notices.js
mock/notices.js
+12
-12
src/components/GlobalHeader/RightContent.js
src/components/GlobalHeader/RightContent.js
+8
-4
src/locales/en-US.js
src/locales/en-US.js
+3
-0
src/locales/zh-CN.js
src/locales/zh-CN.js
+3
-0
未找到文件。
mock/notices.js
浏览文件 @
1be42896
...
...
@@ -5,14 +5,14 @@ const getNotices = (req, res) =>
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png
'
,
title
:
'
你收到了 14 份新周报
'
,
datetime
:
'
2017-08-09
'
,
type
:
'
通知
'
,
type
:
'
notification
'
,
},
{
id
:
'
000000002
'
,
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png
'
,
title
:
'
你推荐的 曲妮妮 已通过第三轮面试
'
,
datetime
:
'
2017-08-08
'
,
type
:
'
通知
'
,
type
:
'
notification
'
,
},
{
id
:
'
000000003
'
,
...
...
@@ -20,21 +20,21 @@ const getNotices = (req, res) =>
title
:
'
这种模板可以区分多种通知类型
'
,
datetime
:
'
2017-08-07
'
,
read
:
true
,
type
:
'
通知
'
,
type
:
'
notification
'
,
},
{
id
:
'
000000004
'
,
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png
'
,
title
:
'
左侧图标用于区分不同的类型
'
,
datetime
:
'
2017-08-07
'
,
type
:
'
通知
'
,
type
:
'
notification
'
,
},
{
id
:
'
000000005
'
,
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png
'
,
title
:
'
内容不要超过两行字,超出时自动截断
'
,
datetime
:
'
2017-08-07
'
,
type
:
'
通知
'
,
type
:
'
notification
'
,
},
{
id
:
'
000000006
'
,
...
...
@@ -42,7 +42,7 @@ const getNotices = (req, res) =>
title
:
'
曲丽丽 评论了你
'
,
description
:
'
描述信息描述信息描述信息
'
,
datetime
:
'
2017-08-07
'
,
type
:
'
消息
'
,
type
:
'
message
'
,
},
{
id
:
'
000000007
'
,
...
...
@@ -50,7 +50,7 @@ const getNotices = (req, res) =>
title
:
'
朱偏右 回复了你
'
,
description
:
'
这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像
'
,
datetime
:
'
2017-08-07
'
,
type
:
'
消息
'
,
type
:
'
message
'
,
},
{
id
:
'
000000008
'
,
...
...
@@ -58,7 +58,7 @@ const getNotices = (req, res) =>
title
:
'
标题
'
,
description
:
'
这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像
'
,
datetime
:
'
2017-08-07
'
,
type
:
'
消息
'
,
type
:
'
message
'
,
},
{
id
:
'
000000009
'
,
...
...
@@ -66,7 +66,7 @@ const getNotices = (req, res) =>
description
:
'
任务需要在 2017-01-12 20:00 前启动
'
,
extra
:
'
未开始
'
,
status
:
'
todo
'
,
type
:
'
待办
'
,
type
:
'
event
'
,
},
{
id
:
'
000000010
'
,
...
...
@@ -74,7 +74,7 @@ const getNotices = (req, res) =>
description
:
'
冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务
'
,
extra
:
'
马上到期
'
,
status
:
'
urgent
'
,
type
:
'
待办
'
,
type
:
'
event
'
,
},
{
id
:
'
000000011
'
,
...
...
@@ -82,7 +82,7 @@ const getNotices = (req, res) =>
description
:
'
指派竹尔于 2017-01-09 前完成更新并发布
'
,
extra
:
'
已耗时 8 天
'
,
status
:
'
doing
'
,
type
:
'
待办
'
,
type
:
'
event
'
,
},
{
id
:
'
000000012
'
,
...
...
@@ -90,7 +90,7 @@ const getNotices = (req, res) =>
description
:
'
冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务
'
,
extra
:
'
进行中
'
,
status
:
'
processing
'
,
type
:
'
待办
'
,
type
:
'
event
'
,
},
]);
...
...
src/components/GlobalHeader/RightContent.js
浏览文件 @
1be42896
...
...
@@ -88,7 +88,11 @@ export default class GlobalHeaderRight extends PureComponent {
<
HeaderSearch
className
=
{
`
${
styles
.
action
}
${
styles
.
search
}
`
}
placeholder
=
{
formatMessage
({
id
:
'
component.globalHeader.search
'
})}
dataSource
=
{[
'
搜索提示一
'
,
'
搜索提示二
'
,
'
搜索提示三
'
]}
dataSource
=
{[
formatMessage
({
id
:
'
component.globalHeader.search.example1
'
}),
formatMessage
({
id
:
'
component.globalHeader.search.example2
'
}),
formatMessage
({
id
:
'
component.globalHeader.search.example3
'
}),
]}
onSearch
=
{
value
=>
{
console
.
log
(
'
input
'
,
value
);
// eslint-disable-line
}}
...
...
@@ -119,19 +123,19 @@ export default class GlobalHeaderRight extends PureComponent {
popupAlign
=
{{
offset
:
[
20
,
-
16
]
}}
>
<
NoticeIcon
.
Tab
list
=
{
noticeData
[
'
通知
'
]
}
list
=
{
noticeData
.
notification
}
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
[
'
消息
'
]
}
list
=
{
noticeData
.
message
}
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
[
'
待办
'
]
}
list
=
{
noticeData
.
event
}
title
=
{
formatMessage
({
id
:
'
component.globalHeader.event
'
})}
emptyText
=
{
formatMessage
({
id
:
'
component.globalHeader.event.empty
'
})}
emptyImage
=
"
https://gw.alipayobjects.com/zos/rmsportal/HsIsxMZiWKrNUavQUXqx.svg
"
...
...
src/locales/en-US.js
浏览文件 @
1be42896
export
default
{
'
navbar.lang
'
:
'
中文
'
,
'
component.globalHeader.search
'
:
'
Search
'
,
'
component.globalHeader.search.example1
'
:
'
Search example 1
'
,
'
component.globalHeader.search.example2
'
:
'
Search example 2
'
,
'
component.globalHeader.search.example3
'
:
'
Search example 3
'
,
'
component.globalHeader.help
'
:
'
Help
'
,
'
component.globalHeader.notification
'
:
'
Notification
'
,
'
component.globalHeader.notification.empty
'
:
'
You have viewed all notifications.
'
,
...
...
src/locales/zh-CN.js
浏览文件 @
1be42896
...
...
@@ -3,6 +3,9 @@
export
default
{
'
navbar.lang
'
:
'
English
'
,
'
component.globalHeader.search
'
:
'
站内搜索
'
,
'
component.globalHeader.search.example1
'
:
'
搜索提示一
'
,
'
component.globalHeader.search.example2
'
:
'
搜索提示二
'
,
'
component.globalHeader.search.example3
'
:
'
搜索提示三
'
,
'
component.globalHeader.help
'
:
'
使用文档
'
,
'
component.globalHeader.notification
'
:
'
通知
'
,
'
component.globalHeader.notification.empty
'
:
'
你已查看所有通知
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录