Home  >  Article  >  Web Front-end  >  How to implement sliding with fingers in vue

How to implement sliding with fingers in vue

亚连
亚连Original
2018-06-05 14:18:142509browse

Below I will share with you a method of sliding with fingers between Vue routing pages. It has a good reference value and I hope it will be helpful to everyone.

Problem description: How to slide between vue routing pages with your fingers

Solution:

1. Download dependencies: npm intall vue-touch --save -D

2. Add tags to the page that needs to be slid; Pay attention to the width and height. When there is something to be written on the page, v-touch can be used to wrap other tags;

For example:

3. Write their methods respectively in methods;

onSwipeLeft(){. . . . . . . },

onSwipeRight(){. . . . . . . }

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

Detailed interpretation of js function related content

What are the usage methods of isPlainObject() in jQuery?

Using Elememt-UI to build the management backend in Vue (detailed tutorial)


The above is the detailed content of How to implement sliding with fingers in vue. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn