fix: tablView组件 表格属性padding设置无效问题 (#4526)

Co-authored-by: ”jiatianqi“ <”jiatianqi@baidu.com“>
This commit is contained in:
Ma ke 2022-06-02 18:51:42 +08:00 committed by GitHub
parent 2a264abaa1
commit 54c3446bf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,7 +173,7 @@ export default class TableView extends React.Component<TableViewProps, object> {
}
renderTd(td: TdObject, colIndex: number, rowIndex: number) {
const {border, borderColor, render, style} = this.props;
const {border, borderColor, render, style, padding} = this.props;
const key = `td-${colIndex}`;
let styleBorder;
if (border) {
@ -186,7 +186,7 @@ export default class TableView extends React.Component<TableViewProps, object> {
color: td.color,
fontWeight: td.bold ? 'bold' : 'normal',
background: td.background,
padding: td.padding || defaultPadding,
padding: td.padding || padding,
width: td.width || 'auto',
textAlign: td.align || 'left',
verticalAlign: td.valign || 'center',