@@ -94,7 +94,6 @@ class Popup extends Component<PopupProps, PopupState> {
9494 targetHeight : undefined ,
9595
9696 status : null ,
97- prevVisible : null ,
9897 alignClassName : null ,
9998 } ;
10099
@@ -120,7 +119,8 @@ class Popup extends Component<PopupProps, PopupState> {
120119 } else if ( visible !== prevVisible ) {
121120 if (
122121 visible ||
123- ( supportMotion ( mergedMotion ) && [ 'motion' , 'AfterMotion' , 'stable' ] . includes ( status ) )
122+ ( supportMotion ( mergedMotion ) &&
123+ [ 'motion' , 'AfterMotion' , 'stable' ] . includes ( status ) )
124124 ) {
125125 newState . status = null ;
126126 } else {
@@ -169,7 +169,13 @@ class Popup extends Component<PopupProps, PopupState> {
169169
170170 default : {
171171 // Go to next status
172- const queue : PopupStatus [ ] = [ 'measure' , 'align' , null , 'beforeMotion' , 'motion' ] ;
172+ const queue : PopupStatus [ ] = [
173+ 'measure' ,
174+ 'align' ,
175+ null ,
176+ 'beforeMotion' ,
177+ 'motion' ,
178+ ] ;
173179 const index = queue . indexOf ( status ) ;
174180 const nextStatus = queue [ index + 1 ] ;
175181 if ( index !== - 1 && nextStatus ) {
@@ -291,16 +297,21 @@ class Popup extends Component<PopupProps, PopupState> {
291297
292298 const mergedStyle : React . CSSProperties = {
293299 ...sizeStyle ,
294- ...style ,
295300 ...this . getZIndexStyle ( ) ,
301+ ...style ,
296302 opacity : status === 'stable' || ! visible ? undefined : 0 ,
297303 } ;
298304
299305 // ================= Motions =================
300306 const mergedMotion = this . getMotion ( ) ;
301307 let mergedMotionVisible = visible ;
302308
303- if ( visible && status !== 'beforeMotion' && status !== 'motion' && status !== 'stable' ) {
309+ if (
310+ visible &&
311+ status !== 'beforeMotion' &&
312+ status !== 'motion' &&
313+ status !== 'stable'
314+ ) {
304315 mergedMotion . motionAppear = false ;
305316 mergedMotion . motionEnter = false ;
306317 mergedMotion . motionLeave = false ;
@@ -312,7 +323,8 @@ class Popup extends Component<PopupProps, PopupState> {
312323
313324 // ================== Align ==================
314325 const mergedAlignDisabled =
315- ! visible || ( status !== 'align' && status !== 'aligned' && status !== 'stable' ) ;
326+ ! visible ||
327+ ( status !== 'align' && status !== 'aligned' && status !== 'stable' ) ;
316328
317329 // ================== Popup ==================
318330 let mergedPopupVisible = true ;
@@ -367,7 +379,14 @@ class Popup extends Component<PopupProps, PopupState> {
367379 } ;
368380
369381 renderMaskElement = ( ) => {
370- const { mask, maskMotion, maskTransitionName, maskAnimation, prefixCls, visible } = this . props ;
382+ const {
383+ mask,
384+ maskMotion,
385+ maskTransitionName,
386+ maskAnimation,
387+ prefixCls,
388+ visible,
389+ } = this . props ;
371390
372391 if ( ! mask ) {
373392 return null ;
0 commit comments