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:
After adding: