From 54c3446bf199faa28250a668683230a277842569 Mon Sep 17 00:00:00 2001 From: Ma ke <33743617+jiatianqi@users.noreply.github.com> Date: Thu, 2 Jun 2022 18:51:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20tablView=E7=BB=84=E4=BB=B6=20=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=B1=9E=E6=80=A7padding=E8=AE=BE=E7=BD=AE=E6=97=A0?= =?UTF-8?q?=E6=95=88=E9=97=AE=E9=A2=98=20(#4526)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ”jiatianqi“ <”jiatianqi@baidu.com“> --- packages/amis/src/renderers/TableView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/amis/src/renderers/TableView.tsx b/packages/amis/src/renderers/TableView.tsx index 7e335ac66..26b72bba2 100644 --- a/packages/amis/src/renderers/TableView.tsx +++ b/packages/amis/src/renderers/TableView.tsx @@ -173,7 +173,7 @@ export default class TableView extends React.Component { } 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 { 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',