From 789e55da479fbdf7dfb5e05bd19e73a23a9f17fd Mon Sep 17 00:00:00 2001 From: 2betop <2betop.cn@gmail.com> Date: Mon, 21 Dec 2020 19:03:57 +0800 Subject: [PATCH] =?UTF-8?q?Panel=20=E6=94=AF=E6=8C=81=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E7=9A=84=20className=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Form/index.tsx | 2 ++ src/renderers/Panel.tsx | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/renderers/Form/index.tsx b/src/renderers/Form/index.tsx index 5fd0be386..ddcb1fcb0 100644 --- a/src/renderers/Form/index.tsx +++ b/src/renderers/Form/index.tsx @@ -1346,6 +1346,7 @@ export default class Form extends React.Component { panelClassName, headerClassName, footerClassName, + footerWrapClassName, actionsClassName, bodyClassName, classnames: cx, @@ -1378,6 +1379,7 @@ export default class Form extends React.Component { headerClassName, footer, footerClassName, + footerWrapClassName, actionsClassName, bodyClassName, affixFooter diff --git a/src/renderers/Panel.tsx b/src/renderers/Panel.tsx index a2319a219..4ca86aec4 100644 --- a/src/renderers/Panel.tsx +++ b/src/renderers/Panel.tsx @@ -52,6 +52,11 @@ export interface PanelSchema extends BaseSchema { */ footerClassName?: SchemaClassName; + /** + * footer 和 actions 外层 div 类名。 + */ + footerWrapClassName?: SchemaClassName; + /** * 头部内容, 和 title 二选一。 */ @@ -80,6 +85,7 @@ export default class Panel extends React.Component { 'header', 'headerClassName', 'footerClassName', + 'footerWrapClassName', 'actionsClassName', 'bodyClassName' ]; @@ -210,6 +216,7 @@ export default class Panel extends React.Component { headerClassName, actionsClassName, footerClassName, + footerWrapClassName, children, title, footer, @@ -244,7 +251,12 @@ export default class Panel extends React.Component { ); let footerDom = footerDoms.length ? ( -
{footerDoms}
+
+ {footerDoms} +
) : null; return ( @@ -268,7 +280,13 @@ export default class Panel extends React.Component { {footerDom} {affixFooter && footerDoms.length ? ( -
+
{footerDoms}
) : null}