File tree 1 file changed +14
-1
lines changed
components/vc-input-number/src
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,10 @@ export default {
264
264
265
265
this . $emit ( 'keyup' , e , ...args ) ;
266
266
} ,
267
+ onTrigger ( e ) {
268
+ if ( e . target . composing ) return false ;
269
+ this . onChange ( e ) ;
270
+ } ,
267
271
onChange ( e ) {
268
272
if ( this . focused ) {
269
273
this . inputting = true ;
@@ -621,6 +625,13 @@ export default {
621
625
handleInputClick ( ) {
622
626
this . $emit ( 'click' ) ;
623
627
} ,
628
+ onCompositionstart ( e ) {
629
+ e . target . composing = true ;
630
+ } ,
631
+ onCompositionend ( e ) {
632
+ this . onChange ( e ) ;
633
+ e . target . composing = false ;
634
+ } ,
624
635
} ,
625
636
render ( ) {
626
637
const {
@@ -775,7 +786,9 @@ export default {
775
786
name = { this . name }
776
787
title = { this . title }
777
788
id = { this . id }
778
- onInput = { this . onChange }
789
+ onInput = { this . onTrigger }
790
+ onCompositionstart = { this . onCompositionstart }
791
+ onCompositionend = { this . onCompositionend }
779
792
ref = "inputRef"
780
793
value = { inputDisplayValue }
781
794
pattern = { this . pattern }
You can’t perform that action at this time.
0 commit comments