mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
fix: amis:table-view 预览和实际外观不一致 (#10091)
Co-authored-by: liaoxuezhi <2698393+2betop@users.noreply.github.com>
This commit is contained in:
parent
f628761aad
commit
4ac106eff2
@ -276,10 +276,12 @@ export default class TableView extends React.Component<TableViewProps, object> {
|
||||
wrapperCustomStyle,
|
||||
env,
|
||||
themeCss,
|
||||
baseControlClassName
|
||||
testid,
|
||||
baseControlClassName,
|
||||
style
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
const renderNode = (
|
||||
<table
|
||||
className={cx(
|
||||
'TableView',
|
||||
@ -319,6 +321,16 @@ export default class TableView extends React.Component<TableViewProps, object> {
|
||||
/>
|
||||
</table>
|
||||
);
|
||||
|
||||
if (style && Object.keys(style).length) {
|
||||
return (
|
||||
<div className="ae-TableViewEditor" style={style}>
|
||||
{renderNode}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return renderNode;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user