if判断缩写
scroll: false,
onPageScroll(e) {
if(e.scrollTop > 100)
this.scroll = true;
} else {
this.scroll = false;
}
//简写
this.scroll = this.scroll >= 100;
}
微信扫一扫
if判断缩写
scroll: false,
onPageScroll(e) {
if(e.scrollTop > 100)
this.scroll = true;
} else {
this.scroll = false;
}
//简写
this.scroll = this.scroll >= 100;
}
相关推荐