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
f2b99a12
Commit
f2b99a12
authored
Jul 23, 2018
by
Juan Rodrigo Venegas Boesch
Committed by
陈帅
Jul 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NoticeIcon new feature
parent
ad38d93f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
src/components/NoticeIcon/index.d.ts
src/components/NoticeIcon/index.d.ts
+1
-0
src/components/NoticeIcon/index.en-US.md
src/components/NoticeIcon/index.en-US.md
+1
-0
src/components/NoticeIcon/index.js
src/components/NoticeIcon/index.js
+3
-2
src/components/NoticeIcon/index.zh-CN.md
src/components/NoticeIcon/index.zh-CN.md
+1
-0
No files found.
src/components/NoticeIcon/index.d.ts
View file @
f2b99a12
...
@@ -3,6 +3,7 @@ import NoticeIconTab, { INoticeIconData } from './NoticeIconTab';
...
@@ -3,6 +3,7 @@ import NoticeIconTab, { INoticeIconData } from './NoticeIconTab';
export
interface
INoticeIconProps
{
export
interface
INoticeIconProps
{
count
?:
number
;
count
?:
number
;
bell
?:
React
.
ReactNode
;
className
?:
string
;
className
?:
string
;
loading
?:
boolean
;
loading
?:
boolean
;
onClear
?:
(
tableTile
:
string
)
=>
void
;
onClear
?:
(
tableTile
:
string
)
=>
void
;
...
...
src/components/NoticeIcon/index.en-US.md
View file @
f2b99a12
...
@@ -12,6 +12,7 @@ order: 9
...
@@ -12,6 +12,7 @@ order: 9
Property | Description | Type | Default
Property | Description | Type | Default
----|------|-----|------
----|------|-----|------
count | Total number of messages | number | -
count | Total number of messages | number | -
bell | Change the bell Icon | ReactNode |
`<Icon type='bell' />`
loading | Popup card loading status | boolean | false
loading | Popup card loading status | boolean | false
onClear | Click to clear button the callback | function(tabTitle) | -
onClear | Click to clear button the callback | function(tabTitle) | -
onItemClick | Click on the list item's callback | function(item, tabProps) | -
onItemClick | Click on the list item's callback | function(item, tabProps) | -
...
...
src/components/NoticeIcon/index.js
View file @
f2b99a12
...
@@ -65,13 +65,14 @@ export default class NoticeIcon extends PureComponent {
...
@@ -65,13 +65,14 @@ export default class NoticeIcon extends PureComponent {
}
}
render
()
{
render
()
{
const
{
className
,
count
,
popupAlign
,
popupVisible
,
onPopupVisibleChange
}
=
this
.
props
;
const
{
className
,
count
,
popupAlign
,
popupVisible
,
onPopupVisibleChange
,
bell
}
=
this
.
props
;
const
noticeButtonClass
=
classNames
(
className
,
styles
.
noticeButton
);
const
noticeButtonClass
=
classNames
(
className
,
styles
.
noticeButton
);
const
notificationBox
=
this
.
getNotificationBox
();
const
notificationBox
=
this
.
getNotificationBox
();
const
NoticeBellIcon
=
bell
||
<
Icon
type
=
"
bell
"
className
=
{
styles
.
icon
}
/>
;
const
trigger
=
(
const
trigger
=
(
<
span
className
=
{
noticeButtonClass
}
>
<
span
className
=
{
noticeButtonClass
}
>
<
Badge
count
=
{
count
}
style
=
{{
boxShadow
:
'
none
'
}}
className
=
{
styles
.
badge
}
>
<
Badge
count
=
{
count
}
style
=
{{
boxShadow
:
'
none
'
}}
className
=
{
styles
.
badge
}
>
<
Icon
type
=
"
bell
"
className
=
{
styles
.
icon
}
/
>
{
NoticeBellIcon
}
<
/Badge
>
<
/Badge
>
<
/span
>
<
/span
>
);
);
...
...
src/components/NoticeIcon/index.zh-CN.md
View file @
f2b99a12
...
@@ -12,6 +12,7 @@ order: 9
...
@@ -12,6 +12,7 @@ order: 9
参数 | 说明 | 类型 | 默认值
参数 | 说明 | 类型 | 默认值
----|------|-----|------
----|------|-----|------
count | 图标上的消息总数 | number | -
count | 图标上的消息总数 | number | -
bell | translate this please -> Change the bell Icon | ReactNode |
`<Icon type='bell' />`
loading | 弹出卡片加载状态 | boolean | false
loading | 弹出卡片加载状态 | boolean | false
onClear | 点击清空按钮的回调 | function(tabTitle) | -
onClear | 点击清空按钮的回调 | function(tabTitle) | -
onItemClick | 点击列表项的回调 | function(item, tabProps) | -
onItemClick | 点击列表项的回调 | function(item, tabProps) | -
...
...
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