@@ -67,40 +67,6 @@ const Trigger = React.createClass({
67
67
mountNode . appendChild ( popupContainer ) ;
68
68
return popupContainer ;
69
69
} ,
70
-
71
- getComponent ( instance ) {
72
- const { props, state } = instance ;
73
- const mouseProps = { } ;
74
- if ( instance . isMouseEnterToShow ( ) ) {
75
- mouseProps . onMouseEnter = instance . onPopupMouseEnter ;
76
- }
77
- if ( instance . isMouseLeaveToHide ( ) ) {
78
- mouseProps . onMouseLeave = instance . onPopupMouseLeave ;
79
- }
80
- return (
81
- < Popup
82
- prefixCls = { props . prefixCls }
83
- destroyPopupOnHide = { props . destroyPopupOnHide }
84
- visible = { state . popupVisible }
85
- className = { props . popupClassName }
86
- action = { props . action }
87
- align = { instance . getPopupAlign ( ) }
88
- onAlign = { props . onPopupAlign }
89
- animation = { props . popupAnimation }
90
- getClassNameFromAlign = { instance . getPopupClassNameFromAlign }
91
- { ...mouseProps }
92
- getRootDomNode = { instance . getRootDomNode }
93
- style = { props . popupStyle }
94
- mask = { props . mask }
95
- zIndex = { props . zIndex }
96
- transitionName = { props . popupTransitionName }
97
- maskAnimation = { props . maskAnimation }
98
- maskTransitionName = { props . maskTransitionName }
99
- >
100
- { typeof props . popup === 'function' ? props . popup ( ) : props . popup }
101
- </ Popup >
102
- ) ;
103
- } ,
104
70
} ) ,
105
71
] ,
106
72
@@ -325,6 +291,40 @@ const Trigger = React.createClass({
325
291
return popupAlign ;
326
292
} ,
327
293
294
+ getComponent ( ) {
295
+ const { props, state } = this ;
296
+ const mouseProps = { } ;
297
+ if ( this . isMouseEnterToShow ( ) ) {
298
+ mouseProps . onMouseEnter = this . onPopupMouseEnter ;
299
+ }
300
+ if ( this . isMouseLeaveToHide ( ) ) {
301
+ mouseProps . onMouseLeave = this . onPopupMouseLeave ;
302
+ }
303
+ return (
304
+ < Popup
305
+ prefixCls = { props . prefixCls }
306
+ destroyPopupOnHide = { props . destroyPopupOnHide }
307
+ visible = { state . popupVisible }
308
+ className = { props . popupClassName }
309
+ action = { props . action }
310
+ align = { this . getPopupAlign ( ) }
311
+ onAlign = { props . onPopupAlign }
312
+ animation = { props . popupAnimation }
313
+ getClassNameFromAlign = { this . getPopupClassNameFromAlign }
314
+ { ...mouseProps }
315
+ getRootDomNode = { this . getRootDomNode }
316
+ style = { props . popupStyle }
317
+ mask = { props . mask }
318
+ zIndex = { props . zIndex }
319
+ transitionName = { props . popupTransitionName }
320
+ maskAnimation = { props . maskAnimation }
321
+ maskTransitionName = { props . maskTransitionName }
322
+ >
323
+ { typeof props . popup === 'function' ? props . popup ( ) : props . popup }
324
+ </ Popup >
325
+ ) ;
326
+ } ,
327
+
328
328
setPopupVisible ( popupVisible ) {
329
329
this . clearDelayTimer ( ) ;
330
330
if ( this . state . popupVisible !== popupVisible ) {
0 commit comments