- IntersectionObserver.relativeToViewport部份手机不能触发回调?
不兼容机型 [图片] 代码片断,请问一下有没有什么办法可以解决呢 getModuleSection() { onst top = this.getFixedTop(); const bottom = this.getFixedBottom(); const that = this; console.log('createIntersectionObserver--before', `.list-start-${this.data.moduleId}`); console.log('createIntersectionObserver--before-===', `.list-start-${this.data.moduleId}`, top, bottom); console.log('createIntersectionObserver--before--toViewport', this.createIntersectionObserver().relativeToViewport({ top, bottom })); this.createIntersectionObserver().relativeToViewport({ top, bottom }).observe(`.list-start-${this.data.moduleId}`, (res) => { console.log('createIntersectionObserver', res, `.list-start-${this.data.moduleId}`); if (that.data.isFixed && res.intersectionRatio <= 0) { that.setData({ isFixed: false, }); this.triggerEvent('changeFixed', false); } if (!that.data.isFixed && res.intersectionRatio > 0) { that.setData({ isFixed: true, }); this.triggerEvent('changeFixed', true); } }); },
2023-10-19 - wx.chooseLocation 获取地址失败
wx.chooseLocation API接口选择地址时,地图上的指示点落在在没有地址名的地方,点完成后很容易出现失败的情况,请问有没有什么解决办法 [图片][图片]
2022-08-15