mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-08 01:53:34 +08:00
Remove extra wrapper of Card
This commit is contained in:
parent
ed44dfaeb8
commit
2e45074fab
File diff suppressed because it is too large
Load Diff
@ -183,13 +183,6 @@ export default class Card extends React.Component<CardProps, {}> {
|
|||||||
{loading ? loadingBlock : <div>{children}</div>}
|
{loading ? loadingBlock : <div>{children}</div>}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
const mainContent = (
|
|
||||||
<div>
|
|
||||||
{head}
|
|
||||||
{coverDom}
|
|
||||||
{children ? body : null}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
const actionDom = actions && actions.length ?
|
const actionDom = actions && actions.length ?
|
||||||
<ul className={`${prefixCls}-actions`}>{this.getAction(actions)}</ul> : null;
|
<ul className={`${prefixCls}-actions`}>{this.getAction(actions)}</ul> : null;
|
||||||
const divProps = omit(others, [
|
const divProps = omit(others, [
|
||||||
@ -197,7 +190,9 @@ export default class Card extends React.Component<CardProps, {}> {
|
|||||||
]);
|
]);
|
||||||
return (
|
return (
|
||||||
<div {...divProps} className={classString} ref={this.saveRef}>
|
<div {...divProps} className={classString} ref={this.saveRef}>
|
||||||
{mainContent}
|
{head}
|
||||||
|
{coverDom}
|
||||||
|
{children ? body : null}
|
||||||
{actionDom}
|
{actionDom}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user