mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
code optimize (#5314)
This commit is contained in:
parent
fee429909f
commit
804efbfbde
@ -44,12 +44,12 @@ export default class Row extends React.Component<RowProps, any> {
|
||||
if (!col) {
|
||||
return null;
|
||||
}
|
||||
if (col.props) {
|
||||
if (col.props && (gutter as number) > 0) {
|
||||
return cloneElement(col, {
|
||||
style: (gutter as number) > 0 ? assign({}, {
|
||||
style: assign({}, {
|
||||
paddingLeft: (gutter as number) / 2,
|
||||
paddingRight: (gutter as number) / 2,
|
||||
}, col.props.style) : col.props.style,
|
||||
}, col.props.style),
|
||||
});
|
||||
}
|
||||
return col;
|
||||
|
Loading…
Reference in New Issue
Block a user