0
点赞
收藏
分享

微信扫一扫

if判断缩写

if判断缩写

scroll: false,

onPageScroll(e) {
  if(e.scrollTop > 100)
    this.scroll = true;
  } else {
    this.scroll = false;
  }
  //简写
  this.scroll = this.scroll >= 100;
}

举报

相关推荐

0 条评论