fix: 修复导航栏内容高度计算问题
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
backgroundColor: bgColor,
|
||||
}"
|
||||
>
|
||||
<view class="custom-navbar__content" :style="{ height: navBarHeight + 'px' }">
|
||||
<view class="custom-navbar__content" :style="{ height: contentHeight + 'px' }">
|
||||
<view class="custom-navbar__left" :style="{ width: leftWidth + 'px' }">
|
||||
<view v-if="showBack" class="custom-navbar__back" @click="handleBack">
|
||||
<wd-icon :name="backIcon" :size="backIconSize" :color="iconColor" />
|
||||
@@ -82,6 +82,11 @@ const statusBarHeight = computed(() => navbar.statusBarHeight.value);
|
||||
const navBarHeight = computed(() => navbar.navBarHeight);
|
||||
const totalHeight = computed(() => navbar.totalHeight.value);
|
||||
|
||||
const contentHeight = computed(() => {
|
||||
const height = totalHeight.value - statusBarHeight.value;
|
||||
return height > 0 ? height : navBarHeight.value;
|
||||
});
|
||||
|
||||
const menuButtonWidth = computed(() => navbar.menuButtonWidth.value);
|
||||
const menuButtonRightGap = computed(() => navbar.menuButtonRightGap.value);
|
||||
const menuButtonLeft = computed(() => navbar.menuButtonLeft.value);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="home-page">
|
||||
<custom-navbar title="首页" fixed placeholder>
|
||||
<custom-navbar title="首页" fixed placeholder :showBack="false">
|
||||
<template #right>
|
||||
<wd-search
|
||||
v-model="searchValue"
|
||||
|
||||
Reference in New Issue
Block a user