From 56a07488bfc9fad783281afd3414dee0ff7fdbf0 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 26 Jul 2018 23:38:37 +0800 Subject: [PATCH] Fix rerender bug of ListContent the definition should not be placed in render close #1922 --- src/routes/List/BasicList.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/routes/List/BasicList.js b/src/routes/List/BasicList.js index 0886aff1..fbad8af2 100644 --- a/src/routes/List/BasicList.js +++ b/src/routes/List/BasicList.js @@ -24,6 +24,22 @@ const RadioButton = Radio.Button; const RadioGroup = Radio.Group; const { Search } = Input; +const ListContent = ({ data: { owner, createdAt, percent, status } }) => ( +
+
+ Owner +

{owner}

+
+
+ 开始时间 +

{moment(createdAt).format('YYYY-MM-DD HH:mm')}

+
+
+ +
+
+); + @connect(({ list, loading }) => ({ list, loading: loading.models.list, @@ -71,22 +87,6 @@ export default class BasicList extends PureComponent { total: 50, }; - const ListContent = ({ data: { owner, createdAt, percent, status } }) => ( -
-
- Owner -

{owner}

-
-
- 开始时间 -

{moment(createdAt).format('YYYY-MM-DD HH:mm')}

-
-
- -
-
- ); - const menu = ( -- GitLab