📌  相关文章
📜  reactjs typeError:无法读取null的属性'offsetHeight' - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:38.443000             🧑  作者: Mango

代码示例1
handleResize = () => {
    let highestSlide = 0;

    this.refArray.forEach(ref => {
      if (ref.current && highestSlide < ref.current.offsetHeight) {
        highestSlide = ref.current.offsetHeight;
      }
    });
  };