字节小程序
开发者社区
小程序小游戏
登录
getRelationNodes 获取不到组件节点

getRelationNodes 获取不到组件节点

881浏览作者: 3422544228

报错截图或相关BUG
this.getRelationNodes("../tabs/index", (nodes) => {
  console.log("nodes:" + nodes.length)
  const parent = nodes[0];
  parent.emitEvent(_this.data.index);
});

复现步骤

  • 组件之间交互
  • 子组件获取父组件, 在开发工具里面获取不到,导致报错
  • 但是在真机测试的时候正常
  • 开发工具更新之前还正常,更新之后就出现这个问题了
最后一次编辑于 2020年09月04日
加载中