In the mobile terminal, the left and right sliding events appear in the left stroke of the delete button. Is there any good solution for the right sliding hidden operation?

in mobile development, one of the operations you need to do is to swipe the delete button on the left and hide the button on the right. You don"t need to combine animate animation with jQuery,jQuery to control it, but with js or vue, what good solutions do you have to solve this problem? Or use a plug-in

Sep.02,2021

many component libraries have corresponding components:
for example, vux's swipeout
or Google vue left slide deletion also has many implementation ideas


can be combined with touchstart and touchmove events. Touchstart gets the starting clientX, and then gets the current clientX in the touchmove event. Whether it is judged to be sliding or not is determined by the absolute value of the difference between the two, and the positive and negative direction of the difference is determined.

Menu