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