vue

Error in nextTick: "TypeError: C

2020-01-06  本文已影响0人  一只正在成长的程序猿

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

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

  if (this.$refs.child1) {
      this.$nextTick(() => {
          this.$refs.child1.updateOpened();
      });
  }
上一篇 下一篇

猜你喜欢

热点阅读