this.createSelectorQuery 无法获取子组件里的 node,有官方示例吗

发布于 8 年前作者 junjiang6591 次浏览最后编辑 8 年前来自 ask
const query = this.createSelectorQuery();
query.select('.step-num-fix').node(res => {
    console.log(res)
    if (!res) return;
 
    // ...     
 }).exec()

其中.step-nun-fix 为子组件的节点  这种写法为什么查不到子组件的 node 呢, 有正确的写法吗


1 回复
xiajun
xiajun1 楼6 年前

节点是自定义组件里的吗