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
56a07488
Commit
56a07488
authored
Jul 26, 2018
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rerender bug of ListContent
the definition should not be placed in render close #1922
parent
1fb2185d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
src/routes/List/BasicList.js
src/routes/List/BasicList.js
+16
-16
No files found.
src/routes/List/BasicList.js
View file @
56a07488
...
@@ -24,6 +24,22 @@ const RadioButton = Radio.Button;
...
@@ -24,6 +24,22 @@ const RadioButton = Radio.Button;
const
RadioGroup
=
Radio
.
Group
;
const
RadioGroup
=
Radio
.
Group
;
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
const
ListContent
=
({
data
:
{
owner
,
createdAt
,
percent
,
status
}
})
=>
(
<
div
className
=
{
styles
.
listContent
}
>
<
div
className
=
{
styles
.
listContentItem
}
>
<
span
>
Owner
<
/span
>
<
p
>
{
owner
}
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
listContentItem
}
>
<
span
>
开始时间
<
/span
>
<
p
>
{
moment
(
createdAt
).
format
(
'
YYYY-MM-DD HH:mm
'
)}
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
listContentItem
}
>
<
Progress
percent
=
{
percent
}
status
=
{
status
}
strokeWidth
=
{
6
}
style
=
{{
width
:
180
}}
/
>
<
/div
>
<
/div
>
);
@
connect
(({
list
,
loading
})
=>
({
@
connect
(({
list
,
loading
})
=>
({
list
,
list
,
loading
:
loading
.
models
.
list
,
loading
:
loading
.
models
.
list
,
...
@@ -71,22 +87,6 @@ export default class BasicList extends PureComponent {
...
@@ -71,22 +87,6 @@ export default class BasicList extends PureComponent {
total
:
50
,
total
:
50
,
};
};
const
ListContent
=
({
data
:
{
owner
,
createdAt
,
percent
,
status
}
})
=>
(
<
div
className
=
{
styles
.
listContent
}
>
<
div
className
=
{
styles
.
listContentItem
}
>
<
span
>
Owner
<
/span
>
<
p
>
{
owner
}
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
listContentItem
}
>
<
span
>
开始时间
<
/span
>
<
p
>
{
moment
(
createdAt
).
format
(
'
YYYY-MM-DD HH:mm
'
)}
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
listContentItem
}
>
<
Progress
percent
=
{
percent
}
status
=
{
status
}
strokeWidth
=
{
6
}
style
=
{{
width
:
180
}}
/
>
<
/div
>
<
/div
>
);
const
menu
=
(
const
menu
=
(
<
Menu
>
<
Menu
>
<
Menu
.
Item
>
<
Menu
.
Item
>
...
...
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