Skip to content

Commit

Permalink
fix(Date-picker): prop 'onOk' typescript declaration File wrong
Browse files Browse the repository at this point in the history
声明文件中onOk是一个没有参数的函数
``` javascript
onOk?: () => Array<any>;
```
实际上应该和onChange一样,传入一个带参数的
``` javascript
onChange?: (value: Array<any>) => void;
```
  • Loading branch information
GeoffZhu authored Jun 3, 2019
1 parent c8ef312 commit 3c21dcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/date-picker/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export interface RangePickerProps extends HTMLAttributesWeak {
/**
* 点击确认按钮时的回调 返回开始时间和结束时间`[ MomentObject|String, MomentObject|String ]`
*/
onOk?: () => Array<any>;
onOk?: (value: Array<any>) => void;

/**
* 输入框内置标签
Expand Down Expand Up @@ -493,7 +493,7 @@ export interface DatePickerProps extends HTMLAttributesWeak {
/**
* 点击确认按钮时的回调
*/
onOk?: () => {} | string;
onOk?: (value: {} | string) => void;

/**
* 输入框尺寸
Expand Down

0 comments on commit 3c21dcd

Please sign in to comment.