当前位置:网站首页>wx.createSelectorQuery()在components获取Dom节点的使用

wx.createSelectorQuery()在components获取Dom节点的使用

2022-06-13 02:38:00 紫轩阁

1、在components获取Dom节点的使用

const query = wx.createSelectorQuery().in(this) query.select('#the-id').boundingClientRect(function(res){
    
      res.top // 这个组件内 #the-id 节点的上边界坐标
    }).exec()
原网站

版权声明
本文为[紫轩阁]所创,转载请带上原文链接,感谢
https://blog.csdn.net/slice_93/article/details/114689677