请问页面中不能使用this.selectComonent访问组件?

发布于 7 年前作者 duping2085 次浏览最后编辑 7 年前来自 ask
  • 当前 Bug 的表现(可附上截图)

  • 预期表现

  • 复现路径

  • 提供一个最简复现 Demo

page01.wxml

<view>

<component1 id=“component1”></component1>

</view>

page01.js

this.selectComponent(‘#component1’)  // 结果为null

2 回复
jun90
jun901 楼6 年前

莫名其妙又可以了

chao09
chao092 楼5 年前

再onReady里能搜到吗?