Skip to content

Commit 4fdcc90

Browse files
authored
feat(input-number): export props types #4115 (#4116)
1 parent c0643fd commit 4fdcc90

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

components/input-number/index.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineComponent, inject, nextTick, onMounted, ref, PropType } from 'vue';
1+
import { defineComponent, inject, nextTick, onMounted, ref, PropType, ExtractPropTypes } from 'vue';
22
import PropTypes from '../_util/vue-types';
33
import { getOptionProps } from '../_util/props-util';
44
import classNames from '../_util/classNames';
@@ -8,7 +8,7 @@ import VcInputNumber from '../vc-input-number/src';
88
import { defaultConfigProvider } from '../config-provider';
99
import { tuple, withInstall } from '../_util/type';
1010

11-
const InputNumberProps = {
11+
const inputNumberProps = {
1212
prefixCls: PropTypes.string,
1313
min: PropTypes.number,
1414
max: PropTypes.number,
@@ -32,10 +32,12 @@ const InputNumberProps = {
3232
onChange: Function as PropType<(num: number) => void>,
3333
};
3434

35+
export type InputNumberProps = Partial<ExtractPropTypes<typeof inputNumberProps>>;
36+
3537
const InputNumber = defineComponent({
3638
name: 'AInputNumber',
3739
inheritAttrs: false,
38-
props: InputNumberProps,
40+
props: inputNumberProps,
3941
setup(props) {
4042
const inputNumberRef = ref(null);
4143
const focus = () => {

0 commit comments

Comments
 (0)