Home > Web Front-end > JS Tutorial > body text

How to implement sliding with fingers in vue

亚连
Release: 2018-06-05 14:18:14
Original
2475 people have browsed it

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!

Related labels:
vue
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!