fix: 修复 typescript 类型声明 (#2529)

This commit is contained in:
muzuiget 2016-07-29 10:03:40 +08:00 committed by Benjy Cui
parent 14d6bd80da
commit 79e38fe7e6

16
index.d.ts vendored
View File

@ -101,7 +101,7 @@ interface ButtonProps {
/** 设置按钮大小,可选值为 `small` `large` 或者不设*/
size?:ButtonSize,
/** `click` 事件的 handler*/
onClick?:React.FormEventHandler,
onClick?:React.FormEventHandler<any>,
/** 设置按钮载入状态*/
loading?:boolean,
@ -318,7 +318,7 @@ interface CheckboxProps {
/** 初始是否选中*/
defaultChecked?:boolean,
/** 变化时回调函数*/
onChange?:React.FormEventHandler,
onChange?:React.FormEventHandler<any>,
style?:React.CSSProperties
}
@ -488,7 +488,7 @@ interface DropdownButtonProps {
/** 按钮类型*/
type?:'primary' | 'ghost' | 'dash',
/** 点击左侧按钮的回调*/
onClick?:React.FormEventHandler,
onClick?:React.FormEventHandler<any>,
/** 触发下拉的行为*/
trigger?:'click' | 'hover',
/** 菜单节点*/
@ -606,7 +606,7 @@ interface FormProps {
/** 经 `Form.create()` 包装过的组件会自带 `this.props.form` 属性,直接传给 Form 即可*/
form?:Object,
/** 数据验证成功后回调事件*/
onSubmit?:React.FormEventHandler,
onSubmit?:React.FormEventHandler<any>,
style?:React.CSSProperties
}
@ -691,7 +691,7 @@ interface InputProps {
addonAfter?:React.ReactNode,
prefixCls?:string,
placeholder?:string,
onChange?:React.FormEventHandler,
onChange?:React.FormEventHandler<any>,
style:React.CSSProperties
}
export class Input extends React.Component<InputProps, {}> {
@ -710,7 +710,7 @@ interface InputNumberProps {
/** 初始值*/
defaultValue?:number,
/** 变化回调*/
onChange?:React.FormEventHandler,
onChange?:React.FormEventHandler<any>,
/** 禁用*/
disabled?:boolean,
/** 输入框大小*/
@ -1164,7 +1164,7 @@ type RadioGroupSize = 'large' | 'default' | 'small'
interface RadioGroupProps {
/** 选项变化时的回调函数*/
onChange?:React.FormEventHandler,
onChange?:React.FormEventHandler<any>,
/** 用于设置当前选中的值*/
value?:string,
/** 默认选中的值*/
@ -1755,7 +1755,7 @@ interface TreeNodeEvent {
interface TreeNodeMouseEvent {
node:TreeNode,
event:React.MouseEventHandler,
event:React.MouseEventHandler<any>,
}
interface TreeProps {