ionic4 中 ion-content组件支持滚动事件,官方文档上写的是出于性能原因ionScroll 这个事件默认是禁止的,事实上 ionScroll 、ionScrollStart、ionScrollEnd这三个事件都是禁用的,要想启用需要给ion-content组件加上 scrollEvents="true"属性:
<ion-content scrollEvents="true" (ionScrollStart)="onScroll()">