Commit 6214543b authored by chenqikuai's avatar chenqikuai

fix

parent 318381cc
<template>
<div class="navbar w-full" style="z-index: 300">
<div class="navbar w-full" style="z-index: 300" v-if="!bangsBlock">
<div
class="h-full theBar flex items-end px-5 justify-center relative"
class="h-full theBar flex items-end px-5 justify-center relative h46"
style="background:#F7F7FA; padding-bottom: 8px;"
:class="isBangs ? 'h72' : 'h46'"
:style="[(isBangs && bangsBlock) ? 'height: calc(72px - 24px - 8px)' : '']"
:style="[isBangs ? 'height:' + `${46 + heightOfNotch}px` : '']"
v-bind="$attrs"
v-if="(!isBangs && !bangsBlock || isBangs)"
>
<div
class="relative w-full flex items-center justify-center"
v-if="(!isBangs && !bangsBlock) || (isBangs)"
>
<div class="relative w-full flex items-center justify-center">
<icon
v-if="!bangsBlock && showBackIcon"
v-if="showBackIcon"
@click="$router.go(-1)"
name="icon-fanhui"
class="absolute left-0"
......@@ -40,10 +35,15 @@
</div>
</div>
<div
:class="isBangs ? 'h72' : 'h46'"
v-if="!isBangs && !bangsBlock && occupyPosition || (isBangs && !bangsBlock)"
class="h46"
:style="[isBangs ? 'height:' + `${46 + heightOfNotch}px` : '']"
v-if="occupyPosition"
></div>
<div style="height: calc(72px - 24px - 8px)" v-if="isBangs && bangsBlock"></div>
</div>
<div v-else>
<div :style="{
'height': heightOfNotch + 'px'
}" v-if="isBangs"></div>
</div>
</template>
<script lang="ts">
......@@ -90,16 +90,16 @@ export default defineComponent({
},
computed: {
isBangs() {
return false
return true
},
heightOfNotch() { // 刘海屏的刘海高度 单位px
return 0;
}
}
});
</script>
<style lang="less" scoped>
.navbar {
.h72 {
height: 72px;
}
.h46 {
height: 46px;
}
......@@ -109,11 +109,8 @@ export default defineComponent({
left: 0;
right: 0;
z-index: 300;
// height: 72px;
}
.some-block {
// height: 72px;
}
.title {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment