File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 wx:ref="popup-content"
6868 class="cube-popup-content {{ transition }}"
6969 wx:style="{{ [styleConfig.content, contentTranslateStyle] }}"
70- animation="{{ animationData }}">
70+ animation="{{ animationData }}"
71+ bindtransitionend="transitionend">
7172 <slot></slot>
7273 </view>
7374 </view>
Original file line number Diff line number Diff line change @@ -109,12 +109,10 @@ if (__mpx_mode__ === 'ios' || __mpx_mode__ === 'android' || __mpx_mode__ === 'ha
109109 animation [ this . targetTranslate ] ( start ) . step ( ) ;
110110 }
111111 this . animationData = animation . export ( ) ;
112- this . transitionendTimer = setTimeout ( ( ) => {
113- this . transitionend ( ) ;
114- } , animationOptions . duration ) ;
115112 } ,
116- transitionend ( ) {
117- if ( this . isVisible && this . targetTranslate ) {
113+ transitionend ( e ) {
114+ const { elapsedTime, finished } = e . detail ;
115+ if ( elapsedTime && finished && this . isVisible && this . targetTranslate ) {
118116 // 触发重新渲染
119117 this . contentTranslateStyle = { } ;
120118 }
Original file line number Diff line number Diff line change 11{
22 "name" : " @mpxjs/mpx-cube-ui" ,
3- "version" : " 1.4.12 -btn.3 " ,
3+ "version" : " 1.4.17 -btn.beta.0 " ,
44 "description" : " mpx components library" ,
55 "author" : " xiaolei <xiaolei@didichuxing.com>" ,
66 "publishConfig" : {
Original file line number Diff line number Diff line change 6767 wx:ref="popup-content"
6868 class="cube-popup-content {{ transition }}"
6969 wx:style="{{ [styleConfig.content, contentTranslateStyle] }}"
70- animation="{{ animationData }}">
70+ animation="{{ animationData }}"
71+ bindtransitionend="transitionend">
7172 <slot></slot>
7273 </view>
7374 </view>
Original file line number Diff line number Diff line change @@ -115,12 +115,10 @@ if (__mpx_mode__ === 'ios' || __mpx_mode__ === 'android' || __mpx_mode__ === 'ha
115115 animation [ this . targetTranslate ] ( start ) . step ( )
116116 }
117117 this . animationData = animation . export ( )
118- this . transitionendTimer = setTimeout ( ( ) => {
119- this . transitionend ( )
120- } , animationOptions . duration )
121118 } ,
122- transitionend ( ) {
123- if ( this . isVisible && this . targetTranslate ) {
119+ transitionend ( e ) {
120+ const { elapsedTime, finished } = e . detail
121+ if ( elapsedTime && finished && this . isVisible && this . targetTranslate ) {
124122 // 触发重新渲染
125123 this . contentTranslateStyle = { }
126124 }
You can’t perform that action at this time.
0 commit comments