我是在上拉加载中调用的wx.createSelectorQuery()来获取dom位置信息,

let qid = '#ppt-' + cTab + '-' + 0 + '-' + (lasto)

let query = wx.createSelectorQuery()

query.select(qid).boundingClientRect()

query.exec(function (res) {

    console.log(res[0].bottom)

})

如果我刚打开调试工具后上拉,调用会出警告如下:

VM54:1 An SelectorQuery call is ignored because no proper page or component is found. Please considering using `SelectorQuery.in` to specify a proper one.

然后我按照提示加了wx.createSelectorQuery().in(this)也不行

重新编译一下就不会报错了,不知道是什么问题?

崩溃。。

求救c⌒っ゚Д゚)っ


展开全部
收起
0回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部