@@ -5,7 +5,7 @@ import contains from '../vc-util/Dom/contains';
55import {
66 hasProp ,
77 getComponentFromProp ,
8- getEvents ,
8+ getDataEvents ,
99 filterEmpty ,
1010 getListeners ,
1111} from '../_util/props-util' ;
@@ -595,48 +595,48 @@ export default {
595595 warning ( false , 'Trigger $slots.default.length > 1, just support only one default' , true ) ;
596596 }
597597 const child = children [ 0 ] ;
598- this . childOriginEvents = getEvents ( child ) ;
598+ this . childOriginEvents = getDataEvents ( child ) ;
599599 const newChildProps = {
600600 props : { } ,
601- on : { } ,
601+ nativeOn : { } ,
602602 key : 'trigger' ,
603603 } ;
604604
605605 if ( this . isContextmenuToShow ( ) ) {
606- newChildProps . on . contextmenu = this . onContextmenu ;
606+ newChildProps . nativeOn . contextmenu = this . onContextmenu ;
607607 } else {
608- newChildProps . on . contextmenu = this . createTwoChains ( 'contextmenu' ) ;
608+ newChildProps . nativeOn . contextmenu = this . createTwoChains ( 'contextmenu' ) ;
609609 }
610610
611611 if ( this . isClickToHide ( ) || this . isClickToShow ( ) ) {
612- newChildProps . on . click = this . onClick ;
613- newChildProps . on . mousedown = this . onMousedown ;
614- newChildProps . on . touchstart = this . onTouchstart ;
612+ newChildProps . nativeOn . click = this . onClick ;
613+ newChildProps . nativeOn . mousedown = this . onMousedown ;
614+ newChildProps . nativeOn . touchstart = this . onTouchstart ;
615615 } else {
616- newChildProps . on . click = this . createTwoChains ( 'click' ) ;
617- newChildProps . on . mousedown = this . createTwoChains ( 'mousedown' ) ;
618- newChildProps . on . touchstart = this . createTwoChains ( 'onTouchstart' ) ;
616+ newChildProps . nativeOn . click = this . createTwoChains ( 'click' ) ;
617+ newChildProps . nativeOn . mousedown = this . createTwoChains ( 'mousedown' ) ;
618+ newChildProps . nativeOn . touchstart = this . createTwoChains ( 'onTouchstart' ) ;
619619 }
620620 if ( this . isMouseEnterToShow ( ) ) {
621- newChildProps . on . mouseenter = this . onMouseenter ;
621+ newChildProps . nativeOn . mouseenter = this . onMouseenter ;
622622 if ( alignPoint ) {
623- newChildProps . on . mousemove = this . onMouseMove ;
623+ newChildProps . nativeOn . mousemove = this . onMouseMove ;
624624 }
625625 } else {
626- newChildProps . on . mouseenter = this . createTwoChains ( 'mouseenter' ) ;
626+ newChildProps . nativeOn . mouseenter = this . createTwoChains ( 'mouseenter' ) ;
627627 }
628628 if ( this . isMouseLeaveToHide ( ) ) {
629- newChildProps . on . mouseleave = this . onMouseleave ;
629+ newChildProps . nativeOn . mouseleave = this . onMouseleave ;
630630 } else {
631- newChildProps . on . mouseleave = this . createTwoChains ( 'mouseleave' ) ;
631+ newChildProps . nativeOn . mouseleave = this . createTwoChains ( 'mouseleave' ) ;
632632 }
633633
634634 if ( this . isFocusToShow ( ) || this . isBlurToHide ( ) ) {
635- newChildProps . on . focus = this . onFocus ;
636- newChildProps . on . blur = this . onBlur ;
635+ newChildProps . nativeOn . focus = this . onFocus ;
636+ newChildProps . nativeOn . blur = this . onBlur ;
637637 } else {
638- newChildProps . on . focus = this . createTwoChains ( 'focus' ) ;
639- newChildProps . on . blur = e => {
638+ newChildProps . nativeOn . focus = this . createTwoChains ( 'focus' ) ;
639+ newChildProps . nativeOn . blur = e => {
640640 if ( e && ( ! e . relatedTarget || ! contains ( e . target , e . relatedTarget ) ) ) {
641641 this . createTwoChains ( 'blur' ) ( e ) ;
642642 }
0 commit comments