Error in nextTick TypeError Cannot read property 'children' of undefined 解决

Error in nextTick: “TypeError: Cannot read property ‘children’ of undefined” 解决

报错 Error in nextTick: “TypeError: Cannot read property ‘children’ of undefined”

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

  if (this.$refs.child1) {
      this.$nextTick(() => {
          this.$refs.child1.updateOpened();
      });
  }
发布了70 篇原创文章 · 获赞 56 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_44251396/article/details/103851979
今日推荐