优化Page
parent
9eec05508b
commit
e167e629c6
|
|
@ -18,6 +18,8 @@ export interface PageProps {
|
|||
isShowAllAction?: boolean;
|
||||
/** 取消按钮文字,默认 "关闭" */
|
||||
backButtonText?: string;
|
||||
/** 内容区域的padding,默认 "20px" */
|
||||
contentPadding?: string;
|
||||
/** 自定义底部操作按钮组 */
|
||||
customActionButtons?: ReactNode;
|
||||
/** 额外底部操作按钮组 */
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ function Page(props) {
|
|||
isShowFooter = true,
|
||||
isShowAllAction = true,
|
||||
backButtonText = "关闭",
|
||||
contentPadding = "20px",
|
||||
customActionButtons,
|
||||
extraActionButtons,
|
||||
} = props;
|
||||
|
|
@ -20,7 +21,7 @@ function Page(props) {
|
|||
return (
|
||||
<div className="page">
|
||||
{(isShowAllAction && isShowHeader) && <HeaderBack title={headerTitle} history={history} previous={headerPrevious} />}
|
||||
<div style={{ padding: 20 }}>
|
||||
<div style={{ padding: contentPadding }}>
|
||||
{props.children}
|
||||
</div>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue