SettingProvider
Provides unified default settings for components. Wrap once at the outer level to take effect globally.
SchemaForm
For example, you can uniformly configure the default validation messages for SchemaForm.
ModalForm
For example, you can uniformly configure the default layout for modal forms.
Or you can uniformly configure the default width for modal forms.
ProTable
For example, you can uniformly configure pagination options.
| Username | Phone | Nickname | Gender | Created At | Actions | |
|---|---|---|---|---|---|---|
暂无数据 | ||||||
Or uniformly configure the search area.
| Username | Phone | Nickname | Gender | Created At | Actions | |
|---|---|---|---|---|---|---|
暂无数据 | ||||||
Or uniformly configure the table size.
| Username | Phone | Nickname | Gender | Created At | Actions | |
|---|---|---|---|---|---|---|
暂无数据 | ||||||
FormUpload
You can uniformly set properties like action, header, children, responseToFileList here.
API
SettingProvider
| Property | Description | Type | Default |
|---|---|---|---|
| locale | Language package setting, you can find the packages in react-admin-kit/locale | - | zhCN |
| schemaFormSetting | Settings for SchemaForm component | - | |
| modalFormSetting | Settings for ModalForm component | - | |
| proTableSetting | Settings for ProTable component | - | |
| formUploadSetting | Settings for FormUpload component | - |
SchemaFormSettingProps
| Property | Description | Type | Default |
|---|---|---|---|
| name | -- | string | -- |
| initialValues | -- | Store | -- |
| component | -- | string | false | FC<any> | ComponentClass<any, any> | -- |
| fields | -- | FieldData<any>[] | -- |
| validateMessages | -- | ValidateMessages | -- |
| onValuesChange | -- | ((changedValues: Partial<Record<string, any>>, values: Record<string, any>) => void) | -- |
| onFieldsChange | -- | ((changedFields: FieldData<any>[], allFields: FieldData<any>[]) => void) | -- |
| onFinishFailed | -- | ((errorInfo: ValidateErrorEntity<Record<string, any>>) => void) | -- |
| validateTrigger | -- | string | false | string[] | -- |
| preserve | -- | boolean | -- |
| clearOnDestroy | -- | boolean | -- |
| classNames | -- | FormClassNamesType | -- |
| styles | -- | FormStylesType | -- |
| prefixCls | -- | string | -- |
| colon | -- | boolean | -- |
| layout | -- | FormLayout | -- |
| labelAlign | -- | FormLabelAlign | -- |
| labelWrap | -- | boolean | -- |
| labelCol | -- | ColProps | -- |
| wrapperCol | -- | ColProps | -- |
| feedbackIcons | -- | FeedbackIcons | -- |
| size | -- | SizeType | -- |
| disabled | -- | boolean | -- |
| scrollToFirstError | -- | boolean | ScrollFocusOptions | -- |
| requiredMark | -- | RequiredMark | -- |
| rootClassName | -- | string | -- |
| variant | -- | "outlined" | "borderless" | "filled" | "underlined" | -- |
| submitter | Submit button related configuration. | boolean | SubmitterProps & { style: React.CSSProperties } | false |
| loading |