diff --git a/src/routes/List/CardList.js b/src/routes/List/CardList.js index af5fdbeacb11c073965304f6239bc97a0c0a8a0b..36c15e7b2152a4ee919e57ad16acfe721e42f5a7 100644 --- a/src/routes/List/CardList.js +++ b/src/routes/List/CardList.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import { connect } from 'dva'; -import { Row, Col, Card, Avatar, Spin, Button, Icon } from 'antd'; +import { Card, Avatar, Button, Icon, List } from 'antd'; import PageHeaderLayout from '../../layouts/PageHeaderLayout'; @@ -53,37 +53,35 @@ export default class CardList extends PureComponent { extraContent={extraContent} >
- { - loading ? - - : - - - - - { - list && list.map(item => ( - - 操作一, 操作二]} - > - } - title={item.title} - description={( -

- {item.description} -

- )} - /> -
- - )) - } -
- } + + + + + { + list && list.map(item => ( + + 操作一, 操作二]} + > + } + title={item.title} + description={( +

+ {item.description} +

+ )} + /> +
+
+ )) + } +
); diff --git a/src/routes/List/CoverCardList.js b/src/routes/List/CoverCardList.js index 2c4699a5e8b2c5d898b624f271366c977da86dc6..e0869866ef60bc335957ff4792381cf4516c0b20 100644 --- a/src/routes/List/CoverCardList.js +++ b/src/routes/List/CoverCardList.js @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; import moment from 'moment'; import { connect } from 'dva'; import { routerRedux } from 'dva/router'; -import { Row, Col, Form, Card, Select, Spin } from 'antd'; +import { Row, Col, Form, Card, Select, List } from 'antd'; import PageHeaderLayout from '../../layouts/PageHeaderLayout'; import StandardFormRow from '../../components/StandardFormRow'; @@ -72,10 +72,13 @@ export default class CoverCardList extends PureComponent { const { getFieldDecorator } = form; const cardList = list ? ( - + { list.map(item => ( - + } > @@ -100,10 +103,10 @@ export default class CoverCardList extends PureComponent { - + )) } - + ) : null; const tabList = [ @@ -209,17 +212,9 @@ export default class CoverCardList extends PureComponent { - { - loading && (list.length > 0) && - {cardList} - - } - { - loading && (list.length < 1) &&
- } - { - !loading && cardList - } +
+ { cardList } +
); diff --git a/src/routes/List/CoverCardList.less b/src/routes/List/CoverCardList.less index d4c7eadeaa34d9819b51cad25f5d734950300451..d2b9d1625fa575eacbb142f8d5a167c0aec2b1be 100644 --- a/src/routes/List/CoverCardList.less +++ b/src/routes/List/CoverCardList.less @@ -21,4 +21,7 @@ flex: 0 1 auto; } } + .cardList { + margin-top: 24px; + } }