发现小程序一个bug, 在小程序插件中使用wx.createSelectorQuery()获取不到节点信息,需要在后面加入in(this)

例如: 

const query = wx.createSelectorQuery().in(this)
query.selectAll('#id-selector').boundingClientRect()
query.exec(function (res) {
console.log(res)
})
这时候res里面就能获取到节点信息了

相关文章:

  • 2021-06-13
  • 2021-10-07
  • 2021-05-01
  • 2022-12-23
  • 2021-11-28
  • 2021-11-28
猜你喜欢
  • 2021-11-11
  • 2022-12-23
  • 2021-12-23
  • 2023-01-26
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
相关资源
相似解决方案