Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
89b3d2ee
Commit
89b3d2ee
authored
Apr 25, 2018
by
jim
Committed by
陈帅
Apr 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NoticeIcon add hideClear props
parent
02f06240
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
7 deletions
+54
-7
src/components/NoticeIcon/NoticeIconTab.d.ts
src/components/NoticeIcon/NoticeIconTab.d.ts
+1
-0
src/components/NoticeIcon/NoticeList.js
src/components/NoticeIcon/NoticeList.js
+7
-4
src/components/NoticeIcon/index.en-US.md
src/components/NoticeIcon/index.en-US.md
+43
-0
src/components/NoticeIcon/index.zh-CN.md
src/components/NoticeIcon/index.zh-CN.md
+3
-3
No files found.
src/components/NoticeIcon/NoticeIconTab.d.ts
View file @
89b3d2ee
...
...
@@ -14,6 +14,7 @@ export interface INoticeIconTabProps {
emptyText
?:
React
.
ReactNode
;
emptyImage
?:
string
;
style
?:
React
.
CSSProperties
;
hideClear
?:
boolean
;
}
export
default
class
NoticeIconTab
extends
React
.
Component
<
INoticeIconTabProps
,
any
>
{}
src/components/NoticeIcon/NoticeList.js
View file @
89b3d2ee
...
...
@@ -11,6 +11,7 @@ export default function NoticeList({
locale
,
emptyText
,
emptyImage
,
hideClear
,
})
{
if
(
data
.
length
===
0
)
{
return
(
...
...
@@ -51,10 +52,12 @@ export default function NoticeList({
);
})}
<
/List
>
{
hideClear
?
null
:
(
<
div
className
=
{
styles
.
clear
}
onClick
=
{
onClear
}
>
{
locale
.
clear
}
{
title
}
<
/div
>
)}
<
/div
>
);
}
src/components/NoticeIcon/index.en-US.md
0 → 100644
View file @
89b3d2ee
---
title
:
NoticeIcon
subtitle
:
Notification Menu
cols
:
1
order
:
9
---
用在导航工具栏上,作为整个产品统一的通知中心。
## API
参数 | 说明 | 类型 | 默认值
----|------|-----|------
count | Total number of messages | number | -
loading | Popup card loading status | boolean | false
onClear | Click to clear button the callback | function(tabTitle) | -
onItemClick | Click on the list item's callback | function(item, tabProps) | -
onTabChange | Switching callbacks for tabs | function(tabTitle) | -
popupAlign | Popup card location configuration | Object
[
alignConfig
](
https://github.com/yiminghe/dom-align#alignconfig-object-details
)
| -
onPopupVisibleChange | Popup Card Showing or Hiding Callbacks | function(visible) | -
popupVisible | Popup card display state | boolean | -
locale | Default message text | Object |
`{ emptyText: '暂无数据', clear: '清空' }`
### NoticeIcon.Tab
参数 | 说明 | 类型 | 默认值
----|------|-----|------
title | header for message Tab | string | -
list | List data, format refer to the following table | Array |
`[]`
hideClear | Clear button display status | boolean | false
emptyText | message text when list is empty | ReactNode | -
emptyImage | image when list is empty | string | -
### Tab data
参数 | 说明 | 类型 | 默认值
----|------|-----|------
avatar | avatar img url | string | -
title | title | ReactNode | -
description | description info | ReactNode | -
datetime | Timestamps | ReactNode | -
extra |Additional information in the upper right corner of the list item | ReactNode | -
src/components/NoticeIcon/index.md
→
src/components/NoticeIcon/index.
zh-CN.
md
View file @
89b3d2ee
---
title
:
en-US
:
NoticeIcon
zh-CN
:
NoticeIcon
title
:
NoticeIcon
subtitle
:
通知菜单
cols
:
1
order
:
9
...
...
@@ -29,9 +27,11 @@ locale | 默认文案 | Object | `{ emptyText: '暂无数据', clear: '清空' }
----|------|-----|------
title | 消息分类的页签标题 | string | -
list | 列表数据,格式参照下表 | Array |
`[]`
hideClear | 是否显示清空按钮 | boolean | false
emptyText | 针对每个 Tab 定制空数据文案 | ReactNode | -
emptyImage | 针对每个 Tab 定制空数据图片 | string | -
### Tab data
参数 | 说明 | 类型 | 默认值
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment