diff --git a/components/input-number/index.en-US.md b/components/input-number/index.en-US.md index 30f60932da..78b7003900 100644 --- a/components/input-number/index.en-US.md +++ b/components/input-number/index.en-US.md @@ -28,7 +28,7 @@ When a numeric value needs to be provided. | size | The height of input box | `large` \| `middle` \| `small` | - | - | | step | The number to which the current value is increased or decreased. It can be an integer or decimal | number \| string | 1 | - | | value | The current value | number | - | - | -| onChange | The callback triggered when the value is changed | function(value: number \| string) | - | - | +| onChange | The callback triggered when the value is changed | function(value: number \| string \| null) | - | - | | onPressEnter | The callback function that is triggered when Enter key is pressed | function(e) | - | - | | onStep | The callback function that is triggered when click up or down buttons | (value: number, info: { offset: number, type: 'up' \| 'down' }) => void | - | 4.7.0 | diff --git a/components/input-number/index.tsx b/components/input-number/index.tsx index 517e07471f..237568db58 100644 --- a/components/input-number/index.tsx +++ b/components/input-number/index.tsx @@ -20,7 +20,7 @@ export interface InputNumberProps step?: number | string; defaultValue?: number; tabIndex?: number; - onChange?: (value: number | string | undefined) => void; + onChange?: (value: number | string | undefined | null) => void; disabled?: boolean; readOnly?: boolean; size?: SizeType; diff --git a/components/input-number/index.zh-CN.md b/components/input-number/index.zh-CN.md index 6cdd86df02..d0b976b10a 100644 --- a/components/input-number/index.zh-CN.md +++ b/components/input-number/index.zh-CN.md @@ -31,7 +31,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/XOS8qZ0kU/InputNumber.svg | size | 输入框大小 | `large` \| `middle` \| `small` | - | - | | step | 每次改变步数,可以为小数 | number \| string | 1 | - | | value | 当前值 | number | - | - | -| onChange | 变化回调 | function(value: number \| string) | - | - | +| onChange | 变化回调 | function(value: number \| string \| null) | - | - | | onPressEnter | 按下回车的回调 | function(e) | - | - | | onStep | 点击上下箭头的回调 | (value: number, info: { offset: number, type: 'up' \| 'down' }) => void | - | 4.7.0 | diff --git a/components/progress/__tests__/__snapshots__/demo.test.js.snap b/components/progress/__tests__/__snapshots__/demo.test.js.snap index 5517731d0c..777da5c5d2 100644 --- a/components/progress/__tests__/__snapshots__/demo.test.js.snap +++ b/components/progress/__tests__/__snapshots__/demo.test.js.snap @@ -21,7 +21,7 @@ Array [ fill-opacity="0" stroke-linecap="round" stroke-width="6" - style="stroke-dasharray:295.3097094374406px 295.3097094374406px;stroke-dashoffset:-0px;transition:stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s" + style="stroke-dasharray:295.3097094374406px 295.3097094374406px;stroke-dashoffset:-0px;transition:stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s" />