fix(input-number): fix InputNumber onChange type error (#3224)
parent
a6b7c6fa85
commit
607fdf7d79
|
@ -29,6 +29,7 @@ const InputNumberProps = {
|
||||||
onPressEnter: {
|
onPressEnter: {
|
||||||
type: Function as PropType<EventHandlerNonNull>,
|
type: Function as PropType<EventHandlerNonNull>,
|
||||||
},
|
},
|
||||||
|
onChange: Function as PropType<(num: number) => void>,
|
||||||
};
|
};
|
||||||
|
|
||||||
const InputNumber = defineComponent({
|
const InputNumber = defineComponent({
|
||||||
|
@ -78,14 +79,14 @@ const InputNumber = defineComponent({
|
||||||
const upIcon = <UpOutlined class={`${prefixCls}-handler-up-inner`} />;
|
const upIcon = <UpOutlined class={`${prefixCls}-handler-up-inner`} />;
|
||||||
const downIcon = <DownOutlined class={`${prefixCls}-handler-down-inner`} />;
|
const downIcon = <DownOutlined class={`${prefixCls}-handler-down-inner`} />;
|
||||||
|
|
||||||
const vcInputNumberprops = {
|
const vcInputNumberProps = {
|
||||||
prefixCls,
|
prefixCls,
|
||||||
upHandler: upIcon,
|
upHandler: upIcon,
|
||||||
downHandler: downIcon,
|
downHandler: downIcon,
|
||||||
...others,
|
...others,
|
||||||
class: inputNumberClass,
|
class: inputNumberClass,
|
||||||
};
|
};
|
||||||
return <VcInputNumber {...vcInputNumberprops} ref="inputNumberRef" />;
|
return <VcInputNumber {...vcInputNumberProps} ref="inputNumberRef" />;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue