fix(bee-table): TableCell去掉Frament
This commit is contained in:
parent
0e21ef0e3b
commit
606ed5d901
|
@ -428,23 +428,20 @@ var TableCell = function (_Component) {
|
|||
if (colMenu) {
|
||||
className += ' u-table-inline-icon';
|
||||
}
|
||||
if (colSpan == 0) return null;
|
||||
return _react2["default"].createElement(
|
||||
_react.Fragment,
|
||||
null,
|
||||
colSpan == 0 ? null : _react2["default"].createElement(
|
||||
'td',
|
||||
{
|
||||
colSpan: colSpan,
|
||||
rowSpan: rowSpan,
|
||||
className: className,
|
||||
onClick: this.handleClick,
|
||||
title: title,
|
||||
style: _extends({ maxWidth: column.width, color: fontColor, backgroundColor: bgColor }, column.style) },
|
||||
indentText,
|
||||
expandIcon,
|
||||
text,
|
||||
colMenu
|
||||
)
|
||||
'td',
|
||||
{
|
||||
colSpan: colSpan,
|
||||
rowSpan: rowSpan,
|
||||
className: className,
|
||||
onClick: this.handleClick,
|
||||
title: title,
|
||||
style: _extends({ maxWidth: column.width, color: fontColor, backgroundColor: bgColor }, column.style) },
|
||||
indentText,
|
||||
expandIcon,
|
||||
text,
|
||||
colMenu
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bee-table",
|
||||
"version": "2.2.42",
|
||||
"version": "2.2.43",
|
||||
"description": "Table ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Component,Fragment } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import objectPath from 'object-path';
|
||||
import i18n from './lib/i18n';
|
||||
|
@ -280,24 +280,19 @@ class TableCell extends Component{
|
|||
if(colMenu){
|
||||
className += ' u-table-inline-icon'
|
||||
}
|
||||
return (
|
||||
<Fragment>
|
||||
{
|
||||
colSpan==0?null:<td
|
||||
colSpan={colSpan}
|
||||
rowSpan={rowSpan}
|
||||
className={className}
|
||||
onClick={this.handleClick}
|
||||
title={title}
|
||||
style={{maxWidth:column.width, color:fontColor, backgroundColor:bgColor, ...column.style}}>
|
||||
{indentText}
|
||||
{expandIcon}
|
||||
{text}
|
||||
{colMenu}
|
||||
</td>
|
||||
}
|
||||
</Fragment>
|
||||
);
|
||||
if(colSpan==0)return null;
|
||||
return <td
|
||||
colSpan={colSpan}
|
||||
rowSpan={rowSpan}
|
||||
className={className}
|
||||
onClick={this.handleClick}
|
||||
title={title}
|
||||
style={{maxWidth:column.width, color:fontColor, backgroundColor:bgColor, ...column.style}}>
|
||||
{indentText}
|
||||
{expandIcon}
|
||||
{text}
|
||||
{colMenu}
|
||||
</td>
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue