@@ -5,6 +5,7 @@ import PropTypes from '../../_util/vue-types';
55import type { RefObject } from '../../_util/createRef' ;
66import antInput from '../../_util/antInputDirective' ;
77import classNames from '../../_util/classNames' ;
8+ import type { EventHandler } from '../../_util/EventInterface' ;
89
910interface InputProps {
1011 prefixCls : string ;
@@ -21,19 +22,43 @@ interface InputProps {
2122 /** Pass accessibility props to input */
2223 attrs : object ;
2324 inputRef : RefObject ;
24- onKeydown : EventHandlerNonNull ;
25- onMousedown : EventHandlerNonNull ;
26- onChange : EventHandlerNonNull ;
27- onPaste : EventHandlerNonNull ;
28- onCompositionstart : EventHandlerNonNull ;
29- onCompositionend : EventHandlerNonNull ;
30- onFocus : EventHandlerNonNull ;
31- onBlur : EventHandlerNonNull ;
25+ onKeydown : EventHandler ;
26+ onMousedown : EventHandler ;
27+ onChange : EventHandler ;
28+ onPaste : EventHandler ;
29+ onCompositionstart : EventHandler ;
30+ onCompositionend : EventHandler ;
31+ onFocus : EventHandler ;
32+ onBlur : EventHandler ;
3233}
3334
34- const Input = defineComponent < InputProps , { VCSelectContainerEvent : any ; blurTimeout : any } > ( {
35+ const Input = defineComponent ( {
3536 name : 'Input' ,
3637 inheritAttrs : false ,
38+ props : {
39+ inputRef : PropTypes . any ,
40+ prefixCls : PropTypes . string ,
41+ id : PropTypes . string ,
42+ inputElement : PropTypes . any ,
43+ disabled : PropTypes . looseBool ,
44+ autofocus : PropTypes . looseBool ,
45+ autocomplete : PropTypes . string ,
46+ editable : PropTypes . looseBool ,
47+ accessibilityIndex : PropTypes . number ,
48+ value : PropTypes . string ,
49+ open : PropTypes . looseBool ,
50+ tabindex : PropTypes . oneOfType ( [ PropTypes . number , PropTypes . string ] ) ,
51+ /** Pass accessibility props to input */
52+ attrs : PropTypes . object ,
53+ onKeydown : PropTypes . func ,
54+ onMousedown : PropTypes . func ,
55+ onChange : PropTypes . func ,
56+ onPaste : PropTypes . func ,
57+ onCompositionstart : PropTypes . func ,
58+ onCompositionend : PropTypes . func ,
59+ onFocus : PropTypes . func ,
60+ onBlur : PropTypes . func ,
61+ } ,
3762 setup ( props ) {
3863 if ( process . env . NODE_ENV === 'test' ) {
3964 onMounted ( ( ) => {
@@ -47,7 +72,7 @@ const Input = defineComponent<InputProps, { VCSelectContainerEvent: any; blurTim
4772 }
4873 return {
4974 blurTimeout : null ,
50- VCSelectContainerEvent : inject ( 'VCSelectContainerEvent' ) ,
75+ VCSelectContainerEvent : inject ( 'VCSelectContainerEvent' ) as any ,
5176 } ;
5277 } ,
5378 render ( ) {
@@ -164,29 +189,29 @@ const Input = defineComponent<InputProps, { VCSelectContainerEvent: any; blurTim
164189 } ,
165190} ) ;
166191
167- Input . props = {
168- inputRef : PropTypes . any ,
169- prefixCls : PropTypes . string ,
170- id : PropTypes . string ,
171- inputElement : PropTypes . any ,
172- disabled : PropTypes . looseBool ,
173- autofocus : PropTypes . looseBool ,
174- autocomplete : PropTypes . string ,
175- editable : PropTypes . looseBool ,
176- accessibilityIndex : PropTypes . number ,
177- value : PropTypes . string ,
178- open : PropTypes . looseBool ,
179- tabindex : PropTypes . oneOfType ( [ PropTypes . number , PropTypes . string ] ) ,
180- /** Pass accessibility props to input */
181- attrs : PropTypes . object ,
182- onKeydown : PropTypes . func ,
183- onMousedown : PropTypes . func ,
184- onChange : PropTypes . func ,
185- onPaste : PropTypes . func ,
186- onCompositionstart : PropTypes . func ,
187- onCompositionend : PropTypes . func ,
188- onFocus : PropTypes . func ,
189- onBlur : PropTypes . func ,
190- } ;
192+ // Input.props = {
193+ // inputRef: PropTypes.any,
194+ // prefixCls: PropTypes.string,
195+ // id: PropTypes.string,
196+ // inputElement: PropTypes.any,
197+ // disabled: PropTypes.looseBool,
198+ // autofocus: PropTypes.looseBool,
199+ // autocomplete: PropTypes.string,
200+ // editable: PropTypes.looseBool,
201+ // accessibilityIndex: PropTypes.number,
202+ // value: PropTypes.string,
203+ // open: PropTypes.looseBool,
204+ // tabindex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
205+ // /** Pass accessibility props to input */
206+ // attrs: PropTypes.object,
207+ // onKeydown: PropTypes.func,
208+ // onMousedown: PropTypes.func,
209+ // onChange: PropTypes.func,
210+ // onPaste: PropTypes.func,
211+ // onCompositionstart: PropTypes.func,
212+ // onCompositionend: PropTypes.func,
213+ // onFocus: PropTypes.func,
214+ // onBlur: PropTypes.func,
215+ // };
191216
192217export default Input ;
0 commit comments