Panel 支持更多的 className 配置

This commit is contained in:
2betop 2020-12-21 19:03:57 +08:00 committed by wuduoyi
parent 80c0295fd6
commit 88ae9fbcb3
2 changed files with 22 additions and 2 deletions

View File

@ -1346,6 +1346,7 @@ export default class Form extends React.Component<FormProps, object> {
panelClassName,
headerClassName,
footerClassName,
footerWrapClassName,
actionsClassName,
bodyClassName,
classnames: cx,
@ -1378,6 +1379,7 @@ export default class Form extends React.Component<FormProps, object> {
headerClassName,
footer,
footerClassName,
footerWrapClassName,
actionsClassName,
bodyClassName,
affixFooter

View File

@ -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<PanelProps> {
'header',
'headerClassName',
'footerClassName',
'footerWrapClassName',
'actionsClassName',
'bodyClassName'
];
@ -210,6 +216,7 @@ export default class Panel extends React.Component<PanelProps> {
headerClassName,
actionsClassName,
footerClassName,
footerWrapClassName,
children,
title,
footer,
@ -244,7 +251,12 @@ export default class Panel extends React.Component<PanelProps> {
);
let footerDom = footerDoms.length ? (
<div ref={this.footerDom}>{footerDoms}</div>
<div
className={cx('Panel-footerWrap', footerWrapClassName)}
ref={this.footerDom}
>
{footerDoms}
</div>
) : null;
return (
@ -268,7 +280,13 @@ export default class Panel extends React.Component<PanelProps> {
{footerDom}
{affixFooter && footerDoms.length ? (
<div ref={this.affixDom} className={cx('Panel-fixedBottom')}>
<div
ref={this.affixDom}
className={cx(
'Panel-fixedBottom Panel-footerWrap',
footerWrapClassName
)}
>
{footerDoms}
</div>
) : null}