# page-container

Start from base library version 2.16.0. Please remaining backward compatible.

Page container.

Mini Program if the page for complex interface design (such as pop-up in the page half screen pop-up window, load a full-screen sub-page within the page, etc.), Users to return operations will directly leave the current page, does not meet user expectations, expectations should be closed current pop-up components. Provide the false page container component for this purpose with an effect similar to popup Popup layer, when the container exists in the page, when users return operation, closing the container does not close the page. Return operations include three scenarios: right-swipe gestures, Android physical return keys, and calls navigateBack Interface.

attribute type Default value Required Introductions Minimum version
show boolean false no Whether to display container components 2.16.0
duration number 300 no Animation duration, in milliseconds 2.16.0
z-index number 100 no z-index level 2.16.0
overlay boolean true no Whether to display mask layer 2.16.0
position string bottom no Popup location, optionally top bottom right center 2.16.0
round boolean false no Show rounded corners 2.16.0
close-on-slideDown boolean false no Whether to close down after a slide 2.16.0
overlay-style string no Custom mask layer styles 2.16.0
custom-style string no Custom Pop Up Layer Style 2.16.0
bind:beforeenter eventhandle no Pre-entry trigger 2.16.0
bind:enter eventhandle no Triggered on entry 2.16.0
bind:afterenter eventhandle no Post-entry trigger 2.16.0
bind:beforeleave eventhandle no Trigger before leaving 2.16.0
bind:leave eventhandle no Triggered on exit 2.16.0
bind:afterleave eventhandle no Triggered after leaving 2.16.0
bind:clickoverlay eventhandle no Triggered when the mask layer is clicked 2.16.0

# Bug & Tip

  1. tip: Current page only 1 Cannot add new containers if they already exist
  2. tip: wx.navigateBack Cannot be called at the top of the page stack because there is no previous page

# sample code

Preview with Developer Tool