我想在iOS上一起使用VirtualScroll和InfiniteScroll,但似乎InfiniteScroll不能与VirtualScroll一起使用。它在android中运行良好。
<ion-content class="home">
<ion-list [virtualScroll]="items" approxItemHeight="50px">
<ion-item *virtualItem="#item">
<ion-avatar item-left>
<ion-img [src]="item.picture" width="48" height="48"></ion-img>
</ion-avatar>
<h2>{{item.name}}</h2>
</ion-item>
</ion-list>
<ion-infinite-scroll (infinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
doInfinite(infiniteScroll:any) {
console.log('doInfinite, start is currently '+this.start);
this.start+=50;
this.loadPeople().then(()=>{
infiniteScroll.complete();
});
}
注意: - 离子版:3.0.1