@@ -531,15 +531,14 @@ export interface UserLoginProps {
531531| ---- | ---- | ---- | ---- | ---- |
532532| api | 请求接口 | 是 | ` string` | - |
533533| align | 卡片框的位置 | 否 | ` 枚举类型:' left' \| ' right' \| ' center' ` | ` center` |
534+ | initialValues | 表单默认值 | 否 | ` object` | - |
534535| footer | 页脚 | 否 | ` React .ReactNode ` | ` true ` |
535536| bg | 页面背景图,可以` require (' ./image.png' )` 或者是图片链接 | 否 | ` string` | - |
536537| logo | logo头像, 值为` null ` 不显示logo | 否 | ` string` | - |
537538| children | 替换卡片位置内容 | 否 | ` React .ReactNode ` | - |
538539| projectName | 项目名称(页面标题) 如果值为` null ` 不显示标题 | 否 | ` string\| null ` | ` UIW Admin` |
539540| btnProps | 登录按钮属性 | 否 | ` Omit< ButtonProps, ' ref' > ` | ` {}` |
540541| buttons | 登录按钮位置的自定义按钮组, title 为显示标题 | 否 | ` (Omit< ButtonProps, ' ref' > & { title?: React .ReactNode })[]` | - |
541- | onSuccess | 登录接口返回 | 是 | ` (resp: any, form: (FormValue \| undefined )) => void ` | ` ()=> null ` |
542- | onBefore | 用接口之前 , 可以通过这个添加额外参数 返回 false 则不进行登录操作 | 否 | ` (store : FormValue ) => (Record< string, any> \| boolean)` | - |
543542| requestConfig | ` request` 请求 ` options` 配置参数 | 否 | ` Options` | - |
544543| saveField | 默认输入框保存字段 | 否 | ` {userName (登录账号字段)?: string,passWord (密码字段)?: string}` | ` {userName: " username" ,passWord: " password" }` |
545544| defaultFieldsConfig | 默认输入框保存字段 | 否 | ` {userName (账户输入框)?: Partial< FieldsProps> ,passWord (密码输入框)?: Partial< FieldsProps> }` | - |
@@ -550,6 +549,8 @@ export interface UserLoginProps {
550549| classNameBody | 卡片框` className` | 否 | ` string` | - |
551550| styleBody | 卡片框` style` | 否 | ` React .CSSProperties ` | - |
552551| styleContainer | 背景框` style` 可再次调整背景图样式 | 否 | ` React .CSSProperties ` | - |
552+ | onSuccess | 登录接口返回 | 是 | ` (resp: any, form: (FormValue \| undefined )) => void ` | ` ()=> null ` |
553+ | onBefore | 用接口之前 , 可以通过这个添加额外参数 返回 false 则不进行登录操作 | 否 | ` (store : FormValue ) => (Record< string, any> \| boolean)` | - |
553554
554555` ` ` tsx
555556export interface FieldsProps < T = any > extends FormFieldsProps < T > {
0 commit comments