美文网首页vue
Error in nextTick: "TypeError: C

Error in nextTick: "TypeError: C

作者: 一只正在成长的程序猿 | 来源:发表于2020-01-06 10:25 被阅读0次

报错 Error in nextTick: "TypeError: Cannot read property 'children' of undefined"

解决:加一个判断 if (数据存在),再执行this.nextTick()方法

  if (this.$refs.child1) {
      this.$nextTick(() => {
          this.$refs.child1.updateOpened();
      });
  }

相关文章

网友评论

    本文标题:Error in nextTick: "TypeError: C

    本文链接:https://www.haomeiwen.com/subject/owbhactx.html