ionic 的页面滚动: ion-content 的ionScroll 、ionScrollStart、ionScrollEnd事件

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

<ion-content scrollEvents="true" (ionScrollStart)="onScroll()">

喜欢的话,请点赞,转发、收藏、评论,谢谢!
原文地址:https://www.cnblogs.com/johnjackson/p/12698858.html