HomeDocs
Skip to main content

SelectorQuery.selectAll

Introduction

Selects nodes that match the selector selector in the current page and returns a NodesRef object instance. Unlike selectorQuery.select(selector), this selects all nodes that match the selector.

Parameters

String selector

Return Value

NodesRef

Sample Code

Page({
onReady() {
this.queryNodeInfo();
},
queryNodeInfo() {
const selectorQuery = dlt.createSelectorQuery();
selectorQuery
.selectAll('.target')
.boundingClientRect((res) => {
console.log('Node Information: ', res);
});
.exec();
},
});
Privacy agreementDeveloper agreementcontact us: developer_service.mi@transsion.com © 2024 MiniApp. All Rights Reserved.