press事件可以实现长按屏幕的功能,但使用press事件可能会导致页面无法滚动,这时只需要加一个触摸屏属性,设置触摸方向为y轴方向就可以解决,例如:
<ion-card *ngFor="let item of orderList" (press)=" delete(item)" [style.touch-action]="'pan-y'">
</ion-card>
press事件可以实现长按屏幕的功能,但使用press事件可能会导致页面无法滚动,这时只需要加一个触摸屏属性,设置触摸方向为y轴方向就可以解决,例如:
<ion-card *ngFor="let item of orderList" (press)=" delete(item)" [style.touch-action]="'pan-y'">
</ion-card>