uni-app implements mini-program immersive navigation bar / top components occupy the navigation bar

uni-app implements mini-program immersive navigation bar / top components occupy the navigation bar


If you just want to simply let the component at the top of the screen (such as swiper) fill the notification bar (navigation bar), then you only need to add the following code to the style of the page you want to achieve this effect in the page.json file middle

"navigationStyle": "custom"

Example:

"pages": [
		{
    
    
			"path": "pages/index/index",
			"style": {
    
    
				"navigationBarTitleText": "",
				"navigationStyle": "custom"
			}
		}
		]

Before adding:
insert image description here

After adding:
insert image description here

Guess you like

Origin blog.csdn.net/qq_52925863/article/details/127451119