types: 更新组件事件类型定义
parent
73e1ae0a4e
commit
4309be7188
|
@ -60,6 +60,8 @@ export type MaybeComponentPropKey =
|
|||
| keyof HtmlHTMLAttributes
|
||||
| (Record<never, never> & string);
|
||||
|
||||
export type MaybeComponentEvents = { [K in MaybeComponentPropKey]?: any };
|
||||
|
||||
export type MaybeComponentProps = { [K in MaybeComponentPropKey]?: any };
|
||||
|
||||
export type FormActions = FormContext<GenericObject>;
|
||||
|
@ -128,9 +130,12 @@ export interface FormItemDependencies {
|
|||
triggerFields: string[];
|
||||
}
|
||||
|
||||
type ComponentEvents = {
|
||||
[K: string]: (...args: any[]) => void;
|
||||
} & Record<string, any>;
|
||||
type ComponentEvents =
|
||||
| ((
|
||||
value: Partial<Record<string, any>>,
|
||||
actions: FormActions,
|
||||
) => MaybeComponentEvents)
|
||||
| MaybeComponentEvents;
|
||||
|
||||
type ComponentProps =
|
||||
| ((
|
||||
|
|
Loading…
Reference in New Issue