Remove extra wrapper of Card

This commit is contained in:
afc163 2017-12-05 13:35:32 +08:00
parent ed44dfaeb8
commit 2e45074fab
2 changed files with 487 additions and 522 deletions

File diff suppressed because it is too large Load Diff

View File

@ -183,13 +183,6 @@ export default class Card extends React.Component<CardProps, {}> {
{loading ? loadingBlock : <div>{children}</div>}
</div>
);
const mainContent = (
<div>
{head}
{coverDom}
{children ? body : null}
</div>
);
const actionDom = actions && actions.length ?
<ul className={`${prefixCls}-actions`}>{this.getAction(actions)}</ul> : null;
const divProps = omit(others, [
@ -197,7 +190,9 @@ export default class Card extends React.Component<CardProps, {}> {
]);
return (
<div {...divProps} className={classString} ref={this.saveRef}>
{mainContent}
{head}
{coverDom}
{children ? body : null}
{actionDom}
</div>
);