 
                                        
                                    
                                    - 发布:2020-07-08 09:51
- 更新:2023-03-23 17:23
- 阅读:1468
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX类型: 正式
HBuilderX版本号: 2.7.14
手机系统: 全部
手机厂商: 苹果
页面类型: nvue
打包方式: 云端
项目创建方式: HBuilderX
测试过的手机:
示例代码:
                                    
                                    
                                        .header {  
        height: 700px;  
        flex-direction: row;  
        align-items: center;  
        justify-content: center;  
        background-color: #f4f4f4;  
    }  
uni.createSelectorQuery().in(this).select('#head').boundingClientRect().exec(rect => {  
                    console.log(rect[0].height);  
                    this._headHeight = 700;  
                });
                                     
                                
                                                                                                .header {  
        height: 700px;  
        flex-direction: row;  
        align-items: center;  
        justify-content: center;  
        background-color: #f4f4f4;  
    }  
uni.createSelectorQuery().in(this).select('#head').boundingClientRect().exec(rect => {  
                    console.log(rect[0].height);  
                    this._headHeight = 700;  
                });操作步骤:
                                    
                                        //只做了以下两处修改  
.header {  
        height: 700px;  
        flex-direction: row;  
        align-items: center;  
        justify-content: center;  
        background-color: #f4f4f4;  
    }  
uni.createSelectorQuery().in(this).select('#head').boundingClientRect().exec(rect => {  
                    console.log(rect[0].height);  
                    this._headHeight = 700;  
                });
                                     
                                
                                                                                                //只做了以下两处修改  
.header {  
        height: 700px;  
        flex-direction: row;  
        align-items: center;  
        justify-content: center;  
        background-color: #f4f4f4;  
    }  
uni.createSelectorQuery().in(this).select('#head').boundingClientRect().exec(rect => {  
                    console.log(rect[0].height);  
                    this._headHeight = 700;  
                });预期结果:
                                    
                                    
                                        子list吸顶之后可以正常滑动
                                     
                                
                                                                                                子list吸顶之后可以正常滑动
实际结果:
                                    
                                    
                                        子list吸顶之后不能滑动
                                     
                                
                                                            子list吸顶之后不能滑动
bug描述:
针对uni-app官方提供的list滚动吸顶效果的案例,原原本本复制粘贴在自己的项目上,修改其中 id="head" 的高度大于屏幕的高度的时候,子list可以吸顶,但是子list就无法继续滚动了
 
             
             
             
			 
                                                                     
                                                                     
                                                                     
                                                                    
 
                                                                    