File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 right 0
1010 top 0
1111 bottom 0
12+ .cube-popup_without_portal
13+ position relative
1214
1315.cube-popup-show
1416 transform : translateX (0 )
Original file line number Diff line number Diff line change 4848 </view>
4949 </view>
5050 </block>
51- <root-portal @_ios|_android|_harmony>
51+ <root-portal @_ios|_android|_harmony enable="{{ !rootPortalDisable }}" >
5252 <view
5353 wx:ref="popup"
5454 external-var-context="{{varContext}}"
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ createComponent({
3939 type : String ,
4040 value : ''
4141 } ,
42- // 透传样式,可用于样式覆盖。其中 mask.visibleOpacity 用于设置遮罩层显示时透明度
42+ // 透传样式,可用于样式覆盖。其中 mask.visibleOpacity 用于设置遮罩层显示时透明度。rootPortal.enable = false 用于rn下套用rn modal 情况
4343 styleConfig : {
4444 type : Object ,
4545 value : { }
@@ -77,11 +77,15 @@ createComponent({
7777 }
7878 return style ;
7979 } ,
80+ rootPortalDisable ( ) {
81+ return this . styleConfig . rootPortal ?. enable === false ;
82+ } ,
8083 rootClass ( ) {
8184 const cls = {
8285 'cube-popup_mask' : this . mask ,
8386 'cube-popup_mask_fade_transition' : this . maskFadeTransition ,
84- 'cube-popup_transition' : ! ! this . transitionClass
87+ 'cube-popup_transition' : ! ! this . transitionClass ,
88+ 'cube-popup_without_portal' : this . rootPortalDisable
8589 } ;
8690 if ( this . type ) {
8791 cls [ `cube-${ this . type } ` ] = true ;
Original file line number Diff line number Diff line change 99 right 0
1010 top 0
1111 bottom 0
12+ .cube-popup_without_portal
13+ position relative
1214
1315.cube-popup-show
1416 transform : translateX (0 )
Original file line number Diff line number Diff line change 4848 </view>
4949 </view>
5050 </block>
51- <root-portal @_ios|_android|_harmony>
51+ <root-portal @_ios|_android|_harmony enable="{{ !rootPortalDisable }}" >
5252 <view
5353 wx:ref="popup"
5454 external-var-context="{{varContext}}"
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ createComponent({
4545 type : String ,
4646 value : ''
4747 } ,
48- // 透传样式,可用于样式覆盖。其中 mask.visibleOpacity 用于设置遮罩层显示时透明度
48+ // 透传样式,可用于样式覆盖。其中 mask.visibleOpacity 用于设置遮罩层显示时透明度。rootPortal.enable = false 用于rn下套用rn modal 情况
4949 styleConfig : {
5050 type : Object ,
5151 value : { }
@@ -82,11 +82,15 @@ createComponent({
8282 }
8383 return style
8484 } ,
85+ rootPortalDisable ( ) {
86+ return this . styleConfig . rootPortal ?. enable === false
87+ } ,
8588 rootClass ( ) {
8689 const cls : { [ index : string ] : boolean } = {
8790 'cube-popup_mask' : this . mask ,
8891 'cube-popup_mask_fade_transition' : this . maskFadeTransition ,
89- 'cube-popup_transition' : ! ! this . transitionClass
92+ 'cube-popup_transition' : ! ! this . transitionClass ,
93+ 'cube-popup_without_portal' : this . rootPortalDisable
9094 }
9195 if ( this . type ) {
9296 cls [ `cube-${ this . type } ` ] = true
You can’t perform that action at this time.
0 commit comments