-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [H5] tab组件安全区域避让适配 #15862
fix: [H5] tab组件安全区域避让适配 #15862
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 3.x #15862 +/- ##
======================================
Coverage ? 56.51%
======================================
Files ? 500
Lines ? 22767
Branches ? 5645
======================================
Hits ? 12866
Misses ? 8666
Partials ? 1235
Flags with carried forward coverage won't be shown. Click here to find out more. |
@@ -41,7 +41,8 @@ body { | |||
&__tabbar { | |||
position: relative; | |||
width: 100%; | |||
height: var(--taro-tabbar-height); | |||
height: calc(var(--taro-tabbar-height) + constant(safe-area-inset-bottom)); | |||
height: calc(var(--taro-tabbar-height) + env(safe-area-inset-bottom)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用pandding-bottom如何?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加height底部颜色和tabbar一致,视觉效果更舒服没有割裂感
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
padding应该也会一致吧?而且不用关心本身的高度
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
padding不用关系本身的高度?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
padding可以不关心tabbar本身的高度
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在所有页面加padding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tabbar不能加padding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请仔细看一看tabbar的实现,如果加padding tabbar高度是不会变,这种后果要么是无法避让安全区域导航条和tabbar item重叠要么tabbar里的item顶到tabbar最上方显示。
这个 PR 做了什么? (简要描述所做更改)
原tab组件适配安全区域时有以下几点错误:
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台: