index.en-US.md 1.89 KB
Newer Older
jim's avatar
jim committed
1 2
---
title: NoticeIcon
Shuai Chen's avatar
Shuai Chen committed
3
subtitle: 
jim's avatar
jim committed
4 5 6 7
cols: 1
order: 9
---

8
Used in navigation toolbar as a unified notification center for the entire product.
jim's avatar
jim committed
9 10 11

## API

jim's avatar
jim committed
12
Property | Description | Type | Default
jim's avatar
jim committed
13 14
----|------|-----|------
count | Total number of messages | number | -
15
bell | Change the bell Icon | ReactNode | `<Icon type='bell' />`
何乐's avatar
何乐 committed
16 17
loading | Popup card loading status | boolean | `false`
onClear | Click to clear button the callback | function(tabName) | -
jim's avatar
jim committed
18 19
onItemClick | Click on the list item's callback | function(item, tabProps) | -
onPopupVisibleChange | Popup Card Showing or Hiding Callbacks | function(visible) | -
何乐's avatar
何乐 committed
20
onTabChange | Switching callbacks for tabs | function(tabTitle) | -
21
onViewMore | Callback of click for view more | function(tabProps, event) | -
jim's avatar
jim committed
22
popupVisible | Popup card display state | boolean | -
23
locale | Default message text | Object | `{ emptyText: 'No notifications', clear: 'Clear', viewMore: 'Loading more' }`
何乐's avatar
何乐 committed
24
clearClose | Close menu after clear | boolean | `false`
jim's avatar
jim committed
25 26 27

### NoticeIcon.Tab

jim's avatar
jim committed
28
Property | Description | Type | Default
jim's avatar
jim committed
29
----|------|-----|------
何乐's avatar
何乐 committed
30 31 32
count | Unread messages count of this tab | number | list.length
emptyText | Message text when list is empty | ReactNode | -
emptyImage | Image when list is empty | string | -
jim's avatar
jim committed
33
list | List data, format refer to the following table | Array | `[]`
何乐's avatar
何乐 committed
34
showClear | Clear button display status | boolean | `true`
35 36
showViewMore | View more button display status | boolean | `false`
title | header for message Tab, the actual text is `locale[title] || title` | string | -
jim's avatar
jim committed
37 38 39

### Tab data

jim's avatar
jim committed
40
Property | Description | Type | Default
jim's avatar
jim committed
41
----|------|-----|------
何乐's avatar
何乐 committed
42
avatar | avatar img url | string \| ReactNode | -
jim's avatar
jim committed
43 44 45
title | title | ReactNode | -
description | description info | ReactNode | -
datetime | Timestamps | ReactNode | -
何乐's avatar
何乐 committed
46 47
extra | Additional information in the upper right corner of the list item | ReactNode | -
clickClose | Close menu after clicking list item | boolean | `false`