Skip to content

Commit

Permalink
feat(input-number): export props types vueComponent#4115 (vueComponen…
Browse files Browse the repository at this point in the history
  • Loading branch information
John60676 authored May 26, 2021
1 parent c0643fd commit 4fdcc90
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/input-number/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineComponent, inject, nextTick, onMounted, ref, PropType } from 'vue';
import { defineComponent, inject, nextTick, onMounted, ref, PropType, ExtractPropTypes } from 'vue';
import PropTypes from '../_util/vue-types';
import { getOptionProps } from '../_util/props-util';
import classNames from '../_util/classNames';
Expand All @@ -8,7 +8,7 @@ import VcInputNumber from '../vc-input-number/src';
import { defaultConfigProvider } from '../config-provider';
import { tuple, withInstall } from '../_util/type';

const InputNumberProps = {
const inputNumberProps = {
prefixCls: PropTypes.string,
min: PropTypes.number,
max: PropTypes.number,
Expand All @@ -32,10 +32,12 @@ const InputNumberProps = {
onChange: Function as PropType<(num: number) => void>,
};

export type InputNumberProps = Partial<ExtractPropTypes<typeof inputNumberProps>>;

const InputNumber = defineComponent({
name: 'AInputNumber',
inheritAttrs: false,
props: InputNumberProps,
props: inputNumberProps,
setup(props) {
const inputNumberRef = ref(null);
const focus = () => {
Expand Down

0 comments on commit 4fdcc90

Please sign in to comment.