mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
657 B
TypeScript
30 lines
657 B
TypeScript
import type { ComponentType } from 'react';
|
|
|
|
/**
|
|
* 容器配置
|
|
*/
|
|
export interface FastFormContainerProps {
|
|
loading: boolean;
|
|
submitLabel?: string;
|
|
|
|
layout?: 'horizontal' | 'vertical';
|
|
|
|
/**
|
|
* 是否允许提交
|
|
*/
|
|
canSubmit?: boolean;
|
|
handleSubmit: () => void;
|
|
}
|
|
export type FastFormContainerComponent =
|
|
React.ComponentType<FastFormContainerProps>;
|
|
let FastFormContainer: FastFormContainerComponent;
|
|
export function regFormContainer(component: FastFormContainerComponent) {
|
|
FastFormContainer = component;
|
|
}
|
|
|
|
export function getFormContainer():
|
|
| ComponentType<FastFormContainerProps>
|
|
| undefined {
|
|
return FastFormContainer;
|
|
}
|