收藏
回答

在 observeAll() 中定义了,为什么说not found ?

原来出现都是正常运行的,现在却时常出现下面的二种提示,二种错误提示总是出现其中之一:

一、[pages/rMarkWords/rmw] Node \".ball , .b1all\" is not found. Intersection observer will not trigger.


二、 [pages/rMarkWords/rmw]  IntersectionObserver is using slowest path, try to enable nativeMode for better performance.


下面是程序的代码,请看看会有什么问题吗?

  observeAll() {

    if (no_observer)

      return

    let that = this

    this._observer = wx.createIntersectionObserver(this, {

      observeAll: true

    }).relativeTo('.scroll-view').observe('.ball , .b1all', (res) => {

      if (firstToView) {

        firstToView = false

        return

      }

    })


    function moveDown() {

      that.setDataView()

    }

    function moveUp() {

      that.setDataView()

    }

  },


回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 本次回答由AI生成
    03-10
    有用
    回复 2
    • WH
      WH
      03-11
      出现这个提示错误:Node \".ball , .b1all\" is not found. Intersection observer will not trigger.
      在wxss中的定义如下,没有问题的:
      .b1all {
        border-bottom: 3rpx dashed rgb(228, 197, 20);  }
      .ball {
        border-bottom: 3rpx dashed rgb(228, 197, 20);  }
      在wxml中,使用如下,也是没有问题的:
       <view  class="{{Pindex==0 ? 'ball' : (Pindex===1?'b1all';)}}>


      关键是:原来是正常可以使用的,现在怎么就不行了,应该小程序系统出现问题了,请检查以下关于 wx.createIntersectionObserver(this, {
                  observeAll: true,
                  thresholds: [0, 0.5, 1],
                  initialRatio: 0,
                  selectAll: true,
                  nativeMode: true  
              }) 有没有改动?应该是这个系统程序出现问题了。
      03-11
      回复
    • 社区技术运营专员-Jahozheng
      社区技术运营专员-Jahozheng
      03-22回复WH
      试试https://developers.weixin.qq.com/s/ALjM7Nm28G7q
      03-22
      回复
登录 后发表内容