Error in nextTick

报错信息

“TypeError: Cannot read property ‘children’ of undefined”
Error in nextTick_第1张图片
解决:找到使用nextTick的地方,因为在之前数据为空导致的,因此加一个判断在nextTick之前

if (Array.isArray(this.classList) && this.classList.length > 0) {
  that.$nextTick(() => {
    ...
  });
}

你可能感兴趣的:(vue,vue)