File tree Expand file tree Collapse file tree 4 files changed +20
-2
lines changed Expand file tree Collapse file tree 4 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 6666 wx:ref="popup-content"
6767 class="cube-popup-content {{ transition }}"
6868 wx:style="{{ [styleConfig.content, contentTranslateStyle] }}"
69- animation="{{ animationData }}">
69+ animation="{{ animationData }}"
70+ onLayout="onLayout">
7071 <slot></slot>
7172 </view>
7273 </view>
Original file line number Diff line number Diff line change @@ -89,6 +89,14 @@ if (__mpx_mode__ === 'ios' || __mpx_mode__ === 'android') {
8989 }
9090 } ,
9191 methods : {
92+ onLayout ( ) {
93+ if ( ! this . layoutCount ) {
94+ this . layoutCount = 1 ;
95+ return ;
96+ }
97+ this . layoutCount ++ ;
98+ this . initContentRect ( ) ;
99+ } ,
92100 getWindowInfo ( ) {
93101 if ( this . windowInfo )
94102 return this . windowInfo ;
Original file line number Diff line number Diff line change 6666 wx:ref="popup-content"
6767 class="cube-popup-content {{ transition }}"
6868 wx:style="{{ [styleConfig.content, contentTranslateStyle] }}"
69- animation="{{ animationData }}">
69+ animation="{{ animationData }}"
70+ onLayout="onLayout">
7071 <slot></slot>
7172 </view>
7273 </view>
Original file line number Diff line number Diff line change @@ -97,6 +97,14 @@ if (__mpx_mode__ === 'ios' || __mpx_mode__ === 'android') {
9797 }
9898 } ,
9999 methods : {
100+ onLayout ( ) {
101+ if ( ! this . layoutCount ) {
102+ this . layoutCount = 1
103+ return
104+ }
105+ this . layoutCount ++
106+ this . initContentRect ( )
107+ } ,
100108 getWindowInfo ( ) {
101109 if ( this . windowInfo ) return this . windowInfo
102110 return ( this . windowInfo = mpx . getWindowInfo ( ) )
You can’t perform that action at this time.
0 commit comments