汉中李
汉中李
  • 发布:2021-08-17 13:27
  • 更新:2021-08-17 13:39
  • 阅读:470

【报Bug】tabBar页面高度计算不正确

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 10

HBuilderX类型: 正式

HBuilderX版本号: 3.2.1

手机系统: Android

手机系统版本号: Android 7.1.1

手机厂商: 模拟器

手机机型: 雷电

页面类型: nvue

打包方式: 离线

项目创建方式: HBuilderX

示例代码:

页面配置:

{  
    "path": "pages/test",  
    "style": {  
        "navigationBarTitleText": "test",  
        "navigationStyle": "custom",  
        "disableScroll": true,  
        "app-plus": {  
            "titleNView": false,  
            "subNVues": [{  
                "id": "navbar",  
                "path": "pages/navbar"  
                "type": "navigationBar"  
            }]  
        }  
    }  
},

页面代码:

<template>  
    <list class="list">  
        <cell v-for="num in lists" :key="num">  
            <text>{{ num }}</text>  
        </cell>  
    </list>  
</template>  

<style>  
.list {  
    flex: 1;  
}  
</style>  

<script>  
export default {  
    data() {  
        return {  
            lists: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]  
        }  
    },  
    onReady() {  
        console.log(uni.getSystemInfoSync().windowHeight)  
    },  
}  
</script>

操作步骤:

按代码示例配置页面并加入tabBar
然后运行页面代码,页面列表拉到底只能看到数字97的一半
getSystemInfoSync获取的高度也不正确

预期结果:

页面可视区域高度正确

实际结果:

页面可视区域高度不正确

bug描述:

属于tabBar页面,定义了subNVues高度计算不正确

2021-08-17 13:27 负责人:无 分享
已邀请:
汉中李

汉中李 (作者)

又测试了下 刚好多了navbar的高度

该问题目前已经被锁定, 无法添加新回复