List optimize (#7391)

* change spin size to large

* fixed list loading
This commit is contained in:
niko 2017-08-30 15:16:48 +08:00 committed by GitHub
parent e4860bfac0
commit 75518241d6

View File

@ -52,6 +52,7 @@ export default class List extends Component<ListProps> {
pagination = false,
prefixCls = 'ant-list',
grid,
...rest,
} = this.props;
const classString = classNames(prefixCls, className, {
@ -82,7 +83,7 @@ export default class List extends Component<ListProps> {
const loadingContent = (
<div className={`${prefixCls}-spin`}>
<Spin />
<Spin size="large"/>
</div>
);
@ -93,7 +94,7 @@ export default class List extends Component<ListProps> {
) : children;
return (
<div className={classString}>
<div className={classString} {...rest}>
{loading && loadingContent}
{!loading && childrenContent}
{!loading && showLoadMore && moreContent}