In the development of mobile applications, there will be a lot of gesture operations, such as sliding, long-press and so on, in order to facilitate the quick integration of these gestures, MUI built-in common gesture events, the currently supported gesture events see the following list:
Classification parameter description
Tap Tap to click the screen
Doubletap Double-click Screen
Long press Longtap long press the screen
Hold down the screen
Release Leave screen
Slide Swipeleft Swipe left
Swiperight Swipe Right
Swipeup Slide Up
Swipedown Slide Down
Drag DragStart to start dragging
Drag dragging in
Dragend Drag End
mui.init ({gestureconfig:{tap:true,//default is TrueDoubletap:true,//default is FalseLongtap:true,//default is FalseSwipetrue,//default is TrueDragtrue,//default is TrueHoldfalse,//The default is False, not listeningReleasefalse//The default is False, not listening } });
Note: DragStart, drag, dragend shared drag switch, Swipeleft, Swiperight, swipeup, Swipedown common swipe switch
The object you want to listen to. AddEventListener ("swipeleft",function() { Console.log ("You are swiping to the left");});
16. Gestures