SelectorQuery

解释: 选择器 selectorQuery对象的方法列表 :

示例

在开发者工具中预览效果

扫码体验

请使用百度APP扫码

图片示例

代码示例

  1. Page({ data: { }, onReady() { const selectorQuery = swan.createSelectorQuery(); this.selectorQuery = selectorQuery; }, queryNodeInfo() { this.selectorQuery.select('.target').boundingClientRect() .in(this); .selectAll('.target').boundingClientRect(); .selectViewport() .exec(res => { console.log(res) } });});