@@ -5,7 +5,7 @@ import contains from '../vc-util/Dom/contains';
5
5
import {
6
6
hasProp ,
7
7
getComponentFromProp ,
8
- getEvents ,
8
+ getDataEvents ,
9
9
filterEmpty ,
10
10
getListeners ,
11
11
} from '../_util/props-util' ;
@@ -595,48 +595,48 @@ export default {
595
595
warning ( false , 'Trigger $slots.default.length > 1, just support only one default' , true ) ;
596
596
}
597
597
const child = children [ 0 ] ;
598
- this . childOriginEvents = getEvents ( child ) ;
598
+ this . childOriginEvents = getDataEvents ( child ) ;
599
599
const newChildProps = {
600
600
props : { } ,
601
- on : { } ,
601
+ nativeOn : { } ,
602
602
key : 'trigger' ,
603
603
} ;
604
604
605
605
if ( this . isContextmenuToShow ( ) ) {
606
- newChildProps . on . contextmenu = this . onContextmenu ;
606
+ newChildProps . nativeOn . contextmenu = this . onContextmenu ;
607
607
} else {
608
- newChildProps . on . contextmenu = this . createTwoChains ( 'contextmenu' ) ;
608
+ newChildProps . nativeOn . contextmenu = this . createTwoChains ( 'contextmenu' ) ;
609
609
}
610
610
611
611
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 ;
615
615
} 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' ) ;
619
619
}
620
620
if ( this . isMouseEnterToShow ( ) ) {
621
- newChildProps . on . mouseenter = this . onMouseenter ;
621
+ newChildProps . nativeOn . mouseenter = this . onMouseenter ;
622
622
if ( alignPoint ) {
623
- newChildProps . on . mousemove = this . onMouseMove ;
623
+ newChildProps . nativeOn . mousemove = this . onMouseMove ;
624
624
}
625
625
} else {
626
- newChildProps . on . mouseenter = this . createTwoChains ( 'mouseenter' ) ;
626
+ newChildProps . nativeOn . mouseenter = this . createTwoChains ( 'mouseenter' ) ;
627
627
}
628
628
if ( this . isMouseLeaveToHide ( ) ) {
629
- newChildProps . on . mouseleave = this . onMouseleave ;
629
+ newChildProps . nativeOn . mouseleave = this . onMouseleave ;
630
630
} else {
631
- newChildProps . on . mouseleave = this . createTwoChains ( 'mouseleave' ) ;
631
+ newChildProps . nativeOn . mouseleave = this . createTwoChains ( 'mouseleave' ) ;
632
632
}
633
633
634
634
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 ;
637
637
} 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 => {
640
640
if ( e && ( ! e . relatedTarget || ! contains ( e . target , e . relatedTarget ) ) ) {
641
641
this . createTwoChains ( 'blur' ) ( e ) ;
642
642
}
0 commit comments