if判断缩写
scroll: false,
onPageScroll(e) {
  if(e.scrollTop > 100)
    this.scroll = true;
  } else {
    this.scroll = false;
  }
  //简写
  this.scroll = this.scroll >= 100;
}if判断缩写
阅读 55
2023-05-18
if判断缩写
scroll: false,
onPageScroll(e) {
  if(e.scrollTop > 100)
    this.scroll = true;
  } else {
    this.scroll = false;
  }
  //简写
  this.scroll = this.scroll >= 100;
}相关推荐
精彩评论(0)