# NodesRef SelectorQuery.select(string selector)
with Promise style call: Not supported
Mini Program plugin: Support
Select the first match selector under the current page selector
Node of the. Returns a NodesRef
Object that can be used to get node information.
# parameter
# string selector
Selector
# Return value
# NodesRef
# selector grammar
Selectors are similar to CSS But only the following syntax is supported.
- ID selector:#the-id
- Class selector (you can specify more than one in a row):. a-class.another-class
- Child element selector:. The-parent > .the-child
- Descendant selector:. The-ancester .the-descendant
- Descendant selector across custom components:. The-ancester >>> .the-descendant
- Union of multiple selectors:#a-node, .some-other-nodes