Commit 6214543b authored by chenqikuai's avatar chenqikuai

fix

parent 318381cc
<template> <template>
<div class="navbar w-full" style="z-index: 300"> <div class="navbar w-full" style="z-index: 300" v-if="!bangsBlock">
<div <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;" style="background:#F7F7FA; padding-bottom: 8px;"
:class="isBangs ? 'h72' : 'h46'" :style="[isBangs ? 'height:' + `${46 + heightOfNotch}px` : '']"
:style="[(isBangs && bangsBlock) ? 'height: calc(72px - 24px - 8px)' : '']"
v-bind="$attrs" v-bind="$attrs"
v-if="(!isBangs && !bangsBlock || isBangs)"
> >
<div <div class="relative w-full flex items-center justify-center">
class="relative w-full flex items-center justify-center"
v-if="(!isBangs && !bangsBlock) || (isBangs)"
>
<icon <icon
v-if="!bangsBlock && showBackIcon" v-if="showBackIcon"
@click="$router.go(-1)" @click="$router.go(-1)"
name="icon-fanhui" name="icon-fanhui"
class="absolute left-0" class="absolute left-0"
...@@ -40,10 +35,15 @@ ...@@ -40,10 +35,15 @@
</div> </div>
</div> </div>
<div <div
:class="isBangs ? 'h72' : 'h46'" class="h46"
v-if="!isBangs && !bangsBlock && occupyPosition || (isBangs && !bangsBlock)" :style="[isBangs ? 'height:' + `${46 + heightOfNotch}px` : '']"
v-if="occupyPosition"
></div> ></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> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -90,16 +90,16 @@ export default defineComponent({ ...@@ -90,16 +90,16 @@ export default defineComponent({
}, },
computed: { computed: {
isBangs() { isBangs() {
return false return true
},
heightOfNotch() { // 刘海屏的刘海高度 单位px
return 0;
} }
} }
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.navbar { .navbar {
.h72 {
height: 72px;
}
.h46 { .h46 {
height: 46px; height: 46px;
} }
...@@ -109,11 +109,8 @@ export default defineComponent({ ...@@ -109,11 +109,8 @@ export default defineComponent({
left: 0; left: 0;
right: 0; right: 0;
z-index: 300; z-index: 300;
// height: 72px;
}
.some-block {
// height: 72px;
} }
.title { .title {
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC; 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