当前位置:网站首页>Solution of vant tabbar blocking content
Solution of vant tabbar blocking content
2022-07-05 16:42:00 【Joy_ nine hundred and seventeen】
As we mentioned earlier , Use vant-tabbar To replace the native tabbar, But it is found in actual use , When tab After too much page content ,tabbar It will block the content at the bottom of the page
Directly above :
We will find that , Two buttons disappeared , from 2 Can be seen at , Right side of the screen scroll Over tabbar One column , The content is covered , It did slide to the bottom, but I couldn't see the button .
Why is this so ? Custom components of applets , It's through slot The content is injected into it and then rendered , and vant-tabbar Components are adopt cover-view In the form of Views overlaid on native components , It is not a reference component in the usual sense , Therefore, it is not a peer relationship with content elements .
At first I thought that since I was tabbar cover Live in an area , Then I'll find it tabbar Height of components , Then put the bottom element on top ?
Pictured above , Did find it ,vant The default is 50px, But the fixing effect is worrying , If you are interested, you can try . I guess it's because there is still a safe distance at the bottom of the component , So this height Not exactly equal to tabbar Occupation height of , Secondly, it will also be affected by the model .
During this period, I also tried another way , use scroll-view The label wraps the content , Then set a fixed height , such as 500px, In this way, the sliding content is not affected tabbar influence , Because the regions do not intersect . But it is also affected by the model .
Therefore, the final choice is to use the form of percentage to top up a distance , That is to say :
<view style="padding-bottom: 25%;"></view>
Look at the actual effect :
Most of the models tested are fairly ok. The disadvantage is that everyone has tabbar The page of , Need to add a blank view, Not very elegant . So I consider whether I can directly modify the custom components , stay slot Add directly before and after view, Or set it directly slot Style controls internal elements , But it didn't work , So stop .
Only try to jump to a new page and hide tabbar To avoid this . If you find a better way later , Updates will be synchronized , You are also welcome to tell me , thank ~
The full code is in github On , Ongoing update , welcome star Support :https://github.com/Joy917/signgo
边栏推荐
- 【学术相关】多位博士毕业去了三四流高校,目前惨不忍睹……
- Single merchant v4.4 has the same original intention and strength!
- 帮忙看看是什么问题可以吗?[ERROR] Could not execute SQL stateme
- 移动办公时如何使用frp内网穿透+teamviewer方式快速连入家中内网主机
- Google Earth engine (GEE) -- a brief introduction to kernel kernel functions and gray level co-occurrence matrix
- One click installation script enables rapid deployment of graylog server 4.2.10 stand-alone version
- How to use FRP intranet penetration +teamviewer to quickly connect to the intranet host at home when mobile office
- OneForAll安装使用
- Apiccloud cloud debugging solution
- ES6 drill down - Async functions and symbol types
猜你喜欢

Accès aux données - intégration du cadre d'entité

Bs-xx-042 implementation of personnel management system based on SSM

Spring Festival Limited "forget trouble in the year of the ox" gift bag waiting for you to pick it up~

Enter a command with the keyboard

The new version of effect editor is online! 3D rendering, labeling, and animation, this time an editor is enough

Pspnet | semantic segmentation and scene analysis

ES6 drill down - ES6 generator function

Win11如何给应用换图标?Win11给应用换图标的方法

Jarvis OJ Flag

【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
随机推荐
中间表是如何被消灭的?
Win11 prompt: what if the software cannot be downloaded safely? Win11 cannot download software safely
单商户 V4.4,初心未变,实力依旧!
How can programmers improve their situation?
Can you help me see what the problem is? [ERROR] Could not execute SQL stateme
Flet教程之 09 NavigationRail 基础入门(教程含源码)
Reduce the cost by 40%! Container practice of redis multi tenant cluster
Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
ES6 deep - ES6 class class
Cartoon: what is service fusing?
Binary tree related OJ problems
Solve the Hanoi Tower problem [modified version]
Raspberry pie 4B installation pytorch1.11
Sentinel flow guard
树莓派4b安装Pytorch1.11
Migrate /home partition
漫画:什么是服务熔断?
面对新的挑战,成为更好的自己--进击的技术er
Mongodb getting started Tutorial Part 04 mongodb client
利用GrayLog告警功能实现钉钉群机器人定时工作提醒