fix: adapt shared page header to safe area
This commit is contained in:
@@ -74,9 +74,16 @@ const props = defineProps({
|
||||
root: { type: Boolean, default: false },
|
||||
unreadCount: { type: Number, default: 0 },
|
||||
fallbackUrl: { type: String, default: "/pages/genealogy/g01-my-genealogies" },
|
||||
customBack: { type: Boolean, default: false },
|
||||
});
|
||||
|
||||
const emit = defineEmits(["brand", "notice", "action", "back"]);
|
||||
|
||||
const goBack = () => {
|
||||
if (props.customBack) {
|
||||
emit("back");
|
||||
return;
|
||||
}
|
||||
const stack = getCurrentPages();
|
||||
if (stack.length > 1) {
|
||||
uni.navigateBack();
|
||||
@@ -88,7 +95,7 @@ const goBack = () => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.page-header-slot {
|
||||
height: 104rpx;
|
||||
height: calc(104rpx + var(--status-bar-height, 0px));
|
||||
flex: none;
|
||||
}
|
||||
|
||||
@@ -104,8 +111,9 @@ const goBack = () => {
|
||||
z-index: 30;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 104rpx;
|
||||
height: calc(104rpx + var(--status-bar-height, 0px));
|
||||
padding: 0 24rpx;
|
||||
padding-top: var(--status-bar-height, 0px);
|
||||
box-sizing: border-box;
|
||||
background: $brand-red;
|
||||
color: #fff9ed;
|
||||
|
||||
Reference in New Issue
Block a user