diff --git a/packages/form/src/layouts/LoginForm/index.tsx b/packages/form/src/layouts/LoginForm/index.tsx index b2c1bf26447a..a0d00aab2be0 100644 --- a/packages/form/src/layouts/LoginForm/index.tsx +++ b/packages/form/src/layouts/LoginForm/index.tsx @@ -47,6 +47,11 @@ export type LoginFormProps = { * @name 登录框主表格的样式 */ contentStyle?: React.CSSProperties; + /** + * @name 登录框容器的样式 + */ + containerStyle?: React.CSSProperties; + otherStyle?: React.CSSProperties; } & Omit, 'title'>; function LoginForm>(props: Partial>) { @@ -58,6 +63,8 @@ function LoginForm>(props: Partial>) { subTitle, actions, children, + containerStyle, + otherStyle, ...proFormProps } = props; @@ -110,7 +117,10 @@ function LoginForm>(props: Partial>) { }, [logo]); return wrapSSR( -
+
{title || logoDom ? (
@@ -131,7 +141,11 @@ function LoginForm>(props: Partial>) { {message} {children} - {actions ?
{actions}
: null} + {actions ? ( +
+ {actions} +
+ ) : null}
, ); diff --git a/packages/form/src/layouts/LoginFormPage/index.tsx b/packages/form/src/layouts/LoginFormPage/index.tsx index 85f3050ef854..440a2732ef05 100644 --- a/packages/form/src/layouts/LoginFormPage/index.tsx +++ b/packages/form/src/layouts/LoginFormPage/index.tsx @@ -60,6 +60,8 @@ export type LoginFormPageProps = { children?: React.ReactNode | React.ReactNode[]; containerStyle?: React.CSSProperties; + mainStyle?: React.CSSProperties; + otherStyle?: React.CSSProperties; } & ProFormProps; export function LoginFormPage>( @@ -76,6 +78,8 @@ export function LoginFormPage>( actions, children, containerStyle, + otherStyle, + mainStyle, ...proFormProps } = props; @@ -140,14 +144,12 @@ export function LoginFormPage>( )} {activityConfig.subTitle && (
- {' '} - {activityConfig.subTitle}{' '} + {activityConfig.subTitle}
)} {activityConfig.action && (
- {' '} - {activityConfig.action}{' '} + {activityConfig.action}
)}
@@ -168,12 +170,16 @@ export function LoginFormPage>( ) : null} {subTitle ?
{subTitle}
: null}
-
+
{message} {children} - {actions ?
{actions}
: null} + {actions ? ( +
+ {actions} +
+ ) : null}