2
我使用Ionic 2开发我的应用程序。我想知道在离子范围的旋钮上检测touchstart和touchend的方法。当旋钮按下时,我将使用该方法显示某个元素,并在旋钮未按下时移除元素。 (当您按下旋钮并在每页显示标题时,它就像iBooks或Google Play Book)我如何检测它?如何在离子范围的旋钮上检测touchstart和touchend
谢谢
我使用Ionic 2开发我的应用程序。我想知道在离子范围的旋钮上检测touchstart和touchend的方法。当旋钮按下时,我将使用该方法显示某个元素,并在旋钮未按下时移除元素。 (当您按下旋钮并在每页显示标题时,它就像iBooks或Google Play Book)我如何检测它?如何在离子范围的旋钮上检测touchstart和touchend
谢谢
您可以使用touchstart
和touchend
事件。
<div (touchstart)="touchstart($event)" (touchend)="touchend($event)">
发现这里的想法:https://forum.ionicframework.com/t/button-hold-event/48034/2