@@ -81,7 +81,10 @@ export const inputNumberProps = () => ({
81
81
export default defineComponent ( {
82
82
name : 'InnerInputNumber' ,
83
83
inheritAttrs : false ,
84
- props : inputNumberProps ( ) ,
84
+ props : {
85
+ ...inputNumberProps ( ) ,
86
+ lazy : Boolean ,
87
+ } ,
85
88
slots : [ 'upHandler' , 'downHandler' ] ,
86
89
setup ( props , { attrs, slots, emit, expose } ) {
87
90
const inputRef = ref < HTMLInputElement > ( ) ;
@@ -509,14 +512,20 @@ export default defineComponent({
509
512
onInput,
510
513
onPressEnter,
511
514
onStep,
512
-
515
+ lazy ,
513
516
class : className ,
514
517
style,
515
518
516
519
...inputProps
517
520
} = { ...( attrs as HTMLAttributes ) , ...props } ;
518
521
const { upHandler, downHandler } = slots ;
519
522
const inputClassName = `${ prefixCls } -input` ;
523
+ const eventProps = { } as any ;
524
+ if ( lazy ) {
525
+ eventProps . onChange = onInternalInput ;
526
+ } else {
527
+ eventProps . onInput = onInternalInput ;
528
+ }
520
529
return (
521
530
< div
522
531
class = { classNames ( prefixCls , className , {
@@ -561,7 +570,7 @@ export default defineComponent({
561
570
focus . value = true ;
562
571
emit ( 'focus' , e ) ;
563
572
} }
564
- onInput = { onInternalInput }
573
+ { ... eventProps }
565
574
onBlur = { onBlur }
566
575
onCompositionstart = { onCompositionStart }
567
576
onCompositionend = { onCompositionEnd }
0 commit comments