创建API即可浮现
- 发布:2021-11-07 10:10
 - 更新:2021-11-08 15:50
 - 阅读:1283
 
产品分类: uniapp/H5
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: windows10
HBuilderX类型: 正式
HBuilderX版本号: 3.2.12
浏览器平台: Chrome
浏览器版本: 87.0.4280.88
项目创建方式: HBuilderX
操作步骤:
                                    
                                         
                                
                                                                                                预期结果:
                                    
                                    
                                        屏蔽错误
                                     
                                
                                                                                                屏蔽错误
实际结果:
                                    
                                    
                                        let observer = uni.createIntersectionObserver(this)
                                     
                                
                                                            let observer = uni.createIntersectionObserver(this)
bug描述:
在使用uni.createIntersectionObserver(this)时,在浏览器和安卓APP上会报错:
10chunk-vendors.js:98 Uncaught TypeError: Cannot read property 'bottom' of null
at a (chunk-vendors.js:98)
at chunk-vendors.js:98
at Array.forEach (<anonymous>)
at IntersectionObserver.c.<computed>.IntersectionObserver.root (chunk-vendors.js:98)  
在微信小程序不会,chunk-vendors.js:98点开具体报错位置为:
return { bottom: t.bottom, height: t.height, left: t.left, right: t.right, top: t.top, width: t.width };