fix(input-number): fix InputNumber onChange type error (#3224)

pull/3237/head
Jason 2020-11-20 23:59:47 +08:00 committed by GitHub
parent a6b7c6fa85
commit 607fdf7d79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ const InputNumberProps = {
onPressEnter: {
type: Function as PropType<EventHandlerNonNull>,
},
onChange: Function as PropType<(num: number) => void>,
};
const InputNumber = defineComponent({
@ -78,14 +79,14 @@ const InputNumber = defineComponent({
const upIcon = <UpOutlined class={`${prefixCls}-handler-up-inner`} />;
const downIcon = <DownOutlined class={`${prefixCls}-handler-down-inner`} />;
const vcInputNumberprops = {
const vcInputNumberProps = {
prefixCls,
upHandler: upIcon,
downHandler: downIcon,
...others,
class: inputNumberClass,
};
return <VcInputNumber {...vcInputNumberprops} ref="inputNumberRef" />;
return <VcInputNumber {...vcInputNumberProps} ref="inputNumberRef" />;
},
});