勇敢的心_
勇敢的心_
  • 发布:2024-12-27 14:03
  • 更新:2024-12-27 14:03
  • 阅读:54

nvue页面list设置高度等于windowHeight,有些机型偶尔出现不能滑动的问题

分类:uni-app
<template>  
    <view>  
        <list @scroll="scroll" :style="{height:(windowHeight-1)+'px'}">  
            <header style="position:sticky;top:0px;">  
                    <!-- 这里是固定在头部的内容 -->  
            </header>  
            <cell>  
                <view style="height:10px;flex:1;background-color:#f7f7f7;"></view>  
            </cell>  
                               <!-- 这里是滚动的内容 -->  
            </cell>  

        </list>  

        <view>  
             <!-- 这里是弹出层之类的,不占用高度 -->  
        </view>  
    </view>  
</template>  

绝大部分机型是没有问题的,但是在少数少数设备上反馈不能滚动

2024-12-27 14:03 负责人:无 分享
已邀请:

要回复问题请先登录注册