监听器无法找到节点,Intersection observer will not trigger.
[图片] 此段的代码为: handleVideoScroll: function () { console.log("videos", this.data.videos) console.log("当前视频编号", this.data.currentPlayVideoIndex) const currentId = this.data.videos[this.data.currentPlayVideoIndex]._id; // 关键代码 // relativeToViewport 这里指定对比的就是viewport,viewport的意思就是document中的可视区域 this.observerObj = wx.createIntersectionObserver().relativeToViewport(); //this.observerObj = this.createIntersectionObserver().relativeToViewport(); console.log('listen ' + currentId); // 监听目标视频跟viewport相交区域的变化 this.observerObj.observe("#" + currentId, this.controlVideos); console.log("success") }, 已经尝试使用this.createIntersectionObserver().relativeToViewport();来替换wx.createIntersectionObserver().relativeToViewport();还是报同样的错误。