Skip to main content

root-portal

Makes the entire subtree off the page, similar to using fixed position in CSS. It is mainly used to make pop-up windows, pop-up layers, etc.

Example

bxml


<root-portal enable="{{enable}}">  <view class='dialog'>     I'm a dialog  </view></root-portal>

js

Page({ data() {   return {       enable: true   } },})

Props#

NameTypeDescriptionDefault
enablebooleanwhether detached from the pagetrue