File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474 @blur =" handleBlur"
7575 @input =" handleInput"
7676 @change =" handleChange"
77- @keydown =" handleKeydown"
78- @keyup =" handleKeyup"
7977 @compositionstart =" handleCompositionStart"
8078 @compositionend =" handleCompositionEnd"
8179 />
110108 @blur =" handleBlur"
111109 @input =" handleInput"
112110 @change =" handleChange"
113- @keydown =" handleKeydown"
114- @keyup =" handleKeyup"
115111 @compositionstart =" handleCompositionStart"
116112 @compositionend =" handleCompositionEnd"
117113 />
@@ -377,20 +373,6 @@ export default defineComponent({
377373 ;(el .value as HTMLInputElement ).select ()
378374 }
379375
380- function handleKeydown(e : KeyboardEvent ) {
381- call (props .onKeydown , e )
382-
383- // 处理回车键事件
384- if (e .key === ' Enter' && ! isComposing .value ) {
385- const value = props .modelValue || ' '
386- call (props .onEnter , value , e )
387- }
388- }
389-
390- function handleKeyup(e : KeyboardEvent ) {
391- call (props .onKeyup , e )
392- }
393-
394376 return {
395377 el ,
396378 id ,
@@ -415,8 +397,6 @@ export default defineComponent({
415397 handleCompositionStart ,
416398 handleCompositionEnd ,
417399 handleMousedown ,
418- handleKeydown ,
419- handleKeyup ,
420400 validate ,
421401 resetValidation ,
422402 reset ,
Original file line number Diff line number Diff line change @@ -37,9 +37,6 @@ export const props = {
3737 onInput : defineListenerProp < ( value : string , e : Event ) => void > ( ) ,
3838 onChange : defineListenerProp < ( value : string , e : Event ) => void > ( ) ,
3939 onClear : defineListenerProp < ( value : string ) => void > ( ) ,
40- onKeydown : defineListenerProp < ( e : KeyboardEvent ) => void > ( ) ,
41- onKeyup : defineListenerProp < ( e : KeyboardEvent ) => void > ( ) ,
42- onEnter : defineListenerProp < ( value : string , e : KeyboardEvent ) => void > ( ) ,
4340 'onUpdate:modelValue' : defineListenerProp < ( value : string ) => void > ( ) ,
4441 ...pickProps ( fieldDecoratorProps , [
4542 'size' ,
Original file line number Diff line number Diff line change @@ -45,9 +45,6 @@ export interface InputProps extends BasicAttributes {
4545 onClear ?: ListenerProp < ( value : string ) => void >
4646 onInput ?: ListenerProp < ( value : string , e : Event ) => void >
4747 onChange ?: ListenerProp < ( value : string , e : Event ) => void >
48- onKeydown ?: ListenerProp < ( e : KeyboardEvent ) => void >
49- onKeyup ?: ListenerProp < ( e : KeyboardEvent ) => void >
50- onEnter ?: ListenerProp < ( value : string , e : KeyboardEvent ) => void >
5148 'onUpdate:modelValue' ?: ListenerProp < ( value : string ) => void >
5249}
5350
You can’t perform that action at this time.
0 commit comments